diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 1fc8897d23..3e8c430b55 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,19 +1,17 @@ Please fill in this template. -- [ ] Make your PR against the `master` branch. - [ ] Use a meaningful title for the pull request. Include the name of the package modified. - [ ] Test the change in your own code. (Compile and run.) - [ ] Follow the advice from the [readme](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/README.md#make-a-pull-request). - [ ] Avoid [common mistakes](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/README.md#common-mistakes). -- [ ] Run `tsc` without errors. -- [ ] Run `npm run lint package-name` if a `tslint.json` is present. +- [ ] Run `npm run lint package-name` (or `tsc` if no `tslint.json` is present). Select one of these and delete the others: If adding a new definition: - [ ] The package does not provide its own types, and you can not add them. - [ ] If this is for an NPM package, match the name. If not, do not conflict with the name of an NPM package. -- [ ] Create it with `npm run new-package package-name`, not by basing it on an existing project. +- [ ] Create it with `dts-gen --dt`, not by basing it on an existing project. - [ ] `tslint.json` should be present, and `tsconfig.json` should have `noImplicitAny`, `noImplicitThis`, and `strictNullChecks` set to `true`. If changing an existing definition: diff --git a/README.md b/README.md index 34ddfd9ef2..6868d116cf 100644 --- a/README.md +++ b/README.md @@ -110,15 +110,14 @@ Your package should have this structure: | tsconfig.json | This allows you to run `tsc` within the package. | | tslint.json | Enables linting. | -Generate these by running `npm run new-package -- --name my-package-name --template module`. -(Other templates are `module-class`, `module-function`, `module-plugin`, `global`, `global-plugin`, and `global-modifying-module`. -This just wraps [dts-gen](https://github.com/Microsoft/dts-gen), so it supports all options from that.) +Generate these by running `npm install -g dts-gen` and `dts-gen --dt --name my-package-name --template module`. +See all options at [dts-gen](https://github.com/Microsoft/dts-gen). You may edit the `tsconfig.json` to add new files, to add `"target": "es6"` (needed for async functions), to add to `"lib"`, or to add the `"jsx"` compiler option. DefinitelyTyped members routinely monitor for new PRs, though keep in mind that the number of other PRs may slow things down. -For a good example package, see [base64-js](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/base64-js). +For a good example package, see [base64-js](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/base64-js). #### Common mistakes @@ -167,9 +166,11 @@ If a `tslint.json` turns rules off, this is because that hasn't been fixed yet. } ``` -(To indicate that a lint rule truly does not apply, use `// tslint:disable:rule-name` or better, `//tslint:disable-next-line:rule-name`.) +(To indicate that a lint rule truly does not apply, use `// tslint:disable rule-name` or better, `//tslint:disable-next-line rule-name`.) + +Test by running `npm run lint package-name` where `package-name` is the name of your package. +This script uses [dtslint](https://github.com/Microsoft/dtslint). -Test the linter by running `npm run lint -- package-name`. Do not use a globally installed tslint. ## FAQ @@ -191,7 +192,7 @@ If you're adding a new major version of a library, you can copy `index.d.ts` to #### I notice some packages having a `package.json` here. Usually you won't need this. When publishing a package we will normally automatically create a `package.json` for it. -A `package.json` may be included for the sake of specifying dependencies. Here's an [example](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/pikaday/package.json). +A `package.json` may be included for the sake of specifying dependencies. Here's an [example](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/pikaday/package.json). We do not allow other fields, such as `"description"`, to be defined manually. Also, if you need to reference an older version of typings, you must do that by adding `"dependencies": { "@types/foo": "x.y.z" }` to the package.json. @@ -231,7 +232,7 @@ Before making your change, please create a new subfolder with the current versio 1. Update the relative paths in `tsconfig.json` as well as `tslint.json`. 2. Add path mapping rules to ensure that tests are running against the intended version. -For example [history v2 `tsconfig.json`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/history/v2/tsconfig.json) looks like: +For example [history v2 `tsconfig.json`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/history/v2/tsconfig.json) looks like: ```json { @@ -250,8 +251,8 @@ For example [history v2 `tsconfig.json`](https://github.com/DefinitelyTyped/Defi ``` Please note that unless upgrading something backwards-compatible like `node`, all packages depending of the updated package need a path mapping to it, as well as packages depending on *those*. -For example, `react-router` depends on `history@2`, so [react-router `tsconfig.json`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/react-router/tsconfig.json) has a path mapping to `"history": [ "history/v2" ]`; -transitively `react-router-bootstrap` (which depends on `react-router`) also adds a path mapping in its [tsconfig.json](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/react-router-bootstrap/tsconfig.json). +For example, `react-router` depends on `history@2`, so [react-router `tsconfig.json`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/react-router/tsconfig.json) has a path mapping to `"history": [ "history/v2" ]`; +transitively `react-router-bootstrap` (which depends on `react-router`) also adds a path mapping in its [tsconfig.json](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/react-router-bootstrap/tsconfig.json). Also, `/// ` will not work with path mapping, so dependencies must use `import`. diff --git a/package.json b/package.json index 1dad46394d..77e57cbb44 100644 --- a/package.json +++ b/package.json @@ -16,13 +16,12 @@ }, "scripts": { "compile-scripts": "tsc -p scripts", - "new-package": "dts-gen --dt", "not-needed": "node scripts/not-needed.js", - "lint": "node scripts/lint.js", - "test": "node node_modules/types-publisher/bin/tester/test.js --run-from-definitely-typed --nProcesses 1" + "test": "node node_modules/types-publisher/bin/tester/test.js --run-from-definitely-typed --nProcesses 1", + "lint": "dtslint --dt types" }, "devDependencies": { - "types-publisher": "Microsoft/types-publisher#production", - "dts-gen": "latest" + "dtslint": "Microsoft/dtslint#production", + "types-publisher": "Microsoft/types-publisher#production" } } diff --git a/scripts/lint.js b/scripts/lint.js deleted file mode 100644 index 84ef71259d..0000000000 --- a/scripts/lint.js +++ /dev/null @@ -1,25 +0,0 @@ -// Usage: npm run lint -- my-package-name -const pkg = process.argv[2]; -const execSync = require("child_process").execSync; -const existsSync = require("fs").existsSync; -const path = require("path"); - -const pkgPath = path.join("types", pkg); - -// Path of tslint when `types-publisher` is symlinked -const symlinkedTslintPath = "../../node_modules/types-publisher/node_modules/tslint" -let tslintPath = existsSync(path.join(pkgPath, symlinkedTslintPath)) ? symlinkedTslintPath : "../node_modules/tslint"; -// An older version (e.g. abs/v0) is in a nested directory, so needs to look one more level up for tslint. -if (pkg.includes("/") && pkg[pkg.length - 1] !== "/") { - tslintPath = path.join("..", tslintPath); -} - -const cmd = `node ${tslintPath}/lib/tslint-cli --format stylish "**/*.ts"`; -console.log(cmd); - -try { - // Child process writes directly to our own stdout - execSync(cmd, { cwd: pkgPath, stdio: "inherit" }); -} catch (_) { - // Process should have printed out error info -} diff --git a/types/ably/ably-tests.ts b/types/ably/ably-tests.ts index 026ef48adc..bc50d03ce6 100644 --- a/types/ably/ably-tests.ts +++ b/types/ably/ably-tests.ts @@ -1,6 +1,6 @@ import * as Ably from 'ably'; -declare var console: { log(message: any): void }; +declare const console: { log(message: any): void }; const ApiKey = 'appId.keyId:secret'; const client = new Ably.Realtime(ApiKey); @@ -19,10 +19,9 @@ client.connection.on('failed', () => { // failed connection }); - // Subscribing to a channel -var channel = client.channels.get('test'); +const channel = client.channels.get('test'); channel.subscribe(message => { message.name; // 'greeting' message.data; // 'Hello World!' @@ -68,7 +67,6 @@ channel.history({ start: Date.now() - 10000, end: Date.now(), limit: 100, direct console.log(messagesPage.items.length); }); - // Presence on a channel // Getting presence: @@ -118,7 +116,7 @@ channel.history({ start: Date.now() - 10000, end: Date.now(), limit: 100, direct // Generate a random 256-bit key for demonstration purposes (in // practice you need to create one and distribute it to clients yourselves) Ably.Realtime.Crypto.generateRandomKey((err, key) => { - var channel = client.channels.get('channelName', { cipher: { key } }); + const channel = client.channels.get('channelName', { cipher: { key } }); channel.subscribe(message => { message.name; // 'name is not encrypted' @@ -136,7 +134,7 @@ channel.setOptions({cipher: {key: ''}}, () => { // Using the REST API -var restChannel = restClient.channels.get('test'); +const restChannel = restClient.channels.get('test'); // Publishing to a channel @@ -195,7 +193,6 @@ restChannel.presence.history((err, messagesPage) => { // PaginatedResult // Can optionally take an options param, see https://www.ably.io/documentation/rest-api/#message-history restChannel.history({ start: Date.now() - 10000, end: Date.now(), limit: 100, direction: 'forwards' }, (err, messagesPage) => {}); - // Generate Token and Token Request // See https://www.ably.io/documentation/general/authentication for an explanation of Ably's authentication mechanism. @@ -206,7 +203,7 @@ client.auth.requestToken((err, tokenDetails) => { // see https://www.ably.io/documentation/rest/authentication/#token-details for its properties // Now we have the token, we can send it to someone who can instantiate a client with it: - var clientUsingToken = new Ably.Realtime(tokenDetails.token); + const clientUsingToken = new Ably.Realtime(tokenDetails.token); }); // requestToken can take two optional params @@ -242,15 +239,15 @@ client.stats({ limit: 50 }, (err, statsPage) => { // statsPage as Paginat client.time({}, (err, time) => {}); // time is in ms since epoch // Getting decoded Message objects from JSON -var messages = Ably.Realtime.Message.fromEncodedArray([{ id: 'foo' }]); +const messages = Ably.Realtime.Message.fromEncodedArray([{ id: 'foo' }]); console.log(messages[0].id); -var message = Ably.Rest.Message.fromEncoded({ id: 'foo' }); +const message = Ably.Rest.Message.fromEncoded({ id: 'foo' }); console.log(message.id); // Getting decoded PresenceMessage objects from JSON -var presenceMessages = Ably.Realtime.PresenceMessage.fromEncodedArray([{ id: 'foo' }]); +const presenceMessages = Ably.Realtime.PresenceMessage.fromEncodedArray([{ id: 'foo' }]); console.log(presenceMessages[0].action); -var presenceMessage = Ably.Rest.PresenceMessage.fromEncoded({ id: 'foo' }); +const presenceMessage = Ably.Rest.PresenceMessage.fromEncoded({ id: 'foo' }); console.log(presenceMessage.action); diff --git a/types/ably/index.d.ts b/types/ably/index.d.ts index b8d1eb9bfe..7bfc2338b6 100644 --- a/types/ably/index.d.ts +++ b/types/ably/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Ably // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -declare namespace ablyLib { +export namespace ablyLib { namespace ChannelState { type INITIALIZED = 'initialized'; type ATTACHING = 'attaching'; @@ -130,15 +130,15 @@ declare namespace ablyLib { * A function which is called when a new token is required. * The role of the callback is to either generate a signed TokenRequest which may then be submitted automatically * by the library to the Ably REST API requestToken; or to provide a valid token in as a TokenDetails object. - **/ - authCallback?: (data: TokenParams, callback: (error: ErrorInfo | string, tokenRequestOrDetails: TokenDetails | TokenRequest | string) => void) => void; + */ + authCallback?(data: TokenParams, callback: (error: ErrorInfo | string, tokenRequestOrDetails: TokenDetails | TokenRequest | string) => void): void; authHeaders?: { [index: string]: string }; authMethod?: HTTPMethods; authParams?: { [index: string]: string }; /** * A URL that the library may use to obtain a token string (in plain text format), or a signed TokenRequest or TokenDetails (in JSON format). - **/ + */ authUrl?: string; key?: string; queryTime?: boolean; @@ -259,13 +259,13 @@ declare namespace ablyLib { /** * A number controlling the verbosity of the output. Valid values are: 0 (no logs), 1 (errors only), * 2 (errors plus connection and channel state changes), 3 (high-level debug output), and 4 (full debug output). - **/ + */ level?: number; /** * A function to handle each line of log output. If handler is not specified, console.log is used. - **/ - handler?: (...args: any[]) => void; + */ + handler?(...args: any[]): void; } interface ChannelEvent { @@ -398,7 +398,7 @@ declare namespace ablyLib { } interface Crypto { - generateRandomKey: (callback: (error: ErrorInfo, key: string) => void) => void; + generateRandomKey(callback: (error: ErrorInfo, key: string) => void): void; } class Connection extends EventEmitter { diff --git a/types/accounting/accounting-tests.ts b/types/accounting/accounting-tests.ts index 0c11683c65..a397c559eb 100644 --- a/types/accounting/accounting-tests.ts +++ b/types/accounting/accounting-tests.ts @@ -27,8 +27,6 @@ accounting.formatMoney(5318008, { // Will recursively format an array of values: accounting.formatMoney([123, 456, [78, 9]], "$", 0); // ["$123", "$456", ["$78", "$9"]] - - // formatColumn // Format list of numbers for display: @@ -40,8 +38,6 @@ accounting.formatColumn([123, 12345], "$ ", 0); // ["$ 123", "$ 12,345"] // List of numbers can be a multi-dimensional array (formatColumn is applied recursively): accounting.formatColumn([[1, 100], [900, 9]]); // [["$ 1.00", "$100.00"], ["$900.00", "$ 9.00"]] - - // formatNumber // Example usage: @@ -58,16 +54,11 @@ accounting.formatNumber(5318008, { // Will recursively format an array of values: accounting.formatNumber([123456, [7890, 123]]); // ["123,456", ["7,890", "123"]] - - // toFixed (0.615).toFixed(2); // "0.61" accounting.toFixed(0.615, 2); // "0.62" - - - // unformat // Example usage: diff --git a/types/adal/index.d.ts b/types/adal/index.d.ts index 18ca3d8079..552ca468aa 100644 --- a/types/adal/index.d.ts +++ b/types/adal/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for ADAL.JS 1.0.13 +// Type definitions for ADAL.JS 1.0.14 // Project: https://github.com/AzureAD/azure-activedirectory-library-for-js // Definitions by: mmaitre314 // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -29,6 +29,7 @@ declare namespace adal { loginResource?: string; resource?: string; extraQueryParameter?: string; + navigateToLoginRequestUrl?: boolean; } interface User { diff --git a/types/amplify-deferred/tslint.json b/types/amplify-deferred/tslint.json index f05741c59b..b0e7084e94 100644 --- a/types/amplify-deferred/tslint.json +++ b/types/amplify-deferred/tslint.json @@ -1,6 +1,6 @@ { "extends": "../tslint.json", "rules": { - "forbidden-types": false + "ban-types": false } } diff --git a/types/amplify/amplify-tests.ts b/types/amplify/amplify-tests.ts index 8cce567960..62b00052dd 100644 --- a/types/amplify/amplify-tests.ts +++ b/types/amplify/amplify-tests.ts @@ -16,7 +16,6 @@ amplify.subscribe("dataexample", data => { alert(data.foo); // bar }); - amplify.publish("dataexample", { foo: "bar" }); amplify.subscribe("dataexample2", (param1, param2) => { @@ -47,7 +46,6 @@ amplify.subscribe("priorityexample", data => { } }, 1); - // Store data with amplify storage picking the default storage technology: amplify.publish("priorityexample", { foo: "bar" }); @@ -56,9 +54,9 @@ amplify.publish("priorityexample", { foo: "oops" }); amplify.store("storeExample1", { foo: "bar" }); amplify.store("storeExample2", "baz"); // retrieve the data later via the key -var myStoredValue = amplify.store("storeExample1"), - myStoredValue2 = amplify.store("storeExample2"), - myStoredValues = amplify.store(); +const myStoredValue = amplify.store("storeExample1"); +let myStoredValue2 = amplify.store("storeExample2"); +const myStoredValues = amplify.store(); myStoredValue.foo; // bar myStoredValue2; // baz myStoredValues.storeExample1.foo; // bar @@ -68,15 +66,13 @@ myStoredValues.storeExample2; // baz amplify.store.sessionStorage("explicitExample", { foo2: "baz" }); // retrieve the data later via the key -var myStoredValue2 = amplify.store.sessionStorage("explicitExample"); +myStoredValue2 = amplify.store.sessionStorage("explicitExample"); myStoredValue2.foo2; // baz - // REQUEST // Set up and use a request utilizing Ajax - amplify.request.define("ajaxExample1", "ajax", { url: "/myApiUrl", dataType: "json", @@ -159,15 +155,11 @@ amplify.request("twitter-search", { term: "amplifyjs" } ); // Similarly, we can create a request that searches for mentions, by accepting a username: - amplify.request.define("twitter-mentions", "ajax", { - url: "http://search.twitter.com/search.json", - dataType: "jsonp", - dataMap: data => { - return { - q: "@" + data.user - }; - } - }); +amplify.request.define("twitter-mentions", "ajax", { + url: "http://search.twitter.com/search.json", + dataType: "jsonp", + dataMap: data => ({ q: "@" + data.user }), +}); amplify.request("twitter-mentions", { user: "amplifyjs" }); @@ -175,7 +167,7 @@ amplify.request("twitter-mentions", { user: "amplifyjs" }); // Example: -var appEnvelopeDecoder: amplify.Decoder = (data, status, xhr, success, error) => { +const appEnvelopeDecoder: amplify.Decoder = (data, status, xhr, success, error) => { if (data.status === "success") { success(data.data); } else if (data.status === "fail" || data.status === "error") { @@ -197,7 +189,6 @@ amplify.request.decoders.appEnvelope = appEnvelopeDecoder; // but you can also just add it via an index amplify.request.decoders['appEnvelopeStr'] = appEnvelopeDecoder; - amplify.request.define("decoderExample", "ajax", { url: "/myAjaxUrl", type: "POST", @@ -246,11 +237,11 @@ amplify.request({ // amplify.request comes with built in support for status.The status parameter appears in the default success or error callbacks when using an ajax definition. - amplify.request.define("statusExample1", "ajax", { - // ... - }); +amplify.request.define("statusExample1", "ajax", { + // ... +}); - amplify.request({ +amplify.request({ resourceId: "statusExample1", success: (data, status) => { }, diff --git a/types/amplify/index.d.ts b/types/amplify/index.d.ts index 5cb03e5b1d..f88c754264 100644 --- a/types/amplify/index.d.ts +++ b/types/amplify/index.d.ts @@ -9,8 +9,8 @@ declare namespace amplify { interface RequestSettings { resourceId: string; data?: any; - success?: (...args: any[]) => void; - error?: (...args: any[]) => void; + success?(...args: any[]): void; + error?(...args: any[]): void; } type Decoder = diff --git a/types/amplify/tslint.json b/types/amplify/tslint.json index fe03bea79d..6e33505955 100644 --- a/types/amplify/tslint.json +++ b/types/amplify/tslint.json @@ -1,7 +1,7 @@ { "extends": "../tslint.json", "rules": { - "forbidden-types": false, + "ban-types": false, "unified-signatures": false } } diff --git a/types/amqplib/amqplib-tests.ts b/types/amqplib/amqplib-tests.ts index 24dade85dc..8bfcf3c9b4 100644 --- a/types/amqplib/amqplib-tests.ts +++ b/types/amqplib/amqplib-tests.ts @@ -1,7 +1,7 @@ // promise api tests import amqp = require('amqplib'); -var msg = 'Hello World'; +const msg = 'Hello World'; // test promise api amqp.connect('amqp://localhost') @@ -21,11 +21,10 @@ amqp.connect('amqp://localhost') }); // test promise api properties -var amqpMessage: amqp.Message; +let amqpMessage: amqp.Message; amqpMessage.properties.contentType = 'application/json'; -var amqpAssertExchangeOptions: amqp.Options.AssertExchange; -var anqpAssertExchangeReplies: amqp.Replies.AssertExchange; - +let amqpAssertExchangeOptions: amqp.Options.AssertExchange; +let anqpAssertExchangeReplies: amqp.Replies.AssertExchange; // callback api tests import amqpcb = require('amqplib/callback_api'); @@ -59,7 +58,7 @@ amqpcb.connect('amqp://localhost', (err, connection) => { }); // test callback api properties -var amqpcbMessage: amqpcb.Message; +let amqpcbMessage: amqpcb.Message; amqpcbMessage.properties.contentType = 'application/json'; -var amqpcbAssertExchangeOptions: amqpcb.Options.AssertExchange; -var anqpcbAssertExchangeReplies: amqpcb.Replies.AssertExchange; +let amqpcbAssertExchangeOptions: amqpcb.Options.AssertExchange; +let anqpcbAssertExchangeReplies: amqpcb.Replies.AssertExchange; diff --git a/types/angular-formly/angular-formly-tests.ts b/types/angular-formly/angular-formly-tests.ts index 83f13af2d4..b78c8a1257 100644 --- a/types/angular-formly/angular-formly-tests.ts +++ b/types/angular-formly/angular-formly-tests.ts @@ -30,6 +30,7 @@ class FormConfig { formlyConfig.extras.errorExistsAndShouldBeVisibleExpression = angular.noop; formlyConfig.extras.explicitAsync = true; formlyConfig.extras.fieldTransform = angular.noop; + formlyConfig.extras.fieldTransform = [angular.noop]; formlyConfig.extras.getFieldId = angular.noop; formlyConfig.extras.ngModelAttrsManipulatorPreferUnbound = true; } diff --git a/types/angular-formly/index.d.ts b/types/angular-formly/index.d.ts index aed12f5360..d37228fb79 100644 --- a/types/angular-formly/index.d.ts +++ b/types/angular-formly/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for angular-formly 7.2.3 +// Type definitions for angular-formly 7.2.4 // Project: https://github.com/formly-js/angular-formly // Definitions by: Scott Hatcher // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -44,7 +44,7 @@ declare namespace AngularFormly { data?: { [key: string]: any; }; - fieldTransform?: Function; + fieldTransform?: Function | Array; formState?: Object; removeChromeAutoComplete?: boolean; resetModel?: Function; @@ -580,7 +580,7 @@ declare namespace AngularFormly { defaultHideDirective: string; errorExistsAndShouldBeVisibleExpression: any; getFieldId: Function; - fieldTransform: Function; + fieldTransform: Function | Array; explicitAsync: boolean; } diff --git a/types/angular-gridster/angular-gridster-tests.ts b/types/angular-gridster/angular-gridster-tests.ts index 7af4908d2d..f8c5a93c81 100644 --- a/types/angular-gridster/angular-gridster-tests.ts +++ b/types/angular-gridster/angular-gridster-tests.ts @@ -3,11 +3,10 @@ import * as angular from "angular"; import gridster from "angular-gridster"; -var myApp = angular.module("testModule", ["gridster"]); +const myApp = angular.module("testModule", ["gridster"]); // configure gridster's global options myApp.run(["gridsterConfig", (gridsterConfig: angular.gridster.GridsterConfig) => { - gridsterConfig.mobileBreakPoint = 697; gridsterConfig.colWidth = "100"; gridsterConfig.rowHeight = "100"; @@ -24,4 +23,4 @@ myApp.run(["gridsterConfig", (gridsterConfig: angular.gridster.GridsterConfig) = gridsterConfig.resizable = { enabled: true, handles: ["n", "s", "e", "w", "ne", "se", "sw", "nw"]}; } -]); \ No newline at end of file +]); diff --git a/types/angular-oauth2/angular-oauth2-tests.ts b/types/angular-oauth2/angular-oauth2-tests.ts index 042fe537aa..89dd51b4aa 100644 --- a/types/angular-oauth2/angular-oauth2-tests.ts +++ b/types/angular-oauth2/angular-oauth2-tests.ts @@ -7,4 +7,4 @@ angular.module('angular-oauth2-test', ['angular-oauth2']) clientId: 'CLIENT_ID', clientSecret: 'CLIENT_SECRET' // optional }); - }]); \ No newline at end of file + }]); diff --git a/types/angular/angular-tests.ts b/types/angular/angular-tests.ts index b4e394aa37..53fd245f1d 100644 --- a/types/angular/angular-tests.ts +++ b/types/angular/angular-tests.ts @@ -62,7 +62,6 @@ angular.module('http-auth-interceptor', []) * On 401 response - it stores the request and broadcasts 'event:angular-auth-loginRequired'. */ .config(['$httpProvider', 'authServiceProvider', ($httpProvider: ng.IHttpProvider, authServiceProvider: any) => { - $httpProvider.defaults.headers.common = {Authorization: 'Bearer token'}; $httpProvider.defaults.headers.get['Authorization'] = 'Bearer token'; $httpProvider.defaults.headers.post['Authorization'] = (config: ng.IRequestConfig) => 'Bearer token'; @@ -108,7 +107,7 @@ namespace HttpAndRegularPromiseTests { $http.get('http://somewhere/some/resource') .then((response: ng.IHttpPromiseCallbackArg) => { // typing lost, so something like - // var i: number = response.data + // const i: number = response.data // would type check $scope.person = response.data; }); @@ -116,7 +115,7 @@ namespace HttpAndRegularPromiseTests { $http.get('http://somewhere/some/resource') .then((response: ng.IHttpPromiseCallbackArg) => { // typing lost, so something like - // var i: number = response.data + // const i: number = response.data // would NOT type check $scope.person = response.data; }); @@ -153,7 +152,13 @@ namespace HttpAndRegularPromiseTests { // Test for AngularJS Syntax namespace My.Namespace { - export var x: any; // need to export something for module to kick in + export const x: any = null; // need to export something for module to kick in +} + +class TestProvider implements ng.IServiceProvider { + constructor(private $scope: ng.IScope) {} + + $get() {} } // IModule Registering Test @@ -229,14 +234,6 @@ mod.value(My.Namespace); mod.decorator('name', ($scope: ng.IScope) => {}); mod.decorator('name', ['$scope', ($scope: ng.IScope) => {}]); -class TestProvider implements ng.IServiceProvider { - constructor(private $scope: ng.IScope) { - } - - $get() { - } -} - // QProvider tests angular.module('qprovider-test', []) .config(['$qProvider', ($qProvider: ng.IQProvider) => { @@ -276,8 +273,8 @@ foo.then((x) => { // Object is inferred here x.a = 123; // Try a promise - var y: ng.IPromise; - var condition: boolean; + const y: ng.IPromise = null; + const condition: boolean = null; return condition ? y : x.a; // IPromise | T, both are good for the 1st arg of .then() }).then((x) => { // x is infered to be a number, which is the resolved value of a promise @@ -299,15 +296,15 @@ namespace TestQ { g: string; h: number; } - var tResult: TResult; - var promiseTResult: angular.IPromise; - var tValue: TValue; - var promiseTValue: angular.IPromise; - var tOther: TOther; - var promiseTOther: angular.IPromise; + const tResult: TResult = null; + const promiseTResult: angular.IPromise = null; + const tValue: TValue = null; + const promiseTValue: angular.IPromise = null; + const tOther: TOther = null; + const promiseTOther: angular.IPromise = null; - var $q: angular.IQService; - var promiseAny: angular.IPromise; + const $q: angular.IQService = null; + const promiseAny: angular.IPromise = null; const assertPromiseType = (arg: angular.IPromise) => arg; @@ -346,7 +343,7 @@ namespace TestQ { let result: angular.IDeferred; result = $q.defer(); result.resolve(tResult); - var anyValue: any; + const anyValue: any = null; result.reject(anyValue); result.promise.then(result => { return $q.resolve(result); @@ -411,7 +408,7 @@ namespace TestQ { let httpFoo: ng.IHttpPromise; httpFoo.then((x) => { // When returning a promise the generic type must be inferred. - var innerPromise: ng.IPromise; + const innerPromise: ng.IPromise = null; return innerPromise; }).then((x) => { // must still be number. @@ -427,16 +424,16 @@ httpFoo.then((response: ng.IHttpPromiseCallbackArg) => { // Deferred signature tests namespace TestDeferred { - var any: any; + const any: any = null; interface TResult { a: number; b: string; c: boolean; } - var tResult: TResult; + const tResult: TResult = null; - var deferred: angular.IDeferred; + const deferred: angular.IDeferred = null; // deferred.resolve { @@ -467,7 +464,7 @@ namespace TestDeferred { } namespace TestInjector { - var $injector: angular.auto.IInjectorService; + const $injector: angular.auto.IInjectorService = null; $injector.strictDi = true; @@ -477,7 +474,7 @@ namespace TestInjector { // Promise signature tests namespace TestPromise { - var any: any; + const any: any = null; interface TResult { kind: 'result'; @@ -497,16 +494,16 @@ namespace TestPromise { return x.kind === 'result'; } - var tresult: TResult; - var tresultPromise: ng.IPromise; - var tresultHttpPromise: ng.IHttpPromise; + const tresult: TResult = null; + const tresultPromise: ng.IPromise = null; + const tresultHttpPromise: ng.IHttpPromise = null; - var tother: TOther; - var totherPromise: ng.IPromise; - var totherHttpPromise: ng.IHttpPromise; + const tother: TOther = null; + const totherPromise: ng.IPromise = null; + const totherHttpPromise: ng.IHttpPromise = null; - var promise: angular.IPromise; - var $q: angular.IQService; + const promise: angular.IPromise = null; + const $q: angular.IQService = null; const assertPromiseType = (arg: angular.IPromise) => arg; const reject = $q.reject(); @@ -608,9 +605,9 @@ namespace TestTimeout { b: string; c: boolean; } - var fnTResult: (...args: any[]) => TResult; - var promiseAny: angular.IPromise; - var $timeout: angular.ITimeoutService; + const fnTResult: (...args: any[]) => TResult = null; + const promiseAny: angular.IPromise = null; + const $timeout: angular.ITimeoutService = null; // $timeout { @@ -670,9 +667,7 @@ class SampleDirective implements ng.IDirective { return new SampleDirective(); } - link(scope: ng.IScope) { - - } + link(scope: ng.IScope) {} } class SampleDirective2 implements ng.IDirective { @@ -688,9 +683,7 @@ class SampleDirective2 implements ng.IDirective { return new SampleDirective2(); } - link(scope: ng.IScope) { - - } + link(scope: ng.IScope) {} } angular.module('SameplDirective', []).directive('sampleDirective', SampleDirective.instance).directive('sameplDirective2', SampleDirective2.instance); @@ -825,11 +818,10 @@ angular.module('docsTimeDirective', []) $scope.format = 'M/d/yy h:mm:ss a'; }]) .directive('myCurrentTime', ['$interval', 'dateFilter', ($interval: any, dateFilter: any) => { - return { link(scope: ng.IScope, element: ng.IAugmentedJQuery, attrs: ng.IAttributes) { - let format: any, - timeoutId: any; + let format: any; + let timeoutId: any; function updateTime() { element.text(dateFilter(new Date(), format)); @@ -904,7 +896,10 @@ angular.module('docsIsoFnBindExample', []) angular.module('dragModule', []) .directive('myDraggable', ['$document', ($document: any) => { return (scope: any, element: any, attr: any) => { - let startX = 0, startY = 0, x = 0, y = 0; + let startX = 0; + let startY = 0; + let x = 0; + let y = 0; element.css({ position: 'relative', @@ -1030,11 +1025,10 @@ interface ICopyExampleUser { } interface ICopyExampleScope { - user: ICopyExampleUser; master: ICopyExampleUser; - update: (copyExampleUser: ICopyExampleUser) => any; - reset: () => any; + update(copyExampleUser: ICopyExampleUser): any; + reset(): any; } angular.module('copyExample', []) @@ -1055,8 +1049,7 @@ angular.module('copyExample', []) }]); namespace locationTests { - - var $location: ng.ILocationService; + const $location: ng.ILocationService = null; /* * From https://docs.angularjs.org/api/ng/service/$location @@ -1114,9 +1107,9 @@ namespace locationTests { // NgModelController function NgModelControllerTyping() { - var ngModel: angular.INgModelController; - var $http: angular.IHttpService; - var $q: angular.IQService; + const ngModel: angular.INgModelController = null; + const $http: angular.IHttpService = null; + const $q: angular.IQService = null; // See https://docs.angularjs.org/api/ng/type/ngModel.NgModelController#$validators ngModel.$validators['validCharacters'] = (modelValue, viewValue) => { @@ -1141,8 +1134,7 @@ function NgModelControllerTyping() { let $filter: angular.IFilterService; function testFilter() { - - var items: string[]; + const items: string[] = null; $filter('filter')(items, 'test'); $filter('filter')(items, {name: 'test'}); $filter('filter')(items, (val, index, array) => { @@ -1224,7 +1216,7 @@ function testCustomFilter() { } function parseTyping() { - var $parse: angular.IParseService; + const $parse: angular.IParseService = null; const compiledExp = $parse('a.b.c'); if (compiledExp.constant) { return compiledExp({}); @@ -1234,7 +1226,7 @@ function parseTyping() { } function parseWithParams() { - var $parse: angular.IParseService; + const $parse: angular.IParseService = null; const compiledExp1 = $parse('a.b.c', () => null); const compiledExp2 = $parse('a.b.c', null, false); } @@ -1255,7 +1247,7 @@ function doBootstrap(element: Element | JQuery, mode: string): ng.auto.IInjector } function testIHttpParamSerializerJQLikeProvider() { - var serializer: angular.IHttpParamSerializer; + const serializer: angular.IHttpParamSerializer = null; serializer({ a: 'b' }); @@ -1271,6 +1263,6 @@ function anyOf3(v1: T1, v2: T2, v3: T3) { } function toPromise(val: T): ng.IPromise { - var p: ng.IPromise; + const p: ng.IPromise = null; return p; } diff --git a/types/angular/index.d.ts b/types/angular/index.d.ts index 485ad9ebb3..727944fbb1 100644 --- a/types/angular/index.d.ts +++ b/types/angular/index.d.ts @@ -413,7 +413,7 @@ declare namespace angular { // https://docs.angularjs.org/api/ng/directive/ngModelOptions interface INgModelOptions { updateOn?: string; - debounce?: any; + debounce?: number | { [key: string]: number; }; allowInvalid?: boolean; getterSetter?: boolean; timezone?: string; @@ -602,7 +602,7 @@ declare namespace angular { /////////////////////////////////////////////////////////////////////////// interface ITimeoutService { (delay?: number, invokeApply?: boolean): IPromise; - (fn: (...args: any[]) => T, delay?: number, invokeApply?: boolean, ...args: any[]): IPromise; + (fn: (...args: any[]) => T | IPromise, delay?: number, invokeApply?: boolean, ...args: any[]): IPromise; cancel(promise?: IPromise): boolean; } @@ -782,7 +782,7 @@ declare namespace angular { // Check angular's i18n files for exemples NUMBER_FORMATS: ILocaleNumberFormatDescriptor; DATETIME_FORMATS: ILocaleDateTimeFormatDescriptor; - pluralCat: (num: any) => string; + pluralCat(num: any): string; } interface ILocaleNumberFormatDescriptor { @@ -875,7 +875,8 @@ declare namespace angular { * @param identifierStart The function that will decide whether the given character is a valid identifier start character. * @param identifierContinue The function that will decide whether the given character is a valid identifier continue character. **/ - setIdentifierFns(identifierStart?: (character: string, codePoint: number) => boolean, + setIdentifierFns( + identifierStart?: (character: string, codePoint: number) => boolean, identifierContinue?: (character: string, codePoint: number) => boolean): void; } @@ -1591,10 +1592,10 @@ declare namespace angular { } interface IHttpInterceptor { - request?: (config: IRequestConfig) => IRequestConfig|IPromise; - requestError?: (rejection: any) => any; - response?: (response: IHttpPromiseCallbackArg) => IPromise>|IHttpPromiseCallbackArg; - responseError?: (rejection: any) => any; + request?(config: IRequestConfig): IRequestConfig|IPromise; + requestError?(rejection: any): any; + response?(response: IHttpPromiseCallbackArg): IPromise>|IHttpPromiseCallbackArg; + responseError?(rejection: any): any; } interface IHttpInterceptorFactory { @@ -2025,7 +2026,6 @@ declare namespace angular { service(name: string, inlineAnnotatedFunction: any[]): IServiceProvider; value(name: string, value: any): IServiceProvider; } - } /** diff --git a/types/angular/tslint.json b/types/angular/tslint.json index 7ba374959e..057f35a770 100644 --- a/types/angular/tslint.json +++ b/types/angular/tslint.json @@ -2,32 +2,18 @@ "extends": "../tslint.json", "rules": { "class-name": true, - "curly": true, - "max-line-length": false, - "no-consecutive-blank-lines": true, - "no-shadowed-variable": true, - "quotemark": [ - true, - "single" - ], - "align": true, + "indent": [true, "spaces"], + "quotemark": [true, "single"], + "variable-name": [true, "check-format"], + + // Below are all TODOs "callable-types": false, - "forbidden-types": false, - "indent": [ - true, - "spaces" - ], + "ban-types": false, "interface-name": false, - "linebreak-style": [ - true, - "LF" - ], + "jsdoc-format": false, + "max-line-length": false, "no-empty-interface": false, "unified-signatures": false, - "variable-name": [ - true, - "check-format" - ], "void-return": false } } diff --git a/types/applepayjs/applepayjs-tests.ts b/types/applepayjs/applepayjs-tests.ts new file mode 100644 index 0000000000..5adf61e45c --- /dev/null +++ b/types/applepayjs/applepayjs-tests.ts @@ -0,0 +1,269 @@ +// Copyright (c) Martin Costello, 2017. All rights reserved. +// Licensed under the Apache 2.0 license. See the LICENSE file in the project root for full license information. + +declare function describe(desc: string, fn: () => void): void; +declare function it(desc: string, fn: () => void): void; + +describe("ApplePaySession", () => { + it("the constants are defined", () => { + let status = 0; + switch (status) { + case ApplePaySession.STATUS_FAILURE: + case ApplePaySession.STATUS_INVALID_BILLING_POSTAL_ADDRESS: + case ApplePaySession.STATUS_INVALID_SHIPPING_CONTACT: + case ApplePaySession.STATUS_INVALID_SHIPPING_POSTAL_ADDRESS: + case ApplePaySession.STATUS_PIN_INCORRECT: + case ApplePaySession.STATUS_PIN_LOCKOUT: + case ApplePaySession.STATUS_PIN_REQUIRED: + case ApplePaySession.STATUS_SUCCESS: + default: + break; + } + }); + it("can create a new instance", () => { + const version = 1; + const paymentRequest = { + countryCode: "US", + currencyCode: "USD", + supportedNetworks: [ + "masterCard", + "visa" + ], + merchantCapabilities: [ + "supports3DS" + ], + total: { + label: "My Store", + amount: "9.99" + } + }; + + const session = new ApplePaySession(version, paymentRequest); + }); + it("can call static methods", () => { + const merchantIdentifier = "MyMerchantId"; + + let canMakePayments: boolean = ApplePaySession.canMakePayments(); + let supported: boolean = ApplePaySession.supportsVersion(2); + + ApplePaySession.canMakePaymentsWithActiveCard(merchantIdentifier) + .then((status: boolean) => { + console.log(`Can make payments with active card: ${status}.`); + }); + + ApplePaySession.openPaymentSetup(merchantIdentifier) + .then((success) => { + console.log(`Apple Pay setup: ${success}.`); + }); + }); + it("can call instance methods", () => { + const version = 1; + const paymentRequest = { + countryCode: "US", + currencyCode: "USD", + supportedNetworks: [ + "masterCard", + "visa" + ], + merchantCapabilities: [ + "supports3DS" + ], + total: { + label: "My Store", + amount: "9.99" + } + }; + + const session = new ApplePaySession(version, paymentRequest); + + session.abort(); + session.completeMerchantValidation({ + foo: "bar" + }); + session.completePayment(ApplePaySession.STATUS_SUCCESS); + + const total = { + label: "Subtotal", + type: "final", + amount: "35.00" + }; + + const lineItems = [ + { + label: "Subtotal", + type: "final", + amount: "35.00" + }, + { + label: "Free Shipping", + amount: "0.00", + type: "pending" + }, + { + label: "Estimated Tax", + amount: "3.06" + } + ]; + + const shippingMethods = [ + { + label: "Free Shipping", + detail: "Arrives in 5 to 7 days", + amount: "0.00", + identifier: "FreeShipping" + }, + { + label: "2-hour Shipping", + amount: "5.00" + } + ]; + + session.completePaymentMethodSelection(total, lineItems); + + session.completeShippingContactSelection( + ApplePaySession.STATUS_INVALID_SHIPPING_POSTAL_ADDRESS, + shippingMethods, + total, + lineItems); + + session.completeShippingMethodSelection( + ApplePaySession.STATUS_SUCCESS, + total, + lineItems); + + session.oncancel = (event: ApplePayJS.Event): void => { + event.cancelBubble = true; + }; + + session.onpaymentauthorized = (event: ApplePayJS.ApplePayPaymentAuthorizedEvent) => { + if (event.payment) { + console.log("Payment data:", JSON.stringify(event.payment)); + } + }; + + session.onpaymentmethodselected = (event: ApplePayJS.ApplePayPaymentMethodSelectedEvent) => { + if (event.paymentMethod) { + console.log("Payment method:", JSON.stringify(event.paymentMethod)); + } + }; + + session.onshippingcontactselected = (event: ApplePayJS.ApplePayShippingContactSelectedEvent) => { + if (event.shippingContact) { + console.log("Shipping contact:", JSON.stringify(event.shippingContact)); + } + }; + + session.onshippingmethodselected = (event: ApplePayJS.ApplePayShippingMethodSelectedEvent) => { + if (event.shippingMethod) { + console.log("Shipping method:", JSON.stringify(event.shippingMethod)); + } + }; + + session.onvalidatemerchant = (event: ApplePayJS.ApplePayValidateMerchantEvent) => { + if (event.validationURL) { + console.log(`The validation URL is '${event.validationURL}'.`); + } + }; + }); +}); +describe("ApplePayPaymentRequest", () => { + it("can create a new instance", () => { + let paymentRequest: ApplePayJS.ApplePayPaymentRequest = { + applicationData: "ApplicationData", + countryCode: "GB", + currencyCode: "GBP", + merchantCapabilities: [ + "supports3DS", + "supportsCredit", + "supportsDebit" + ], + supportedNetworks: [ + "amex", + "discover", + "jcb", + "master​Card", + "private​Label", + "visa" + ], + total: { + label: "Apple", + type: "final", + amount: "9.99" + } + }; + + paymentRequest.billingContact = { + emailAddress: "ravipatel@example.com", + familyName: "Patel", + givenName: "Ravi", + phoneNumber: "(408) 555-5555", + addressLines: [ + "1 Infinite Loop" + ], + locality: "Cupertino", + administrativeArea: "CA", + postalCode: "95014", + country: "United States", + countryCode: "US" + }; + + paymentRequest.lineItems = [ + { + label: "Subtotal", + type: "final", + amount: "35.00" + }, + { + label: "Free Shipping", + amount: "0.00", + type: "pending" + }, + { + label: "Estimated Tax", + amount: "3.06" + } + ]; + + paymentRequest.requiredBillingContactFields = [ + "postalAddress", + "name" + ]; + + paymentRequest.requiredShippingContactFields = [ + "postalAddress", + "name", + "phone", + "email" + ]; + + paymentRequest.shippingContact = { + emailAddress: "ravipatel@example.com", + familyName: "Patel", + givenName: "Ravi", + phoneNumber: "(408) 555-5555", + addressLines: [ + "1 Infinite Loop" + ], + locality: "Cupertino", + administrativeArea: "CA", + postalCode: "95014", + country: "United States", + countryCode: "US" + }; + + paymentRequest.shippingMethods = [ + { + label: "Free Shipping", + detail: "Arrives in 5 to 7 days", + amount: "0.00", + identifier: "FreeShipping" + }, + { + label: "2-hour Shipping", + amount: "5.00" + } + ]; + + paymentRequest.shippingType = "storePickup"; + }); +}); diff --git a/types/applepayjs/index.d.ts b/types/applepayjs/index.d.ts new file mode 100644 index 0000000000..744e1fd044 --- /dev/null +++ b/types/applepayjs/index.d.ts @@ -0,0 +1,560 @@ +// Type definitions for Apple Pay JS 1.0 +// Project: https://developer.apple.com/reference/applepayjs +// Definitions by: Martin Costello +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/** + * A session object for managing the payment process on the web. + */ +declare class ApplePaySession extends EventTarget { + /** + * Creates a new instance of the ApplePaySession class. + * @param version - The version of the ApplePay JS API you are using. + * @param paymentRequest - An Apple​Pay​Payment​Request object that contains the information that is displayed on the Apple Pay payment sheet. + */ + constructor(version: number, paymentRequest: ApplePayJS.ApplePayPaymentRequest); + + /** + * A callback function that is automatically called when the payment UI is dismissed with an error. + */ + oncancel: (event: ApplePayJS.Event) => void; + + /** + * A callback function that is automatically called when the user has authorized the Apple Pay payment, typically via TouchID. + */ + onpaymentauthorized: (event: ApplePayJS.ApplePayPaymentAuthorizedEvent) => void; + + /** + * A callback function that is automatically called when a new payment method is selected. + */ + onpaymentmethodselected: (event: ApplePayJS.ApplePayPaymentMethodSelectedEvent) => void; + + /** + * A callback function that is called when a shipping contact is selected in the payment sheet. + */ + onshippingcontactselected: (event: ApplePayJS.ApplePayShippingContactSelectedEvent) => void; + + /** + * A callback function that is automatically called when a shipping method is selected. + */ + onshippingmethodselected: (event: ApplePayJS.ApplePayShippingMethodSelectedEvent) => void; + + /** + * A callback function that is automatically called when the payment sheet is displayed. + */ + onvalidatemerchant: (event: ApplePayJS.ApplePayValidateMerchantEvent) => void; + + /** + * Indicates whether or not the device supports Apple Pay. + * @returns true if the device supports making payments with Apple Pay; otherwise, false. + */ + static canMakePayments(): boolean; + + /** + * Indicates whether or not the device supports Apple Pay and if the user has an active card in Wallet. + * @param merchantIdentifier - The merchant ID received when the merchant enrolled in Apple Pay. + * @returns true if the device supports Apple Pay and there is at least one active card in Wallet; otherwise, false. + */ + static canMakePaymentsWithActiveCard(merchantIdentifier: string): Promise; + + /** + * Displays the Set up Apple Pay button. + * @param merchantIdentifier - The merchant ID received when the merchant enrolled in Apple Pay. + * @returns A boolean value indicating whether setup was successful. + */ + static openPaymentSetup(merchantIdentifier: string): Promise; + + /** + * Verifies if a web browser supports a given Apple Pay JS API version. + * @param version - A number representing the Apple Pay JS API version being checked. The initial version is 1. + * @returns A boolean value indicating whether the web browser supports the given API version. Returns false if the web browser does not support the specified version. + */ + static supportsVersion(version: number): boolean; + + /** + * Aborts the current Apple Pay session. + */ + abort(): void; + + /** + * Begins the merchant validation process. + */ + begin(): void; + + /** + * Call after the merchant has been validated. + * @param merchantSession - An opaque message session object. + */ + completeMerchantValidation(merchantSession: any): void; + + /** + * Call when a payment has been authorized. + * @param status - The status of the payment. + */ + completePayment(status: number): void; + + /** + * Call after a payment method has been selected. + * @param newTotal - An Apple​Pay​Line​Item dictionary representing the total price for the purchase. + * @param newLineItems - A sequence of Apple​Pay​Line​Item dictionaries. + */ + completePaymentMethodSelection(newTotal: ApplePayJS.ApplePayLineItem, newLineItems: ApplePayJS.ApplePayLineItem[]): void; + + /** + * Call after a shipping contact has been selected. + * @param status - The status of the shipping contact update. + * @param newShippingMethods - A sequence of ApplePayShippingMethod dictionaries. + * @param newTotal - An Apple​Pay​Line​Item dictionary representing the total price for the purchase. + * @param newLineItems - A sequence of Apple​Pay​Line​Item dictionaries. + */ + completeShippingContactSelection( + status: number, + newShippingMethods: ApplePayJS.ApplePayShippingMethod[], + newTotal: ApplePayJS.ApplePayLineItem, + newLineItems: ApplePayJS.ApplePayLineItem[]): void; + + /** + * Call after the shipping method has been selected. + * @param status - The status of the shipping method update. + * @param newTotal - An Apple​Pay​Line​Item dictionary representing the total price for the purchase. + * @param newLineItems - A sequence of Apple​Pay​Line​Item dictionaries. + */ + completeShippingMethodSelection(status: number, newTotal: ApplePayJS.ApplePayLineItem, newLineItems: ApplePayJS.ApplePayLineItem[]): void; + + /** + * The requested action succeeded. + */ + static readonly STATUS_SUCCESS: number; + + /** + * The requested action failed. + */ + static readonly STATUS_FAILURE: number; + + /** + * The billing address is not valid. + */ + static readonly STATUS_INVALID_BILLING_POSTAL_ADDRESS: number; + + /** + * The shipping address is not valid. + */ + static readonly STATUS_INVALID_SHIPPING_POSTAL_ADDRESS: number; + + /** + * The shipping contact information is not valid. + */ + static readonly STATUS_INVALID_SHIPPING_CONTACT: number; + + /** + * The PIN information is not valid. Cards on the China Union Pay network may require a PIN. + */ + static readonly STATUS_PIN_INCORRECT: number; + + /** + * The maximum number of tries for a PIN has been reached and the user has been locked out. Cards on the China Union Pay network may require a PIN. + */ + static readonly STATUS_PIN_LOCKOUT: number; + + /** + * The required PIN information was not provided. Cards on the China Union Pay payment network may require a PIN to authenticate the transaction. + */ + static readonly STATUS_PIN_REQUIRED: number; +} + +declare namespace ApplePayJS { + /** + * Defines a line item in a payment request - for example, total, tax, discount, or grand total. + */ + interface ApplePayLineItem { + /** + * A short, localized description of the line item. + */ + label: string; + + /** + * The line item's amount. + */ + amount: string; + + /** + * A value that indicates if the line item is final or pending. + */ + type?: string; + } + + /** + * Represents the result of authorizing a payment request and contains encrypted payment information. + */ + interface ApplePayPayment { + /** + * The encrypted token for an authorized payment. + */ + token: ApplePayPaymentToken; + + /** + * The billing contact selected by the user for this transaction. + */ + billingContact?: ApplePayPaymentContact; + + /** + * The shipping contact selected by the user for this transaction. + */ + shippingContact?: ApplePayPaymentContact; + } + + /** + * The Apple​Pay​Payment​Authorized​Event class defines the attributes contained by the ApplePaySession.onpaymentauthorized callback function. + */ + abstract class ApplePayPaymentAuthorizedEvent extends Event { + /** + * The payment token used to authorize a payment. + */ + readonly payment: ApplePayPayment; + } + + /** + * Encapsulates contact information needed for billing and shipping. + */ + interface ApplePayPaymentContact { + /** + * An email address for the contact. + */ + emailAddress: string; + + /** + * The contact's family name. + */ + familyName: string; + + /** + * The contact's given name. + */ + givenName: string; + + /** + * A phone number for the contact. + */ + phoneNumber: string; + + /** + * The address for the contact. + */ + addressLines: string[]; + + /** + * The city for the contact. + */ + locality: string; + + /** + * The state for the contact. + */ + administrativeArea: string; + + /** + * The zip code, where applicable, for the contact. + */ + postalCode: string; + + /** + * The colloquial country name for the contact. + */ + country: string; + + /** + * The contact's ISO country code. + */ + countryCode: string; + } + + /** + * Contains information about an Apple Pay payment card. + */ + interface ApplePayPaymentMethod { + /** + * A string, suitable for display, that describes the card. + */ + displayName: string; + + /** + * A string, suitable for display, that is the name of the payment network backing the card. + * The value is one of the supported networks specified in the supported​Networks property of the Apple​Pay​Payment​Request. + */ + network: string; + + /** + * A value representing the card's type of payment. + */ + type: string; + + /** + * The payment pass object associated with the payment. + */ + paymentPass: ApplePayPaymentPass; + } + + /** + * The Apple​Pay​Payment​Method​Selected​Event class defines the attributes contained by the ApplePaySession.onpaymentmethodselected callback function. + */ + abstract class ApplePayPaymentMethodSelectedEvent extends Event { + /** + * The card used to complete a payment. + */ + readonly paymentMethod: ApplePayPaymentMethod; + } + + /** + * Represents a provisioned payment card for Apple Pay payments. + */ + interface ApplePayPaymentPass { + /** + * The unique identifier for the primary account number for the payment card. + */ + primaryAccountIdentifier: string; + + /** + * A version of the primary account number suitable for display in your UI. + */ + primaryAccountNumberSuffix: string; + + /** + * The unique identifier for the device-specific account number. + */ + deviceAccountIdentifier?: string; + + /** + * A version of the device account number suitable for display in your UI. + */ + deviceAccountNumberSuffix?: string; + + /** + * The activation state of the pass. + */ + activationState: string; + } + + /** + * Encapsulates a request for payment, including information about payment processing capabilities, the payment amount, and shipping information. + */ + interface ApplePayPaymentRequest { + /** + * The merchant's two-letter ISO 3166 country code. + */ + countryCode: string; + + /** + * The three-letter ISO 4217 currency code for the payment. + */ + currencyCode: string; + + /** + * A set of line items that explain recurring payments and/or additional charges. + */ + lineItems?: ApplePayLineItem[]; + + /** + * The payment capabilities supported by the merchant. + * The value must at least contain ApplePayMerchantCapability.supports3DS. + */ + merchantCapabilities: string[]; + + /** + * The payment networks supported by the merchant. + */ + supportedNetworks: string[]; + + /** + * A line item representing the total for the payment. + */ + total: ApplePayLineItem; + + /** + * Billing contact information for the user. + */ + billingContact?: ApplePayPaymentContact; + + /** + * The billing information that you require from the user in order to process the transaction. + */ + requiredBillingContactFields?: string[]; + + /** + * The shipping information that you require from the user in order to fulfill the order. + */ + requiredShippingContactFields?: string[]; + + /** + * Shipping contact information for the user. + */ + shippingContact?: ApplePayPaymentContact; + + /** + * A set of shipping method objects that describe the available shipping methods. + */ + shippingMethods?: ApplePayShippingMethod[] | string[]; + + /** + * How the items are to be shipped. + */ + shippingType?: string; + + /** + * Optional user-defined data. + */ + applicationData?: string; + } + + /** + * Contains the user's payment credentials. + */ + interface ApplePayPaymentToken { + /** + * An object containing the encrypted payment data. + */ + paymentData: any; + + /** + * Information about the card used in the transaction. + */ + paymentMethod: ApplePayPaymentMethod; + + /** + * A unique identifier for this payment. + */ + transactionIdentifier: string; + } + + /** + * The Apple​Pay​Shipping​Contact​Selected​Event class defines the attributes contained by the ApplePaySession.onshippingcontactselected callback function. + */ + abstract class ApplePayShippingContactSelectedEvent extends Event { + /** + * The shipping address selected by the user. + */ + readonly shippingContact: ApplePayPaymentContact; + } + + /** + * Defines a shipping method for delivering physical goods. + */ + interface ApplePayShippingMethod { + /** + * A short description of the shipping method. + */ + label: string; + + /** + * A further description of the shipping method. + */ + detail?: string; + + /** + * The amount associated with this shipping method. + */ + amount: string; + + /** + * A client-defined identifier. + */ + identifier?: string; + } + + /** + * The Apple​Pay​Shipping​Method​Selected​Event class defines the attribute contained by the ApplePaySession.onshippingmethodselected callback function. + */ + abstract class ApplePayShippingMethodSelectedEvent extends Event { + /** + * The shipping method selected by the user. + */ + readonly shippingMethod: ApplePayShippingMethod; + } + + /** + * The Apple​Pay​Validate​Merchant​Event class defines the attributes contained by the ApplePaySession.onvalidatemerchant callback function. + */ + abstract class ApplePayValidateMerchantEvent extends Event { + /** + * The URL used to validate the merchant server. + */ + readonly validationURL: string; + } + + abstract class Event { + readonly bubbles: boolean; + + cancelBubble: boolean; + + readonly cancelable: boolean; + + readonly composed: boolean; + + readonly currentTarget: EventTarget; + + readonly defaultPrevented: boolean; + + readonly eventPhase: number; + + readonly isTrusted: boolean; + + returnValue: boolean; + + readonly srcElement: EventTarget; + + readonly target: EventTarget; + + readonly timeStamp: string; + + readonly type: string; + + composedPath(): Node[]; + + initEvent(type?: string, bubbles?: boolean, cancelable?: boolean): void; + + preventDefault(): void; + + stopImmediatePropagation(): void; + + stopPropagation(): void; + + static readonly AT_TARGET: number; + + static readonly BLUR: number; + + static readonly BUBBLING_PHASE: number; + + static readonly CAPTURING_PHASE: number; + + static readonly CHANGE: number; + + static readonly CLICK: number; + + static readonly DBLCLICK: number; + + static readonly DRAGDROP: number; + + static readonly FOCUS: number; + + static readonly KEYDOWN: number; + + static readonly KEYPRESS: number; + + static readonly KEYUP: number; + + static readonly MOUSEDOWN: number; + + static readonly MOUSEDRAG: number; + + static readonly MOUSEMOVE: number; + + static readonly MOUSEOUT: number; + + static readonly MOUSEOVER: number; + + static readonly MOUSEUP: number; + + static readonly NONE: number; + + static readonly SELECT: number; + } +} diff --git a/types/applepayjs/tsconfig.json b/types/applepayjs/tsconfig.json new file mode 100644 index 0000000000..0bb26b97ac --- /dev/null +++ b/types/applepayjs/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "baseUrl": "../", + "forceConsistentCasingInFileNames": true, + "lib": [ + "dom", + "es6" + ], + "module": "commonjs", + "noImplicitAny": true, + "noImplicitThis": true, + "noEmit": true, + "strictNullChecks": true, + "typeRoots": [ + "../" + ], + "types": [] + }, + "files": [ + "index.d.ts", + "applepayjs-tests.ts" + ] +} diff --git a/types/applepayjs/tslint.json b/types/applepayjs/tslint.json new file mode 100644 index 0000000000..377cc837d4 --- /dev/null +++ b/types/applepayjs/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } diff --git a/types/applicationinsights-js/applicationinsights-js-tests.ts b/types/applicationinsights-js/applicationinsights-js-tests.ts index 66bc1f268d..1a4d585795 100644 --- a/types/applicationinsights-js/applicationinsights-js-tests.ts +++ b/types/applicationinsights-js/applicationinsights-js-tests.ts @@ -1,6 +1,6 @@ // More samples on: https://github.com/Microsoft/ApplicationInsights-JS/blob/master/API-reference.md -var config: Microsoft.ApplicationInsights.IConfig = { +const config: Microsoft.ApplicationInsights.IConfig = { instrumentationKey: "", endpointUrl: "endpointUrl", emitLineDelimitedJson: false, @@ -30,7 +30,7 @@ var config: Microsoft.ApplicationInsights.IConfig = { isStorageUseDisabled: true }; -var appInsights: Microsoft.ApplicationInsights.IAppInsights = { +appInsights = { config, context: null, queue: null, @@ -91,9 +91,8 @@ appInsights.setAuthenticatedUserContext("userId", "accountId"); // set config dynamically appInsights.config.instrumentationKey = ""; - // TelementryContext -var context: Microsoft.ApplicationInsights.ITelemetryContext = appInsights.context; +const context: Microsoft.ApplicationInsights.ITelemetryContext = appInsights.context; context.application.ver = "v0.0.0"; context.application.build = "1.1.1"; @@ -113,54 +112,54 @@ context.operation.id = "1"; context.operation.syntheticSource = "testAgent"; // track -var data = new Microsoft.Telemetry.Base(); -var envelope = new Microsoft.ApplicationInsights.Telemetry.Common.Envelope(data, "name"); +const data = new Microsoft.Telemetry.Base(); +const envelope = new Microsoft.ApplicationInsights.Telemetry.Common.Envelope(data, "name"); context.track(envelope); -context.addTelemetryInitializer((envelope) => false); +context.addTelemetryInitializer(telemetryEnvelope => false); // track event -var eventObj = new Microsoft.ApplicationInsights.Telemetry.Event("test", null, null); -var eventData = new Microsoft.ApplicationInsights.Telemetry.Common.Data(Microsoft.ApplicationInsights.Telemetry.Event.dataType, eventObj); -var eventEnvelope = new Microsoft.ApplicationInsights.Telemetry.Common.Envelope(eventData, Microsoft.ApplicationInsights.Telemetry.Event.envelopeType); +const eventObj = new Microsoft.ApplicationInsights.Telemetry.Event("test", null, null); +const eventData = new Microsoft.ApplicationInsights.Telemetry.Common.Data(Microsoft.ApplicationInsights.Telemetry.Event.dataType, eventObj); +const eventEnvelope = new Microsoft.ApplicationInsights.Telemetry.Common.Envelope(eventData, Microsoft.ApplicationInsights.Telemetry.Event.envelopeType); context.track(eventEnvelope); // track exception -var exceptionObj = new Microsoft.ApplicationInsights.Telemetry.Exception(new Error(), "handledAt", null, null, AI.SeverityLevel.Critical); -var exceptionData = new Microsoft.ApplicationInsights.Telemetry.Common.Data( +const exceptionObj = new Microsoft.ApplicationInsights.Telemetry.Exception(new Error(), "handledAt", null, null, AI.SeverityLevel.Critical); +const exceptionData = new Microsoft.ApplicationInsights.Telemetry.Common.Data( Microsoft.ApplicationInsights.Telemetry.Exception.dataType, exceptionObj); -var exceptionEnvelope = new Microsoft.ApplicationInsights.Telemetry.Common.Envelope(exceptionData, Microsoft.ApplicationInsights.Telemetry.Exception.envelopeType); +const exceptionEnvelope = new Microsoft.ApplicationInsights.Telemetry.Common.Envelope(exceptionData, Microsoft.ApplicationInsights.Telemetry.Exception.envelopeType); context.track(exceptionEnvelope); // track metric -var metricObj = new Microsoft.ApplicationInsights.Telemetry.Metric("name", 1234, 1, 0, 100, null); -var metricData = new Microsoft.ApplicationInsights.Telemetry.Common.Data(Microsoft.ApplicationInsights.Telemetry.Metric.dataType, metricObj); -var metricEnvelope = new Microsoft.ApplicationInsights.Telemetry.Common.Envelope(metricData, Microsoft.ApplicationInsights.Telemetry.Metric.envelopeType); +const metricObj = new Microsoft.ApplicationInsights.Telemetry.Metric("name", 1234, 1, 0, 100, null); +const metricData = new Microsoft.ApplicationInsights.Telemetry.Common.Data(Microsoft.ApplicationInsights.Telemetry.Metric.dataType, metricObj); +const metricEnvelope = new Microsoft.ApplicationInsights.Telemetry.Common.Envelope(metricData, Microsoft.ApplicationInsights.Telemetry.Metric.envelopeType); context.track(metricEnvelope); // track page view -var pageViewObj = new Microsoft.ApplicationInsights.Telemetry.PageView("page name", "url", 999, null, null); -var pageViewData = new Microsoft.ApplicationInsights.Telemetry.Common.Data(Microsoft.ApplicationInsights.Telemetry.PageView.dataType, pageViewObj); -var pageViewEnvelope = new Microsoft.ApplicationInsights.Telemetry.Common.Envelope(pageViewData, Microsoft.ApplicationInsights.Telemetry.PageView.envelopeType); +const pageViewObj = new Microsoft.ApplicationInsights.Telemetry.PageView("page name", "url", 999, null, null); +const pageViewData = new Microsoft.ApplicationInsights.Telemetry.Common.Data(Microsoft.ApplicationInsights.Telemetry.PageView.dataType, pageViewObj); +const pageViewEnvelope = new Microsoft.ApplicationInsights.Telemetry.Common.Envelope(pageViewData, Microsoft.ApplicationInsights.Telemetry.PageView.envelopeType); context.track(pageViewEnvelope); // track page view performance -var pageViewPerfObj = new Microsoft.ApplicationInsights.Telemetry.PageViewPerformance("page name", "url", 999, null, null); -var pageViewPerfData = new Microsoft.ApplicationInsights.Telemetry.Common.Data( +const pageViewPerfObj = new Microsoft.ApplicationInsights.Telemetry.PageViewPerformance("page name", "url", 999, null, null); +const pageViewPerfData = new Microsoft.ApplicationInsights.Telemetry.Common.Data( Microsoft.ApplicationInsights.Telemetry.PageViewPerformance.dataType, pageViewPerfObj); -var pageViewPerfEnvelope = new Microsoft.ApplicationInsights.Telemetry.Common.Envelope(pageViewPerfData, Microsoft.ApplicationInsights.Telemetry.PageViewPerformance.envelopeType); +const pageViewPerfEnvelope = new Microsoft.ApplicationInsights.Telemetry.Common.Envelope(pageViewPerfData, Microsoft.ApplicationInsights.Telemetry.PageViewPerformance.envelopeType); context.track(pageViewPerfEnvelope); // track remote dependency -var remoteDepObj = new Microsoft.ApplicationInsights.Telemetry.RemoteDependencyData("id", "url", "command", 1, true, 1234, "GET"); -var remoteDepData = new Microsoft.ApplicationInsights.Telemetry.Common.Data( +const remoteDepObj = new Microsoft.ApplicationInsights.Telemetry.RemoteDependencyData("id", "url", "command", 1, true, 1234, "GET"); +const remoteDepData = new Microsoft.ApplicationInsights.Telemetry.Common.Data( Microsoft.ApplicationInsights.Telemetry.RemoteDependencyData.dataType, remoteDepObj); -var remoteDepEnvelope = new Microsoft.ApplicationInsights.Telemetry.Common.Envelope(remoteDepData, Microsoft.ApplicationInsights.Telemetry.RemoteDependencyData.envelopeType); +const remoteDepEnvelope = new Microsoft.ApplicationInsights.Telemetry.Common.Envelope(remoteDepData, Microsoft.ApplicationInsights.Telemetry.RemoteDependencyData.envelopeType); context.track(pageViewPerfEnvelope); // track trace -var traceObj = new Microsoft.ApplicationInsights.Telemetry.Trace("message", null); -var traceData = new Microsoft.ApplicationInsights.Telemetry.Common.Data(Microsoft.ApplicationInsights.Telemetry.Trace.dataType, traceObj); -var traceEnvelope = new Microsoft.ApplicationInsights.Telemetry.Common.Envelope(traceData, Microsoft.ApplicationInsights.Telemetry.Trace.envelopeType); -context.track(traceEnvelope); \ No newline at end of file +const traceObj = new Microsoft.ApplicationInsights.Telemetry.Trace("message", null); +const traceData = new Microsoft.ApplicationInsights.Telemetry.Common.Data(Microsoft.ApplicationInsights.Telemetry.Trace.dataType, traceObj); +const traceEnvelope = new Microsoft.ApplicationInsights.Telemetry.Common.Envelope(traceData, Microsoft.ApplicationInsights.Telemetry.Trace.envelopeType); +context.track(traceEnvelope); diff --git a/types/applicationinsights-js/index.d.ts b/types/applicationinsights-js/index.d.ts index ede1584bb5..cce53f5823 100644 --- a/types/applicationinsights-js/index.d.ts +++ b/types/applicationinsights-js/index.d.ts @@ -195,8 +195,8 @@ declare module Microsoft.ApplicationInsights.Context { interface IInternal { /** - * The SDK version used to create this telemetry item. - */ + * The SDK version used to create this telemetry item. + */ sdkVersion: string; /** * The SDK agent version. @@ -206,15 +206,15 @@ declare module Microsoft.ApplicationInsights.Context { interface ISample { /** - * Sample rate - */ + * Sample rate + */ sampleRate: number; } interface ISession { /** - * The session ID. - */ + * The session ID. + */ id: string; /** * The true if this is the first session @@ -258,8 +258,8 @@ declare module Microsoft.ApplicationInsights.Context { interface IUser { /** - * The telemetry configuration. - */ + * The telemetry configuration. + */ config: any; /** * The user ID. @@ -345,12 +345,12 @@ declare module Microsoft.ApplicationInsights.Telemetry { measurements: Microsoft.ApplicationInsights.FieldType; }; /** - * Constructs a new isntance of the ExceptionTelemetry object - */ + * Constructs a new isntance of the ExceptionTelemetry object + */ constructor(exception: Error, handledAt?: string, properties?: any, measurements?: any, severityLevel?: AI.SeverityLevel); /** - * Creates a simple exception with 1 stack frame. Useful for manual constracting of exception. - */ + * Creates a simple exception with 1 stack frame. Useful for manual constracting of exception. + */ static CreateSimpleException(message: string, typeName: string, assembly: string, fileName: string, details: string, line: number, handledAt?: string): Telemetry.Exception; } @@ -414,8 +414,8 @@ declare module Microsoft.ApplicationInsights.Telemetry { getIsValid(): boolean; private durationMs; /** - * Gets the total duration (PLT) in milliseconds. Check getIsValid() before using this method. - */ + * Gets the total duration (PLT) in milliseconds. Check getIsValid() before using this method. + */ getDurationMs(): number; /** * Constructs a new instance of the PageEventTelemetry object @@ -423,8 +423,8 @@ declare module Microsoft.ApplicationInsights.Telemetry { constructor(name: string, url: string, unused: number, properties?: any, measurements?: any); static getPerformanceTiming(): PerformanceTiming; /** - * Returns true is window performance timing API is supported, false otherwise. - */ + * Returns true is window performance timing API is supported, false otherwise. + */ static isPerformanceTimingSupported(): PerformanceTiming; /** * As page loads different parts of performance timing numbers get set. When all of them are set we can report it. @@ -615,16 +615,16 @@ declare module Microsoft.ApplicationInsights { interface ITelemetryContext { /** - * The object describing a component tracked by this object. - */ + * The object describing a component tracked by this object. + */ application: Context.IApplication; /** * The object describing a device tracked by this object. */ device: Context.IDevice; /** - * The object describing internal settings. - */ + * The object describing internal settings. + */ internal: Context.IInternal; /** * The object describing a location tracked by this object. @@ -635,8 +635,8 @@ declare module Microsoft.ApplicationInsights { */ operation: Context.IOperation; /** - * The object describing sampling settings. - */ + * The object describing sampling settings. + */ sample: Context.ISample; /** * The object describing a user tracked by this object. @@ -647,13 +647,13 @@ declare module Microsoft.ApplicationInsights { */ session: Context.ISession; /** - * Adds telemetry initializer to the collection. Telemetry initializers will be called one by one - * before telemetry item is pushed for sending and in the order they were added. - */ + * Adds telemetry initializer to the collection. Telemetry initializers will be called one by one + * before telemetry item is pushed for sending and in the order they were added. + */ addTelemetryInitializer(telemetryInitializer: (envelope: Microsoft.ApplicationInsights.IEnvelope) => boolean): any; /** - * Tracks telemetry object. - */ + * Tracks telemetry object. + */ track(envelope: Microsoft.ApplicationInsights.IEnvelope): any; } @@ -662,23 +662,23 @@ declare module Microsoft.ApplicationInsights { context: ITelemetryContext; queue: Array<() => void>; /** - * Starts timing how long the user views a page or other item. Call this when the page opens. - * This method doesn't send any telemetry. Call {@link stopTrackTelemetry} to log the page when it closes. - * @param name A string that idenfities this item, unique within this HTML document. Defaults to the document title. - */ + * Starts timing how long the user views a page or other item. Call this when the page opens. + * This method doesn't send any telemetry. Call {@link stopTrackTelemetry} to log the page when it closes. + * @param name A string that idenfities this item, unique within this HTML document. Defaults to the document title. + */ startTrackPage(name?: string): any; /** - * Logs how long a page or other item was visible, after {@link startTrackPage}. Call this when the page closes. - * @param name The string you used as the name in startTrackPage. Defaults to the document title. - * @param url String - a relative or absolute URL that identifies the page or other item. Defaults to the window location. - * @param properties map[string, string] - additional data used to filter pages and metrics in the portal. Defaults to empty. - * @param measurements map[string, number] - metrics associated with this page, displayed in Metrics Explorer on the portal. Defaults to empty. - */ - stopTrackPage(name?: string, url?: string, properties?: { - [name: string]: string; - }, measurements?: { - [name: string]: number; - }): any; + * Logs how long a page or other item was visible, after {@link startTrackPage}. Call this when the page closes. + * @param name The string you used as the name in startTrackPage. Defaults to the document title. + * @param url String - a relative or absolute URL that identifies the page or other item. Defaults to the window location. + * @param properties map[string, string] - additional data used to filter pages and metrics in the portal. Defaults to empty. + * @param measurements map[string, number] - metrics associated with this page, displayed in Metrics Explorer on the portal. Defaults to empty. + */ + stopTrackPage( + name?: string, + url?: string, + properties?: { [name: string]: string }, + measurements?: { [name: string]: number }): any; /** * Logs that a page or other item was viewed. * @param name The string you used as the name in startTrackPage. Defaults to the document title. @@ -687,11 +687,11 @@ declare module Microsoft.ApplicationInsights { * @param measurements map[string, number] - metrics associated with this page, displayed in Metrics Explorer on the portal. Defaults to empty. * @param duration number - the number of milliseconds it took to load the page. Defaults to undefined. If set to default value, page load time is calculated internally. */ - trackPageView(name?: string, url?: string, properties?: { - [name: string]: string; - }, measurements?: { - [name: string]: number; - }, duration?: number): any; + trackPageView( + name?: string, + url?: string, + properties?: { [name: string]: string }, + measurements?: { [name: string]: number }, duration?: number): any; /** * Start timing an extended event. Call {@link stopTrackEvent} to log the event when it ends. * @param name A string that identifies this event uniquely within the document. @@ -703,22 +703,20 @@ declare module Microsoft.ApplicationInsights { * @param properties map[string, string] - additional data used to filter events and metrics in the portal. Defaults to empty. * @param measurements map[string, number] - metrics associated with this event, displayed in Metrics Explorer on the portal. Defaults to empty. */ - stopTrackEvent(name: string, properties?: { - [name: string]: string; - }, measurements?: { - [name: string]: number; - }): any; + stopTrackEvent( + name: string, + properties?: { [name: string]: string }, + measurements?: { [name: string]: number }): any; /** - * Log a user action or other occurrence. - * @param name A string to identify this event in the portal. - * @param properties map[string, string] - additional data used to filter events and metrics in the portal. Defaults to empty. - * @param measurements map[string, number] - metrics associated with this event, displayed in Metrics Explorer on the portal. Defaults to empty. - */ - trackEvent(name: string, properties?: { - [name: string]: string; - }, measurements?: { - [name: string]: number; - }): any; + * Log a user action or other occurrence. + * @param name A string to identify this event in the portal. + * @param properties map[string, string] - additional data used to filter events and metrics in the portal. Defaults to empty. + * @param measurements map[string, number] - metrics associated with this event, displayed in Metrics Explorer on the portal. Defaults to empty. + */ + trackEvent( + name: string, + properties?: { [name: string]: string }, + measurements?: { [name: string]: number }): any; /** * Log a dependency call * @param id unique id, this is used by the backend o correlate server requests. Use Util.newId() to generate a unique Id. @@ -737,11 +735,12 @@ declare module Microsoft.ApplicationInsights { * @param measurements map[string, number] - metrics associated with this event, displayed in Metrics Explorer on the portal. Defaults to empty. * @param severityLevel AI.SeverityLevel - severity level */ - trackException(exception: Error, handledAt?: string, properties?: { - [name: string]: string; - }, measurements?: { - [name: string]: number; - }, severityLevel?: AI.SeverityLevel): any; + trackException( + exception: Error, + handledAt?: string, + properties?: { [name: string]: string }, + measurements?: { [name: string]: number }, + severityLevel?: AI.SeverityLevel): any; /** * Log a numeric value that is not associated with a specific event. Typically used to send regular reports of performance indicators. * To send a single measurement, use just the first two parameters. If you take measurements very frequently, you can reduce the @@ -752,28 +751,30 @@ declare module Microsoft.ApplicationInsights { * @param min The smallest measurement in the sample. Defaults to the average. * @param max The largest measurement in the sample. Defaults to the average. */ - trackMetric(name: string, average: number, sampleCount?: number, min?: number, max?: number, properties?: { - [name: string]: string; - }): any; + trackMetric( + name: string, + average: number, + sampleCount?: number, + min?: number, + max?: number, + properties?: { [name: string]: string }): any; /** - * Log a diagnostic message. - * @param message A message string - * @param properties map[string, string] - additional data used to filter traces in the portal. Defaults to empty. - */ - trackTrace(message: string, properties?: { - [name: string]: string; - }): any; + * Log a diagnostic message. + * @param message A message string + * @param properties map[string, string] - additional data used to filter traces in the portal. Defaults to empty. + */ + trackTrace(message: string, properties?: { [name: string]: string }): any; /** * Immediately send all queued telemetry. */ flush(): any; /** - * Sets the autheticated user id and the account id in this session. - * User auth id and account id should be of type string. They should not contain commas, semi-colons, equal signs, spaces, or vertical-bars. - * - * @param authenticatedUserId {string} - The authenticated user id. A unique and persistent string that represents each authenticated user in the service. - * @param accountId {string} - An optional string to represent the account associated with the authenticated user. - */ + * Sets the autheticated user id and the account id in this session. + * User auth id and account id should be of type string. They should not contain commas, semi-colons, equal signs, spaces, or vertical-bars. + * + * @param authenticatedUserId {string} - The authenticated user id. A unique and persistent string that represents each authenticated user in the service. + * @param accountId {string} - An optional string to represent the account associated with the authenticated user. + */ setAuthenticatedUserContext(authenticatedUserId: string, accountId?: string): any; /** * Clears the authenticated user id and the account id from the user context. @@ -796,4 +797,4 @@ declare module 'applicationinsights-js' { const AppInsights: Microsoft.ApplicationInsights.IAppInsights; } -declare var appInsights: Microsoft.ApplicationInsights.IAppInsights; \ No newline at end of file +declare var appInsights: Microsoft.ApplicationInsights.IAppInsights; diff --git a/types/arcgis-rest-api/arcgis-rest-api-tests.ts b/types/arcgis-rest-api/arcgis-rest-api-tests.ts index 0f4cf3d926..3955b02f35 100644 --- a/types/arcgis-rest-api/arcgis-rest-api-tests.ts +++ b/types/arcgis-rest-api/arcgis-rest-api-tests.ts @@ -8,4 +8,4 @@ point = { spatialReference: { wkid: 4326 } -}; \ No newline at end of file +}; diff --git a/types/arcgis-rest-api/index.d.ts b/types/arcgis-rest-api/index.d.ts index 65a02a4367..0992772fec 100644 --- a/types/arcgis-rest-api/index.d.ts +++ b/types/arcgis-rest-api/index.d.ts @@ -65,7 +65,6 @@ export interface BezierCurve { export type JsonCurve = CircularArc | Arc | OldCircularArc | BezierCurve; - export interface SpatialReferenceWkid { wkid?: number; latestWkid?: number; @@ -131,7 +130,6 @@ export interface Envelope extends Geometry { export type esriGeometryType = "esriGeometryPoint" | "esriGeometryMultipoint" | "esriGeometryPolyline" | "esriGeometryPolygon" | "esriGeometryEnvelope"; - export type Color = [number, number, number, number]; export type SimpleMarkerSymbolStyle = "esriSMSCircle" | "esriSMSCross" | "esriSMSDiamond" | "esriSMSSquare" | "esriSMSX" | "esriSMSTriangle"; export type SimpleLineSymbolStyle = "esriSLSDash" | "esriSLSDashDot" | "esriSLSDashDotDot" | "esriSLSDot" | "esriSLSNull" | "esriSLSSolid"; @@ -181,7 +179,6 @@ export interface PictureSourced { "angle"?: number; "xoffset"?: number; "yoffset"?: number; - } export interface PictureMarkerSymbol extends MarkerSymbol, PictureSourced { @@ -217,4 +214,4 @@ export interface TextSymbol extends MarkerSymbol { "kerning"?: boolean; "font"?: Font; "text"?: string; // only applicable when specified as a client-side graphic. -} \ No newline at end of file +} diff --git a/types/arcgis-to-geojson-utils/arcgis-to-geojson-utils-tests.ts b/types/arcgis-to-geojson-utils/arcgis-to-geojson-utils-tests.ts index 2e9337793a..5cb9d9472e 100644 --- a/types/arcgis-to-geojson-utils/arcgis-to-geojson-utils-tests.ts +++ b/types/arcgis-to-geojson-utils/arcgis-to-geojson-utils-tests.ts @@ -14,7 +14,7 @@ const geojsonPoint: GeoJSON.Point = { }; // parse ArcGIS JSON, convert it to GeoJSON -var geojson = utils.arcgisToGeoJSON(arcgisPoint); +const geojson = utils.arcgisToGeoJSON(arcgisPoint); // take GeoJSON and convert it to ArcGIS JSON -var arcgis = utils.geojsonToArcGIS(geojsonPoint); \ No newline at end of file +const arcgis = utils.geojsonToArcGIS(geojsonPoint); diff --git a/types/arcgis-to-geojson-utils/index.d.ts b/types/arcgis-to-geojson-utils/index.d.ts index 94a86022a3..65c78a4230 100644 --- a/types/arcgis-to-geojson-utils/index.d.ts +++ b/types/arcgis-to-geojson-utils/index.d.ts @@ -15,4 +15,4 @@ export function arcgisToGeoJSON(arcgis: T): GeoJSON.G /** * Converts a GeoJSON geometry into a ArcGIS geometry. */ -export function geojsonToArcGIS(geojson: GeoJSON.GeometryObject): ArcGis.Geometry; \ No newline at end of file +export function geojsonToArcGIS(geojson: GeoJSON.GeometryObject): ArcGis.Geometry; diff --git a/types/array-uniq/array-uniq-tests.ts b/types/array-uniq/array-uniq-tests.ts index 8674d2508c..b6c90c620a 100644 --- a/types/array-uniq/array-uniq-tests.ts +++ b/types/array-uniq/array-uniq-tests.ts @@ -2,4 +2,4 @@ import arrayUniq = require("array-uniq"); arrayUniq([1, 1, 2, 3, 3]); -arrayUniq(["foo", "foo", "bar", "foo"]); \ No newline at end of file +arrayUniq(["foo", "foo", "bar", "foo"]); diff --git a/types/array-uniq/index.d.ts b/types/array-uniq/index.d.ts index 25d97c0a94..d05ad76072 100644 --- a/types/array-uniq/index.d.ts +++ b/types/array-uniq/index.d.ts @@ -5,4 +5,4 @@ declare function arrayUniq(arr: T[]): T[]; -export = arrayUniq; \ No newline at end of file +export = arrayUniq; diff --git a/types/artyom.js/artyom.js-tests.ts b/types/artyom.js/artyom.js-tests.ts index 67e5908883..d301c9a6f4 100644 --- a/types/artyom.js/artyom.js-tests.ts +++ b/types/artyom.js/artyom.js-tests.ts @@ -29,4 +29,4 @@ artyom.getVoices(); artyom.getLanguage(); // Get the artyom.js version -artyom.getVersion(); \ No newline at end of file +artyom.getVersion(); diff --git a/types/artyom.js/index.d.ts b/types/artyom.js/index.d.ts index ae120015ca..b4f85781c6 100644 --- a/types/artyom.js/index.d.ts +++ b/types/artyom.js/index.d.ts @@ -22,16 +22,16 @@ interface SpeechRecognition extends EventTarget { start(): void; stop(): void; abort(): void; - onaudiostart: (ev: Event) => any; - onsoundstart: (ev: Event) => any; - onspeechstart: (ev: Event) => any; - onspeechend: (ev: Event) => any; - onsoundend: (ev: Event) => any; - onresult: (ev: SpeechRecognitionEvent) => any; - onnomatch: (ev: SpeechRecognitionEvent) => any; - onerror: (ev: SpeechRecognitionError) => any; - onstart: (ev: Event) => any; - onend: (ev: Event) => any; + onaudiostart(ev: Event): any; + onsoundstart(ev: Event): any; + onspeechstart(ev: Event): any; + onspeechend(ev: Event): any; + onsoundend(ev: Event): any; + onresult(ev: SpeechRecognitionEvent): any; + onnomatch(ev: SpeechRecognitionEvent): any; + onerror(ev: SpeechRecognitionError): any; + onstart(ev: Event): any; + onend(ev: Event): any; } interface SpeechRecognitionStatic { @@ -106,7 +106,7 @@ interface SpeechSynthesis extends EventTarget { speaking: boolean; paused: boolean; - onvoiceschanged: (ev: Event) => any; + onvoiceschanged(ev: Event): any; speak(utterance: SpeechSynthesisUtterance): void; cancel(): void; pause(): void; @@ -128,13 +128,13 @@ interface SpeechSynthesisUtterance extends EventTarget { rate: number; pitch: number; - onstart: (ev: SpeechSynthesisEvent) => any; - onend: (ev: SpeechSynthesisEvent) => any; - onerror: (ev: SpeechSynthesisErrorEvent) => any; - onpause: (ev: SpeechSynthesisEvent) => any; - onresume: (ev: SpeechSynthesisEvent) => any; - onmark: (ev: SpeechSynthesisEvent) => any; - onboundary: (ev: SpeechSynthesisEvent) => any; + onstart(ev: SpeechSynthesisEvent): any; + onend(ev: SpeechSynthesisEvent): any; + onerror(ev: SpeechSynthesisErrorEvent): any; + onpause(ev: SpeechSynthesisEvent): any; + onresume(ev: SpeechSynthesisEvent): any; + onmark(ev: SpeechSynthesisEvent): any; + onboundary(ev: SpeechSynthesisEvent): any; } interface SpeechSynthesisUtteranceStatic { @@ -211,7 +211,7 @@ declare namespace Artyom { /** Triggers of the command */ indexes: string[]; /** Logic to execute when the command is triggered */ - action: (i: number, wildcard?: string, full?: string) => void; + action(i: number, wildcard?: string, full?: string): void; /** Description of the command */ description?: string; /** Flag to specify is a command is either normal or smart */ @@ -502,7 +502,7 @@ declare namespace Artyom { /** * Method to bla, bla, bla... */ - static getInstance(): ArtyomJS + static getInstance(): ArtyomJS; } } diff --git a/types/auth0-lock/package.json b/types/auth0-lock/package.json deleted file mode 100644 index 2d730992af..0000000000 --- a/types/auth0-lock/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "@types/auth0-js": "latest" - } -} diff --git a/types/auth0.widget/package.json b/types/auth0.widget/package.json deleted file mode 100644 index 2d730992af..0000000000 --- a/types/auth0.widget/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "@types/auth0-js": "latest" - } -} diff --git a/types/aws-lambda-mock-context/aws-lambda-mock-context-tests.ts b/types/aws-lambda-mock-context/aws-lambda-mock-context-tests.ts new file mode 100644 index 0000000000..09e121a776 --- /dev/null +++ b/types/aws-lambda-mock-context/aws-lambda-mock-context-tests.ts @@ -0,0 +1,22 @@ +import context = require("aws-lambda-mock-context"); +import * as Alexa from "alexa-sdk"; + +const launchRequestJson: any = { + request: { + locale: "en-US", + requestId: "amzn1.echo-api.request.[unique-value-here]", + timestamp: "2016-10-27T18:21:44Z", + type: "LaunchRequest", + }, + session: { + application: {applicationId: "amzn1.ask.skill.[unique-value-here]"}, + attributes: {}, + new: false, + sessionId: "amzn1.echo-api.session.[unique-value-here]", + user: {userId: "amzn1.ask.account.[unique-value-here]"}, + }, + version: "1.0", +}; + +const ctx = context(); +const alexa = Alexa.handler(launchRequestJson, ctx); diff --git a/types/aws-lambda-mock-context/index.d.ts b/types/aws-lambda-mock-context/index.d.ts new file mode 100644 index 0000000000..0ccd43c876 --- /dev/null +++ b/types/aws-lambda-mock-context/index.d.ts @@ -0,0 +1,34 @@ +// Type definitions for AWS Lambda Mock Context SDK 1.0 +// Project: https://github.com/moskalyk/typed-aws-lambda-mock-context +// Definitions by: Morgan Moskalyk , Anand Nimkar +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare function context(options?: Options): Context; + +export = context; + +interface Context { + Promise: Promise; + callbackWaitsForEmptyEventLoop: boolean; + functionName: string; + functionVersion: string; + invokedFunctionArn: string; + memoryLimitInMB: string; + awsRequestId: string; + invokeid: string; + logGroupName: string; + logStreamName: string; + getRemainingTimeInMillis: number; + succeed(result: any): Promise; + fail(err: any): Promise; + done(err: any, result: any): Promise; +} + +interface Options { + region: string; + account: string; + functionName: string; + functionVersion: string; + memoryLimitInMB: string; + alias?: string; +} diff --git a/types/aws-lambda-mock-context/tsconfig.json b/types/aws-lambda-mock-context/tsconfig.json new file mode 100644 index 0000000000..bdfad87be5 --- /dev/null +++ b/types/aws-lambda-mock-context/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "aws-lambda-mock-context-tests.ts" + ] +} \ No newline at end of file diff --git a/types/aws-lambda-mock-context/tslint.json b/types/aws-lambda-mock-context/tslint.json new file mode 100644 index 0000000000..192203ab54 --- /dev/null +++ b/types/aws-lambda-mock-context/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "../tslint.json" +} \ No newline at end of file diff --git a/types/base64-js/base64-js-tests.ts b/types/base64-js/base64-js-tests.ts index 13c3f705b5..402ce43e88 100644 --- a/types/base64-js/base64-js-tests.ts +++ b/types/base64-js/base64-js-tests.ts @@ -1,5 +1,5 @@ import * as base64js from "base64-js"; -const length: number = base64js.byteLength(""); -const bytes: Uint8Array = base64js.toByteArray(""); -const decoded: string = base64js.fromByteArray(new Uint8Array(0)); +base64js.byteLength(""); // $ExpectType number +base64js.toByteArray(""); // $ExpectType Uint8Array +base64js.fromByteArray(new Uint8Array(0)); // $ExpectTpe string diff --git a/types/bigi/bigi-tests.ts b/types/bigi/bigi-tests.ts index 70569bb919..ef9d7421d3 100644 --- a/types/bigi/bigi-tests.ts +++ b/types/bigi/bigi-tests.ts @@ -1,9 +1,9 @@ import BigInteger = require('bigi'); -var b1 = BigInteger.fromHex("188DA80EB03090F67CBF20EB43A18800F4FF0AFD82FF1012"); -var b2 = BigInteger.fromHex("07192B95FFC8DA78631011ED6B24CDD573F977A11E794811"); +const b1 = BigInteger.fromHex("188DA80EB03090F67CBF20EB43A18800F4FF0AFD82FF1012"); +const b2 = BigInteger.fromHex("07192B95FFC8DA78631011ED6B24CDD573F977A11E794811"); -var b3 = b1.multiply(b2); +const b3 = b1.multiply(b2); console.log(b3.toHex()); -// => ae499bfe762edfb416d0ce71447af67ff33d1760cbebd70874be1d7a5564b0439a59808cb1856a91974f7023f72132 \ No newline at end of file +// => ae499bfe762edfb416d0ce71447af67ff33d1760cbebd70874be1d7a5564b0439a59808cb1856a91974f7023f72132 diff --git a/types/bitcoinjs-lib/bitcoinjs-lib-tests.ts b/types/bitcoinjs-lib/bitcoinjs-lib-tests.ts index bdaee3ee83..7267fe5d26 100644 --- a/types/bitcoinjs-lib/bitcoinjs-lib-tests.ts +++ b/types/bitcoinjs-lib/bitcoinjs-lib-tests.ts @@ -3,9 +3,9 @@ import bigi = require('bigi'); import bitcoin = require('bitcoinjs-lib'); -declare var it: any; -declare var describe: any; -declare var assert: any; +declare const it: any; +declare const describe: any; +declare const assert: any; describe('bitcoinjs-lib (basic)', () => { it('can generate a random bitcoin address', () => { @@ -13,18 +13,18 @@ describe('bitcoinjs-lib (basic)', () => { function rng() { return new Buffer('zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz'); } // generate random keyPair - var keyPair = bitcoin.ECPair.makeRandom({ rng }); - var address = keyPair.getAddress(); + const keyPair = bitcoin.ECPair.makeRandom({ rng }); + const address = keyPair.getAddress(); assert.strictEqual(address, '1F5VhMHukdnUES9kfXqzPzMeF1GPHKiF64'); }); it('can generate an address from a SHA256 hash', () => { - var hash = bitcoin.crypto.sha256('correct horse battery staple'); - var d = bigi.fromBuffer(hash); + const hash = bitcoin.crypto.sha256('correct horse battery staple'); + const d = bigi.fromBuffer(hash); - var keyPair = new bitcoin.ECPair(d); - var address = keyPair.getAddress(); + const keyPair = new bitcoin.ECPair(d); + const address = keyPair.getAddress(); assert.strictEqual(address, '1C7zdTfnkzmr13HfA2vNm5SJYRK6nEKyq8'); }); @@ -33,26 +33,26 @@ describe('bitcoinjs-lib (basic)', () => { // for testing only function rng() { return new Buffer('zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz'); } - var litecoin = bitcoin.networks.litecoin; + const litecoin = bitcoin.networks.litecoin; - var keyPair = bitcoin.ECPair.makeRandom({ network: litecoin, rng }); - var wif = keyPair.toWIF(); - var address = keyPair.getAddress(); + const keyPair = bitcoin.ECPair.makeRandom({ network: litecoin, rng }); + const wif = keyPair.toWIF(); + const address = keyPair.getAddress(); assert.strictEqual(address, 'LZJSxZbjqJ2XVEquqfqHg1RQTDdfST5PTn'); assert.strictEqual(wif, 'T7A4PUSgTDHecBxW1ZiYFrDNRih2o7M8Gf9xpoCgudPF9gDiNvuS'); }); it('can import an address via WIF', () => { - var keyPair = bitcoin.ECPair.fromWIF('Kxr9tQED9H44gCmp6HAdmemAzU3n84H3dGkuWTKvE23JgHMW8gct'); - var address = keyPair.getAddress(); + const keyPair = bitcoin.ECPair.fromWIF('Kxr9tQED9H44gCmp6HAdmemAzU3n84H3dGkuWTKvE23JgHMW8gct'); + const address = keyPair.getAddress(); assert.strictEqual(address, '19AAjaTUbRjQCMuVczepkoPswiZRhjtg31'); }); it('can create a Transaction', () => { - var keyPair = bitcoin.ECPair.fromWIF('L1uyy5qTuGrVXrmrsvHWHgVzW9kKdrp27wBC7Vs6nZDTF2BRUVwy'); - var tx = new bitcoin.TransactionBuilder(); + const keyPair = bitcoin.ECPair.fromWIF('L1uyy5qTuGrVXrmrsvHWHgVzW9kKdrp27wBC7Vs6nZDTF2BRUVwy'); + const tx = new bitcoin.TransactionBuilder(); tx.addInput('aa94ab02c182214f090e99a0d57021caffd0f195a81c24602b1028b130b63e31', 0); tx.addOutput('1Gokm82v6DmtwKEB8AiVhm82hyFSsEvBDK', 15000); diff --git a/types/blacklist/blacklist-tests.ts b/types/blacklist/blacklist-tests.ts index 0f465dd62a..5c5803c45c 100644 --- a/types/blacklist/blacklist-tests.ts +++ b/types/blacklist/blacklist-tests.ts @@ -1,4 +1,4 @@ -var someInput = { a: 1, b: 2, c: 3 }; +const someInput = { a: 1, b: 2, c: 3 }; import blacklist = require('blacklist'); @@ -10,4 +10,4 @@ blacklist(someInput, { b: false, // b will be in the result c: 1 > 2 // false, therefore c will be in the result }); -// => { b: 2, c: 3 } \ No newline at end of file +// => { b: 2, c: 3 } diff --git a/types/bloomfilter/bloomfilter-tests.ts b/types/bloomfilter/bloomfilter-tests.ts index f1f3306d62..650cc97eb4 100644 --- a/types/bloomfilter/bloomfilter-tests.ts +++ b/types/bloomfilter/bloomfilter-tests.ts @@ -1,11 +1,11 @@ -import { BloomFilter } from './index'; +import { BloomFilter } from 'bloomfilter'; function test_bloomfilter() { const m: number = 10; const k: number = 2; - let bloomFilter = new BloomFilter(m, k); - let array: Array = bloomFilter.buckets; - let length: number = bloomFilter.buckets.length; + const bloomFilter = new BloomFilter(m, k); + const array: Int32Array[] = bloomFilter.buckets; + const length: number = bloomFilter.buckets.length; bloomFilter.add('someString'); - let test: boolean = bloomFilter.test('someString'); + const test: boolean = bloomFilter.test('someString'); } diff --git a/types/bloomfilter/index.d.ts b/types/bloomfilter/index.d.ts index 071c32dfc6..00ed408c6d 100644 --- a/types/bloomfilter/index.d.ts +++ b/types/bloomfilter/index.d.ts @@ -3,8 +3,8 @@ // Definitions by: slawiko // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -export declare class BloomFilter { - buckets: Array; +export class BloomFilter { + buckets: Int32Array[]; constructor(m: number, k: number); diff --git a/types/bluebird-global/bluebird-global-tests.ts b/types/bluebird-global/bluebird-global-tests.ts index 43d5fee050..0464b188cd 100644 --- a/types/bluebird-global/bluebird-global-tests.ts +++ b/types/bluebird-global/bluebird-global-tests.ts @@ -7,7 +7,6 @@ function testSomeStaticMethods() { function testFunctionReturningPromise() { function functionReturningPromise(): Promise { return new Promise((resolve, reject, onCancel) => { - if (onCancel) { onCancel(() => { console.log("onCancel cleanup"); @@ -40,5 +39,4 @@ function testPromiseRejection() { .then((value) => { return value.toUpperCase(); }); - } diff --git a/types/bluebird-global/tslint.json b/types/bluebird-global/tslint.json index b03221674a..37c90f2397 100644 --- a/types/bluebird-global/tslint.json +++ b/types/bluebird-global/tslint.json @@ -5,6 +5,6 @@ "no-empty-interface": false, "array-type": false, "unified-signatures": false, - "forbidden-types": false + "ban-types": false } } diff --git a/types/body-parser/index.d.ts b/types/body-parser/index.d.ts index 8d068cb66a..2b17b20ed4 100644 --- a/types/body-parser/index.d.ts +++ b/types/body-parser/index.d.ts @@ -16,7 +16,7 @@ declare namespace bodyParser { interface Options { inflate?: boolean; limit?: number | string; - type?: string | ((req: Request) => any); + type?: string | string[] | ((req: Request) => any); verify?: (req: Request, res: Response, buf: Buffer, encoding: string) => void; } diff --git a/types/braintree-web/index.d.ts b/types/braintree-web/index.d.ts index 6d896a5efe..a30a880684 100644 --- a/types/braintree-web/index.d.ts +++ b/types/braintree-web/index.d.ts @@ -7,7 +7,7 @@ * @module braintree-web/american-express * @description This module is for use with Amex Express Checkout. To accept American Express cards, use Hosted Fields. */ -declare namespace BraintreeWeb { +declare namespace braintree { export interface AmericanExpress { /** * @static @@ -24,22 +24,6 @@ declare namespace BraintreeWeb { * @type {string} */ VERSION: string; - } - - /** - * @class - * @param {object} options Options - * @description You cannot use this constructor directly. Use {@link module:braintree-web/american-express.create|braintree.american-express.create} instead. - * @classdesc This class allows you use a nonce to interact with American Express Checkout. To accept American Express cards, use Hosted Fields. - */ - export class AmericanExpress { - /** - * @class - * @param {object} options Options - * @description You cannot use this constructor directly. Use {@link module:braintree-web/american-express.create|braintree.american-express.create} instead. - * @classdesc This class allows you use a nonce to interact with American Express Checkout. To accept American Express cards, use Hosted Fields. - */ - constructor(options: any); /** * Gets the rewards balance associated with a Braintree nonce. @@ -63,7 +47,7 @@ declare namespace BraintreeWeb { * }); * }); */ - public getRewardsBalance(options: { nonce: string }, callback: callback): void; + getRewardsBalance(options: { nonce: string }, callback: callback): void; /** * Gets the Express Checkout nonce profile given a nonce from American Express. @@ -87,121 +71,123 @@ declare namespace BraintreeWeb { * }); * }); */ - public getExpressCheckoutProfile(options: { nonce: string }, callback: callback): void; + getExpressCheckoutProfile(options: { nonce: string }, callback: callback): void; } } -// more info https://developer.apple.com/reference/applepayjs/1916082-applepay_js_data_types/paymentrequest +declare namespace braintree { + // more info https://developer.apple.com/reference/applepayjs/1916082-applepay_js_data_types/paymentrequest -// billingContact -// Billing contact information for the user. -// countryCode -//Required.The merchant’s two- letter ISO 3166 country code. -// currencyCode -// Required.The three- letter ISO 4217 currency code for the payment. -// lineItems -//A set of line items that explain recurring payments and additional charges. -// merchantCapabilities -// Required.The payment capabilities supported by the merchant.The value must be one or more of supports3DS, supportsEMV, supportsCredit, or supportsDebit. -// requiredBillingContactFields -// The billing information that is required from the user.The value must be one or more of postalAddress, phone, email, or name. -// requiredShippingContactFields -// The shipping information that is required from the user.The value must be one or more of postalAddress, phone, email, or name. -// shippingContact -// Shipping contact information for the user. -// shippingMethods -//A set of available shipping methods.Totals for all shipping methods must be non- negative to pass validation. -// shippingType -// How the items are to be shipped.This property is optional.If specified, it must be one or more of shipping, delivery, storePickup, or servicePickup.The default value is shipping. -// supportedNetworks -// Required.The payment networks supported by the merchant.The value must be one or more of amex, discover, interac, masterCard, privateLabel, or visa. -// total -// Required.The total amount for the payment.The total must be greater than zero and have a label to pass validation. -interface ApplePayPaymentRequest { - total: { - label: string; - amount: string; - }; - countryCode: string; - currencyCode: string; - supportedNetworks: string[]; - merchantCapabilities: string[]; + // billingContact + // Billing contact information for the user. + // countryCode + //Required.The merchant’s two- letter ISO 3166 country code. + // currencyCode + // Required.The three- letter ISO 4217 currency code for the payment. + // lineItems + //A set of line items that explain recurring payments and additional charges. + // merchantCapabilities + // Required.The payment capabilities supported by the merchant.The value must be one or more of supports3DS, supportsEMV, supportsCredit, or supportsDebit. + // requiredBillingContactFields + // The billing information that is required from the user.The value must be one or more of postalAddress, phone, email, or name. + // requiredShippingContactFields + // The shipping information that is required from the user.The value must be one or more of postalAddress, phone, email, or name. + // shippingContact + // Shipping contact information for the user. + // shippingMethods + //A set of available shipping methods.Totals for all shipping methods must be non- negative to pass validation. + // shippingType + // How the items are to be shipped.This property is optional.If specified, it must be one or more of shipping, delivery, storePickup, or servicePickup.The default value is shipping. + // supportedNetworks + // Required.The payment networks supported by the merchant.The value must be one or more of amex, discover, interac, masterCard, privateLabel, or visa. + // total + // Required.The total amount for the payment.The total must be greater than zero and have a label to pass validation. + interface ApplePayPaymentRequest { + total: { + label: string; + amount: string; + }; + countryCode: string; + currencyCode: string; + supportedNetworks: string[]; + merchantCapabilities: string[]; - billingContact?: any; - shippingContact?: any; - shippingMethods?: any; - shippingType?: any; - requiredBillingContactFields?: any; - requiredShippingContactFields?: any; -} + billingContact?: any; + shippingContact?: any; + shippingMethods?: any; + shippingType?: any; + requiredBillingContactFields?: any; + requiredShippingContactFields?: any; + } -declare enum ApplePayStatusCodes { - // The requested action succeeded. - STATUS_SUCCESS = 1, - // The requested action failed. - STATUS_FAILURE, - // The billing address is not valid. - STATUS_INVALID_BILLING_POSTAL_ADDRESS, - // The shipping address is not valid. - STATUS_INVALID_SHIPPING_POSTAL_ADDRESS, - // The shipping contact information is not valid. - STATUS_INVALID_SHIPPING_CONTACT, - // The required PIN information was not provided. Cards on the China Union Pay payment network may require a PIN to authenticate the transaction. - STATUS_PIN_REQUIRED, - // The PIN information is not valid.Cards on the China Union Pay network may require a PIN. - STATUS_PIN_INCORRECT, - // The maximum number of tries for a PIN has been reached and the user has been locked out. Cards on the China Union Pay network may require a PIN. - STATUS_PIN_LOCKOUT, -} + export enum ApplePayStatusCodes { + // The requested action succeeded. + STATUS_SUCCESS = 1, + // The requested action failed. + STATUS_FAILURE, + // The billing address is not valid. + STATUS_INVALID_BILLING_POSTAL_ADDRESS, + // The shipping address is not valid. + STATUS_INVALID_SHIPPING_POSTAL_ADDRESS, + // The shipping contact information is not valid. + STATUS_INVALID_SHIPPING_CONTACT, + // The required PIN information was not provided. Cards on the China Union Pay payment network may require a PIN to authenticate the transaction. + STATUS_PIN_REQUIRED, + // The PIN information is not valid.Cards on the China Union Pay network may require a PIN. + STATUS_PIN_INCORRECT, + // The maximum number of tries for a PIN has been reached and the user has been locked out. Cards on the China Union Pay network may require a PIN. + STATUS_PIN_LOCKOUT, + } -interface ApplePayPayload { - merchantIdentifier: string; - domainName: string; - displayName: string; -} + interface ApplePayPayload { + merchantIdentifier: string; + domainName: string; + displayName: string; + } -declare class ApplePaySession { - constructor(version: number, request: ApplePayPaymentRequest); + export class ApplePaySession { + constructor(version: number, request: ApplePayPaymentRequest); - canMakePayments(): boolean; + canMakePayments(): boolean; - canMakePaymentsWithActiveCard(merchantIdentifier: string): boolean; + canMakePaymentsWithActiveCard(merchantIdentifier: string): boolean; - completeMerchantValidation(merchantSession: any): void; + completeMerchantValidation(merchantSession: any): void; - abort(): void; + abort(): void; - begin(): void; + begin(): void; - completePayment(status: ApplePayStatusCodes): void; + completePayment(status: ApplePayStatusCodes): void; - completePaymentMethodSelection(newTotal: any, newLineItems: any): void; + completePaymentMethodSelection(newTotal: any, newLineItems: any): void; - completeShippingContactSelection(status: ApplePayStatusCodes, newShippingMethods: any, newTotal: any, newLineItems: any): void; + completeShippingContactSelection(status: ApplePayStatusCodes, newShippingMethods: any, newTotal: any, newLineItems: any): void; - completeShippingMethodSelection(status: ApplePayStatusCodes, newTotal: any, newLineItems: any): void; + completeShippingMethodSelection(status: ApplePayStatusCodes, newTotal: any, newLineItems: any): void; - supportsVersion(version: number): boolean; + supportsVersion(version: number): boolean; - oncancel: (event: any) => void; + oncancel: (event: any) => void; - onpaymentauthorized: (event: any) => void; + onpaymentauthorized: (event: any) => void; - onpaymentmethodselected: (event: any) => void; + onpaymentmethodselected: (event: any) => void; - onshippingcontactselected: (event: any) => void; + onshippingcontactselected: (event: any) => void; - onshippingmethodselected: (event: any) => void; + onshippingmethodselected: (event: any) => void; - onvalidatemerchant: (event: any) => void; + onvalidatemerchant: (event: any) => void; + } } /** * @module braintree-web/apple-pay * @description Accept Apple Pay on the Web. *This component is currently in beta and is subject to change.* */ -declare namespace BraintreeWeb { +declare namespace braintree { export interface ApplePay { /** * @static @@ -218,22 +204,6 @@ declare namespace BraintreeWeb { * @type {string} */ VERSION: string; - } - - /** - * @class - * @param {object} options Options - * @description You cannot use this constructor directly. Use {@link module:braintree-web/apple-pay.create|braintree.apple-pay.create} instead. - * @classdesc This class represents an Apple Pay component. Instances of this class have methods for validating the merchant server and tokenizing payments. - */ - export class ApplePay { - /** - * @class - * @param {object} options Options - * @description You cannot use this constructor directly. Use {@link module:braintree-web/apple-pay.create|braintree.apple-pay.create} instead. - * @classdesc This class represents an Apple Pay component. Instances of this class have methods for validating the merchant server and tokenizing payments. - */ - constructor(options: any); /** * Merges a payment request with Braintree defaults @@ -260,7 +230,7 @@ declare namespace BraintreeWeb { * // { total: { }, countryCode: 'US', currencyCode: 'USD', merchantCapabilities: [ ], supportedNetworks: [ ] } * */ - public createPaymentRequest(paymentRequest: ApplePayPaymentRequest): ApplePayPaymentRequest + createPaymentRequest(paymentRequest: ApplePayPaymentRequest): ApplePayPaymentRequest /** * Validates the merchant website, as required by ApplePaySession before payment can be authorized. @@ -302,7 +272,7 @@ declare namespace BraintreeWeb { * }; * }); */ - public performValidation(options: { validationURL: string, displayName?: string, merchantIdentifier?: string }, callback: callback): void; + performValidation(options: { validationURL: string, displayName?: string, merchantIdentifier?: string }, callback: callback): void; /** * Tokenizes an Apple Pay payment. @@ -332,16 +302,14 @@ declare namespace BraintreeWeb { * }; * }); */ - public tokenize(options: { token: any }, callback: callback): void; - + tokenize(options: { token: any }, callback: callback): void; } } /** @module braintree-web/client */ -declare namespace BraintreeWeb { +declare namespace braintree { /** * This object is returned by {@link Client#getConfiguration|getConfiguration}. This information is used extensively by other Braintree modules to properly configure themselves. - * @typedef {object} Client~configuration * @property {object} client The braintree-web/client parameters. * @property {string} client.authorization A tokenizationKey or clientToken. * @property {object} gatewayConfiguration Gateway-supplied configuration. @@ -398,30 +366,13 @@ declare namespace BraintreeWeb { * @type {string} */ VERSION: string; - } - - /** - * @class - * @param {Client~configuration} configuration Options - * @description Do not use this constructor directly. Use {@link module:braintree-web/client.create|braintree.client.create} instead. - * @classdesc This class is required by many other Braintree components. It serves as the base API layer that communicates with our servers. It is also capable of being used to formulate direct calls to our servers, such as direct credit card tokenization. See {@link Client#request}. - */ - export class Client { - /** - * @class - * @param {Client~configuration} configuration Options - * @description Do not use this constructor directly. Use {@link module:braintree-web/client.create|braintree.client.create} instead. - * @classdesc This class is required by many other Braintree components. It serves as the base API layer that communicates with our servers. It is also capable of being used to formulate direct calls to our servers, such as direct credit card tokenization. See {@link Client#request}. - */ - constructor(configuration: Configuration); - /** * Returns a copy of the configuration values. * @public * @returns {Client~configuration} configuration */ - public getConfiguration(): Configuration; + getConfiguration(): Configuration; /** * Used by other modules to formulate all network requests to the Braintree gateway. It is also capable of being used directly from your own form to tokenize credit card information. However, be sure to satisfy PCI compliance if you use direct card tokenization. @@ -470,13 +421,12 @@ declare namespace BraintreeWeb { * }); * @returns {void} */ - public request(options: { method: string, endpoint: string, data: any, timeout?: number }, callback: callback): void; - + request(options: { method: string, endpoint: string, data: any, timeout?: number }, callback: callback): void; } } /** @module braintree-web/data-collector */ -declare namespace BraintreeWeb { +declare namespace braintree { export interface DataCollector { /** * @static @@ -496,24 +446,6 @@ declare namespace BraintreeWeb { * @type {string} */ VERSION: string; - } - - /** - * @class - * @global - * @name DataCollector - * @description Do not use this constructor directly. Use {@link module:braintree-web/data-collector.create|braintree-web.data-collector.create} instead. - * @classdesc This class is used for advanced fraud integration with PayPal and Kount. Instances of this class have {@link DataCollector#deviceData|deviceData} which is used to correlate user sessions with server transactions. Before using DataCollector, make sure you have enabled advanced fraud protection in the Braintree gateway. To use your own Kount ID, contact our support team ([support@braintreepayments.com](mailto:support@braintreepayments.com) or [877.434.2894](tel:877.434.2894)). - */ - export class DataCollector { - /** - * @class - * @global - * @name DataCollector - * @description Do not use this constructor directly. Use {@link module:braintree-web/data-collector.create|braintree-web.data-collector.create} instead. - * @classdesc This class is used for advanced fraud integration with PayPal and Kount. Instances of this class have {@link DataCollector#deviceData|deviceData} which is used to correlate user sessions with server transactions. - */ - constructor(); /** * @memberof DataCollector @@ -534,12 +466,11 @@ declare namespace BraintreeWeb { * @returns {void} */ teardown(callback?: callback): void; - } } /** @module braintree-web/hosted-fields */ -declare namespace BraintreeWeb { +declare namespace braintree { /** * Fields used in {@link module:braintree-web/hosted-fields~fieldOptions fields options} * @typedef {object} field @@ -578,7 +509,6 @@ declare namespace BraintreeWeb { } /** - * @typedef {object} HostedFields~hostedFieldsCard * @description Information about the card type, sent in {@link HostedFields~stateObject|stateObjects}. * @property {string} type The code-friendly representation of the card type. It will be one of the following strings: * - `american-express` @@ -618,7 +548,6 @@ declare namespace BraintreeWeb { } /** - * @typedef {object} HostedFields~hostedFieldsFieldData * @description Data about Hosted Fields fields, sent in {@link HostedFields~stateObject|stateObjects}. * @property {HTMLElement} container Reference to the container DOM element on your page associated with the current event. * @property {boolean} isFocused Whether or not the input is currently focused. @@ -641,7 +570,6 @@ declare namespace BraintreeWeb { } /** - * @typedef {object} HostedFields~stateObject * @description The event payload sent from {@link HostedFields#on|on} or {@link HostedFields#getState|getState}. * @property {HostedFields~hostedFieldsCard[]} cards * This will return an array of potential {@link HostedFields~hostedFieldsCard|cards}. If the card type has been determined, the array will contain only one card. @@ -679,7 +607,6 @@ declare namespace BraintreeWeb { } /** - * @typedef {object} HostedFields~tokenizePayload * @property {string} nonce The payment method nonce. * @property {object} details Additional account details. * @property {string} details.cardType Type of card, ex: Visa, MasterCard. @@ -781,22 +708,6 @@ declare namespace BraintreeWeb { * @type {string} */ VERSION: string; - } - - /** - * @class HostedFields - * @param {object} options The Hosted Fields {@link module:braintree-web/hosted-fields.create create} options. - * @description Do not use this constructor directly. Use {@link module:braintree-web/hosted-fields.create|braintree-web.hosted-fields.create} instead. - * @classdesc This class represents a Hosted Fields component produced by {@link module:braintree-web/hosted-fields.create|braintree-web/hosted-fields.create}. Instances of this class have methods for interacting with the input fields within Hosted Fields' iframes. - */ - export class HostedFields { - /** - * @class HostedFields - * @param {object} options The Hosted Fields {@link module:braintree-web/hosted-fields.create create} options. - * @description Do not use this constructor directly. Use {@link module:braintree-web/hosted-fields.create|braintree-web.hosted-fields.create} instead. - * @classdesc This class represents a Hosted Fields component produced by {@link module:braintree-web/hosted-fields.create|braintree-web/hosted-fields.create}. Instances of this class have methods for interacting with the input fields within Hosted Fields' iframes. - */ - constructor(options: any); /** * @name HostedFields#on @@ -829,7 +740,7 @@ declare namespace BraintreeWeb { * }); * @returns {void} */ - public teardown(callback?: callback): void; + teardown(callback?: callback): void; /** * Tokenizes fields and returns a nonce payload. @@ -872,7 +783,7 @@ declare namespace BraintreeWeb { * }); * @returns {void} */ - public tokenize(options?: { vault: boolean }, callback?: callback): void; + tokenize(options?: { vault: boolean }, callback?: callback): void; /** * Add a class to a {@link module:braintree-web/hosted-fields~field field}. Useful for updating field styles when events occur elsewhere in your checkout. @@ -889,7 +800,7 @@ declare namespace BraintreeWeb { * }); * @returns {void} */ - public addClass(field: string, classname: string, callback?: callback): void; + addClass(field: string, classname: string, callback?: callback): void; /** * Removes a class to a {@link module:braintree-web/hosted-fields~field field}. Useful for updating field styles when events occur elsewhere in your checkout. @@ -910,7 +821,7 @@ declare namespace BraintreeWeb { * }); * @returns {void} */ - public removeClass(field: string, classname: string, callback?: callback): void; + removeClass(field: string, classname: string, callback?: callback): void; /** * Sets the placeholder of a {@link module:braintree-web/hosted-fields~field field}. @@ -940,7 +851,7 @@ declare namespace BraintreeWeb { * }); * @returns {void} */ - public setPlaceholder(field: string, placeholder: string, callback?: callback): void; + setPlaceholder(field: string, placeholder: string, callback?: callback): void; /** * Clear the value of a {@link module:braintree-web/hosted-fields~field field}. @@ -960,7 +871,7 @@ declare namespace BraintreeWeb { * hostedFieldsInstance.clear('cvv'); * hostedFieldsInstance.clear('expirationDate'); */ - public clear(field: string, callback?: callback): void; + clear(field: string, callback?: callback): void; /** * Returns an {@link HostedFields~stateObject|object} that includes the state of all fields and possible card types. @@ -973,14 +884,13 @@ declare namespace BraintreeWeb { * return state.fields[key].isValid; * }); */ - public getState(): any; + getState(): any; } } /** @module braintree-web/paypal */ -declare namespace BraintreeWeb { +declare namespace braintree { /** - * @typedef {object} PayPal~tokenizeReturn * @property {Function} close A handle to close the PayPal checkout flow. */ interface PayPalTokenizeReturn { @@ -988,7 +898,6 @@ declare namespace BraintreeWeb { } /** - * @typedef {object} PayPal~tokenizePayload * @property {string} nonce The payment method nonce. * @property {string} type The payment method type, always `PayPalAccount`. * @property {object} details Additional PayPal account details. @@ -1082,20 +991,6 @@ declare namespace BraintreeWeb { * @type {string} */ VERSION: string; - } - - /** - * @class - * @param {object} options see {@link module:braintree-web/paypal.create|paypal.create} - * @classdesc This class represents a PayPal component. Instances of this class have methods for launching auth dialogs and other programmatic interactions with the PayPal component. - */ - export class PayPal { - /** - * @class - * @param {object} options see {@link module:braintree-web/paypal.create|paypal.create} - * @classdesc This class represents a PayPal component. Instances of this class have methods for launching auth dialogs and other programmatic interactions with the PayPal component. - */ - constructor(options: any); /** * Launches the PayPal login flow and returns a nonce payload. Only one PayPal login flow should be active at a time. One way to achieve this is to disable your PayPal button while the flow is open. @@ -1192,7 +1087,7 @@ declare namespace BraintreeWeb { * }); * @returns {PayPal~tokenizeReturn} A handle to close the PayPal checkout frame. */ - public tokenize(options: { flow: string, intent: string, offerCredit: boolean, useraction: string, amount: (string | number), currency: string, displayName: string, locale: string, enableShippingAddress: boolean, shippingAddressOverride: PayPalShippingAddress, shippingAddressEditable: boolean, billingAgreementDescription: string }, callback: callback): PayPalTokenizeReturn; + tokenize(options: { flow: string, intent: string, offerCredit: boolean, useraction: string, amount: (string | number), currency: string, displayName: string, locale: string, enableShippingAddress: boolean, shippingAddressOverride: PayPalShippingAddress, shippingAddressEditable: boolean, billingAgreementDescription: string }, callback: callback): PayPalTokenizeReturn; /** * Cleanly tear down anything set up by {@link module:braintree-web/paypal.create|create}. @@ -1200,15 +1095,13 @@ declare namespace BraintreeWeb { * @param {callback} [callback] Called once teardown is complete. No data is returned if teardown completes successfully. * @returns {void} */ - public teardown(callback?: () => void): void; - + teardown(callback?: () => void): void; } } /** @module braintree-web/three-d-secure */ -declare namespace BraintreeWeb { +declare namespace braintree { /** - * @typedef {object} ThreeDSecure~verifyPayload * @property {string} nonce The new payment method nonce produced by the 3D Secure lookup. The original nonce passed into {@link ThreeDSecure#verifyCard|verifyCard} was consumed. This new nonce should be used to transact on your server. * @property {object} details Additional account details. * @property {string} details.cardType Type of card, ex: Visa, MasterCard. @@ -1250,23 +1143,6 @@ declare namespace BraintreeWeb { * @type {string} */ VERSION: string; - } - - /** - * @class - * @param {object} options 3D Secure {@link module:braintree-web/three-d-secure.create create} options - * @description Do not use this constructor directly. Use {@link module:braintree-web/three-d-secure.create|braintree.threeDSecure.create} instead. - * @classdesc This class represents a ThreeDSecure component produced by {@link module:braintree-web/three-d-secure.create|braintree.threeDSecure.create}. Instances of this class have a method for launching a 3D Secure authentication flow. - */ - export class ThreeDSecure { - /** - * @class - * @param {object} options 3D Secure {@link module:braintree-web/three-d-secure.create create} options - * @description Do not use this constructor directly. Use {@link module:braintree-web/three-d-secure.create|braintree.threeDSecure.create} instead. - * @classdesc This class represents a ThreeDSecure component produced by {@link module:braintree-web/three-d-secure.create|braintree.threeDSecure.create}. Instances of this class have a method for launching a 3D Secure authentication flow. - */ - constructor(options: any); - /** * @callback ThreeDSecure~addFrameCallback @@ -1329,7 +1205,7 @@ declare namespace BraintreeWeb { * } * }); */ - public verifyCard(options: { nonce: string, amount: number, addFrame: (err?: BraintreeError, iframe?: HTMLIFrameElement) => void, removeFrame: () => void }, callback: callback): void; + verifyCard(options: { nonce: string, amount: number, addFrame: (err?: BraintreeError, iframe?: HTMLIFrameElement) => void, removeFrame: () => void }, callback: callback): void; /** * Cancel the 3DS flow and return the verification payload if available. @@ -1349,7 +1225,7 @@ declare namespace BraintreeWeb { * verifyPayload.liabilityShiftPossible; // boolean * }); */ - public cancelVerifyCard(callback: callback): void; + cancelVerifyCard(callback: callback): void; /** * Cleanly tear down anything set up by {@link module:braintree-web/three-d-secure.create|create} @@ -1357,7 +1233,7 @@ declare namespace BraintreeWeb { * @param {errback} [callback] Called once teardown is complete. No data is returned if teardown completes successfully. * @returns {void} */ - public teardown(callback?: callback): void; + teardown(callback?: callback): void; } } @@ -1365,9 +1241,8 @@ declare namespace BraintreeWeb { * @module braintree-web/unionpay * @description This module allows you to accept UnionPay payments. *It is currently in beta and is subject to change.* */ -declare namespace BraintreeWeb { +declare namespace braintree { /** - * @typedef {object} UnionPay~tokenizePayload * @property {string} nonce The payment method nonce. * @property {string} type Always CreditCard. * @property {object} details Additional account details: @@ -1388,7 +1263,6 @@ declare namespace BraintreeWeb { } /** - * @typedef {object} UnionPay~enrollPayload * @property {string} enrollmentId UnionPay enrollment ID. This value should be passed to `tokenize`. * @property {boolean} smsCodeRequired UnionPay `smsCodeRequired` flag. *

true - the user will receive an SMS code that needs to be supplied for tokenization. @@ -1400,7 +1274,6 @@ declare namespace BraintreeWeb { } /** - * @typedef {object} UnionPay~fetchCapabilitiesPayload * @property {boolean} isUnionPay Determines if this card is a UnionPay card. * @property {boolean} isDebit Determines if this card is a debit card. This property is only present if `isUnionPay` is `true`. * @property {object} unionPay UnionPay specific properties. This property is only present if `isUnionPay` is `true`. @@ -1443,22 +1316,6 @@ declare namespace BraintreeWeb { * @type {string} */ VERSION: string; - } - - /** - * @class - * @param {object} options See {@link module:braintree-web/unionpay.create|unionpay.create}. - * @description You cannot use this constructor directly. Use {@link module:braintree-web/unionpay.create|braintree-web.unionpay.create} instead. - * @classdesc This class represents a UnionPay component. Instances of this class have methods for {@link UnionPay#fetchCapabilities fetching capabilities} of UnionPay cards, {@link UnionPay#enroll enrolling} a UnionPay card, and {@link UnionPay#tokenize tokenizing} a UnionPay card. - */ - export class UnionPay { - /** - * @class - * @param {object} options See {@link module:braintree-web/unionpay.create|unionpay.create}. - * @description You cannot use this constructor directly. Use {@link module:braintree-web/unionpay.create|braintree-web.unionpay.create} instead. - * @classdesc This class represents a UnionPay component. Instances of this class have methods for {@link UnionPay#fetchCapabilities fetching capabilities} of UnionPay cards, {@link UnionPay#enroll enrolling} a UnionPay card, and {@link UnionPay#tokenize tokenizing} a UnionPay card. - */ - constructor(options: any); /** * Fetches the capabilities of a card, including whether or not the SMS enrollment process is required. @@ -1531,7 +1388,7 @@ declare namespace BraintreeWeb { * }); * @returns {void} */ - public fetchCapabilities(options: { card: any, hostedFields: HostedFields }, callback: callback): void; + fetchCapabilities(options: { card: any, hostedFields: HostedFields }, callback: callback): void; /** * Enrolls a UnionPay card. Use {@link UnionPay#fetchCapabilities|fetchCapabilities} to determine if the SMS enrollment process is required. @@ -1594,7 +1451,7 @@ declare namespace BraintreeWeb { * }); * @returns {void} */ - public enroll(options: { card: any, hostedFields: HostedFields, mobile: any }, callback: callback): void; + enroll(options: { card: any, hostedFields: HostedFields, mobile: any }, callback: callback): void; /** * Tokenizes a UnionPay card and returns a nonce payload. @@ -1643,7 +1500,7 @@ declare namespace BraintreeWeb { * }); * @returns {void} */ - public tokenize(options: { card: any, hostedFields: HostedFields, enrollmentId: string, smsCode: string }, callback: callback): void; + tokenize(options: { card: any, hostedFields: HostedFields, enrollmentId: string, smsCode: string }, callback: callback): void; /** * Cleanly tear down anything set up by {@link module:braintree-web/unionpay.create|create}. This only needs to be called when using UnionPay with Hosted Fields. @@ -1659,8 +1516,7 @@ declare namespace BraintreeWeb { * }); * @returns {void} */ - public teardown(callback?: callback): void; - + teardown(callback?: callback): void; } /** @@ -1683,21 +1539,6 @@ declare namespace BraintreeWeb { * @type {string} */ VERSION: string; - } - - /** - * @class - * @param {object} options See {@link module:braintree-web/us-bank-account.create|us-bank-account.create}. - * @classdesc This class represents a US Bank Account component. Instances of this class can tokenize raw bank details or present a bank login. You cannot use this constructor directly. Use {@link module:braintree-web/us-bank-account.create|braintree.us-bank-account.create} instead. - */ - export class USBankAccount { - /** - * @class - * @param {object} options See {@link module:braintree-web/us-bank-account.create|us-bank-account.create}. - * @classdesc This class represents a US Bank Account component. Instances of this class can tokenize raw bank details or present a bank login. You cannot use this constructor directly. Use {@link module:braintree-web/us-bank-account.create|braintree.us-bank-account.create} instead. - */ - constructor(options: any) - /** * Tokenizes bank information to return a payment method nonce. You can tokenize bank details by providing information like account and routing numbers. You can also tokenize with a bank login UI that prompts the customer to log into their bank account. @@ -1778,7 +1619,7 @@ declare namespace BraintreeWeb { * }); * }); */ - public tokenize(options: { mandateText: string, bankDetails: any, bankLogin: any }, callback: callback): void; + tokenize(options: { mandateText: string, bankDetails: any, bankLogin: any }, callback: callback): void; /** * Cleanly tear down anything set up by {@link module:braintree-web/us-bank-account.create|create}. @@ -1786,77 +1627,53 @@ declare namespace BraintreeWeb { * @param {callback} [callback] Called once teardown is complete. No data is returned if teardown completes successfully. * @returns {void} */ - public teardown(callback?: callback): void; - - } - -} - -declare namespace BraintreeError { - /** - * Enum for {@link BraintreeError} types. - * @name BraintreeError.types - * @enum - * @readonly - * @memberof BraintreeError - * @property {string} CUSTOMER An error caused by the customer. - * @property {string} MERCHANT An error that is actionable by the merchant. - * @property {string} NETWORK An error due to a network problem. - * @property {string} INTERNAL An error caused by Braintree code. - * @property {string} UNKNOWN An error where the origin is unknown. - */ - export enum Types { - CUSTOMER, - MERCHANT, - NETWORK, - INTERNAL, - UNKNOWN + teardown(callback?: callback): void; } } -/** - * @class - * @global - * @param {object} options Construction options - * @classdesc This class is used to report error conditions, frequently as the first parameter to callbacks throughout the Braintree SDK. - * @description You cannot use this constructor directly. Interact with instances of this class through {@link callback callbacks}. - */ -declare class BraintreeError { - /** - * @class - * @global - * @param {object} options Construction options - * @classdesc This class is used to report error conditions, frequently as the first parameter to callbacks throughout the Braintree SDK. - * @description You cannot use this constructor directly. Interact with instances of this class through {@link callback callbacks}. - */ - constructor(options: any); +declare namespace braintree { + export namespace BraintreeError { + /** + * Enum for {@link BraintreeError} types. + * @name BraintreeError.types + * @enum + * @readonly + * @memberof BraintreeError + * @property {string} CUSTOMER An error caused by the customer. + * @property {string} MERCHANT An error that is actionable by the merchant. + * @property {string} NETWORK An error due to a network problem. + * @property {string} INTERNAL An error caused by Braintree code. + * @property {string} UNKNOWN An error where the origin is unknown. + */ + export type Types = "CUSTOMER" | "MERCHANT" | "NETWORK" | "INTERNAL" | "UNKNOWN"; + } - /** - * @type {string} - * @description A code that corresponds to specific errors. - */ - code: string; + export interface BraintreeError { + /** + * @type {string} + * @description A code that corresponds to specific errors. + */ + code: string; - /** - * @type {string} - * @description A short description of the error. - */ - message: string; + /** + * @type {string} + * @description A short description of the error. + */ + message: string; - /** - * @type {BraintreeError.types} - * @description The type of error. - */ - type: BraintreeError.Types; + /** + * @type {BraintreeError.types} + * @description The type of error. + */ + type: BraintreeError.Types; - /** - * @type {object=} - * @description Additional information about the error, such as an underlying network error response. - */ - details: any; -} + /** + * @type {object=} + * @description Additional information about the error, such as an underlying network error response. + */ + details: any; + } -declare namespace BraintreeWeb { /** * @global * @callback callback @@ -1895,39 +1712,40 @@ declare namespace BraintreeWeb { * braintreeClient.create(...); * }); */ -interface BraintreeStatic { +declare namespace braintree { /** @type {module:braintree-web/client} */ - client: BraintreeWeb.Client; + export var client: braintree.Client; /** @type {module:braintree-web/paypal} */ - paypal: BraintreeWeb.PayPal; + export var paypal: braintree.PayPal; /** @type {module:braintree-web/hosted-fields} */ - hostedFields: BraintreeWeb.HostedFields; + export var hostedFields: braintree.HostedFields; /** @type {module:braintree-web/three-d-secure} */ - threeDSecure: BraintreeWeb.ThreeDSecure; + export var threeDSecure: braintree.ThreeDSecure; /** @type {module:braintree-web/data-collector} */ - dataCollector: BraintreeWeb.DataCollector; + export var dataCollector: braintree.DataCollector; /** @type {module:braintree-web/american-express} */ - americanExpress: BraintreeWeb.AmericanExpress; + export var americanExpress: braintree.AmericanExpress; /** @type {module:braintree-web/unionpay} */ - unionpay: BraintreeWeb.UnionPay; + export var unionpay: braintree.UnionPay; /** @type {module:braintree-web/apple-pay} */ - applePay: BraintreeWeb.ApplePay; + export var applePay: braintree.ApplePay; - /** @type {module:braintree-web/us-bank-account} */ - usBankAccount: BraintreeWeb.USBankAccount; + /** @type {module:braintree-web/us-bank-account} */ + export var usBankAccount: braintree.USBankAccount; /** * @description The current version of the SDK, i.e. `3.0.2`. * @type {string} */ - VERSION: string; + export var VERSION: string; } -declare var braintree: BraintreeStatic; +export = braintree; +export as namespace braintree; diff --git a/types/braintree-web/test/node.ts b/types/braintree-web/test/node.ts new file mode 100644 index 0000000000..9eed5b228d --- /dev/null +++ b/types/braintree-web/test/node.ts @@ -0,0 +1,440 @@ +import * as braintree from 'braintree-web'; + +let version: string = braintree.VERSION; + +let clientToken: string = "eyJ2ZXJzaW9uIjoyLCJhdXRob3JpemF0aW9uRmluZ2VycHJpbnQiOiI0YjlhYzVmYmI4ZTNkYzQzMmFkZjJhNzBlNjZlMWNjY2M5ODRkYzE4ZTM4YmY4NjYzZTM5NjM3NWZjYmQzY2U5fGNyZWF0ZWRfYXQ9MjAxNi0wOS0wOFQwNTowMzo0MC4xNjk1NTUwMzUrMDAwMFx1MDAyNm1lcmNoYW50X2lkPTM0OHBrOWNnZjNiZ3l3MmJcdTAwMjZwdWJsaWNfa2V5PTJuMjQ3ZHY4OWJxOXZtcHIiLCJjb25maWdVcmwiOiJodHRwczovL2FwaS5zYW5kYm94LmJyYWludHJlZWdhdGV3YXkuY29tOjQ0My9tZXJjaGFudHMvMzQ4cGs5Y2dmM2JneXcyYi9jbGllbnRfYXBpL3YxL2NvbmZpZ3VyYXRpb24iLCJjaGFsbGVuZ2VzIjpbXSwiZW52aXJvbm1lbnQiOiJzYW5kYm94IiwiY2xpZW50QXBpVXJsIjoiaHR0cHM6Ly9hcGkuc2FuZGJveC5icmFpbnRyZWVnYXRld2F5LmNvbTo0NDMvbWVyY2hhbnRzLzM0OHBrOWNnZjNiZ3l3MmIvY2xpZW50X2FwaSIsImFzc2V0c1VybCI6Imh0dHBzOi8vYXNzZXRzLmJyYWludHJlZWdhdGV3YXkuY29tIiwiYXV0aFVybCI6Imh0dHBzOi8vYXV0aC52ZW5tby5zYW5kYm94LmJyYWludHJlZWdhdGV3YXkuY29tIiwiYW5hbHl0aWNzIjp7InVybCI6Imh0dHBzOi8vY2xpZW50LWFuYWx5dGljcy5zYW5kYm94LmJyYWludHJlZWdhdGV3YXkuY29tLzM0OHBrOWNnZjNiZ3l3MmIifSwidGhyZWVEU2VjdXJlRW5hYmxlZCI6dHJ1ZSwicGF5cGFsRW5hYmxlZCI6dHJ1ZSwicGF5cGFsIjp7ImRpc3BsYXlOYW1lIjoiQWNtZSBXaWRnZXRzLCBMdGQuIChTYW5kYm94KSIsImNsaWVudElkIjpudWxsLCJwcml2YWN5VXJsIjoiaHR0cDovL2V4YW1wbGUuY29tL3BwIiwidXNlckFncmVlbWVudFVybCI6Imh0dHA6Ly9leGFtcGxlLmNvbS90b3MiLCJiYXNlVXJsIjoiaHR0cHM6Ly9hc3NldHMuYnJhaW50cmVlZ2F0ZXdheS5jb20iLCJhc3NldHNVcmwiOiJodHRwczovL2NoZWNrb3V0LnBheXBhbC5jb20iLCJkaXJlY3RCYXNlVXJsIjpudWxsLCJhbGxvd0h0dHAiOnRydWUsImVudmlyb25tZW50Tm9OZXR3b3JrIjp0cnVlLCJlbnZpcm9ubWVudCI6Im9mZmxpbmUiLCJ1bnZldHRlZE1lcmNoYW50IjpmYWxzZSwiYnJhaW50cmVlQ2xpZW50SWQiOiJtYXN0ZXJjbGllbnQzIiwiYmlsbGluZ0FncmVlbWVudHNFbmFibGVkIjp0cnVlLCJtZXJjaGFudEFjY291bnRJZCI6ImFjbWV3aWRnZXRzbHRkc2FuZGJveCIsImN1cnJlbmN5SXNvQ29kZSI6IlVTRCJ9LCJjb2luYmFzZUVuYWJsZWQiOmZhbHNlLCJtZXJjaGFudElkIjoiMzQ4cGs5Y2dmM2JneXcyYiIsInZlbm1vIjoib2ZmIn0="; + +braintree.client.create({ + authorization: clientToken +}, function (error: braintree.BraintreeError, clientInstance: any) { + + var form: HTMLFormElement = document.getElementById('my-form-id') as HTMLFormElement; + var data: { creditCard: braintree.CreditCardInfo } = { + creditCard: { + number: form['cc-number'].value, + cvv: form['cc-cvv'].value, + expirationDate: form['cc-date'].value, + billingAddress: { + postalCode: form['cc-postal'].value + } + } + }; + + clientInstance.request({ + endpoint: 'payment_methods/credit_cards', + method: 'post', + data: data + }, function (requestErr: braintree.BraintreeError, response: { creditCards: any[]; }) { + if (requestErr) { throw new Error(requestErr.message); } + + console.log('Got nonce:', response.creditCards[0].nonce); + }); + + braintree.hostedFields.create({ + client: clientInstance, + styles: { + 'input': { + 'font-size': '16pt', + 'color': '#3A3A3A' + }, + + '.number': { + 'font-family': 'monospace' + }, + '.valid': { + 'color': 'green' + } + }, + fields: { + number: { + selector: '#card-number' + }, + cvv: { + selector: '#cvv', + type: 'password' + }, + expirationMonth: { + selector: '#expiration-month', + select: { + options: ["01 - Jan", "02 - Feb", "03 - Mar", "04 - Apr", "05 - May", "06 - Jun", "07 - Jul", "08 - Aug", "09 - Sep", "10 - Oct", "11 - Nov", "12 - Dec"] + } + }, + expirationYear: { + selector: '#expiration-year', + select: true + } + } + }, function (hostedFieldsErr?: braintree.BraintreeError, hostedFieldsInstance?: any) { + + if (hostedFieldsErr) { + // Handle error in Hosted Fields creation + console.log(`Error Code: ${error.code}, Type: ${error.type}, Message: ${error.message}, Details: ${error.details}`); + return; + } + + let form = new HTMLFormElement(); + + form.addEventListener('submit', function (event: Event) { + event.preventDefault(); + + hostedFieldsInstance.tokenize(function (tokenizeErr: braintree.BraintreeError, payload: braintree.HostedFieldsTokenizePayload) { + if (tokenizeErr) { + // Handle error in Hosted Fields tokenization + switch (tokenizeErr.code) { + case 'HOSTED_FIELDS_FIELDS_EMPTY': + console.error('All fields are empty! Please fill out the form.'); + break; + case 'HOSTED_FIELDS_FIELDS_INVALID': + console.error('Some fields are invalid:', tokenizeErr.details.invalidFieldKeys); + break; + case 'HOSTED_FIELDS_FAILED_TOKENIZATION': + console.error('Tokenization failed server side. Is the card valid?'); + break; + case 'HOSTED_FIELDS_TOKENIZATION_NETWORK_ERROR': + console.error('Network error occurred when tokenizing.'); + break; + default: + console.error('Something bad happened!', tokenizeErr); + } + return; + } + + // Put `payload.nonce` into the `payment-method-nonce` input, and then + // submit the form. Alternatively, you could send the nonce to your server + // with AJAX. + (document.querySelector('input[name="payment-method-nonce"]') as HTMLInputElement).value = payload.nonce; + form.submit(); + }); + }, false); + + hostedFieldsInstance.on('focus', function (event: braintree.HostedFieldsStateObject) { + console.log(event.emittedBy, 'has been focused'); + }); + + hostedFieldsInstance.teardown(function (teardownErr: braintree.BraintreeError) { + if (teardownErr) { + console.error('Could not tear down Hosted Fields!'); + } else { + console.info('Hosted Fields has been torn down!'); + } + }); + + hostedFieldsInstance.tokenize({ + vault: true + }, function (tokenizeErr: braintree.BraintreeError, payload: braintree.HostedFieldsTokenizePayload) { + if (tokenizeErr) { + console.error(tokenizeErr); + } else { + console.log('Got nonce:', payload.nonce); + } + }); + + hostedFieldsInstance.addClass('number', 'custom-class', function (addClassErr: braintree.BraintreeError) { + if (addClassErr) { + console.error(addClassErr); + } + }); + + hostedFieldsInstance.addClass('number', 'custom-class', function (addClassErr: braintree.BraintreeError) { + if (addClassErr) { + console.error(addClassErr); + return; + } + + // some time later... + hostedFieldsInstance.removeClass('number', 'custom-class'); + }); + + hostedFieldsInstance.setPlaceholder('number', '4111 1111 1111 1111', function (placeholderErr: braintree.BraintreeError) { + if (placeholderErr) { + console.error(placeholderErr); + } + }); + + hostedFieldsInstance.on('cardTypeChange', function (event: braintree.HostedFieldsStateObject) { + // Update the placeholder value if there is only one possible card type + if (event.cards.length === 1) { + braintree.hostedFields.setPlaceholder('cvv', event.cards[0].code.name, function (placeholderErr: braintree.BraintreeError) { + if (placeholderErr) { + // Handle errors, such as invalid field name + console.error(placeholderErr); + } + }); + } + }); + + hostedFieldsInstance.clear('number', function (clearErr: braintree.BraintreeError) { + if (clearErr) { + console.error(clearErr); + } + }); + + hostedFieldsInstance.clear('number'); + hostedFieldsInstance.clear('cvv'); + hostedFieldsInstance.clear('expirationDate'); + + var state = braintree.hostedFields.getState(); + + var formValid = Object.keys(state.fields).every(function (key) { + return state.fields[key].isValid; + }); + }); + + braintree.applePay.create({ client: clientInstance }, function (createErr?: braintree.BraintreeError, applePayInstance?: any) { + if (createErr) { + // Handle error in client creation + console.log(`Error Code: ${error.code}, Type: ${error.type}, Message: ${error.message}, Details: ${error.details}`); + + return; + } + + let request = { + countryCode: 'US', + currencyCode: 'USD', + supportedNetworks: ['visa', 'masterCard'], + merchantCapabilities: ['supports3DS'], + total: { label: 'Your Label', amount: '10.00' }, + }; + + var paymentRequest = braintree.applePay.createPaymentRequest(request); + + console.log(paymentRequest); + // { total: { }, countryCode: 'US', currencyCode: 'USD', merchantCapabilities: [ ], supportedNetworks: [ ] } + }); + + braintree.applePay.create({ client: clientInstance }, function (createErr, applePayInstance) { + let request = { + countryCode: 'US', + currencyCode: 'USD', + supportedNetworks: ['visa', 'masterCard'], + merchantCapabilities: ['supports3DS'], + total: { label: 'Your Label', amount: '10.00' }, + }; + + var session = new braintree.ApplePaySession(1, request); + + session.onvalidatemerchant = function (event: { validationURL: string }) { + braintree.applePay.performValidation({ + validationURL: event.validationURL + }, function (err, validationData) { + if (err) { + console.error(err); + session.abort(); + return; + } + session.completeMerchantValidation(validationData); + }); + }; + }); + + braintree.applePay.create({ client: clientInstance }, function (createErr, applePayInstance) { + let request = { + countryCode: 'US', + currencyCode: 'USD', + supportedNetworks: ['visa', 'masterCard'], + merchantCapabilities: ['supports3DS'], + total: { label: 'Your Label', amount: '10.00' }, + }; + + var session = new braintree.ApplePaySession(1, request); + + session.onpaymentauthorized = function (event) { + braintree.applePay.tokenize({ + token: event.payment.token + }, function (err, tokenizedPayload) { + if (err) { + session.completePayment(braintree.ApplePayStatusCodes.STATUS_FAILURE); + return; + } + session.completePayment(braintree.ApplePayStatusCodes.STATUS_SUCCESS); + + // Send the tokenizedPayload to your server. + }); + }; + }); + + braintree.paypal.create({ + client: clientInstance + }, function (createErr, paypalInstance) { + if (createErr) { + if (createErr.code === 'PAYPAL_BROWSER_NOT_SUPPORTED') { + console.error('This browser is not supported.'); + } else { + console.error('Error!', createErr); + } + } + + let button = new HTMLButtonElement(); + + button.addEventListener('click', function () { + // Disable the button so that we don't attempt to open multiple popups. + button.setAttribute('disabled', 'disabled'); + + // Because PayPal tokenization opens a popup, this must be called + // as a result of a user action, such as a button click. + paypalInstance.tokenize({ + flow: 'vault' // Required + // Any other tokenization options + }, function (tokenizeErr: braintree.BraintreeError, payload: braintree.PayPalTokenizePayload) { + button.removeAttribute('disabled'); + + if (tokenizeErr) { + // Handle tokenization errors or premature flow closure + + switch (tokenizeErr.code) { + case 'PAYPAL_POPUP_CLOSED': + console.error('Customer closed PayPal popup.'); + break; + case 'PAYPAL_ACCOUNT_TOKENIZATION_FAILED': + console.error('PayPal tokenization failed. See details:', tokenizeErr.details); + break; + case 'PAYPAL_FLOW_FAILED': + console.error('Unable to initialize PayPal flow. Are your options correct?', tokenizeErr.details); + break; + default: + console.error('Error!', tokenizeErr); + } + } else { + // Submit payload.nonce to your server + } + }); + }); + }); + + braintree.unionpay.create({ client: clientInstance }, function (createErr, unionpayInstance) { + if (createErr) { + console.error(createErr); + return; + } + + unionpayInstance.fetchCapabilities({ + card: { + number: '4111111111111111' + } + }, function (fetchErr: braintree.BraintreeError, cardCapabilities: braintree.UnionPayFetchCapabilitiesPayload) { + if (fetchErr) { + console.error(fetchErr); + return; + } + + if (cardCapabilities.isUnionPay) { + if (cardCapabilities.unionPay && !cardCapabilities.unionPay.isSupported) { + // Braintree cannot process this UnionPay card. + // Ask the user for a different card. + return; + } + + if (cardCapabilities.isDebit) { + // CVV and expiration date are not required + } else { + // CVV and expiration date are required + } + + // Show mobile phone number field for enrollment + } + }); + + unionpayInstance.enroll({ + card: { + number: '4111111111111111', + expirationMonth: '12', + expirationYear: '2038' + }, + mobile: { + countryCode: '62', + number: '111111111111' + } + }, function (enrollErr: braintree.BraintreeError, response: braintree.UnionPayEnrollPayload) { + if (enrollErr) { + console.error(enrollErr); + return; + } + + if (response.smsCodeRequired) { + // If smsCodeRequired, wait for SMS auth code from customer + // Then use response.enrollmentId during {@link UnionPay#tokenize} + } else { + // SMS code is not required from the user. + // {@link UnionPay#tokenize} can be called immediately + } + }); + + let enrollResponse: { + enrollmentId: string + }; + + unionpayInstance.tokenize({ + card: { + number: '4111111111111111', + expirationMonth: '12', + expirationYear: '2038', + cvv: '123' + }, + enrollmentId: enrollResponse.enrollmentId, // Returned from enroll + smsCode: '11111' // Received by customer's phone, if SMS enrollment was required. Otherwise it should be omitted + }, function (tokenizeErr: braintree.BraintreeError, response: braintree.UnionPayTokenizePayload) { + if (tokenizeErr) { + console.error(tokenizeErr); + return; + } + + // Send response.nonce to your server + }); + + unionpayInstance.teardown(function (teardownErr: braintree.BraintreeError) { + if (teardownErr) { + console.error('Could not tear down UnionPay.'); + } else { + console.log('UnionPay has been torn down.'); + } + }); + }); +}); + +let existingNonce = "fake-valid-nonce"; +let submitNonceToServer: (nonce: string) => void; + +braintree.threeDSecure.verifyCard({ + nonce: existingNonce, + amount: 123.45, + addFrame: function (err, iframe) { + // Set up your UI and add the iframe. + let my3DSContainer = document.createElement('div'); + my3DSContainer.appendChild(iframe); + document.body.appendChild(my3DSContainer); + }, + removeFrame: function () { + let my3DSContainer = document.createElement('div'); + + // Remove UI that you added in addFrame. + document.body.removeChild(my3DSContainer); + } +}, function (err: braintree.BraintreeError, payload: braintree.ThreeDSecureVerifyPayload) { + if (err) { + console.error(err); + return; + } + + if (payload.liabilityShifted) { + // Liablity has shifted + submitNonceToServer(payload.nonce); + } else if (payload.liabilityShiftPossible) { + // Liablity may still be shifted + // Decide if you want to submit the nonce + } else { + // Liablity has not shifted and will not shift + // Decide if you want to submit the nonce + } +}); + +braintree.threeDSecure.cancelVerifyCard(function (err: braintree.BraintreeError, verifyPayload: braintree.ThreeDSecureVerifyPayload) { + if (err) { + // Handle error + console.log(err.message); // No verification payload available + return; + } + + verifyPayload.nonce; // The nonce returned from the 3ds lookup call + verifyPayload.liabilityShifted; // boolean + verifyPayload.liabilityShiftPossible; // boolean +}); diff --git a/types/braintree-web/braintree-web-tests.ts b/types/braintree-web/test/web.ts similarity index 86% rename from types/braintree-web/braintree-web-tests.ts rename to types/braintree-web/test/web.ts index c9aee724c0..22073363d4 100644 --- a/types/braintree-web/braintree-web-tests.ts +++ b/types/braintree-web/test/web.ts @@ -4,10 +4,10 @@ let clientToken: string = "eyJ2ZXJzaW9uIjoyLCJhdXRob3JpemF0aW9uRmluZ2VycHJpbnQiO braintree.client.create({ authorization: clientToken -}, function (error: BraintreeError, clientInstance: any) { +}, function (error: braintree.BraintreeError, clientInstance: any) { var form: HTMLFormElement = document.getElementById('my-form-id') as HTMLFormElement; - var data: { creditCard: BraintreeWeb.CreditCardInfo } = { + var data: { creditCard: braintree.CreditCardInfo } = { creditCard: { number: form['cc-number'].value, cvv: form['cc-cvv'].value, @@ -22,7 +22,7 @@ braintree.client.create({ endpoint: 'payment_methods/credit_cards', method: 'post', data: data - }, function (requestErr: BraintreeError, response: { creditCards: any[]; }) { + }, function (requestErr: braintree.BraintreeError, response: { creditCards: any[]; }) { if (requestErr) { throw new Error(requestErr.message); } console.log('Got nonce:', response.creditCards[0].nonce); @@ -62,7 +62,7 @@ braintree.client.create({ select: true } } - }, function (hostedFieldsErr?: BraintreeError, hostedFieldsInstance?: any) { + }, function (hostedFieldsErr?: braintree.BraintreeError, hostedFieldsInstance?: any) { if (hostedFieldsErr) { // Handle error in Hosted Fields creation @@ -75,7 +75,7 @@ braintree.client.create({ form.addEventListener('submit', function (event: Event) { event.preventDefault(); - hostedFieldsInstance.tokenize(function (tokenizeErr: BraintreeError, payload: BraintreeWeb.HostedFieldsTokenizePayload) { + hostedFieldsInstance.tokenize(function (tokenizeErr: braintree.BraintreeError, payload: braintree.HostedFieldsTokenizePayload) { if (tokenizeErr) { // Handle error in Hosted Fields tokenization switch (tokenizeErr.code) { @@ -105,11 +105,11 @@ braintree.client.create({ }); }, false); - hostedFieldsInstance.on('focus', function (event: BraintreeWeb.HostedFieldsStateObject) { + hostedFieldsInstance.on('focus', function (event: braintree.HostedFieldsStateObject) { console.log(event.emittedBy, 'has been focused'); }); - hostedFieldsInstance.teardown(function (teardownErr: BraintreeError) { + hostedFieldsInstance.teardown(function (teardownErr: braintree.BraintreeError) { if (teardownErr) { console.error('Could not tear down Hosted Fields!'); } else { @@ -119,7 +119,7 @@ braintree.client.create({ hostedFieldsInstance.tokenize({ vault: true - }, function (tokenizeErr: BraintreeError, payload: BraintreeWeb.HostedFieldsTokenizePayload) { + }, function (tokenizeErr: braintree.BraintreeError, payload: braintree.HostedFieldsTokenizePayload) { if (tokenizeErr) { console.error(tokenizeErr); } else { @@ -127,13 +127,13 @@ braintree.client.create({ } }); - hostedFieldsInstance.addClass('number', 'custom-class', function (addClassErr: BraintreeError) { + hostedFieldsInstance.addClass('number', 'custom-class', function (addClassErr: braintree.BraintreeError) { if (addClassErr) { console.error(addClassErr); } }); - hostedFieldsInstance.addClass('number', 'custom-class', function (addClassErr: BraintreeError) { + hostedFieldsInstance.addClass('number', 'custom-class', function (addClassErr: braintree.BraintreeError) { if (addClassErr) { console.error(addClassErr); return; @@ -143,16 +143,16 @@ braintree.client.create({ hostedFieldsInstance.removeClass('number', 'custom-class'); }); - hostedFieldsInstance.setPlaceholder('number', '4111 1111 1111 1111', function (placeholderErr: BraintreeError) { + hostedFieldsInstance.setPlaceholder('number', '4111 1111 1111 1111', function (placeholderErr: braintree.BraintreeError) { if (placeholderErr) { console.error(placeholderErr); } }); - hostedFieldsInstance.on('cardTypeChange', function (event: BraintreeWeb.HostedFieldsStateObject) { + hostedFieldsInstance.on('cardTypeChange', function (event: braintree.HostedFieldsStateObject) { // Update the placeholder value if there is only one possible card type if (event.cards.length === 1) { - braintree.hostedFields.setPlaceholder('cvv', event.cards[0].code.name, function (placeholderErr: BraintreeError) { + braintree.hostedFields.setPlaceholder('cvv', event.cards[0].code.name, function (placeholderErr: braintree.BraintreeError) { if (placeholderErr) { // Handle errors, such as invalid field name console.error(placeholderErr); @@ -161,7 +161,7 @@ braintree.client.create({ } }); - hostedFieldsInstance.clear('number', function (clearErr: BraintreeError) { + hostedFieldsInstance.clear('number', function (clearErr: braintree.BraintreeError) { if (clearErr) { console.error(clearErr); } @@ -178,7 +178,7 @@ braintree.client.create({ }); }); - braintree.applePay.create({ client: clientInstance }, function (createErr?: BraintreeError, applePayInstance?: any) { + braintree.applePay.create({ client: clientInstance }, function (createErr?: braintree.BraintreeError, applePayInstance?: any) { if (createErr) { // Handle error in client creation console.log(`Error Code: ${error.code}, Type: ${error.type}, Message: ${error.message}, Details: ${error.details}`); @@ -209,7 +209,7 @@ braintree.client.create({ total: { label: 'Your Label', amount: '10.00' }, }; - var session = new ApplePaySession(1, request); + var session = new braintree.ApplePaySession(1, request); session.onvalidatemerchant = function (event: { validationURL: string }) { braintree.applePay.performValidation({ @@ -234,17 +234,17 @@ braintree.client.create({ total: { label: 'Your Label', amount: '10.00' }, }; - var session = new ApplePaySession(1, request); + var session = new braintree.ApplePaySession(1, request); session.onpaymentauthorized = function (event) { braintree.applePay.tokenize({ token: event.payment.token }, function (err, tokenizedPayload) { if (err) { - session.completePayment(ApplePayStatusCodes.STATUS_FAILURE); + session.completePayment(braintree.ApplePayStatusCodes.STATUS_FAILURE); return; } - session.completePayment(ApplePayStatusCodes.STATUS_SUCCESS); + session.completePayment(braintree.ApplePayStatusCodes.STATUS_SUCCESS); // Send the tokenizedPayload to your server. }); @@ -273,7 +273,7 @@ braintree.client.create({ paypalInstance.tokenize({ flow: 'vault' // Required // Any other tokenization options - }, function (tokenizeErr: BraintreeError, payload: BraintreeWeb.PayPalTokenizePayload) { + }, function (tokenizeErr: braintree.BraintreeError, payload: braintree.PayPalTokenizePayload) { button.removeAttribute('disabled'); if (tokenizeErr) { @@ -309,7 +309,7 @@ braintree.client.create({ card: { number: '4111111111111111' } - }, function (fetchErr: BraintreeError, cardCapabilities: BraintreeWeb.UnionPayFetchCapabilitiesPayload) { + }, function (fetchErr: braintree.BraintreeError, cardCapabilities: braintree.UnionPayFetchCapabilitiesPayload) { if (fetchErr) { console.error(fetchErr); return; @@ -342,7 +342,7 @@ braintree.client.create({ countryCode: '62', number: '111111111111' } - }, function (enrollErr: BraintreeError, response: BraintreeWeb.UnionPayEnrollPayload) { + }, function (enrollErr: braintree.BraintreeError, response: braintree.UnionPayEnrollPayload) { if (enrollErr) { console.error(enrollErr); return; @@ -370,7 +370,7 @@ braintree.client.create({ }, enrollmentId: enrollResponse.enrollmentId, // Returned from enroll smsCode: '11111' // Received by customer's phone, if SMS enrollment was required. Otherwise it should be omitted - }, function (tokenizeErr: BraintreeError, response: BraintreeWeb.UnionPayTokenizePayload) { + }, function (tokenizeErr: braintree.BraintreeError, response: braintree.UnionPayTokenizePayload) { if (tokenizeErr) { console.error(tokenizeErr); return; @@ -379,7 +379,7 @@ braintree.client.create({ // Send response.nonce to your server }); - unionpayInstance.teardown(function (teardownErr: BraintreeError) { + unionpayInstance.teardown(function (teardownErr: braintree.BraintreeError) { if (teardownErr) { console.error('Could not tear down UnionPay.'); } else { @@ -407,7 +407,7 @@ braintree.threeDSecure.verifyCard({ // Remove UI that you added in addFrame. document.body.removeChild(my3DSContainer); } -}, function (err: BraintreeError, payload: BraintreeWeb.ThreeDSecureVerifyPayload) { +}, function (err: braintree.BraintreeError, payload: braintree.ThreeDSecureVerifyPayload) { if (err) { console.error(err); return; @@ -425,7 +425,7 @@ braintree.threeDSecure.verifyCard({ } }); -braintree.threeDSecure.cancelVerifyCard(function (err: BraintreeError, verifyPayload: BraintreeWeb.ThreeDSecureVerifyPayload) { +braintree.threeDSecure.cancelVerifyCard(function (err: braintree.BraintreeError, verifyPayload: braintree.ThreeDSecureVerifyPayload) { if (err) { // Handle error console.log(err.message); // No verification payload available @@ -435,4 +435,4 @@ braintree.threeDSecure.cancelVerifyCard(function (err: BraintreeError, verifyPay verifyPayload.nonce; // The nonce returned from the 3ds lookup call verifyPayload.liabilityShifted; // boolean verifyPayload.liabilityShiftPossible; // boolean -}); \ No newline at end of file +}); diff --git a/types/braintree-web/tsconfig.json b/types/braintree-web/tsconfig.json index abc64cd9c3..d326f77f12 100644 --- a/types/braintree-web/tsconfig.json +++ b/types/braintree-web/tsconfig.json @@ -18,6 +18,7 @@ }, "files": [ "index.d.ts", - "braintree-web-tests.ts" + "test/web.ts", + "test/node.ts" ] -} \ No newline at end of file +} diff --git a/types/bson/index.d.ts b/types/bson/index.d.ts index 517ed8ede9..e34462b2b7 100644 --- a/types/bson/index.d.ts +++ b/types/bson/index.d.ts @@ -68,6 +68,8 @@ export class ObjectId { static isValid(id: number | string | ObjectId): boolean; constructor(id?: number | string | ObjectId); + toHexString(): string; + getTimestamp(): Date; } export type ObjectID = ObjectId; export class BSONRegExp { diff --git a/types/bunyan-blackhole/bunyan-blackhole-tests.ts b/types/bunyan-blackhole/bunyan-blackhole-tests.ts index ef2096a4c8..553d6f52ea 100644 --- a/types/bunyan-blackhole/bunyan-blackhole-tests.ts +++ b/types/bunyan-blackhole/bunyan-blackhole-tests.ts @@ -1,8 +1,6 @@ import blackhole = require("bunyan-blackhole"); - - -var logsLaboursLost = blackhole("lost"); +const logsLaboursLost = blackhole("lost"); const rotten = new Error("Something is rotten in the state of Denmark"); @@ -20,7 +18,5 @@ logsLaboursLost.info({play: "Much Ado About Nothing"}, "Let me be that I am and logsLaboursLost.warn({play: "All's Well That Ends Well"}, "Love all, trust a few, do wrong to none"); logsLaboursLost.error({play: "All's Well That Ends Well"}, "Love all, trust a few, do wrong to none"); -var hamlet = logsLaboursLost.child({play: "Hamlet"}); +const hamlet = logsLaboursLost.child({play: "Hamlet"}); hamlet.info({character: "Polonius"}, "Though this be madness, yet there is method in't"); - - diff --git a/types/canvas-gauges/index.d.ts b/types/canvas-gauges/index.d.ts index 6ba360a7ea..e5b4f69047 100644 --- a/types/canvas-gauges/index.d.ts +++ b/types/canvas-gauges/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for canvas-gauges v2.0.8 +// Type definitions for canvas-gauges v2.1.3 // Project: https://github.com/Mikhus/canvas-gauges // Definitions by: Mikhus // Definitions: https://github.com/Mikhus/DefinitelyTyped @@ -20,6 +20,10 @@ declare namespace CanvasGauges { color: string } + export interface EventListeners { + [key: string]: Function|[Function] + } + export type MajorTicks = string[]|number[]; export interface GenericOptions { @@ -30,6 +34,7 @@ declare namespace CanvasGauges { maxValue?: number, value?: number, units?: string|boolean, + exactTicks?: boolean, majorTicks?: MajorTicks, minorTicks?: number, strokeTicks?: boolean, @@ -37,6 +42,8 @@ declare namespace CanvasGauges { animateOnInit?: boolean, title?: string|boolean, borders?: boolean, + numbersMargin?: number, + listeners?: EventListeners, valueInt?: number, valueDec?: number, majorTicksInt?: number, @@ -45,6 +52,7 @@ declare namespace CanvasGauges { animationDuration?: number, animationRule?: string|AnimationRule, colorPlate?: string, + colorPlateEnd?: string, colorMajorTicks?: string, colorMinorTicks?: string, colorTitle?: string, @@ -67,6 +75,26 @@ declare namespace CanvasGauges { colorValueBoxShadow?: string, colorNeedleShadowUp?: string, colorNeedleShadowDown?: string, + colorBarStroke?: string, + colorBar?: string, + colorBarProgress?: string, + colorBarShadow?: string, + fontNumbers?: string, + fontTitle?: string, + fontUnits?: string, + fontValue?: string, + fontTitleSize?: number, + fontValueSize?: number, + fontUnitsSize?: number, + fontNumbersSize?: number, + fontTitleStyle?: FontStyle, + fontValueStyle?: FontStyle, + fontUnitsStyle?: FontStyle, + fontNumbersStyle?: FontStyle, + fontTitleWeight?: FontWeight, + fontValueWeight?: FontWeight, + fontUnitsWeight?: FontWeight, + fontNumbersWeight?: FontWeight, needle?: boolean, needleShadow?: boolean, needleType?: string, @@ -85,22 +113,10 @@ declare namespace CanvasGauges { valueBoxBorderRadius?: number, highlights?: Highlight[], highlightsWidth?: number, - fontNumbers?: string, - fontTitle?: string, - fontUnits?: string, - fontValue?: string, - fontTitleSize?: number, - fontValueSize?: number, - fontUnitsSize?: number, - fontNumbersSize?: number, - fontTitleStyle?: FontStyle, - fontValueStyle?: FontStyle, - fontUnitsStyle?: FontStyle, - fontNumbersStyle?: FontStyle, - fontTitleWeight?: FontWeight, - fontValueWeight?: FontWeight, - fontUnitsWeight?: FontWeight, - fontNumbersWeight?: FontWeight + barWidth?: number, + barStrokeWidth?: number, + barProgress?: boolean, + barShadow?: number } export interface RadialGaugeOptions extends GenericOptions { @@ -113,19 +129,14 @@ declare namespace CanvasGauges { needleCircleSize?: number, needleCircleInner?: boolean, needleCircleOuter?: boolean, - animationTarget?: string + animationTarget?: string, + useMinPath?: boolean } export interface LinearGaugeOptions extends GenericOptions { borderRadius?: number, barBeginCircle?: number, - barWidth?: number, - barStrokeWidth?: number, - barProgress?: boolean, - colorBar?: string, colorBarEnd?: string, - colorBarStroke?: string, - colorBarProgress?: string, colorBarProgressEnd?: string, tickSide?: string, needleSide?: string, @@ -230,6 +241,7 @@ declare namespace CanvasGauges { public canvas: SmartCanvas; public animation: Animation; public value: number; + public static readonly version: number; constructor(options: GenericOptions); @@ -238,6 +250,8 @@ declare namespace CanvasGauges { public abstract draw(): BaseGauge; public static initialize(type: string, options: GenericOptions): any; + public static fromElement(element: HTMLElement): any; + public static ensureValue(value: number): number; } export class RadialGauge extends BaseGauge { diff --git a/types/chai-subset/chai-subset-tests.ts b/types/chai-subset/chai-subset-tests.ts index 33cf036cf8..717f86cb33 100644 --- a/types/chai-subset/chai-subset-tests.ts +++ b/types/chai-subset/chai-subset-tests.ts @@ -1,14 +1,11 @@ - - import chai = require('chai'); import chaiSubset = require('chai-subset'); chai.use(chaiSubset); -var expect = chai.expect; -var assert = chai.assert; +const { assert, expect } = chai; function test_containSubset() { - var obj = { + const obj = { a: 'b', c: 'd', e: { @@ -34,7 +31,7 @@ function test_containSubset() { } function test_notContainSubset() { - var obj = { + const obj = { a: 'b', c: 'd', e: { @@ -50,7 +47,7 @@ function test_notContainSubset() { } function test_arrayContainSubset() { - var list = [{a: 'a', b: 'b'}, {v: 'f', d: {z: 'g'}} ]; + const list = [{a: 'a', b: 'b'}, {v: 'f', d: {z: 'g'}} ]; expect(list).to.containSubset([{a: 'a', b: 'b'}]); list.should.containSubset([{a: 'a', b: 'b'}]); @@ -58,7 +55,7 @@ function test_arrayContainSubset() { } function test_arrayNotContainSubset() { - var list = [{a: 'a', b: 'b'}, {v: 'f', d: {z: 'g'}} ]; + const list = [{a: 'a', b: 'b'}, {v: 'f', d: {z: 'g'}} ]; expect(list).not.to.containSubset([{a: 'a', b: 'bd'}]); list.should.not.containSubset([{a: 'a', b: 'bd'}]); diff --git a/types/charm/charm-tests.ts b/types/charm/charm-tests.ts index afc8cbc3b6..d87a360084 100644 --- a/types/charm/charm-tests.ts +++ b/types/charm/charm-tests.ts @@ -3,15 +3,15 @@ const charm = getCharm(); charm.pipe(process.stdout); charm.reset(); -var colors: getCharm.CharmColor[] = [ 'red', 'cyan', 'yellow', 'green', 'blue' ]; -var text = 'Always after me lucky charms.'; +const colors: getCharm.CharmColor[] = [ 'red', 'cyan', 'yellow', 'green', 'blue' ]; +const text = 'Always after me lucky charms.'; -var offset = 0; -var iv = setInterval(() => { - var y = 0, dy = 1; - for (var i = 0; i < 40; i++) { - var color = colors[(i + offset) % colors.length]; - var c = text[(i + offset) % text.length]; +let offset = 0; +const iv = setInterval(() => { + let y = 0, dy = 1; + for (let i = 0; i < 40; i++) { + const color = colors[(i + offset) % colors.length]; + const c = text[(i + offset) % text.length]; charm .move(1, dy) .foreground(color) diff --git a/types/charm/tslint.json b/types/charm/tslint.json index f05741c59b..b0e7084e94 100644 --- a/types/charm/tslint.json +++ b/types/charm/tslint.json @@ -1,6 +1,6 @@ { "extends": "../tslint.json", "rules": { - "forbidden-types": false + "ban-types": false } } diff --git a/types/cheerio/index.d.ts b/types/cheerio/index.d.ts index f3615674f5..4096a0f9c2 100644 --- a/types/cheerio/index.d.ts +++ b/types/cheerio/index.d.ts @@ -250,7 +250,7 @@ interface CheerioElement { tagName: string; type: string; name: string; - attribs: Object; + attribs: {[attr: string]: string}; children: CheerioElement[]; childNodes: CheerioElement[]; lastChild: CheerioElement; @@ -272,4 +272,4 @@ declare var cheerio:CheerioAPI; declare module "cheerio" { export = cheerio; -} \ No newline at end of file +} diff --git a/types/chrome/index.d.ts b/types/chrome/index.d.ts index 1b07c1c2e8..8c0c3bf5f2 100644 --- a/types/chrome/index.d.ts +++ b/types/chrome/index.d.ts @@ -3306,6 +3306,26 @@ declare namespace chrome.history { * @since Chrome 5. */ declare namespace chrome.i18n { + /** Holds detected ISO language code and its percentage in the input string */ + interface DetectedLanguage { + /** An ISO language code such as 'en' or 'fr'. + * For a complete list of languages supported by this method, see [kLanguageInfoTable]{@link https://src.chromium.org/viewvc/chrome/trunk/src/third_party/cld/languages/internal/languages.cc}. + * For an unknown language, 'und' will be returned, which means that [percentage] of the text is unknown to CLD */ + language: string; + + /** The percentage of the detected language */ + percentage: number; + } + + /** Holds detected language reliability and array of DetectedLanguage */ + interface LanguageDetectionResult { + /** CLD detected language reliability */ + isReliable: boolean; + + /** Array of detectedLanguage */ + languages: DetectedLanguage[]; + } + /** * Gets the accept-languages of the browser. This is different from the locale used by the browser; to get the locale, use i18n.getUILanguage. * @param callback The callback parameter should be a function that looks like this: @@ -3324,6 +3344,12 @@ declare namespace chrome.i18n { * @since Chrome 35. */ export function getUILanguage(): string; + + /** Detects the language of the provided text using CLD. + * @param text User input string to be translated. + * @param callback The callback parameter should be a function that looks like this: function(object result) {...}; + */ + export function detectLanguage(text: string, callback: (result: LanguageDetectionResult) => void): void; } //////////////////// diff --git a/types/clipboard/clipboard-tests.ts b/types/clipboard/clipboard-tests.ts index 5af2671671..23de4c89e6 100644 --- a/types/clipboard/clipboard-tests.ts +++ b/types/clipboard/clipboard-tests.ts @@ -1,16 +1,16 @@ import * as Clipboard from 'clipboard'; -var cb1 = new Clipboard('.btn'); -var cb2 = new Clipboard(document.getElementById('id'), { +const cb1 = new Clipboard('.btn'); +const cb2 = new Clipboard(document.getElementById('id'), { action: elem => 'copy' }); -var cb3 = new Clipboard(document.querySelectorAll('query'), { +const cb3 = new Clipboard(document.querySelectorAll('query'), { text: elem => null }); -var cb4 = new Clipboard('.btn', { +const cb4 = new Clipboard('.btn', { target: elem => null }); -var cb5 = new Clipboard('.btn', { +const cb5 = new Clipboard('.btn', { action: elem => 'copy', target: elem => null }); @@ -25,4 +25,3 @@ cb2.on('success', e => { e.clearSelection(); }); cb2.on('error', e => { }); - diff --git a/types/clipboard/index.d.ts b/types/clipboard/index.d.ts index ec03d9bee5..5f12a41d5f 100644 --- a/types/clipboard/index.d.ts +++ b/types/clipboard/index.d.ts @@ -54,4 +54,4 @@ declare namespace Clipboard { export = Clipboard; -export as namespace Clipboard; \ No newline at end of file +export as namespace Clipboard; diff --git a/types/clndr/clndr-tests.ts b/types/clndr/clndr-tests.ts index 018d9a6000..07bff7f9e4 100644 --- a/types/clndr/clndr-tests.ts +++ b/types/clndr/clndr-tests.ts @@ -89,4 +89,4 @@ myCalendar .setEvents([]) .addEvents([]) .removeEvents(event => event.id === 'idToRemove') - .destroy(); \ No newline at end of file + .destroy(); diff --git a/types/co-views/tslint.json b/types/co-views/tslint.json index f05741c59b..b0e7084e94 100644 --- a/types/co-views/tslint.json +++ b/types/co-views/tslint.json @@ -1,6 +1,6 @@ { "extends": "../tslint.json", "rules": { - "forbidden-types": false + "ban-types": false } } diff --git a/types/cookies/cookies-tests.ts b/types/cookies/cookies-tests.ts index 112246907c..c65bcbd4aa 100644 --- a/types/cookies/cookies-tests.ts +++ b/types/cookies/cookies-tests.ts @@ -3,9 +3,9 @@ import * as http from 'http'; const server = http.createServer((req, res) => { const cookies = new Cookies(req, res); - let unsigned: string, - signed: string, - tampered: string; + let unsigned: string; + let signed: string; + let tampered: string; if (req.url === "/set") { cookies diff --git a/types/cordova-sqlite-storage/cordova-sqlite-storage-tests.ts b/types/cordova-sqlite-storage/cordova-sqlite-storage-tests.ts index bb5a768bf8..6d2e3c3454 100644 --- a/types/cordova-sqlite-storage/cordova-sqlite-storage-tests.ts +++ b/types/cordova-sqlite-storage/cordova-sqlite-storage-tests.ts @@ -1,33 +1,21 @@ // examples taken from https://github.com/litehelpers/Cordova-sqlite-storage function echoTestFunction() { - function successCallback(value: string) { - - } - function errorCallback() { - - } + function successCallback(value: string) {} + function errorCallback() {} window.sqlitePlugin.echoTest(successCallback, errorCallback); } function selfTestFunction() { - function successCallback() { - - } - function errorCallback() { - - } + function successCallback() {} + function errorCallback() {} window.sqlitePlugin.selfTest(successCallback, errorCallback); } function openingDatabase() { - function successcb(db: SQLitePlugin.Database) { + function successcb(db: SQLitePlugin.Database) {} + function errorcb(err: Error) {} - } - function errorcb(err: Error) { - - } - - var db = window.sqlitePlugin.openDatabase({name: 'my.db', location: 'default'}, successcb, errorcb); - var db = window.sqlitePlugin.openDatabase({name: 'my.db', iosDatabaseLocation: 'Library'}, successcb, errorcb); + let db = window.sqlitePlugin.openDatabase({name: 'my.db', location: 'default'}, successcb, errorcb); + db = window.sqlitePlugin.openDatabase({name: 'my.db', iosDatabaseLocation: 'Library'}, successcb, errorcb); } function openingDatabase2() { @@ -104,7 +92,7 @@ function sampleWithPRAGMA() { // Cordova is ready function onDeviceReady() { - var db = window.sqlitePlugin.openDatabase({name: 'my.db', location: 'default'}); + const db = window.sqlitePlugin.openDatabase({name: 'my.db', location: 'default'}); db.transaction(tx => { tx.executeSql('DROP TABLE IF EXISTS test_table'); @@ -134,14 +122,13 @@ function sampleWithPRAGMA() { } } - function sampleWithTransactionLevelNesting() { // Wait for Cordova to load document.addEventListener('deviceready', onDeviceReady, false); // Cordova is ready function onDeviceReady() { - var db = window.sqlitePlugin.openDatabase({name: 'my.db', location: 'default'}); + const db = window.sqlitePlugin.openDatabase({name: 'my.db', location: 'default'}); db.transaction(tx => { tx.executeSql('DROP TABLE IF EXISTS test_table'); @@ -155,7 +142,6 @@ function sampleWithTransactionLevelNesting() { console.log("res.rows.length: " + res.rows.length + " -- should be 1"); console.log("res.rows.item(0).cnt: " + res.rows.item(0).cnt + " -- should be 1"); }); - }, (tx, e) => { console.log("ERROR: " + e.message); }); @@ -163,18 +149,12 @@ function sampleWithTransactionLevelNesting() { } } - function dbClose(db: SQLitePlugin.Database) { - function successcb() { - - } - function errorcb(err: Error) { - - } + function successcb() {} + function errorcb(err: Error) {} db.close(successcb, errorcb); - db.transaction(tx => { tx.executeSql("SELECT LENGTH('tenletters') AS stringlength", [], (tx, res) => { console.log('got stringlength: ' + res.rows.item(0).stringlength); @@ -193,21 +173,16 @@ function dbClose(db: SQLitePlugin.Database) { } function deleteDatabase() { - function successcb() { - - } - function errorcb(err: Error) { - - } + function successcb() {} + function errorcb(err: Error) {} window.sqlitePlugin.deleteDatabase({name: 'my.db', location: 'default'}, successcb, errorcb); } - function quickInstallationTest() { window.sqlitePlugin.openDatabase({ name: 'hello-world.db', location: 'default' }, db => { db.executeSql("select length('tenletters') as stringlength", [], res => { - var stringlength = res.rows.item(0).stringlength; + const stringlength = res.rows.item(0).stringlength; console.log('got stringlength: ' + stringlength); // document.getElementById('deviceready').querySelector('.received').innerHTML = 'stringlength: ' + stringlength; }); diff --git a/types/cordova-sqlite-storage/index.d.ts b/types/cordova-sqlite-storage/index.d.ts index 76e3aac5a3..2f78c908ff 100644 --- a/types/cordova-sqlite-storage/index.d.ts +++ b/types/cordova-sqlite-storage/index.d.ts @@ -65,4 +65,3 @@ declare namespace SQLitePlugin { echoTest(ok?: (value: string) => void, error?: (msg: string) => void): void; } } - diff --git a/types/core-decorators/index.d.ts b/types/core-decorators/index.d.ts index d0a51009eb..4af9fd5fa5 100644 --- a/types/core-decorators/index.d.ts +++ b/types/core-decorators/index.d.ts @@ -49,87 +49,68 @@ export interface Console { * Forces invocations of this function to always have this refer to the class instance, * even if the function is passed around or would otherwise lose its this context. e.g. var fn = context.method; */ -declare var autobind: Function; +export const autobind: Function; /** * Marks a property or method as not being writable. */ -declare var readonly: PropertyOrMethodDecorator; +export const readonly: PropertyOrMethodDecorator; /** * Checks that the marked method indeed overrides a function with the same signature somewhere on the prototype chain. */ -declare var override: MethodDecorator; +export const override: MethodDecorator; /** * Calls console.warn() with a deprecation message. Provide a custom message to override the default one. You can also provide an options hash with a url, for further reading. */ -declare var deprecate: Deprecate; +export const deprecate: Deprecate; /** * Calls console.warn() with a deprecation message. Provide a custom message to override the default one. You can also provide an options hash with a url, for further reading. */ -declare var deprecated: Deprecate; +export const deprecated: Deprecate; /** * Creates a new debounced function which will be invoked after wait milliseconds since the time it was invoked. Default timeout is 300 ms. */ -declare var debounce: (wait: number) => MethodDecorator; +export function debounce(wait: number): MethodDecorator; /** * Creates a new throttled function which will be invoked in every wait milliseconds. Default timeout is 300 ms. */ -declare var throttle: (wait: number, options?: ThrottleOptions) => MethodDecorator; +export function throttle(wait: number, options?: ThrottleOptions): MethodDecorator; /** * Suppresses any JavaScript console.warn() call while the decorated function is called. (i.e. on the stack) */ -declare var suppressWarnings: MethodDecorator; +export const suppressWarnings: MethodDecorator; /** * Marks a property or method as not being enumerable. */ -declare var nonenumerable: PropertyOrMethodDecorator; +export const nonenumerable: PropertyOrMethodDecorator; /** * Marks a property or method as not being writable. */ -declare var nonconfigurable: PropertyOrMethodDecorator; +export const nonconfigurable: PropertyOrMethodDecorator; /** * Initial implementation included, likely slow. WIP. */ -declare var memoize: MethodDecorator; +export const memoize: MethodDecorator; /** * Immediately applies the provided function and arguments to the method, allowing you to wrap methods with arbitrary helpers like those provided by lodash. * The first argument is the function to apply, all further arguments will be passed to that decorating function. */ -declare var decorate: (func: Function, ...args: any[]) => MethodDecorator; +export function decorate(func: Function, ...args: any[]): MethodDecorator; /** * Prevents a property initializer from running until the decorated property is actually looked up. * Useful to prevent excess allocations that might otherwise not be used, but be careful not to over-optimize things. */ -declare var lazyInitialize: PropertyDecorator; +export const lazyInitialize: PropertyDecorator; /** * Mixes in all property descriptors from the provided Plain Old JavaScript Objects (aka POJOs) as arguments. * Mixins are applied in the order they are passed, but do not override descriptors already on the class, including those inherited traditionally. */ -declare var mixin: (...mixins: any[]) => ClassDecorator; +export function mixin(...mixins: any[]): ClassDecorator; /** * Mixes in all property descriptors from the provided Plain Old JavaScript Objects (aka POJOs) as arguments. * Mixins are applied in the order they are passed, but do not override descriptors already on the class, including those inherited traditionally. */ -declare var mixins: (...mixins: any[]) => ClassDecorator; +export function mixins(...mixins: any[]): ClassDecorator; /** * Uses console.time and console.timeEnd to provide function timings with a unique label whose default prefix is ClassName.method. Supply a first argument to override the prefix: */ -declare var time: (label: string, console?: Console) => MethodDecorator; - -export { -autobind, -readonly, -override, -deprecate, -deprecated, -debounce, -throttle, -suppressWarnings, -nonenumerable, -nonconfigurable, -memoize, -decorate, -lazyInitialize, -mixin, -mixins, -time, -}; +export function time(label: string, console?: Console): MethodDecorator; diff --git a/types/core-decorators/tslint.json b/types/core-decorators/tslint.json index 0332a8383e..caa1fde509 100644 --- a/types/core-decorators/tslint.json +++ b/types/core-decorators/tslint.json @@ -2,6 +2,6 @@ "extends": "../tslint.json", "rules": { "callable-types": false, - "forbidden-types": false + "ban-types": false } } diff --git a/types/core-js/index.d.ts b/types/core-js/index.d.ts index 0bbe4974ae..dc37560d4d 100644 --- a/types/core-js/index.d.ts +++ b/types/core-js/index.d.ts @@ -927,7 +927,7 @@ declare module "core-js/fn/function" { export = Function; } declare module "core-js/fn/function/has-instance" { - const hasInstance: (value: any) => boolean; + function hasInstance(value: any): boolean; export = hasInstance; } declare module "core-js/fn/function/name" { @@ -1706,7 +1706,7 @@ declare module "core-js/library/fn/function" { export = Function; } declare module "core-js/library/fn/function/has-instance" { - const hasInstance: (value: any) => boolean; + function hasInstance(value: any): boolean; export = hasInstance; } declare module "core-js/library/fn/function/name" { diff --git a/types/core-js/tslint.json b/types/core-js/tslint.json index 0f47deabb4..3bfbe8c142 100644 --- a/types/core-js/tslint.json +++ b/types/core-js/tslint.json @@ -1,6 +1,6 @@ { "extends": "../tslint.json", "rules": { - "forbidden-types": false + "ban-types": false } } \ No newline at end of file diff --git a/types/cpy/cpy-tests.ts b/types/cpy/cpy-tests.ts index 047c9943bf..3bc0cbb32a 100644 --- a/types/cpy/cpy-tests.ts +++ b/types/cpy/cpy-tests.ts @@ -4,7 +4,6 @@ cpy(['src/*.png', '!src/goat.png'], 'dist').then(() => { console.log('files copied'); }); - cpy('foo.js', 'destination', { rename: basename => `prefix-${basename}` -}); \ No newline at end of file +}); diff --git a/types/cpy/index.d.ts b/types/cpy/index.d.ts index 039d0b84fb..8ef585250b 100644 --- a/types/cpy/index.d.ts +++ b/types/cpy/index.d.ts @@ -4,4 +4,7 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped export = cpy; -declare function cpy(src: string | string[], dest: string, opts?: { cwd?: string, parents?: boolean, rename?: (s: string) => string }): Promise; +declare function cpy( + src: string | string[], + dest: string, + opts?: { cwd?: string, parents?: boolean, rename?(s: string): string }): Promise; diff --git a/types/croppie/croppie-tests.ts b/types/croppie/croppie-tests.ts index 92f6d5ca18..26b2449408 100644 --- a/types/croppie/croppie-tests.ts +++ b/types/croppie/croppie-tests.ts @@ -7,7 +7,6 @@ const c = new Croppie(document.getElementById('item'), { enableOrientation: false, }); - c.bind({ url: 'demo/demo-2.jpg', orientation: 4, diff --git a/types/croppie/index.d.ts b/types/croppie/index.d.ts index afd0c0112c..78ab07ad61 100644 --- a/types/croppie/index.d.ts +++ b/types/croppie/index.d.ts @@ -27,7 +27,6 @@ export default class Croppie { destroy(): void; } - export type CropType = 'square' | 'circle'; export type Format = 'jpeg' | 'png' | 'webp'; diff --git a/types/csv-parse/csv-parse-tests.ts b/types/csv-parse/csv-parse-tests.ts index b0f13121fe..26b2458360 100644 --- a/types/csv-parse/csv-parse-tests.ts +++ b/types/csv-parse/csv-parse-tests.ts @@ -1,20 +1,21 @@ import parse = require('csv-parse'); function callbackAPITest() { - var input = '#Welcome\n"1","2","3","4"\n"a","b","c","d"'; + const input = '#Welcome\n"1","2","3","4"\n"a","b","c","d"'; parse(input, {comment: '#'}, (err, output) => { output.should.eql([ [ '1', '2', '3', '4' ], [ 'a', 'b', 'c', 'd' ] ]); }); } function streamAPITest() { - let output: string[][] = []; + const output: string[][] = []; // Create the parser - var parser = parse({delimiter: ':'}); - let record: string[]; + const parser = parse({delimiter: ':'}); // Use the writable stream api parser.on('readable', () => { - while (record = parser.read()) { + while (true) { + const record = parser.read(); + if (!record) break; output.push(record); } }); @@ -35,12 +36,12 @@ function streamAPITest() { import fs = require('fs'); function pipeFunctionTest() { - var transform = require('stream-transform'); + const transform = require('stream-transform'); - var output: any = []; - var parser = parse({delimiter: ':'}) - var input = fs.createReadStream('/etc/passwd'); - var transformer = transform((record: any[], callback: any) => { + const output: any = []; + const parser = parse({delimiter: ':'}); + const input = fs.createReadStream('/etc/passwd'); + const transformer = transform((record: any[], callback: any) => { setTimeout(() => { callback(null, record.join(' ') + '\n'); }, 500); @@ -51,8 +52,7 @@ function pipeFunctionTest() { import parseSync = require('csv-parse/lib/sync'); function syncApiTest() { - var input = '"key_1","key_2"\n"value 1","value 2"'; - var records = parseSync(input, {columns: true}); + const input = '"key_1","key_2"\n"value 1","value 2"'; + const records = parseSync(input, {columns: true}); records.should.eql([{ key_1: 'value 1', key_2: 'value 2' }]); } - diff --git a/types/csv-parse/index.d.ts b/types/csv-parse/index.d.ts index e780bac27d..cbf79729e5 100644 --- a/types/csv-parse/index.d.ts +++ b/types/csv-parse/index.d.ts @@ -33,16 +33,16 @@ declare namespace parse { * special constants are 'auto', 'unix', 'mac', 'windows', 'unicode'; * defaults to 'auto' (discovered in source or 'unix' if no source is specified). */ - rowDelimiter?: string; + rowDelimiter?: string; /** * Optional character surrounding a field, one character only, defaults to double quotes. */ - quote?: string + quote?: string; /** * Set the escape character, one character only, defaults to double quotes. */ - escape?: string + escape?: string; /** * List of fields as an array, @@ -55,62 +55,62 @@ declare namespace parse { /** * Treat all the characters after this one as a comment, default to '' (disabled). */ - comment?: string + comment?: string; /** * Name of header-record title to name objects by. */ - objname?: string + objname?: string; /** * Preserve quotes inside unquoted field. */ - relax?: boolean + relax?: boolean; /** * Discard inconsistent columns count, default to false. */ - relax_column_count?: boolean + relax_column_count?: boolean; /** * Dont generate empty values for empty lines. */ - skip_empty_lines?: boolean + skip_empty_lines?: boolean; /** * Maximum numer of characters to be contained in the field and line buffers before an exception is raised, * used to guard against a wrong delimiter or rowDelimiter, * default to 128000 characters. */ - max_limit_on_data_read?: number + max_limit_on_data_read?: number; /** * If true, ignore whitespace immediately around the delimiter, defaults to false. * Does not remove whitespace in a quoted field. */ - trim?: boolean + trim?: boolean; /** * If true, ignore whitespace immediately following the delimiter (i.e. left-trim all fields), defaults to false. * Does not remove whitespace in a quoted field. */ - ltrim?: boolean + ltrim?: boolean; /** * If true, ignore whitespace immediately preceding the delimiter (i.e. right-trim all fields), defaults to false. * Does not remove whitespace in a quoted field. */ - rtrim?: boolean + rtrim?: boolean; /** * If true, the parser will attempt to convert read data types to native types. */ - auto_parse?: boolean + auto_parse?: boolean; /** * If true, the parser will attempt to convert read data types to dates. It requires the "auto_parse" option. */ - auto_parse_date?: boolean + auto_parse_date?: boolean; } // TODO: what is this for? diff --git a/types/csv-parse/tslint.json b/types/csv-parse/tslint.json index 2221e40e4a..105f5736e6 100644 --- a/types/csv-parse/tslint.json +++ b/types/csv-parse/tslint.json @@ -1 +1,6 @@ -{ "extends": "../tslint.json" } \ No newline at end of file +{ + "extends": "../tslint.json", + "rules": { + "no-empty-interface": false + } +} diff --git a/types/csvtojson/index.d.ts b/types/csvtojson/index.d.ts index 504311f47a..c0ff659dd3 100644 --- a/types/csvtojson/index.d.ts +++ b/types/csvtojson/index.d.ts @@ -183,7 +183,7 @@ declare namespace csvtojson { * @param {string} str the string to convert * @return {Converter} returns this object for chaining */ - fromString(str: string): this + fromString(str: string): this; /** * Reads in a CSV from a string. @@ -197,7 +197,7 @@ declare namespace csvtojson { * @param {string} filePath the path to the CSV file * @return {Converter} returns this object for chaining */ - fromFile(filePath: string): this + fromFile(filePath: string): this; /** * Reads in a CSV from a file. @@ -211,7 +211,7 @@ declare namespace csvtojson { * @param {Stream} stream the stream * @return {Converter} returns this object for chaining */ - fromStream(stream: NodeJS.ReadableStream): this + fromStream(stream: NodeJS.ReadableStream): this; /** * Reads in a CSV from a stream. diff --git a/types/csvtojson/tslint.json b/types/csvtojson/tslint.json index 377cc837d4..b0e7084e94 100644 --- a/types/csvtojson/tslint.json +++ b/types/csvtojson/tslint.json @@ -1 +1,6 @@ -{ "extends": "../tslint.json" } +{ + "extends": "../tslint.json", + "rules": { + "ban-types": false + } +} diff --git a/types/d3-array/index.d.ts b/types/d3-array/index.d.ts index ccd2d568bb..8f5d4eab2e 100644 --- a/types/d3-array/index.d.ts +++ b/types/d3-array/index.d.ts @@ -153,8 +153,8 @@ export function bisectRight(array: Date[], x: Date, lo?: number, hi?: number): n export const bisect: typeof bisectRight; export interface Bisector { - left: (array: T[], x: U, lo?: number, hi?: number) => number; - right: (array: T[], x: U, lo?: number, hi?: number) => number; + left(array: T[], x: U, lo?: number, hi?: number): number; + right(array: T[], x: U, lo?: number, hi?: number): number; } export function bisector(comparator: (a: T, b: U) => number): Bisector; diff --git a/types/d3-axis/index.d.ts b/types/d3-axis/index.d.ts index 4a65952070..9cee537067 100644 --- a/types/d3-axis/index.d.ts +++ b/types/d3-axis/index.d.ts @@ -61,10 +61,10 @@ export interface Axis { (context: Selection): void; /** - * Render the axis to the given context. - * - * @param context A transition defined on SVG containers (either SVG or G elements). - */ + * Render the axis to the given context. + * + * @param context A transition defined on SVG containers (either SVG or G elements). + */ (context: TransitionLike): void; /** @@ -142,10 +142,10 @@ export interface Axis { tickArguments(args: [AxisTimeInterval, string]): this; /** - * Sets the arguments that will be passed to scale.ticks and scale.tickFormat when the axis is rendered, and returns the axis generator. - * - * @param args An array with arguments suitable for the scale to be used for tick generation - */ + * Sets the arguments that will be passed to scale.ticks and scale.tickFormat when the axis is rendered, and returns the axis generator. + * + * @param args An array with arguments suitable for the scale to be used for tick generation + */ tickArguments(args: any[]): this; /** diff --git a/types/d3-drag/d3-drag-tests.ts b/types/d3-drag/d3-drag-tests.ts index deb5a6dc55..4283cb259f 100644 --- a/types/d3-drag/d3-drag-tests.ts +++ b/types/d3-drag/d3-drag-tests.ts @@ -55,7 +55,6 @@ let circleDrag: d3Drag.DragBehavior; - // create new drag behavior ------------------------------------------ circleDrag = d3Drag.drag(); // Use short form method @@ -99,7 +98,6 @@ filterFn = function(d) { // chainable circleDrag = circleDrag.filter(function(d, i, group) { - return (d.color !== 'green' && this.r.baseVal.value < 10) ? !event.button : true; // 'this' is SVGCircleElement and d is CircleDatum }); @@ -192,10 +190,8 @@ const wrongSelection: Selection = select = event; - circleDrag = e.target; // target return drag behavior const type: string = e.type; @@ -224,7 +220,6 @@ handler = e.on('dragged'); // fails, handler with wrong datum type // let wrongHandler4: ((this:SVGCircleElement, d:{test: number}, i: number, group: SVGCircleElement[] | NodeListOf)=> void) | undefined = e.on('dragged'); - // ----------------------------------------------------------------------------- // Test dragDisable() and dragEnable() // ----------------------------------------------------------------------------- diff --git a/types/d3-drag/index.d.ts b/types/d3-drag/index.d.ts index d49e0bbc02..d3a65fb377 100644 --- a/types/d3-drag/index.d.ts +++ b/types/d3-drag/index.d.ts @@ -7,12 +7,10 @@ import { ArrayLike, Selection, ValueFn } from 'd3-selection'; - // -------------------------------------------------------------------------- // Shared Type Definitions and Interfaces // -------------------------------------------------------------------------- - /** * DraggedElementBaseType serves as an alias for the 'minimal' data type which can be selected * without 'd3-drag' (and related code in 'd3-selection') trying to use properties internally which would otherwise not @@ -20,7 +18,6 @@ import { ArrayLike, Selection, ValueFn } from 'd3-selection'; */ export type DraggedElementBaseType = Element; - /** * Container element type usable for mouse/touch functions */ diff --git a/types/d3-dsv/d3-dsv-tests.ts b/types/d3-dsv/d3-dsv-tests.ts index a4d958f01b..421add6e65 100644 --- a/types/d3-dsv/d3-dsv-tests.ts +++ b/types/d3-dsv/d3-dsv-tests.ts @@ -12,7 +12,6 @@ import * as d3Dsv from 'd3-dsv'; // Preperatory Steps // ------------------------------------------------------------------------------------------ - const csvTestString: string = '1997,Ford,E350,2.34\n2000,Mercury,Cougar,2.38'; const tsvTestString: string = '1997\tFord\tE350\t2.34\n2000\tMercury\tCougar\t2.38'; const pipedTestString: string = '1997|Ford|E350|2.34\n2000|Mercury|Cougar|2.38'; @@ -34,7 +33,6 @@ let parseMappedArray: d3Dsv.DSVParsedArray; let parseRowsArray: string[][]; let parseRowsMappedArray: ParsedTestObject[]; - let columns: string[]; let num: number; let date: Date; @@ -77,14 +75,12 @@ str = parseMappedArray[0].make; str = parseMappedArray[0].model; num = parseMappedArray[0].length; - // csvParseRows(...) ============================================================================ // without row mapper ----------------------------------------------------------------------- parseRowsArray = d3Dsv.csvParseRows(csvTestString); - str = parseRowsArray[0][0]; // 'Year' of first row // date = parseRowsArray[0][0]; // fails, return value is string @@ -158,14 +154,12 @@ str = parseMappedArray[0].make; str = parseMappedArray[0].model; num = parseMappedArray[0].length; - // tsvParseRows(...) ============================================================================ // without row mapper ----------------------------------------------------------------------- parseRowsArray = d3Dsv.tsvParseRows(tsvTestString); - str = parseRowsArray[0][0]; // 'Year' of first row // date = parseRowsArray[0][0]; // fails, return value is string @@ -244,14 +238,12 @@ str = parseMappedArray[0].make; str = parseMappedArray[0].model; num = parseMappedArray[0].length; - // parseRows(...) ============================================================================ // without row mapper ----------------------------------------------------------------------- parseRowsArray = dsv.parseRows(pipedTestString); - str = parseRowsArray[0][0]; // 'Year' of first row // date = parseRowsArray[0][0]; // fails, return value is string diff --git a/types/d3-dsv/tslint.json b/types/d3-dsv/tslint.json new file mode 100644 index 0000000000..2221e40e4a --- /dev/null +++ b/types/d3-dsv/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } \ No newline at end of file diff --git a/types/d3-dsv/v0/d3-dsv-tests.ts b/types/d3-dsv/v0/d3-dsv-tests.ts index 587d4d5a55..ac3e76a689 100644 --- a/types/d3-dsv/v0/d3-dsv-tests.ts +++ b/types/d3-dsv/v0/d3-dsv-tests.ts @@ -1,8 +1,5 @@ - - import d3dsv = require("d3-dsv"); -var csv = d3dsv(","); - -var rows = csv.parse("a,b,c\n1,2,3\n4,5,6"); +const csv = d3dsv(","); +const rows = csv.parse("a,b,c\n1,2,3\n4,5,6"); diff --git a/types/d3-dsv/v0/index.d.ts b/types/d3-dsv/v0/index.d.ts index 82ccd0f87f..18701f64ea 100644 --- a/types/d3-dsv/v0/index.d.ts +++ b/types/d3-dsv/v0/index.d.ts @@ -4,11 +4,11 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /** A parser and formatter for DSV (CSV and TSV) files. Extracted from D3. */ -declare var loader: ( - /** the symbol used to seperate cells in the row.*/ +declare function loader( + /** the symbol used to seperate cells in the row. */ delimiter: string, /** example: "text/plain" */ - encoding?: string) => D3Dsv; + encoding?: string): D3Dsv; export = loader; export as namespace d3_dsv; @@ -16,21 +16,21 @@ export as namespace d3_dsv; /** A parser and formatter for DSV (CSV and TSV) files. Extracted from D3. */ interface D3Dsv { /** - Parses the specified string, which is the contents of a CSV file, returning an array of objects representing the parsed rows. - The string is assumed to be RFC4180-compliant. - Unlike the parseRows method, this method requires that the first line of the CSV file contains a comma-separated list of column names; - these column names become the attributes on the returned objects. - For example, consider the following CSV file: - - Year,Make,Model,Length - 1997,Ford,E350,2.34 - 2000,Mercury,Cougar,2.38 - - The resulting JavaScript array is: - - [ {"Year": "1997", "Make": "Ford", "Model": "E350", "Length": "2.34"}, - {"Year": "2000", "Make": "Mercury", "Model": "Cougar", "Length": "2.38"} ] - */ + * Parses the specified string, which is the contents of a CSV file, returning an array of objects representing the parsed rows. + * The string is assumed to be RFC4180-compliant. + * Unlike the parseRows method, this method requires that the first line of the CSV file contains a comma-separated list of column names; + * these column names become the attributes on the returned objects. + * For example, consider the following CSV file: + * + * Year,Make,Model,Length + * 1997,Ford,E350,2.34 + * 2000,Mercury,Cougar,2.38 + * + * The resulting JavaScript array is: + * + * [ {"Year": "1997", "Make": "Ford", "Model": "E350", "Length": "2.34"}, + * {"Year": "2000", "Make": "Mercury", "Model": "Cougar", "Length": "2.38"} ] + */ parse( table: string, /** coerce cells (strings) into different types or modify them. return null to strip this row from the output results. */ @@ -38,42 +38,42 @@ interface D3Dsv { ): TRow[]; /** - Parses the specified string, which is the contents of a CSV file, returning an array of arrays representing the parsed rows. - The string is assumed to be RFC4180-compliant. - Unlike the parse method, this method treats the header line as a standard row, and should be used whenever the CSV file does not contain a header. - Each row is represented as an array rather than an object. - Rows may have variable length. - For example, consider the following CSV file: - - 1997,Ford,E350,2.34 - 2000,Mercury,Cougar,2.38 - The resulting JavaScript array is: - - [ ["1997", "Ford", "E350", "2.34"], - ["2000", "Mercury", "Cougar", "2.38"] ] - Note that the values themselves are always strings; they will not be automatically converted to numbers. See parse for details. - */ + * Parses the specified string, which is the contents of a CSV file, returning an array of arrays representing the parsed rows. + * The string is assumed to be RFC4180-compliant. + * Unlike the parse method, this method treats the header line as a standard row, and should be used whenever the CSV file does not contain a header. + * Each row is represented as an array rather than an object. + * Rows may have variable length. + * For example, consider the following CSV file: + * + * 1997,Ford,E350,2.34 + * 2000,Mercury,Cougar,2.38 + * The resulting JavaScript array is: + * + * [ ["1997", "Ford", "E350", "2.34"], + * ["2000", "Mercury", "Cougar", "2.38"] ] + * Note that the values themselves are always strings; they will not be automatically converted to numbers. See parse for details. + */ parseRows( table: string, - /** coerce cells (strings) into different types or modify them. return null to strip this row from the output results.*/ + /** coerce cells (strings) into different types or modify them. return null to strip this row from the output results. */ accessor?: (row: string[]) => TRow ): TRow[]; /** - Converts the specified array of rows into comma-separated values format, returning a string. - This operation is the reverse of parse. - Each row will be separated by a newline (\n), and each column within each row will be separated by a comma (,). - Values that contain either commas, double-quotes (") or newlines will be escaped using double-quotes. - - Each row should be an object, and all object properties will be converted into fields. - For greater control over which properties are converted, convert the rows into arrays containing only the properties that should be converted and use formatRows. - */ + * Converts the specified array of rows into comma-separated values format, returning a string. + * This operation is the reverse of parse. + * Each row will be separated by a newline (\n), and each column within each row will be separated by a comma (,). + * Values that contain either commas, double-quotes (") or newlines will be escaped using double-quotes. + * + * Each row should be an object, and all object properties will be converted into fields. + * For greater control over which properties are converted, convert the rows into arrays containing only the properties that should be converted and use formatRows. + */ format(rows: any[]): string; /** - Converts the specified array of rows into comma-separated values format, returning a string. - This operation is the reverse of parseRows. Each row will be separated by a newline (\n), and each column within each row will be separated by a comma (,). - Values that contain either commas, double-quotes (") or newlines will be escaped using double-quotes. - */ + * Converts the specified array of rows into comma-separated values format, returning a string. + * This operation is the reverse of parseRows. Each row will be separated by a newline (\n), and each column within each row will be separated by a comma (,). + * Values that contain either commas, double-quotes (") or newlines will be escaped using double-quotes. + */ formatRows(rows: any[]): string; } diff --git a/types/d3-ease/d3-ease-tests.ts b/types/d3-ease/d3-ease-tests.ts index b50ceba9a4..67a0f32b1b 100644 --- a/types/d3-ease/d3-ease-tests.ts +++ b/types/d3-ease/d3-ease-tests.ts @@ -23,7 +23,6 @@ t_out = d3Ease.easeCubicIn(t_in); t_out = d3Ease.easeCubicOut(t_in); t_out = d3Ease.easeCubicInOut(t_in); - let easePolyFactory: d3Ease.PolynomialEasingFactory; easePolyFactory = d3Ease.easePoly; diff --git a/types/d3-ease/index.d.ts b/types/d3-ease/index.d.ts index 704b55e5e0..3de6fd2e87 100644 --- a/types/d3-ease/index.d.ts +++ b/types/d3-ease/index.d.ts @@ -94,25 +94,24 @@ export interface PolynomialEasingFactory { * Symmetric polynomial easing/easing factory; scales polyIn for t in [0, 0.5] and polyOut for t in [0.5, 1]. * If the exponent is not specified, it defaults to 3, equivalent to cubic. */ -export var easePoly: PolynomialEasingFactory; +export const easePoly: PolynomialEasingFactory; /** * Polynomial easing/easing factory; raises t to the specified exponent. * If the exponent is not specified, it defaults to 3, equivalent to cubicIn. */ -export var easePolyIn: PolynomialEasingFactory; +export const easePolyIn: PolynomialEasingFactory; /** * Reverse polynomial easing/easing factory; equivalent to 1 - polyIn(1 - t). * If the exponent is not specified, it defaults to 3, equivalent to cubicOut. */ -export var easePolyOut: PolynomialEasingFactory; +export const easePolyOut: PolynomialEasingFactory; /** * Symmetric polynomial easing/easing factory; scales polyIn for t in [0, 0.5] and polyOut for t in [0.5, 1]. * If the exponent is not specified, it defaults to 3, equivalent to cubic. */ -export var easePolyInOut: PolynomialEasingFactory; - +export const easePolyInOut: PolynomialEasingFactory; /** * Symmetric sinusoidal easing; scales sinIn for t in [0, 0.5] and sinOut for t in [0.5, 1]. @@ -226,7 +225,6 @@ export function easeBounceOut(normalizedTime: number): number; */ export function easeBounceInOut(normalizedTime: number): number; - /** * Anticipatory easing function factory */ @@ -249,26 +247,25 @@ export interface BackEasingFactory { * Symmetric anticipatory easing; scales backIn for t in [0, 0.5] and backOut for t in [0.5, 1]. * The degree of overshoot is configurable; it not specified, it defaults to 1.70158. */ -export var easeBack: BackEasingFactory; +export const easeBack: BackEasingFactory; /** * Anticipatory easing, like a dancer bending his knees before jumping off the floor. * The degree of overshoot is configurable; it not specified, it defaults to 1.70158. */ -export var easeBackIn: BackEasingFactory; +export const easeBackIn: BackEasingFactory; /** * Reverse anticipatory easing; equivalent to 1 - backIn(1 - t). * The degree of overshoot is configurable; it not specified, it defaults to 1.70158. */ -export var easeBackOut: BackEasingFactory; +export const easeBackOut: BackEasingFactory; /** * Symmetric anticipatory easing; scales backIn for t in [0, 0.5] and backOut for t in [0.5, 1]. * The degree of overshoot is configurable; it not specified, it defaults to 1.70158. */ -export var easeBackInOut: BackEasingFactory; - +export const easeBackInOut: BackEasingFactory; /** * Elastic easing function factory @@ -287,11 +284,11 @@ export interface ElasticEasingFactory { */ amplitude(a: number): ElasticEasingFactory; /** - * Returns a new elastic easing with the specified amplitude a. - * Defaults to 0.3,if not specified. - * - * @param p Period for elastic easing. - */ + * Returns a new elastic easing with the specified amplitude a. + * Defaults to 0.3,if not specified. + * + * @param p Period for elastic easing. + */ period(p: number): ElasticEasingFactory; } @@ -300,25 +297,25 @@ export interface ElasticEasingFactory { * The amplitude and period of the oscillation are configurable; * if not specified, they default to 1 and 0.3, respectively. */ -export var easeElastic: ElasticEasingFactory; +export const easeElastic: ElasticEasingFactory; /** * Elastic easing, like a rubber band. * The amplitude and period of the oscillation are configurable; * if not specified, they default to 1 and 0.3, respectively. */ -export var easeElasticIn: ElasticEasingFactory; +export const easeElasticIn: ElasticEasingFactory; /** * Reverse elastic easing; equivalent to 1 - elasticIn(1 - t). * The amplitude and period of the oscillation are configurable; * if not specified, they default to 1 and 0.3, respectively. */ -export var easeElasticOut: ElasticEasingFactory; +export const easeElasticOut: ElasticEasingFactory; /** * Symmetric elastic easing; scales elasticIn for t in [0, 0.5] and elasticOut for t in [0.5, 1]. * The amplitude and period of the oscillation are configurable; * if not specified, they default to 1 and 0.3, respectively. */ -export var easeElasticInOut: ElasticEasingFactory; +export const easeElasticInOut: ElasticEasingFactory; diff --git a/types/d3-force/d3-force-tests.ts b/types/d3-force/d3-force-tests.ts index 0ecd7555d3..c08e1b5cee 100644 --- a/types/d3-force/d3-force-tests.ts +++ b/types/d3-force/d3-force-tests.ts @@ -6,7 +6,6 @@ * are not intended as functional tests. */ - import * as d3Force from 'd3-force'; // ------------------------------------------------------------------------------------- @@ -30,7 +29,6 @@ interface Graph { links: SimLink[]; } - const graph: Graph = { nodes: [ { id: 'Myriel', group: 1, r: 5 }, @@ -112,7 +110,6 @@ forceCollide = d3Force.forceCollide((node, index, nodes) => { return n.r; }); - // Configure Collision force ----------------------------------------------------------- let radiusAccessor: (node: SimNode, i: number, nodes: SimNode[]) => number; @@ -139,7 +136,6 @@ num = forceCollide.strength(); forceCollide = forceCollide.iterations(10); num = forceCollide.iterations(); - // Use Collision force ----------------------------------------------------------------- forceCollide.initialize(graph.nodes); @@ -157,7 +153,6 @@ forceLink = d3Force.forceLink(); // with link data forceLink = d3Force.forceLink(graph.links); - // Configure Link force ----------------------------------------------------------- let linkNumberAccessor: (link: SimLink, i: number, links: SimLink[]) => number; @@ -181,7 +176,6 @@ num = simLink.value; num = simLink.d; num = simLink.s; - // id (node id accessor) forceLink = forceLink.id((node, index, nodes) => { @@ -220,13 +214,11 @@ linkNumberAccessor = forceLink.strength(); forceLink = forceLink.iterations(10); num = forceLink.iterations(); - // Use Link force ----------------------------------------------------------------- forceLink.initialize(graph.nodes); forceLink(0.1); // alpha - // ManyBody ============================================================================ // create ManyBody force -------------------------------------------------------------- @@ -255,7 +247,6 @@ simNodeNumberAccessor = forceCharge.strength(); forceCharge = forceCharge.theta(0.8); num = forceCharge.theta(); - // distanceMin forceCharge = forceCharge.distanceMin(1); @@ -266,13 +257,11 @@ num = forceCharge.distanceMin(); forceCharge = forceCharge.distanceMax(1000); num = forceCharge.distanceMax(); - // Use ManyBody force ----------------------------------------------------------------- forceCharge.initialize(graph.nodes); forceCharge(0.1); // alpha - // ForceX ============================================================================== // create ForceX force -------------------------------------------------------------- @@ -327,7 +316,6 @@ simNodeNumberAccessor = forcePosX.x(); forcePosX.initialize(graph.nodes); forcePosX(0.1); // alpha - // ForceY ============================================================================== // create ForceY force -------------------------------------------------------------- @@ -388,7 +376,6 @@ forcePosY(0.1); // alpha // Create Force Simulation ============================================================= - let nodeSimulation: d3Force.Simulation; let nodeLinkSimulation: d3Force.Simulation; @@ -435,7 +422,6 @@ num = nodeLinkSimulation.alphaTarget(); nodeLinkSimulation = nodeLinkSimulation.velocityDecay(0.4); num = nodeLinkSimulation.velocityDecay(); - // force() ----------------------------------------------------------------------------- nodeSimulation = nodeSimulation.force('posx', forcePosX); @@ -444,7 +430,6 @@ nodeSimulation.force('posy', forcePosY); // Remove force nodeSimulation = nodeSimulation.force('posx', null); - nodeLinkSimulation = nodeLinkSimulation.force('link', forceLink); nodeLinkSimulation @@ -480,7 +465,6 @@ simLinks = nodeLinkSimulation.force>('link') // fLink = nodeLinkSimulation.force('link')!; // fails, as ForceLink specific properties are missing from 'generic' force - // on() -------------------------------------------------------------------------------- function drawLink(d: SimLink) { @@ -502,7 +486,6 @@ function drawNode(d: SimNode) { } nodeLinkSimulation = nodeLinkSimulation.on('tick', function ticked() { - const that: d3Force.Simulation = this; if (context) { diff --git a/types/d3-force/index.d.ts b/types/d3-force/index.d.ts index 6faa27449a..23f83c7ea3 100644 --- a/types/d3-force/index.d.ts +++ b/types/d3-force/index.d.ts @@ -3,7 +3,6 @@ // Definitions by: Tom Wanzek , Alex Ford , Boris Yankov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - // Last module patch version validated against: 1.0.4 // ----------------------------------------------------------------------- @@ -356,7 +355,6 @@ export interface Force {} } = d3Geo.geoTransform({}); +const transformFunction: { stream(s: d3Geo.GeoStream): {} } = d3Geo.geoTransform({}); interface CustomTranformProto extends d3Geo.GeoTransformPrototype { a: number; @@ -612,7 +612,7 @@ customTransformProto = { a: 10 }; -const t: { stream: (s: d3Geo.GeoStream) => (CustomTranformProto & d3Geo.GeoStream) } = d3Geo.geoTransform(customTransformProto); +const t: { stream(s: d3Geo.GeoStream): CustomTranformProto & d3Geo.GeoStream } = d3Geo.geoTransform(customTransformProto); // geoIdentity() ======================================================== diff --git a/types/d3-geo/index.d.ts b/types/d3-geo/index.d.ts index 1e9fed9b92..f6e4fa150d 100644 --- a/types/d3-geo/index.d.ts +++ b/types/d3-geo/index.d.ts @@ -699,14 +699,14 @@ export interface GeoProjection extends GeoStreamWrapper { */ fitExtent(extent: [[number, number], [number, number]], object: ExtendedFeature): this; /** - * Sets the projection’s scale and translate to fit the specified geographic feature collection in the center of the given extent. - * Returns the projection. - * - * Any clip extent is ignored when determining the new scale and translate. The precision used to compute the bounding box of the given object is computed at an effective scale of 150. - * - * @param extent The extent, specified as an array [[x₀, y₀], [x₁, y₁]], where x₀ is the left side of the bounding box, y₀ is the top, x₁ is the right and y₁ is the bottom. - * @param object A geographic feature collection supported by d3-geo (An extension of GeoJSON feature collection). - */ + * Sets the projection’s scale and translate to fit the specified geographic feature collection in the center of the given extent. + * Returns the projection. + * + * Any clip extent is ignored when determining the new scale and translate. The precision used to compute the bounding box of the given object is computed at an effective scale of 150. + * + * @param extent The extent, specified as an array [[x₀, y₀], [x₁, y₁]], where x₀ is the left side of the bounding box, y₀ is the top, x₁ is the right and y₁ is the bottom. + * @param object A geographic feature collection supported by d3-geo (An extension of GeoJSON feature collection). + */ fitExtent(extent: [[number, number], [number, number]], object: ExtendedFeatureCollection>): this; /** * Sets the projection’s scale and translate to fit the specified geographic geometry object in the center of the given extent. @@ -719,14 +719,14 @@ export interface GeoProjection extends GeoStreamWrapper { */ fitExtent(extent: [[number, number], [number, number]], object: GeoGeometryObjects): this; /** - * Sets the projection’s scale and translate to fit the specified geographic geometry collection in the center of the given extent. - * Returns the projection. - * - * Any clip extent is ignored when determining the new scale and translate. The precision used to compute the bounding box of the given object is computed at an effective scale of 150. - * - * @param extent The extent, specified as an array [[x₀, y₀], [x₁, y₁]], where x₀ is the left side of the bounding box, y₀ is the top, x₁ is the right and y₁ is the bottom. - * @param object A geographic geometry collection supported by d3-geo (An extension of GeoJSON geometry collection). - */ + * Sets the projection’s scale and translate to fit the specified geographic geometry collection in the center of the given extent. + * Returns the projection. + * + * Any clip extent is ignored when determining the new scale and translate. The precision used to compute the bounding box of the given object is computed at an effective scale of 150. + * + * @param extent The extent, specified as an array [[x₀, y₀], [x₁, y₁]], where x₀ is the left side of the bounding box, y₀ is the top, x₁ is the right and y₁ is the bottom. + * @param object A geographic geometry collection supported by d3-geo (An extension of GeoJSON geometry collection). + */ fitExtent(extent: [[number, number], [number, number]], object: ExtendedGeometryCollection): this; /** @@ -1340,7 +1340,7 @@ export interface GeoTransformPrototype { * * @param methods An object with custom method implementations, which are used to create a transform projection. */ -export function geoTransform(methods: T): { stream: (s: GeoStream) => (T & GeoStream) }; +export function geoTransform(methods: T): { stream(s: GeoStream): T & GeoStream }; // geoIdentity() ================================================================= @@ -1382,14 +1382,14 @@ export interface GeoIdentityTranform extends GeoStreamWrapper { */ fitExtent(extent: [[number, number], [number, number]], object: ExtendedFeature): this; /** - * Sets the projection’s scale and translate to fit the specified geographic feature collection in the center of the given extent. - * Returns the projection. - * - * Any clip extent is ignored when determining the new scale and translate. The precision used to compute the bounding box of the given object is computed at an effective scale of 150. - * - * @param extent The extent, specified as an array [[x₀, y₀], [x₁, y₁]], where x₀ is the left side of the bounding box, y₀ is the top, x₁ is the right and y₁ is the bottom. - * @param object A geographic feature collection supported by d3-geo (An extension of GeoJSON feature collection). - */ + * Sets the projection’s scale and translate to fit the specified geographic feature collection in the center of the given extent. + * Returns the projection. + * + * Any clip extent is ignored when determining the new scale and translate. The precision used to compute the bounding box of the given object is computed at an effective scale of 150. + * + * @param extent The extent, specified as an array [[x₀, y₀], [x₁, y₁]], where x₀ is the left side of the bounding box, y₀ is the top, x₁ is the right and y₁ is the bottom. + * @param object A geographic feature collection supported by d3-geo (An extension of GeoJSON feature collection). + */ fitExtent(extent: [[number, number], [number, number]], object: ExtendedFeatureCollection>): this; /** * Sets the projection’s scale and translate to fit the specified geographic geometry object in the center of the given extent. @@ -1402,14 +1402,14 @@ export interface GeoIdentityTranform extends GeoStreamWrapper { */ fitExtent(extent: [[number, number], [number, number]], object: GeoGeometryObjects): this; /** - * Sets the projection’s scale and translate to fit the specified geographic geometry collection in the center of the given extent. - * Returns the projection. - * - * Any clip extent is ignored when determining the new scale and translate. The precision used to compute the bounding box of the given object is computed at an effective scale of 150. - * - * @param extent The extent, specified as an array [[x₀, y₀], [x₁, y₁]], where x₀ is the left side of the bounding box, y₀ is the top, x₁ is the right and y₁ is the bottom. - * @param object A geographic geometry collection supported by d3-geo (An extension of GeoJSON geometry collection). - */ + * Sets the projection’s scale and translate to fit the specified geographic geometry collection in the center of the given extent. + * Returns the projection. + * + * Any clip extent is ignored when determining the new scale and translate. The precision used to compute the bounding box of the given object is computed at an effective scale of 150. + * + * @param extent The extent, specified as an array [[x₀, y₀], [x₁, y₁]], where x₀ is the left side of the bounding box, y₀ is the top, x₁ is the right and y₁ is the bottom. + * @param object A geographic geometry collection supported by d3-geo (An extension of GeoJSON geometry collection). + */ fitExtent(extent: [[number, number], [number, number]], object: ExtendedGeometryCollection): this; /** diff --git a/types/d3-scale/d3-scale-tests.ts b/types/d3-scale/d3-scale-tests.ts index c1feb4766a..f317e342ec 100644 --- a/types/d3-scale/d3-scale-tests.ts +++ b/types/d3-scale/d3-scale-tests.ts @@ -92,7 +92,6 @@ linearScaleNumString = linearScaleNumString.domain(domainNumeric); linearScaleNumString = linearScaleNumString.domain(domainNumbers); domainNumbers = linearScaleNumString.domain(); - // range(...) ----------------------------------------------------------------- linearScaleNumber = linearScaleNumber.range(rangeNumbers); @@ -138,7 +137,6 @@ linearScaleNumString = linearScaleNumber.interpolate((a, b) => { // nice(...) ----------------------------------------------------------------------- - // chainable linearScaleNumber = linearScaleNumber.nice(); linearScaleNumber = linearScaleNumber.nice(5); @@ -180,7 +178,6 @@ powerScaleNumber = d3Scale.scalePow(); powerScaleString = d3Scale.scalePow(); powerScaleNumString = d3Scale.scalePow(); - let squarerootScaleNumber: d3Scale.ScalePower; let squarerootScaleString: d3Scale.ScalePower; let squarerootScaleNumString: d3Scale.ScalePower; @@ -211,7 +208,6 @@ powerScaleNumString = powerScaleNumString.domain(domainNumeric); powerScaleNumString = powerScaleNumString.domain(domainNumbers); domainNumbers = powerScaleNumString.domain(); - // range(...) ----------------------------------------------------------------- powerScaleNumber = powerScaleNumber.range(rangeNumbers); @@ -282,7 +278,6 @@ const copiedPowerScale: d3Scale.ScalePower = powerScaleNumString // Logarithmic Scale Factory // ------------------------------------------------------------------------------- - // scaleLog() --------------------------------------------------------------------- let logScaleNumber: d3Scale.ScaleLogarithmic; @@ -293,7 +288,6 @@ logScaleNumber = d3Scale.scaleLog(); logScaleString = d3Scale.scaleLog(); logScaleNumString = d3Scale.scaleLog(); - // ScaleLogarithmic Interface ======================================================== // base -------------------------------------------------------------------- @@ -316,7 +310,6 @@ logScaleNumString = logScaleNumString.domain(domainNumeric); logScaleNumString = logScaleNumString.domain(domainNumbers); domainNumbers = logScaleNumString.domain(); - // range(...) ----------------------------------------------------------------- logScaleNumber = logScaleNumber.range(rangeNumbers); @@ -393,10 +386,8 @@ let identityScale: d3Scale.ScaleIdentity; identityScale = d3Scale.scaleIdentity(); - // ScaleIdentity Interface ======================================================== - // domain(...) ----------------------------------------------------------------- identityScale = identityScale.domain(domainNumeric); @@ -434,12 +425,10 @@ tickFormatNumberFn = identityScale.tickFormat(5, '+%'); outputNumber = identityScale(10); - // copy(...) ----------------------------------------------------------------- const copiedIdentityScale: d3Scale.ScaleIdentity = identityScale.copy(); - // ------------------------------------------------------------------------------- // Time Scale Factories // ------------------------------------------------------------------------------- @@ -454,7 +443,6 @@ localTimeScaleNumber = d3Scale.scaleTime(); localTimeScaleString = d3Scale.scaleTime(); localTimeScaleNumString = d3Scale.scaleTime(); - let utcScaleNumber: d3Scale.ScaleTime; let utcScaleString: d3Scale.ScaleTime; let utcScaleNumString: d3Scale.ScaleTime; @@ -475,7 +463,6 @@ domainDates = localTimeScaleString.domain(); localTimeScaleNumString = localTimeScaleNumString.domain(domainDates); domainDates = localTimeScaleNumString.domain(); - // range(...) ----------------------------------------------------------------- localTimeScaleNumber = localTimeScaleNumber.range(rangeNumbers); @@ -534,7 +521,6 @@ if (timeInterval !== null) { ticksDates = localTimeScaleNumString.ticks(timeInterval); } - // tickFormat(...) ----------------------------------------------------------------- tickFormatDateFn = localTimeScaleNumber.tickFormat(); @@ -543,7 +529,6 @@ if (timeInterval !== null) { tickFormatDateFn = localTimeScaleNumber.tickFormat(timeInterval, '%I %p'); } - // (...) value mapping from domain to output ----------------------------------- outputNumber = localTimeScaleNumber(new Date(2016, 6, 4)); @@ -595,8 +580,6 @@ outputString = sequentialScaleColorString(10); const copiedSequentialScale: d3Scale.ScaleSequential = sequentialScaleColorString.copy(); - - // ------------------------------------------------------------------------------- // Color Interpolators for Sequential Scale Factory // ------------------------------------------------------------------------------- @@ -619,7 +602,6 @@ colorInterpolator = d3Scale.interpolateCool; colorInterpolator = d3Scale.interpolateCubehelixDefault; - // ------------------------------------------------------------------------------- // Quantize Scale Factory // ------------------------------------------------------------------------------- @@ -632,7 +614,6 @@ let quantizeScaleString: d3Scale.ScaleQuantize; quantizeScaleNumber = d3Scale.scaleQuantize(); quantizeScaleString = d3Scale.scaleQuantize(); - // ScaleQuantize Interface ======================================================== // domain(...) ----------------------------------------------------------------- @@ -649,7 +630,6 @@ rangeNumbers = quantizeScaleNumber.range(); quantizeScaleString = quantizeScaleString.range(['steelblue', 'brown']); rangeStrings = quantizeScaleString.range(); - // invertExtent(...) ----------------------------------------------------------------- numExtent = quantizeScaleNumber.invertExtent(500); @@ -681,12 +661,10 @@ outputNumber = quantizeScaleNumber(0.51); const copiedQuantizeScale: d3Scale.ScaleQuantize = quantizeScaleNumber.copy(); - // ------------------------------------------------------------------------------- // Quantile Scale Factory // ------------------------------------------------------------------------------- - // scaleQuantile() ----------------------------------------------------------------- let quantileScaleNumber: d3Scale.ScaleQuantile; @@ -695,7 +673,6 @@ let quantileScaleString: d3Scale.ScaleQuantile; quantileScaleNumber = d3Scale.scaleQuantile(); quantileScaleString = d3Scale.scaleQuantile(); - // ScaleQuantile Interface ======================================================== // domain(...) ----------------------------------------------------------------- @@ -714,7 +691,6 @@ rangeNumbers = quantileScaleNumber.range(); quantileScaleString = quantileScaleString.range(['q25', 'q50', 'q75']); rangeStrings = quantileScaleString.range(); - // invertExtent(...) ----------------------------------------------------------------- numExtent = quantileScaleNumber.invertExtent(2); @@ -733,7 +709,6 @@ outputNumber = quantileScaleNumber(0.51); const copiedQuantileScale: d3Scale.ScaleQuantile = quantileScaleNumber.copy(); - // ------------------------------------------------------------------------------- // Threshold Scale Factory // ------------------------------------------------------------------------------- @@ -746,7 +721,6 @@ let thresholdScaleNumberString: d3Scale.ScaleThreshold; thresholdScaleNumberNumber = d3Scale.scaleThreshold(); thresholdScaleNumberString = d3Scale.scaleThreshold(); - // ScaleThreshold Interface ======================================================== // domain(...) ----------------------------------------------------------------- @@ -764,7 +738,6 @@ rangeNumbers = thresholdScaleNumberNumber.range(); thresholdScaleNumberString = thresholdScaleNumberString.range(['steelblue', 'seagreen', 'brown']); rangeStrings = thresholdScaleNumberString.range(); - // invertExtent(...) ----------------------------------------------------------------- numOrUndefinedExtent = thresholdScaleNumberNumber.invertExtent(100); @@ -781,7 +754,6 @@ outputString = thresholdScaleNumberString(0.9); const copiedThresholdScale: d3Scale.ScaleThreshold = thresholdScaleNumberString.copy(); - // ------------------------------------------------------------------------------- // Ordinal Scale Factory // ------------------------------------------------------------------------------- @@ -794,7 +766,6 @@ let ordinalScaleStringNumber: d3Scale.ScaleOrdinal; ordinalScaleStringString = d3Scale.scaleOrdinal(); ordinalScaleStringNumber = d3Scale.scaleOrdinal(); - // ScaleOrdinal Interface ======================================================== // domain(...) ----------------------------------------------------------------- @@ -812,7 +783,6 @@ rangeStrings = ordinalScaleStringString.range(); ordinalScaleStringNumber = ordinalScaleStringNumber.range([-1, 0, 1]); rangeNumbers = ordinalScaleStringNumber.range(); - // unknown(...) and d3Scale.scaleImplicit -------------------------------------- const implicit: { name: 'implicit' } = d3Scale.scaleImplicit; @@ -839,7 +809,6 @@ outputNumber = ordinalScaleStringNumber('negative'); const copiedOrdinalScale: d3Scale.ScaleOrdinal = ordinalScaleStringNumber.copy(); - // ------------------------------------------------------------------------------- // Band Scale Factory // ------------------------------------------------------------------------------- @@ -852,7 +821,6 @@ let bandScaleCoercible: d3Scale.ScaleBand; bandScaleString = d3Scale.scaleBand(); bandScaleCoercible = d3Scale.scaleBand(); - // ScaleBand Interface ======================================================== // domain(...) ----------------------------------------------------------------- @@ -870,12 +838,10 @@ let rangeExtent: [number, number] = bandScaleString.range(); bandScaleCoercible = bandScaleCoercible.range([0, 300]); rangeExtent = bandScaleCoercible.range(); - // rangeRound(...) ----------------------------------------------------------------- bandScaleString = bandScaleString.rangeRound([0, 300]); - // round(...) ----------------------------------------------------------------- bandScaleCoercible = bandScaleCoercible.round(true); @@ -891,7 +857,6 @@ num = bandScaleString.paddingInner(); bandScaleString = bandScaleString.paddingOuter(0.1); num = bandScaleString.paddingOuter(); - // padding(...) ----------------------------------------------------------------- bandScaleString = bandScaleString.padding(0.1); @@ -910,7 +875,6 @@ num = bandScaleString.bandwidth(); num = bandScaleString.step(); - // (...) value mapping from domain to output ----------------------------------- outputNumberMaybe = bandScaleString('neutral'); @@ -921,7 +885,6 @@ outputNumberMaybe = bandScaleCoercible(new StringCoercible('negative')); const copiedBandScale: d3Scale.ScaleBand = bandScaleCoercible.copy(); - // ------------------------------------------------------------------------------- // Point Scale Factory // ------------------------------------------------------------------------------- @@ -934,7 +897,6 @@ let pointScaleCoercible: d3Scale.ScalePoint; pointScaleString = d3Scale.scalePoint(); pointScaleCoercible = d3Scale.scalePoint(); - // ScalePoint Interface ======================================================== // domain(...) ----------------------------------------------------------------- @@ -952,18 +914,15 @@ rangeExtent = pointScaleString.range(); pointScaleCoercible = pointScaleCoercible.range([0, 300]); rangeExtent = pointScaleCoercible.range(); - // rangeRound(...) ----------------------------------------------------------------- pointScaleString = pointScaleString.rangeRound([0, 300]); - // round(...) ----------------------------------------------------------------- pointScaleCoercible = pointScaleCoercible.round(true); roundingFlag = pointScaleCoercible.round(); - // padding(...) ----------------------------------------------------------------- pointScaleString = pointScaleString.padding(0.1); diff --git a/types/d3-scale/index.d.ts b/types/d3-scale/index.d.ts index 2ba9eeec8a..8a114d90e1 100644 --- a/types/d3-scale/index.d.ts +++ b/types/d3-scale/index.d.ts @@ -33,16 +33,15 @@ export interface InterpolatorFactory { * A helper interface for a continuous scale defined over a numeric domain. */ export interface ScaleContinuousNumeric { - /** - * Given a value from the domain, returns the corresponding value from the range, subject to interpolation, if any. - * - * If the given value is outside the domain, and clamping is not enabled, the mapping may be extrapolated such that the returned value is outside the range. - * - * Note: The interpolation function applied by the scale may change the output type from the range type as part of the interpolation. - * - * @param value A numeric value from the domain. - */ + * Given a value from the domain, returns the corresponding value from the range, subject to interpolation, if any. + * + * If the given value is outside the domain, and clamping is not enabled, the mapping may be extrapolated such that the returned value is outside the range. + * + * Note: The interpolation function applied by the scale may change the output type from the range type as part of the interpolation. + * + * @param value A numeric value from the domain. + */ (value: number | { valueOf(): number }): Output; /** @@ -163,7 +162,6 @@ export interface ScaleContinuousNumeric { * Returns an exact copy of this scale. Changes to this scale will not affect the returned scale, and vice versa. */ copy(): this; - } // ------------------------------------------------------------------------------- @@ -188,7 +186,6 @@ export interface ScaleContinuousNumeric { * convert the interpolated range element to a corresponding output element. */ export interface ScaleLinear extends ScaleContinuousNumeric { - /** * Returns the scale’s current interpolator factory, which defaults to interpolate. */ @@ -222,7 +219,6 @@ export interface ScaleLinear extends ScaleContinuousNumeric(interpolate: InterpolatorFactory): ScaleLinear; - } /** @@ -281,7 +277,6 @@ export function scaleLinear(): ScaleLinear; * convert the interpolated range element to a corresponding output element. */ export interface ScalePower extends ScaleContinuousNumeric { - /** * Returns the scale’s current interpolator factory, which defaults to interpolate. */ @@ -428,7 +423,6 @@ export function scaleSqrt(): ScalePower; * convert the interpolated range element to a corresponding output element. */ export interface ScaleLogarithmic extends ScaleContinuousNumeric { - /** * Returns a copy of the scale’s current domain. */ @@ -578,16 +572,15 @@ export function scaleLog(): ScaleLogarithmic; * These scales are occasionally useful when working with pixel coordinates, say in conjunction with an axis or brush. */ export interface ScaleIdentity { - /** - * Given a value from the domain, returns the corresponding value from the range, subject to interpolation, if any. - * - * If the given value is outside the domain, and clamping is not enabled, the mapping may be extrapolated such that the returned value is outside the range. - * - * Note: The interpolation function applied by the scale may change the output type from the range type as part of the interpolation. - * - * @param value A numeric value from the domain. - */ + * Given a value from the domain, returns the corresponding value from the range, subject to interpolation, if any. + * + * If the given value is outside the domain, and clamping is not enabled, the mapping may be extrapolated such that the returned value is outside the range. + * + * Note: The interpolation function applied by the scale may change the output type from the range type as part of the interpolation. + * + * @param value A numeric value from the domain. + */ (value: number | { valueOf(): number }): number; /** @@ -688,7 +681,6 @@ export interface ScaleIdentity { */ export function scaleIdentity(): ScaleIdentity; - // ------------------------------------------------------------------------------- // Time Scale Factories // ------------------------------------------------------------------------------- @@ -710,16 +702,15 @@ export function scaleIdentity(): ScaleIdentity; * convert the interpolated range element to a corresponding output element. */ export interface ScaleTime { - /** - * Given a value from the domain, returns the corresponding value from the range, subject to interpolation, if any. - * - * If the given value is outside the domain, and clamping is not enabled, the mapping may be extrapolated such that the returned value is outside the range. - * - * Note: The interpolation function applied by the scale may change the output type from the range type as part of the interpolation. - * - * @param value A temporal value from the domain. If the value is not a Date, it will be coerced to Date. - */ + * Given a value from the domain, returns the corresponding value from the range, subject to interpolation, if any. + * + * If the given value is outside the domain, and clamping is not enabled, the mapping may be extrapolated such that the returned value is outside the range. + * + * Note: The interpolation function applied by the scale may change the output type from the range type as part of the interpolation. + * + * @param value A temporal value from the domain. If the value is not a Date, it will be coerced to Date. + */ (value: Date | number | { valueOf(): number }): Output; /** @@ -1022,14 +1013,13 @@ export function scaleUtc(): ScaleTime; * The generic corresponds to the data type of the output of the interpolator underlying the scale. */ export interface ScaleSequential { - /** - * Given a value from the domain, returns the corresponding value from the output range, subject to interpolation. - * - * If the given value is outside the domain, and clamping is not enabled, the mapping may be extrapolated such that the returned value is outside the range. - * - * @param value A numeric value from the domain. - */ + * Given a value from the domain, returns the corresponding value from the output range, subject to interpolation. + * + * If the given value is outside the domain, and clamping is not enabled, the mapping may be extrapolated such that the returned value is outside the range. + * + * @param value A numeric value from the domain. + */ (value: number | { valueOf(): number }): Output; /** @@ -1209,7 +1199,7 @@ export interface ScaleQuantize { */ range(range: Range[]): this; - /** + /** * Returns approximately count representative values from the scale’s domain. * * If count is not specified, it defaults to 10. @@ -1282,7 +1272,6 @@ export function scaleQuantize(): ScaleQuantize; * The generic correponds to the data type of range elements. */ export interface ScaleQuantile { - /** * Given a value in the input domain, returns the corresponding value in the output range. * @@ -1542,7 +1531,6 @@ export function scaleOrdinal(range */ export const scaleImplicit: { name: 'implicit' }; - // ------------------------------------------------------------------------------- // Band Scale Factory // ------------------------------------------------------------------------------- @@ -1828,7 +1816,6 @@ export function scalePoint(): ScalePoint; */ export function scalePoint(): ScalePoint; - // ------------------------------------------------------------------------------- // Categorical Color Schemas for Ordinal Scales // ------------------------------------------------------------------------------- diff --git a/types/d3-selection/d3-selection-tests.ts b/types/d3-selection/d3-selection-tests.ts index 43d8708938..0b2dec77c2 100644 --- a/types/d3-selection/d3-selection-tests.ts +++ b/types/d3-selection/d3-selection-tests.ts @@ -1,4 +1,3 @@ - /** * Typescript definition tests for d3/d3-selection module * @@ -9,7 +8,6 @@ import * as d3Selection from 'd3-selection'; - // --------------------------------------------------------------------------------------- // Some preparatory work for definition testing below // --------------------------------------------------------------------------------------- @@ -56,7 +54,6 @@ interface CircleDatumAlternative { // Tests of Top-Level Selection Functions // --------------------------------------------------------------------------------------- - // test top-level .selection() ----------------------------------------------------------- const topSelection: d3Selection.Selection = d3Selection.selection(); @@ -101,16 +98,13 @@ maybeSVG2 = d3Selection.select(maybeSVG1.node()); // fails, as node type mismatches selection type // let body7: d3Selection.Selection = d3Selection.select(maybeSVG1.node()); - // test "special case DOM objects" d3Selection.select(xDoc); d3Selection.select(xWindow); - // test top-level selectAll() ------------------------------------------------------------- - // Using selectAll(), selectAll(null) or selectAll(undefined) creates an empty selection let emptyRootSelection: d3Selection.Selection = d3Selection.selectAll(); @@ -137,7 +131,6 @@ const baseTypeElements2: d3Selection.Selection = d3Selection.selectAll(divElements.nodes()); - // Using selectAll(...) with node array argument and type parameters creates selection // with Group element of type HTMLDivElement and datum of DivDatum type. The parent element is of type 'null' with datum of type 'undefined' @@ -145,10 +138,8 @@ const divElements4: d3Selection.Selection(baseTypeElements.nodes()); // fails as baseTypeEl.node() is not of type HTMLBodyElement - // selectAll(...) accepts NodeListOf<...> argument - const xSVGCircleElementList: NodeListOf = document.querySelectorAll('circle'); const circleSelection: d3Selection.Selection = d3Selection.selectAll(xSVGCircleElementList); @@ -156,14 +147,10 @@ const circleSelection: d3Selection.Selection = d3Selection.selectAll(document.links); - - // --------------------------------------------------------------------------------------- // Tests of Sub-Selection Functions // --------------------------------------------------------------------------------------- - - // select(...) sub-selection -------------------------------------------------------------- // Expected: datum propagates down from selected element to sub-selected descendant element @@ -211,12 +198,10 @@ firstG = svgEl.select(function(d, i, g) { return this.querySelector('g')!; // this of type SVGSVGElement by type inference }); - // firstG = svgEl.select(function() { // return this.querySelector('a'); // fails, return type HTMLAnchorElement is not compatible with SVGGElement expected by firstG // }); - // selectAll(...) sub-selection -------------------------------------------------------------- // Expected: datum from selected element(s) does not propagate down to sub-selected descendant elements. @@ -234,14 +219,12 @@ let elementsUnknownData: d3Selection.Selection = svgEl.selectAll('g'); // gElementsOldData = svgEl.selectAll('g'); // fails default type parameters of selectAll for group element type and datum type do not match - // Using selectAll(...) sub-selection with a selector function argument. function svgGroupSelectorAll(this: SVGSVGElement, d: SVGDatum, i: number, groups: SVGSVGElement[]): NodeListOf { return this.querySelectorAll('g'); // this-type compatible with group element-type to which the selector function will be appplied } - gElementsOldData = svgEl.selectAll(svgGroupSelectorAll); function wrongSvgGroupSelectorAll(this: HTMLElement, d: SVGDatum, i: number, groups: HTMLElement[]): NodeListOf { @@ -305,7 +288,6 @@ maybeG.selectAll(function(d, i, g) { // selector(...) and selectorAll(...) ---------------------------------------------------- - // d3Selection.select(d3Selection.selector('g')); // fails, selector as argument to top-level select not supported // supported on sub-selection @@ -352,12 +334,10 @@ filterdGElements2 = d3Selection.selectAll('.any-svg-type').filt // return that.tagName === 'g'|| that.tagName === 'G'; // }); // fails without using narrowing generic on filter method - // matcher() ----------------------------------------------------------------------------- filterdGElements = gElementsOldData.filter(d3Selection.matcher('.top-level')); - // --------------------------------------------------------------------------------------- // Tests of Modification // --------------------------------------------------------------------------------------- @@ -377,7 +357,6 @@ str = body.html(); // Setters tests ------------------------------------------------------------------------- - let circles: d3Selection.Selection; let divs: d3Selection.Selection; @@ -425,7 +404,6 @@ divs = divs return d.padding === '0px'; // boolean return value }); - // style(...) Tests divs = divs @@ -451,7 +429,6 @@ divs = divs // .style('color', function() { return 'green'; }, 'test') // fails, test: invalid priority value .style('color', () => 'green', 'important'); // boolean return + test: priority = 'important'; - // property(...) Tests circles = circles @@ -514,7 +491,6 @@ body = body // Tests of Datum and Data Join // --------------------------------------------------------------------------------------- - const data: CircleDatum[] = [ { nodeId: 'c1', cx: 10, cy: 10, r: 5, name: 'foo', label: 'Foo' }, { nodeId: 'c2', cx: 20, cy: 20, r: 5, name: 'bar', label: 'Bar' }, @@ -527,7 +503,6 @@ const data2: CircleDatumAlternative[] = [ { nodeId: 'c4', cx: 10, cy: 15, r: 10, name: 'newbie', label: 'Newbie', color: 'red' } ]; - // Tests of Datum ----------------------------------------------------------------------- // TEST GETTER @@ -564,7 +539,6 @@ newBodyDatum = body.datum(function(d, i, g) { // return { newFoo: 'new foo' }; // }).datum(); // inferred type - // SCENARIO 1: Fully type-parameterized // object-based @@ -616,10 +590,8 @@ d3Selection.select('#svg-1') // irrelevant typing to get contextual typing in la return d.length > 0 && d[0].color === 'green'; }); - // Tests of Data Join -------------------------------------------------------------------- - const dimensions: SVGDatum = { width: 500, height: 300 @@ -741,7 +713,6 @@ circles2 = enterCircles.merge(circles2); // merge enter and update selections // FURTHER DATA-JOIN TESTs (function argument, changes in data type between old and new data) - const matrix = [ [11975, 5871, 8916, 2868], [1951, 10048, 2060, 6171], @@ -876,7 +847,6 @@ newParagraph2 = body.insert(typeValueFunction, 'p.second-paragraph'); newParagraph2 = body.insert(typeValueFunction, beforeValueFunction); newParagraph2 = body.insert(typeValueFunction); - // sort(...) ----------------------------------------------------------------------------- // NB: Return new selection of same type @@ -932,12 +902,10 @@ circles = circles.each(function(d, i, g) { // check chaining return type by re- // call() ------------------------------------------------------------------------------- function enforceMinRadius(selection: d3Selection.Selection, minRadius: number): void { - selection.attr('r', function(d) { const r: number = +d3Selection.select(this).attr('r'); return Math.max(r, minRadius); }); - } // returns 'this' selection @@ -959,7 +927,6 @@ circles = circles.call(enforceMinRadius, 40); // check chaining return type by r let listener: undefined | ((this: HTMLBodyElement, datum: BodyDatum, index: number, group: HTMLBodyElement[] | ArrayLike) => void); - body = body.on('click', function(d, i, g) { const that: HTMLBodyElement = this; // const that2: SVGElement = this; // fails, type mismatch @@ -981,7 +948,6 @@ if (listener) { // remove listener body = body.on('click', null); // check chaining return type by re-assigning - // dispatch(...) ------------------------------------------------------------------------- const fooEventParam: d3Selection.CustomEventParameters = { @@ -1009,7 +975,6 @@ body = body.dispatch('fooEvent', function(d, i, g) { // re-assign for chaining t return eParam; }); - // event and customEvent() ---------------------------------------------------------------- // TODO: Tests of event are related to issue #3 (https://github.com/tomwanzek/d3-v4-definitelytyped/issues/3) diff --git a/types/d3-selection/index.d.ts b/types/d3-selection/index.d.ts index 49cd141dfa..34196f755e 100644 --- a/types/d3-selection/index.d.ts +++ b/types/d3-selection/index.d.ts @@ -44,7 +44,6 @@ export interface EnterElement { */ export type ContainerElement = HTMLElement | SVGSVGElement | SVGGElement; - /** * Interface for optional parameters map, when dispatching custom events * on a selection @@ -69,7 +68,6 @@ export interface CustomEventParameters { */ export type ValueFn = (this: T, datum: Datum, index: number, groups: T[] | ArrayLike) => Result; - /** * TransitionLike is a helper interface to represent a quasi-Transition, without specifying the full Transition interface in this file. * For example, whereever d3-zoom allows a Transition to be passed in as an argument, it internally immediately invokes its `selection()` @@ -88,8 +86,6 @@ export interface TransitionLike { tween(name: string, tweenFn: ValueFn void)>): TransitionLike; } - - // -------------------------------------------------------------------------- // All Selection related interfaces and function // -------------------------------------------------------------------------- @@ -155,7 +151,6 @@ export function selectAll(nodes: GElement[] */ export function selectAll(nodes: ArrayLike): Selection; - /** * A D3 Selection of elements. * @@ -165,7 +160,6 @@ export function selectAll(nodes: ArrayLike< * The fourth generic "PDatum" refers to the type of the datum of the parent element(s). */ interface Selection { - // Sub-selection ------------------------- /** @@ -558,17 +552,17 @@ interface Selection; /** - * Filters the selection, returning a new selection that contains only the elements for - * which the specified filter is true. - * - * The returned filtered selection preserves the parents of this selection, but like array.filter, - * it does not preserve indexes as some elements may be removed; use selection.select to preserve the index, if needed. - * - * The generic refers to the type of element which will be selected after applying the filter, i.e. if the element types - * contained in a pre-filter selection are narrowed to a subset as part of the filtering. - * - * @param selector A CSS selector string to match when filtering. - */ + * Filters the selection, returning a new selection that contains only the elements for + * which the specified filter is true. + * + * The returned filtered selection preserves the parents of this selection, but like array.filter, + * it does not preserve indexes as some elements may be removed; use selection.select to preserve the index, if needed. + * + * The generic refers to the type of element which will be selected after applying the filter, i.e. if the element types + * contained in a pre-filter selection are narrowed to a subset as part of the filtering. + * + * @param selector A CSS selector string to match when filtering. + */ filter(selector: string): Selection; /** * Filter the selection, returning a new selection that contains only the elements for @@ -625,7 +619,6 @@ interface Selection Selection; * Selects the root element, document.documentElement. This function can also be used to test for selections * (instanceof d3.selection) or to extend the selection prototype. */ -export var selection: SelectionFn; - +export const selection: SelectionFn; // --------------------------------------------------------------------------- // on.js event and customEvent related @@ -899,7 +889,7 @@ interface BaseEvent { * rather than from the generated UMD bundle; not all bundlers observe jsnext:main. * Also beware of conflicts with the window.event global. */ -export var event: any; // Could be of all sorts of types, too general: BaseEvent | Event | MouseEvent | TouchEvent | ... | OwnCustomEventType; +export const event: any; // Could be of all sorts of types, too general: BaseEvent | Event | MouseEvent | TouchEvent | ... | OwnCustomEventType; /** * Invokes the specified listener, using the specified "that" as "this" context and passing the specified arguments, if any. @@ -984,7 +974,6 @@ export function touches(container: ContainerElement, touches?: TouchList): Array // local.js related // --------------------------------------------------------------------------- - export interface Local { /** * Retrieves a local variable stored on the node (or one of its parents). @@ -1050,7 +1039,6 @@ export interface NamespaceLocalObject { */ export function namespace(prefixedLocal: string): NamespaceLocalObject | string; - // --------------------------------------------------------------------------- // namespaces.js related // --------------------------------------------------------------------------- @@ -1063,8 +1051,7 @@ export interface NamespaceMap { [prefix: string]: string; } /** * Map of namespace prefixes to corresponding fully qualified namespace strings */ -export var namespaces: NamespaceMap; - +export const namespaces: NamespaceMap; // --------------------------------------------------------------------------- // window.js related @@ -1078,13 +1065,11 @@ export var namespaces: NamespaceMap; */ export function window(DOMNode: Window | Document | Element): Window; - // --------------------------------------------------------------------------- // creator.js and matcher.js Complex helper closure generating functions // for explicit bound-context dependent use // --------------------------------------------------------------------------- - /** * Given the specified element name, returns a function which creates an element of the given name, * assuming that "this" is the parent element. diff --git a/types/d3-shape/index.d.ts b/types/d3-shape/index.d.ts index e1d80b6786..517f84e501 100644 --- a/types/d3-shape/index.d.ts +++ b/types/d3-shape/index.d.ts @@ -1990,14 +1990,14 @@ export interface Symbol { /** * Constructs a new symbol generator with the default settings. */ -export function symbol(): Symbol; +export function symbol(): Symbol; // tslint:disable-line ban-types /** * Constructs a new symbol generator with the default settings. * * The generic corrsponds to the data type of the datum underlying the symbol. */ -export function symbol(): Symbol; +export function symbol(): Symbol; // tslint:disable-line ban-types /** * Constructs a new symbol generator with the default settings. @@ -2005,7 +2005,7 @@ export function symbol(): Symbol; * The first generic corresponds to the "this" context within which the symbol generator is invoked. * The second generic corrsponds to the data type of the datum underlying the symbol. */ -export function symbol(): Symbol; +export function symbol(): Symbol; // tslint:disable-line ban-types /** * An array containing the set of all built-in symbol types: circle, cross, diamond, square, star, triangle, and wye. diff --git a/types/dagre-d3/dagre-d3-tests.ts b/types/dagre-d3/dagre-d3-tests.ts index 2b1a958ef7..16bfb29b0c 100644 --- a/types/dagre-d3/dagre-d3-tests.ts +++ b/types/dagre-d3/dagre-d3-tests.ts @@ -1,4 +1,3 @@ - namespace DagreD3Tests { const gDagre = new dagreD3.graphlib.Graph(); const graph = gDagre.graph(); diff --git a/types/deep-equal/deep-equal-tests.ts b/types/deep-equal/deep-equal-tests.ts index ed23a35838..d889f5929d 100644 --- a/types/deep-equal/deep-equal-tests.ts +++ b/types/deep-equal/deep-equal-tests.ts @@ -1,4 +1,3 @@ - import deepEqual = require("deep-equal"); const isDeepEqual1: boolean = deepEqual({}, {}); diff --git a/types/del/del-tests.ts b/types/del/del-tests.ts index 071fdcc3ad..09702c4b39 100644 --- a/types/del/del-tests.ts +++ b/types/del/del-tests.ts @@ -1,6 +1,6 @@ import del = require("del"); -var paths = ["build", "dist/**/*.js"]; +let paths = ["build", "dist/**/*.js"]; del(["tmp/*.js", "!tmp/unicorn.js"]); @@ -26,7 +26,6 @@ del("tmp/*.js", {force: true}).then((paths: string[]) => { console.log('Deleted files/folders:\n', paths.join('\n')); }); -var paths: string[]; paths = del.sync(["tmp/*.js", "!tmp/unicorn.js"]); paths = del.sync(["tmp/*.js", "!tmp/unicorn.js"], {force: true}); diff --git a/types/detect-port/detect-port-tests.ts b/types/detect-port/detect-port-tests.ts new file mode 100644 index 0000000000..5ffd01ca7c --- /dev/null +++ b/types/detect-port/detect-port-tests.ts @@ -0,0 +1,23 @@ +import * as detect from "detect-port"; + +const port: number = 8000; + +/** + * callback usage + */ +detect(port, (err: Error, _port: number) => { +}); + + +function* yieldSyntax() { + const _port: number = yield detect(port); +}; + +/** + * use as a promise + */ +detect(port) + .then((_port: number) => { + }) + .catch(err => { + }); diff --git a/types/detect-port/index.d.ts b/types/detect-port/index.d.ts new file mode 100644 index 0000000000..a0fa185ece --- /dev/null +++ b/types/detect-port/index.d.ts @@ -0,0 +1,11 @@ +// Type definitions for detect-port 1.1 +// Project: https://github.com/node-modules/detect-port +// Definitions by: François Nguyen +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +interface DetectPort { + (port: number, callback: (err: Error, _port: number) => void): void; + (port: number): Promise; +} +declare const detectPort: DetectPort; +export = detectPort; diff --git a/types/detect-port/tsconfig.json b/types/detect-port/tsconfig.json new file mode 100644 index 0000000000..dde5cf6683 --- /dev/null +++ b/types/detect-port/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "target": "es2015", + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "detect-port-tests.ts" + ] +} \ No newline at end of file diff --git a/types/detect-port/tslint.json b/types/detect-port/tslint.json new file mode 100644 index 0000000000..2221e40e4a --- /dev/null +++ b/types/detect-port/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } \ No newline at end of file diff --git a/types/dockerode/index.d.ts b/types/dockerode/index.d.ts index 4d9a979665..0acb68662b 100644 --- a/types/dockerode/index.d.ts +++ b/types/dockerode/index.d.ts @@ -8,7 +8,6 @@ import * as stream from 'stream'; import * as events from 'events'; - declare namespace Dockerode { interface Container { inspect(options: {}, callback: Callback): void; diff --git a/types/dot/dot-tests.ts b/types/dot/dot-tests.ts index 0987f9eb46..507f63e81d 100644 --- a/types/dot/dot-tests.ts +++ b/types/dot/dot-tests.ts @@ -1,32 +1,30 @@ +const headertmpl = "

{{=it.title}}

"; - -var headertmpl = "

{{=it.title}}

"; - -var pagetmpl = "

Here is the page using a header template< / h2 >\n" +const pagetmpl = "

Here is the page using a header template< / h2 >\n" + "{{#def.header}}\n" + "{{=it.name}}"; -var customizableheadertmpl = "{{#def.header}}" +const customizableheadertmpl = "{{#def.header}}" + "\n{{#def.mycustominjectionintoheader || ''} }"; -var pagetmplwithcustomizableheader = "

Here is the page with customized header template

\n" +const pagetmplwithcustomizableheader = "

Here is the page with customized header template

\n" + "{{##def.mycustominjectionintoheader:\n" + "
{{=it.title}} is not {{=it.name}}
\n" + "#}}\n" + "{{#def.customheader}}\n" + "{{=it.name}}"; -var def = { +const def = { header: headertmpl, customheader: customizableheadertmpl }; -var data = { +const data = { title: "My title", name: "My name" }; -var pagefn = doT.template(pagetmpl, undefined, def); -var content = pagefn(data); +let pagefn = doT.template(pagetmpl, undefined, def); +const content = pagefn(data); pagefn = doT.template(pagetmplwithcustomizableheader, undefined, def); -var contentcustom = pagefn(data); +const contentcustom = pagefn(data); diff --git a/types/dragster/dragster-tests.ts b/types/dragster/dragster-tests.ts index a05d06e1dd..12b069362e 100644 --- a/types/dragster/dragster-tests.ts +++ b/types/dragster/dragster-tests.ts @@ -1,7 +1,7 @@ import Dragster = require("dragster"); -var dropzone = document.getElementById("my-dropzone") as HTMLElement; -var dragster = new Dragster(dropzone); +const dropzone = document.getElementById("my-dropzone") as HTMLElement; +const dragster = new Dragster(dropzone); dragster.removeListeners(); -dragster.reset(); \ No newline at end of file +dragster.reset(); diff --git a/types/dragster/index.d.ts b/types/dragster/index.d.ts index c02f510084..cc1e8e85b8 100644 --- a/types/dragster/index.d.ts +++ b/types/dragster/index.d.ts @@ -20,4 +20,4 @@ declare var Dragster: Dragster.DragsterStatic; export = Dragster; // Support as a global -export as namespace Dragster; \ No newline at end of file +export as namespace Dragster; diff --git a/types/ecurve/ecurve-tests.ts b/types/ecurve/ecurve-tests.ts index ced84ef8aa..e7f730446b 100644 --- a/types/ecurve/ecurve-tests.ts +++ b/types/ecurve/ecurve-tests.ts @@ -4,8 +4,7 @@ import crypto = require('crypto'); import BigInteger = require('bigi'); import cs = require('coinstring'); - -var ecparams = ecurve.getCurveByName('secp256k1'); +let ecparams = ecurve.getCurveByName('secp256k1'); console.log(ecparams.n.toString(16)); // => fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141 console.log(ecparams.G.getEncoded().toString('hex')); // getEncoded() returns type 'Buffer' instead of 'BigInteger' @@ -13,15 +12,14 @@ console.log(ecparams.G.getEncoded().toString('hex')); // getEncoded() returns ty console.log(ecparams.h.toString(16)); // => 1 +const privateKey = new Buffer("1184cd2cdd640ca42cfc3a091c51d549b2f016d454b2774019c2b2d2e08529fd", 'hex'); -var privateKey = new Buffer("1184cd2cdd640ca42cfc3a091c51d549b2f016d454b2774019c2b2d2e08529fd", 'hex'); +ecparams = ecurve.getCurveByName('secp256k1'); +const curvePt = ecparams.G.multiply(BigInteger.fromBuffer(privateKey)); +const x = curvePt.affineX.toBuffer(32); +const y = curvePt.affineY.toBuffer(32); -var ecparams = ecurve.getCurveByName('secp256k1'); -var curvePt = ecparams.G.multiply(BigInteger.fromBuffer(privateKey)); -var x = curvePt.affineX.toBuffer(32); -var y = curvePt.affineY.toBuffer(32); - -var publicKey = Buffer.concat([new Buffer([0x04]), x, y]); +let publicKey = Buffer.concat([new Buffer([0x04]), x, y]); console.log(publicKey.toString('hex')); // => 04d0988bfa799f7d7ef9ab3de97ef481cd0f75d2367ad456607647edde665d6f6fbdd594388756a7beaf73b4822bc22d36e9bda7db82df2b8b623673eefc0b7495 @@ -35,8 +33,8 @@ publicKey = curvePt.getEncoded(true); // true forces compressed public key console.log(publicKey.toString('hex')); // => 03d0988bfa799f7d7ef9ab3de97ef481cd0f75d2367ad456607647edde665d6f6f -var sha = crypto.createHash('sha256').update(publicKey).digest(); -var pubkeyHash = crypto.createHash('rmd160').update(sha).digest(); +const sha = crypto.createHash('sha256').update(publicKey).digest(); +const pubkeyHash = crypto.createHash('rmd160').update(sha).digest(); // pubkeyHash of compressed public key console.log(pubkeyHash.toString('hex')); @@ -50,4 +48,4 @@ console.log(cs.encode(privateKey, 0x80)); // <--- 0x80 is for private addresses // => 5Hx15HFGyep2CfPxsJKe2fXJsCVn5DEiyoeGGF6JZjGbTRnqfiD console.log(cs.encode(Buffer.concat([privateKey, new Buffer([0])]), 0x80)); // <-- compressed private address -// => KwomKti1X3tYJUUMb1TGSM2mrZk1wb1aHisUNHCQXTZq5aqzCxDY \ No newline at end of file +// => KwomKti1X3tYJUUMb1TGSM2mrZk1wb1aHisUNHCQXTZq5aqzCxDY diff --git a/types/electron/index.d.ts b/types/electron/index.d.ts index 11103b3a18..6e257c4261 100644 --- a/types/electron/index.d.ts +++ b/types/electron/index.d.ts @@ -1264,7 +1264,7 @@ declare namespace Electron { * Sets the menu as the window top menu. * Note: This API is not available on macOS. */ - setMenu(menu: Menu): void; + setMenu(menu: Menu | null): void; /** * Sets the progress value in the progress bar. * On Linux platform, only supports Unity desktop environment, you need to diff --git a/types/electron/test/main.ts b/types/electron/test/main.ts index 35a85a81dc..67a1a9954d 100644 --- a/types/electron/test/main.ts +++ b/types/electron/test/main.ts @@ -145,6 +145,9 @@ app.on('ready', () => { mainWindow.webContents.capturePage({x: 0, y: 0, width: 100, height: 200}, image => { console.log(image.toPNG()); }); + + mainWindow.setMenu(null); + mainWindow.setMenu(Menu.buildFromTemplate([])); }); app.commandLine.appendSwitch('enable-web-bluetooth'); diff --git a/types/ember/tslint.json b/types/ember/tslint.json index fcd9410184..c91d42f0b2 100644 --- a/types/ember/tslint.json +++ b/types/ember/tslint.json @@ -2,7 +2,7 @@ "extends": "../tslint.json", "rules": { // Heavy use of Function type in this older package. - "forbidden-types": false, + "ban-types": false, "no-misused-new": false, // not sure what this means "no-single-declare-module": false diff --git a/types/expect/expect-tests.ts b/types/expect/expect-tests.ts index c4312d1ada..6238a63c60 100644 --- a/types/expect/expect-tests.ts +++ b/types/expect/expect-tests.ts @@ -32,7 +32,8 @@ describe('createSpy', () => { }); describe('A spy', () => { - let targetContext: any, targetArguments: any; + let targetContext: any; + let targetArguments: any; const target = { method() { targetContext = this; @@ -88,7 +89,8 @@ describe('A spy', () => { }); describe('that calls some other function', () => { - let otherContext: any, otherArguments: any; + let otherContext: any; + let otherArguments: any; function otherFn() { otherContext = this; otherArguments = Array.prototype.slice.call(arguments, 0); diff --git a/types/f1/f1-tests.ts b/types/f1/f1-tests.ts index 8bfbbfb080..0934b097e3 100644 --- a/types/f1/f1-tests.ts +++ b/types/f1/f1-tests.ts @@ -1,5 +1,5 @@ import F1 = require("f1"); -var ui = F1(); +const ui = F1(); ui.states({ out: { @@ -23,8 +23,6 @@ ui.states({ } }); - - ui.transitions( [ { from: 'idle', to: 'rollOver', animation: { duration: 0.25 } }, { from: 'rollOver', to: 'idle', animation: { duration: 0.1 } } diff --git a/types/f1/index.d.ts b/types/f1/index.d.ts index 82c5cf8c4d..f463c1e97e 100644 --- a/types/f1/index.d.ts +++ b/types/f1/index.d.ts @@ -6,8 +6,8 @@ /// interface F1Options { - onState?: (...args: any[]) => void; - onUpdate?: (...args: any[]) => void; + onState?(...args: any[]): void; + onUpdate?(...args: any[]): void; name: string; diff --git a/types/fabric/index.d.ts b/types/fabric/index.d.ts index 27a4188f52..18b9c41e82 100644 --- a/types/fabric/index.d.ts +++ b/types/fabric/index.d.ts @@ -933,7 +933,7 @@ interface IStaticCanvasOptions { * Function that determines clipping of entire canvas area * Being passed context as first argument. See clipping canvas area */ - clipTo?: (context: CanvasRenderingContext2D) => void; + clipTo?(context: CanvasRenderingContext2D): void; /** * Indicates whether object controls (borders/controls) are rendered above overlay image diff --git a/types/fabric/tslint.json b/types/fabric/tslint.json index 525190cf34..4702666135 100644 --- a/types/fabric/tslint.json +++ b/types/fabric/tslint.json @@ -2,7 +2,7 @@ "extends": "../tslint.json", "rules": { "adjacent-overload-signatures": false, - "forbidden-types": false, + "ban-types": false, "interface-name": false, "no-empty-interface": false, "unified-signatures": false diff --git a/types/falcor/index.d.ts b/types/falcor/index.d.ts index 1bf3c9ba23..f5cea280a0 100644 --- a/types/falcor/index.d.ts +++ b/types/falcor/index.d.ts @@ -39,28 +39,24 @@ export { * Every DataSource is associated with a single JSON Graph object. * Models execute JSON Graph operations (get, set, and call) to retrieve values from the DataSource’s JSON Graph object. * DataSources may retrieve JSON Graph information from anywhere, including device memory, a remote machine, or even a lazily-run computation. - **/ + */ export abstract class DataSource { - /** * The get method retrieves values from the DataSource's associated JSONGraph object. - **/ + */ get(pathSets: PathSet[]): Observable; - /** * The set method accepts values to set in the DataSource's associated JSONGraph object. - **/ + */ set(jsonGraphEnvelope: JSONGraphEnvelope): Observable; - /** * Invokes a function in the DataSource's JSONGraph object. - **/ + */ call(functionPath: Path, args?: any[], refSuffixes?: PathSet[], thisPaths?: PathSet[]): Observable; } - ///////////////////////////////////////////////////// // Model ///////////////////////////////////////////////////// @@ -77,30 +73,30 @@ interface ModelOptions { /** * This callback is invoked when the Model's cache is changed. - **/ + */ type ModelOnChange = () => void; /** * This function is invoked on every JSONGraph Error retrieved from the DataSource. This function allows Error objects to be transformed before being stored in the Model's cache. - **/ + */ type ModelErrorSelector = (jsonGraphError: any) => any; /** * This function is invoked every time a value in the Model cache is about to be replaced with a new value. * If the function returns true, the existing value is replaced with a new value and the version flag on all of the value's ancestors in the tree are incremented. - **/ + */ type ModelComparator = (existingValue: any, newValue: any) => boolean; /** * A Model object is used to execute commands against a {@link JSONGraph} object * {@link Model}s can work with a local JSONGraph cache, or it can work with a remote {@link JSONGraph} object through a {@link DataSource}. - **/ + */ export class Model { constructor(options?: ModelOptions); /** * The get method retrieves several {@link Path}s or {@link PathSet}s from a {@link Model}. The get method loads each value into a JSON object and returns in a ModelResponse. - **/ + */ get(...path: Array): ModelResponse>; get(...path: Array): ModelResponse>; @@ -108,7 +104,7 @@ export class Model { * Sets the value at one or more places in the JSONGraph model. * The set method accepts one or more {@link PathValue}s, each of which is a combination of a location in the document and the value to place there. * In addition to accepting {@link PathValue}s, the set method also returns the values after the set operation is complete. - **/ + */ set(...args: PathValue[]): ModelResponse>; set(...args: PathValue[]): ModelResponse>; set(jsonGraph: JSONGraph): ModelResponse>; @@ -116,12 +112,12 @@ export class Model { /** * The preload method retrieves several {@link Path}s or {@link PathSet}s from a {@link Model} and loads them into the Model cache. - **/ + */ preload(...path: PathSet[]): void; /** * Invokes a function in the JSON Graph. - **/ + */ // NOTE: In http://netflix.github.io/falcor/doc/Model.html#call, it says that refPaths should be an PathSet[]. // However, model implementation returns an error with setting refPaths as PathSet[] and it works with refPaths as PathSet. // So refPaths is defined as a PathSet in this .d.ts. @@ -130,7 +126,7 @@ export class Model { /** * The invalidate method synchronously removes several {@link Path}s or {@link PathSet}s from a {@link Model} cache. - **/ + */ invalidate(...path: PathSet[]): void; /** @@ -140,82 +136,81 @@ export class Model { * - Expose only a fragment of the {@link JSONGraph} to components, rather than the entire graph * - Hide the location of a {@link JSONGraph} fragment from components * - Optimize for executing multiple operations and path looksup at/below the same location in the {@link JSONGraph} - **/ + */ deref(responseObject: any): Model; /** * Get data for a single {@link Path}. - **/ + */ getValue(path: string | Path): ModelResponse; getValue(path: string | Path): ModelResponse; /** * Set value for a single {@link Path}. - **/ + */ setValue(path: string | Path, value: any): ModelResponse; setValue(path: string | Path, value: any): ModelResponse; /** * Set the local cache to a {@link JSONGraph} fragment. This method can be a useful way of mocking a remote document, or restoring the local cache from a previously stored state. - **/ + */ setCache(jsonGraph: JSONGraph): void; /** * Get the local {@link JSONGraph} cache. This method can be a useful to store the state of the cache. - **/ + */ getCache(...path: PathSet[]): JSONGraph; /** * Retrieves a number which is incremented every single time a value is changed underneath the Model or the object at an optionally-provided Path beneath the Model. - **/ + */ getVersion(path?: Path): number; /** * Returns a clone of the {@link Model} that enables batching. Within the configured time period, paths for get operations are collected and sent to the {@link DataSource} in a batch. * Batching can be more efficient if the {@link DataSource} access the network, potentially reducing the number of HTTP requests to the server. - **/ + */ batch(schedulerOrDelay?: number | Scheduler): Model; // FIXME what's a valid type for scheduler? /** * Returns a clone of the {@link Model} that disables batching. This is the default mode. Each get operation will be executed on the {@link DataSource} separately. - **/ + */ unbatch(): Model; /** * Returns a clone of the {@link Model} that treats errors as values. Errors will be reported in the same callback used to report data. * Errors will appear as objects in responses, rather than being sent to the {@link Observable~onErrorCallback} callback of the {@link ModelResponse}. - **/ + */ treatErrorsAsValues(): Model; /** * Adapts a Model to the {@link DataSource} interface. - **/ + */ asDataSource(): DataSource; /** * Returns a clone of the {@link Model} that boxes values returning the wrapper ({@link Atom}, {@link Reference}, or {@link Error}), rather than the value inside it. * This allows any metadata attached to the wrapper to be inspected. - **/ + */ boxValues(): Model; /** * Returns a clone of the {@link Model} that unboxes values, returning the value inside of the wrapper ({@link Atom}, {@link Reference}, or {@link Error}), rather than the wrapper itself. * This is the default mode. - **/ + */ unboxValues(): Model; /** * Returns a clone of the {@link Model} that only uses the local {@link JSONGraph} and never uses a {@link DataSource} to retrieve missing paths. - **/ + */ withoutDataSource(): Model; /** * Returns the {@link Path} to the object within the JSON Graph that this Model references. - **/ + */ getPath(): Path; } - ///////////////////////////////////////////////////// // ModelResponse ///////////////////////////////////////////////////// @@ -232,50 +227,48 @@ interface Thenable { then(onFulfilled?: (value: T) => U | Thenable, onRejected?: (error: any) => U | Thenable | void): Thenable; } - ///////////////////////////////////////////////////// // Observable ///////////////////////////////////////////////////// export class Observable{ - /** * The forEach method is a synonym for {@link Observable.prototype.subscribe} and triggers the execution of the Observable, causing the values within to be pushed to a callback. * An Observable is like a pipe of water that is closed. * When forEach is called, we open the valve and the values within are pushed at us. * These values can be received using either callbacks or an {@link Observer} object. - **/ + */ forEach(onNext?: ObservableOnNextCallback, onError?: ObservableOnErrorCallback , onCompleted?: ObservableOnCompletedCallback ): Subscription; /** * The subscribe method is a synonym for {@link Observable.prototype.forEach} and triggers the execution of the Observable, causing the values within to be pushed to a callback. * An Observable is like a pipe of water that is closed. * When forEach is called, we open the valve and the values within are pushed at us. These values can be received using either callbacks or an {@link Observer} object. - **/ + */ subscribe(onNext?: ObservableOnNextCallback, onError?: ObservableOnErrorCallback , onCompleted?: ObservableOnCompletedCallback ): Subscription; } /** * This callback accepts a value that was emitted while evaluating the operation underlying the {@link Observable} stream. - **/ + */ type ObservableOnNextCallback = (value: T) => void; /** * This callback accepts an error that occurred while evaluating the operation underlying the {@link Observable} stream. * When this callback is invoked, the {@link Observable} stream ends and no more values will be received by the {@link Observable~onNextCallback}. - **/ + */ type ObservableOnErrorCallback = (error: Error) => void; /** * This callback is invoked when the {@link Observable} stream ends. * When this callback is invoked the {@link Observable} stream has ended, and therefore the {@link Observable~onNextCallback} will not receive any more values. - **/ + */ type ObservableOnCompletedCallback = () => void; export class Subscription { /** * When this method is called on the Subscription, the Observable that created the Subscription will stop sending values to the callbacks passed when the Subscription was created. - **/ + */ dispose(): void; } diff --git a/types/falcor/test/browser.ts b/types/falcor/test/browser.ts index 073d777679..d2390f107d 100644 --- a/types/falcor/test/browser.ts +++ b/types/falcor/test/browser.ts @@ -1,6 +1,4 @@ - - -var model = new falcor.Model({source: new falcor.HttpDataSource('/model.json')}); +const model = new falcor.Model({source: new falcor.HttpDataSource('/model.json')}); model.get('greeting').then(response => { document.write(response.json.greeting); @@ -15,4 +13,3 @@ model.set({ }); model.set(falcor.pathValue('greeting', 'Hello, world')); - diff --git a/types/falcor/test/index.ts b/types/falcor/test/index.ts index 2798b72645..8eea62b2f2 100644 --- a/types/falcor/test/index.ts +++ b/types/falcor/test/index.ts @@ -127,4 +127,3 @@ subscription.dispose(); modelResponse.then(res => res.json.items.length); modelResponse.then(res => res, error => console.error.bind(error)); modelResponse.then(res => res.json.items.length).then((l: number) => l + 1); - diff --git a/types/fetch-jsonp/fetch-jsonp-tests.ts b/types/fetch-jsonp/fetch-jsonp-tests.ts index 058f47e70c..6a0d58f513 100644 --- a/types/fetch-jsonp/fetch-jsonp-tests.ts +++ b/types/fetch-jsonp/fetch-jsonp-tests.ts @@ -4,45 +4,45 @@ import * as fetchJsonp from 'fetch-jsonp'; fetchJsonp('/users.jsonp') .then(function(response) { - return response.json() + return response.json(); }).then(function(json) { - console.log('parsed json', json) + console.log('parsed json', json); }).catch(function(ex) { - console.log('parsing failed', ex) - }) + console.log('parsing failed', ex); + }); fetchJsonp('/users.jsonp', { jsonpCallback: 'custom_callback' }) .then(function(response) { - return response.json() + return response.json(); }).then(function(json) { - console.log('parsed json', json) + console.log('parsed json', json); }).catch(function(ex) { - console.log('parsing failed', ex) - }) + console.log('parsing failed', ex); + }); fetchJsonp('/users.jsonp', { timeout: 3000, jsonpCallback: 'custom_callback' }) .then(function(response) { - return response.json() + return response.json(); }).then(function(json) { - console.log('parsed json', json) + console.log('parsed json', json); }).catch(function(ex) { - console.log('parsing failed', ex) - }) + console.log('parsing failed', ex); + }); // Taken from https://github.com/camsong/fetch-jsonp/blob/v1.0.2/examples/index.html -var result = fetchJsonp('http://www.flickr.com/services/feeds/photos_public.gne?format=json', { +const result = fetchJsonp('http://www.flickr.com/services/feeds/photos_public.gne?format=json', { jsonpCallback: 'jsoncallback', timeout: 3000 -}) +}); result.then(function(response) { - return response.json() + return response.json(); }).then(function(json) { document.body.innerHTML = JSON.stringify(json); })['catch'](function(ex) { document.body.innerHTML = 'failed:' + ex; -}) +}); diff --git a/types/fetch.io/index.d.ts b/types/fetch.io/index.d.ts index 966925b68f..2071e18a51 100644 --- a/types/fetch.io/index.d.ts +++ b/types/fetch.io/index.d.ts @@ -30,7 +30,7 @@ interface Options extends RequestInit { afterJSON?(body: any): void; } -declare class Request { +export class Request { constructor(method: TMethod, url: TUrl, options: Options) /** @@ -66,51 +66,51 @@ declare class Request { /** * Set Options */ - config(key: string, value: any): this + config(key: string, value: any): this; - config(opts: {[key: string]: any}): this + config(opts: {[key: string]: any}): this; /** * Set Header */ - set(key: string, value: any): this + set(key: string, value: any): this; - set(opts: {[key: string]: any}): this + set(opts: {[key: string]: any}): this; /** * Set Content-Type */ - type(type: 'json' | 'form' | 'urlencoded'): this + type(type: 'json' | 'form' | 'urlencoded'): this; /** * Add query string */ - query(object: {[key: string]: any}): this + query(object: {[key: string]: any}): this; /** * Send data */ - send(data: {[key: string]: any}): this + send(data: {[key: string]: any}): this; /** * ppend formData */ - append(key: string, value: string): this + append(key: string, value: string): this; /** * Get Response directly */ - then(resolve: (value?: Response) => void, reject?: (reason?: any) => void): Promise + then(resolve: (value?: Response) => void, reject?: (reason?: any) => void): Promise; /** * Make Response to JSON */ - json(strict?: boolean): Promise + json(strict?: boolean): Promise; /** * Make Response to string */ - text(): Promise + text(): Promise; } export default class Fetch extends Request { diff --git a/types/firmata/firmata-tests.ts b/types/firmata/firmata-tests.ts index 5e1eab09cb..d50160e2dd 100644 --- a/types/firmata/firmata-tests.ts +++ b/types/firmata/firmata-tests.ts @@ -1,42 +1,33 @@ -import * as Board from 'firmata' +import * as Board from 'firmata'; -function test_basic_board() -{ - let board = new Board(''); +function test_basic_board() { + const board = new Board(''); } -function test_board_with_callback() -{ - let board = new Board('', (error: any) => - { +function test_board_with_callback() { + const board = new Board('', (error: any) => { board.pinMode(13, board.MODES.OUTPUT); board.pinMode(12, Board.PIN_MODE.OUTPUT); }); } -function test_board_with_listener() -{ - let board = new Board(''); +function test_board_with_listener() { + const board = new Board(''); - board.on('ready', () => - { + board.on('ready', () => { board.pinMode(13, board.MODES.OUTPUT); board.pinMode(12, Board.PIN_MODE.OUTPUT); }); } -function test_class_extension() -{ - class MyBoard extends Board - { - Disconnect() - { +function test_class_extension() { + class MyBoard extends Board { + Disconnect() { this.transport.close((error: any) => {}); } } - let myBoard: MyBoard = new MyBoard('', () => - { + const myBoard: MyBoard = new MyBoard('', () => { myBoard.Disconnect(); }); -} \ No newline at end of file +} diff --git a/types/firmata/index.d.ts b/types/firmata/index.d.ts index 4bda44d3f9..a24fae435b 100644 --- a/types/firmata/index.d.ts +++ b/types/firmata/index.d.ts @@ -5,7 +5,7 @@ /// -import * as SerialPort from 'serialport' +import * as SerialPort from 'serialport'; export = Board; @@ -15,8 +15,7 @@ export = Board; * This is a starting point that appeared to work fine for months within a project of my company, but I give no * guarantee that it cannot be improved. */ -declare class Board extends NodeJS.EventEmitter -{ +declare class Board extends NodeJS.EventEmitter { constructor(serialPort: string, callback?: (error: any) => void) MODES: Board.PinModes; STEPPER: Board.StepperConstants; @@ -84,7 +83,11 @@ declare class Board extends NodeJS.EventEmitter // TODO untested --- TWW sendOneWireDelay(pin: number, delay: number): void // TODO untested --- TWW - sendOneWireWriteAndRead(pin: number, device: number, data: number|number[], numBytesToRead: number, + sendOneWireWriteAndRead( + pin: number, + device: number, + data: number|number[], + numBytesToRead: number, callback: (error?: Error, data?: number) => void): void setSamplingInterval(interval: number): void getSamplingInterval(): number @@ -92,124 +95,165 @@ declare class Board extends NodeJS.EventEmitter reportDigitalPin(pin: number, value: Board.REPORTING): void // TODO untested/incomplete --- TWW pingRead(opts: any, callback: () => void): void - stepperConfig(deviceNum: number, type: number, stepsPerRev: number, dirOrMotor1Pin: number, - stepOrMotor2Pin: number, motor3Pin?: number, motor4Pin?: number): void - stepperStep(deviceNum: number, direction: Board.STEPPER_DIRECTION, steps: number, speed: number, - accel: number|((bool?: boolean) => void), decel?: number, callback?: (bool?: boolean) => void): void + stepperConfig( + deviceNum: number, + type: number, + stepsPerRev: number, + dirOrMotor1Pin: number, + stepOrMotor2Pin: number, + motor3Pin?: number, + motor4Pin?: number): void + stepperStep( + deviceNum: number, + direction: Board.STEPPER_DIRECTION, + steps: number, + speed: number, + accel: number|((bool?: boolean) => void), + decel?: number, + callback?: (bool?: boolean) => void): void; // TODO untested --- TWW - serialConfig(options: { portId: Board.SERIAL_PORT_ID, baud: number, rxPin?: number, txPin?: number }): void + serialConfig(options: { portId: Board.SERIAL_PORT_ID, baud: number, rxPin?: number, txPin?: number }): void; // TODO untested --- TWW - serialWrite(portId: Board.SERIAL_PORT_ID, inBytes: number[]): void + serialWrite(portId: Board.SERIAL_PORT_ID, inBytes: number[]): void; // TODO untested --- TWW - serialRead(portId: Board.SERIAL_PORT_ID, maxBytesToRead: number, callback: () => void): void + serialRead(portId: Board.SERIAL_PORT_ID, maxBytesToRead: number, callback: () => void): void; // TODO untested --- TWW - serialStop(portId: Board.SERIAL_PORT_ID): void + serialStop(portId: Board.SERIAL_PORT_ID): void; // TODO untested --- TWW - serialClose(portId: Board.SERIAL_PORT_ID): void + serialClose(portId: Board.SERIAL_PORT_ID): void; // TODO untested --- TWW - serialFlush(portId: Board.SERIAL_PORT_ID): void + serialFlush(portId: Board.SERIAL_PORT_ID): void; // TODO untested --- TWW - serialListen(portId: Board.SERIAL_PORT_ID): void + serialListen(portId: Board.SERIAL_PORT_ID): void; // TODO untested --- TWW - sysexResponse(commandByte: number, handler: (data: number[]) => void): void + sysexResponse(commandByte: number, handler: (data: number[]) => void): void; // TODO untested --- TWW - sysexCommand(message: number[]): void - reset(): void - static isAcceptablePort(port: Board.Port): boolean - static requestPort(callback: (error: any, port: Board.Port) => any): void + sysexCommand(message: number[]): void; + reset(): void; + static isAcceptablePort(port: Board.Port): boolean; + static requestPort(callback: (error: any, port: Board.Port) => any): void; // TODO untested --- TWW - static encode(data: number[]): number[] + static encode(data: number[]): number[]; // TODO untested --- TWW - static decode(data: number[]): number[] + static decode(data: number[]): number[]; // TODO untested/incomplete --- TWW - protected _sendOneWireSearch(type: any, event: any, pin: number, callback: () => void): void + protected _sendOneWireSearch(type: any, event: any, pin: number, callback: () => void): void; // TODO untested/incomplete --- TWW - protected _sendOneWireRequest(pin: number, subcommand: any, device: any, numBytesToRead: any, correlationId: any, - delay: number, dataToWrite: any, event: any, callback: () => void): void + protected _sendOneWireRequest( + pin: number, + subcommand: any, + device: any, + numBytesToRead: any, + correlationId: any, + delay: number, + dataToWrite: any, + event: any, callback: () => void): void; } -declare namespace Board -{ - export interface PinModes - { - INPUT: PIN_MODE, OUTPUT: PIN_MODE, ANALOG: PIN_MODE, PWM: PIN_MODE, SERVO: PIN_MODE, SHIFT: PIN_MODE, - I2C: PIN_MODE, ONEWIRE: PIN_MODE, STEPPER: PIN_MODE, SERIAL: PIN_MODE, PULLUP: PIN_MODE, IGNORE: PIN_MODE, - PING_READ: PIN_MODE, UNKOWN: PIN_MODE +declare namespace Board { + interface PinModes { + INPUT: PIN_MODE; + OUTPUT: PIN_MODE; + ANALOG: PIN_MODE; + PWM: PIN_MODE; + SERVO: PIN_MODE; + SHIFT: PIN_MODE; + I2C: PIN_MODE; + ONEWIRE: PIN_MODE; + STEPPER: PIN_MODE; + SERIAL: PIN_MODE; + PULLUP: PIN_MODE; + IGNORE: PIN_MODE; + PING_READ: PIN_MODE; + UNKOWN: PIN_MODE; } - export interface StepperConstants - { - TYPE: { DRIVER: STEPPER_TYPE, TWO_WIRE: STEPPER_TYPE, FOUR_WIRE: STEPPER_TYPE }, + interface StepperConstants { + TYPE: { + DRIVER: STEPPER_TYPE, + TWO_WIRE: STEPPER_TYPE, + FOUR_WIRE: STEPPER_TYPE, + }; RUNSTATE: { - STOP: STEPPER_RUN_STATE, ACCEL: STEPPER_RUN_STATE, DECEL: STEPPER_RUN_STATE, RUN: STEPPER_RUN_STATE - }, - DIRECTION: { CCW: STEPPER_DIRECTION, CW: STEPPER_DIRECTION } + STOP: STEPPER_RUN_STATE, + ACCEL: STEPPER_RUN_STATE, + DECEL: STEPPER_RUN_STATE, + RUN: STEPPER_RUN_STATE, + }; + DIRECTION: { CCW: STEPPER_DIRECTION, CW: STEPPER_DIRECTION }; } // tslint:disable-next-line interface-name - export interface I2cModes - { - WRITE: I2C_MODE, READ: I2C_MODE, CONTINUOUS_READ: I2C_MODE, STOP_READING: I2C_MODE + interface I2cModes { + WRITE: I2C_MODE; + READ: I2C_MODE; + CONTINUOUS_READ: I2C_MODE; + STOP_READING: I2C_MODE; } - export interface SerialModes - { - CONTINUOUS_READ: SERIAL_MODE, STOP_READING: SERIAL_MODE + interface SerialModes { + CONTINUOUS_READ: SERIAL_MODE; + STOP_READING: SERIAL_MODE; } - export interface SerialPortIds - { - HW_SERIAL0: SERIAL_PORT_ID, HW_SERIAL1: SERIAL_PORT_ID, HW_SERIAL2: SERIAL_PORT_ID, - HW_SERIAL3: SERIAL_PORT_ID, SW_SERIAL0: SERIAL_PORT_ID, SW_SERIAL1: SERIAL_PORT_ID, - SW_SERIAL2: SERIAL_PORT_ID, SW_SERIAL3: SERIAL_PORT_ID, DEFAULT: SERIAL_PORT_ID, + interface SerialPortIds { + HW_SERIAL0: SERIAL_PORT_ID; + HW_SERIAL1: SERIAL_PORT_ID; + HW_SERIAL2: SERIAL_PORT_ID; + HW_SERIAL3: SERIAL_PORT_ID; + SW_SERIAL0: SERIAL_PORT_ID; + SW_SERIAL1: SERIAL_PORT_ID; + SW_SERIAL2: SERIAL_PORT_ID; + SW_SERIAL3: SERIAL_PORT_ID; + DEFAULT: SERIAL_PORT_ID; } - export interface SerialPinTypes - { - RES_RX0: SERIAL_PIN_TYPE, RES_TX0: SERIAL_PIN_TYPE, RES_RX1: SERIAL_PIN_TYPE, RES_TX1: SERIAL_PIN_TYPE, - RES_RX2: SERIAL_PIN_TYPE, RES_TX2: SERIAL_PIN_TYPE, RES_RX3: SERIAL_PIN_TYPE, RES_TX3: SERIAL_PIN_TYPE, + interface SerialPinTypes { + RES_RX0: SERIAL_PIN_TYPE; + RES_TX0: SERIAL_PIN_TYPE; + RES_RX1: SERIAL_PIN_TYPE; + RES_TX1: SERIAL_PIN_TYPE; + RES_RX2: SERIAL_PIN_TYPE; + RES_TX2: SERIAL_PIN_TYPE; + RES_RX3: SERIAL_PIN_TYPE; + RES_TX3: SERIAL_PIN_TYPE; } - export interface Pins - { - mode: PIN_MODE, - value: PIN_STATE|number, - supportedModes: PIN_MODE[], - analogChannel: number, - report: REPORTING, - state: PIN_STATE|PULLUP_STATE, // TODO not sure if this exists anymore... --- TWW + interface Pins { + mode: PIN_MODE; + value: PIN_STATE | number; + supportedModes: PIN_MODE[]; + analogChannel: number; + report: REPORTING; + state: PIN_STATE | PULLUP_STATE; // TODO not sure if this exists anymore... --- TWW } - export interface Firmware - { - name: string, - version: Version, + interface Firmware { + name: string; + version: Version; } - export interface Settings - { - reportVersionTimeout: number, - samplingInterval: number, + interface Settings { + reportVersionTimeout: number; + samplingInterval: number; serialport: { baudRate: number, - bufferSize: number - } + bufferSize: number, + }; } - export interface Port - { - comName: string, + interface Port { + comName: string; } - export interface Version - { - major: number, - minor: number + interface Version { + major: number; + minor: number; } // TODO these enums could actually be non-const in the future (provides some benefits) --- TWW // https://github.com/firmata/firmata.js/blob/v0.15.0/lib/firmata.js#L449-L464 - export const enum PIN_MODE { + const enum PIN_MODE { INPUT = 0x00, OUTPUT = 0x01, ANALOG = 0x02, @@ -226,30 +270,30 @@ declare namespace Board UNKNOWN = 0x10, } - export const enum PIN_STATE { + const enum PIN_STATE { LOW = 0, HIGH = 1 } - export const enum REPORTING { + const enum REPORTING { ON = 1, OFF = 0, } - export const enum PULLUP_STATE { + const enum PULLUP_STATE { ENABLED = 1, DISABLED = 0, } // https://github.com/firmata/firmata.js/blob/v0.15.0/lib/firmata.js#L474-L478 - export const enum STEPPER_TYPE { + const enum STEPPER_TYPE { DRIVER = 1, TWO_WIRE = 2, FOUR_WIRE = 4, } // https://github.com/firmata/firmata.js/blob/v0.15.0/lib/firmata.js#L479-L484 - export const enum STEPPER_RUN_STATE { + const enum STEPPER_RUN_STATE { STOP = 0, ACCEL = 1, DECEL = 2, @@ -257,13 +301,13 @@ declare namespace Board } // https://github.com/firmata/firmata.js/blob/v0.15.0/lib/firmata.js#L485-L488 - export const enum STEPPER_DIRECTION { + const enum STEPPER_DIRECTION { CCW = 0, CW = 1, } // https://github.com/firmata/firmata.js/blob/v0.15.0/lib/firmata.js#L466-L471 - export const enum I2C_MODE { + const enum I2C_MODE { WRITE = 0, READ = 1, CONTINUOUS_READ = 2, @@ -271,13 +315,13 @@ declare namespace Board } // https://github.com/firmata/firmata.js/blob/v0.15.0/lib/firmata.js#L491-L494 - export const enum SERIAL_MODE { + const enum SERIAL_MODE { CONTINUOUS_READ = 0x00, STOP_READING = 0x01, } // https://github.com/firmata/firmata.js/blob/v0.15.0/lib/firmata.js#L497-L512 - export const enum SERIAL_PORT_ID { + const enum SERIAL_PORT_ID { HW_SERIAL0 = 0x00, HW_SERIAL1 = 0x01, HW_SERIAL2 = 0x02, @@ -290,7 +334,7 @@ declare namespace Board } // https://github.com/firmata/firmata.js/blob/v0.15.0/lib/firmata.js#L515-L524 - export const enum SERIAL_PIN_TYPE { + const enum SERIAL_PIN_TYPE { RES_RX0 = 0x00, RES_TX0 = 0x01, RES_RX1 = 0x02, @@ -300,4 +344,4 @@ declare namespace Board RES_RX3 = 0x06, RES_TX3 = 0x07, } -} \ No newline at end of file +} diff --git a/types/flatbuffers/flatbuffers-tests.ts b/types/flatbuffers/flatbuffers-tests.ts new file mode 100644 index 0000000000..8c33836d3c --- /dev/null +++ b/types/flatbuffers/flatbuffers-tests.ts @@ -0,0 +1,1458 @@ +/** + * @enum + */ +export namespace MyGame.Example{ +export enum Color{ + Red= 1, + Green= 2, + Blue= 8 +}}; + +/** + * @enum + */ +export namespace MyGame.Example{ +export enum Any{ + NONE= 0, + Monster= 1, + TestSimpleTableWithEnum= 2, + MyGame_Example2_Monster= 3 +}}; + +/** + * @constructor + */ +export namespace MyGame.Example2{ +export class Monster { + /** + * @type {flatbuffers.ByteBuffer} + */ + bb: flatbuffers.ByteBuffer= null; + + /** + * @type {number} + */ + bb_pos: number = 0; +/** + * @param {number} i + * @param {flatbuffers.ByteBuffer} bb + * @returns {Monster} + */ +__init(i: number, bb: flatbuffers.ByteBuffer): Monster { + this.bb_pos = i; + this.bb = bb; + return this; +}; + +/** + * @param {flatbuffers.ByteBuffer} bb + * @param {Monster=} obj + * @returns {Monster} + */ +static getRootAsMonster(bb: flatbuffers.ByteBuffer, obj?: Monster): Monster { + return (obj || new Monster).__init(bb.readInt32(bb.position()) + bb.position(), bb); +}; + +/** + * @param {flatbuffers.Builder} builder + */ +static startMonster(builder: flatbuffers.Builder) { + builder.startObject(0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @returns {flatbuffers.Offset} + */ +static endMonster(builder: flatbuffers.Builder): flatbuffers.Offset { + var offset = builder.endObject(); + return offset; +}; + +} +} +/** + * @constructor + */ +export namespace MyGame.Example{ +export class Test { + /** + * @type {flatbuffers.ByteBuffer} + */ + bb: flatbuffers.ByteBuffer= null; + + /** + * @type {number} + */ + bb_pos: number = 0; +/** + * @param {number} i + * @param {flatbuffers.ByteBuffer} bb + * @returns {Test} + */ +__init(i: number, bb: flatbuffers.ByteBuffer): Test { + this.bb_pos = i; + this.bb = bb; + return this; +}; + +/** + * @returns {number} + */ +a(): number { + return this.bb.readInt16(this.bb_pos); +}; + +/** + * @param {number} value + * @returns {boolean} + */ +mutate_a(value: number): boolean { + var offset = this.bb.__offset(this.bb_pos, 0); + + if (offset === 0) { + return false; + } + + this.bb.writeInt16(this.bb_pos + offset, value); + return true; +}; + +/** + * @returns {number} + */ +b(): number { + return this.bb.readInt8(this.bb_pos + 2); +}; + +/** + * @param {number} value + * @returns {boolean} + */ +mutate_b(value: number): boolean { + var offset = this.bb.__offset(this.bb_pos, 2); + + if (offset === 0) { + return false; + } + + this.bb.writeInt8(this.bb_pos + offset, value); + return true; +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} a + * @param {number} b + * @returns {flatbuffers.Offset} + */ +static createTest(builder: flatbuffers.Builder, a: number, b: number): flatbuffers.Offset { + builder.prep(2, 4); + builder.pad(1); + builder.writeInt8(b); + builder.writeInt16(a); + return builder.offset(); +}; + +} +} +/** + * @constructor + */ +export namespace MyGame.Example{ +export class TestSimpleTableWithEnum { + /** + * @type {flatbuffers.ByteBuffer} + */ + bb: flatbuffers.ByteBuffer= null; + + /** + * @type {number} + */ + bb_pos: number = 0; +/** + * @param {number} i + * @param {flatbuffers.ByteBuffer} bb + * @returns {TestSimpleTableWithEnum} + */ +__init(i: number, bb: flatbuffers.ByteBuffer): TestSimpleTableWithEnum { + this.bb_pos = i; + this.bb = bb; + return this; +}; + +/** + * @param {flatbuffers.ByteBuffer} bb + * @param {TestSimpleTableWithEnum=} obj + * @returns {TestSimpleTableWithEnum} + */ +static getRootAsTestSimpleTableWithEnum(bb: flatbuffers.ByteBuffer, obj?: TestSimpleTableWithEnum): TestSimpleTableWithEnum { + return (obj || new TestSimpleTableWithEnum).__init(bb.readInt32(bb.position()) + bb.position(), bb); +}; + +/** + * @returns {MyGame.Example.Color} + */ +color(): MyGame.Example.Color { + var offset = this.bb.__offset(this.bb_pos, 4); + return offset ? /** @type {MyGame.Example.Color} */ (this.bb.readInt8(this.bb_pos + offset)) : MyGame.Example.Color.Green; +}; + +/** + * @param {MyGame.Example.Color} value + * @returns {boolean} + */ +mutate_color(value: MyGame.Example.Color): boolean { + var offset = this.bb.__offset(this.bb_pos, 4); + + if (offset === 0) { + return false; + } + + this.bb.writeInt8(this.bb_pos + offset, value); + return true; +}; + +/** + * @param {flatbuffers.Builder} builder + */ +static startTestSimpleTableWithEnum(builder: flatbuffers.Builder) { + builder.startObject(1); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {MyGame.Example.Color} color + */ +static addColor(builder: flatbuffers.Builder, color: MyGame.Example.Color) { + builder.addFieldInt8(0, color, MyGame.Example.Color.Green); +}; + +/** + * @param {flatbuffers.Builder} builder + * @returns {flatbuffers.Offset} + */ +static endTestSimpleTableWithEnum(builder: flatbuffers.Builder): flatbuffers.Offset { + var offset = builder.endObject(); + return offset; +}; + +} +} +/** + * @constructor + */ +export namespace MyGame.Example{ +export class Vec3 { + /** + * @type {flatbuffers.ByteBuffer} + */ + bb: flatbuffers.ByteBuffer= null; + + /** + * @type {number} + */ + bb_pos: number = 0; +/** + * @param {number} i + * @param {flatbuffers.ByteBuffer} bb + * @returns {Vec3} + */ +__init(i: number, bb: flatbuffers.ByteBuffer): Vec3 { + this.bb_pos = i; + this.bb = bb; + return this; +}; + +/** + * @returns {number} + */ +x(): number { + return this.bb.readFloat32(this.bb_pos); +}; + +/** + * @param {number} value + * @returns {boolean} + */ +mutate_x(value: number): boolean { + var offset = this.bb.__offset(this.bb_pos, 0); + + if (offset === 0) { + return false; + } + + this.bb.writeFloat32(this.bb_pos + offset, value); + return true; +}; + +/** + * @returns {number} + */ +y(): number { + return this.bb.readFloat32(this.bb_pos + 4); +}; + +/** + * @param {number} value + * @returns {boolean} + */ +mutate_y(value: number): boolean { + var offset = this.bb.__offset(this.bb_pos, 4); + + if (offset === 0) { + return false; + } + + this.bb.writeFloat32(this.bb_pos + offset, value); + return true; +}; + +/** + * @returns {number} + */ +z(): number { + return this.bb.readFloat32(this.bb_pos + 8); +}; + +/** + * @param {number} value + * @returns {boolean} + */ +mutate_z(value: number): boolean { + var offset = this.bb.__offset(this.bb_pos, 8); + + if (offset === 0) { + return false; + } + + this.bb.writeFloat32(this.bb_pos + offset, value); + return true; +}; + +/** + * @returns {number} + */ +test1(): number { + return this.bb.readFloat64(this.bb_pos + 16); +}; + +/** + * @param {number} value + * @returns {boolean} + */ +mutate_test1(value: number): boolean { + var offset = this.bb.__offset(this.bb_pos, 16); + + if (offset === 0) { + return false; + } + + this.bb.writeFloat64(this.bb_pos + offset, value); + return true; +}; + +/** + * @returns {MyGame.Example.Color} + */ +test2(): MyGame.Example.Color { + return /** @type {MyGame.Example.Color} */ (this.bb.readInt8(this.bb_pos + 24)); +}; + +/** + * @param {MyGame.Example.Color} value + * @returns {boolean} + */ +mutate_test2(value: MyGame.Example.Color): boolean { + var offset = this.bb.__offset(this.bb_pos, 24); + + if (offset === 0) { + return false; + } + + this.bb.writeInt8(this.bb_pos + offset, value); + return true; +}; + +/** + * @param {MyGame.Example.Test=} obj + * @returns {MyGame.Example.Test} + */ +test3(obj?: MyGame.Example.Test): MyGame.Example.Test { + return (obj || new MyGame.Example.Test).__init(this.bb_pos + 26, this.bb); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} x + * @param {number} y + * @param {number} z + * @param {number} test1 + * @param {MyGame.Example.Color} test2 + * @param {number} test3_a + * @param {number} test3_b + * @returns {flatbuffers.Offset} + */ +static createVec3(builder: flatbuffers.Builder, x: number, y: number, z: number, test1: number, test2: MyGame.Example.Color, test3_a: number, test3_b: number): flatbuffers.Offset { + builder.prep(16, 32); + builder.pad(2); + builder.prep(2, 4); + builder.pad(1); + builder.writeInt8(test3_b); + builder.writeInt16(test3_a); + builder.pad(1); + builder.writeInt8(test2); + builder.writeFloat64(test1); + builder.pad(4); + builder.writeFloat32(z); + builder.writeFloat32(y); + builder.writeFloat32(x); + return builder.offset(); +}; + +} +} +/** + * @constructor + */ +export namespace MyGame.Example{ +export class Stat { + /** + * @type {flatbuffers.ByteBuffer} + */ + bb: flatbuffers.ByteBuffer= null; + + /** + * @type {number} + */ + bb_pos: number = 0; +/** + * @param {number} i + * @param {flatbuffers.ByteBuffer} bb + * @returns {Stat} + */ +__init(i: number, bb: flatbuffers.ByteBuffer): Stat { + this.bb_pos = i; + this.bb = bb; + return this; +}; + +/** + * @param {flatbuffers.ByteBuffer} bb + * @param {Stat=} obj + * @returns {Stat} + */ +static getRootAsStat(bb: flatbuffers.ByteBuffer, obj?: Stat): Stat { + return (obj || new Stat).__init(bb.readInt32(bb.position()) + bb.position(), bb); +}; + +/** + * @param {flatbuffers.Encoding=} optionalEncoding + * @returns {string|Uint8Array} + */ +id(): string +id(optionalEncoding: flatbuffers.Encoding): string|Uint8Array +id(optionalEncoding?: any): string|Uint8Array { + var offset = this.bb.__offset(this.bb_pos, 4); + return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null; +}; + +/** + * @returns {flatbuffers.Long} + */ +val(): flatbuffers.Long { + var offset = this.bb.__offset(this.bb_pos, 6); + return offset ? this.bb.readInt64(this.bb_pos + offset) : this.bb.createLong(0, 0); +}; + +/** + * @param {flatbuffers.Long} value + * @returns {boolean} + */ +mutate_val(value: flatbuffers.Long): boolean { + var offset = this.bb.__offset(this.bb_pos, 6); + + if (offset === 0) { + return false; + } + + this.bb.writeInt64(this.bb_pos + offset, value); + return true; +}; + +/** + * @returns {number} + */ +count(): number { + var offset = this.bb.__offset(this.bb_pos, 8); + return offset ? this.bb.readUint16(this.bb_pos + offset) : 0; +}; + +/** + * @param {flatbuffers.Builder} builder + */ +static startStat(builder: flatbuffers.Builder) { + builder.startObject(3); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} idOffset + */ +static addId(builder: flatbuffers.Builder, idOffset: flatbuffers.Offset) { + builder.addFieldOffset(0, idOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Long} val + */ +static addVal(builder: flatbuffers.Builder, val: flatbuffers.Long) { + builder.addFieldInt64(1, val, builder.createLong(0, 0)); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} count + */ +static addCount(builder: flatbuffers.Builder, count: number) { + builder.addFieldInt16(2, count, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @returns {flatbuffers.Offset} + */ +static endStat(builder: flatbuffers.Builder): flatbuffers.Offset { + var offset = builder.endObject(); + return offset; +}; + +} +} +/** + * an example documentation comment: monster object + * + * @constructor + */ +export namespace MyGame.Example{ +export class Monster { + /** + * @type {flatbuffers.ByteBuffer} + */ + bb: flatbuffers.ByteBuffer= null; + + /** + * @type {number} + */ + bb_pos: number = 0; +/** + * @param {number} i + * @param {flatbuffers.ByteBuffer} bb + * @returns {Monster} + */ +__init(i: number, bb: flatbuffers.ByteBuffer): Monster { + this.bb_pos = i; + this.bb = bb; + return this; +}; + +/** + * @param {flatbuffers.ByteBuffer} bb + * @param {Monster=} obj + * @returns {Monster} + */ +static getRootAsMonster(bb: flatbuffers.ByteBuffer, obj?: Monster): Monster { + return (obj || new Monster).__init(bb.readInt32(bb.position()) + bb.position(), bb); +}; + +/** + * @param {flatbuffers.ByteBuffer} bb + * @returns {boolean} + */ +static bufferHasIdentifier(bb: flatbuffers.ByteBuffer): boolean { + return bb.__has_identifier('MONS'); +}; + +/** + * @param {MyGame.Example.Vec3=} obj + * @returns {MyGame.Example.Vec3} + */ +pos(obj?: MyGame.Example.Vec3): MyGame.Example.Vec3 { + var offset = this.bb.__offset(this.bb_pos, 4); + return offset ? (obj || new MyGame.Example.Vec3).__init(this.bb_pos + offset, this.bb) : null; +}; + +/** + * @returns {number} + */ +mana(): number { + var offset = this.bb.__offset(this.bb_pos, 6); + return offset ? this.bb.readInt16(this.bb_pos + offset) : 150; +}; + +/** + * @param {number} value + * @returns {boolean} + */ +mutate_mana(value: number): boolean { + var offset = this.bb.__offset(this.bb_pos, 6); + + if (offset === 0) { + return false; + } + + this.bb.writeInt16(this.bb_pos + offset, value); + return true; +}; + +/** + * @returns {number} + */ +hp(): number { + var offset = this.bb.__offset(this.bb_pos, 8); + return offset ? this.bb.readInt16(this.bb_pos + offset) : 100; +}; + +/** + * @param {number} value + * @returns {boolean} + */ +mutate_hp(value: number): boolean { + var offset = this.bb.__offset(this.bb_pos, 8); + + if (offset === 0) { + return false; + } + + this.bb.writeInt16(this.bb_pos + offset, value); + return true; +}; + +/** + * @param {flatbuffers.Encoding=} optionalEncoding + * @returns {string|Uint8Array} + */ +name(): string +name(optionalEncoding: flatbuffers.Encoding): string|Uint8Array +name(optionalEncoding?: any): string|Uint8Array { + var offset = this.bb.__offset(this.bb_pos, 10); + return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null; +}; + +/** + * @param {number} index + * @returns {number} + */ +inventory(index: number): number { + var offset = this.bb.__offset(this.bb_pos, 14); + return offset ? this.bb.readUint8(this.bb.__vector(this.bb_pos + offset) + index) : 0; +}; + +/** + * @returns {number} + */ +inventoryLength(): number { + var offset = this.bb.__offset(this.bb_pos, 14); + return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0; +}; + +/** + * @returns {Uint8Array} + */ +inventoryArray(): Uint8Array { + var offset = this.bb.__offset(this.bb_pos, 14); + return offset ? new Uint8Array(this.bb.bytes().buffer, this.bb.bytes().byteOffset + this.bb.__vector(this.bb_pos + offset), this.bb.__vector_len(this.bb_pos + offset)) : null; +}; + +/** + * @returns {MyGame.Example.Color} + */ +color(): MyGame.Example.Color { + var offset = this.bb.__offset(this.bb_pos, 16); + return offset ? /** @type {MyGame.Example.Color} */ (this.bb.readInt8(this.bb_pos + offset)) : MyGame.Example.Color.Blue; +}; + +/** + * @param {MyGame.Example.Color} value + * @returns {boolean} + */ +mutate_color(value: MyGame.Example.Color): boolean { + var offset = this.bb.__offset(this.bb_pos, 16); + + if (offset === 0) { + return false; + } + + this.bb.writeInt8(this.bb_pos + offset, value); + return true; +}; + +/** + * @returns {MyGame.Example.Any} + */ +testType(): MyGame.Example.Any { + var offset = this.bb.__offset(this.bb_pos, 18); + return offset ? /** @type {MyGame.Example.Any} */ (this.bb.readUint8(this.bb_pos + offset)) : MyGame.Example.Any.NONE; +}; + +/** + * @param {flatbuffers.Table} obj + * @returns {?flatbuffers.Table} + */ +test(obj: T): T { + var offset = this.bb.__offset(this.bb_pos, 20); + return offset ? this.bb.__union(obj, this.bb_pos + offset) : null; +}; + +/** + * @param {number} index + * @param {MyGame.Example.Test=} obj + * @returns {MyGame.Example.Test} + */ +test4(index: number, obj?: MyGame.Example.Test): MyGame.Example.Test { + var offset = this.bb.__offset(this.bb_pos, 22); + return offset ? (obj || new MyGame.Example.Test).__init(this.bb.__vector(this.bb_pos + offset) + index * 4, this.bb) : null; +}; + +/** + * @returns {number} + */ +test4Length(): number { + var offset = this.bb.__offset(this.bb_pos, 22); + return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0; +}; + +/** + * @param {number} index + * @param {flatbuffers.Encoding=} optionalEncoding + * @returns {string|Uint8Array} + */ +testarrayofstring(index: number): string +testarrayofstring(index: number, optionalEncoding: flatbuffers.Encoding): string|Uint8Array +testarrayofstring(index: number, optionalEncoding?: any): string|Uint8Array { + var offset = this.bb.__offset(this.bb_pos, 24); + return offset ? this.bb.__string(this.bb.__vector(this.bb_pos + offset) + index * 4, optionalEncoding) : null; +}; + +/** + * @returns {number} + */ +testarrayofstringLength(): number { + var offset = this.bb.__offset(this.bb_pos, 24); + return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0; +}; + +/** + * an example documentation comment: this will end up in the generated code + * multiline too + * + * @param {number} index + * @param {MyGame.Example.Monster=} obj + * @returns {MyGame.Example.Monster} + */ +testarrayoftables(index: number, obj?: MyGame.Example.Monster): MyGame.Example.Monster { + var offset = this.bb.__offset(this.bb_pos, 26); + return offset ? (obj || new MyGame.Example.Monster).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos + offset) + index * 4), this.bb) : null; +}; + +/** + * @returns {number} + */ +testarrayoftablesLength(): number { + var offset = this.bb.__offset(this.bb_pos, 26); + return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0; +}; + +/** + * @param {MyGame.Example.Monster=} obj + * @returns {MyGame.Example.Monster} + */ +enemy(obj?: MyGame.Example.Monster): MyGame.Example.Monster { + var offset = this.bb.__offset(this.bb_pos, 28); + return offset ? (obj || new MyGame.Example.Monster).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null; +}; + +/** + * @param {number} index + * @returns {number} + */ +testnestedflatbuffer(index: number): number { + var offset = this.bb.__offset(this.bb_pos, 30); + return offset ? this.bb.readUint8(this.bb.__vector(this.bb_pos + offset) + index) : 0; +}; + +/** + * @returns {number} + */ +testnestedflatbufferLength(): number { + var offset = this.bb.__offset(this.bb_pos, 30); + return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0; +}; + +/** + * @returns {Uint8Array} + */ +testnestedflatbufferArray(): Uint8Array { + var offset = this.bb.__offset(this.bb_pos, 30); + return offset ? new Uint8Array(this.bb.bytes().buffer, this.bb.bytes().byteOffset + this.bb.__vector(this.bb_pos + offset), this.bb.__vector_len(this.bb_pos + offset)) : null; +}; + +/** + * @param {MyGame.Example.Stat=} obj + * @returns {MyGame.Example.Stat} + */ +testempty(obj?: MyGame.Example.Stat): MyGame.Example.Stat { + var offset = this.bb.__offset(this.bb_pos, 32); + return offset ? (obj || new MyGame.Example.Stat).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null; +}; + +/** + * @returns {boolean} + */ +testbool(): boolean { + var offset = this.bb.__offset(this.bb_pos, 34); + return offset ? !!this.bb.readInt8(this.bb_pos + offset) : false; +}; + +/** + * @returns {number} + */ +testhashs32Fnv1(): number { + var offset = this.bb.__offset(this.bb_pos, 36); + return offset ? this.bb.readInt32(this.bb_pos + offset) : 0; +}; + +/** + * @param {number} value + * @returns {boolean} + */ +mutate_testhashs32_fnv1(value: number): boolean { + var offset = this.bb.__offset(this.bb_pos, 36); + + if (offset === 0) { + return false; + } + + this.bb.writeInt32(this.bb_pos + offset, value); + return true; +}; + +/** + * @returns {number} + */ +testhashu32Fnv1(): number { + var offset = this.bb.__offset(this.bb_pos, 38); + return offset ? this.bb.readUint32(this.bb_pos + offset) : 0; +}; + +/** + * @returns {flatbuffers.Long} + */ +testhashs64Fnv1(): flatbuffers.Long { + var offset = this.bb.__offset(this.bb_pos, 40); + return offset ? this.bb.readInt64(this.bb_pos + offset) : this.bb.createLong(0, 0); +}; + +/** + * @param {flatbuffers.Long} value + * @returns {boolean} + */ +mutate_testhashs64_fnv1(value: flatbuffers.Long): boolean { + var offset = this.bb.__offset(this.bb_pos, 40); + + if (offset === 0) { + return false; + } + + this.bb.writeInt64(this.bb_pos + offset, value); + return true; +}; + +/** + * @returns {flatbuffers.Long} + */ +testhashu64Fnv1(): flatbuffers.Long { + var offset = this.bb.__offset(this.bb_pos, 42); + return offset ? this.bb.readUint64(this.bb_pos + offset) : this.bb.createLong(0, 0); +}; + +/** + * @returns {number} + */ +testhashs32Fnv1a(): number { + var offset = this.bb.__offset(this.bb_pos, 44); + return offset ? this.bb.readInt32(this.bb_pos + offset) : 0; +}; + +/** + * @param {number} value + * @returns {boolean} + */ +mutate_testhashs32_fnv1a(value: number): boolean { + var offset = this.bb.__offset(this.bb_pos, 44); + + if (offset === 0) { + return false; + } + + this.bb.writeInt32(this.bb_pos + offset, value); + return true; +}; + +/** + * @returns {number} + */ +testhashu32Fnv1a(): number { + var offset = this.bb.__offset(this.bb_pos, 46); + return offset ? this.bb.readUint32(this.bb_pos + offset) : 0; +}; + +/** + * @returns {flatbuffers.Long} + */ +testhashs64Fnv1a(): flatbuffers.Long { + var offset = this.bb.__offset(this.bb_pos, 48); + return offset ? this.bb.readInt64(this.bb_pos + offset) : this.bb.createLong(0, 0); +}; + +/** + * @param {flatbuffers.Long} value + * @returns {boolean} + */ +mutate_testhashs64_fnv1a(value: flatbuffers.Long): boolean { + var offset = this.bb.__offset(this.bb_pos, 48); + + if (offset === 0) { + return false; + } + + this.bb.writeInt64(this.bb_pos + offset, value); + return true; +}; + +/** + * @returns {flatbuffers.Long} + */ +testhashu64Fnv1a(): flatbuffers.Long { + var offset = this.bb.__offset(this.bb_pos, 50); + return offset ? this.bb.readUint64(this.bb_pos + offset) : this.bb.createLong(0, 0); +}; + +/** + * @param {number} index + * @returns {boolean} + */ +testarrayofbools(index: number): boolean { + var offset = this.bb.__offset(this.bb_pos, 52); + return offset ? !!this.bb.readInt8(this.bb.__vector(this.bb_pos + offset) + index) : false; +}; + +/** + * @returns {number} + */ +testarrayofboolsLength(): number { + var offset = this.bb.__offset(this.bb_pos, 52); + return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0; +}; + +/** + * @returns {Int8Array} + */ +testarrayofboolsArray(): Int8Array { + var offset = this.bb.__offset(this.bb_pos, 52); + return offset ? new Int8Array(this.bb.bytes().buffer, this.bb.bytes().byteOffset + this.bb.__vector(this.bb_pos + offset), this.bb.__vector_len(this.bb_pos + offset)) : null; +}; + +/** + * @returns {number} + */ +testf(): number { + var offset = this.bb.__offset(this.bb_pos, 54); + return offset ? this.bb.readFloat32(this.bb_pos + offset) : 3.14159; +}; + +/** + * @param {number} value + * @returns {boolean} + */ +mutate_testf(value: number): boolean { + var offset = this.bb.__offset(this.bb_pos, 54); + + if (offset === 0) { + return false; + } + + this.bb.writeFloat32(this.bb_pos + offset, value); + return true; +}; + +/** + * @returns {number} + */ +testf2(): number { + var offset = this.bb.__offset(this.bb_pos, 56); + return offset ? this.bb.readFloat32(this.bb_pos + offset) : 3.0; +}; + +/** + * @param {number} value + * @returns {boolean} + */ +mutate_testf2(value: number): boolean { + var offset = this.bb.__offset(this.bb_pos, 56); + + if (offset === 0) { + return false; + } + + this.bb.writeFloat32(this.bb_pos + offset, value); + return true; +}; + +/** + * @returns {number} + */ +testf3(): number { + var offset = this.bb.__offset(this.bb_pos, 58); + return offset ? this.bb.readFloat32(this.bb_pos + offset) : 0.0; +}; + +/** + * @param {number} value + * @returns {boolean} + */ +mutate_testf3(value: number): boolean { + var offset = this.bb.__offset(this.bb_pos, 58); + + if (offset === 0) { + return false; + } + + this.bb.writeFloat32(this.bb_pos + offset, value); + return true; +}; + +/** + * @param {number} index + * @param {flatbuffers.Encoding=} optionalEncoding + * @returns {string|Uint8Array} + */ +testarrayofstring2(index: number): string +testarrayofstring2(index: number, optionalEncoding: flatbuffers.Encoding): string|Uint8Array +testarrayofstring2(index: number, optionalEncoding?: any): string|Uint8Array { + var offset = this.bb.__offset(this.bb_pos, 60); + return offset ? this.bb.__string(this.bb.__vector(this.bb_pos + offset) + index * 4, optionalEncoding) : null; +}; + +/** + * @returns {number} + */ +testarrayofstring2Length(): number { + var offset = this.bb.__offset(this.bb_pos, 60); + return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0; +}; + +/** + * @param {flatbuffers.Builder} builder + */ +static startMonster(builder: flatbuffers.Builder) { + builder.startObject(29); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} posOffset + */ +static addPos(builder: flatbuffers.Builder, posOffset: flatbuffers.Offset) { + builder.addFieldStruct(0, posOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} mana + */ +static addMana(builder: flatbuffers.Builder, mana: number) { + builder.addFieldInt16(1, mana, 150); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} hp + */ +static addHp(builder: flatbuffers.Builder, hp: number) { + builder.addFieldInt16(2, hp, 100); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} nameOffset + */ +static addName(builder: flatbuffers.Builder, nameOffset: flatbuffers.Offset) { + builder.addFieldOffset(3, nameOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} inventoryOffset + */ +static addInventory(builder: flatbuffers.Builder, inventoryOffset: flatbuffers.Offset) { + builder.addFieldOffset(5, inventoryOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {Array.} data + * @returns {flatbuffers.Offset} + */ +static createInventoryVector(builder: flatbuffers.Builder, data: number[] | Uint8Array): flatbuffers.Offset { +if (!data){ + return null +} + builder.startVector(1, data.length, 1); + for (var i = data.length - 1; i >= 0; i--) { + builder.addInt8(data[i]); + } + return builder.endVector(); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} numElems + */ +static startInventoryVector(builder: flatbuffers.Builder, numElems: number) { + builder.startVector(1, numElems, 1); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {MyGame.Example.Color} color + */ +static addColor(builder: flatbuffers.Builder, color: MyGame.Example.Color) { + builder.addFieldInt8(6, color, MyGame.Example.Color.Blue); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {MyGame.Example.Any} testType + */ +static addTestType(builder: flatbuffers.Builder, testType: MyGame.Example.Any) { + builder.addFieldInt8(7, testType, MyGame.Example.Any.NONE); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} testOffset + */ +static addTest(builder: flatbuffers.Builder, testOffset: flatbuffers.Offset) { + builder.addFieldOffset(8, testOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} test4Offset + */ +static addTest4(builder: flatbuffers.Builder, test4Offset: flatbuffers.Offset) { + builder.addFieldOffset(9, test4Offset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} numElems + */ +static startTest4Vector(builder: flatbuffers.Builder, numElems: number) { + builder.startVector(4, numElems, 2); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} testarrayofstringOffset + */ +static addTestarrayofstring(builder: flatbuffers.Builder, testarrayofstringOffset: flatbuffers.Offset) { + builder.addFieldOffset(10, testarrayofstringOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {Array.} data + * @returns {flatbuffers.Offset} + */ +static createTestarrayofstringVector(builder: flatbuffers.Builder, data: flatbuffers.Offset[]): flatbuffers.Offset { +if (!data){ + return null +} + builder.startVector(4, data.length, 4); + for (var i = data.length - 1; i >= 0; i--) { + builder.addOffset(data[i]); + } + return builder.endVector(); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} numElems + */ +static startTestarrayofstringVector(builder: flatbuffers.Builder, numElems: number) { + builder.startVector(4, numElems, 4); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} testarrayoftablesOffset + */ +static addTestarrayoftables(builder: flatbuffers.Builder, testarrayoftablesOffset: flatbuffers.Offset) { + builder.addFieldOffset(11, testarrayoftablesOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {Array.} data + * @returns {flatbuffers.Offset} + */ +static createTestarrayoftablesVector(builder: flatbuffers.Builder, data: flatbuffers.Offset[]): flatbuffers.Offset { +if (!data){ + return null +} + builder.startVector(4, data.length, 4); + for (var i = data.length - 1; i >= 0; i--) { + builder.addOffset(data[i]); + } + return builder.endVector(); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} numElems + */ +static startTestarrayoftablesVector(builder: flatbuffers.Builder, numElems: number) { + builder.startVector(4, numElems, 4); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} enemyOffset + */ +static addEnemy(builder: flatbuffers.Builder, enemyOffset: flatbuffers.Offset) { + builder.addFieldOffset(12, enemyOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} testnestedflatbufferOffset + */ +static addTestnestedflatbuffer(builder: flatbuffers.Builder, testnestedflatbufferOffset: flatbuffers.Offset) { + builder.addFieldOffset(13, testnestedflatbufferOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {Array.} data + * @returns {flatbuffers.Offset} + */ +static createTestnestedflatbufferVector(builder: flatbuffers.Builder, data: number[] | Uint8Array): flatbuffers.Offset { +if (!data){ + return null +} + builder.startVector(1, data.length, 1); + for (var i = data.length - 1; i >= 0; i--) { + builder.addInt8(data[i]); + } + return builder.endVector(); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} numElems + */ +static startTestnestedflatbufferVector(builder: flatbuffers.Builder, numElems: number) { + builder.startVector(1, numElems, 1); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} testemptyOffset + */ +static addTestempty(builder: flatbuffers.Builder, testemptyOffset: flatbuffers.Offset) { + builder.addFieldOffset(14, testemptyOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {boolean} testbool + */ +static addTestbool(builder: flatbuffers.Builder, testbool: boolean) { + builder.addFieldInt8(15, +testbool, +false); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} testhashs32Fnv1 + */ +static addTesthashs32Fnv1(builder: flatbuffers.Builder, testhashs32Fnv1: number) { + builder.addFieldInt32(16, testhashs32Fnv1, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} testhashu32Fnv1 + */ +static addTesthashu32Fnv1(builder: flatbuffers.Builder, testhashu32Fnv1: number) { + builder.addFieldInt32(17, testhashu32Fnv1, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Long} testhashs64Fnv1 + */ +static addTesthashs64Fnv1(builder: flatbuffers.Builder, testhashs64Fnv1: flatbuffers.Long) { + builder.addFieldInt64(18, testhashs64Fnv1, builder.createLong(0, 0)); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Long} testhashu64Fnv1 + */ +static addTesthashu64Fnv1(builder: flatbuffers.Builder, testhashu64Fnv1: flatbuffers.Long) { + builder.addFieldInt64(19, testhashu64Fnv1, builder.createLong(0, 0)); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} testhashs32Fnv1a + */ +static addTesthashs32Fnv1a(builder: flatbuffers.Builder, testhashs32Fnv1a: number) { + builder.addFieldInt32(20, testhashs32Fnv1a, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} testhashu32Fnv1a + */ +static addTesthashu32Fnv1a(builder: flatbuffers.Builder, testhashu32Fnv1a: number) { + builder.addFieldInt32(21, testhashu32Fnv1a, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Long} testhashs64Fnv1a + */ +static addTesthashs64Fnv1a(builder: flatbuffers.Builder, testhashs64Fnv1a: flatbuffers.Long) { + builder.addFieldInt64(22, testhashs64Fnv1a, builder.createLong(0, 0)); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Long} testhashu64Fnv1a + */ +static addTesthashu64Fnv1a(builder: flatbuffers.Builder, testhashu64Fnv1a: flatbuffers.Long) { + builder.addFieldInt64(23, testhashu64Fnv1a, builder.createLong(0, 0)); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} testarrayofboolsOffset + */ +static addTestarrayofbools(builder: flatbuffers.Builder, testarrayofboolsOffset: flatbuffers.Offset) { + builder.addFieldOffset(24, testarrayofboolsOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {Array.} data + * @returns {flatbuffers.Offset} + */ +static createTestarrayofboolsVector(builder: flatbuffers.Builder, data: boolean[]): flatbuffers.Offset { +if (!data){ + return null +} + builder.startVector(1, data.length, 1); + for (var i = data.length - 1; i >= 0; i--) { + builder.addInt8(+data[i]); + } + return builder.endVector(); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} numElems + */ +static startTestarrayofboolsVector(builder: flatbuffers.Builder, numElems: number) { + builder.startVector(1, numElems, 1); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} testf + */ +static addTestf(builder: flatbuffers.Builder, testf: number) { + builder.addFieldFloat32(25, testf, 3.14159); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} testf2 + */ +static addTestf2(builder: flatbuffers.Builder, testf2: number) { + builder.addFieldFloat32(26, testf2, 3.0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} testf3 + */ +static addTestf3(builder: flatbuffers.Builder, testf3: number) { + builder.addFieldFloat32(27, testf3, 0.0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} testarrayofstring2Offset + */ +static addTestarrayofstring2(builder: flatbuffers.Builder, testarrayofstring2Offset: flatbuffers.Offset) { + builder.addFieldOffset(28, testarrayofstring2Offset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {Array.} data + * @returns {flatbuffers.Offset} + */ +static createTestarrayofstring2Vector(builder: flatbuffers.Builder, data: flatbuffers.Offset[]): flatbuffers.Offset { +if (!data){ + return null +} + builder.startVector(4, data.length, 4); + for (var i = data.length - 1; i >= 0; i--) { + builder.addOffset(data[i]); + } + return builder.endVector(); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} numElems + */ +static startTestarrayofstring2Vector(builder: flatbuffers.Builder, numElems: number) { + builder.startVector(4, numElems, 4); +}; + +/** + * @param {flatbuffers.Builder} builder + * @returns {flatbuffers.Offset} + */ +static endMonster(builder: flatbuffers.Builder): flatbuffers.Offset { + var offset = builder.endObject(); + builder.requiredField(offset, 10); // name + return offset; +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} offset + */ +static finishMonsterBuffer(builder: flatbuffers.Builder, offset: flatbuffers.Offset) { + builder.finish(offset, 'MONS'); +}; + +} +} diff --git a/types/flatbuffers/index.d.ts b/types/flatbuffers/index.d.ts new file mode 100644 index 0000000000..71e56ed188 --- /dev/null +++ b/types/flatbuffers/index.d.ts @@ -0,0 +1,610 @@ +// Type definitions for flatbuffers 1.6 +// Project: http://google.github.io/flatbuffers/index.html +// Definitions by: Kamil Rojewski +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare namespace flatbuffers { + + /** + * @typedef {number} + */ + export type Offset = number; + + /** + * @typedef {{ + * bb: flatbuffers.ByteBuffer, + * bb_pos: number + * }} + */ + export interface Table { + bb: ByteBuffer; + bb_pos: number; + } + + /** + * @type {number} + * @const + */ + export const SIZEOF_SHORT: number; + + /** + * @type {number} + * @const + */ + export const SIZEOF_INT: number; + + /** + * @type {number} + * @const + */ + export const FILE_IDENTIFIER_LENGTH: number; + + /** + * @enum {number} + */ + export enum Encoding { UTF8_BYTES, UTF16_STRING } + + /** + * @type {Int32Array} + * @const + */ + export var int32: Int32Array; + + /** + * @type {Float32Array} + * @const + */ + export var float32: Float32Array; + + /** + * @type {Float64Array} + * @const + */ + export var float64: Float64Array; + + /** + * @type {boolean} + * @const + */ + export var isLittleEndian: boolean; + + //////////////////////////////////////////////////////////////////////////////// + + export class Long { + + /** + * @type {number} + * @const + */ + low: number; + + /** + * @type {number} + * @const + */ + high: number; + + /** + * @type {flatbuffers.Long} + * @const + */ + static ZERO: Long; + + /** + * @constructor + * @param {number} high + * @param {number} low + */ + constructor(low: number, high: number); + + /** + * @returns {number} + */ + toFloat64(): number; + + /** + * @param {flatbuffers.Long} other + * @returns {boolean} + */ + equals(other: any): boolean; + + /** + * @param {number} low + * @param {number} high + */ + static create(low: number, high: number): Long; + } + + + //////////////////////////////////////////////////////////////////////////////// + + export class Builder { + + /** + * @constructor + * @param {number=} initial_size + */ + constructor(initial_size?: number); + + /** + * In order to save space, fields that are set to their default value + * don't get serialized into the buffer. Forcing defaults provides a + * way to manually disable this optimization. + * + * @param {boolean} forceDefaults true always serializes default values + */ + forceDefaults(forceDefaults: boolean): void; + + /** + * Get the ByteBuffer representing the FlatBuffer. Only call this after you've + * called finish(). The actual data starts at the ByteBuffer's current position, + * not necessarily at 0. + * + * @returns {flatbuffers.ByteBuffer} + */ + dataBuffer(): ByteBuffer; + + /** + * Get the ByteBuffer representing the FlatBuffer. Only call this after you've + * called finish(). The actual data starts at the ByteBuffer's current position, + * not necessarily at 0. + * + * @returns {Uint8Array} + */ + asUint8Array(): Uint8Array; + + /** + * Prepare to write an element of `size` after `additional_bytes` have been + * written, e.g. if you write a string, you need to align such the int length + * field is aligned to 4 bytes, and the string data follows it directly. If all + * you need to do is alignment, `additional_bytes` will be 0. + * + * @param {number} size This is the of the new element to write + * @param {number} additional_bytes The padding size + */ + prep(size: number, additional_bytes: number): void; + + /** + * @param {number} byte_size + */ + pad(byte_size: number): void; + + /** + * @param {number} value + */ + writeInt8(value: number): void; + + /** + * @param {number} value + */ + writeInt16(value: number): void; + + /** + * @param {number} value + */ + writeInt32(value: number): void; + + /** + * @param {flatbuffers.Long} value + */ + writeInt64(value: Long): void; + + /** + * @param {number} value + */ + writeFloat32(value: number): void; + + /** + * @param {number} value + */ + writeFloat64(value: number): void; + + /** + * @param {number} value + */ + addInt8(value: number): void; + + /** + * @param {number} value + */ + addInt16(value: number): void; + + /** + * @param {number} value + */ + addInt32(value: number): void; + + /** + * @param {flatbuffers.Long} value + */ + addInt64(value: Long): void; + + /** + * @param {number} value + */ + addFloat32(value: number): void; + + /** + * @param {number} value + */ + addFloat64(value: number): void; + + /** + * @param {number} voffset + * @param {number} value + * @param {number} defaultValue + */ + addFieldInt8(voffset: number, value: number, defaultValue: number): void; + + /** + * @param {number} voffset + * @param {number} value + * @param {number} defaultValue + */ + addFieldInt16(voffset: number, value: number, defaultValue: number): void; + + /** + * @param {number} voffset + * @param {number} value + * @param {number} defaultValue + */ + addFieldInt32(voffset: number, value: number, defaultValue: number): void; + + /** + * @param {number} voffset + * @param {flatbuffers.Long} value + * @param {flatbuffers.Long} defaultValue + */ + addFieldInt64(voffset: number, value: Long, defaultValue: Long): void; + + /** + * @param {number} voffset + * @param {number} value + * @param {number} defaultValue + */ + addFieldFloat32(voffset: number, value: number, defaultValue: number): void; + + /** + * @param {number} voffset + * @param {number} value + * @param {number} defaultValue + */ + addFieldFloat64(voffset: number, value: number, defaultValue: number): void; + + /** + * @param {number} voffset + * @param {flatbuffers.Offset} value + * @param {flatbuffers.Offset} defaultValue + */ + addFieldOffset(voffset: number, value: Offset, defaultValue: Offset): void; + + /** + * Structs are stored inline, so nothing additional is being added. `d` is always 0. + * + * @param {number} voffset + * @param {flatbuffers.Offset} value + * @param {flatbuffers.Offset} defaultValue + */ + addFieldStruct(voffset: number, value: Offset, defaultValue: Offset): void; + + /** + * Structures are always stored inline, they need to be created right + * where they're used. You'll get this assertion failure if you + * created it elsewhere. + * + * @param {flatbuffers.Offset} obj The offset of the created object + */ + nested(obj: Offset): void; + + /** + * Should not be creating any other object, string or vector + * while an object is being constructed + */ + notNested(): void; + + /** + * Set the current vtable at `voffset` to the current location in the buffer. + * + * @param {number} voffset + */ + slot(voffset: number): void; + + /** + * @returns {flatbuffers.Offset} Offset relative to the end of the buffer. + */ + offset(): Offset; + + /** + * Doubles the size of the backing ByteBuffer and copies the old data towards + * the end of the new buffer (since we build the buffer backwards). + * + * @param {flatbuffers.ByteBuffer} bb The current buffer with the existing data + * @returns {flatbuffers.ByteBuffer} A new byte buffer with the old data copied + * to it. The data is located at the end of the buffer. + */ + static growByteBuffer(bb: ByteBuffer): ByteBuffer; + + /** + * Adds on offset, relative to where it will be written. + * + * @param {flatbuffers.Offset} offset The offset to add + */ + addOffset(offset: Offset): void; + + /** + * Start encoding a new object in the buffer. Users will not usually need to + * call this directly. The FlatBuffers compiler will generate helper methods + * that call this method internally. + * + * @param {number} numfields + */ + startObject(numfields: number): void; + + /** + * Finish off writing the object that is under construction. + * + * @returns {flatbuffers.Offset} The offset to the object inside `dataBuffer` + */ + endObject(): Offset; + + /** + * @param {flatbuffers.Offset} root_table + * @param {string=} file_identifier + */ + finish(root_table: Offset, file_identifier?: string): void; + + /** + * This checks a required field has been set in a given table that has + * just been constructed. + * + * @param {flatbuffers.Offset} table + * @param {number} field + */ + requiredField(table: Offset, field: number): void; + + /** + * Start a new array/vector of objects. Users usually will not call + * this directly. The FlatBuffers compiler will create a start/end + * method for vector types in generated code. + * + * @param {number} elem_size The size of each element in the array + * @param {number} num_elems The number of elements in the array + * @param {number} alignment The alignment of the array + */ + startVector(elem_size: number, num_elems: number, alignment: number): void; + + /** + * Finish off the creation of an array and all its elements. The array must be + * created with `startVector`. + * + * @returns {flatbuffers.Offset} The offset at which the newly created array + * starts. + */ + endVector(): Offset; + + /** + * Encode the string `s` in the buffer using UTF-8. If a Uint8Array is passed + * instead of a string, it is assumed to contain valid UTF-8 encoded data. + * + * @param {string|Uint8Array} s The string to encode + * @return {flatbuffers.Offset} The offset in the buffer where the encoded string starts + */ + createString(s: string|Uint8Array): Offset; + + /** + * Conveniance function for creating Long objects. + * + * @param {number} low + * @param {number} high + * @returns {Long} + */ + createLong(low: number, high: number): Long; + } + + //////////////////////////////////////////////////////////////////////////////// + + + class ByteBuffer { + + /** + * @constructor + * @param {Uint8Array} bytes + */ + constructor(bytes: Uint8Array); + + /** + * @param {number} byte_size + * @returns {flatbuffers.ByteBuffer} + */ + static allocate(byte_size: number): ByteBuffer; + + /** + * @returns {Uint8Array} + */ + bytes(): Uint8Array; + + /** + * @returns {number} + */ + position(): number; + + /** + * @param {number} position + */ + setPosition(position: number): void; + + /** + * @returns {number} + */ + capacity(): number; + + /** + * @param {number} offset + * @returns {number} + */ + readInt8(offset: number): number; + + /** + * @param {number} offset + * @returns {number} + */ + readUint8(offset: number): number; + + /** + * @param {number} offset + * @returns {number} + */ + readInt16(offset: number): number; + + /** + * @param {number} offset + * @returns {number} + */ + readUint16(offset: number): number; + + /** + * @param {number} offset + * @returns {number} + */ + readInt32(offset: number): number; + + /** + * @param {number} offset + * @returns {number} + */ + readUint32(offset: number): number; + + /** + * @param {number} offset + * @returns {flatbuffers.Long} + */ + readInt64(offset: number): Long; + + /** + * @param {number} offset + * @returns {flatbuffers.Long} + */ + readUint64(offset: number): Long; + + /** + * @param {number} offset + * @returns {number} + */ + readFloat32(offset: number): number; + + /** + * @param {number} offset + * @returns {number} + */ + readFloat64(offset: number): number; + + /** + * @param {number} offset + * @param {number} value + */ + writeInt8(offset: number, value: number): void; + + /** + * @param {number} offset + * @param {number} value + */ + writeInt16(offset: number, value: number): void; + + /** + * @param {number} offset + * @param {number} value + */ + writeInt32(offset: number, value: number): void; + + /** + * @param {number} offset + * @param {flatbuffers.Long} value + */ + writeInt64(offset: number, value: Long): void; + + /** + * @param {number} offset + * @param {number} value + */ + writeFloat32(offset: number, value: number): void; + + /** + * @param {number} offset + * @param {number} value + */ + writeFloat64(offset: number, value: number): void; + + /** + * Look up a field in the vtable, return an offset into the object, or 0 if the + * field is not present. + * + * @param {number} bb_pos + * @param {number} vtable_offset + * @returns {number} + */ + __offset(bb_pos: number, vtable_offset: number): number; + + /** + * Initialize any Table-derived type to point to the union at the given offset. + * + * @param {flatbuffers.Table} t + * @param {number} offset + * @returns {flatbuffers.Table} + */ + __union(t: T, offset: number): T; + + /** + * Create a JavaScript string from UTF-8 data stored inside the FlatBuffer. + * This allocates a new string and converts to wide chars upon each access. + * + * To avoid the conversion to UTF-16, pass flatbuffers.Encoding.UTF8_BYTES as + * the "optionalEncoding" argument. This is useful for avoiding conversion to + * and from UTF-16 when the data will just be packaged back up in another + * FlatBuffer later on. + * + * @param {number} offset + * @param {flatbuffers.Encoding=} optionalEncoding Defaults to UTF16_STRING + * @returns {string|Uint8Array} + */ + __string(offset: number, optionalEncoding?: Encoding): string|Uint8Array; + + /** + * Retrieve the relative offset stored at "offset" + * @param {number} offset + * @returns {number} + */ + __indirect(offset: number): number; + + /** + * Get the start of data of a vector whose offset is stored at "offset" in this object. + * + * @param {number} offset + * @returns {number} + */ + __vector(offset: number): number; + + /** + * Get the length of a vector whose offset is stored at "offset" in this object. + * + * @param {number} offset + * @returns {number} + */ + __vector_len(offset: number): number; + + /** + * @param {string} ident + * @returns {boolean} + */ + __has_identifier(ident: string): boolean; + + /** + * Conveniance function for creating Long objects. + * + * @param {number} low + * @param {number} high + * @returns {Long} + */ + createLong(low: number, high: number): Long; + } + +} diff --git a/types/flatbuffers/tsconfig.json b/types/flatbuffers/tsconfig.json new file mode 100644 index 0000000000..9d60089890 --- /dev/null +++ b/types/flatbuffers/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": false, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "flatbuffers-tests.ts" + ] +} \ No newline at end of file diff --git a/types/flatbuffers/tslint.json b/types/flatbuffers/tslint.json new file mode 100644 index 0000000000..2221e40e4a --- /dev/null +++ b/types/flatbuffers/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } \ No newline at end of file diff --git a/types/flatpickr/flatpickr-tests.ts b/types/flatpickr/flatpickr-tests.ts index 9f0211c79d..f6800e38b7 100644 --- a/types/flatpickr/flatpickr-tests.ts +++ b/types/flatpickr/flatpickr-tests.ts @@ -12,4 +12,3 @@ if (input != null) { } picker1.destroy(); - diff --git a/types/freeport/freeport-tests.ts b/types/freeport/freeport-tests.ts index d64a72f496..2746aeb4ed 100644 --- a/types/freeport/freeport-tests.ts +++ b/types/freeport/freeport-tests.ts @@ -1,4 +1,3 @@ - import freeport = require('freeport'); let num: number, diff --git a/types/frisby/frisby-tests.ts b/types/frisby/frisby-tests.ts new file mode 100644 index 0000000000..d5ac312b83 --- /dev/null +++ b/types/frisby/frisby-tests.ts @@ -0,0 +1,27 @@ +//Example from https://www.npmjs.com/package/frisby + +import frisby = require('frisby'); + +var URL = 'http://localhost:3000/'; +var URL_AUTH = 'http://username:password@localhost:3000/'; + +frisby.globalSetup({ // globalSetup is for ALL requests + request: { + headers: { 'X-Auth-Token': 'fa8426a0-8eaf-4d22-8e13-7c1b16a9370c' } + } +}); + +frisby.create('GET user johndoe') + .get(URL + '/users/3.json') + .expectStatus(200) + .expectJSONTypes({ + id: Number, + username: String, + is_admin: Boolean + }) + .expectJSON({ + id: 3, + username: 'johndoe', + is_admin: false + }) +.toss(); \ No newline at end of file diff --git a/types/frisby/index.d.ts b/types/frisby/index.d.ts new file mode 100644 index 0000000000..449a73ead0 --- /dev/null +++ b/types/frisby/index.d.ts @@ -0,0 +1,75 @@ +// Type definitions for Frisby v0.8.5 +// Project: https://github.com/vlucas/frisby +// Definitions by: Johnny Li +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +/// + +declare interface Frisby { + globalSetup(opts: any): any; + timeout(seconds?: number): Frisby; + reset(): Frisby; + not(): Frisby; + addHeader(key: string, content: string): Frisby; + addHeaders(headers: object): Frisby; + removeHeader(key: string): Frisby; + responseType(type: any): Frisby; + // HTTP Basic Auth + auth(username: string, password: string, digest: boolean): Frisby; + // HTTP Request + get(uri: string, params?: any): Frisby; + patch(uri: string, data?: any, params?: any): Frisby; + post(uri: string, data?: any, params?: any): Frisby; + put(uri: string, data?: any, params?: any): Frisby; + delete(uri: string, data?: any, params?: any): Frisby; + head(uri: string, params?: any): Frisby; + options(uri: string, params?: any): Frisby; + + expectMaxResponseTime(milliseconds: number): Frisby; + expectStatus(statusCode: number): Frisby; + expectHeader(header: string, content: string): Frisby; + expectHeaderContains(header: string, content: string): Frisby; + expectHeaderToMatch(header: string, pattern: RegExp): Frisby; + expectBodyContains(content: string): Frisby; + expectJSONTypes(json: any): Frisby; + expectJSONTypes(path: string, json: any): Frisby; + expectJSON(json: any): Frisby; + expectJSON(path: string, json: any): Frisby; + expectJSONSchema(path: string, jsonSchema: any): Frisby; + expectJSONLength(length: number): Frisby; + expectJSONLength(path: string, length: number): Frisby; + inspectRequest(): Frisby; + inspectResponse(): Frisby; + inspectHeaders(): Frisby; + inspectBody(): Frisby; + inspectJSON(): Frisby; + inspectStatus(): Frisby; + retry(count: number, delayInMilliseconds?: number): Frisby; + waits(delayInMilliseconds: number): Frisby; + after(callback: (...args: any[]) => void): Frisby; + afterJSON(callback: (...args: any[]) => void): Frisby; + exceptionHandler(fn: (...args: any[]) => void): Frisby; + toss(): void; + + create(msg: string): Frisby; + +} + +declare global { + namespace jasmine { + interface Matchers { + toMatchOrBeNull(expected: any): boolean; + toMatchOrBeEmpty(expected: any): boolean; + toBeType(expected: any): boolean; + toBeTypeOrNull(expected: any): boolean; + toBeTypeOrUndefined(expected: any): boolean; + toContainJson(expected: any, isNot?: boolean): boolean; + toContainJsonTypes(expected: any, isNot?: boolean): boolean; + } + } +} + +declare const frisby: Frisby; +export = frisby; + diff --git a/types/frisby/tsconfig.json b/types/frisby/tsconfig.json new file mode 100644 index 0000000000..5ff4c5d7f1 --- /dev/null +++ b/types/frisby/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "frisby-tests.ts" + ] +} \ No newline at end of file diff --git a/types/fs-promise/fs-promise-tests.ts b/types/fs-promise/fs-promise-tests.ts index 43decbd256..51da06bb05 100644 --- a/types/fs-promise/fs-promise-tests.ts +++ b/types/fs-promise/fs-promise-tests.ts @@ -1,19 +1,19 @@ import * as fs from "fs-promise"; -var src: string; -var dst: string; -var dir: string; -var path: string; -var data: any; -var writeOptions: fs.WriteOptions; -var writeJsonOptions: fs.WriteJsonOptions = { +let src: string; +let dst: string; +let dir: string; +let path: string; +let data: any; +let writeOptions: fs.WriteOptions; +const writeJsonOptions: fs.WriteJsonOptions = { spaces: 2, replacer(key, value) { src = key; return value; } }; -var readJsonOptions: fs.ReadJsonOptions; +let readJsonOptions: fs.ReadJsonOptions; async function test() { await fs.copy(src, dst); diff --git a/types/fs-promise/index.d.ts b/types/fs-promise/index.d.ts index 2038190ca1..6455018e5c 100644 --- a/types/fs-promise/index.d.ts +++ b/types/fs-promise/index.d.ts @@ -27,7 +27,7 @@ export interface WriteJsonOptions extends WriteOptions { export interface ReadJsonOptions { encoding: string; flag?: string; - reviver: (key: any, value: any) => any; + reviver(key: any, value: any): any; } export function copy(src: string, dst: string): Promise; diff --git a/types/fullcalendar/index.d.ts b/types/fullcalendar/index.d.ts index 5d6401b9df..76a5de13f3 100644 --- a/types/fullcalendar/index.d.ts +++ b/types/fullcalendar/index.d.ts @@ -55,10 +55,10 @@ export interface Options extends AgendaOptions, EventDraggingResizingOptions, Dr aspectRatio?: number; handleWindowResize?: boolean; views?: ViewSpecificOptions; - viewRender?: (view: ViewObject, element: JQuery) => void; - viewDestroy?: (view: ViewObject, element: JQuery) => void; - dayRender?: (date: Date, cell: HTMLTableDataCellElement) => void; - windowResize?: (view: ViewObject) => void; + viewRender?(view: ViewObject, element: JQuery): void; + viewDestroy?(view: ViewObject, element: JQuery): void; + dayRender?(date: Date, cell: HTMLTableDataCellElement): void; + windowResize?(view: ViewObject): void; // Timezone timezone?: string | boolean; @@ -90,10 +90,10 @@ export interface Options extends AgendaOptions, EventDraggingResizingOptions, Dr // Clicking & Hovering - http://fullcalendar.io/docs/mouse/ - dayClick?: (date: Date, allDay: boolean, jsEvent: MouseEvent, view: ViewObject) => void; - eventClick?: (event: EventObject, jsEvent: MouseEvent, view: ViewObject) => any; // return type boolean or void - eventMouseover?: (event: EventObject, jsEvent: MouseEvent, view: ViewObject) => void; - eventMouseout?: (event: EventObject, jsEvent: MouseEvent, view: ViewObject) => void; + dayClick?(date: Date, allDay: boolean, jsEvent: MouseEvent, view: ViewObject): void; + eventClick?(event: EventObject, jsEvent: MouseEvent, view: ViewObject): any; // return type boolean or void + eventMouseover?(event: EventObject, jsEvent: MouseEvent, view: ViewObject): void; + eventMouseout?(event: EventObject, jsEvent: MouseEvent, view: ViewObject): void; // Event Data - http://fullcalendar.io/docs/event_data/ @@ -120,8 +120,8 @@ export interface Options extends AgendaOptions, EventDraggingResizingOptions, Dr startParam?: string; endParam?: string; lazyFetching?: boolean; - eventDataTransform?: (eventData: any) => EventObject; - loading?: (isLoading: boolean, view: ViewObject) => void; + eventDataTransform?(eventData: any): EventObject; + loading?(isLoading: boolean, view: ViewObject): void; eventLimit?: boolean; // Event Rendering - http://fullcalendar.io/docs/event_rendering/ @@ -130,10 +130,10 @@ export interface Options extends AgendaOptions, EventDraggingResizingOptions, Dr eventBackgroundColor?: string; eventBorderColor?: string; eventTextColor?: string; - eventRender?: (event: EventObject, element: HTMLDivElement, view: ViewObject) => void; - eventAfterRender?: (event: EventObject, element: HTMLDivElement, view: ViewObject) => void; - eventAfterAllRender?: (view: ViewObject) => void; - eventDestroy?: (event: EventObject, element: JQuery, view: ViewObject) => void; + eventRender?(event: EventObject, element: HTMLDivElement, view: ViewObject): void; + eventAfterRender?(event: EventObject, element: HTMLDivElement, view: ViewObject): void; + eventAfterAllRender?(view: ViewObject): void; + eventDestroy?(event: EventObject, element: JQuery, view: ViewObject): void; // scheduler options resourceAreaWidth?: number; @@ -172,12 +172,12 @@ export interface EventDraggingResizingOptions { dragScroll?: boolean; eventOverlap?: boolean | ((stillEvent: EventObject, movingEvent: EventObject) => boolean); eventConstraint?: "businessHours" | BusinessHours | Timespan; - eventDragStart?: (event: EventObject, jsEvent: MouseEvent, ui: any, view: ViewObject) => void; - eventDragStop?: (event: EventObject, jsEvent: MouseEvent, ui: any, view: ViewObject) => void; - eventDrop?: (event: EventObject, delta: moment.Duration, revertFunc: Function, jsEvent: Event, ui: any, view: ViewObject) => void; - eventResizeStart?: (event: EventObject, jsEvent: MouseEvent, ui: any, view: ViewObject) => void; - eventResizeStop?: (event: EventObject, jsEvent: MouseEvent, ui: any, view: ViewObject) => void; - eventResize?: (event: EventObject, delta: moment.Duration, revertFunc: Function, jsEvent: Event, ui: any, view: ViewObject) => void; + eventDragStart?(event: EventObject, jsEvent: MouseEvent, ui: any, view: ViewObject): void; + eventDragStop?(event: EventObject, jsEvent: MouseEvent, ui: any, view: ViewObject): void; + eventDrop?(event: EventObject, delta: moment.Duration, revertFunc: Function, jsEvent: Event, ui: any, view: ViewObject): void; + eventResizeStart?(event: EventObject, jsEvent: MouseEvent, ui: any, view: ViewObject): void; + eventResizeStop?(event: EventObject, jsEvent: MouseEvent, ui: any, view: ViewObject): void; + eventResize?(event: EventObject, delta: moment.Duration, revertFunc: Function, jsEvent: Event, ui: any, view: ViewObject): void; } /* * Selection - http://fullcalendar.io/docs/selection/ @@ -189,15 +189,15 @@ export interface SelectionOptions { unselectCancel?: string; selectOverlap?: boolean | ((event: EventObject) => boolean); selectConstraint?: Timespan | BusinessHours; - select?: (start: moment.Moment, end: moment.Moment, jsEvent: MouseEvent, view: ViewObject, resource?: any) => void; - unselect?: (view: ViewObject, jsEvent: Event) => void; + select?(start: moment.Moment, end: moment.Moment, jsEvent: MouseEvent, view: ViewObject, resource?: any): void; + unselect?(view: ViewObject, jsEvent: Event): void; } export interface DroppingExternalElementsOptions { droppable?: boolean; dropAccept?: string | ((draggable: any) => boolean); - drop?: (date: moment.Moment, jsEvent: MouseEvent, ui: any) => void; - eventReceive?: (event: EventObject) => void; + drop?(date: moment.Moment, jsEvent: MouseEvent, ui: any): void; + eventReceive?(event: EventObject): void; } export interface ButtonTextObject { diff --git a/types/fullcalendar/tslint.json b/types/fullcalendar/tslint.json index fe03bea79d..6e33505955 100644 --- a/types/fullcalendar/tslint.json +++ b/types/fullcalendar/tslint.json @@ -1,7 +1,7 @@ { "extends": "../tslint.json", "rules": { - "forbidden-types": false, + "ban-types": false, "unified-signatures": false } } diff --git a/types/fullcalendar/v1/index.d.ts b/types/fullcalendar/v1/index.d.ts index 4fcb41731b..4c8a5dc65a 100644 --- a/types/fullcalendar/v1/index.d.ts +++ b/types/fullcalendar/v1/index.d.ts @@ -71,10 +71,10 @@ declare global { contentHeight?: number; aspectRatio?: number; handleWindowResize?: boolean; - viewRender?: (view: ViewObject, element: JQuery) => void; - viewDestroy?: (view: ViewObject, element: JQuery) => void; - dayRender?: (date: Date, cell: HTMLTableDataCellElement) => void; - windowResize?: (view: ViewObject) => void; + viewRender?(view: ViewObject, element: JQuery): void; + viewDestroy?(view: ViewObject, element: JQuery): void; + dayRender?(date: Date, cell: HTMLTableDataCellElement): void; + windowResize?(view: ViewObject): void; // Timezone timezone?: string | boolean; @@ -106,10 +106,10 @@ declare global { // Clicking & Hovering - http://arshaw.com/fullcalendar/docs/mouse/ - dayClick?: (date: Date, allDay: boolean, jsEvent: MouseEvent, view: ViewObject) => void; - eventClick?: (event: EventObject, jsEvent: MouseEvent, view: ViewObject) => any; // return type boolean or void - eventMouseover?: (event: EventObject, jsEvent: MouseEvent, view: ViewObject) => void; - eventMouseout?: (event: EventObject, jsEvent: MouseEvent, view: ViewObject) => void; + dayClick?(date: Date, allDay: boolean, jsEvent: MouseEvent, view: ViewObject): void; + eventClick?(event: EventObject, jsEvent: MouseEvent, view: ViewObject): any; // return type boolean or void + eventMouseover?(event: EventObject, jsEvent: MouseEvent, view: ViewObject): void; + eventMouseout?(event: EventObject, jsEvent: MouseEvent, view: ViewObject): void; // Event Data - http://arshaw.com/fullcalendar/docs/event_data/ @@ -137,8 +137,8 @@ declare global { startParam?: string; endParam?: string; lazyFetching?: boolean; - eventDataTransform?: (eventData: any) => EventObject; - loading?: (isLoading: boolean, view: ViewObject) => void; + eventDataTransform?(eventData: any): EventObject; + loading?(isLoading: boolean, view: ViewObject): void; // Event Rendering - http://arshaw.com/fullcalendar/docs/event_rendering/ @@ -146,10 +146,10 @@ declare global { eventBackgroundColor?: string; eventBorderColor?: string; eventTextColor?: string; - eventRender?: (event: EventObject, element: HTMLDivElement, view: ViewObject) => void; - eventAfterRender?: (event: EventObject, element: HTMLDivElement, view: ViewObject) => void; - eventAfterAllRender?: (view: ViewObject) => void; - eventDestroy?: (event: EventObject, element: JQuery, view: ViewObject) => void; + eventRender?(event: EventObject, element: HTMLDivElement, view: ViewObject): void; + eventAfterRender?(event: EventObject, element: HTMLDivElement, view: ViewObject): void; + eventAfterAllRender?(view: ViewObject): void; + eventDestroy?(event: EventObject, element: JQuery, view: ViewObject): void; } interface ViewOptionHash { @@ -193,12 +193,12 @@ declare global { dragScroll?: boolean; eventOverlap?: boolean | ((stillEvent: EventObject, movingEvent: EventObject) => boolean); eventConstraint?: BusinessHours | Timespan; - eventDragStart?: (event: EventObject, jsEvent: MouseEvent, ui: any, view: ViewObject) => void; - eventDragStop?: (event: EventObject, jsEvent: MouseEvent, ui: any, view: ViewObject) => void; - eventDrop?: (event: EventObject, delta: moment.Duration, revertFunc: Function, jsEvent: Event, ui: any, view: ViewObject) => void; - eventResizeStart?: (event: EventObject, jsEvent: MouseEvent, ui: any, view: ViewObject) => void; - eventResizeStop?: (event: EventObject, jsEvent: MouseEvent, ui: any, view: ViewObject) => void; - eventResize?: (event: EventObject, delta: moment.Duration, revertFunc: Function, jsEvent: Event, ui: any, view: ViewObject) => void; + eventDragStart?(event: EventObject, jsEvent: MouseEvent, ui: any, view: ViewObject): void; + eventDragStop?(event: EventObject, jsEvent: MouseEvent, ui: any, view: ViewObject): void; + eventDrop?(event: EventObject, delta: moment.Duration, revertFunc: Function, jsEvent: Event, ui: any, view: ViewObject): void; + eventResizeStart?(event: EventObject, jsEvent: MouseEvent, ui: any, view: ViewObject): void; + eventResizeStop?(event: EventObject, jsEvent: MouseEvent, ui: any, view: ViewObject): void; + eventResize?(event: EventObject, delta: moment.Duration, revertFunc: Function, jsEvent: Event, ui: any, view: ViewObject): void; } /* * Selection - http://arshaw.com/fullcalendar/docs/selection/ @@ -210,15 +210,15 @@ declare global { unselectCancel?: string; selectOverlap?: boolean | ((event: EventObject) => boolean); selectConstraint?: Timespan | BusinessHours; - select?: (start: moment.Moment, end: moment.Moment, jsEvent: MouseEvent, view: ViewObject, resource?: any) => void; - unselect?: (view: ViewObject, jsEvent: Event) => void; + select?(start: moment.Moment, end: moment.Moment, jsEvent: MouseEvent, view: ViewObject, resource?: any): void; + unselect?(view: ViewObject, jsEvent: Event): void; } interface DroppingExternalElementsOptions { droppable?: boolean; dropAccept?: string | ((draggable: any) => boolean); - drop?: (date: moment.Moment, jsEvent: MouseEvent, ui: any) => void; - eventReceive?: (event: EventObject) => void; + drop?(date: moment.Moment, jsEvent: MouseEvent, ui: any): void; + eventReceive?(event: EventObject): void; } interface ButtonTextObject { diff --git a/types/fullcalendar/v1/tslint.json b/types/fullcalendar/v1/tslint.json index fe03bea79d..6e33505955 100644 --- a/types/fullcalendar/v1/tslint.json +++ b/types/fullcalendar/v1/tslint.json @@ -1,7 +1,7 @@ { "extends": "../tslint.json", "rules": { - "forbidden-types": false, + "ban-types": false, "unified-signatures": false } } diff --git a/types/fusioncharts/fusioncharts-tests.ts b/types/fusioncharts/fusioncharts-tests.ts index af71a2378a..ad6afac65b 100644 --- a/types/fusioncharts/fusioncharts-tests.ts +++ b/types/fusioncharts/fusioncharts-tests.ts @@ -4,9 +4,7 @@ FusionCharts.addEventListener('ready', (eventObject) => { eventObject.stopPropagation(); }); -FusionCharts.ready((fusioncharts) => { - -}); +FusionCharts.ready((fusioncharts) => {}); FusionCharts.version; @@ -48,4 +46,4 @@ chart.clone(); chart.zoomTo(0, 3); chart.zoomOut(); chart.setJSONData(chartData); -chart.ref; \ No newline at end of file +chart.ref; diff --git a/types/fusioncharts/fusioncharts.charts.d.ts b/types/fusioncharts/fusioncharts.charts.d.ts index f06060a054..82a41f7333 100644 --- a/types/fusioncharts/fusioncharts.charts.d.ts +++ b/types/fusioncharts/fusioncharts.charts.d.ts @@ -1,7 +1,5 @@ - import { FusionChartStatic } from "fusioncharts"; declare var charts: (H: FusionChartStatic) => FusionChartStatic; export = charts; export as namespace charts; - diff --git a/types/fusioncharts/fusioncharts.gantt.d.ts b/types/fusioncharts/fusioncharts.gantt.d.ts index d29fa26f78..e9dd4cfccf 100644 --- a/types/fusioncharts/fusioncharts.gantt.d.ts +++ b/types/fusioncharts/fusioncharts.gantt.d.ts @@ -1,7 +1,5 @@ - import { FusionChartStatic } from "fusioncharts"; declare var gantt: (H: FusionChartStatic) => FusionChartStatic; export = gantt; export as namespace gantt; - diff --git a/types/fusioncharts/fusioncharts.maps.d.ts b/types/fusioncharts/fusioncharts.maps.d.ts index 1894383758..48c5869608 100644 --- a/types/fusioncharts/fusioncharts.maps.d.ts +++ b/types/fusioncharts/fusioncharts.maps.d.ts @@ -1,7 +1,5 @@ - import { FusionChartStatic } from "fusioncharts"; declare var maps: (H: FusionChartStatic) => FusionChartStatic; export = maps; export as namespace maps; - diff --git a/types/fusioncharts/fusioncharts.powercharts.d.ts b/types/fusioncharts/fusioncharts.powercharts.d.ts index 46178c8b8f..e2004e8423 100644 --- a/types/fusioncharts/fusioncharts.powercharts.d.ts +++ b/types/fusioncharts/fusioncharts.powercharts.d.ts @@ -1,7 +1,5 @@ - import { FusionChartStatic } from "fusioncharts"; declare var powercharts: (H: FusionChartStatic) => FusionChartStatic; export = powercharts; export as namespace powercharts; - diff --git a/types/fusioncharts/fusioncharts.ssgrid.d.ts b/types/fusioncharts/fusioncharts.ssgrid.d.ts index b44f5336c1..fb7c2d51a2 100644 --- a/types/fusioncharts/fusioncharts.ssgrid.d.ts +++ b/types/fusioncharts/fusioncharts.ssgrid.d.ts @@ -1,7 +1,5 @@ - import { FusionChartStatic } from "fusioncharts"; declare var ssgrid: (H: FusionChartStatic) => FusionChartStatic; export = ssgrid; export as namespace ssgrid; - diff --git a/types/fusioncharts/fusioncharts.treemap.d.ts b/types/fusioncharts/fusioncharts.treemap.d.ts index c555a627bc..146c8b8b54 100644 --- a/types/fusioncharts/fusioncharts.treemap.d.ts +++ b/types/fusioncharts/fusioncharts.treemap.d.ts @@ -1,7 +1,5 @@ - import { FusionChartStatic } from "fusioncharts"; declare var treemap: (H: FusionChartStatic) => FusionChartStatic; export = treemap; export as namespace treemap; - diff --git a/types/fusioncharts/fusioncharts.widgets.d.ts b/types/fusioncharts/fusioncharts.widgets.d.ts index a4547b99b7..ea16eb60c9 100644 --- a/types/fusioncharts/fusioncharts.widgets.d.ts +++ b/types/fusioncharts/fusioncharts.widgets.d.ts @@ -1,7 +1,5 @@ - import { FusionChartStatic } from "fusioncharts"; declare var widgets: (H: FusionChartStatic) => FusionChartStatic; export = widgets; export as namespace widgets; - diff --git a/types/fusioncharts/fusioncharts.zoomscatter.d.ts b/types/fusioncharts/fusioncharts.zoomscatter.d.ts index 106908b6df..277050a77a 100644 --- a/types/fusioncharts/fusioncharts.zoomscatter.d.ts +++ b/types/fusioncharts/fusioncharts.zoomscatter.d.ts @@ -1,7 +1,5 @@ - import { FusionChartStatic } from "fusioncharts"; declare var zoomscatter: (H: FusionChartStatic) => FusionChartStatic; export = zoomscatter; export as namespace zoomscatter; - diff --git a/types/fusioncharts/index.d.ts b/types/fusioncharts/index.d.ts index 9c46955075..e218e32cd5 100644 --- a/types/fusioncharts/index.d.ts +++ b/types/fusioncharts/index.d.ts @@ -3,9 +3,7 @@ // Definitions by: Rohit Kumar , Shivaraj KV // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - declare namespace FusionCharts { - type ChartDataFormats = 'json' | 'jsonurl' | 'csv' | 'xml' | 'xmlurl'; type ImageHAlign = 'left' | 'right' | 'middle'; @@ -33,7 +31,6 @@ declare namespace FusionCharts { } interface ChartObject { - type?: string; id?: string; @@ -251,7 +248,6 @@ declare namespace FusionCharts { configure(options: {}): void; ref: {}; - } interface FusionChartStatic { @@ -286,10 +282,7 @@ declare namespace FusionCharts { options: {}; debugger: Debugger; - - } - } declare var FusionCharts: FusionCharts.FusionChartStatic; diff --git a/types/fusioncharts/maps/fusioncharts.usa.d.ts b/types/fusioncharts/maps/fusioncharts.usa.d.ts index 16ed0d6c91..5b02b82aa8 100644 --- a/types/fusioncharts/maps/fusioncharts.usa.d.ts +++ b/types/fusioncharts/maps/fusioncharts.usa.d.ts @@ -1,7 +1,5 @@ - import { FusionChartStatic } from "fusioncharts"; declare var usa: (H: FusionChartStatic) => FusionChartStatic; export = usa; export as namespace usa; - diff --git a/types/fusioncharts/maps/fusioncharts.world.d.ts b/types/fusioncharts/maps/fusioncharts.world.d.ts index 3e545e2556..e950cc08e3 100644 --- a/types/fusioncharts/maps/fusioncharts.world.d.ts +++ b/types/fusioncharts/maps/fusioncharts.world.d.ts @@ -1,7 +1,5 @@ - import { FusionChartStatic } from "fusioncharts"; declare var world: (H: FusionChartStatic) => FusionChartStatic; export = world; export as namespace world; - diff --git a/types/fusioncharts/themes/fusioncharts.theme.carbon.d.ts b/types/fusioncharts/themes/fusioncharts.theme.carbon.d.ts index 79ba171231..80b8096801 100644 --- a/types/fusioncharts/themes/fusioncharts.theme.carbon.d.ts +++ b/types/fusioncharts/themes/fusioncharts.theme.carbon.d.ts @@ -1,7 +1,5 @@ - import { FusionChartStatic } from "fusioncharts"; declare var carbon: (H: FusionChartStatic) => FusionChartStatic; export = carbon; export as namespace carbon; - diff --git a/types/fusioncharts/themes/fusioncharts.theme.fint.d.ts b/types/fusioncharts/themes/fusioncharts.theme.fint.d.ts index cee08aa6b2..a72265a049 100644 --- a/types/fusioncharts/themes/fusioncharts.theme.fint.d.ts +++ b/types/fusioncharts/themes/fusioncharts.theme.fint.d.ts @@ -1,7 +1,5 @@ - import { FusionChartStatic } from "fusioncharts"; declare var fint: (H: FusionChartStatic) => FusionChartStatic; export = fint; export as namespace fint; - diff --git a/types/fusioncharts/themes/fusioncharts.theme.ocean.d.ts b/types/fusioncharts/themes/fusioncharts.theme.ocean.d.ts index 8b7e3828c0..2f77db1f9b 100644 --- a/types/fusioncharts/themes/fusioncharts.theme.ocean.d.ts +++ b/types/fusioncharts/themes/fusioncharts.theme.ocean.d.ts @@ -1,7 +1,5 @@ - import { FusionChartStatic } from "fusioncharts"; declare var ocean: (H: FusionChartStatic) => FusionChartStatic; export = ocean; export as namespace ocean; - diff --git a/types/fusioncharts/themes/fusioncharts.theme.zune.d.ts b/types/fusioncharts/themes/fusioncharts.theme.zune.d.ts index 06ab4c1787..2f76b88de5 100644 --- a/types/fusioncharts/themes/fusioncharts.theme.zune.d.ts +++ b/types/fusioncharts/themes/fusioncharts.theme.zune.d.ts @@ -1,7 +1,5 @@ - import { FusionChartStatic } from "fusioncharts"; declare var zune: (H: FusionChartStatic) => FusionChartStatic; export = zune; export as namespace zune; - diff --git a/types/globule/globule-tests.ts b/types/globule/globule-tests.ts index 78697ba199..cf3d69c4b8 100644 --- a/types/globule/globule-tests.ts +++ b/types/globule/globule-tests.ts @@ -25,4 +25,3 @@ const dest = mappings[0].dest; mappings = globule.mapping(['*.js'], { srcBase: '/home/code' }); mappings = globule.mapping(['*.js', '*.less']); mappings = globule.mapping(['*.js'], ['*.less']); - diff --git a/types/globule/index.d.ts b/types/globule/index.d.ts index 4add1d4461..7918acbeae 100644 --- a/types/globule/index.d.ts +++ b/types/globule/index.d.ts @@ -21,7 +21,7 @@ interface MappingOptions extends FindOptions { ext?: string; extDot?: 'first' | 'last'; flatten?: boolean; - rename?: (p: string) => string; + rename?(p: string): string; } interface OneMapping { @@ -84,4 +84,3 @@ interface GlobuleStatic { declare var globule: GlobuleStatic; export = globule; - diff --git a/types/google-map-react/google-map-react-tests.tsx b/types/google-map-react/google-map-react-tests.tsx new file mode 100644 index 0000000000..959bb8e68a --- /dev/null +++ b/types/google-map-react/google-map-react-tests.tsx @@ -0,0 +1,6 @@ +import GoogleMapReact from 'google-map-react'; +import * as React from 'react'; + +const center = { lat: 0, lng: 0 }; + +; diff --git a/types/google-map-react/index.d.ts b/types/google-map-react/index.d.ts new file mode 100644 index 0000000000..98fb290e5d --- /dev/null +++ b/types/google-map-react/index.d.ts @@ -0,0 +1,83 @@ +// Type definitions for google-map-react 0.22 +// Project: https://github.com/istarkov/google-map-react +// Definitions by: Honza Brecka +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 + +import * as React from 'react'; + +export interface BootstrapURLKeys { + key: string; + language?: string; +} + +export interface Options { + styles?: any[]; + scrollwheel?: boolean; + panControl?: boolean; + mapTypeControl?: boolean; + minZoomOverride?: boolean; + minZoom?: number; + gestureHandling?: string; +} + +export interface Maps { + Animation: any; + ControlPosition: any; + MapTypeControlStyle: any; + MapTypeId: any; + NavigationControlStyle: any; + ScaleControlStyle: any; + StrokePosition: any; + SymbolPath: any; + ZoomControlStyle: any; + DirectionsStatus: any; + DirectionsTravelMode: any; + DirectionsUnitSystem: any; + DistanceMatrixStatus: any; + DistanceMatrixElementStatus: any; + ElevationStatus: any; + GeocoderLocationType: any; + GeocoderStatus: any; + KmlLayerStats: any; + MaxZoomStatus: any; + StreetViewStatus: any; + TransitMode: any; + TransitRoutePreference: any; + TravelMode: any; + UnitSystem: any; +} + +export interface Props { + bootstrapURLKeys?: BootstrapURLKeys; + defaultCenter?: [number, number] | { lat: number, lng: number }; + center?: [number, number] | { lat: number, lng: number }; + defaultZoom?: number; + zoom?: number; + hoverDistance?: number; + options?: Options | ((maps: Maps) => Options); + margin?: any[]; + debounced?: boolean; + layerTypes?: string[]; + onClick?({x, y, lat, lng, event}: { x: number, y: number, lat: number, lng: number, event: any }): any; + onChange?({ center, zoom, bounds, marginBounds }: { center: [number, number], zoom: number, bounds: [number, number, number, number], marginBounds: [number, number, number, number] }): any; + resetBoundsOnResize?: boolean; + onChildClick?(hoverKey: any, childProps: any): void; + onChildMouseEnter?(hoverKey: any, childProps: any): void; + onChildMouseLeave?(hoverKey: any, childProps: any): void; + onZoomAnimationStart?(args: any): void; + onZoomAnimationEnd?(args: any): void; + onMapTypeIdChange?(args: any): void; + distanceToMouse?(pt: {x: number, y: number}, mousePos: {x: number, y: number}): void; + googleMapLoader?(bootstrapURLKeys: any): void; + onGoogleApiLoaded?({map, maps}: { map: any, maps: any }): void; + yesIWantToUseGoogleMapApiInternals?: boolean; +} + +export default class GoogleMapReact extends React.Component {} + +export interface ChildComponentProps { + lat: number; + lng: number; + $hover?: boolean; +} diff --git a/types/google-map-react/tsconfig.json b/types/google-map-react/tsconfig.json new file mode 100644 index 0000000000..2e2a37aaf6 --- /dev/null +++ b/types/google-map-react/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "jsx": "react", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "google-map-react-tests.tsx" + ] +} diff --git a/types/google-map-react/tslint.json b/types/google-map-react/tslint.json new file mode 100644 index 0000000000..377cc837d4 --- /dev/null +++ b/types/google-map-react/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } diff --git a/types/google-protobuf/google/protobuf/api_pb.d.ts b/types/google-protobuf/google/protobuf/api_pb.d.ts index a7ba91088c..abb0c56df0 100644 --- a/types/google-protobuf/google/protobuf/api_pb.d.ts +++ b/types/google-protobuf/google/protobuf/api_pb.d.ts @@ -21,8 +21,8 @@ export class Api extends jspb.Message { hasSourceContext(): boolean; clearSourceContext(): void; - getSourceContext(): google_protobuf_source_context_pb.SourceContext; - setSourceContext(value: google_protobuf_source_context_pb.SourceContext): void; + getSourceContext(): google_protobuf_source_context_pb.SourceContext | undefined; + setSourceContext(value?: google_protobuf_source_context_pb.SourceContext): void; clearMixinsList(): void; getMixinsList(): Array; @@ -48,7 +48,7 @@ export namespace Api { methodsList: Array, optionsList: Array, version: string, - sourceContext: google_protobuf_source_context_pb.SourceContext.AsObject, + sourceContext?: google_protobuf_source_context_pb.SourceContext.AsObject, mixinsList: Array, syntax: google_protobuf_type_pb.Syntax, } diff --git a/types/google-protobuf/google/protobuf/compiler/plugin_pb.d.ts b/types/google-protobuf/google/protobuf/compiler/plugin_pb.d.ts index 0e3491e702..bc4a15554f 100644 --- a/types/google-protobuf/google/protobuf/compiler/plugin_pb.d.ts +++ b/types/google-protobuf/google/protobuf/compiler/plugin_pb.d.ts @@ -34,10 +34,10 @@ export class Version extends jspb.Message { export namespace Version { export type AsObject = { - major: number, - minor: number, - patch: number, - suffix: string, + major?: number, + minor?: number, + patch?: number, + suffix?: string, } } @@ -60,7 +60,7 @@ export class CodeGeneratorRequest extends jspb.Message { hasCompilerVersion(): boolean; clearCompilerVersion(): void; getCompilerVersion(): Version; - setCompilerVersion(value: Version): void; + setCompilerVersion(value?: Version): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): CodeGeneratorRequest.AsObject; @@ -75,7 +75,7 @@ export class CodeGeneratorRequest extends jspb.Message { export namespace CodeGeneratorRequest { export type AsObject = { fileToGenerateList: Array, - parameter: string, + parameter?: string, protoFileList: Array, compilerVersion: Version.AsObject, } @@ -104,7 +104,7 @@ export class CodeGeneratorResponse extends jspb.Message { export namespace CodeGeneratorResponse { export type AsObject = { - error: string, + error?: string, fileList: Array, } @@ -136,9 +136,9 @@ export namespace CodeGeneratorResponse { export namespace File { export type AsObject = { - name: string, - insertionPoint: string, - content: string, + name?: string, + insertionPoint?: string, + content?: string, } } } diff --git a/types/google-protobuf/google/protobuf/descriptor_pb.d.ts b/types/google-protobuf/google/protobuf/descriptor_pb.d.ts index 294cbab1dc..920850a8d8 100644 --- a/types/google-protobuf/google/protobuf/descriptor_pb.d.ts +++ b/types/google-protobuf/google/protobuf/descriptor_pb.d.ts @@ -71,12 +71,12 @@ export class FileDescriptorProto extends jspb.Message { hasOptions(): boolean; clearOptions(): void; getOptions(): FileOptions; - setOptions(value: FileOptions): void; + setOptions(value?: FileOptions): void; hasSourceCodeInfo(): boolean; clearSourceCodeInfo(): void; getSourceCodeInfo(): SourceCodeInfo; - setSourceCodeInfo(value: SourceCodeInfo): void; + setSourceCodeInfo(value?: SourceCodeInfo): void; hasSyntax(): boolean; clearSyntax(): void; @@ -95,8 +95,8 @@ export class FileDescriptorProto extends jspb.Message { export namespace FileDescriptorProto { export type AsObject = { - name: string, - package: string, + name?: string, + package?: string, dependencyList: Array, publicDependencyList: Array, weakDependencyList: Array, @@ -106,7 +106,7 @@ export namespace FileDescriptorProto { extensionList: Array, options: FileOptions.AsObject, sourceCodeInfo: SourceCodeInfo.AsObject, - syntax: string, + syntax?: string, } } @@ -149,7 +149,7 @@ export class DescriptorProto extends jspb.Message { hasOptions(): boolean; clearOptions(): void; getOptions(): MessageOptions; - setOptions(value: MessageOptions): void; + setOptions(value?: MessageOptions): void; clearReservedRangeList(): void; getReservedRangeList(): Array; @@ -173,7 +173,7 @@ export class DescriptorProto extends jspb.Message { export namespace DescriptorProto { export type AsObject = { - name: string, + name?: string, fieldList: Array, extensionList: Array, nestedTypeList: Array, @@ -208,8 +208,8 @@ export namespace DescriptorProto { export namespace ExtensionRange { export type AsObject = { - start: number, - end: number, + start?: number, + end?: number, } } @@ -236,8 +236,8 @@ export namespace DescriptorProto { export namespace ReservedRange { export type AsObject = { - start: number, - end: number, + start?: number, + end?: number, } } } @@ -291,7 +291,7 @@ export class FieldDescriptorProto extends jspb.Message { hasOptions(): boolean; clearOptions(): void; getOptions(): FieldOptions; - setOptions(value: FieldOptions): void; + setOptions(value?: FieldOptions): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): FieldDescriptorProto.AsObject; @@ -305,15 +305,15 @@ export class FieldDescriptorProto extends jspb.Message { export namespace FieldDescriptorProto { export type AsObject = { - name: string, - number: number, - label: FieldDescriptorProto.Label, - type: FieldDescriptorProto.Type, - typeName: string, - extendee: string, - defaultValue: string, - oneofIndex: number, - jsonName: string, + name?: string, + number?: number, + label?: FieldDescriptorProto.Label, + type?: FieldDescriptorProto.Type, + typeName?: string, + extendee?: string, + defaultValue?: string, + oneofIndex?: number, + jsonName?: string, options: FieldOptions.AsObject, } @@ -337,6 +337,7 @@ export namespace FieldDescriptorProto { TYPE_SINT32 = 17, TYPE_SINT64 = 18, } + export enum Label { LABEL_OPTIONAL = 1, LABEL_REQUIRED = 2, @@ -353,7 +354,7 @@ export class OneofDescriptorProto extends jspb.Message { hasOptions(): boolean; clearOptions(): void; getOptions(): OneofOptions; - setOptions(value: OneofOptions): void; + setOptions(value?: OneofOptions): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): OneofDescriptorProto.AsObject; @@ -367,7 +368,7 @@ export class OneofDescriptorProto extends jspb.Message { export namespace OneofDescriptorProto { export type AsObject = { - name: string, + name?: string, options: OneofOptions.AsObject, } } @@ -386,7 +387,7 @@ export class EnumDescriptorProto extends jspb.Message { hasOptions(): boolean; clearOptions(): void; getOptions(): EnumOptions; - setOptions(value: EnumOptions): void; + setOptions(value?: EnumOptions): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): EnumDescriptorProto.AsObject; @@ -400,7 +401,7 @@ export class EnumDescriptorProto extends jspb.Message { export namespace EnumDescriptorProto { export type AsObject = { - name: string, + name?: string, valueList: Array, options: EnumOptions.AsObject, } @@ -420,7 +421,7 @@ export class EnumValueDescriptorProto extends jspb.Message { hasOptions(): boolean; clearOptions(): void; getOptions(): EnumValueOptions; - setOptions(value: EnumValueOptions): void; + setOptions(value?: EnumValueOptions): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): EnumValueDescriptorProto.AsObject; @@ -434,8 +435,8 @@ export class EnumValueDescriptorProto extends jspb.Message { export namespace EnumValueDescriptorProto { export type AsObject = { - name: string, - number: number, + name?: string, + number?: number, options: EnumValueOptions.AsObject, } } @@ -454,7 +455,7 @@ export class ServiceDescriptorProto extends jspb.Message { hasOptions(): boolean; clearOptions(): void; getOptions(): ServiceOptions; - setOptions(value: ServiceOptions): void; + setOptions(value?: ServiceOptions): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): ServiceDescriptorProto.AsObject; @@ -468,7 +469,7 @@ export class ServiceDescriptorProto extends jspb.Message { export namespace ServiceDescriptorProto { export type AsObject = { - name: string, + name?: string, methodList: Array, options: ServiceOptions.AsObject, } @@ -493,7 +494,7 @@ export class MethodDescriptorProto extends jspb.Message { hasOptions(): boolean; clearOptions(): void; getOptions(): MethodOptions; - setOptions(value: MethodOptions): void; + setOptions(value?: MethodOptions): void; hasClientStreaming(): boolean; clearClientStreaming(): void; @@ -517,12 +518,12 @@ export class MethodDescriptorProto extends jspb.Message { export namespace MethodDescriptorProto { export type AsObject = { - name: string, - inputType: string, - outputType: string, + name?: string, + inputType?: string, + outputType?: string, options: MethodOptions.AsObject, - clientStreaming: boolean, - serverStreaming: boolean, + clientStreaming?: boolean, + serverStreaming?: boolean, } } @@ -619,21 +620,21 @@ export class FileOptions extends jspb.Message { export namespace FileOptions { export type AsObject = { - javaPackage: string, - javaOuterClassname: string, - javaMultipleFiles: boolean, - javaGenerateEqualsAndHash: boolean, - javaStringCheckUtf8: boolean, - optimizeFor: FileOptions.OptimizeMode, - goPackage: string, - ccGenericServices: boolean, - javaGenericServices: boolean, - pyGenericServices: boolean, - deprecated: boolean, - ccEnableArenas: boolean, - objcClassPrefix: string, - csharpNamespace: string, - swiftPrefix: string, + javaPackage?: string, + javaOuterClassname?: string, + javaMultipleFiles?: boolean, + javaGenerateEqualsAndHash?: boolean, + javaStringCheckUtf8?: boolean, + optimizeFor?: FileOptions.OptimizeMode, + goPackage?: string, + ccGenericServices?: boolean, + javaGenericServices?: boolean, + pyGenericServices?: boolean, + deprecated?: boolean, + ccEnableArenas?: boolean, + objcClassPrefix?: string, + csharpNamespace?: string, + swiftPrefix?: string, uninterpretedOptionList: Array, } @@ -682,10 +683,10 @@ export class MessageOptions extends jspb.Message { export namespace MessageOptions { export type AsObject = { - messageSetWireFormat: boolean, - noStandardDescriptorAccessor: boolean, - deprecated: boolean, - mapEntry: boolean, + messageSetWireFormat?: boolean, + noStandardDescriptorAccessor?: boolean, + deprecated?: boolean, + mapEntry?: boolean, uninterpretedOptionList: Array, } } @@ -738,12 +739,12 @@ export class FieldOptions extends jspb.Message { export namespace FieldOptions { export type AsObject = { - ctype: FieldOptions.CType, - packed: boolean, - jstype: FieldOptions.JSType, - lazy: boolean, - deprecated: boolean, - weak: boolean, + ctype?: FieldOptions.CType, + packed?: boolean, + jstype?: FieldOptions.JSType, + lazy?: boolean, + deprecated?: boolean, + weak?: boolean, uninterpretedOptionList: Array, } @@ -752,6 +753,7 @@ export namespace FieldOptions { CORD = 1, STRING_PIECE = 2, } + export enum JSType { JS_NORMAL = 0, JS_STRING = 1, @@ -809,8 +811,8 @@ export class EnumOptions extends jspb.Message { export namespace EnumOptions { export type AsObject = { - allowAlias: boolean, - deprecated: boolean, + allowAlias?: boolean, + deprecated?: boolean, uninterpretedOptionList: Array, } } @@ -838,7 +840,7 @@ export class EnumValueOptions extends jspb.Message { export namespace EnumValueOptions { export type AsObject = { - deprecated: boolean, + deprecated?: boolean, uninterpretedOptionList: Array, } } @@ -866,7 +868,7 @@ export class ServiceOptions extends jspb.Message { export namespace ServiceOptions { export type AsObject = { - deprecated: boolean, + deprecated?: boolean, uninterpretedOptionList: Array, } } @@ -899,8 +901,8 @@ export class MethodOptions extends jspb.Message { export namespace MethodOptions { export type AsObject = { - deprecated: boolean, - idempotencyLevel: MethodOptions.IdempotencyLevel, + deprecated?: boolean, + idempotencyLevel?: MethodOptions.IdempotencyLevel, uninterpretedOptionList: Array, } @@ -962,12 +964,12 @@ export class UninterpretedOption extends jspb.Message { export namespace UninterpretedOption { export type AsObject = { nameList: Array, - identifierValue: string, - positiveIntValue: number, - negativeIntValue: number, - doubleValue: number, + identifierValue?: string, + positiveIntValue?: number, + negativeIntValue?: number, + doubleValue?: number, stringValue: Uint8Array | string, - aggregateValue: string, + aggregateValue?: string, } export class NamePart extends jspb.Message { @@ -993,8 +995,8 @@ export namespace UninterpretedOption { export namespace NamePart { export type AsObject = { - namePart: string, - isExtension: boolean, + namePart?: string, + isExtension?: boolean, } } } @@ -1060,8 +1062,8 @@ export namespace SourceCodeInfo { export type AsObject = { pathList: Array, spanList: Array, - leadingComments: string, - trailingComments: string, + leadingComments?: string, + trailingComments?: string, leadingDetachedCommentsList: Array, } } @@ -1122,9 +1124,9 @@ export namespace GeneratedCodeInfo { export namespace Annotation { export type AsObject = { pathList: Array, - sourceFile: string, - begin: number, - end: number, + sourceFile?: string, + begin?: number, + end?: number, } } } diff --git a/types/google-protobuf/google/protobuf/struct_pb.d.ts b/types/google-protobuf/google/protobuf/struct_pb.d.ts index 46c28ad1df..ed033e91ce 100644 --- a/types/google-protobuf/google/protobuf/struct_pb.d.ts +++ b/types/google-protobuf/google/protobuf/struct_pb.d.ts @@ -46,13 +46,13 @@ export class Value extends jspb.Message { hasStructValue(): boolean; clearStructValue(): void; - getStructValue(): Struct; - setStructValue(value: Struct): void; + getStructValue(): Struct | undefined; + setStructValue(value?: Struct): void; hasListValue(): boolean; clearListValue(): void; - getListValue(): ListValue; - setListValue(value: ListValue): void; + getListValue(): ListValue | undefined; + setListValue(value?: ListValue): void; getKindCase(): Value.KindCase; @@ -75,8 +75,8 @@ export namespace Value { numberValue: number, stringValue: string, boolValue: boolean, - structValue: Struct.AsObject, - listValue: ListValue.AsObject, + structValue?: Struct.AsObject, + listValue?: ListValue.AsObject, } export enum KindCase { diff --git a/types/google-protobuf/google/protobuf/type_pb.d.ts b/types/google-protobuf/google/protobuf/type_pb.d.ts index 186bad8d36..cb330a9318 100644 --- a/types/google-protobuf/google/protobuf/type_pb.d.ts +++ b/types/google-protobuf/google/protobuf/type_pb.d.ts @@ -23,8 +23,8 @@ export class Type extends jspb.Message { hasSourceContext(): boolean; clearSourceContext(): void; - getSourceContext(): google_protobuf_source_context_pb.SourceContext; - setSourceContext(value: google_protobuf_source_context_pb.SourceContext): void; + getSourceContext(): google_protobuf_source_context_pb.SourceContext | undefined; + setSourceContext(value?: google_protobuf_source_context_pb.SourceContext): void; getSyntax(): Syntax; setSyntax(value: Syntax): void; @@ -45,7 +45,7 @@ export namespace Type { fieldsList: Array, oneofsList: Array, optionsList: Array, - sourceContext: google_protobuf_source_context_pb.SourceContext.AsObject, + sourceContext?: google_protobuf_source_context_pb.SourceContext.AsObject, syntax: Syntax, } } @@ -128,6 +128,7 @@ export namespace Field { TYPE_SINT32 = 17, TYPE_SINT64 = 18, } + export enum Cardinality { CARDINALITY_UNKNOWN = 0, CARDINALITY_OPTIONAL = 1, @@ -152,8 +153,8 @@ export class Enum extends jspb.Message { hasSourceContext(): boolean; clearSourceContext(): void; - getSourceContext(): google_protobuf_source_context_pb.SourceContext; - setSourceContext(value: google_protobuf_source_context_pb.SourceContext): void; + getSourceContext(): google_protobuf_source_context_pb.SourceContext | undefined; + setSourceContext(value?: google_protobuf_source_context_pb.SourceContext): void; getSyntax(): Syntax; setSyntax(value: Syntax): void; @@ -173,7 +174,7 @@ export namespace Enum { name: string, enumvalueList: Array, optionsList: Array, - sourceContext: google_protobuf_source_context_pb.SourceContext.AsObject, + sourceContext?: google_protobuf_source_context_pb.SourceContext.AsObject, syntax: Syntax, } } @@ -214,8 +215,8 @@ export class Option extends jspb.Message { hasValue(): boolean; clearValue(): void; - getValue(): google_protobuf_any_pb.Any; - setValue(value: google_protobuf_any_pb.Any): void; + getValue(): google_protobuf_any_pb.Any | undefined; + setValue(value?: google_protobuf_any_pb.Any): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Option.AsObject; @@ -230,7 +231,7 @@ export class Option extends jspb.Message { export namespace Option { export type AsObject = { name: string, - value: google_protobuf_any_pb.Any.AsObject, + value?: google_protobuf_any_pb.Any.AsObject, } } diff --git a/types/google-protobuf/index.d.ts b/types/google-protobuf/index.d.ts index 9dcb7ea609..8ed770deca 100644 --- a/types/google-protobuf/index.d.ts +++ b/types/google-protobuf/index.d.ts @@ -170,13 +170,14 @@ export class Map { arr: Array<[K, V]>, valueCtor?: {new(init: any): V}); toArray(): Array<[K, V]>; - toObject( + toObject(includeInstance?: boolean): Array<[K, V]>; + toObject( includeInstance: boolean, - valueToObject: (includeInstance: boolean) => any): Array<[K, V]>; - static fromObject( - entries: Array<[K, V]>, + valueToObject: (includeInstance: boolean, valueWrapper: V) => VO): Array<[K, VO]>; + static fromObject( + entries: Array<[TK, TV]>, valueCtor: any, - valueFromObject: any): Map; + valueFromObject: any): Map; getLength(): number; clear(): void; del(key: K): boolean; @@ -186,7 +187,7 @@ export class Map { forEach( callback: (entry: V, key: K) => void, thisArg?: {}): void; - set(key: K, value: V): void; + set(key: K, value: V): this; get(key: K): (V | undefined); has(key: K): boolean; } diff --git a/types/google-protobuf/tslint.json b/types/google-protobuf/tslint.json index fdc7cdc370..a980701dab 100644 --- a/types/google-protobuf/tslint.json +++ b/types/google-protobuf/tslint.json @@ -1,3 +1,16 @@ { - "extends": "../tslint.json" + "extends": "../tslint.json", + "rules": { + "align": false, + "array-type": false, + "new-parens": false, + "no-consecutive-blank-lines": false, + "no-redundant-modifiers": false, + "interface-over-type-literal": false, + "no-relative-import-in-test": false, + "no-var": false, + "prefer-declare-function": false, + "semicolon": false, + "trim-file": false + } } \ No newline at end of file diff --git a/types/google.analytics/index.d.ts b/types/google.analytics/index.d.ts index c8bf91fd74..088ce364e1 100644 --- a/types/google.analytics/index.d.ts +++ b/types/google.analytics/index.d.ts @@ -292,7 +292,7 @@ declare namespace UniversalAnalytics { expVar?: string; flashVersion?: string; forceSSL?: boolean; - hitCallback?: () => void; + hitCallback?(): void; hitType?: string; hostname?: string; id?: string; diff --git a/types/google.analytics/tslint.json b/types/google.analytics/tslint.json index e8bc207e33..de20a402c4 100644 --- a/types/google.analytics/tslint.json +++ b/types/google.analytics/tslint.json @@ -2,7 +2,7 @@ "extends": "../tslint.json", "rules": { "dt-header": false, - "forbidden-types": false, + "ban-types": false, "unified-signatures": false } } diff --git a/types/google.picker/index.d.ts b/types/google.picker/index.d.ts index 97efc2f2db..0341811917 100644 --- a/types/google.picker/index.d.ts +++ b/types/google.picker/index.d.ts @@ -60,7 +60,7 @@ declare namespace google { setSelectableMimeTypes(type:string):PickerBuilder; // Set the preferred dialog size. The dialog will be auto-centered. It has a minimum size of (566,350) and a maximum size of (1051,650). - setSize():PickerBuilder; + setSize(width:number, height:number):PickerBuilder; // Set the dialog title. setTitle(title:string):PickerBuilder; diff --git a/types/googlemaps/index.d.ts b/types/googlemaps/index.d.ts index 5f25ea0cab..41da96d754 100644 --- a/types/googlemaps/index.d.ts +++ b/types/googlemaps/index.d.ts @@ -835,24 +835,52 @@ declare namespace google.maps { getVisible(): boolean; setDraggable(draggable: boolean): void; setEditable(editable: boolean): void; - setMap(map: Map | null): void; + setMap(map: Map | null): void; setOptions(options: PolylineOptions): void; setPath(path: MVCArray|LatLng[]|LatLngLiteral[]): void; // MVCArray|Array setVisible(visible: boolean): void; } export interface PolylineOptions { + /** Indicates whether this Polyline handles mouse events. Defaults to true. */ clickable?: boolean; + /** + * If set to true, the user can drag this shape over the map. + * The geodesic property defines the mode of dragging. Defaults to false. + */ draggable?: boolean; + /** + * If set to true, the user can edit this shape by dragging the control points shown at the vertices and on + * each segment. Defaults to false. + */ editable?: boolean; + /** + * When true, edges of the polygon are interpreted as geodesic and will follow the curvature of the Earth. + * When false, edges of the polygon are rendered as straight lines in screen space. Note that the shape of a + * geodesic polygon may appear to change when dragged, as the dimensions are maintained relative to the + * surface of the earth. Defaults to false. + */ geodesic?: boolean; + /** The icons to be rendered along the polyline. */ icons?: IconSequence[]; + /** Map on which to display Polyline. */ map?: Map; + /** + * The ordered sequence of coordinates of the Polyline. + * This path may be specified using either a simple array of LatLngs, or an MVCArray of LatLngs. + * Note that if you pass a simple array, it will be converted to an MVCArray Inserting or removing LatLngs + * in the MVCArray will automatically update the polyline on the map. + */ path?: MVCArray|LatLng[]|LatLngLiteral[]; // MVCArray|Array + /** The stroke color. All CSS3 colors are supported except for extended named colors. */ strokeColor?: string; + /** The stroke opacity between 0.0 and 1.0. */ strokeOpacity?: number; + /** The stroke width in pixels. */ strokeWeight?: number; + /** Whether this polyline is visible on the map. Defaults to true. */ visible?: boolean; + /** The zIndex compared to other polys. */ zIndex?: number; } @@ -873,7 +901,7 @@ declare namespace google.maps { getVisible(): boolean; setDraggable(draggable: boolean): void; setEditable(editable: boolean): void; - setMap(map: Map | null): void; + setMap(map: Map | null): void; setOptions(options: PolygonOptions): void; setPath(path: MVCArray|LatLng[]|LatLngLiteral[]): void; setPaths(paths: MVCArray): void; @@ -959,7 +987,7 @@ declare namespace google.maps { setBounds(bounds: LatLngBounds|LatLngBoundsLiteral): void; setDraggable(draggable: boolean): void; setEditable(editable: boolean): void; - setMap(map: Map | null): void; + setMap(map: Map | null): void; setOptions(options: RectangleOptions): void; setVisible(visible: boolean): void; } @@ -980,38 +1008,75 @@ declare namespace google.maps { zIndex?: number; } + /** A circle on the Earth's surface; also known as a "spherical cap". */ export class Circle extends MVCObject { + /** Create a circle using the passed CircleOptions, which specify the center, radius, and style. */ constructor(opts?: CircleOptions); + /** Gets the LatLngBounds of this Circle. */ getBounds(): LatLngBounds; + /** Returns the center of this circle. */ getCenter(): LatLng; + /** Returns whether this circle can be dragged by the user. */ getDraggable(): boolean; + /** Returns whether this circle can be edited by the user. */ getEditable(): boolean; + /** Returns the map on which this circle is displayed. */ getMap(): Map; + /** Returns the radius of this circle (in meters). */ getRadius(): number; + /** Returns whether this circle is visible on the map. */ getVisible(): boolean; + /** Sets the center of this circle. */ setCenter(center: LatLng|LatLngLiteral): void; + /** If set to true, the user can drag this circle over the map. */ setDraggable(draggable: boolean): void; + /** + * If set to true, the user can edit this circle by dragging the control points shown at the center and around + * the circumference of the circle. + */ setEditable(editable: boolean): void; - setMap(map: Map | null): void; + /** Renders the circle on the specified map. If map is set to null, the circle will be removed. */ + setMap(map: Map | null): void; setOptions(options: CircleOptions): void; + /** Sets the radius of this circle (in meters). */ setRadius(radius: number): void; + /** Hides this circle if set to false. */ setVisible(visible: boolean): void; } export interface CircleOptions { + /** The center */ center?: LatLng|LatLngLiteral; + /** Indicates whether this Circle handles mouse events. Defaults to true. */ clickable?: boolean; + /** If set to true, the user can drag this circle over the map. Defaults to false. */ draggable?: boolean; + /** + * If set to true, the user can edit this circle by dragging the control points shown at the center and around + * the circumference of the circle. Defaults to false. + */ editable?: boolean; + /** The fill color. All CSS3 colors are supported except for extended named colors. */ fillColor?: string; + /** The fill opacity between 0.0 and 1.0 */ fillOpacity?: number; + /** Map on which to display Circle. */ map?: Map; + /** The radius in meters on the Earth's surface */ radius?: number; + /** The stroke color. All CSS3 colors are supported except for extended named colors. */ strokeColor?: string; + /** The stroke opacity between 0.0 and 1.0 */ strokeOpacity?: number; + /** + * The stroke position. Defaults to CENTER. This property is not supported on Internet Explorer 8 and earlier. + */ strokePosition?: StrokePosition; + /** The stroke width in pixels. */ strokeWeight?: number; + /** Whether this circle is visible on the map. Defaults to true. */ visible?: boolean; + /** The zIndex compared to other polys. */ zIndex?: number; } @@ -1036,7 +1101,7 @@ declare namespace google.maps { getMap(): Map; getOpacity(): number; getUrl(): string; - setMap(map: Map | null): void; + setMap(map: Map | null): void; setOpacity(opacity: number): void; } @@ -1053,7 +1118,7 @@ declare namespace google.maps { getProjection(): MapCanvasProjection; onAdd(): void; onRemove(): void; - setMap(map: Map | StreetViewPanorama | null): void; + setMap(map: Map | StreetViewPanorama | null): void; } export interface MapPanes { @@ -1144,7 +1209,7 @@ declare namespace google.maps { getPanel(): Element; getRouteIndex(): number; setDirections(directions: DirectionsResult): void; - setMap(map: Map | null): void; + setMap(map: Map | null): void; setOptions(options: DirectionsRendererOptions): void; setPanel(panel: Element): void; setRouteIndex(routeIndex: number): void; @@ -1171,20 +1236,59 @@ declare namespace google.maps { route(request: DirectionsRequest, callback: (result: DirectionsResult, status: DirectionsStatus) => void ): void; } + /** A directions query to be sent to the DirectionsService. */ export interface DirectionsRequest { + /** If true, instructs the Directions service to avoid ferries where possible. Optional. */ avoidFerries?: boolean; + /** If true, instructs the Directions service to avoid highways where possible. Optional. */ avoidHighways?: boolean; + /** If true, instructs the Directions service to avoid toll roads where possible. Optional. */ avoidTolls?: boolean; + /** + * Location of destination. This can be specified as either a string to be geocoded, or a LatLng, + * or a Place. Required. + */ destination?: string|LatLng|Place; - durationInTraffic?: boolean; /* Deprecated. Use drivingOptions field instead */ + /** Deprecated. Use drivingOptions field instead */ + durationInTraffic?: boolean; + /** + * Settings that apply only to requests where travelMode is DRIVING. This object will have no effect + * for other travel modes. + */ drivingOptions?: DrivingOptions; + /** + * If set to true, the DirectionService will attempt to re-order the supplied intermediate waypoints + * to minimize overall cost of the route. If waypoints are optimized, inspect DirectionsRoute.waypoint_order + * in the response to determine the new ordering. + */ optimizeWaypoints?: boolean; + /** + * Location of origin. This can be specified as either a string to be geocoded, or a LatLng, or a Place. + * Required. + */ origin?: string|LatLng|Place; + /** Whether or not route alternatives should be provided. Optional. */ provideRouteAlternatives?: boolean; + /** Region code used as a bias for geocoding requests. Optional. */ region?: string; + /** + * Settings that apply only to requests where travelMode is TRANSIT. This object will have no effect for + * other travel modes. + */ transitOptions?: TransitOptions; + /** Type of routing requested. Required. */ travelMode?: TravelMode; + /** + * Preferred unit system to use when displaying distance. Defaults to the unit system used + * in the country of origin. + */ unitSystem?: UnitSystem; + /** + * Array of intermediate waypoints. Directions will be calculated from the origin to the destination by way + * of each waypoint in this array. The maximum allowed waypoints is 8, plus the origin, and destination. + * Premium Plan customers are allowed 23 waypoints, plus the origin, and destination. + * Waypoints are not supported for transit directions. Optional. + */ waypoints?: DirectionsWaypoint[]; } @@ -1235,8 +1339,20 @@ declare namespace google.maps { PESSIMISTIC } + /** + * A DirectionsWaypoint represents a location between origin and destination + * through which the trip should be routed. + */ export interface DirectionsWaypoint { + /** Waypoint location. Can be an address string, a LatLng, or a Place. Optional. */ location: LatLng|LatLngLiteral|string; + /** + * If true, indicates that this waypoint is a stop between the origin and destination. + * This has the effect of splitting the route into two legs. If false, indicates that the route + * should be biased to go through this waypoint, but not split into two legs. This is useful + * if you want to create a route in response to the user dragging waypoints on a map. + * This value is true by default. Optional. + */ stopover: boolean; } @@ -1255,14 +1371,50 @@ declare namespace google.maps { routes: DirectionsRoute[]; } + /** + * A single route containing a set of legs in a DirectionsResult. + * Note that though this object is "JSON-like," it is not strictly JSON, + * as it directly and indirectly includes LatLng objects. + */ export interface DirectionsRoute { + /** The bounds for this route. */ bounds: LatLngBounds; + /** Copyrights text to be displayed for this route. */ copyrights: string; + /** The total fare for the whole transit trip. Only applicable to transit requests. */ fare: TransitFare; + /** + * An array of DirectionsLegs, each of which contains information about the steps of which it is composed. + * There will be one leg for each stopover waypoint or destination specified. So a route with no stopover + * waypoints will contain one DirectionsLeg and a route with one stopover waypoint will contain two. + */ legs: DirectionsLeg[]; + /** + * An array of LatLngs representing the entire course of this route. The path is simplified in order to make + * it suitable in contexts where a small number of vertices is required (such as Static Maps API URLs). + */ overview_path: LatLng[]; + /** + * An encoded polyline representation of the route in overview_path. + * This polyline is an approximate (smoothed) path of the resulting directions. + */ overview_polyline: string; + /** Warnings to be displayed when showing these directions. */ warnings: string[]; + /** + * If optimizeWaypoints was set to true, this field will contain the re-ordered permutation + * of the input waypoints. For example, if the input was: + * Origin: Los Angeles + * Waypoints: Dallas, Bangor, Phoenix + * Destination: New York + * and the optimized output was ordered as follows: + * Origin: Los Angeles + * Waypoints: Phoenix, Dallas, Bangor + * Destination: New York + * then this field will be an Array containing the values [2, 0, 1]. Note that the numbering of waypoints + * is zero-based. If any of the input waypoints has stopover set to false, this field will be empty, + * since route optimization is not available for such queries. + */ waypoint_order: number[]; } @@ -1624,13 +1776,13 @@ declare namespace google.maps { export class BicyclingLayer extends MVCObject { constructor(); getMap(): Map; - setMap(map: Map | null): void; + setMap(map: Map | null): void; } export class FusionTablesLayer extends MVCObject { constructor(options: FusionTablesLayerOptions); getMap(): Map; - setMap(map: Map | null): void; + setMap(map: Map | null): void; setOptions(options: FusionTablesLayerOptions): void; } @@ -1701,7 +1853,7 @@ declare namespace google.maps { getStatus(): KmlLayerStatus; getUrl(): string; getZIndex(): number; - setMap(map: Map | null): void; + setMap(map: Map | null): void; setUrl(url: string): void; setZIndez(zIndex: number): void; } @@ -1772,7 +1924,7 @@ declare namespace google.maps { export class TransitLayer extends MVCObject { constructor(); getMap(): void; - setMap(map: Map | null): void; + setMap(map: Map | null): void; } /***** Street View *****/ @@ -1904,7 +2056,7 @@ declare namespace google.maps { export class StreetViewCoverageLayer extends MVCObject { getMap(): Map; - setMap(map: Map | null): void; + setMap(map: Map | null): void; } /***** Events *****/ @@ -1953,11 +2105,31 @@ declare namespace google.maps { static trigger(instance: any, eventName: string, ...args: any[]): void; } + /** + * This object is returned from various mouse events on the map and overlays, + * and contains all the fields shown below. + */ export interface MouseEvent { + /** Prevents this event from propagating further. */ stop(): void; + /** The latitude/longitude that was below the cursor when the event occurred. */ latLng: LatLng; } + /** + * This object is sent in an event when a user clicks on an icon on the map. + * The place ID of this place is stored in the placeId member. + * To prevent the default info window from showing up, call the stop() method on this event to prevent it being + * propagated. Learn more about place IDs in the Places API developer guide. + */ + export interface IconMouseEvent extends MouseEvent { + /** + * The place ID of the place that was clicked. + * This place ID can be used to query more information about the feature that was clicked. + */ + placeId: string; + } + /* **** Base **** */ /** @@ -2005,20 +2177,41 @@ declare namespace google.maps { export type LatLngLiteral = { lat: number; lng: number } export type LatLngBoundsLiteral = { east: number; north: number; south: number; west: number } + /** + * A LatLngBounds instance represents a rectangle in geographical coordinates, including one + * that crosses the 180 degrees longitudinal meridian. + */ export class LatLngBounds { + /** Constructs a rectangle from the points at its south-west and north-east corners. */ constructor(sw?: LatLng|LatLngLiteral, ne?: LatLng|LatLngLiteral); + /** Returns true if the given lat/lng is in this bounds. */ contains(latLng: LatLng|LatLngLiteral): boolean; + /** Returns true if this bounds approximately equals the given bounds. */ equals(other: LatLngBounds|LatLngBoundsLiteral): boolean; + /** Extends this bounds to contain the given point. */ extend(point: LatLng|LatLngLiteral): LatLngBounds; + /** Computes the center of this LatLngBounds */ getCenter(): LatLng; + /** Returns the north-east corner of this bounds. */ getNorthEast(): LatLng; + /** Returns the south-west corner of this bounds. */ getSouthWest(): LatLng; + /** Returns true if this bounds shares any points with the other bounds. */ intersects(other: LatLngBounds|LatLngBoundsLiteral): boolean; + /** Returns if the bounds are empty. */ isEmpty(): boolean; + /** Converts to JSON representation. This function is intended to be used via JSON.stringify. */ toJSON(): LatLngBoundsLiteral; + /** Converts the given map bounds to a lat/lng span. */ toSpan(): LatLng; + /** Converts to string. */ toString(): string; + /** + * Returns a string of the form "lat_lo,lng_lo,lat_hi,lng_hi" for this bounds, where "lo" corresponds to the + * southwest corner of the bounding box, while "hi" corresponds to the northeast corner of that box. + */ toUrlValue(precision?: number): string; + /** Extends this bounds to contain the union of this and the given bounds. */ union(other: LatLngBounds|LatLngBoundsLiteral): LatLngBounds; } @@ -2044,16 +2237,39 @@ declare namespace google.maps { } /***** MVC *****/ + /** Base class implementing KVO. */ export class MVCObject { + /** + * The MVCObject constructor is guaranteed to be an empty function, and so you may inherit from MVCObject + * by simply writing MySubclass.prototype = new google.maps.MVCObject();. Unless otherwise noted, + * this is not true of other classes in the API, and inheriting from other classes in the API is not supported. + */ constructor(); + /** + * Adds the given listener function to the given event name. Returns an identifier for this listener + * that can be used with google.maps.event.removeListener. + */ addListener(eventName: string, handler: (...args: any[]) => void): MapsEventListener; + /** Binds a View to a Model. */ bindTo(key: string, target: MVCObject, targetKey?: string, noNotify?: boolean): void; changed(key: string): void; + /** Gets a value. */ get(key: string): any; + /** + * Notify all observers of a change on this property. This notifies both objects that are bound + * to the object's property as well as the object that it is bound to. + */ notify(key: string): void; + /** Sets a value. */ set(key: string, value: any): void; + /** Sets a collection of key-value pairs. */ setValues(values: any): void; + /** + * Removes a binding. Unbinding will set the unbound property to the current value. + * The object will not be notified, as the value has not changed. + */ unbind(key: string): void; + /** Removes all bindings. */ unbindAll(): void; } @@ -2155,7 +2371,7 @@ declare namespace google.maps { setBorderColor(borderColor: string): void; setChannelNumber(channelNumber: string): void; setFormat(format: AdFormat): void; - setMap(map: Map | null): void; + setMap(map: Map | null): void; setPosition(position: ControlPosition): void; setTextColor(textColor: string): void; setTitleColor(titleColor: string): void; @@ -2421,19 +2637,51 @@ declare namespace google.maps { getDrawingMode(): OverlayType; getMap(): Map; setDrawingMode(drawingMode: OverlayType): void; - setMap(map: Map | null): void; + setMap(map: Map | null): void; setOptions(options: DrawingManagerOptions): void; } + /** Options for the drawing manager. */ export interface DrawingManagerOptions { + /** + * Options to apply to any new circles created with this DrawingManager. The center and radius properties + * are ignored, and the map property of a new circle is always set to the DrawingManager's map. + */ circleOptions?: CircleOptions; + /** The enabled/disabled state of the drawing control. Defaults to true. */ drawingControl?: boolean; + /** The display options for the drawing control. */ drawingControlOptions?: DrawingControlOptions; + /** + * The DrawingManager's drawing mode, which defines the type of overlay to be added on the map. + * Accepted values are 'marker', 'polygon', 'polyline', 'rectangle', 'circle', or null. A drawing mode + * of null means that the user can interact with the map as normal, and clicks do not draw anything. + */ drawingMode?: OverlayType; + /** + * The Map to which the DrawingManager is attached, which is the Map on which the overlays created + * will be placed. + */ map?: Map; + /** + * Options to apply to any new markers created with this DrawingManager. The position property is ignored, + * and the map property of a new marker is always set to the DrawingManager's map. + */ markerOptions?: MarkerOptions; + /** + * Options to apply to any new polygons created with this DrawingManager. The paths property is ignored, + * and the map property of a new polygon is always set to the DrawingManager's map. + */ polygonOptions?: PolygonOptions; + /** + * Options to apply to any new polylines created with this DrawingManager. The path property is ignored, + * and the map property of a new polyline is always set to the DrawingManager's map. + */ polylineOptions?: PolylineOptions; + /** + * Options to apply to any new rectangles created with this DrawingManager. The bounds property is ignored, + * and the map property of a new rectangle is always set to the DrawingManager's map. + */ rectangleOptions?: RectangleOptions; } @@ -2442,16 +2690,43 @@ declare namespace google.maps { position?: ControlPosition; } + /** The properties of an overlaycomplete event on a DrawingManager.. */ export interface OverlayCompleteEvent { + /** The completed overlay. */ overlay: Marker|Polygon|Polyline|Rectangle|Circle; + /** The completed overlay's type. */ type: OverlayType; } + /** + * The types of overlay that may be created by the DrawingManager. Specify these by value, or by using the + * constant's name. For example, 'polygon' or google.maps.drawing.OverlayType.POLYGON. + */ export enum OverlayType { + /** + * Specifies that the DrawingManager creates circles, and that the overlay given in the overlaycomplete + * event is a circle. + */ CIRCLE, + /** + * Specifies that the DrawingManager creates markers, and that the overlay given in the overlaycomplete + * event is a marker. + */ MARKER, + /** + * Specifies that the DrawingManager creates polygons, and that the overlay given in the overlaycomplete + * event is a polygon. + */ POLYGON, + /** + * Specifies that the DrawingManager creates polylines, and that the overlay given in the overlaycomplete + * event is a polyline. + */ POLYLINE, + /** + * Specifies that the DrawingManager creates rectangles, and that the overlay given in the overlaycomplete + * event is a rectangle. + */ RECTANGLE } } @@ -2470,7 +2745,7 @@ declare namespace google.maps { getZIndex(): number; setLayerId(layerId: string): void; setLayerKey(layerKey: string): void; - setMap(map: Map | null): void; + setMap(map: Map | null): void; setMapId(mapId: string): void; setOpacity(opacity: number): void; setOptions(options: MapsEngineLayerOptions): void; @@ -2514,7 +2789,7 @@ declare namespace google.maps { setData(data: MVCArray): void; setData(data: LatLng[]): void; setData(data: WeightedLocation[]): void; - setMap(map: Map | null): void; + setMap(map: Map | null): void; } export interface HeatmapLayerOptions { diff --git a/types/graphql/error/GraphQLError.d.ts b/types/graphql/error/GraphQLError.d.ts index 12f65a506c..857f25b593 100644 --- a/types/graphql/error/GraphQLError.d.ts +++ b/types/graphql/error/GraphQLError.d.ts @@ -27,7 +27,7 @@ export class GraphQLError extends Error { * * Enumerable, and appears in the result of JSON.stringify(). */ - locations?: Array<{ line: number, column: number }> | void; + locations?: Array<{ line: number, column: number }> | undefined; /** * An array describing the JSON-path into the execution response which @@ -35,23 +35,23 @@ export class GraphQLError extends Error { * * Enumerable, and appears in the result of JSON.stringify(). */ - path?: Array | void; + path?: Array | undefined; /** * An array of GraphQL AST Nodes corresponding to this error. */ - nodes?: Array | void; + nodes?: Array | undefined; /** * The source GraphQL document corresponding to this error. */ - source?: Source | void; + source?: Source | undefined; /** * An array of character offsets within the source GraphQL document * which correspond to this error. */ - positions?: Array | void; + positions?: Array | undefined; /** * The original error thrown from a field resolver during execution. diff --git a/types/graphql/index.d.ts b/types/graphql/index.d.ts index 43d810de02..de2a1405e6 100644 --- a/types/graphql/index.d.ts +++ b/types/graphql/index.d.ts @@ -1,6 +1,6 @@ -// Type definitions for graphql v0.8.2 +// Type definitions for graphql 0.9 // Project: https://www.npmjs.com/package/graphql -// Definitions by: TonyYang , Caleb Meredith , Dominic Watson +// Definitions by: TonyYang , Caleb Meredith , Dominic Watson , Firede // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -105,6 +105,12 @@ export { // Asserts a string is a valid GraphQL name. assertValidName, + // Compares two GraphQLSchemas and detects breaking changes. + findBreakingChanges, + + // Report all deprecated usage within a GraphQL document. + findDeprecatedUsages, + BreakingChange, IntrospectionDirective, diff --git a/types/graphql/language/ast.d.ts b/types/graphql/language/ast.d.ts index 238cbe7210..d0f25b65d0 100644 --- a/types/graphql/language/ast.d.ts +++ b/types/graphql/language/ast.d.ts @@ -85,7 +85,7 @@ export type Token = { /** * For non-punctuation tokens, represents the interpreted value of the token. */ - value: string | void; + value: string | undefined; /** * Tokens exist as nodes in a double-linked-list amongst all tokens diff --git a/types/graphql/language/visitor.d.ts b/types/graphql/language/visitor.d.ts index 1d0f399d6e..d4c528501e 100644 --- a/types/graphql/language/visitor.d.ts +++ b/types/graphql/language/visitor.d.ts @@ -42,7 +42,7 @@ export const QueryDocumentKeys: { export const BREAK: any; -export function visit(root: any, visitor: any, keyMap: any): any; +export function visit(root: any, visitor: any, keyMap?: any): any; export function visitInParallel(visitors: any): any; diff --git a/types/graphql/type/definition.d.ts b/types/graphql/type/definition.d.ts index 6fef914d8e..cf077ad5ba 100644 --- a/types/graphql/type/definition.d.ts +++ b/types/graphql/type/definition.d.ts @@ -126,6 +126,10 @@ export type GraphQLNamedType = GraphQLEnumType | GraphQLInputObjectType; +export function isNamedType(type: GraphQLType): boolean; + +export function assertNamedType(type: GraphQLType): GraphQLNamedType; + export function getNamedType(type: GraphQLType): GraphQLNamedType; /** @@ -237,13 +241,13 @@ export type GraphQLTypeResolver = ( value: TSource, context: TContext, info: GraphQLResolveInfo -) => GraphQLObjectType; +) => GraphQLObjectType | string | Promise; export type GraphQLIsTypeOfFn = ( source: TSource, context: TContext, info: GraphQLResolveInfo -) => boolean; +) => boolean | Promise; export type GraphQLFieldResolver = ( source: TSource, @@ -265,7 +269,7 @@ export interface GraphQLResolveInfo { variableValues: { [variableName: string]: any }; } -export type ResponsePath = { prev: ResponsePath, key: string | number } | void; +export type ResponsePath = { prev: ResponsePath, key: string | number } | undefined; export interface GraphQLFieldConfig { type: GraphQLOutputType; @@ -426,6 +430,7 @@ export class GraphQLEnumType { constructor(config: GraphQLEnumTypeConfig); getValues(): Array; + getValue(name: string): GraphQLEnumValue; serialize(value: any): string; parseValue(value: any): any; parseLiteral(valueNode: ValueNode): any; diff --git a/types/graphql/utilities/TypeInfo.d.ts b/types/graphql/utilities/TypeInfo.d.ts index 2957114ae5..b4fa855569 100644 --- a/types/graphql/utilities/TypeInfo.d.ts +++ b/types/graphql/utilities/TypeInfo.d.ts @@ -5,6 +5,7 @@ import { GraphQLInputType, GraphQLField, GraphQLArgument, + GraphQLEnumValue, GraphQLType, } from '../type/definition'; import { GraphQLDirective } from '../type/directives'; @@ -30,6 +31,7 @@ export class TypeInfo { getFieldDef(): GraphQLField; getDirective(): GraphQLDirective; getArgument(): GraphQLArgument; + getEnumValue(): GraphQLEnumValue; enter(node: ASTNode): any; leave(node: ASTNode): any; } @@ -40,4 +42,4 @@ export interface getFieldDef { parentType: GraphQLType, fieldNode: FieldNode ): GraphQLField -} \ No newline at end of file +} diff --git a/types/graphql/utilities/buildASTSchema.d.ts b/types/graphql/utilities/buildASTSchema.d.ts index cf782a30ec..94f4e2a47a 100644 --- a/types/graphql/utilities/buildASTSchema.d.ts +++ b/types/graphql/utilities/buildASTSchema.d.ts @@ -26,15 +26,3 @@ export function getDescription(node: { loc?: Location }): string; * document. */ export function buildSchema(source: string | Source): GraphQLSchema; - -/** - * Given an ast node, returns its string description based on a contiguous - * block full-line of comments preceding it. - */ -export function getDescription(node: { loc?: Location }): string; - -/** - * A helper function to build a GraphQLSchema directly from a source - * document. - */ -export function buildSchema(source: string | Source): GraphQLSchema; diff --git a/types/graphql/utilities/findDeprecatedUsages.d.ts b/types/graphql/utilities/findDeprecatedUsages.d.ts new file mode 100644 index 0000000000..58e9ae1685 --- /dev/null +++ b/types/graphql/utilities/findDeprecatedUsages.d.ts @@ -0,0 +1,13 @@ +import { GraphQLSchema } from '../type/schema'; +import { DocumentNode } from '../language/ast'; +import { GraphQLError } from '../error/GraphQLError'; + +/** + * A validation rule which reports deprecated usages. + * + * Returns a list of GraphQLError instances describing each deprecated use. + */ +export function findDeprecatedUsages( + schema: GraphQLSchema, + ast: DocumentNode +): Array diff --git a/types/graphql/utilities/getOperationAST.d.ts b/types/graphql/utilities/getOperationAST.d.ts index 65c7735a5d..ce99d39b2b 100644 --- a/types/graphql/utilities/getOperationAST.d.ts +++ b/types/graphql/utilities/getOperationAST.d.ts @@ -7,5 +7,5 @@ import { DocumentNode, OperationDefinitionNode } from '../language/ast'; */ export function getOperationAST( documentAST: DocumentNode, - operationName: string + operationName?: string ): OperationDefinitionNode; diff --git a/types/graphql/utilities/index.d.ts b/types/graphql/utilities/index.d.ts index 47cfd70ff9..8815046735 100644 --- a/types/graphql/utilities/index.d.ts +++ b/types/graphql/utilities/index.d.ts @@ -73,3 +73,6 @@ export { assertValidName } from './assertValidName'; // Compares two GraphQLSchemas and detects breaking changes. export { findBreakingChanges } from './findBreakingChanges'; export { BreakingChange } from './findBreakingChanges'; + +// Report all deprecated usage within a GraphQL document. +export { findDeprecatedUsages } from './findDeprecatedUsages'; diff --git a/types/griddle-react/test/CustomColumnComponent.tsx b/types/griddle-react/test/CustomColumnComponent.tsx index e47b2c36bb..fff018dcfb 100644 --- a/types/griddle-react/test/CustomColumnComponent.tsx +++ b/types/griddle-react/test/CustomColumnComponent.tsx @@ -64,7 +64,7 @@ class CustomColumnComponentGrid extends React.Component { sortDescendingComponent={} customRowComponent={LinkComponent} /> ); - }; + } } export default CustomColumnComponentGrid; diff --git a/types/handsontable/index.d.ts b/types/handsontable/index.d.ts index ed2f0db27f..ea57730f93 100644 --- a/types/handsontable/index.d.ts +++ b/types/handsontable/index.d.ts @@ -122,90 +122,90 @@ declare namespace ht { visibleRows?: number; width?: number|Function; wordWrap?: boolean; - isEmptyCol?: (col: number) => boolean; - isEmptyRow?: (row: number) => boolean; + isEmptyCol?(col: number): boolean; + isEmptyRow?(row: number): boolean; // hooks - afterAutofillApplyValues?: (startArea: any[], entireArea: any[]) => void; - afterCellMetaReset?: () => void; - afterChange?: (changes: any[], source: string) => void; - afterChangesObserved?: () => void; - afterColumnMove?: (startColumn: number, endColumn: number) => void; - afterColumnResize?: (currentColumn: number, newSize: number, isDoubleClick: boolean) => void; - afterColumnSort?: (column: number, order: boolean) => void; - afterContextMenuDefaultOptions?: (predefinedItems: any[]) => void; - afterContextMenuHide?: (context: Object) => void; - afterContextMenuShow?: (context: Object) => void; - afterCopyLimit?: (selectedRows: number, selectedColumnds: number, copyRowsLimit: number, copyColumnsLimit: number) => void; - afterCreateCol?: (index: number, amount: number) => void; - afterCreateRow?: (index: number, amount: number) => void; - afterDeselect?: () => void; - afterDestroy?: () => void; - afterDocumentKeyDown?: (event: Event) => void; - afterFilter?: (formulasStack: any[]) => void; - afterGetCellMeta?: (row: number, col: number, cellProperties: Object) => void; - afterGetColHeader?: (col: number, TH: Element) => void; - afterGetColumnHeaderRenderers?: (array: any[]) => void; - afterGetRowHeader?: (row: number, TH: Element) => void; - afterGetRowHeaderRenderers?: (array: any[]) => void; - afterInit?: () => void; - afterLoadData?: (firstTime: boolean) => void; - afterMomentumScroll?: () => void; - afterOnCellCornerMouseDown?: (event: Object) => void; - afterOnCellMouseDown?: (event: Object, coords: Object, TD: Element) => void; - afterOnCellMouseOver?: (event: Object, coords: Object, TD: Element) => void; - afterRemoveCol?: (index: number, amount: number) => void; - afterRemoveRow?: (index: number, amount: number) => void; - afterRender?: (isForced: boolean) => void; - afterRenderer?: (TD: Element, row: number, col: number, prop: string|number, value: string, cellProperties: Object) => void; - afterRowMove?: (startRow: number, endRow: number) => void; - afterRowResize?: (currentRow: number, newSize: number, isDoubleClick: boolean) => void; - afterScrollHorizontally?: () => void; - afterScrollVertically?: () => void; - afterSelection?: (r: number, c: number, r2: number, c2: number) => void; - afterSelectionByProp?: (r: number, p: string, r2: number, p2: string) => void; - afterSelectionEnd?: (r: number, c: number, r2: number, c2: number) => void; - afterSelectionEndByProp?: (r: number, p: string, r2: number, p2: string) => void; - afterSetCellMeta?: (row: number, col: number, key: string, value: any) => void; - afterUpdateSettings?: () => void; - afterValidate?: (isValid: boolean, value: any, row: number, prop: string|number, source: string) => void|boolean; - beforeAutofill?: (start: Object, end: Object, data: any[]) => void; - beforeCellAlignment?: (stateBefore: any, range: any, type: string, alignmentClass: string) => void; - beforeChange?: (changes: any[], source: string) => void; - beforeChangeRender?: (changes: any[], source: string) => void; - beforeColumnMove?: (startColumn: number, endColumn: number) => void; - beforeColumnResize?: (currentColumn: number, newSize: number, isDoubleClick: boolean) => void; - beforeColumnSort?: (column: number, order: boolean) => void; - beforeDrawBorders?: (corners: any[], borderClassName: string) => void; - beforeFilter?: (formulasStack: any[]) => void; - beforeGetCellMeta?: (row: number, col: number, cellProperties: Object) => void; - beforeInit?: () => void; - beforeInitWalkontable?: (walkontableConfig: Object) => void; - beforeKeyDown?: (event: Event) => void; - beforeOnCellMouseDown?: (event: Event, coords: Object, TD: Element) => void; - beforeRemoveCol?: (index: number, amount: number, logicalCols?: any[]) => void; - beforeRemoveRow?: (index: number, amount: number, logicalRows?: any[]) => void; - beforeRender?: (isForced: boolean) => void; - beforeRenderer?: (TD: Element, row: number, col: number, prop: string|number, value: string, cellProperties: Object) => void; - beforeRowMove?: (startRow: number, endRow: number) => void; - beforeRowResize?: (currentRow: number, newSize: number, isDoubleClick: boolean) => any; - beforeSetRangeEnd?: (coords: any[]) => void; - beforeStretchingColumnWidth?: (stretchedWidth: number, column: number) => void; - beforeTouchScroll?: () => void; - beforeValidate?: (value: any, row: number, prop: string|number, source: string) => void; - construct?: () => void; - init?: () => void; - modifyCol?: (col: number) => void; - modifyColHeader?: (column: number) => void; - modifyColWidth?: (width: number, col: number) => void; - modifyCopyableRange?: (copyableRanges: any[]) => void; - modifyRow?: (row: number) => void; - modifyRowHeader?: (row: number) => void; - modifyRowHeight?: (height: number, row: number) => void; - persistentStateLoad?: (key: string, valuePlaceholder: Object) => void; - persistentStateReset?: (key: string) => void; - persistentStateSave?: (key: string, value: any) => void; - unmodifyCol?: (col: number) => void; + afterAutofillApplyValues?(startArea: any[], entireArea: any[]): void; + afterCellMetaReset?(): void; + afterChange?(changes: any[], source: string): void; + afterChangesObserved?(): void; + afterColumnMove?(startColumn: number, endColumn: number): void; + afterColumnResize?(currentColumn: number, newSize: number, isDoubleClick: boolean): void; + afterColumnSort?(column: number, order: boolean): void; + afterContextMenuDefaultOptions?(predefinedItems: any[]): void; + afterContextMenuHide?(context: Object): void; + afterContextMenuShow?(context: Object): void; + afterCopyLimit?(selectedRows: number, selectedColumnds: number, copyRowsLimit: number, copyColumnsLimit: number): void; + afterCreateCol?(index: number, amount: number): void; + afterCreateRow?(index: number, amount: number): void; + afterDeselect?(): void; + afterDestroy?(): void; + afterDocumentKeyDown?(event: Event): void; + afterFilter?(formulasStack: any[]): void; + afterGetCellMeta?(row: number, col: number, cellProperties: Object): void; + afterGetColHeader?(col: number, TH: Element): void; + afterGetColumnHeaderRenderers?(array: any[]): void; + afterGetRowHeader?(row: number, TH: Element): void; + afterGetRowHeaderRenderers?(array: any[]): void; + afterInit?(): void; + afterLoadData?(firstTime: boolean): void; + afterMomentumScroll?(): void; + afterOnCellCornerMouseDown?(event: Object): void; + afterOnCellMouseDown?(event: Object, coords: Object, TD: Element): void; + afterOnCellMouseOver?(event: Object, coords: Object, TD: Element): void; + afterRemoveCol?(index: number, amount: number): void; + afterRemoveRow?(index: number, amount: number): void; + afterRender?(isForced: boolean): void; + afterRenderer?(TD: Element, row: number, col: number, prop: string|number, value: string, cellProperties: Object): void; + afterRowMove?(startRow: number, endRow: number): void; + afterRowResize?(currentRow: number, newSize: number, isDoubleClick: boolean): void; + afterScrollHorizontally?(): void; + afterScrollVertically?(): void; + afterSelection?(r: number, c: number, r2: number, c2: number): void; + afterSelectionByProp?(r: number, p: string, r2: number, p2: string): void; + afterSelectionEnd?(r: number, c: number, r2: number, c2: number): void; + afterSelectionEndByProp?(r: number, p: string, r2: number, p2: string): void; + afterSetCellMeta?(row: number, col: number, key: string, value: any): void; + afterUpdateSettings?(): void; + afterValidate?(isValid: boolean, value: any, row: number, prop: string|number, source: string): void|boolean; + beforeAutofill?(start: Object, end: Object, data: any[]): void; + beforeCellAlignment?(stateBefore: any, range: any, type: string, alignmentClass: string): void; + beforeChange?(changes: any[], source: string): void; + beforeChangeRender?(changes: any[], source: string): void; + beforeColumnMove?(startColumn: number, endColumn: number): void; + beforeColumnResize?(currentColumn: number, newSize: number, isDoubleClick: boolean): void; + beforeColumnSort?(column: number, order: boolean): void; + beforeDrawBorders?(corners: any[], borderClassName: string): void; + beforeFilter?(formulasStack: any[]): void; + beforeGetCellMeta?(row: number, col: number, cellProperties: Object): void; + beforeInit?(): void; + beforeInitWalkontable?(walkontableConfig: Object): void; + beforeKeyDown?(event: Event): void; + beforeOnCellMouseDown?(event: Event, coords: Object, TD: Element): void; + beforeRemoveCol?(index: number, amount: number, logicalCols?: any[]): void; + beforeRemoveRow?(index: number, amount: number, logicalRows?: any[]): void; + beforeRender?(isForced: boolean): void; + beforeRenderer?(TD: Element, row: number, col: number, prop: string|number, value: string, cellProperties: Object): void; + beforeRowMove?(startRow: number, endRow: number): void; + beforeRowResize?(currentRow: number, newSize: number, isDoubleClick: boolean): any; + beforeSetRangeEnd?(coords: any[]): void; + beforeStretchingColumnWidth?(stretchedWidth: number, column: number): void; + beforeTouchScroll?(): void; + beforeValidate?(value: any, row: number, prop: string|number, source: string): void; + construct?(): void; + init?(): void; + modifyCol?(col: number): void; + modifyColHeader?(column: number): void; + modifyColWidth?(width: number, col: number): void; + modifyCopyableRange?(copyableRanges: any[]): void; + modifyRow?(row: number): void; + modifyRowHeader?(row: number): void; + modifyRowHeight?(height: number, row: number): void; + persistentStateLoad?(key: string, valuePlaceholder: Object): void; + persistentStateReset?(key: string): void; + persistentStateSave?(key: string, value: any): void; + unmodifyCol?(col: number): void; } interface Methods { addHook(key: string, callback: Function|any[]): void; diff --git a/types/handsontable/tslint.json b/types/handsontable/tslint.json index 14c6526bd1..6efbba674b 100644 --- a/types/handsontable/tslint.json +++ b/types/handsontable/tslint.json @@ -1,7 +1,7 @@ -{ +{ "extends": "../tslint.json", "rules": { - "forbidden-types": false, + "ban-types": false, "no-single-declare-module": false } } \ No newline at end of file diff --git a/types/heatmap.js/index.d.ts b/types/heatmap.js/index.d.ts index d6907abe7b..60ee16c4f0 100644 --- a/types/heatmap.js/index.d.ts +++ b/types/heatmap.js/index.d.ts @@ -3,138 +3,140 @@ // Definitions by: Yang Guan // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +import * as Leaflet from "leaflet"; -/* - * Configuration object of a heatmap - */ -interface HeatmapConfiguration { +declare global { + /* + * Configuration object of a heatmap + */ + interface HeatmapConfiguration { + + /* + * A background color string in form of hexcode, color name, or rgb(a) + */ + backgroundColor?: string; + + /* + * The blur factor that will be applied to all datapoints. The higher the + * blur factor is, the smoother the gradients will be + * Default value: 0.85 + */ + blur?: number; + + /* + * An object that represents the gradient + */ + gradient?: any; + + /* + * The property name of your latitude coordinate in a datapoint + * Default value: 'x' + */ + latField?: string; + + /* + * The property name of your longitude coordinate in a datapoint + * Default value: 'y' + */ + lngField?: string; + + /* + * The maximal opacity the highest value in the heatmap will have. (will be + * overridden if opacity set) + * Default value: 0.6 + */ + maxOpacity?: number; + + /* + * The minimum opacity the lowest value in the heatmap will have (will be + * overridden if opacity set) + */ + minOpacity?: number; + + /* + * A global opacity for the whole heatmap. This overrides maxOpacity and + * minOpacity if set + */ + opacity?: number; + + /* + * The radius each datapoint will have (if not specified on the datapoint + * itself) + */ + radius?: number; + + /** + * Scales the radius based on map zoom. + */ + scaleRadius?: boolean; + + /* + * Indicate whether the heatmap should use a global extrema or a local + * extrema (the maximum and minimum of the currently displayed viewport) + */ + useLocalExtrema?: boolean; + + /* + * The property name of the value/weight in a datapoint + * Default value: 'value' + */ + valueField?: string; + } /* - * A background color string in form of hexcode, color name, or rgb(a) - */ - backgroundColor?: string; + * A single data point on a heatmap. The keys are specified by + * HeatmapConfig.latField, HeatmapConfig.lngField and HeatmapConfig.valueField + */ + interface HeatmapDataPoint { + [index: string]: number; + } /* - * The blur factor that will be applied to all datapoints. The higher the - * blur factor is, the smoother the gradients will be - * Default value: 0.85 - */ - blur?: number; + * An object representing the set of data points on a heatmap + */ + interface HeatmapData { + + /* + * An array of HeatmapDataPoints + */ + data: HeatmapDataPoint[]; + + /* + * Max value of the valueField + */ + max?: number; + + /* + * Min value of the valueField + */ + min?: number; + } /* - * An object that represents the gradient - */ - gradient?: any; + * The overlay layer to be added onto leaflet map + */ + class HeatmapOverlay { - /* - * The property name of your latitude coordinate in a datapoint - * Default value: 'x' - */ - latField?: string; + /* + * Initialization function + */ + constructor(configuration: HeatmapConfiguration) - /* - * The property name of your longitude coordinate in a datapoint - * Default value: 'y' - */ - lngField?: string; + /* + * Create DOM elements for an overlay, adding them to map panes and puts + * listeners on relevant map events + */ + onAdd(map: Leaflet.Map): void; - /* - * The maximal opacity the highest value in the heatmap will have. (will be - * overridden if opacity set) - * Default value: 0.6 - */ - maxOpacity?: number; + /* + * Remove the overlay's elements from the DOM and remove listeners + * previously added by onAdd() + */ + onRemove(map: Leaflet.Map): void; - /* - * The minimum opacity the lowest value in the heatmap will have (will be - * overridden if opacity set) - */ - minOpacity?: number; - - /* - * A global opacity for the whole heatmap. This overrides maxOpacity and - * minOpacity if set - */ - opacity?: number; - - /* - * The radius each datapoint will have (if not specified on the datapoint - * itself) - */ - radius?: number; - - /** - * Scales the radius based on map zoom. - */ - scaleRadius?: boolean; - - /* - * Indicate whether the heatmap should use a global extrema or a local - * extrema (the maximum and minimum of the currently displayed viewport) - */ - useLocalExtrema?: boolean; - - /* - * The property name of the value/weight in a datapoint - * Default value: 'value' - */ - valueField?: string; -} - -/* - * A single data point on a heatmap. The keys are specified by - * HeatmapConfig.latField, HeatmapConfig.lngField and HeatmapConfig.valueField - */ -interface HeatmapDataPoint { - [index: string]: number; -} - -/* - * An object representing the set of data points on a heatmap - */ -interface HeatmapData { - - /* - * An array of HeatmapDataPoints - */ - data: HeatmapDataPoint[]; - - /* - * Max value of the valueField - */ - max?: number; - - /* - * Min value of the valueField - */ - min?: number; -} - -/* - * The overlay layer to be added onto leaflet map - */ -declare class HeatmapOverlay { - - /* - * Initialization function - */ - constructor(configuration: HeatmapConfiguration) - - /* - * Create DOM elements for an overlay, adding them to map panes and puts - * listeners on relevant map events - */ - onAdd(map: L.Map): void; - - /* - * Remove the overlay's elements from the DOM and remove listeners - * previously added by onAdd() - */ - onRemove(map: L.Map): void; - - /* - * Initialize a heatmap instance with the given dataset - */ - setData(data: HeatmapData): void; + /* + * Initialize a heatmap instance with the given dataset + */ + setData(data: HeatmapData): void; + } } diff --git a/types/heatmap.js/package.json b/types/heatmap.js/package.json deleted file mode 100644 index 711ba15e43..0000000000 --- a/types/heatmap.js/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "@types/leaflet": "^0.7" - } -} \ No newline at end of file diff --git a/types/heatmap.js/tsconfig.json b/types/heatmap.js/tsconfig.json index 1fd9be0a9c..055cfad536 100644 --- a/types/heatmap.js/tsconfig.json +++ b/types/heatmap.js/tsconfig.json @@ -9,7 +9,15 @@ "noImplicitThis": true, "strictNullChecks": false, "baseUrl": "../", + "typeRoots": [ + "../" + ], "types": [], + "paths": { + "leaflet": [ + "leaflet/v0" + ] + }, "noEmit": true, "forceConsistentCasingInFileNames": true }, diff --git a/types/highcharts/highcharts-more.d.ts b/types/highcharts/highcharts-more.d.ts index 14f4940784..6bd8693409 100644 --- a/types/highcharts/highcharts-more.d.ts +++ b/types/highcharts/highcharts-more.d.ts @@ -5,6 +5,6 @@ import * as Highcharts from "highcharts"; -declare var HighchartsMore: (H: Highcharts.Static) => Highcharts.Static; +declare function HighchartsMore(H: Highcharts.Static): Highcharts.Static; export = HighchartsMore; export as namespace HighchartsMore; diff --git a/types/highcharts/highstock.d.ts b/types/highcharts/highstock.d.ts index 35c1179ff1..f67a83ba37 100644 --- a/types/highcharts/highstock.d.ts +++ b/types/highcharts/highstock.d.ts @@ -46,7 +46,7 @@ declare namespace Highstock { inputBoxHeight?: number; inputBoxWidth?: number; inputDateFormat?: string; - inputDateParser?: (date: string) => number; + inputDateParser?(date: string): number; inputEditDateFormat?: string; inputEnabled?: boolean; inputPosition?: { diff --git a/types/highcharts/index.d.ts b/types/highcharts/index.d.ts index 9fe60ef542..952de318b0 100644 --- a/types/highcharts/index.d.ts +++ b/types/highcharts/index.d.ts @@ -96,7 +96,7 @@ declare namespace Highcharts { * this are axis, chart, isFirst and isLast. * @default function() {return this.value;} */ - formatter?: () => string; + formatter?(): string; /** * Horizontal axis only. When staggerLines is not set, maxStaggerLines defines how many lines the axis is allowed to * add to automatically avoid overlapping X labels. Set to 1 to disable overlap detection. @@ -173,10 +173,10 @@ declare namespace Highcharts { } interface MousePlotEvents { - click?: (event: Event) => void; - mouseover?: (event: Event) => void; - mouseout?: (event: Event) => void; - mousemove?: (event: Event) => void; + click?(event: Event): void; + mouseover?(event: Event): void; + mouseout?(event: Event): void; + mousemove?(event: Event): void; } /** @@ -491,19 +491,19 @@ declare namespace Highcharts { * An event fired after the breaks have rendered. * @since 4.1.0 */ - afterBreaks?: (event: Event) => void; + afterBreaks?(event: Event): void; /** * As opposed to the setExtremes event, this event fires after the final min and max values are computed and * corrected for minRange. * The this keyword refers to the {@link AxisObject|Axis} object. * @since 2.3 */ - afterSetExtremes?: (event: AxisEvent) => void; + afterSetExtremes?(event: AxisEvent): void; /** * An event fired when a break from this axis occurs on a point. * The this keyword refers to the {@link AxisObject|Axis} object. */ - pointBreak?: (event: Event) => void; + pointBreak?(event: Event): void; /** * Fires when the minimum and maximum is set for the axis, either by calling the .setExtremes() method or by * selecting an area in the chart. One parameter, event, is passed to the function. This contains common event @@ -516,7 +516,7 @@ declare namespace Highcharts { * The this keyword refers to the {@link AxisObject|Axis} object. * @since 1.2.0 */ - setExtremes?: (event: AxisEvent) => void; + setExtremes?(event: AxisEvent): void; }; /** * The lowest allowed value for automatically computed axis extremes. @@ -868,7 +868,7 @@ declare namespace Highcharts { * behaviour of tickPixelInterval and tickInterval. The automatic tick positions are accessible through * this.tickPositions and can be modified by the callback. */ - tickPositioner?: (min: number, max: number) => void; + tickPositioner?(min: number, max: number): void; /** * An array defining where the ticks are laid out on the axis. This overrides the default behaviour of * tickPixelInterval and tickInterval. @@ -958,7 +958,7 @@ declare namespace Highcharts { * corrected for minRange. * The this keyword refers to the {@link AxisObject|Axis} object. */ - afterSetExtremes?: (event: AxisEvent) => void; + afterSetExtremes?(event: AxisEvent): void; /** * Fires when the minimum and maximum is set for the axis, either by calling the .setExtremes() method or by * selecting an area in the chart. One parameter, event, is passed to the function. This contains common event @@ -970,7 +970,7 @@ declare namespace Highcharts { * * The this keyword refers to the {@link AxisObject|Axis} object. */ - setExtremes?: (event: AxisEvent) => void; + setExtremes?(event: AxisEvent): void; }; /** * Color of the grid lines extending from the axis across the gradient. @@ -1163,7 +1163,7 @@ declare namespace Highcharts { * A callback function returning array defining where the ticks are laid out on the axis. This overrides the default * behaviour of tickPixelInterval and tickInterval. */ - tickPositioner?: (min: number, max: number) => void; + tickPositioner?(min: number, max: number): void; /** * An array defining where the ticks are laid out on the axis. This overrides the default behaviour of * tickPixelInterval and tickInterval. @@ -1281,19 +1281,19 @@ declare namespace Highcharts { * The this keyword refers to the Chart object. * @since 1.2.0 */ - addSeries?: (event: AddSeriesEvent) => boolean | void; + addSeries?(event: AddSeriesEvent): boolean | void; /** * Fires after a chart is printed through the context menu item or the Chart.print method. Requires the exporting * module. * @since 4.1.0 */ - afterPrint?: (event: Event) => void; + afterPrint?(event: Event): void; /** * Fires before a chart is printed through the context menu item or the Chart.print method. Requires the exporting * module. * @since 4.1.0 */ - beforePrint?: (event: Event) => void; + beforePrint?(event: Event): void; /** * Fires when clicking on the plot background. One parameter, event, is passed to the function. This contains common * event information based on jQuery or MooTools depending on which library is used as the base for Highcharts. @@ -1309,17 +1309,17 @@ declare namespace Highcharts { * The this keyword refers to the Chart object. * @since 1.2.0 */ - click?: (event: ChartClickEvent) => void; + click?(event: ChartClickEvent): void; /** * Fires when a drilldown point is clicked, before the new series is added. * @since 3.0.8 */ - drilldown?: (event: ChartDrilldownEvent) => void; + drilldown?(event: ChartDrilldownEvent): void; /** * Fires when drilling up from a drilldown series. * @since 3.0.8 */ - drillup?: (event: Event) => void; + drillup?(event: Event): void; /** * Fires when the chart is finished loading. One parameter, event, is passed to the function. This contains common * event information based on jQuery or MooTools depending on which library is used as the base for Highcharts. @@ -1329,7 +1329,7 @@ declare namespace Highcharts { * * The this keyword refers to the Chart object. */ - load?: (event: Event) => void; + load?(event: Event): void; /** * Fires when the chart is redrawn, either after a call to chart.redraw() or after an axis, series or point is * modified with the redraw option set to true. One parameter, event, is passed to the function. This contains @@ -1339,7 +1339,7 @@ declare namespace Highcharts { * The this keyword refers to the Chart object. * @since 1.2.0 */ - redraw?: (event: Event) => void; + redraw?(event: Event): void; /** * Fires when an area of the chart has been selected. Selection is enabled by setting the chart's zoomType. One * parameter, event, is passed to the function. This contains common event information based on jQuery or MooTools @@ -1360,7 +1360,7 @@ declare namespace Highcharts { * console.log(event.yAxis[0].min, event.yAxis[0].max); * } */ - selection?: (event: ChartSelectionEvent) => void; + selection?(event: ChartSelectionEvent): void; } interface LinearGradient { @@ -1886,7 +1886,7 @@ declare namespace Highcharts { * extended with additional options and passed directly to the chart constructor. * @since 4.0 */ - complete?: (options: Options) => void; + complete?(options: Options): void; /** * A comma delimited string to be parsed. Related options are startRow, endRow, startColumn and endColumn to delimit * what part of the table is used. The lineDelimiter and itemDelimiter options define the CSV delimiter formats. @@ -1955,14 +1955,14 @@ declare namespace Highcharts { * timestamp on success. * @since 4.0 */ - parseDate?: (val: any) => number; + parseDate?(val: any): number; /** * A callback function to access the parsed columns, the two-dimentional input data array directly, before they are * interpreted into series data and categories. Return false to stop completion, or call this.complete() to continue * async. * @since 4.0 */ - parsed?: (columns: [string | number][]) => boolean | void; + parsed?(columns: [string | number][]): boolean | void; /** * The same as the columns input option, but defining rows intead of columns. * @since 4.0 @@ -2080,7 +2080,7 @@ declare namespace Highcharts { /** * Callback function to run on click. */ - onclick: () => void; + onclick(): void; } interface Button { @@ -2184,7 +2184,7 @@ declare namespace Highcharts { * A click handler callback to use on the button directly instead of the popup menu. * @since 2.0 */ - onclick?: () => void; + onclick?(): void; /** * The symbol for the button. Points to a definition function in the Highcharts.Renderer.symbols collection. The * default exportIcon function is part of the exporting module. @@ -2345,7 +2345,7 @@ declare namespace Highcharts { * charts in specific time zones using their local DST crossover dates, with the help of external libraries. * @since 4.1.0 */ - getTimezoneOffset?: (timestamp: number) => number; + getTimezoneOffset?(timestamp: number): number; /** * The timezone offset in minutes. Positive values are west, negative values are east of UTC, as in the ECMAScript * getTimezoneOffset method. Use this to display UTC based data in a predefined time zone. @@ -2624,7 +2624,7 @@ declare namespace Highcharts { * Callback function to format each of the series' labels. The this keyword refers to the series object, or the * point object in case of pie charts. By default the series or point name is printed. */ - labelFormatter?: () => string; + labelFormatter?(): string; /** * The layout of the legend items. Can be one of 'horizontal' or 'vertical'. * @default 'horizontal' @@ -2983,7 +2983,7 @@ declare namespace Highcharts { * - this.x: The x value. * - this.y: The y value. */ - formatter?: () => string; + formatter?(): string; /** * For points with an extent, like columns, whether to align the data label inside the box or to the actual value * point. Defaults to false in most cases, true in stacked columns. @@ -3126,7 +3126,7 @@ declare namespace Highcharts { * The this keyword refers to the Series object. * @since 4.0 */ - afterAnimate?: (event: Event) => void; + afterAnimate?(event: Event): void; /** * Fires when the checkbox next to the series' name in the legend is clicked. One parameter, event, is passed to the * function. The state of the checkbox is found by event.checked. The checked item is found by event.item. Return @@ -3135,7 +3135,7 @@ declare namespace Highcharts { * The this keyword refers to the Series object. * @since 1.2.0 */ - checkboxClick?: (event: AreaCheckboxEvent) => boolean | void; + checkboxClick?(event: AreaCheckboxEvent): boolean | void; /** * Fires when the series is clicked. One parameter, event, is passed to the function. This contains common event * information based on jQuery or MooTools depending on which library is used as the base for Highcharts. @@ -3143,14 +3143,14 @@ declare namespace Highcharts { * * The this keyword refers to the Series object. */ - click?: (event: AreaClickEvent) => void; + click?(event: AreaClickEvent): void; /** * Fires when the series is hidden after chart generation time, either by clicking the legend item or by calling * .hide(). * * The this keyword refers to the Series object. */ - hide?: () => void; + hide?(): void; /** * Fires when the legend item belonging to the series is clicked. One parameter, event, is passed to the function. * This contains common event information based on jQuery or MooTools depending on which library is used as the base @@ -3159,7 +3159,7 @@ declare namespace Highcharts { * * The this keyword refers to the Series object. */ - legendItemClick?: (event: Event) => boolean | void; + legendItemClick?(event: Event): boolean | void; /** * Fires when the mouse leaves the graph. One parameter, event, is passed to the function. This contains common * event information based on jQuery or MooTools depending on which library is used as the base for Highcharts. If @@ -3168,14 +3168,14 @@ declare namespace Highcharts { * * The this keyword refers to the Series object. */ - mouseOut?: (event: Event) => void; + mouseOut?(event: Event): void; /** * Fires when the mouse enters the graph. One parameter, event, is passed to the function. This contains common * event information based on jQuery or MooTools depending on which library is used as the base for Highcharts. * * The this keyword refers to the Series object. */ - mouseOver?: (event: Event) => void; + mouseOver?(event: Event): void; /** * Fires when the series is shown after chart generation time, either by clicking the legend item or by calling * .show(). @@ -3183,7 +3183,7 @@ declare namespace Highcharts { * The this keyword refers to the Series object. * @since 1.2.0 */ - show?: () => void; + show?(): void; } interface MarkerState { @@ -3273,7 +3273,7 @@ declare namespace Highcharts { * * The this keyword refers to the Point object. */ - click?: (event: Event) => boolean; + click?(event: Event): boolean; /** * Fires when the mouse leaves the area close to the point. One parameter, event, is passed to the function. This * contains common event information based on jQuery or MooTools depending on which library is used as the base for @@ -3281,7 +3281,7 @@ declare namespace Highcharts { * * The this keyword refers to the Point object. */ - mouseOut?: (event: Event) => void; + mouseOut?(event: Event): void; /** * Fires when the mouse enters the area close to the point. One parameter, event, is passed to the function. This * contains common event information based on jQuery or MooTools depending on which library is used as the base for @@ -3289,7 +3289,7 @@ declare namespace Highcharts { * * The this keyword refers to the Point object. */ - mouseOver?: (event: Event) => void; + mouseOver?(event: Event): void; /** * Fires when the point is removed using the .remove() method. One parameter, event, is passed to the function. * Returning false cancels the operation. @@ -3297,7 +3297,7 @@ declare namespace Highcharts { * The this keyword refers to the Point object. * @since 1.2.0 */ - remove?: (event: Event) => boolean | void; + remove?(event: Event): boolean | void; /** * Fires when the point is selected either programmatically or following a click on the point. One parameter, event, * is passed to the function. Returning false cancels the operation. @@ -3305,7 +3305,7 @@ declare namespace Highcharts { * The this keyword refers to the Point object. * @since 1.2.0 */ - select?: (event: Event) => boolean | void; + select?(event: Event): boolean | void; /** * Fires when the point is unselected either programmatically or following a click on the point. One parameter, * event, is passed to the function. Returning false cancels the operation. @@ -3313,7 +3313,7 @@ declare namespace Highcharts { * The this keyword refers to the Point object. * @since 1.2.0 */ - unselect?: (event: Event) => boolean | void; + unselect?(event: Event): boolean | void; /** * Fires when the point is updated programmatically through the .update() method. One parameter, event, is passed to * the function. The new point options can be accessed through event.options. Returning false cancels the operation. @@ -3321,14 +3321,14 @@ declare namespace Highcharts { * The this keyword refers to the Point object. * @since 1.2.0 */ - update?: (event: Event) => boolean | void; + update?(event: Event): boolean | void; /** * Fires when the legend item belonging to the pie point (slice) is clicked. * The this keyword refers to the point itself. One parameter, event, is passed to the function. * This contains common event information based on jQuery or MooTools depending on which library is used as the base for Highcharts. * The default action is to toggle the visibility of the point. This can be prevented by calling event.preventDefault(). */ - legendItemClick?: (event: Event) => boolean | void; + legendItemClick?(event: Event): boolean | void; } interface Halo { @@ -3516,7 +3516,7 @@ declare namespace Highcharts { * - this.x: The x value. * - this.y: The y value. */ - formatter?: () => string; + formatter?(): string; /** * For points with an extent, like columns, whether to align the data label inside the box or to the actual value * point. Defaults to false in most cases, true in stacked columns. @@ -5404,7 +5404,7 @@ declare namespace Highcharts { * this.y (not shared) / this.points[i].y (shared) * The y value. */ - formatter?: () => boolean | string; + formatter?(): boolean | string; /** * A callback function to place the tooltip in a default position. The callback receives three parameters: * labelWidth, labelHeight and point, where point contains values for plotX and plotY telling where the reference @@ -5413,7 +5413,7 @@ declare namespace Highcharts { * The return should be an object containing x and y values, for example { x: 100, y: 100 }. * @since 2.2.4 */ - positioner?: (labelWidth: number, labelHeight: number, point: PlotPoint) => { x: number; y: number; }; + positioner?(labelWidth: number, labelHeight: number, point: PlotPoint): { x: number; y: number; }; /** * Whether to apply a drop shadow to the tooltip. * @default true @@ -5516,7 +5516,7 @@ declare namespace Highcharts { * The this keyword refers to the Point object. * @since 4.1.0 */ - pointFormatter?: () => string; + pointFormatter?(): string; /** * How many decimals to show in each series' y value. This is overridable in each series' tooltip options object. * The default is to preserve all decimals. diff --git a/types/highcharts/modules/boost.d.ts b/types/highcharts/modules/boost.d.ts index 9b62dab1c7..1a297c7087 100644 --- a/types/highcharts/modules/boost.d.ts +++ b/types/highcharts/modules/boost.d.ts @@ -5,6 +5,6 @@ import { Static } from "highcharts"; -declare var HighchartsBoost: (H: Static) => Static; +declare function HighchartsBoost(H: Static): Static; export = HighchartsBoost; export as namespace HighchartsBoost; diff --git a/types/highcharts/modules/exporting.d.ts b/types/highcharts/modules/exporting.d.ts index 877ef3d0c1..8d808c1929 100644 --- a/types/highcharts/modules/exporting.d.ts +++ b/types/highcharts/modules/exporting.d.ts @@ -5,6 +5,6 @@ import { Static } from "highcharts"; -declare var HighchartsExporting: (H: Static) => Static; +declare function HighchartsExporting(H: Static): Static; export = HighchartsExporting; export as namespace HighchartsExporting; diff --git a/types/highcharts/modules/no-data-to-display.d.ts b/types/highcharts/modules/no-data-to-display.d.ts index 750f8de607..f807860838 100644 --- a/types/highcharts/modules/no-data-to-display.d.ts +++ b/types/highcharts/modules/no-data-to-display.d.ts @@ -29,6 +29,6 @@ declare module "highcharts" { } } -declare var HighchartsNoDataToDisplay: (H: Static) => Static; +declare function HighchartsNoDataToDisplay(H: Static): Static; export = HighchartsNoDataToDisplay; export as namespace HighchartsNoDataToDisplay; diff --git a/types/highcharts/modules/offline-exporting.d.ts b/types/highcharts/modules/offline-exporting.d.ts index 94ecf53485..5b58f65c46 100644 --- a/types/highcharts/modules/offline-exporting.d.ts +++ b/types/highcharts/modules/offline-exporting.d.ts @@ -5,6 +5,6 @@ import { Static } from "highcharts"; -declare var HighchartsOfflineExporting: (H: Static) => Static; +declare function HighchartsOfflineExporting(H: Static): Static; export = HighchartsOfflineExporting; export as namespace HighchartsOfflineExporting; diff --git a/types/highcharts/tslint.json b/types/highcharts/tslint.json index 6fb4f705cf..a53062e5df 100644 --- a/types/highcharts/tslint.json +++ b/types/highcharts/tslint.json @@ -1,7 +1,7 @@ { "extends": "../tslint.json", "rules": { - "forbidden-types": false, + "ban-types": false, "unified-signatures": false, "array-type": false, "no-empty-interface": false, diff --git a/types/howler/index.d.ts b/types/howler/index.d.ts index df3f6a363b..0966f4a472 100644 --- a/types/howler/index.d.ts +++ b/types/howler/index.d.ts @@ -11,7 +11,7 @@ interface HowlerGlobal { unload(): void; usingWebAudio: boolean; noAudio: boolean; - mobileAudioEnable: boolean; + mobileAutoEnable: boolean; autoSuspend: boolean; ctx: AudioContext; masterGain: GainNode; diff --git a/types/hyco-ws/hyco-ws-tests.ts b/types/hyco-ws/hyco-ws-tests.ts index 05b500d81c..e08890b3b1 100644 --- a/types/hyco-ws/hyco-ws-tests.ts +++ b/types/hyco-ws/hyco-ws-tests.ts @@ -18,4 +18,4 @@ const wss = AzureRelay.createRelayedServer( wss.on('error', (err: any) => { console.log('error' + err); -}); \ No newline at end of file +}); diff --git a/types/hyco-ws/index.d.ts b/types/hyco-ws/index.d.ts index 053c7fba18..68d0575fb5 100644 --- a/types/hyco-ws/index.d.ts +++ b/types/hyco-ws/index.d.ts @@ -24,4 +24,4 @@ export function createRelayToken(uri: string, key_name: string, key: string, exp export function appendRelayToken(uri: string, key_name: string, key: string, expiry?: number): string; export function createRelayBaseUri(serviceBusNamespace: string, path: string): string; export function createRelaySendUri(serviceBusNamespace: string, path: string, token?: any, id?: any): string; -export function createRelayListenUri(serviceBusNamespace: string, path: string, token?: any, id?: any): string; \ No newline at end of file +export function createRelayListenUri(serviceBusNamespace: string, path: string, token?: any, id?: any): string; diff --git a/types/hyperscript/hyperscript-tests.ts b/types/hyperscript/hyperscript-tests.ts index f4bab0550a..687a2591c1 100644 --- a/types/hyperscript/hyperscript-tests.ts +++ b/types/hyperscript/hyperscript-tests.ts @@ -56,3 +56,28 @@ h2('a', {href: '#', }, "Click this") h2.cleanup() + +/* Polymorphic type tests */ + +// fall back to Element when in doubt +let fallbackTest = h('canvas#test3'); + +// determine proper Element type from tagName +let htmlTest1: HTMLCanvasElement = h('canvas'); + +// allow coercion of decorated tagName to proper type +let htmlTest2: HTMLCanvasElement = h('canvas#test2'); + +// if you need it to be an HTMLElement, you must coerce +let htmlTest3 = h('canvas#test3'); + +// support SVG elements +let svgTest1 = h('svg'); + +// allow coercions on SVG elements +let svgTest2 = h('svg#test5'); + +// inline coercion if you were feeling pedantic +h('div#page', + h('div#header', + h('h1.classy', 'h', { style: {'background-color': '#22f'} }))); \ No newline at end of file diff --git a/types/hyperscript/index.d.ts b/types/hyperscript/index.d.ts index 4274365404..cec67e56ab 100644 --- a/types/hyperscript/index.d.ts +++ b/types/hyperscript/index.d.ts @@ -1,13 +1,15 @@ // Type definitions for hyperscript // Project: https://github.com/dominictarr/hyperscript -// Definitions by: Mike Linkovich +// Definitions by: Mike Linkovich , Justin Firth // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 declare module 'hyperscript' { interface HyperScript { - /** Creates an HTML element */ - (tagName: string, ...args: any[]): HTMLElement; + /** Creates an Element */ + (tagName: T, attrs?: Object, ...children: any[]): ElementTagNameMap[T]; + (tagName: string, attrs?: Object, ...children: any[]): T; /** Cleans up any event handlers created by this hyperscript context */ cleanup(): void; /** Creates a new hyperscript context */ diff --git a/types/ignite-ui/index.d.ts b/types/ignite-ui/index.d.ts new file mode 100644 index 0000000000..7052460f8b --- /dev/null +++ b/types/ignite-ui/index.d.ts @@ -0,0 +1,85048 @@ +// Type definitions for Ignite UI +// Project: https://github.com/IgniteUI/ignite-ui +// Definitions by: Ignite UI +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +interface DataSourceSettingsPaging { + /** + * Paging is not enabled by default + * + */ + enabled?: boolean; + + /** + * Type for the paging operation + * + * + * Valid values: + * "local" Data is paged client-side. + * "remote" A remote request is done and URL params encoded + */ + type?: string; + + /** + * Number of records on each page + * + */ + pageSize?: number; + + /** + * Denotes the name of the encoded URL parameter that will state what is the currently requested page size + * + */ + pageSizeUrlKey?: string; + + /** + * Denotes the name of the encoded URL parameter that will state what is the currently requested page index + * + */ + pageIndexUrlKey?: string; + + /** + * Current page index + * + */ + pageIndex?: number; + + /** + * Whether when a new page of data is requested we should append the new data to the existing data + * + */ + appendPage?: boolean; + + /** + * Option for DataSourceSettingsPaging + */ + [optionName: string]: any; +} + +interface DataSourceSettingsFiltering { + /** + * Filtering type. + * + * Valid values: + * "remote" Parameters will be encoded and it's up to the backend to interpred them from the response. + * "local" The data will be filtered automatically client-side + */ + type?: string; + + /** + * Enables or disables case sensitive filtering on the data. Works only for local filtering + * + */ + caseSensitive?: boolean; + + /** + * If the type of paging/sorting/filtering is local and applyToAllData is true, filtering will be performed on the whole data source that's present locally, otherwise only on the current dataView. if type is remote, this setting doesn't have any effect. + * + */ + applyToAllData?: boolean; + + /** + * Can point to either a string or a function object. The parameters that are passed are 1) the data array to be filtered, 2) the filtering expression definitions. Should return an array of the filtered data + * + */ + customFunc?: any; + + /** + * Url key that will be encoded in the request if remote filtering is performed. Default value of null implies OData-style URL encoding. Please see http://www.odata.org/developers/protocols/uri-conventions for details + * + */ + filterExprUrlKey?: string; + + /** + * Url key that will be encoded in the request, specifying if the filtering logic will be AND or OR + * + */ + filterLogicUrlKey?: string; + + /** + * Data will be initially filtered accordingly, directly after dataBind() + * + */ + defaultFields?: any[]; + + /** + * A list of expression objects, containing the following key-value pairs: fieldName, expression (search string), condition , and logic (AND/OR) + * + */ + expressions?: any[]; + + /** + * An "SQL-like' encoded expressions string. Takes precedence over "expressions". Example: col2 > 100; col2 LIKE %test% + * + */ + exprString?: string; + + /** + * An object containing custom defined filtering conditions as objects. + * + */ + customConditions?: any; + + /** + * Option for DataSourceSettingsFiltering + */ + [optionName: string]: any; +} + +interface DataSourceSettingsSorting { + /** + * Sorting direction + * + * + * Valid values: + * "none" + * "asc" + * "desc" + */ + defaultDirection?: string; + + /** + * When defaultDirection is different than "none", and defaultFields is specified, data will be initially sorted accordingly, directly after dataBind() + * + */ + defaultFields?: any[]; + + /** + * If the sorting type is local and applyToAllData is true, sorting will be performed on the whole data source that's present locally, otherwise only on the current dataView. If sorting type is remote, this setting doesn't have any effect. + * + */ + applyToAllData?: boolean; + + /** + * Custom sorting function that can point to either a string or a function object. When the function is called, the following arguments are passed: data array, fields (array of field definitions) , direction ("asc" or "desc"). The function should return a sorted data array + * + */ + customFunc?: any; + + /** + * Custom comparison sorting function. Accepts the following arguments: fields, schema, booleand value whether sorting is ascending , convert function(please check option for customConvertFunc) and returns a value 0 indicating that values are equal, 1 indicating that val1 > val2 and -1 indicating that val1 < val2 + * + */ + compareFunc?: any; + + /** + * Custom data value conversion function(called from sorting function). Accepts a value of the data cell and column key and should return the converted value + * + */ + customConvertFunc?: any; + + /** + * Specifies whether sorting will be applied locally or remotely (via a remote request) + * + * + * Valid values: + * "remote" + * "local" + */ + type?: string; + + /** + * Specifies if sorting will be case sensitive or not. Works only for local sorting + * + */ + caseSensitive?: boolean; + + /** + * URL param name which specifies how sorting expressions will be encoded in the URL. Default is null and uses OData conventions + * + */ + sortUrlKey?: string; + + /** + * URL param value for ascending type of sorting. Default is null and uses OData conventions + * + */ + sortUrlAscValueKey?: string; + + /** + * URL param value for descending type of sorting. Default is null and uses OData conventions + * + */ + sortUrlDescValueKey?: string; + + /** + * A list of sorting expressions , consisting of the following keys (and their respective values): fieldName, direction and compareFunc (optional) + * + */ + expressions?: any[]; + + /** + * Takes precedence over experssions, an "SQL-like" encoded expressions string : see sort(). Example col2 > 100 ORDER BY asc + * + */ + exprString?: string; + + /** + * Option for DataSourceSettingsSorting + */ + [optionName: string]: any; +} + +interface DataSourceSettingsGroupby { + /** + * Default collapse state + * + */ + defaultCollapseState?: boolean; + + /** + * Option for DataSourceSettingsGroupby + */ + [optionName: string]: any; +} + +interface DataSourceSettingsSummaries { + /** + * Specifies whether summaries will be applied locally or remotely (via a remote request) + * + * + * Valid values: + * "remote" A remote request is done and URL params encoded + * "local" Data is paged client-side. + */ + type?: string; + + /** + * Url key for retrieving data from response - used only when summaries are remote + * + */ + summaryExprUrlKey?: string; + + /** + * Key for retrieving data from the summaries response - used only when summaries are remote + * + */ + summariesResponseKey?: string; + + /** + * Determines when the summary values are calculated + * + * + * Valid values: + * "priortofilteringandpaging" + * "afterfilteringbeforepaging" + * "afterfilteringandpaging" + */ + summaryExecution?: string; + + /** + * A list of column settings that specifies custom summaries options per column basis + * + */ + columnSettings?: any[]; + + /** + * Option for DataSourceSettingsSummaries + */ + [optionName: string]: any; +} + +interface DataSourceSettings { + /** + * Setting this is only necessary when the data source is set to a table in string format. we need to create an invisible dummy data container in the body and append the table data to it + * + */ + id?: string; + + /** + * This is the property in the dataView where actual resulting records will be put. (So the dataView will not be array but an object if this is defined), after the potential data source transformation + * + */ + outputResultsName?: string; + + /** + * Callback function to call when data binding is complete + * + */ + callback?: Function; + + /** + * Object on which to invoke the callback function + * + */ + callee?: any; + + /** + * This is the normalized (transformed) resulting data, after it's fetched from the data source + * + */ + data?: any[]; + + /** + * This is the source of data - non normalized. Can be an array, can be reference to some JSON object, can be a DOM element for a HTML TABLE, or a function + * + */ + dataSource?: any; + + /** + * Client-side dataBinding event. Can be a string pointing to a function name, or an object pointing to a function + * + */ + dataBinding?: any; + + /** + * Client-side dataBound event. Can be a string pointing to a function name, or an object pointing to a function + * + */ + dataBound?: any; + + /** + * Specifies the HTTP verb to be used to issue the request + * + */ + requestType?: string; + + /** + * Type of the data source + * + * + * Valid values: + * "json" Specifies that the data source is an already evaluated JSON (JavaScript object/array) or a string that can be evaluated to JSON + * "xml" Specifies that the data source is a XML Document object or a string that can be evaluated to XML + * "unknown" Specifies that the data source is of unknown type. In that case it will be analyzed and automatically detected if possible + * "array" Specifies that the data source is a simple array of objects. + * "function" Specifies that the data source points to a function. During data binding the function will be called and the result will be assumed to be an array of objects + * "htmlTableString" Specifies that the data source points to a string that represents a HTML table + * "htmlTableId" Specifies that the data source points to an ID of a HTML Table element that's loaded on the page + * "htmlTableDom" The data source points to a DOM object that is of TABLE type + * "invalid" Set whenever data source is analyzed (in case its type is unknown) and the type cannot be detected + * "remoteUrl" Specifies that the data source points to a remote URL, from which data will be retrieved using an AJAX call ($.ajax) + * "htmlListDom" The data source points to a DOM object that is of UL/OL type + * "htmlSelectDom" The data source points to a DOM object that is of SELECT type + * "empty" + */ + type?: string; + + /** + * A schema object that defines which fields from the data to bind to + * + */ + schema?: any; + + /** + * The unique field identifier + * + */ + primaryKey?: string; + + /** + * Property in the response which specifies the total number of records in the backend (this is needed for paging) + * + */ + responseTotalRecCountKey?: string; + + /** + * Property in the response which specifies where the data records array will be held (if the response is wrapped) + * + */ + responseDataKey?: string; + + /** + * Response type when a URL is set as the data source. See http://api.jquery.com/jQuery.ajax/ => dataType + * + * + * Valid values: + * "json" + * "xml" + * "html" + * "script" + * "jsonp" + * "text" + */ + responseDataType?: string; + + /** + * Content type of the response. See http://api.jquery.com/jQuery.ajax/ => contentType + * + */ + responseContentType?: string; + + /** + * If set to false will disable transformations on schema, even if it is defined locally in the javascript code + * + */ + localSchemaTransform?: boolean; + + /** + * Event that is fired before URL parameters are encoded. Can point to a function name or the function object itself + * + */ + urlParamsEncoding?: any; + + /** + * Event that is fired after URL parameters are encoded (When a remote request is done). Can point to a function name or the function object itself + * + */ + urlParamsEncoded?: any; + + /** + * Settings related to built-in paging functionality + * + */ + paging?: DataSourceSettingsPaging; + + /** + * Settings related to built-in filtering functionality + * + */ + filtering?: DataSourceSettingsFiltering; + + /** + * Settings related to built-in sorting functionality + * + */ + sorting?: DataSourceSettingsSorting; + + /** + * Settings related to built-in group by functionality + * + */ + groupby?: DataSourceSettingsGroupby; + + /** + * Settings related to built-in summaries functionality + * + */ + summaries?: DataSourceSettingsSummaries; + + /** + * *** IMPORTANT DEPRECATED *** + * A list of field definitions specifying the schema of the data source. + * Field objects description: {name, [type], [xpath]} + * + */ + fields?: any[]; + + /** + * If true, will serialize the transaction log of updated values - if any - whenever commit is performed via a remote request. + * + */ + serializeTransactionLog?: boolean; + + /** + * If set to true, the following behavior will take place: + * if a new row is added, and then deleted, there will be no transaction added to the log + * if an edit is made to a row or cell, then the value is brought back to its original value, the transaction should be removed + * Note: This option takes effect only when autoCommit is set to false. + * + */ + aggregateTransactions?: boolean; + + /** + * If auto commit is true, data will be automatically commited to the data source, once a value or a batch of values are updated via saveChanges() + * + */ + autoCommit?: boolean; + + /** + * Specifies an update remote URL, to which an AJAX request will be made as soon as saveChages() is called. + * + */ + updateUrl?: string; + + /** + * A function to call when row is added. + * Function takes first argument item and second argument dataSource. + * Use item.row to obtain reference to the added row. + * Use item.rowId to get the row ID. + * Use dataSource to obtain reference to $.ig.DataSource. + * + */ + rowAdded?: Function; + + /** + * A function to call when row is updated (edited). + * Function takes first argument item and second argument dataSource. + * Use item.rowIndex to get the row index. + * Use item.newRow to obtain reference to the updated row. + * Use item.oldRow to obtain reference to the row that was updated. + * Use dataSource to obtain reference to $.ig.DataSource. + * + */ + rowUpdated?: Function; + + /** + * A function to call when row is inserted. + * Function takes first argument item and second argument dataSource. + * Use item.row to obtain reference to the inserted row. + * Use item.rowId to get the row ID. + * Use item.rowIndex to get the row index. + * Use dataSource to obtain reference to $.ig.DataSource. + * + */ + rowInserted?: Function; + + /** + * A function to call when row is deleted. + * Use item.row to obtain reference to the deleted row. + * Use item.rowId to get the row ID. + * Use item.rowIndex to get the row index. + * Use dataSource to obtain reference to $.ig.DataSource. + * + */ + rowDeleted?: Function; + + /** + * Option for DataSourceSettings + */ + [optionName: string]: any; +} + +declare namespace Infragistics { + class DataSource { + constructor(settings: DataSourceSettings); + + /** + * Sets a list of fields to the data source. If no parameter is specified, just returns the already existing list of fields + * + * @param fields a field has the following format: {key: 'fieldKey', dataType: 'string/number/date' } + */ + fields(fields?: Object): Object; + + /** + * Analyzes the dataSource setting to automatically determine the type of the data source. Returns the data source type. See settings.type + */ + analyzeDataSource(): string; + + /** + * Returns the current normalized/transformed and paged/filtered/sorted data, i.e. the dataView + */ + dataView(): any[]; + + /** + * Returns all of the bound data, without taking into account local paging, sorting, filtering, etc. + */ + data(): Object; + + /** + * Returns transformed data according to transformed execution: + * 1. Before paging and filtering + * 2. After filtering before paging + * 3. After filtering and paging + * + * @param transformedExecution + */ + transformedData(transformedExecution: Object): Object; + + /** + * Returns summaries data + */ + dataSummaries(): Object; + + /** + * Gets/sets the schema definition. + * + * @param s a schema object + * @param t type of the data source. See settings.type + */ + schema(s?: Object, t?: string): void; + + /** + * Gets/sets a list of paging settings + * + * @param p object holding all paging settings. See settings.paging + */ + pagingSettings(p?: Object): Object; + + /** + * Gets/sets a list of filtering settings + * + * @param f object holding all filtering settings. See settings.filtering + */ + filterSettings(f?: Object): void; + + /** + * Gets/sets a list of paging settings + * + * @param s object holding all sorting settings. See settings.sorting + */ + sortSettings(s?: Object): Object; + + /** + * Gets/sets a list of summaries settings. + * + * @param s object holding all summaries settings. See settings.summaries + */ + summariesSettings(s?: Object): void; + + /** + * Gets/sets the dataSource setting. If no parameter is specified, returns settings.dataSource + * + * @param ds + */ + dataSource(ds?: Object): Object; + + /** + * Gets/sets the type of the dataSource. If no parameter is specified, returns settings.type + * + * @param t + * @return json|xml|unknown|array|function|htmlTableString|htmlTableId|htmlTableDom|invalid|remoteUrl|empty + */ + type(t?: Object): string; + + /** + * Returns a record by a specified key (requires that primaryKey is set in the settings) + * + * @param key Primary key of the record + * @param ds the data source in which to search for the record. When not set it will use the current data source. + * @param objPath Not used in $.ig.DataSource + */ + findRecordByKey(key: string, ds?: string, objPath?: string): Object; + + /** + * Removes a specific record denoted by the primaryKey of the passed key parameter from the data source + * + * @param key primary key of the record + * @param origDs + */ + removeRecordByKey(key: Object, origDs: Object): void; + + /** + * Removes a record from the data source at specific index. + * + * @param index index of record + * @param origDs + */ + removeRecordByIndex(index: number, origDs: Object): void; + + /** + * Sets a cell value for the cell denoted by rowId and colId. Creates a transaction for the update operation and returns it + * + * @param rowId the rowId - row key (string) or index (number) + * @param colId the column id - column key (string) or index (number) + * @param val The new value + * @param autoCommit if autoCommit is true, it updates the datasource automatically and the transaction is still stored in the accumulated transaction log + */ + setCellValue(rowId: Object, colId: Object, val: Object, autoCommit: boolean): Object; + + /** + * Updates a record in the datasource. Creates a transaction that can be committed / rolled back + * + * @param rowId the record key - primaryKey (string) or index (number) + * @param rowObject the record object containing the key/value pairs we want to update. It doesn't have to include key/value pairs for all fields defined in the schema or in the data source (if no schema is defined) + * @param autoCommit if autoCommit is true, the datasource will be updated automatically and the transaction is still stored in the accumulated transaction log + */ + updateRow(rowId: Object, rowObject: Object, autoCommit: boolean): Object; + + /** + * Adds a new row to the data source. Creates a transaction that can be committed / rolled back + * + * @param rowId the record key - primaryKey (string) or index (number) + * @param rowObject the new record data. + * @param autoCommit if autoCommit is true, the datasource will be updated automatically and the transaction is still stored in the accumulated transaction log + */ + addRow(rowId: Object, rowObject: Object, autoCommit: boolean): Object; + + /** + * Adds a new row to the data source. Creates a transaction that can be committed / rolled back + * + * @param rowId the record key - primaryKey (string) or index (number) + * @param rowObject the new record data. + * @param rowIndex row index at which to insert the new row + * @param autoCommit if autoCommit is true, the datasource will be updated automatically and the transaction is still stored in the accumulated transaction log + * @param parentRowId Not used in $.ig.DataSource + */ + insertRow(rowId: Object, rowObject: Object, rowIndex: number, autoCommit: boolean, parentRowId: Object): Object; + + /** + * Deletes a row from the data source. + * + * @param rowId the record key - primaryKey (string) or index (number) + * @param autoCommit if autoCommit is true, the datasource will be updated automatically and the transaction is still stored in the accumulated transaction log + */ + deleteRow(rowId: Object, autoCommit: boolean): Object; + + /** + * Adds a new node to the tree data source. Creates a transaction that can be committed / rolled back + * + * @param data the transaction data + */ + addNode(data: Object): void; + + /** + * Removes a node from the tree data source. Creates a transaction that can be committed / rolled back + * + * @param data the transaction data + */ + removeNode(data: Object): void; + + /** + * Returns a standalone object (copy) that represents the commited transactions, but detached from the data source + * + * @param t a transaction object + */ + getDetachedRecord(t: Object): Object; + + /** + * Update the data source with every transaction from the log + * + * @param id Id of the transaction to commit. If no id is specified, will commit all transactions to the data source. + */ + commit(id?: number): void; + + /** + * Clears the transaction log without updating anything in the data source + * + * @param id Record Id to find transactions for. If no id is specified, will rollback all transactions to the data source. + */ + rollback(id?: Object): void; + + /** + * Returns a list of all transaction objects that are pending to be committed or rolled back to the data source + */ + pendingTransactions(): any[]; + + /** + * Returns a list of all transaction objects that are either pending, or have been committed in the data source. + */ + allTransactions(): any[]; + + /** + * Returns the accumulated transaction log as a string. The purpose of this is to be passed to URLs or used conveniently + */ + transactionsAsString(): string; + + /** + * Posts to the settings.updateUrl using $.ajax, by serializing the changes as url params + * + * @param success Specifies a custom function to be called when AJAX request to the updateUrl option succeeds(optional) + * @param error Specifies a custom function to be called when AJAX request to the updateUrl option fails(optional) + */ + saveChanges(success: Function, error: Function): void; + + /** + * Data binds to the current data source + * databinding works using the following workflow: + * 1. fire the databinding event + * 2. based on the data source type (see analyzeDataSource()), do the following: + * 3. if type is HtmlTable, parse the table and set the data and dataView respectively. + * if the type is Function, call it, apply Paging/Filtering/Sorting, and set this._dataView . If the developer wants to do his own paging, filtering or sorting + * in that case, then he should handle the PageIndexChanging and/or DataFiltering, and/or ColumnSorting client-side events, and cancel them. + * if no paging/sorting/filtering are enabled, use just this._data to save space + * if the data source is of type RemoteUrl, use jQuery's $.ajax API to trigger a remote request to the service. Use the param() API to encode the URL + * if the data source is invalid, throw an exception + * if the analyzed runtime data source type , that is, the result of analyzeDataSource(), is Unknown, check if + * the value of settings.type is set to XML or JSON. If string, eval for JSON, and parse for the XML to build the object tree + * 4. now normalize/transform the data, if a schema is supplied. This inplies any additional data type conversion + * 5. next, if OpType is Local, apply paging, sorting, and/or filtering to the data, and store the result in this._dataView + * 6. fire the databound event + * + * @param callback callback function + * @param callee callee object on which the callback will be executed. If none is specified, will assume global execution context + */ + dataBind(callback?: string, callee?: Object): void; + + /** + * Gets a cell value from the record by the specified fieldName. If there's a mapper defined for the field, the resolved by the mapper value will be returned. + * + * @param fieldName the fieldName - name of the field + * @param record the record from which to get it + */ + getCellValue(fieldName: string, record: Object): Object; + + /** + * Applicable only when the data source is bound to remote data. + * Gets or sets summaries data. + * If key or dsObj are not set then returns summaries data. + * Takes summary data from passed argument dsObj(using argument key) + * + * @param key response key to take summary data(for example "Metadata.Summaries") + * @param dsObj data source object - usually contains information about data records and metadata(holds info about summaries) + */ + summariesResponse(key?: string, dsObj?: Object): Object; + + /** + * Returns filtered data if local filtering is applied. If filtering is not applied OR type of filtering is remote returns undefined. + */ + filteredData(): any[]; + + /** + * Sorts the data source locally. The result (filtered data) can be obtained by calling dataView(). + * Remote filtering can be performed by just calling dataBind() and setting the settings.filtering.expressions + * multi-column sorting can be enabled by setting keepSortState to true. + * fields => an array of fields object definitions: + * example: [{fieldName : "firstName"}, {fieldName : "lastName"}] + * example 2: [{fieldIndex : 1} , {fieldIndex : 2}] + * + * @param fields an array of fields object definitions + * @param direction asc / desc direction + */ + sort(fields: Object, direction: string): void; + + /** + * This clears local sorting applied to the data view by resetting it to the original data and applying any paging + */ + clearLocalSorting(): void; + + /** + * Filters the data source locally. Remote filtering can be performed by just calling dataBind() and + * setting the settings.filtering.expressions. The result (filtered data) can be obtained by calling dataView() + * example: [{fieldName : "firstName", expr: "abc", cond: "StartsWith"}, {fieldName : "lastName"}] + * example 2: [{fieldIndex : 1} , {fieldIndex : 2, expr: "a", cond : "contains"}] + * expr is the filter expression text , such as "abc", or a regular expression such as *test* + * cond is the filtering condition such as startsWith, endsWith, contains, equals, doesNotEqual, doesNotContain + * if expr is detected to be a regular expression, the "cond" part is skipped + * + * @param fieldExpressions a list of field expression definitions + * @param boolLogic boolean logic. Accepted values are AND and OR. + * @param keepFilterState if keepFilterState is set to true, it will not discard previous filtering expressions + * @param fieldExpressionsOnStrings a list of field expression definitions (or a string with the conditions separated by AND/OR operator, example: "ID = 1 OR ID = 2"), which when applied will threat the related field as if it's string and can only apply conditions valid for string types. + */ + filter(fieldExpressions: Object, boolLogic: Object, keepFilterState: boolean, fieldExpressionsOnStrings: Object): void; + + /** + * This clears local filtering applied to the data view by resetting it to the original data and applying any paging + */ + clearLocalFilter(): void; + + /** + * Applicable only when the data source is bound to remote data. + * Gets / sets the total number of records in the data source. + * If data binding is remote, and there's paging or filtering enabled, + * the actual total number of records may not + * match the number of records that exists on the client + * + * @param count the total number of records + * @param key + * @param dsObj + * @param context + */ + totalRecordsCount(count?: number, key?: Object, dsObj?: Object, context?: Object): number; + + /** + * Gets / sets if the response from the server contains a property which specifies the total number of records in the server-side backend + * + * @param hasCount specifies if the data source contains a property that denotes the total number of records in the server-side backend + */ + hasTotalRecordsCount(hasCount: boolean): void; + + /** + * Returns metadata object for the specified key + * + * @param key Primary key of the record + */ + metadata(key: string): Object; + + /** + * Returns the total number of records in the local data source + */ + totalLocalRecordsCount(): number; + + /** + * Returns the total number of pages + */ + pageCount(): number; + + /** + * Gets /sets the current page index. If an index is passed as a parameter, the data source is re-bound. + * + * @param index the page index. If none is specified, returns the current page index. + */ + pageIndex(index?: number): number; + + /** + * Gets /sets the page index that should be persisted. For now ONLY when filtering is applied and call explicitly DataBind. + * + * @param value the page index that should be persisted. If none is specified, returns the current page index that should be persisted. + */ + persistedPageIndex(value?: number): number; + + /** + * Sets the page index to be equal to the previous page index and rebinds the data source + */ + prevPage(): void; + + /** + * Sets the page index to be equal to the next page index and rebinds the data source + */ + nextPage(): void; + + /** + * Gets /sets the page size and rebinds the data source if a parameter is specified. If no parameter is passed, returns the current page size + * + * @param s the page size. + */ + pageSize(s?: number): number; + + /** + * For internal use + * + * @param dirty + */ + pageSizeDirty(dirty: Object): void; + + /** + * Returns a list of records for the specified page. Implies that paging is enabled. + * + * @param p the page index for which records will be returned + */ + recordsForPage(p: number): void; + + /** + * Converts a HTML TABLE dom element to a JavaScript array of objects that contain the records data + * + * @param tableDOM TABLE dom element to transform + */ + tableToObject(tableDOM: Element): Object; + + /** + * Parses the string and returns an evaluated JSON object + * + * @param s the JSON as string. + */ + stringToJSONObject(s: string): void; + + /** + * Parses a string and returns a XML Document + * + * @param s the XML represented as a string + */ + stringToXmlObject(s: string): void; + + /** + * Returns collection of data and non-data(grouped) records. Flat representation of hierarchical data + */ + groupByData(): any[]; + + /** + * Returns collection of data and non-data(grouped) records. Returns only visible records(children of collapsed grouped records are not included in the collection) + */ + visibleGroupByData(): any[]; + + /** + * Returns the current normalized/transformed and paged/filtered/sorted group-by data + */ + groupByDataView(): any[]; + + /** + * Toggle grouped record with the specified id and updates collections visible groupby data and data view + * + * @param id data-id attribute of the respective group row in the DOM + * @param collapsed if true the record should be collapsed, otherwise expanded + */ + toggleGroupByRecord(id: string, collapsed: boolean): void; + + /** + * Check whether the specified gorupby record is collapsed + * + * @param gbRec id of the grouped record OR grouped record + */ + isGroupByRecordCollapsed(gbRec: Object): boolean; + + /** + * Check whether grouping is applied for the specified sorting expressions. + * + * @param exprs array of sorting expressions. If not set check expressions defined in sorting settings + */ + isGroupByApplied(exprs?: any[]): boolean; + } +} +interface IgniteUIStatic { +DataSource: typeof Infragistics.DataSource; +} + +declare namespace Infragistics { + class TypeParser { + toStr(obj: Object): void; + + /** + * L.A. 18 June 2012 Fixing bug #113265 Column 'date' shows empty values as 'NaN' + * + * @param obj + * @param pk + * @param key + */ + toDate(obj: Object, pk: Object, key: Object): void; + toNumber(obj: Object): void; + toBool(obj: Object): void; + isNullOrUndefined(obj: Object): void; + empty(): void; + num(): void; + } +} + +interface DataSchemaSchemaFields { + /** + * Name of the field + */ + name?: string; + + /** + * data type of the fieldstring + * number + * bool + * date + * object + * + */ + type?: string|number|boolean|Date|Object; + + /** + * The XPath expression to map the node to the field + */ + xpath?: string; + + /** + * This option is applicable only for fields with fieldDataType="object". Reference to a function (string or function) that can be used for complex data extraction from the data records, whose return value will be used for all data operations associated with this field. + */ + mapper?: string|Function; + + /** + * Option for DataSchemaSchemaFields + */ + [optionName: string]: any; +} + +interface DataSchemaSchema { + /** + * A list of field definitions specifying the schema of the data source. Field objects description: {name, [type], [xpath]} + * returnType="array" + */ + fields?: DataSchemaSchemaFields; + + /** + * This is the property (path) in the data source where the records are located. + */ + searchField?: string; + + /** + * This is the property in the resulting object where actual resulting records will be put. (So the result will not be array but an object if this is defined), after the potential data source transformation + */ + outputResultsName?: string; + + /** + * Option for DataSchemaSchema + */ + [optionName: string]: any; +} + +declare namespace Infragistics { + class DataSchema { + constructor(schema: DataSchemaSchema); + + /** + * Performs a transformation on the schema so that the resulting data matches the schema + * + * @param data the data to transform + */ + transform(data: Object): Object; + + /** + * Specifies if the object is null, undefined, or an empty string + * + * @param o the object to check for being empty + */ + isEmpty(o: Object): Object; + + /** + * Specifies if the object has custom properties or not + * + * @param obj the object to check for presence or lack of custom properties + */ + isObjEmpty(obj: Object): Object; + + /** + * A list of field definitions specifying the schema of the data source. + * Field objects description: {fieldName, [fieldDataType], [fieldXPath]} + */ + fields(): any[]; + } +} +interface IgniteUIStatic { +DataSchema: typeof Infragistics.DataSchema; +} + +declare namespace Infragistics { + class RemoteDataSource { + constructor(settings: DataSourceSettings); + + /** + * Sets a list of fields to the data source. If no parameter is specified, just returns the already existing list of fields + * + * @param fields a field has the following format: {key: 'fieldKey', dataType: 'string/number/date' } + */ + fields(fields?: Object): Object; + + /** + * Analyzes the dataSource setting to automatically determine the type of the data source. Returns the data source type. See settings.type + */ + analyzeDataSource(): string; + + /** + * Returns the current normalized/transformed and paged/filtered/sorted data, i.e. the dataView + */ + dataView(): any[]; + + /** + * Returns all of the bound data, without taking into account local paging, sorting, filtering, etc. + */ + data(): Object; + + /** + * Returns transformed data according to transformed execution: + * 1. Before paging and filtering + * 2. After filtering before paging + * 3. After filtering and paging + * + * @param transformedExecution + */ + transformedData(transformedExecution: Object): Object; + + /** + * Returns summaries data + */ + dataSummaries(): Object; + + /** + * Gets/sets the schema definition. + * + * @param s a schema object + * @param t type of the data source. See settings.type + */ + schema(s?: Object, t?: string): void; + + /** + * Gets/sets a list of paging settings + * + * @param p object holding all paging settings. See settings.paging + */ + pagingSettings(p?: Object): Object; + + /** + * Gets/sets a list of filtering settings + * + * @param f object holding all filtering settings. See settings.filtering + */ + filterSettings(f?: Object): void; + + /** + * Gets/sets a list of paging settings + * + * @param s object holding all sorting settings. See settings.sorting + */ + sortSettings(s?: Object): Object; + + /** + * Gets/sets a list of summaries settings. + * + * @param s object holding all summaries settings. See settings.summaries + */ + summariesSettings(s?: Object): void; + + /** + * Gets/sets the dataSource setting. If no parameter is specified, returns settings.dataSource + * + * @param ds + */ + dataSource(ds?: Object): Object; + + /** + * Gets/sets the type of the dataSource. If no parameter is specified, returns settings.type + * + * @param t + * @return json|xml|unknown|array|function|htmlTableString|htmlTableId|htmlTableDom|invalid|remoteUrl|empty + */ + type(t?: Object): string; + + /** + * Returns a record by a specified key (requires that primaryKey is set in the settings) + * + * @param key Primary key of the record + * @param ds the data source in which to search for the record. When not set it will use the current data source. + * @param objPath Not used in $.ig.DataSource + */ + findRecordByKey(key: string, ds?: string, objPath?: string): Object; + + /** + * Removes a specific record denoted by the primaryKey of the passed key parameter from the data source + * + * @param key primary key of the record + * @param origDs + */ + removeRecordByKey(key: Object, origDs: Object): void; + + /** + * Removes a record from the data source at specific index. + * + * @param index index of record + * @param origDs + */ + removeRecordByIndex(index: number, origDs: Object): void; + + /** + * Sets a cell value for the cell denoted by rowId and colId. Creates a transaction for the update operation and returns it + * + * @param rowId the rowId - row key (string) or index (number) + * @param colId the column id - column key (string) or index (number) + * @param val The new value + * @param autoCommit if autoCommit is true, it updates the datasource automatically and the transaction is still stored in the accumulated transaction log + */ + setCellValue(rowId: Object, colId: Object, val: Object, autoCommit: boolean): Object; + + /** + * Updates a record in the datasource. Creates a transaction that can be committed / rolled back + * + * @param rowId the record key - primaryKey (string) or index (number) + * @param rowObject the record object containing the key/value pairs we want to update. It doesn't have to include key/value pairs for all fields defined in the schema or in the data source (if no schema is defined) + * @param autoCommit if autoCommit is true, the datasource will be updated automatically and the transaction is still stored in the accumulated transaction log + */ + updateRow(rowId: Object, rowObject: Object, autoCommit: boolean): Object; + + /** + * Adds a new row to the data source. Creates a transaction that can be committed / rolled back + * + * @param rowId the record key - primaryKey (string) or index (number) + * @param rowObject the new record data. + * @param autoCommit if autoCommit is true, the datasource will be updated automatically and the transaction is still stored in the accumulated transaction log + */ + addRow(rowId: Object, rowObject: Object, autoCommit: boolean): Object; + + /** + * Adds a new row to the data source. Creates a transaction that can be committed / rolled back + * + * @param rowId the record key - primaryKey (string) or index (number) + * @param rowObject the new record data. + * @param rowIndex row index at which to insert the new row + * @param autoCommit if autoCommit is true, the datasource will be updated automatically and the transaction is still stored in the accumulated transaction log + * @param parentRowId Not used in $.ig.DataSource + */ + insertRow(rowId: Object, rowObject: Object, rowIndex: number, autoCommit: boolean, parentRowId: Object): Object; + + /** + * Deletes a row from the data source. + * + * @param rowId the record key - primaryKey (string) or index (number) + * @param autoCommit if autoCommit is true, the datasource will be updated automatically and the transaction is still stored in the accumulated transaction log + */ + deleteRow(rowId: Object, autoCommit: boolean): Object; + + /** + * Adds a new node to the tree data source. Creates a transaction that can be committed / rolled back + * + * @param data the transaction data + */ + addNode(data: Object): void; + + /** + * Removes a node from the tree data source. Creates a transaction that can be committed / rolled back + * + * @param data the transaction data + */ + removeNode(data: Object): void; + + /** + * Returns a standalone object (copy) that represents the commited transactions, but detached from the data source + * + * @param t a transaction object + */ + getDetachedRecord(t: Object): Object; + + /** + * Update the data source with every transaction from the log + * + * @param id Id of the transaction to commit. If no id is specified, will commit all transactions to the data source. + */ + commit(id?: number): void; + + /** + * Clears the transaction log without updating anything in the data source + * + * @param id Record Id to find transactions for. If no id is specified, will rollback all transactions to the data source. + */ + rollback(id?: Object): void; + + /** + * Returns a list of all transaction objects that are pending to be committed or rolled back to the data source + */ + pendingTransactions(): any[]; + + /** + * Returns a list of all transaction objects that are either pending, or have been committed in the data source. + */ + allTransactions(): any[]; + + /** + * Returns the accumulated transaction log as a string. The purpose of this is to be passed to URLs or used conveniently + */ + transactionsAsString(): string; + + /** + * Posts to the settings.updateUrl using $.ajax, by serializing the changes as url params + * + * @param success Specifies a custom function to be called when AJAX request to the updateUrl option succeeds(optional) + * @param error Specifies a custom function to be called when AJAX request to the updateUrl option fails(optional) + */ + saveChanges(success: Function, error: Function): void; + + /** + * Data binds to the current data source + * databinding works using the following workflow: + * 1. fire the databinding event + * 2. based on the data source type (see analyzeDataSource()), do the following: + * 3. if type is HtmlTable, parse the table and set the data and dataView respectively. + * if the type is Function, call it, apply Paging/Filtering/Sorting, and set this._dataView . If the developer wants to do his own paging, filtering or sorting + * in that case, then he should handle the PageIndexChanging and/or DataFiltering, and/or ColumnSorting client-side events, and cancel them. + * if no paging/sorting/filtering are enabled, use just this._data to save space + * if the data source is of type RemoteUrl, use jQuery's $.ajax API to trigger a remote request to the service. Use the param() API to encode the URL + * if the data source is invalid, throw an exception + * if the analyzed runtime data source type , that is, the result of analyzeDataSource(), is Unknown, check if + * the value of settings.type is set to XML or JSON. If string, eval for JSON, and parse for the XML to build the object tree + * 4. now normalize/transform the data, if a schema is supplied. This inplies any additional data type conversion + * 5. next, if OpType is Local, apply paging, sorting, and/or filtering to the data, and store the result in this._dataView + * 6. fire the databound event + * + * @param callback callback function + * @param callee callee object on which the callback will be executed. If none is specified, will assume global execution context + */ + dataBind(callback?: string, callee?: Object): void; + + /** + * Gets a cell value from the record by the specified fieldName. If there's a mapper defined for the field, the resolved by the mapper value will be returned. + * + * @param fieldName the fieldName - name of the field + * @param record the record from which to get it + */ + getCellValue(fieldName: string, record: Object): Object; + + /** + * Applicable only when the data source is bound to remote data. + * Gets or sets summaries data. + * If key or dsObj are not set then returns summaries data. + * Takes summary data from passed argument dsObj(using argument key) + * + * @param key response key to take summary data(for example "Metadata.Summaries") + * @param dsObj data source object - usually contains information about data records and metadata(holds info about summaries) + */ + summariesResponse(key?: string, dsObj?: Object): Object; + + /** + * Returns filtered data if local filtering is applied. If filtering is not applied OR type of filtering is remote returns undefined. + */ + filteredData(): any[]; + + /** + * Sorts the data source locally. The result (filtered data) can be obtained by calling dataView(). + * Remote filtering can be performed by just calling dataBind() and setting the settings.filtering.expressions + * multi-column sorting can be enabled by setting keepSortState to true. + * fields => an array of fields object definitions: + * example: [{fieldName : "firstName"}, {fieldName : "lastName"}] + * example 2: [{fieldIndex : 1} , {fieldIndex : 2}] + * + * @param fields an array of fields object definitions + * @param direction asc / desc direction + */ + sort(fields: Object, direction: string): void; + + /** + * This clears local sorting applied to the data view by resetting it to the original data and applying any paging + */ + clearLocalSorting(): void; + + /** + * Filters the data source locally. Remote filtering can be performed by just calling dataBind() and + * setting the settings.filtering.expressions. The result (filtered data) can be obtained by calling dataView() + * example: [{fieldName : "firstName", expr: "abc", cond: "StartsWith"}, {fieldName : "lastName"}] + * example 2: [{fieldIndex : 1} , {fieldIndex : 2, expr: "a", cond : "contains"}] + * expr is the filter expression text , such as "abc", or a regular expression such as *test* + * cond is the filtering condition such as startsWith, endsWith, contains, equals, doesNotEqual, doesNotContain + * if expr is detected to be a regular expression, the "cond" part is skipped + * + * @param fieldExpressions a list of field expression definitions + * @param boolLogic boolean logic. Accepted values are AND and OR. + * @param keepFilterState if keepFilterState is set to true, it will not discard previous filtering expressions + * @param fieldExpressionsOnStrings a list of field expression definitions (or a string with the conditions separated by AND/OR operator, example: "ID = 1 OR ID = 2"), which when applied will threat the related field as if it's string and can only apply conditions valid for string types. + */ + filter(fieldExpressions: Object, boolLogic: Object, keepFilterState: boolean, fieldExpressionsOnStrings: Object): void; + + /** + * This clears local filtering applied to the data view by resetting it to the original data and applying any paging + */ + clearLocalFilter(): void; + + /** + * Applicable only when the data source is bound to remote data. + * Gets / sets the total number of records in the data source. + * If data binding is remote, and there's paging or filtering enabled, + * the actual total number of records may not + * match the number of records that exists on the client + * + * @param count the total number of records + * @param key + * @param dsObj + * @param context + */ + totalRecordsCount(count?: number, key?: Object, dsObj?: Object, context?: Object): number; + + /** + * Gets / sets if the response from the server contains a property which specifies the total number of records in the server-side backend + * + * @param hasCount specifies if the data source contains a property that denotes the total number of records in the server-side backend + */ + hasTotalRecordsCount(hasCount: boolean): void; + + /** + * Returns metadata object for the specified key + * + * @param key Primary key of the record + */ + metadata(key: string): Object; + + /** + * Returns the total number of records in the local data source + */ + totalLocalRecordsCount(): number; + + /** + * Returns the total number of pages + */ + pageCount(): number; + + /** + * Gets /sets the current page index. If an index is passed as a parameter, the data source is re-bound. + * + * @param index the page index. If none is specified, returns the current page index. + */ + pageIndex(index?: number): number; + + /** + * Gets /sets the page index that should be persisted. For now ONLY when filtering is applied and call explicitly DataBind. + * + * @param value the page index that should be persisted. If none is specified, returns the current page index that should be persisted. + */ + persistedPageIndex(value?: number): number; + + /** + * Sets the page index to be equal to the previous page index and rebinds the data source + */ + prevPage(): void; + + /** + * Sets the page index to be equal to the next page index and rebinds the data source + */ + nextPage(): void; + + /** + * Gets /sets the page size and rebinds the data source if a parameter is specified. If no parameter is passed, returns the current page size + * + * @param s the page size. + */ + pageSize(s?: number): number; + + /** + * For internal use + * + * @param dirty + */ + pageSizeDirty(dirty: Object): void; + + /** + * Returns a list of records for the specified page. Implies that paging is enabled. + * + * @param p the page index for which records will be returned + */ + recordsForPage(p: number): void; + + /** + * Converts a HTML TABLE dom element to a JavaScript array of objects that contain the records data + * + * @param tableDOM TABLE dom element to transform + */ + tableToObject(tableDOM: Element): Object; + + /** + * Parses the string and returns an evaluated JSON object + * + * @param s the JSON as string. + */ + stringToJSONObject(s: string): void; + + /** + * Parses a string and returns a XML Document + * + * @param s the XML represented as a string + */ + stringToXmlObject(s: string): void; + + /** + * Returns collection of data and non-data(grouped) records. Flat representation of hierarchical data + */ + groupByData(): any[]; + + /** + * Returns collection of data and non-data(grouped) records. Returns only visible records(children of collapsed grouped records are not included in the collection) + */ + visibleGroupByData(): any[]; + + /** + * Returns the current normalized/transformed and paged/filtered/sorted group-by data + */ + groupByDataView(): any[]; + + /** + * Toggle grouped record with the specified id and updates collections visible groupby data and data view + * + * @param id data-id attribute of the respective group row in the DOM + * @param collapsed if true the record should be collapsed, otherwise expanded + */ + toggleGroupByRecord(id: string, collapsed: boolean): void; + + /** + * Check whether the specified gorupby record is collapsed + * + * @param gbRec id of the grouped record OR grouped record + */ + isGroupByRecordCollapsed(gbRec: Object): boolean; + + /** + * Check whether grouping is applied for the specified sorting expressions. + * + * @param exprs array of sorting expressions. If not set check expressions defined in sorting settings + */ + isGroupByApplied(exprs?: any[]): boolean; + } +} +interface IgniteUIStatic { +RemoteDataSource: typeof Infragistics.RemoteDataSource; +} + +declare namespace Infragistics { + class JSONDataSource { + constructor(settings: DataSourceSettings); + + /** + * Sets a list of fields to the data source. If no parameter is specified, just returns the already existing list of fields + * + * @param fields a field has the following format: {key: 'fieldKey', dataType: 'string/number/date' } + */ + fields(fields?: Object): Object; + + /** + * Analyzes the dataSource setting to automatically determine the type of the data source. Returns the data source type. See settings.type + */ + analyzeDataSource(): string; + + /** + * Returns the current normalized/transformed and paged/filtered/sorted data, i.e. the dataView + */ + dataView(): any[]; + + /** + * Returns all of the bound data, without taking into account local paging, sorting, filtering, etc. + */ + data(): Object; + + /** + * Returns transformed data according to transformed execution: + * 1. Before paging and filtering + * 2. After filtering before paging + * 3. After filtering and paging + * + * @param transformedExecution + */ + transformedData(transformedExecution: Object): Object; + + /** + * Returns summaries data + */ + dataSummaries(): Object; + + /** + * Gets/sets the schema definition. + * + * @param s a schema object + * @param t type of the data source. See settings.type + */ + schema(s?: Object, t?: string): void; + + /** + * Gets/sets a list of paging settings + * + * @param p object holding all paging settings. See settings.paging + */ + pagingSettings(p?: Object): Object; + + /** + * Gets/sets a list of filtering settings + * + * @param f object holding all filtering settings. See settings.filtering + */ + filterSettings(f?: Object): void; + + /** + * Gets/sets a list of paging settings + * + * @param s object holding all sorting settings. See settings.sorting + */ + sortSettings(s?: Object): Object; + + /** + * Gets/sets a list of summaries settings. + * + * @param s object holding all summaries settings. See settings.summaries + */ + summariesSettings(s?: Object): void; + + /** + * Gets/sets the dataSource setting. If no parameter is specified, returns settings.dataSource + * + * @param ds + */ + dataSource(ds?: Object): Object; + + /** + * Gets/sets the type of the dataSource. If no parameter is specified, returns settings.type + * + * @param t + * @return json|xml|unknown|array|function|htmlTableString|htmlTableId|htmlTableDom|invalid|remoteUrl|empty + */ + type(t?: Object): string; + + /** + * Returns a record by a specified key (requires that primaryKey is set in the settings) + * + * @param key Primary key of the record + * @param ds the data source in which to search for the record. When not set it will use the current data source. + * @param objPath Not used in $.ig.DataSource + */ + findRecordByKey(key: string, ds?: string, objPath?: string): Object; + + /** + * Removes a specific record denoted by the primaryKey of the passed key parameter from the data source + * + * @param key primary key of the record + * @param origDs + */ + removeRecordByKey(key: Object, origDs: Object): void; + + /** + * Removes a record from the data source at specific index. + * + * @param index index of record + * @param origDs + */ + removeRecordByIndex(index: number, origDs: Object): void; + + /** + * Sets a cell value for the cell denoted by rowId and colId. Creates a transaction for the update operation and returns it + * + * @param rowId the rowId - row key (string) or index (number) + * @param colId the column id - column key (string) or index (number) + * @param val The new value + * @param autoCommit if autoCommit is true, it updates the datasource automatically and the transaction is still stored in the accumulated transaction log + */ + setCellValue(rowId: Object, colId: Object, val: Object, autoCommit: boolean): Object; + + /** + * Updates a record in the datasource. Creates a transaction that can be committed / rolled back + * + * @param rowId the record key - primaryKey (string) or index (number) + * @param rowObject the record object containing the key/value pairs we want to update. It doesn't have to include key/value pairs for all fields defined in the schema or in the data source (if no schema is defined) + * @param autoCommit if autoCommit is true, the datasource will be updated automatically and the transaction is still stored in the accumulated transaction log + */ + updateRow(rowId: Object, rowObject: Object, autoCommit: boolean): Object; + + /** + * Adds a new row to the data source. Creates a transaction that can be committed / rolled back + * + * @param rowId the record key - primaryKey (string) or index (number) + * @param rowObject the new record data. + * @param autoCommit if autoCommit is true, the datasource will be updated automatically and the transaction is still stored in the accumulated transaction log + */ + addRow(rowId: Object, rowObject: Object, autoCommit: boolean): Object; + + /** + * Adds a new row to the data source. Creates a transaction that can be committed / rolled back + * + * @param rowId the record key - primaryKey (string) or index (number) + * @param rowObject the new record data. + * @param rowIndex row index at which to insert the new row + * @param autoCommit if autoCommit is true, the datasource will be updated automatically and the transaction is still stored in the accumulated transaction log + * @param parentRowId Not used in $.ig.DataSource + */ + insertRow(rowId: Object, rowObject: Object, rowIndex: number, autoCommit: boolean, parentRowId: Object): Object; + + /** + * Deletes a row from the data source. + * + * @param rowId the record key - primaryKey (string) or index (number) + * @param autoCommit if autoCommit is true, the datasource will be updated automatically and the transaction is still stored in the accumulated transaction log + */ + deleteRow(rowId: Object, autoCommit: boolean): Object; + + /** + * Adds a new node to the tree data source. Creates a transaction that can be committed / rolled back + * + * @param data the transaction data + */ + addNode(data: Object): void; + + /** + * Removes a node from the tree data source. Creates a transaction that can be committed / rolled back + * + * @param data the transaction data + */ + removeNode(data: Object): void; + + /** + * Returns a standalone object (copy) that represents the commited transactions, but detached from the data source + * + * @param t a transaction object + */ + getDetachedRecord(t: Object): Object; + + /** + * Update the data source with every transaction from the log + * + * @param id Id of the transaction to commit. If no id is specified, will commit all transactions to the data source. + */ + commit(id?: number): void; + + /** + * Clears the transaction log without updating anything in the data source + * + * @param id Record Id to find transactions for. If no id is specified, will rollback all transactions to the data source. + */ + rollback(id?: Object): void; + + /** + * Returns a list of all transaction objects that are pending to be committed or rolled back to the data source + */ + pendingTransactions(): any[]; + + /** + * Returns a list of all transaction objects that are either pending, or have been committed in the data source. + */ + allTransactions(): any[]; + + /** + * Returns the accumulated transaction log as a string. The purpose of this is to be passed to URLs or used conveniently + */ + transactionsAsString(): string; + + /** + * Posts to the settings.updateUrl using $.ajax, by serializing the changes as url params + * + * @param success Specifies a custom function to be called when AJAX request to the updateUrl option succeeds(optional) + * @param error Specifies a custom function to be called when AJAX request to the updateUrl option fails(optional) + */ + saveChanges(success: Function, error: Function): void; + + /** + * Data binds to the current data source + * databinding works using the following workflow: + * 1. fire the databinding event + * 2. based on the data source type (see analyzeDataSource()), do the following: + * 3. if type is HtmlTable, parse the table and set the data and dataView respectively. + * if the type is Function, call it, apply Paging/Filtering/Sorting, and set this._dataView . If the developer wants to do his own paging, filtering or sorting + * in that case, then he should handle the PageIndexChanging and/or DataFiltering, and/or ColumnSorting client-side events, and cancel them. + * if no paging/sorting/filtering are enabled, use just this._data to save space + * if the data source is of type RemoteUrl, use jQuery's $.ajax API to trigger a remote request to the service. Use the param() API to encode the URL + * if the data source is invalid, throw an exception + * if the analyzed runtime data source type , that is, the result of analyzeDataSource(), is Unknown, check if + * the value of settings.type is set to XML or JSON. If string, eval for JSON, and parse for the XML to build the object tree + * 4. now normalize/transform the data, if a schema is supplied. This inplies any additional data type conversion + * 5. next, if OpType is Local, apply paging, sorting, and/or filtering to the data, and store the result in this._dataView + * 6. fire the databound event + * + * @param callback callback function + * @param callee callee object on which the callback will be executed. If none is specified, will assume global execution context + */ + dataBind(callback?: string, callee?: Object): void; + + /** + * Gets a cell value from the record by the specified fieldName. If there's a mapper defined for the field, the resolved by the mapper value will be returned. + * + * @param fieldName the fieldName - name of the field + * @param record the record from which to get it + */ + getCellValue(fieldName: string, record: Object): Object; + + /** + * Applicable only when the data source is bound to remote data. + * Gets or sets summaries data. + * If key or dsObj are not set then returns summaries data. + * Takes summary data from passed argument dsObj(using argument key) + * + * @param key response key to take summary data(for example "Metadata.Summaries") + * @param dsObj data source object - usually contains information about data records and metadata(holds info about summaries) + */ + summariesResponse(key?: string, dsObj?: Object): Object; + + /** + * Returns filtered data if local filtering is applied. If filtering is not applied OR type of filtering is remote returns undefined. + */ + filteredData(): any[]; + + /** + * Sorts the data source locally. The result (filtered data) can be obtained by calling dataView(). + * Remote filtering can be performed by just calling dataBind() and setting the settings.filtering.expressions + * multi-column sorting can be enabled by setting keepSortState to true. + * fields => an array of fields object definitions: + * example: [{fieldName : "firstName"}, {fieldName : "lastName"}] + * example 2: [{fieldIndex : 1} , {fieldIndex : 2}] + * + * @param fields an array of fields object definitions + * @param direction asc / desc direction + */ + sort(fields: Object, direction: string): void; + + /** + * This clears local sorting applied to the data view by resetting it to the original data and applying any paging + */ + clearLocalSorting(): void; + + /** + * Filters the data source locally. Remote filtering can be performed by just calling dataBind() and + * setting the settings.filtering.expressions. The result (filtered data) can be obtained by calling dataView() + * example: [{fieldName : "firstName", expr: "abc", cond: "StartsWith"}, {fieldName : "lastName"}] + * example 2: [{fieldIndex : 1} , {fieldIndex : 2, expr: "a", cond : "contains"}] + * expr is the filter expression text , such as "abc", or a regular expression such as *test* + * cond is the filtering condition such as startsWith, endsWith, contains, equals, doesNotEqual, doesNotContain + * if expr is detected to be a regular expression, the "cond" part is skipped + * + * @param fieldExpressions a list of field expression definitions + * @param boolLogic boolean logic. Accepted values are AND and OR. + * @param keepFilterState if keepFilterState is set to true, it will not discard previous filtering expressions + * @param fieldExpressionsOnStrings a list of field expression definitions (or a string with the conditions separated by AND/OR operator, example: "ID = 1 OR ID = 2"), which when applied will threat the related field as if it's string and can only apply conditions valid for string types. + */ + filter(fieldExpressions: Object, boolLogic: Object, keepFilterState: boolean, fieldExpressionsOnStrings: Object): void; + + /** + * This clears local filtering applied to the data view by resetting it to the original data and applying any paging + */ + clearLocalFilter(): void; + + /** + * Applicable only when the data source is bound to remote data. + * Gets / sets the total number of records in the data source. + * If data binding is remote, and there's paging or filtering enabled, + * the actual total number of records may not + * match the number of records that exists on the client + * + * @param count the total number of records + * @param key + * @param dsObj + * @param context + */ + totalRecordsCount(count?: number, key?: Object, dsObj?: Object, context?: Object): number; + + /** + * Gets / sets if the response from the server contains a property which specifies the total number of records in the server-side backend + * + * @param hasCount specifies if the data source contains a property that denotes the total number of records in the server-side backend + */ + hasTotalRecordsCount(hasCount: boolean): void; + + /** + * Returns metadata object for the specified key + * + * @param key Primary key of the record + */ + metadata(key: string): Object; + + /** + * Returns the total number of records in the local data source + */ + totalLocalRecordsCount(): number; + + /** + * Returns the total number of pages + */ + pageCount(): number; + + /** + * Gets /sets the current page index. If an index is passed as a parameter, the data source is re-bound. + * + * @param index the page index. If none is specified, returns the current page index. + */ + pageIndex(index?: number): number; + + /** + * Gets /sets the page index that should be persisted. For now ONLY when filtering is applied and call explicitly DataBind. + * + * @param value the page index that should be persisted. If none is specified, returns the current page index that should be persisted. + */ + persistedPageIndex(value?: number): number; + + /** + * Sets the page index to be equal to the previous page index and rebinds the data source + */ + prevPage(): void; + + /** + * Sets the page index to be equal to the next page index and rebinds the data source + */ + nextPage(): void; + + /** + * Gets /sets the page size and rebinds the data source if a parameter is specified. If no parameter is passed, returns the current page size + * + * @param s the page size. + */ + pageSize(s?: number): number; + + /** + * For internal use + * + * @param dirty + */ + pageSizeDirty(dirty: Object): void; + + /** + * Returns a list of records for the specified page. Implies that paging is enabled. + * + * @param p the page index for which records will be returned + */ + recordsForPage(p: number): void; + + /** + * Converts a HTML TABLE dom element to a JavaScript array of objects that contain the records data + * + * @param tableDOM TABLE dom element to transform + */ + tableToObject(tableDOM: Element): Object; + + /** + * Parses the string and returns an evaluated JSON object + * + * @param s the JSON as string. + */ + stringToJSONObject(s: string): void; + + /** + * Parses a string and returns a XML Document + * + * @param s the XML represented as a string + */ + stringToXmlObject(s: string): void; + + /** + * Returns collection of data and non-data(grouped) records. Flat representation of hierarchical data + */ + groupByData(): any[]; + + /** + * Returns collection of data and non-data(grouped) records. Returns only visible records(children of collapsed grouped records are not included in the collection) + */ + visibleGroupByData(): any[]; + + /** + * Returns the current normalized/transformed and paged/filtered/sorted group-by data + */ + groupByDataView(): any[]; + + /** + * Toggle grouped record with the specified id and updates collections visible groupby data and data view + * + * @param id data-id attribute of the respective group row in the DOM + * @param collapsed if true the record should be collapsed, otherwise expanded + */ + toggleGroupByRecord(id: string, collapsed: boolean): void; + + /** + * Check whether the specified gorupby record is collapsed + * + * @param gbRec id of the grouped record OR grouped record + */ + isGroupByRecordCollapsed(gbRec: Object): boolean; + + /** + * Check whether grouping is applied for the specified sorting expressions. + * + * @param exprs array of sorting expressions. If not set check expressions defined in sorting settings + */ + isGroupByApplied(exprs?: any[]): boolean; + } +} +interface IgniteUIStatic { +JSONDataSource: typeof Infragistics.JSONDataSource; +} + +interface RESTDataSourceSettingsRestSettingsCreate { + /** + * Specifies a remote URL to which create requests will be sent. This will be used for both batch and non-batch, however if template is also set, this URL will only be used for batch requests. + */ + url?: string; + + /** + * Specifies a remote URL template. Use ${id} in place of the resource id. + */ + template?: string; + + /** + * Specifies whether create requests will be sent in batches + */ + batch?: boolean; + + /** + * Option for RESTDataSourceSettingsRestSettingsCreate + */ + [optionName: string]: any; +} + +interface RESTDataSourceSettingsRestSettingsUpdate { + /** + * Specifies a remote URL to which update requests will be sent. This will be used for both batch and non-batch, however if template is also set, this URL will only be used for batch requests. + */ + url?: string; + + /** + * Specifies a remote URL template. Use ${id} in place of the resource id. + */ + template?: string; + + /** + * Specifies whether update requests will be sent in batches + */ + batch?: boolean; + + /** + * Option for RESTDataSourceSettingsRestSettingsUpdate + */ + [optionName: string]: any; +} + +interface RESTDataSourceSettingsRestSettingsRemove { + /** + * Specifies a remote URL to which remove requests will be sent. This will be used for both batch and non-batch, however if template is also set, this URL will only be used for batch requests. + */ + url?: string; + + /** + * Specifies a remote URL template. Use ${id} in place of the resource id. + */ + template?: string; + + /** + * Specifies whether update requests will be sent in batches + */ + batch?: boolean; + + /** + * Option for RESTDataSourceSettingsRestSettingsRemove + */ + [optionName: string]: any; +} + +interface RESTDataSourceSettingsRestSettings { + /** + * Settings for create requests + */ + create?: RESTDataSourceSettingsRestSettingsCreate; + + /** + * Settings for update requests + */ + update?: RESTDataSourceSettingsRestSettingsUpdate; + + /** + * Settings for remove requests + */ + remove?: RESTDataSourceSettingsRestSettingsRemove; + + /** + * Specifies whether the ids of the removed resources are send through the request URI + */ + encodeRemoveInRequestUri?: boolean; + + /** + * Specifies a custom function to serialize content sent to the server. It should accept a single object or an array of objects and return a string. If not specified, JSON.stringify() will be used. + */ + contentSerializer?: Function; + + /** + * Specifies the content type of the request + */ + contentType?: string; + + /** + * Option for RESTDataSourceSettingsRestSettings + */ + [optionName: string]: any; +} + +interface RESTDataSourceSettings { + /** + * Settings related to REST compliant update routine + */ + restSettings?: RESTDataSourceSettingsRestSettings; + + /** + * Option for RESTDataSourceSettings + */ + [optionName: string]: any; +} + +declare namespace Infragistics { + class RESTDataSource { + constructor(settings: RESTDataSourceSettings); + + /** + * Posts to the restSettings urls using $.ajax, by serializing the changes as url params. + * + * @param success + * @param error + */ + saveChanges(success: Object, error: Object): void; + + /** + * Sets a list of fields to the data source. If no parameter is specified, just returns the already existing list of fields + * + * @param fields a field has the following format: {key: 'fieldKey', dataType: 'string/number/date' } + */ + fields(fields?: Object): Object; + + /** + * Analyzes the dataSource setting to automatically determine the type of the data source. Returns the data source type. See settings.type + */ + analyzeDataSource(): string; + + /** + * Returns the current normalized/transformed and paged/filtered/sorted data, i.e. the dataView + */ + dataView(): any[]; + + /** + * Returns all of the bound data, without taking into account local paging, sorting, filtering, etc. + */ + data(): Object; + + /** + * Returns transformed data according to transformed execution: + * 1. Before paging and filtering + * 2. After filtering before paging + * 3. After filtering and paging + * + * @param transformedExecution + */ + transformedData(transformedExecution: Object): Object; + + /** + * Returns summaries data + */ + dataSummaries(): Object; + + /** + * Gets/sets the schema definition. + * + * @param s a schema object + * @param t type of the data source. See settings.type + */ + schema(s?: Object, t?: string): void; + + /** + * Gets/sets a list of paging settings + * + * @param p object holding all paging settings. See settings.paging + */ + pagingSettings(p?: Object): Object; + + /** + * Gets/sets a list of filtering settings + * + * @param f object holding all filtering settings. See settings.filtering + */ + filterSettings(f?: Object): void; + + /** + * Gets/sets a list of paging settings + * + * @param s object holding all sorting settings. See settings.sorting + */ + sortSettings(s?: Object): Object; + + /** + * Gets/sets a list of summaries settings. + * + * @param s object holding all summaries settings. See settings.summaries + */ + summariesSettings(s?: Object): void; + + /** + * Gets/sets the dataSource setting. If no parameter is specified, returns settings.dataSource + * + * @param ds + */ + dataSource(ds?: Object): Object; + + /** + * Gets/sets the type of the dataSource. If no parameter is specified, returns settings.type + * + * @param t + * @return json|xml|unknown|array|function|htmlTableString|htmlTableId|htmlTableDom|invalid|remoteUrl|empty + */ + type(t?: Object): string; + + /** + * Returns a record by a specified key (requires that primaryKey is set in the settings) + * + * @param key Primary key of the record + * @param ds the data source in which to search for the record. When not set it will use the current data source. + * @param objPath Not used in $.ig.DataSource + */ + findRecordByKey(key: string, ds?: string, objPath?: string): Object; + + /** + * Removes a specific record denoted by the primaryKey of the passed key parameter from the data source + * + * @param key primary key of the record + * @param origDs + */ + removeRecordByKey(key: Object, origDs: Object): void; + + /** + * Removes a record from the data source at specific index. + * + * @param index index of record + * @param origDs + */ + removeRecordByIndex(index: number, origDs: Object): void; + + /** + * Sets a cell value for the cell denoted by rowId and colId. Creates a transaction for the update operation and returns it + * + * @param rowId the rowId - row key (string) or index (number) + * @param colId the column id - column key (string) or index (number) + * @param val The new value + * @param autoCommit if autoCommit is true, it updates the datasource automatically and the transaction is still stored in the accumulated transaction log + */ + setCellValue(rowId: Object, colId: Object, val: Object, autoCommit: boolean): Object; + + /** + * Updates a record in the datasource. Creates a transaction that can be committed / rolled back + * + * @param rowId the record key - primaryKey (string) or index (number) + * @param rowObject the record object containing the key/value pairs we want to update. It doesn't have to include key/value pairs for all fields defined in the schema or in the data source (if no schema is defined) + * @param autoCommit if autoCommit is true, the datasource will be updated automatically and the transaction is still stored in the accumulated transaction log + */ + updateRow(rowId: Object, rowObject: Object, autoCommit: boolean): Object; + + /** + * Adds a new row to the data source. Creates a transaction that can be committed / rolled back + * + * @param rowId the record key - primaryKey (string) or index (number) + * @param rowObject the new record data. + * @param autoCommit if autoCommit is true, the datasource will be updated automatically and the transaction is still stored in the accumulated transaction log + */ + addRow(rowId: Object, rowObject: Object, autoCommit: boolean): Object; + + /** + * Adds a new row to the data source. Creates a transaction that can be committed / rolled back + * + * @param rowId the record key - primaryKey (string) or index (number) + * @param rowObject the new record data. + * @param rowIndex row index at which to insert the new row + * @param autoCommit if autoCommit is true, the datasource will be updated automatically and the transaction is still stored in the accumulated transaction log + * @param parentRowId Not used in $.ig.DataSource + */ + insertRow(rowId: Object, rowObject: Object, rowIndex: number, autoCommit: boolean, parentRowId: Object): Object; + + /** + * Deletes a row from the data source. + * + * @param rowId the record key - primaryKey (string) or index (number) + * @param autoCommit if autoCommit is true, the datasource will be updated automatically and the transaction is still stored in the accumulated transaction log + */ + deleteRow(rowId: Object, autoCommit: boolean): Object; + + /** + * Adds a new node to the tree data source. Creates a transaction that can be committed / rolled back + * + * @param data the transaction data + */ + addNode(data: Object): void; + + /** + * Removes a node from the tree data source. Creates a transaction that can be committed / rolled back + * + * @param data the transaction data + */ + removeNode(data: Object): void; + + /** + * Returns a standalone object (copy) that represents the commited transactions, but detached from the data source + * + * @param t a transaction object + */ + getDetachedRecord(t: Object): Object; + + /** + * Update the data source with every transaction from the log + * + * @param id Id of the transaction to commit. If no id is specified, will commit all transactions to the data source. + */ + commit(id?: number): void; + + /** + * Clears the transaction log without updating anything in the data source + * + * @param id Record Id to find transactions for. If no id is specified, will rollback all transactions to the data source. + */ + rollback(id?: Object): void; + + /** + * Returns a list of all transaction objects that are pending to be committed or rolled back to the data source + */ + pendingTransactions(): any[]; + + /** + * Returns a list of all transaction objects that are either pending, or have been committed in the data source. + */ + allTransactions(): any[]; + + /** + * Returns the accumulated transaction log as a string. The purpose of this is to be passed to URLs or used conveniently + */ + transactionsAsString(): string; + + /** + * Data binds to the current data source + * databinding works using the following workflow: + * 1. fire the databinding event + * 2. based on the data source type (see analyzeDataSource()), do the following: + * 3. if type is HtmlTable, parse the table and set the data and dataView respectively. + * if the type is Function, call it, apply Paging/Filtering/Sorting, and set this._dataView . If the developer wants to do his own paging, filtering or sorting + * in that case, then he should handle the PageIndexChanging and/or DataFiltering, and/or ColumnSorting client-side events, and cancel them. + * if no paging/sorting/filtering are enabled, use just this._data to save space + * if the data source is of type RemoteUrl, use jQuery's $.ajax API to trigger a remote request to the service. Use the param() API to encode the URL + * if the data source is invalid, throw an exception + * if the analyzed runtime data source type , that is, the result of analyzeDataSource(), is Unknown, check if + * the value of settings.type is set to XML or JSON. If string, eval for JSON, and parse for the XML to build the object tree + * 4. now normalize/transform the data, if a schema is supplied. This inplies any additional data type conversion + * 5. next, if OpType is Local, apply paging, sorting, and/or filtering to the data, and store the result in this._dataView + * 6. fire the databound event + * + * @param callback callback function + * @param callee callee object on which the callback will be executed. If none is specified, will assume global execution context + */ + dataBind(callback?: string, callee?: Object): void; + + /** + * Gets a cell value from the record by the specified fieldName. If there's a mapper defined for the field, the resolved by the mapper value will be returned. + * + * @param fieldName the fieldName - name of the field + * @param record the record from which to get it + */ + getCellValue(fieldName: string, record: Object): Object; + + /** + * Applicable only when the data source is bound to remote data. + * Gets or sets summaries data. + * If key or dsObj are not set then returns summaries data. + * Takes summary data from passed argument dsObj(using argument key) + * + * @param key response key to take summary data(for example "Metadata.Summaries") + * @param dsObj data source object - usually contains information about data records and metadata(holds info about summaries) + */ + summariesResponse(key?: string, dsObj?: Object): Object; + + /** + * Returns filtered data if local filtering is applied. If filtering is not applied OR type of filtering is remote returns undefined. + */ + filteredData(): any[]; + + /** + * Sorts the data source locally. The result (filtered data) can be obtained by calling dataView(). + * Remote filtering can be performed by just calling dataBind() and setting the settings.filtering.expressions + * multi-column sorting can be enabled by setting keepSortState to true. + * fields => an array of fields object definitions: + * example: [{fieldName : "firstName"}, {fieldName : "lastName"}] + * example 2: [{fieldIndex : 1} , {fieldIndex : 2}] + * + * @param fields an array of fields object definitions + * @param direction asc / desc direction + */ + sort(fields: Object, direction: string): void; + + /** + * This clears local sorting applied to the data view by resetting it to the original data and applying any paging + */ + clearLocalSorting(): void; + + /** + * Filters the data source locally. Remote filtering can be performed by just calling dataBind() and + * setting the settings.filtering.expressions. The result (filtered data) can be obtained by calling dataView() + * example: [{fieldName : "firstName", expr: "abc", cond: "StartsWith"}, {fieldName : "lastName"}] + * example 2: [{fieldIndex : 1} , {fieldIndex : 2, expr: "a", cond : "contains"}] + * expr is the filter expression text , such as "abc", or a regular expression such as *test* + * cond is the filtering condition such as startsWith, endsWith, contains, equals, doesNotEqual, doesNotContain + * if expr is detected to be a regular expression, the "cond" part is skipped + * + * @param fieldExpressions a list of field expression definitions + * @param boolLogic boolean logic. Accepted values are AND and OR. + * @param keepFilterState if keepFilterState is set to true, it will not discard previous filtering expressions + * @param fieldExpressionsOnStrings a list of field expression definitions (or a string with the conditions separated by AND/OR operator, example: "ID = 1 OR ID = 2"), which when applied will threat the related field as if it's string and can only apply conditions valid for string types. + */ + filter(fieldExpressions: Object, boolLogic: Object, keepFilterState: boolean, fieldExpressionsOnStrings: Object): void; + + /** + * This clears local filtering applied to the data view by resetting it to the original data and applying any paging + */ + clearLocalFilter(): void; + + /** + * Applicable only when the data source is bound to remote data. + * Gets / sets the total number of records in the data source. + * If data binding is remote, and there's paging or filtering enabled, + * the actual total number of records may not + * match the number of records that exists on the client + * + * @param count the total number of records + * @param key + * @param dsObj + * @param context + */ + totalRecordsCount(count?: number, key?: Object, dsObj?: Object, context?: Object): number; + + /** + * Gets / sets if the response from the server contains a property which specifies the total number of records in the server-side backend + * + * @param hasCount specifies if the data source contains a property that denotes the total number of records in the server-side backend + */ + hasTotalRecordsCount(hasCount: boolean): void; + + /** + * Returns metadata object for the specified key + * + * @param key Primary key of the record + */ + metadata(key: string): Object; + + /** + * Returns the total number of records in the local data source + */ + totalLocalRecordsCount(): number; + + /** + * Returns the total number of pages + */ + pageCount(): number; + + /** + * Gets /sets the current page index. If an index is passed as a parameter, the data source is re-bound. + * + * @param index the page index. If none is specified, returns the current page index. + */ + pageIndex(index?: number): number; + + /** + * Gets /sets the page index that should be persisted. For now ONLY when filtering is applied and call explicitly DataBind. + * + * @param value the page index that should be persisted. If none is specified, returns the current page index that should be persisted. + */ + persistedPageIndex(value?: number): number; + + /** + * Sets the page index to be equal to the previous page index and rebinds the data source + */ + prevPage(): void; + + /** + * Sets the page index to be equal to the next page index and rebinds the data source + */ + nextPage(): void; + + /** + * Gets /sets the page size and rebinds the data source if a parameter is specified. If no parameter is passed, returns the current page size + * + * @param s the page size. + */ + pageSize(s?: number): number; + + /** + * For internal use + * + * @param dirty + */ + pageSizeDirty(dirty: Object): void; + + /** + * Returns a list of records for the specified page. Implies that paging is enabled. + * + * @param p the page index for which records will be returned + */ + recordsForPage(p: number): void; + + /** + * Converts a HTML TABLE dom element to a JavaScript array of objects that contain the records data + * + * @param tableDOM TABLE dom element to transform + */ + tableToObject(tableDOM: Element): Object; + + /** + * Parses the string and returns an evaluated JSON object + * + * @param s the JSON as string. + */ + stringToJSONObject(s: string): void; + + /** + * Parses a string and returns a XML Document + * + * @param s the XML represented as a string + */ + stringToXmlObject(s: string): void; + + /** + * Returns collection of data and non-data(grouped) records. Flat representation of hierarchical data + */ + groupByData(): any[]; + + /** + * Returns collection of data and non-data(grouped) records. Returns only visible records(children of collapsed grouped records are not included in the collection) + */ + visibleGroupByData(): any[]; + + /** + * Returns the current normalized/transformed and paged/filtered/sorted group-by data + */ + groupByDataView(): any[]; + + /** + * Toggle grouped record with the specified id and updates collections visible groupby data and data view + * + * @param id data-id attribute of the respective group row in the DOM + * @param collapsed if true the record should be collapsed, otherwise expanded + */ + toggleGroupByRecord(id: string, collapsed: boolean): void; + + /** + * Check whether the specified gorupby record is collapsed + * + * @param gbRec id of the grouped record OR grouped record + */ + isGroupByRecordCollapsed(gbRec: Object): boolean; + + /** + * Check whether grouping is applied for the specified sorting expressions. + * + * @param exprs array of sorting expressions. If not set check expressions defined in sorting settings + */ + isGroupByApplied(exprs?: any[]): boolean; + } +} +interface IgniteUIStatic { +RESTDataSource: typeof Infragistics.RESTDataSource; +} + +interface JSONPDataSourceSettings { + /** + * Override the callback function name in a jsonp request. Sets option jsonp in $.ajax functionbool Setting the jsonp option to false prevents jQuery from adding the "?callback" string to the URL or attempting to use "=?" for transformation + * + */ + jsonp?: string|boolean; + + /** + * Specify the callback function name for a JSONP request. Sets option jsonpCallback in $.ajax function + */ + jsonpCallback?: string|Function; + + /** + * Option for JSONPDataSourceSettings + */ + [optionName: string]: any; +} + +declare namespace Infragistics { + class JSONPDataSource { + constructor(settings: JSONPDataSourceSettings); + + /** + * Sets a list of fields to the data source. If no parameter is specified, just returns the already existing list of fields + * + * @param fields a field has the following format: {key: 'fieldKey', dataType: 'string/number/date' } + */ + fields(fields?: Object): Object; + + /** + * Analyzes the dataSource setting to automatically determine the type of the data source. Returns the data source type. See settings.type + */ + analyzeDataSource(): string; + + /** + * Returns the current normalized/transformed and paged/filtered/sorted data, i.e. the dataView + */ + dataView(): any[]; + + /** + * Returns all of the bound data, without taking into account local paging, sorting, filtering, etc. + */ + data(): Object; + + /** + * Returns transformed data according to transformed execution: + * 1. Before paging and filtering + * 2. After filtering before paging + * 3. After filtering and paging + * + * @param transformedExecution + */ + transformedData(transformedExecution: Object): Object; + + /** + * Returns summaries data + */ + dataSummaries(): Object; + + /** + * Gets/sets the schema definition. + * + * @param s a schema object + * @param t type of the data source. See settings.type + */ + schema(s?: Object, t?: string): void; + + /** + * Gets/sets a list of paging settings + * + * @param p object holding all paging settings. See settings.paging + */ + pagingSettings(p?: Object): Object; + + /** + * Gets/sets a list of filtering settings + * + * @param f object holding all filtering settings. See settings.filtering + */ + filterSettings(f?: Object): void; + + /** + * Gets/sets a list of paging settings + * + * @param s object holding all sorting settings. See settings.sorting + */ + sortSettings(s?: Object): Object; + + /** + * Gets/sets a list of summaries settings. + * + * @param s object holding all summaries settings. See settings.summaries + */ + summariesSettings(s?: Object): void; + + /** + * Gets/sets the dataSource setting. If no parameter is specified, returns settings.dataSource + * + * @param ds + */ + dataSource(ds?: Object): Object; + + /** + * Gets/sets the type of the dataSource. If no parameter is specified, returns settings.type + * + * @param t + * @return json|xml|unknown|array|function|htmlTableString|htmlTableId|htmlTableDom|invalid|remoteUrl|empty + */ + type(t?: Object): string; + + /** + * Returns a record by a specified key (requires that primaryKey is set in the settings) + * + * @param key Primary key of the record + * @param ds the data source in which to search for the record. When not set it will use the current data source. + * @param objPath Not used in $.ig.DataSource + */ + findRecordByKey(key: string, ds?: string, objPath?: string): Object; + + /** + * Removes a specific record denoted by the primaryKey of the passed key parameter from the data source + * + * @param key primary key of the record + * @param origDs + */ + removeRecordByKey(key: Object, origDs: Object): void; + + /** + * Removes a record from the data source at specific index. + * + * @param index index of record + * @param origDs + */ + removeRecordByIndex(index: number, origDs: Object): void; + + /** + * Sets a cell value for the cell denoted by rowId and colId. Creates a transaction for the update operation and returns it + * + * @param rowId the rowId - row key (string) or index (number) + * @param colId the column id - column key (string) or index (number) + * @param val The new value + * @param autoCommit if autoCommit is true, it updates the datasource automatically and the transaction is still stored in the accumulated transaction log + */ + setCellValue(rowId: Object, colId: Object, val: Object, autoCommit: boolean): Object; + + /** + * Updates a record in the datasource. Creates a transaction that can be committed / rolled back + * + * @param rowId the record key - primaryKey (string) or index (number) + * @param rowObject the record object containing the key/value pairs we want to update. It doesn't have to include key/value pairs for all fields defined in the schema or in the data source (if no schema is defined) + * @param autoCommit if autoCommit is true, the datasource will be updated automatically and the transaction is still stored in the accumulated transaction log + */ + updateRow(rowId: Object, rowObject: Object, autoCommit: boolean): Object; + + /** + * Adds a new row to the data source. Creates a transaction that can be committed / rolled back + * + * @param rowId the record key - primaryKey (string) or index (number) + * @param rowObject the new record data. + * @param autoCommit if autoCommit is true, the datasource will be updated automatically and the transaction is still stored in the accumulated transaction log + */ + addRow(rowId: Object, rowObject: Object, autoCommit: boolean): Object; + + /** + * Adds a new row to the data source. Creates a transaction that can be committed / rolled back + * + * @param rowId the record key - primaryKey (string) or index (number) + * @param rowObject the new record data. + * @param rowIndex row index at which to insert the new row + * @param autoCommit if autoCommit is true, the datasource will be updated automatically and the transaction is still stored in the accumulated transaction log + * @param parentRowId Not used in $.ig.DataSource + */ + insertRow(rowId: Object, rowObject: Object, rowIndex: number, autoCommit: boolean, parentRowId: Object): Object; + + /** + * Deletes a row from the data source. + * + * @param rowId the record key - primaryKey (string) or index (number) + * @param autoCommit if autoCommit is true, the datasource will be updated automatically and the transaction is still stored in the accumulated transaction log + */ + deleteRow(rowId: Object, autoCommit: boolean): Object; + + /** + * Adds a new node to the tree data source. Creates a transaction that can be committed / rolled back + * + * @param data the transaction data + */ + addNode(data: Object): void; + + /** + * Removes a node from the tree data source. Creates a transaction that can be committed / rolled back + * + * @param data the transaction data + */ + removeNode(data: Object): void; + + /** + * Returns a standalone object (copy) that represents the commited transactions, but detached from the data source + * + * @param t a transaction object + */ + getDetachedRecord(t: Object): Object; + + /** + * Update the data source with every transaction from the log + * + * @param id Id of the transaction to commit. If no id is specified, will commit all transactions to the data source. + */ + commit(id?: number): void; + + /** + * Clears the transaction log without updating anything in the data source + * + * @param id Record Id to find transactions for. If no id is specified, will rollback all transactions to the data source. + */ + rollback(id?: Object): void; + + /** + * Returns a list of all transaction objects that are pending to be committed or rolled back to the data source + */ + pendingTransactions(): any[]; + + /** + * Returns a list of all transaction objects that are either pending, or have been committed in the data source. + */ + allTransactions(): any[]; + + /** + * Returns the accumulated transaction log as a string. The purpose of this is to be passed to URLs or used conveniently + */ + transactionsAsString(): string; + + /** + * Posts to the settings.updateUrl using $.ajax, by serializing the changes as url params + * + * @param success Specifies a custom function to be called when AJAX request to the updateUrl option succeeds(optional) + * @param error Specifies a custom function to be called when AJAX request to the updateUrl option fails(optional) + */ + saveChanges(success: Function, error: Function): void; + + /** + * Data binds to the current data source + * databinding works using the following workflow: + * 1. fire the databinding event + * 2. based on the data source type (see analyzeDataSource()), do the following: + * 3. if type is HtmlTable, parse the table and set the data and dataView respectively. + * if the type is Function, call it, apply Paging/Filtering/Sorting, and set this._dataView . If the developer wants to do his own paging, filtering or sorting + * in that case, then he should handle the PageIndexChanging and/or DataFiltering, and/or ColumnSorting client-side events, and cancel them. + * if no paging/sorting/filtering are enabled, use just this._data to save space + * if the data source is of type RemoteUrl, use jQuery's $.ajax API to trigger a remote request to the service. Use the param() API to encode the URL + * if the data source is invalid, throw an exception + * if the analyzed runtime data source type , that is, the result of analyzeDataSource(), is Unknown, check if + * the value of settings.type is set to XML or JSON. If string, eval for JSON, and parse for the XML to build the object tree + * 4. now normalize/transform the data, if a schema is supplied. This inplies any additional data type conversion + * 5. next, if OpType is Local, apply paging, sorting, and/or filtering to the data, and store the result in this._dataView + * 6. fire the databound event + * + * @param callback callback function + * @param callee callee object on which the callback will be executed. If none is specified, will assume global execution context + */ + dataBind(callback?: string, callee?: Object): void; + + /** + * Gets a cell value from the record by the specified fieldName. If there's a mapper defined for the field, the resolved by the mapper value will be returned. + * + * @param fieldName the fieldName - name of the field + * @param record the record from which to get it + */ + getCellValue(fieldName: string, record: Object): Object; + + /** + * Applicable only when the data source is bound to remote data. + * Gets or sets summaries data. + * If key or dsObj are not set then returns summaries data. + * Takes summary data from passed argument dsObj(using argument key) + * + * @param key response key to take summary data(for example "Metadata.Summaries") + * @param dsObj data source object - usually contains information about data records and metadata(holds info about summaries) + */ + summariesResponse(key?: string, dsObj?: Object): Object; + + /** + * Returns filtered data if local filtering is applied. If filtering is not applied OR type of filtering is remote returns undefined. + */ + filteredData(): any[]; + + /** + * Sorts the data source locally. The result (filtered data) can be obtained by calling dataView(). + * Remote filtering can be performed by just calling dataBind() and setting the settings.filtering.expressions + * multi-column sorting can be enabled by setting keepSortState to true. + * fields => an array of fields object definitions: + * example: [{fieldName : "firstName"}, {fieldName : "lastName"}] + * example 2: [{fieldIndex : 1} , {fieldIndex : 2}] + * + * @param fields an array of fields object definitions + * @param direction asc / desc direction + */ + sort(fields: Object, direction: string): void; + + /** + * This clears local sorting applied to the data view by resetting it to the original data and applying any paging + */ + clearLocalSorting(): void; + + /** + * Filters the data source locally. Remote filtering can be performed by just calling dataBind() and + * setting the settings.filtering.expressions. The result (filtered data) can be obtained by calling dataView() + * example: [{fieldName : "firstName", expr: "abc", cond: "StartsWith"}, {fieldName : "lastName"}] + * example 2: [{fieldIndex : 1} , {fieldIndex : 2, expr: "a", cond : "contains"}] + * expr is the filter expression text , such as "abc", or a regular expression such as *test* + * cond is the filtering condition such as startsWith, endsWith, contains, equals, doesNotEqual, doesNotContain + * if expr is detected to be a regular expression, the "cond" part is skipped + * + * @param fieldExpressions a list of field expression definitions + * @param boolLogic boolean logic. Accepted values are AND and OR. + * @param keepFilterState if keepFilterState is set to true, it will not discard previous filtering expressions + * @param fieldExpressionsOnStrings a list of field expression definitions (or a string with the conditions separated by AND/OR operator, example: "ID = 1 OR ID = 2"), which when applied will threat the related field as if it's string and can only apply conditions valid for string types. + */ + filter(fieldExpressions: Object, boolLogic: Object, keepFilterState: boolean, fieldExpressionsOnStrings: Object): void; + + /** + * This clears local filtering applied to the data view by resetting it to the original data and applying any paging + */ + clearLocalFilter(): void; + + /** + * Applicable only when the data source is bound to remote data. + * Gets / sets the total number of records in the data source. + * If data binding is remote, and there's paging or filtering enabled, + * the actual total number of records may not + * match the number of records that exists on the client + * + * @param count the total number of records + * @param key + * @param dsObj + * @param context + */ + totalRecordsCount(count?: number, key?: Object, dsObj?: Object, context?: Object): number; + + /** + * Gets / sets if the response from the server contains a property which specifies the total number of records in the server-side backend + * + * @param hasCount specifies if the data source contains a property that denotes the total number of records in the server-side backend + */ + hasTotalRecordsCount(hasCount: boolean): void; + + /** + * Returns metadata object for the specified key + * + * @param key Primary key of the record + */ + metadata(key: string): Object; + + /** + * Returns the total number of records in the local data source + */ + totalLocalRecordsCount(): number; + + /** + * Returns the total number of pages + */ + pageCount(): number; + + /** + * Gets /sets the current page index. If an index is passed as a parameter, the data source is re-bound. + * + * @param index the page index. If none is specified, returns the current page index. + */ + pageIndex(index?: number): number; + + /** + * Gets /sets the page index that should be persisted. For now ONLY when filtering is applied and call explicitly DataBind. + * + * @param value the page index that should be persisted. If none is specified, returns the current page index that should be persisted. + */ + persistedPageIndex(value?: number): number; + + /** + * Sets the page index to be equal to the previous page index and rebinds the data source + */ + prevPage(): void; + + /** + * Sets the page index to be equal to the next page index and rebinds the data source + */ + nextPage(): void; + + /** + * Gets /sets the page size and rebinds the data source if a parameter is specified. If no parameter is passed, returns the current page size + * + * @param s the page size. + */ + pageSize(s?: number): number; + + /** + * For internal use + * + * @param dirty + */ + pageSizeDirty(dirty: Object): void; + + /** + * Returns a list of records for the specified page. Implies that paging is enabled. + * + * @param p the page index for which records will be returned + */ + recordsForPage(p: number): void; + + /** + * Converts a HTML TABLE dom element to a JavaScript array of objects that contain the records data + * + * @param tableDOM TABLE dom element to transform + */ + tableToObject(tableDOM: Element): Object; + + /** + * Parses the string and returns an evaluated JSON object + * + * @param s the JSON as string. + */ + stringToJSONObject(s: string): void; + + /** + * Parses a string and returns a XML Document + * + * @param s the XML represented as a string + */ + stringToXmlObject(s: string): void; + + /** + * Returns collection of data and non-data(grouped) records. Flat representation of hierarchical data + */ + groupByData(): any[]; + + /** + * Returns collection of data and non-data(grouped) records. Returns only visible records(children of collapsed grouped records are not included in the collection) + */ + visibleGroupByData(): any[]; + + /** + * Returns the current normalized/transformed and paged/filtered/sorted group-by data + */ + groupByDataView(): any[]; + + /** + * Toggle grouped record with the specified id and updates collections visible groupby data and data view + * + * @param id data-id attribute of the respective group row in the DOM + * @param collapsed if true the record should be collapsed, otherwise expanded + */ + toggleGroupByRecord(id: string, collapsed: boolean): void; + + /** + * Check whether the specified gorupby record is collapsed + * + * @param gbRec id of the grouped record OR grouped record + */ + isGroupByRecordCollapsed(gbRec: Object): boolean; + + /** + * Check whether grouping is applied for the specified sorting expressions. + * + * @param exprs array of sorting expressions. If not set check expressions defined in sorting settings + */ + isGroupByApplied(exprs?: any[]): boolean; + } +} +interface IgniteUIStatic { +JSONPDataSource: typeof Infragistics.JSONPDataSource; +} + +declare namespace Infragistics { + class XmlDataSource { + constructor(settings: DataSourceSettings); + + /** + * Sets a list of fields to the data source. If no parameter is specified, just returns the already existing list of fields + * + * @param fields a field has the following format: {key: 'fieldKey', dataType: 'string/number/date' } + */ + fields(fields?: Object): Object; + + /** + * Analyzes the dataSource setting to automatically determine the type of the data source. Returns the data source type. See settings.type + */ + analyzeDataSource(): string; + + /** + * Returns the current normalized/transformed and paged/filtered/sorted data, i.e. the dataView + */ + dataView(): any[]; + + /** + * Returns all of the bound data, without taking into account local paging, sorting, filtering, etc. + */ + data(): Object; + + /** + * Returns transformed data according to transformed execution: + * 1. Before paging and filtering + * 2. After filtering before paging + * 3. After filtering and paging + * + * @param transformedExecution + */ + transformedData(transformedExecution: Object): Object; + + /** + * Returns summaries data + */ + dataSummaries(): Object; + + /** + * Gets/sets the schema definition. + * + * @param s a schema object + * @param t type of the data source. See settings.type + */ + schema(s?: Object, t?: string): void; + + /** + * Gets/sets a list of paging settings + * + * @param p object holding all paging settings. See settings.paging + */ + pagingSettings(p?: Object): Object; + + /** + * Gets/sets a list of filtering settings + * + * @param f object holding all filtering settings. See settings.filtering + */ + filterSettings(f?: Object): void; + + /** + * Gets/sets a list of paging settings + * + * @param s object holding all sorting settings. See settings.sorting + */ + sortSettings(s?: Object): Object; + + /** + * Gets/sets a list of summaries settings. + * + * @param s object holding all summaries settings. See settings.summaries + */ + summariesSettings(s?: Object): void; + + /** + * Gets/sets the dataSource setting. If no parameter is specified, returns settings.dataSource + * + * @param ds + */ + dataSource(ds?: Object): Object; + + /** + * Gets/sets the type of the dataSource. If no parameter is specified, returns settings.type + * + * @param t + * @return json|xml|unknown|array|function|htmlTableString|htmlTableId|htmlTableDom|invalid|remoteUrl|empty + */ + type(t?: Object): string; + + /** + * Returns a record by a specified key (requires that primaryKey is set in the settings) + * + * @param key Primary key of the record + * @param ds the data source in which to search for the record. When not set it will use the current data source. + * @param objPath Not used in $.ig.DataSource + */ + findRecordByKey(key: string, ds?: string, objPath?: string): Object; + + /** + * Removes a specific record denoted by the primaryKey of the passed key parameter from the data source + * + * @param key primary key of the record + * @param origDs + */ + removeRecordByKey(key: Object, origDs: Object): void; + + /** + * Removes a record from the data source at specific index. + * + * @param index index of record + * @param origDs + */ + removeRecordByIndex(index: number, origDs: Object): void; + + /** + * Sets a cell value for the cell denoted by rowId and colId. Creates a transaction for the update operation and returns it + * + * @param rowId the rowId - row key (string) or index (number) + * @param colId the column id - column key (string) or index (number) + * @param val The new value + * @param autoCommit if autoCommit is true, it updates the datasource automatically and the transaction is still stored in the accumulated transaction log + */ + setCellValue(rowId: Object, colId: Object, val: Object, autoCommit: boolean): Object; + + /** + * Updates a record in the datasource. Creates a transaction that can be committed / rolled back + * + * @param rowId the record key - primaryKey (string) or index (number) + * @param rowObject the record object containing the key/value pairs we want to update. It doesn't have to include key/value pairs for all fields defined in the schema or in the data source (if no schema is defined) + * @param autoCommit if autoCommit is true, the datasource will be updated automatically and the transaction is still stored in the accumulated transaction log + */ + updateRow(rowId: Object, rowObject: Object, autoCommit: boolean): Object; + + /** + * Adds a new row to the data source. Creates a transaction that can be committed / rolled back + * + * @param rowId the record key - primaryKey (string) or index (number) + * @param rowObject the new record data. + * @param autoCommit if autoCommit is true, the datasource will be updated automatically and the transaction is still stored in the accumulated transaction log + */ + addRow(rowId: Object, rowObject: Object, autoCommit: boolean): Object; + + /** + * Adds a new row to the data source. Creates a transaction that can be committed / rolled back + * + * @param rowId the record key - primaryKey (string) or index (number) + * @param rowObject the new record data. + * @param rowIndex row index at which to insert the new row + * @param autoCommit if autoCommit is true, the datasource will be updated automatically and the transaction is still stored in the accumulated transaction log + * @param parentRowId Not used in $.ig.DataSource + */ + insertRow(rowId: Object, rowObject: Object, rowIndex: number, autoCommit: boolean, parentRowId: Object): Object; + + /** + * Deletes a row from the data source. + * + * @param rowId the record key - primaryKey (string) or index (number) + * @param autoCommit if autoCommit is true, the datasource will be updated automatically and the transaction is still stored in the accumulated transaction log + */ + deleteRow(rowId: Object, autoCommit: boolean): Object; + + /** + * Adds a new node to the tree data source. Creates a transaction that can be committed / rolled back + * + * @param data the transaction data + */ + addNode(data: Object): void; + + /** + * Removes a node from the tree data source. Creates a transaction that can be committed / rolled back + * + * @param data the transaction data + */ + removeNode(data: Object): void; + + /** + * Returns a standalone object (copy) that represents the commited transactions, but detached from the data source + * + * @param t a transaction object + */ + getDetachedRecord(t: Object): Object; + + /** + * Update the data source with every transaction from the log + * + * @param id Id of the transaction to commit. If no id is specified, will commit all transactions to the data source. + */ + commit(id?: number): void; + + /** + * Clears the transaction log without updating anything in the data source + * + * @param id Record Id to find transactions for. If no id is specified, will rollback all transactions to the data source. + */ + rollback(id?: Object): void; + + /** + * Returns a list of all transaction objects that are pending to be committed or rolled back to the data source + */ + pendingTransactions(): any[]; + + /** + * Returns a list of all transaction objects that are either pending, or have been committed in the data source. + */ + allTransactions(): any[]; + + /** + * Returns the accumulated transaction log as a string. The purpose of this is to be passed to URLs or used conveniently + */ + transactionsAsString(): string; + + /** + * Posts to the settings.updateUrl using $.ajax, by serializing the changes as url params + * + * @param success Specifies a custom function to be called when AJAX request to the updateUrl option succeeds(optional) + * @param error Specifies a custom function to be called when AJAX request to the updateUrl option fails(optional) + */ + saveChanges(success: Function, error: Function): void; + + /** + * Data binds to the current data source + * databinding works using the following workflow: + * 1. fire the databinding event + * 2. based on the data source type (see analyzeDataSource()), do the following: + * 3. if type is HtmlTable, parse the table and set the data and dataView respectively. + * if the type is Function, call it, apply Paging/Filtering/Sorting, and set this._dataView . If the developer wants to do his own paging, filtering or sorting + * in that case, then he should handle the PageIndexChanging and/or DataFiltering, and/or ColumnSorting client-side events, and cancel them. + * if no paging/sorting/filtering are enabled, use just this._data to save space + * if the data source is of type RemoteUrl, use jQuery's $.ajax API to trigger a remote request to the service. Use the param() API to encode the URL + * if the data source is invalid, throw an exception + * if the analyzed runtime data source type , that is, the result of analyzeDataSource(), is Unknown, check if + * the value of settings.type is set to XML or JSON. If string, eval for JSON, and parse for the XML to build the object tree + * 4. now normalize/transform the data, if a schema is supplied. This inplies any additional data type conversion + * 5. next, if OpType is Local, apply paging, sorting, and/or filtering to the data, and store the result in this._dataView + * 6. fire the databound event + * + * @param callback callback function + * @param callee callee object on which the callback will be executed. If none is specified, will assume global execution context + */ + dataBind(callback?: string, callee?: Object): void; + + /** + * Gets a cell value from the record by the specified fieldName. If there's a mapper defined for the field, the resolved by the mapper value will be returned. + * + * @param fieldName the fieldName - name of the field + * @param record the record from which to get it + */ + getCellValue(fieldName: string, record: Object): Object; + + /** + * Applicable only when the data source is bound to remote data. + * Gets or sets summaries data. + * If key or dsObj are not set then returns summaries data. + * Takes summary data from passed argument dsObj(using argument key) + * + * @param key response key to take summary data(for example "Metadata.Summaries") + * @param dsObj data source object - usually contains information about data records and metadata(holds info about summaries) + */ + summariesResponse(key?: string, dsObj?: Object): Object; + + /** + * Returns filtered data if local filtering is applied. If filtering is not applied OR type of filtering is remote returns undefined. + */ + filteredData(): any[]; + + /** + * Sorts the data source locally. The result (filtered data) can be obtained by calling dataView(). + * Remote filtering can be performed by just calling dataBind() and setting the settings.filtering.expressions + * multi-column sorting can be enabled by setting keepSortState to true. + * fields => an array of fields object definitions: + * example: [{fieldName : "firstName"}, {fieldName : "lastName"}] + * example 2: [{fieldIndex : 1} , {fieldIndex : 2}] + * + * @param fields an array of fields object definitions + * @param direction asc / desc direction + */ + sort(fields: Object, direction: string): void; + + /** + * This clears local sorting applied to the data view by resetting it to the original data and applying any paging + */ + clearLocalSorting(): void; + + /** + * Filters the data source locally. Remote filtering can be performed by just calling dataBind() and + * setting the settings.filtering.expressions. The result (filtered data) can be obtained by calling dataView() + * example: [{fieldName : "firstName", expr: "abc", cond: "StartsWith"}, {fieldName : "lastName"}] + * example 2: [{fieldIndex : 1} , {fieldIndex : 2, expr: "a", cond : "contains"}] + * expr is the filter expression text , such as "abc", or a regular expression such as *test* + * cond is the filtering condition such as startsWith, endsWith, contains, equals, doesNotEqual, doesNotContain + * if expr is detected to be a regular expression, the "cond" part is skipped + * + * @param fieldExpressions a list of field expression definitions + * @param boolLogic boolean logic. Accepted values are AND and OR. + * @param keepFilterState if keepFilterState is set to true, it will not discard previous filtering expressions + * @param fieldExpressionsOnStrings a list of field expression definitions (or a string with the conditions separated by AND/OR operator, example: "ID = 1 OR ID = 2"), which when applied will threat the related field as if it's string and can only apply conditions valid for string types. + */ + filter(fieldExpressions: Object, boolLogic: Object, keepFilterState: boolean, fieldExpressionsOnStrings: Object): void; + + /** + * This clears local filtering applied to the data view by resetting it to the original data and applying any paging + */ + clearLocalFilter(): void; + + /** + * Applicable only when the data source is bound to remote data. + * Gets / sets the total number of records in the data source. + * If data binding is remote, and there's paging or filtering enabled, + * the actual total number of records may not + * match the number of records that exists on the client + * + * @param count the total number of records + * @param key + * @param dsObj + * @param context + */ + totalRecordsCount(count?: number, key?: Object, dsObj?: Object, context?: Object): number; + + /** + * Gets / sets if the response from the server contains a property which specifies the total number of records in the server-side backend + * + * @param hasCount specifies if the data source contains a property that denotes the total number of records in the server-side backend + */ + hasTotalRecordsCount(hasCount: boolean): void; + + /** + * Returns metadata object for the specified key + * + * @param key Primary key of the record + */ + metadata(key: string): Object; + + /** + * Returns the total number of records in the local data source + */ + totalLocalRecordsCount(): number; + + /** + * Returns the total number of pages + */ + pageCount(): number; + + /** + * Gets /sets the current page index. If an index is passed as a parameter, the data source is re-bound. + * + * @param index the page index. If none is specified, returns the current page index. + */ + pageIndex(index?: number): number; + + /** + * Gets /sets the page index that should be persisted. For now ONLY when filtering is applied and call explicitly DataBind. + * + * @param value the page index that should be persisted. If none is specified, returns the current page index that should be persisted. + */ + persistedPageIndex(value?: number): number; + + /** + * Sets the page index to be equal to the previous page index and rebinds the data source + */ + prevPage(): void; + + /** + * Sets the page index to be equal to the next page index and rebinds the data source + */ + nextPage(): void; + + /** + * Gets /sets the page size and rebinds the data source if a parameter is specified. If no parameter is passed, returns the current page size + * + * @param s the page size. + */ + pageSize(s?: number): number; + + /** + * For internal use + * + * @param dirty + */ + pageSizeDirty(dirty: Object): void; + + /** + * Returns a list of records for the specified page. Implies that paging is enabled. + * + * @param p the page index for which records will be returned + */ + recordsForPage(p: number): void; + + /** + * Converts a HTML TABLE dom element to a JavaScript array of objects that contain the records data + * + * @param tableDOM TABLE dom element to transform + */ + tableToObject(tableDOM: Element): Object; + + /** + * Parses the string and returns an evaluated JSON object + * + * @param s the JSON as string. + */ + stringToJSONObject(s: string): void; + + /** + * Parses a string and returns a XML Document + * + * @param s the XML represented as a string + */ + stringToXmlObject(s: string): void; + + /** + * Returns collection of data and non-data(grouped) records. Flat representation of hierarchical data + */ + groupByData(): any[]; + + /** + * Returns collection of data and non-data(grouped) records. Returns only visible records(children of collapsed grouped records are not included in the collection) + */ + visibleGroupByData(): any[]; + + /** + * Returns the current normalized/transformed and paged/filtered/sorted group-by data + */ + groupByDataView(): any[]; + + /** + * Toggle grouped record with the specified id and updates collections visible groupby data and data view + * + * @param id data-id attribute of the respective group row in the DOM + * @param collapsed if true the record should be collapsed, otherwise expanded + */ + toggleGroupByRecord(id: string, collapsed: boolean): void; + + /** + * Check whether the specified gorupby record is collapsed + * + * @param gbRec id of the grouped record OR grouped record + */ + isGroupByRecordCollapsed(gbRec: Object): boolean; + + /** + * Check whether grouping is applied for the specified sorting expressions. + * + * @param exprs array of sorting expressions. If not set check expressions defined in sorting settings + */ + isGroupByApplied(exprs?: any[]): boolean; + } +} +interface IgniteUIStatic { +XmlDataSource: typeof Infragistics.XmlDataSource; +} + +declare namespace Infragistics { + class FunctionDataSource { + constructor(settings: DataSourceSettings); + + /** + * Sets a list of fields to the data source. If no parameter is specified, just returns the already existing list of fields + * + * @param fields a field has the following format: {key: 'fieldKey', dataType: 'string/number/date' } + */ + fields(fields?: Object): Object; + + /** + * Analyzes the dataSource setting to automatically determine the type of the data source. Returns the data source type. See settings.type + */ + analyzeDataSource(): string; + + /** + * Returns the current normalized/transformed and paged/filtered/sorted data, i.e. the dataView + */ + dataView(): any[]; + + /** + * Returns all of the bound data, without taking into account local paging, sorting, filtering, etc. + */ + data(): Object; + + /** + * Returns transformed data according to transformed execution: + * 1. Before paging and filtering + * 2. After filtering before paging + * 3. After filtering and paging + * + * @param transformedExecution + */ + transformedData(transformedExecution: Object): Object; + + /** + * Returns summaries data + */ + dataSummaries(): Object; + + /** + * Gets/sets the schema definition. + * + * @param s a schema object + * @param t type of the data source. See settings.type + */ + schema(s?: Object, t?: string): void; + + /** + * Gets/sets a list of paging settings + * + * @param p object holding all paging settings. See settings.paging + */ + pagingSettings(p?: Object): Object; + + /** + * Gets/sets a list of filtering settings + * + * @param f object holding all filtering settings. See settings.filtering + */ + filterSettings(f?: Object): void; + + /** + * Gets/sets a list of paging settings + * + * @param s object holding all sorting settings. See settings.sorting + */ + sortSettings(s?: Object): Object; + + /** + * Gets/sets a list of summaries settings. + * + * @param s object holding all summaries settings. See settings.summaries + */ + summariesSettings(s?: Object): void; + + /** + * Gets/sets the dataSource setting. If no parameter is specified, returns settings.dataSource + * + * @param ds + */ + dataSource(ds?: Object): Object; + + /** + * Gets/sets the type of the dataSource. If no parameter is specified, returns settings.type + * + * @param t + * @return json|xml|unknown|array|function|htmlTableString|htmlTableId|htmlTableDom|invalid|remoteUrl|empty + */ + type(t?: Object): string; + + /** + * Returns a record by a specified key (requires that primaryKey is set in the settings) + * + * @param key Primary key of the record + * @param ds the data source in which to search for the record. When not set it will use the current data source. + * @param objPath Not used in $.ig.DataSource + */ + findRecordByKey(key: string, ds?: string, objPath?: string): Object; + + /** + * Removes a specific record denoted by the primaryKey of the passed key parameter from the data source + * + * @param key primary key of the record + * @param origDs + */ + removeRecordByKey(key: Object, origDs: Object): void; + + /** + * Removes a record from the data source at specific index. + * + * @param index index of record + * @param origDs + */ + removeRecordByIndex(index: number, origDs: Object): void; + + /** + * Sets a cell value for the cell denoted by rowId and colId. Creates a transaction for the update operation and returns it + * + * @param rowId the rowId - row key (string) or index (number) + * @param colId the column id - column key (string) or index (number) + * @param val The new value + * @param autoCommit if autoCommit is true, it updates the datasource automatically and the transaction is still stored in the accumulated transaction log + */ + setCellValue(rowId: Object, colId: Object, val: Object, autoCommit: boolean): Object; + + /** + * Updates a record in the datasource. Creates a transaction that can be committed / rolled back + * + * @param rowId the record key - primaryKey (string) or index (number) + * @param rowObject the record object containing the key/value pairs we want to update. It doesn't have to include key/value pairs for all fields defined in the schema or in the data source (if no schema is defined) + * @param autoCommit if autoCommit is true, the datasource will be updated automatically and the transaction is still stored in the accumulated transaction log + */ + updateRow(rowId: Object, rowObject: Object, autoCommit: boolean): Object; + + /** + * Adds a new row to the data source. Creates a transaction that can be committed / rolled back + * + * @param rowId the record key - primaryKey (string) or index (number) + * @param rowObject the new record data. + * @param autoCommit if autoCommit is true, the datasource will be updated automatically and the transaction is still stored in the accumulated transaction log + */ + addRow(rowId: Object, rowObject: Object, autoCommit: boolean): Object; + + /** + * Adds a new row to the data source. Creates a transaction that can be committed / rolled back + * + * @param rowId the record key - primaryKey (string) or index (number) + * @param rowObject the new record data. + * @param rowIndex row index at which to insert the new row + * @param autoCommit if autoCommit is true, the datasource will be updated automatically and the transaction is still stored in the accumulated transaction log + * @param parentRowId Not used in $.ig.DataSource + */ + insertRow(rowId: Object, rowObject: Object, rowIndex: number, autoCommit: boolean, parentRowId: Object): Object; + + /** + * Deletes a row from the data source. + * + * @param rowId the record key - primaryKey (string) or index (number) + * @param autoCommit if autoCommit is true, the datasource will be updated automatically and the transaction is still stored in the accumulated transaction log + */ + deleteRow(rowId: Object, autoCommit: boolean): Object; + + /** + * Adds a new node to the tree data source. Creates a transaction that can be committed / rolled back + * + * @param data the transaction data + */ + addNode(data: Object): void; + + /** + * Removes a node from the tree data source. Creates a transaction that can be committed / rolled back + * + * @param data the transaction data + */ + removeNode(data: Object): void; + + /** + * Returns a standalone object (copy) that represents the commited transactions, but detached from the data source + * + * @param t a transaction object + */ + getDetachedRecord(t: Object): Object; + + /** + * Update the data source with every transaction from the log + * + * @param id Id of the transaction to commit. If no id is specified, will commit all transactions to the data source. + */ + commit(id?: number): void; + + /** + * Clears the transaction log without updating anything in the data source + * + * @param id Record Id to find transactions for. If no id is specified, will rollback all transactions to the data source. + */ + rollback(id?: Object): void; + + /** + * Returns a list of all transaction objects that are pending to be committed or rolled back to the data source + */ + pendingTransactions(): any[]; + + /** + * Returns a list of all transaction objects that are either pending, or have been committed in the data source. + */ + allTransactions(): any[]; + + /** + * Returns the accumulated transaction log as a string. The purpose of this is to be passed to URLs or used conveniently + */ + transactionsAsString(): string; + + /** + * Posts to the settings.updateUrl using $.ajax, by serializing the changes as url params + * + * @param success Specifies a custom function to be called when AJAX request to the updateUrl option succeeds(optional) + * @param error Specifies a custom function to be called when AJAX request to the updateUrl option fails(optional) + */ + saveChanges(success: Function, error: Function): void; + + /** + * Data binds to the current data source + * databinding works using the following workflow: + * 1. fire the databinding event + * 2. based on the data source type (see analyzeDataSource()), do the following: + * 3. if type is HtmlTable, parse the table and set the data and dataView respectively. + * if the type is Function, call it, apply Paging/Filtering/Sorting, and set this._dataView . If the developer wants to do his own paging, filtering or sorting + * in that case, then he should handle the PageIndexChanging and/or DataFiltering, and/or ColumnSorting client-side events, and cancel them. + * if no paging/sorting/filtering are enabled, use just this._data to save space + * if the data source is of type RemoteUrl, use jQuery's $.ajax API to trigger a remote request to the service. Use the param() API to encode the URL + * if the data source is invalid, throw an exception + * if the analyzed runtime data source type , that is, the result of analyzeDataSource(), is Unknown, check if + * the value of settings.type is set to XML or JSON. If string, eval for JSON, and parse for the XML to build the object tree + * 4. now normalize/transform the data, if a schema is supplied. This inplies any additional data type conversion + * 5. next, if OpType is Local, apply paging, sorting, and/or filtering to the data, and store the result in this._dataView + * 6. fire the databound event + * + * @param callback callback function + * @param callee callee object on which the callback will be executed. If none is specified, will assume global execution context + */ + dataBind(callback?: string, callee?: Object): void; + + /** + * Gets a cell value from the record by the specified fieldName. If there's a mapper defined for the field, the resolved by the mapper value will be returned. + * + * @param fieldName the fieldName - name of the field + * @param record the record from which to get it + */ + getCellValue(fieldName: string, record: Object): Object; + + /** + * Applicable only when the data source is bound to remote data. + * Gets or sets summaries data. + * If key or dsObj are not set then returns summaries data. + * Takes summary data from passed argument dsObj(using argument key) + * + * @param key response key to take summary data(for example "Metadata.Summaries") + * @param dsObj data source object - usually contains information about data records and metadata(holds info about summaries) + */ + summariesResponse(key?: string, dsObj?: Object): Object; + + /** + * Returns filtered data if local filtering is applied. If filtering is not applied OR type of filtering is remote returns undefined. + */ + filteredData(): any[]; + + /** + * Sorts the data source locally. The result (filtered data) can be obtained by calling dataView(). + * Remote filtering can be performed by just calling dataBind() and setting the settings.filtering.expressions + * multi-column sorting can be enabled by setting keepSortState to true. + * fields => an array of fields object definitions: + * example: [{fieldName : "firstName"}, {fieldName : "lastName"}] + * example 2: [{fieldIndex : 1} , {fieldIndex : 2}] + * + * @param fields an array of fields object definitions + * @param direction asc / desc direction + */ + sort(fields: Object, direction: string): void; + + /** + * This clears local sorting applied to the data view by resetting it to the original data and applying any paging + */ + clearLocalSorting(): void; + + /** + * Filters the data source locally. Remote filtering can be performed by just calling dataBind() and + * setting the settings.filtering.expressions. The result (filtered data) can be obtained by calling dataView() + * example: [{fieldName : "firstName", expr: "abc", cond: "StartsWith"}, {fieldName : "lastName"}] + * example 2: [{fieldIndex : 1} , {fieldIndex : 2, expr: "a", cond : "contains"}] + * expr is the filter expression text , such as "abc", or a regular expression such as *test* + * cond is the filtering condition such as startsWith, endsWith, contains, equals, doesNotEqual, doesNotContain + * if expr is detected to be a regular expression, the "cond" part is skipped + * + * @param fieldExpressions a list of field expression definitions + * @param boolLogic boolean logic. Accepted values are AND and OR. + * @param keepFilterState if keepFilterState is set to true, it will not discard previous filtering expressions + * @param fieldExpressionsOnStrings a list of field expression definitions (or a string with the conditions separated by AND/OR operator, example: "ID = 1 OR ID = 2"), which when applied will threat the related field as if it's string and can only apply conditions valid for string types. + */ + filter(fieldExpressions: Object, boolLogic: Object, keepFilterState: boolean, fieldExpressionsOnStrings: Object): void; + + /** + * This clears local filtering applied to the data view by resetting it to the original data and applying any paging + */ + clearLocalFilter(): void; + + /** + * Applicable only when the data source is bound to remote data. + * Gets / sets the total number of records in the data source. + * If data binding is remote, and there's paging or filtering enabled, + * the actual total number of records may not + * match the number of records that exists on the client + * + * @param count the total number of records + * @param key + * @param dsObj + * @param context + */ + totalRecordsCount(count?: number, key?: Object, dsObj?: Object, context?: Object): number; + + /** + * Gets / sets if the response from the server contains a property which specifies the total number of records in the server-side backend + * + * @param hasCount specifies if the data source contains a property that denotes the total number of records in the server-side backend + */ + hasTotalRecordsCount(hasCount: boolean): void; + + /** + * Returns metadata object for the specified key + * + * @param key Primary key of the record + */ + metadata(key: string): Object; + + /** + * Returns the total number of records in the local data source + */ + totalLocalRecordsCount(): number; + + /** + * Returns the total number of pages + */ + pageCount(): number; + + /** + * Gets /sets the current page index. If an index is passed as a parameter, the data source is re-bound. + * + * @param index the page index. If none is specified, returns the current page index. + */ + pageIndex(index?: number): number; + + /** + * Gets /sets the page index that should be persisted. For now ONLY when filtering is applied and call explicitly DataBind. + * + * @param value the page index that should be persisted. If none is specified, returns the current page index that should be persisted. + */ + persistedPageIndex(value?: number): number; + + /** + * Sets the page index to be equal to the previous page index and rebinds the data source + */ + prevPage(): void; + + /** + * Sets the page index to be equal to the next page index and rebinds the data source + */ + nextPage(): void; + + /** + * Gets /sets the page size and rebinds the data source if a parameter is specified. If no parameter is passed, returns the current page size + * + * @param s the page size. + */ + pageSize(s?: number): number; + + /** + * For internal use + * + * @param dirty + */ + pageSizeDirty(dirty: Object): void; + + /** + * Returns a list of records for the specified page. Implies that paging is enabled. + * + * @param p the page index for which records will be returned + */ + recordsForPage(p: number): void; + + /** + * Converts a HTML TABLE dom element to a JavaScript array of objects that contain the records data + * + * @param tableDOM TABLE dom element to transform + */ + tableToObject(tableDOM: Element): Object; + + /** + * Parses the string and returns an evaluated JSON object + * + * @param s the JSON as string. + */ + stringToJSONObject(s: string): void; + + /** + * Parses a string and returns a XML Document + * + * @param s the XML represented as a string + */ + stringToXmlObject(s: string): void; + + /** + * Returns collection of data and non-data(grouped) records. Flat representation of hierarchical data + */ + groupByData(): any[]; + + /** + * Returns collection of data and non-data(grouped) records. Returns only visible records(children of collapsed grouped records are not included in the collection) + */ + visibleGroupByData(): any[]; + + /** + * Returns the current normalized/transformed and paged/filtered/sorted group-by data + */ + groupByDataView(): any[]; + + /** + * Toggle grouped record with the specified id and updates collections visible groupby data and data view + * + * @param id data-id attribute of the respective group row in the DOM + * @param collapsed if true the record should be collapsed, otherwise expanded + */ + toggleGroupByRecord(id: string, collapsed: boolean): void; + + /** + * Check whether the specified gorupby record is collapsed + * + * @param gbRec id of the grouped record OR grouped record + */ + isGroupByRecordCollapsed(gbRec: Object): boolean; + + /** + * Check whether grouping is applied for the specified sorting expressions. + * + * @param exprs array of sorting expressions. If not set check expressions defined in sorting settings + */ + isGroupByApplied(exprs?: any[]): boolean; + } +} +interface IgniteUIStatic { +FunctionDataSource: typeof Infragistics.FunctionDataSource; +} + +declare namespace Infragistics { + class HtmlTableDataSource { + constructor(settings: DataSourceSettings); + + /** + * Sets a list of fields to the data source. If no parameter is specified, just returns the already existing list of fields + * + * @param fields a field has the following format: {key: 'fieldKey', dataType: 'string/number/date' } + */ + fields(fields?: Object): Object; + + /** + * Analyzes the dataSource setting to automatically determine the type of the data source. Returns the data source type. See settings.type + */ + analyzeDataSource(): string; + + /** + * Returns the current normalized/transformed and paged/filtered/sorted data, i.e. the dataView + */ + dataView(): any[]; + + /** + * Returns all of the bound data, without taking into account local paging, sorting, filtering, etc. + */ + data(): Object; + + /** + * Returns transformed data according to transformed execution: + * 1. Before paging and filtering + * 2. After filtering before paging + * 3. After filtering and paging + * + * @param transformedExecution + */ + transformedData(transformedExecution: Object): Object; + + /** + * Returns summaries data + */ + dataSummaries(): Object; + + /** + * Gets/sets the schema definition. + * + * @param s a schema object + * @param t type of the data source. See settings.type + */ + schema(s?: Object, t?: string): void; + + /** + * Gets/sets a list of paging settings + * + * @param p object holding all paging settings. See settings.paging + */ + pagingSettings(p?: Object): Object; + + /** + * Gets/sets a list of filtering settings + * + * @param f object holding all filtering settings. See settings.filtering + */ + filterSettings(f?: Object): void; + + /** + * Gets/sets a list of paging settings + * + * @param s object holding all sorting settings. See settings.sorting + */ + sortSettings(s?: Object): Object; + + /** + * Gets/sets a list of summaries settings. + * + * @param s object holding all summaries settings. See settings.summaries + */ + summariesSettings(s?: Object): void; + + /** + * Gets/sets the dataSource setting. If no parameter is specified, returns settings.dataSource + * + * @param ds + */ + dataSource(ds?: Object): Object; + + /** + * Gets/sets the type of the dataSource. If no parameter is specified, returns settings.type + * + * @param t + * @return json|xml|unknown|array|function|htmlTableString|htmlTableId|htmlTableDom|invalid|remoteUrl|empty + */ + type(t?: Object): string; + + /** + * Returns a record by a specified key (requires that primaryKey is set in the settings) + * + * @param key Primary key of the record + * @param ds the data source in which to search for the record. When not set it will use the current data source. + * @param objPath Not used in $.ig.DataSource + */ + findRecordByKey(key: string, ds?: string, objPath?: string): Object; + + /** + * Removes a specific record denoted by the primaryKey of the passed key parameter from the data source + * + * @param key primary key of the record + * @param origDs + */ + removeRecordByKey(key: Object, origDs: Object): void; + + /** + * Removes a record from the data source at specific index. + * + * @param index index of record + * @param origDs + */ + removeRecordByIndex(index: number, origDs: Object): void; + + /** + * Sets a cell value for the cell denoted by rowId and colId. Creates a transaction for the update operation and returns it + * + * @param rowId the rowId - row key (string) or index (number) + * @param colId the column id - column key (string) or index (number) + * @param val The new value + * @param autoCommit if autoCommit is true, it updates the datasource automatically and the transaction is still stored in the accumulated transaction log + */ + setCellValue(rowId: Object, colId: Object, val: Object, autoCommit: boolean): Object; + + /** + * Updates a record in the datasource. Creates a transaction that can be committed / rolled back + * + * @param rowId the record key - primaryKey (string) or index (number) + * @param rowObject the record object containing the key/value pairs we want to update. It doesn't have to include key/value pairs for all fields defined in the schema or in the data source (if no schema is defined) + * @param autoCommit if autoCommit is true, the datasource will be updated automatically and the transaction is still stored in the accumulated transaction log + */ + updateRow(rowId: Object, rowObject: Object, autoCommit: boolean): Object; + + /** + * Adds a new row to the data source. Creates a transaction that can be committed / rolled back + * + * @param rowId the record key - primaryKey (string) or index (number) + * @param rowObject the new record data. + * @param autoCommit if autoCommit is true, the datasource will be updated automatically and the transaction is still stored in the accumulated transaction log + */ + addRow(rowId: Object, rowObject: Object, autoCommit: boolean): Object; + + /** + * Adds a new row to the data source. Creates a transaction that can be committed / rolled back + * + * @param rowId the record key - primaryKey (string) or index (number) + * @param rowObject the new record data. + * @param rowIndex row index at which to insert the new row + * @param autoCommit if autoCommit is true, the datasource will be updated automatically and the transaction is still stored in the accumulated transaction log + * @param parentRowId Not used in $.ig.DataSource + */ + insertRow(rowId: Object, rowObject: Object, rowIndex: number, autoCommit: boolean, parentRowId: Object): Object; + + /** + * Deletes a row from the data source. + * + * @param rowId the record key - primaryKey (string) or index (number) + * @param autoCommit if autoCommit is true, the datasource will be updated automatically and the transaction is still stored in the accumulated transaction log + */ + deleteRow(rowId: Object, autoCommit: boolean): Object; + + /** + * Adds a new node to the tree data source. Creates a transaction that can be committed / rolled back + * + * @param data the transaction data + */ + addNode(data: Object): void; + + /** + * Removes a node from the tree data source. Creates a transaction that can be committed / rolled back + * + * @param data the transaction data + */ + removeNode(data: Object): void; + + /** + * Returns a standalone object (copy) that represents the commited transactions, but detached from the data source + * + * @param t a transaction object + */ + getDetachedRecord(t: Object): Object; + + /** + * Update the data source with every transaction from the log + * + * @param id Id of the transaction to commit. If no id is specified, will commit all transactions to the data source. + */ + commit(id?: number): void; + + /** + * Clears the transaction log without updating anything in the data source + * + * @param id Record Id to find transactions for. If no id is specified, will rollback all transactions to the data source. + */ + rollback(id?: Object): void; + + /** + * Returns a list of all transaction objects that are pending to be committed or rolled back to the data source + */ + pendingTransactions(): any[]; + + /** + * Returns a list of all transaction objects that are either pending, or have been committed in the data source. + */ + allTransactions(): any[]; + + /** + * Returns the accumulated transaction log as a string. The purpose of this is to be passed to URLs or used conveniently + */ + transactionsAsString(): string; + + /** + * Posts to the settings.updateUrl using $.ajax, by serializing the changes as url params + * + * @param success Specifies a custom function to be called when AJAX request to the updateUrl option succeeds(optional) + * @param error Specifies a custom function to be called when AJAX request to the updateUrl option fails(optional) + */ + saveChanges(success: Function, error: Function): void; + + /** + * Data binds to the current data source + * databinding works using the following workflow: + * 1. fire the databinding event + * 2. based on the data source type (see analyzeDataSource()), do the following: + * 3. if type is HtmlTable, parse the table and set the data and dataView respectively. + * if the type is Function, call it, apply Paging/Filtering/Sorting, and set this._dataView . If the developer wants to do his own paging, filtering or sorting + * in that case, then he should handle the PageIndexChanging and/or DataFiltering, and/or ColumnSorting client-side events, and cancel them. + * if no paging/sorting/filtering are enabled, use just this._data to save space + * if the data source is of type RemoteUrl, use jQuery's $.ajax API to trigger a remote request to the service. Use the param() API to encode the URL + * if the data source is invalid, throw an exception + * if the analyzed runtime data source type , that is, the result of analyzeDataSource(), is Unknown, check if + * the value of settings.type is set to XML or JSON. If string, eval for JSON, and parse for the XML to build the object tree + * 4. now normalize/transform the data, if a schema is supplied. This inplies any additional data type conversion + * 5. next, if OpType is Local, apply paging, sorting, and/or filtering to the data, and store the result in this._dataView + * 6. fire the databound event + * + * @param callback callback function + * @param callee callee object on which the callback will be executed. If none is specified, will assume global execution context + */ + dataBind(callback?: string, callee?: Object): void; + + /** + * Gets a cell value from the record by the specified fieldName. If there's a mapper defined for the field, the resolved by the mapper value will be returned. + * + * @param fieldName the fieldName - name of the field + * @param record the record from which to get it + */ + getCellValue(fieldName: string, record: Object): Object; + + /** + * Applicable only when the data source is bound to remote data. + * Gets or sets summaries data. + * If key or dsObj are not set then returns summaries data. + * Takes summary data from passed argument dsObj(using argument key) + * + * @param key response key to take summary data(for example "Metadata.Summaries") + * @param dsObj data source object - usually contains information about data records and metadata(holds info about summaries) + */ + summariesResponse(key?: string, dsObj?: Object): Object; + + /** + * Returns filtered data if local filtering is applied. If filtering is not applied OR type of filtering is remote returns undefined. + */ + filteredData(): any[]; + + /** + * Sorts the data source locally. The result (filtered data) can be obtained by calling dataView(). + * Remote filtering can be performed by just calling dataBind() and setting the settings.filtering.expressions + * multi-column sorting can be enabled by setting keepSortState to true. + * fields => an array of fields object definitions: + * example: [{fieldName : "firstName"}, {fieldName : "lastName"}] + * example 2: [{fieldIndex : 1} , {fieldIndex : 2}] + * + * @param fields an array of fields object definitions + * @param direction asc / desc direction + */ + sort(fields: Object, direction: string): void; + + /** + * This clears local sorting applied to the data view by resetting it to the original data and applying any paging + */ + clearLocalSorting(): void; + + /** + * Filters the data source locally. Remote filtering can be performed by just calling dataBind() and + * setting the settings.filtering.expressions. The result (filtered data) can be obtained by calling dataView() + * example: [{fieldName : "firstName", expr: "abc", cond: "StartsWith"}, {fieldName : "lastName"}] + * example 2: [{fieldIndex : 1} , {fieldIndex : 2, expr: "a", cond : "contains"}] + * expr is the filter expression text , such as "abc", or a regular expression such as *test* + * cond is the filtering condition such as startsWith, endsWith, contains, equals, doesNotEqual, doesNotContain + * if expr is detected to be a regular expression, the "cond" part is skipped + * + * @param fieldExpressions a list of field expression definitions + * @param boolLogic boolean logic. Accepted values are AND and OR. + * @param keepFilterState if keepFilterState is set to true, it will not discard previous filtering expressions + * @param fieldExpressionsOnStrings a list of field expression definitions (or a string with the conditions separated by AND/OR operator, example: "ID = 1 OR ID = 2"), which when applied will threat the related field as if it's string and can only apply conditions valid for string types. + */ + filter(fieldExpressions: Object, boolLogic: Object, keepFilterState: boolean, fieldExpressionsOnStrings: Object): void; + + /** + * This clears local filtering applied to the data view by resetting it to the original data and applying any paging + */ + clearLocalFilter(): void; + + /** + * Applicable only when the data source is bound to remote data. + * Gets / sets the total number of records in the data source. + * If data binding is remote, and there's paging or filtering enabled, + * the actual total number of records may not + * match the number of records that exists on the client + * + * @param count the total number of records + * @param key + * @param dsObj + * @param context + */ + totalRecordsCount(count?: number, key?: Object, dsObj?: Object, context?: Object): number; + + /** + * Gets / sets if the response from the server contains a property which specifies the total number of records in the server-side backend + * + * @param hasCount specifies if the data source contains a property that denotes the total number of records in the server-side backend + */ + hasTotalRecordsCount(hasCount: boolean): void; + + /** + * Returns metadata object for the specified key + * + * @param key Primary key of the record + */ + metadata(key: string): Object; + + /** + * Returns the total number of records in the local data source + */ + totalLocalRecordsCount(): number; + + /** + * Returns the total number of pages + */ + pageCount(): number; + + /** + * Gets /sets the current page index. If an index is passed as a parameter, the data source is re-bound. + * + * @param index the page index. If none is specified, returns the current page index. + */ + pageIndex(index?: number): number; + + /** + * Gets /sets the page index that should be persisted. For now ONLY when filtering is applied and call explicitly DataBind. + * + * @param value the page index that should be persisted. If none is specified, returns the current page index that should be persisted. + */ + persistedPageIndex(value?: number): number; + + /** + * Sets the page index to be equal to the previous page index and rebinds the data source + */ + prevPage(): void; + + /** + * Sets the page index to be equal to the next page index and rebinds the data source + */ + nextPage(): void; + + /** + * Gets /sets the page size and rebinds the data source if a parameter is specified. If no parameter is passed, returns the current page size + * + * @param s the page size. + */ + pageSize(s?: number): number; + + /** + * For internal use + * + * @param dirty + */ + pageSizeDirty(dirty: Object): void; + + /** + * Returns a list of records for the specified page. Implies that paging is enabled. + * + * @param p the page index for which records will be returned + */ + recordsForPage(p: number): void; + + /** + * Converts a HTML TABLE dom element to a JavaScript array of objects that contain the records data + * + * @param tableDOM TABLE dom element to transform + */ + tableToObject(tableDOM: Element): Object; + + /** + * Parses the string and returns an evaluated JSON object + * + * @param s the JSON as string. + */ + stringToJSONObject(s: string): void; + + /** + * Parses a string and returns a XML Document + * + * @param s the XML represented as a string + */ + stringToXmlObject(s: string): void; + + /** + * Returns collection of data and non-data(grouped) records. Flat representation of hierarchical data + */ + groupByData(): any[]; + + /** + * Returns collection of data and non-data(grouped) records. Returns only visible records(children of collapsed grouped records are not included in the collection) + */ + visibleGroupByData(): any[]; + + /** + * Returns the current normalized/transformed and paged/filtered/sorted group-by data + */ + groupByDataView(): any[]; + + /** + * Toggle grouped record with the specified id and updates collections visible groupby data and data view + * + * @param id data-id attribute of the respective group row in the DOM + * @param collapsed if true the record should be collapsed, otherwise expanded + */ + toggleGroupByRecord(id: string, collapsed: boolean): void; + + /** + * Check whether the specified gorupby record is collapsed + * + * @param gbRec id of the grouped record OR grouped record + */ + isGroupByRecordCollapsed(gbRec: Object): boolean; + + /** + * Check whether grouping is applied for the specified sorting expressions. + * + * @param exprs array of sorting expressions. If not set check expressions defined in sorting settings + */ + isGroupByApplied(exprs?: any[]): boolean; + } +} +interface IgniteUIStatic { +HtmlTableDataSource: typeof Infragistics.HtmlTableDataSource; +} + +declare namespace Infragistics { + class ArrayDataSource { + constructor(settings: DataSourceSettings); + + /** + * Sets a list of fields to the data source. If no parameter is specified, just returns the already existing list of fields + * + * @param fields a field has the following format: {key: 'fieldKey', dataType: 'string/number/date' } + */ + fields(fields?: Object): Object; + + /** + * Analyzes the dataSource setting to automatically determine the type of the data source. Returns the data source type. See settings.type + */ + analyzeDataSource(): string; + + /** + * Returns the current normalized/transformed and paged/filtered/sorted data, i.e. the dataView + */ + dataView(): any[]; + + /** + * Returns all of the bound data, without taking into account local paging, sorting, filtering, etc. + */ + data(): Object; + + /** + * Returns transformed data according to transformed execution: + * 1. Before paging and filtering + * 2. After filtering before paging + * 3. After filtering and paging + * + * @param transformedExecution + */ + transformedData(transformedExecution: Object): Object; + + /** + * Returns summaries data + */ + dataSummaries(): Object; + + /** + * Gets/sets the schema definition. + * + * @param s a schema object + * @param t type of the data source. See settings.type + */ + schema(s?: Object, t?: string): void; + + /** + * Gets/sets a list of paging settings + * + * @param p object holding all paging settings. See settings.paging + */ + pagingSettings(p?: Object): Object; + + /** + * Gets/sets a list of filtering settings + * + * @param f object holding all filtering settings. See settings.filtering + */ + filterSettings(f?: Object): void; + + /** + * Gets/sets a list of paging settings + * + * @param s object holding all sorting settings. See settings.sorting + */ + sortSettings(s?: Object): Object; + + /** + * Gets/sets a list of summaries settings. + * + * @param s object holding all summaries settings. See settings.summaries + */ + summariesSettings(s?: Object): void; + + /** + * Gets/sets the dataSource setting. If no parameter is specified, returns settings.dataSource + * + * @param ds + */ + dataSource(ds?: Object): Object; + + /** + * Gets/sets the type of the dataSource. If no parameter is specified, returns settings.type + * + * @param t + * @return json|xml|unknown|array|function|htmlTableString|htmlTableId|htmlTableDom|invalid|remoteUrl|empty + */ + type(t?: Object): string; + + /** + * Returns a record by a specified key (requires that primaryKey is set in the settings) + * + * @param key Primary key of the record + * @param ds the data source in which to search for the record. When not set it will use the current data source. + * @param objPath Not used in $.ig.DataSource + */ + findRecordByKey(key: string, ds?: string, objPath?: string): Object; + + /** + * Removes a specific record denoted by the primaryKey of the passed key parameter from the data source + * + * @param key primary key of the record + * @param origDs + */ + removeRecordByKey(key: Object, origDs: Object): void; + + /** + * Removes a record from the data source at specific index. + * + * @param index index of record + * @param origDs + */ + removeRecordByIndex(index: number, origDs: Object): void; + + /** + * Sets a cell value for the cell denoted by rowId and colId. Creates a transaction for the update operation and returns it + * + * @param rowId the rowId - row key (string) or index (number) + * @param colId the column id - column key (string) or index (number) + * @param val The new value + * @param autoCommit if autoCommit is true, it updates the datasource automatically and the transaction is still stored in the accumulated transaction log + */ + setCellValue(rowId: Object, colId: Object, val: Object, autoCommit: boolean): Object; + + /** + * Updates a record in the datasource. Creates a transaction that can be committed / rolled back + * + * @param rowId the record key - primaryKey (string) or index (number) + * @param rowObject the record object containing the key/value pairs we want to update. It doesn't have to include key/value pairs for all fields defined in the schema or in the data source (if no schema is defined) + * @param autoCommit if autoCommit is true, the datasource will be updated automatically and the transaction is still stored in the accumulated transaction log + */ + updateRow(rowId: Object, rowObject: Object, autoCommit: boolean): Object; + + /** + * Adds a new row to the data source. Creates a transaction that can be committed / rolled back + * + * @param rowId the record key - primaryKey (string) or index (number) + * @param rowObject the new record data. + * @param autoCommit if autoCommit is true, the datasource will be updated automatically and the transaction is still stored in the accumulated transaction log + */ + addRow(rowId: Object, rowObject: Object, autoCommit: boolean): Object; + + /** + * Adds a new row to the data source. Creates a transaction that can be committed / rolled back + * + * @param rowId the record key - primaryKey (string) or index (number) + * @param rowObject the new record data. + * @param rowIndex row index at which to insert the new row + * @param autoCommit if autoCommit is true, the datasource will be updated automatically and the transaction is still stored in the accumulated transaction log + * @param parentRowId Not used in $.ig.DataSource + */ + insertRow(rowId: Object, rowObject: Object, rowIndex: number, autoCommit: boolean, parentRowId: Object): Object; + + /** + * Deletes a row from the data source. + * + * @param rowId the record key - primaryKey (string) or index (number) + * @param autoCommit if autoCommit is true, the datasource will be updated automatically and the transaction is still stored in the accumulated transaction log + */ + deleteRow(rowId: Object, autoCommit: boolean): Object; + + /** + * Adds a new node to the tree data source. Creates a transaction that can be committed / rolled back + * + * @param data the transaction data + */ + addNode(data: Object): void; + + /** + * Removes a node from the tree data source. Creates a transaction that can be committed / rolled back + * + * @param data the transaction data + */ + removeNode(data: Object): void; + + /** + * Returns a standalone object (copy) that represents the commited transactions, but detached from the data source + * + * @param t a transaction object + */ + getDetachedRecord(t: Object): Object; + + /** + * Update the data source with every transaction from the log + * + * @param id Id of the transaction to commit. If no id is specified, will commit all transactions to the data source. + */ + commit(id?: number): void; + + /** + * Clears the transaction log without updating anything in the data source + * + * @param id Record Id to find transactions for. If no id is specified, will rollback all transactions to the data source. + */ + rollback(id?: Object): void; + + /** + * Returns a list of all transaction objects that are pending to be committed or rolled back to the data source + */ + pendingTransactions(): any[]; + + /** + * Returns a list of all transaction objects that are either pending, or have been committed in the data source. + */ + allTransactions(): any[]; + + /** + * Returns the accumulated transaction log as a string. The purpose of this is to be passed to URLs or used conveniently + */ + transactionsAsString(): string; + + /** + * Posts to the settings.updateUrl using $.ajax, by serializing the changes as url params + * + * @param success Specifies a custom function to be called when AJAX request to the updateUrl option succeeds(optional) + * @param error Specifies a custom function to be called when AJAX request to the updateUrl option fails(optional) + */ + saveChanges(success: Function, error: Function): void; + + /** + * Data binds to the current data source + * databinding works using the following workflow: + * 1. fire the databinding event + * 2. based on the data source type (see analyzeDataSource()), do the following: + * 3. if type is HtmlTable, parse the table and set the data and dataView respectively. + * if the type is Function, call it, apply Paging/Filtering/Sorting, and set this._dataView . If the developer wants to do his own paging, filtering or sorting + * in that case, then he should handle the PageIndexChanging and/or DataFiltering, and/or ColumnSorting client-side events, and cancel them. + * if no paging/sorting/filtering are enabled, use just this._data to save space + * if the data source is of type RemoteUrl, use jQuery's $.ajax API to trigger a remote request to the service. Use the param() API to encode the URL + * if the data source is invalid, throw an exception + * if the analyzed runtime data source type , that is, the result of analyzeDataSource(), is Unknown, check if + * the value of settings.type is set to XML or JSON. If string, eval for JSON, and parse for the XML to build the object tree + * 4. now normalize/transform the data, if a schema is supplied. This inplies any additional data type conversion + * 5. next, if OpType is Local, apply paging, sorting, and/or filtering to the data, and store the result in this._dataView + * 6. fire the databound event + * + * @param callback callback function + * @param callee callee object on which the callback will be executed. If none is specified, will assume global execution context + */ + dataBind(callback?: string, callee?: Object): void; + + /** + * Gets a cell value from the record by the specified fieldName. If there's a mapper defined for the field, the resolved by the mapper value will be returned. + * + * @param fieldName the fieldName - name of the field + * @param record the record from which to get it + */ + getCellValue(fieldName: string, record: Object): Object; + + /** + * Applicable only when the data source is bound to remote data. + * Gets or sets summaries data. + * If key or dsObj are not set then returns summaries data. + * Takes summary data from passed argument dsObj(using argument key) + * + * @param key response key to take summary data(for example "Metadata.Summaries") + * @param dsObj data source object - usually contains information about data records and metadata(holds info about summaries) + */ + summariesResponse(key?: string, dsObj?: Object): Object; + + /** + * Returns filtered data if local filtering is applied. If filtering is not applied OR type of filtering is remote returns undefined. + */ + filteredData(): any[]; + + /** + * Sorts the data source locally. The result (filtered data) can be obtained by calling dataView(). + * Remote filtering can be performed by just calling dataBind() and setting the settings.filtering.expressions + * multi-column sorting can be enabled by setting keepSortState to true. + * fields => an array of fields object definitions: + * example: [{fieldName : "firstName"}, {fieldName : "lastName"}] + * example 2: [{fieldIndex : 1} , {fieldIndex : 2}] + * + * @param fields an array of fields object definitions + * @param direction asc / desc direction + */ + sort(fields: Object, direction: string): void; + + /** + * This clears local sorting applied to the data view by resetting it to the original data and applying any paging + */ + clearLocalSorting(): void; + + /** + * Filters the data source locally. Remote filtering can be performed by just calling dataBind() and + * setting the settings.filtering.expressions. The result (filtered data) can be obtained by calling dataView() + * example: [{fieldName : "firstName", expr: "abc", cond: "StartsWith"}, {fieldName : "lastName"}] + * example 2: [{fieldIndex : 1} , {fieldIndex : 2, expr: "a", cond : "contains"}] + * expr is the filter expression text , such as "abc", or a regular expression such as *test* + * cond is the filtering condition such as startsWith, endsWith, contains, equals, doesNotEqual, doesNotContain + * if expr is detected to be a regular expression, the "cond" part is skipped + * + * @param fieldExpressions a list of field expression definitions + * @param boolLogic boolean logic. Accepted values are AND and OR. + * @param keepFilterState if keepFilterState is set to true, it will not discard previous filtering expressions + * @param fieldExpressionsOnStrings a list of field expression definitions (or a string with the conditions separated by AND/OR operator, example: "ID = 1 OR ID = 2"), which when applied will threat the related field as if it's string and can only apply conditions valid for string types. + */ + filter(fieldExpressions: Object, boolLogic: Object, keepFilterState: boolean, fieldExpressionsOnStrings: Object): void; + + /** + * This clears local filtering applied to the data view by resetting it to the original data and applying any paging + */ + clearLocalFilter(): void; + + /** + * Applicable only when the data source is bound to remote data. + * Gets / sets the total number of records in the data source. + * If data binding is remote, and there's paging or filtering enabled, + * the actual total number of records may not + * match the number of records that exists on the client + * + * @param count the total number of records + * @param key + * @param dsObj + * @param context + */ + totalRecordsCount(count?: number, key?: Object, dsObj?: Object, context?: Object): number; + + /** + * Gets / sets if the response from the server contains a property which specifies the total number of records in the server-side backend + * + * @param hasCount specifies if the data source contains a property that denotes the total number of records in the server-side backend + */ + hasTotalRecordsCount(hasCount: boolean): void; + + /** + * Returns metadata object for the specified key + * + * @param key Primary key of the record + */ + metadata(key: string): Object; + + /** + * Returns the total number of records in the local data source + */ + totalLocalRecordsCount(): number; + + /** + * Returns the total number of pages + */ + pageCount(): number; + + /** + * Gets /sets the current page index. If an index is passed as a parameter, the data source is re-bound. + * + * @param index the page index. If none is specified, returns the current page index. + */ + pageIndex(index?: number): number; + + /** + * Gets /sets the page index that should be persisted. For now ONLY when filtering is applied and call explicitly DataBind. + * + * @param value the page index that should be persisted. If none is specified, returns the current page index that should be persisted. + */ + persistedPageIndex(value?: number): number; + + /** + * Sets the page index to be equal to the previous page index and rebinds the data source + */ + prevPage(): void; + + /** + * Sets the page index to be equal to the next page index and rebinds the data source + */ + nextPage(): void; + + /** + * Gets /sets the page size and rebinds the data source if a parameter is specified. If no parameter is passed, returns the current page size + * + * @param s the page size. + */ + pageSize(s?: number): number; + + /** + * For internal use + * + * @param dirty + */ + pageSizeDirty(dirty: Object): void; + + /** + * Returns a list of records for the specified page. Implies that paging is enabled. + * + * @param p the page index for which records will be returned + */ + recordsForPage(p: number): void; + + /** + * Converts a HTML TABLE dom element to a JavaScript array of objects that contain the records data + * + * @param tableDOM TABLE dom element to transform + */ + tableToObject(tableDOM: Element): Object; + + /** + * Parses the string and returns an evaluated JSON object + * + * @param s the JSON as string. + */ + stringToJSONObject(s: string): void; + + /** + * Parses a string and returns a XML Document + * + * @param s the XML represented as a string + */ + stringToXmlObject(s: string): void; + + /** + * Returns collection of data and non-data(grouped) records. Flat representation of hierarchical data + */ + groupByData(): any[]; + + /** + * Returns collection of data and non-data(grouped) records. Returns only visible records(children of collapsed grouped records are not included in the collection) + */ + visibleGroupByData(): any[]; + + /** + * Returns the current normalized/transformed and paged/filtered/sorted group-by data + */ + groupByDataView(): any[]; + + /** + * Toggle grouped record with the specified id and updates collections visible groupby data and data view + * + * @param id data-id attribute of the respective group row in the DOM + * @param collapsed if true the record should be collapsed, otherwise expanded + */ + toggleGroupByRecord(id: string, collapsed: boolean): void; + + /** + * Check whether the specified gorupby record is collapsed + * + * @param gbRec id of the grouped record OR grouped record + */ + isGroupByRecordCollapsed(gbRec: Object): boolean; + + /** + * Check whether grouping is applied for the specified sorting expressions. + * + * @param exprs array of sorting expressions. If not set check expressions defined in sorting settings + */ + isGroupByApplied(exprs?: any[]): boolean; + } +} +interface IgniteUIStatic { +ArrayDataSource: typeof Infragistics.ArrayDataSource; +} + +interface MashupDataSourceMashupSettings { + /** + * Indicates whether to ignore records that have no corresponding data in all of the provided data sources. + */ + ignorePartialRecords?: boolean; + + /** + * An array of $.ig.DataSource instances holding the disperse data. + */ + dataSource?: any[]; + + /** + * Option for MashupDataSourceMashupSettings + */ + [optionName: string]: any; +} + +declare namespace Infragistics { + class MashupDataSource { + constructor(mashupSettings: MashupDataSourceMashupSettings); + constructor(settings: DataSourceSettings); + + /** + * Sets a cell value for the cell denoted by rowId and colId. Creates a transaction for the update operation and returns it + * + * @param rowId the rowId - row key (string) or index (number) + * @param colId the column id - column key (string) or index (number) + * @param val The new value + * @param autoCommit if autoCommit is true, it updates the datasource automatically and the transaction is still stored in the accumulated transaction log + */ + setCellValue(rowId: Object, colId: Object, val: Object, autoCommit: boolean): Object; + + /** + * Updates a record in the datasource. Creates a transaction that can be committed / rolled back + * + * @param rowId the record key - primaryKey (string) or index (number) + * @param rowObject the record object containing the key/value pairs we want to update. It doesn't have to include key/value pairs for all fields defined in the schema or in the data source (if no schema is defined) + * @param autoCommit if autoCommit is true, the datasource will be updated automatically and the transaction is still stored in the accumulated transaction log + */ + updateRow(rowId: Object, rowObject: Object, autoCommit: boolean): Object; + + /** + * Adds a new row to the data source. Creates a transaction that can be committed / rolled back + * + * @param rowId the record key - primaryKey (string) or index (number) + * @param rowObject the new record data. + * @param autoCommit if autoCommit is true, the datasource will be updated automatically and the transaction is still stored in the accumulated transaction log + */ + addRow(rowId: Object, rowObject: Object, autoCommit: boolean): Object; + + /** + * Adds a new row to the data source. Creates a transaction that can be committed / rolled back + * + * @param rowId the record key - primaryKey (string) or index (number) + * @param rowObject the new record data. + * @param rowIndex row index at which to insert the new row + * @param autoCommit if autoCommit is true, the datasource will be updated automatically and the transaction is still stored in the accumulated transaction log + * @param parentRowId Not used in $.ig.DataSource + */ + insertRow(rowId: Object, rowObject: Object, rowIndex: number, autoCommit: boolean, parentRowId: Object): Object; + + /** + * Data binds to the current data source. + */ + dataBind(): void; + + /** + * Sets a list of fields to the data source. If no parameter is specified, just returns the already existing list of fields + * + * @param fields a field has the following format: {key: 'fieldKey', dataType: 'string/number/date' } + */ + fields(fields?: Object): Object; + + /** + * Analyzes the dataSource setting to automatically determine the type of the data source. Returns the data source type. See settings.type + */ + analyzeDataSource(): string; + + /** + * Returns the current normalized/transformed and paged/filtered/sorted data, i.e. the dataView + */ + dataView(): any[]; + + /** + * Returns all of the bound data, without taking into account local paging, sorting, filtering, etc. + */ + data(): Object; + + /** + * Returns transformed data according to transformed execution: + * 1. Before paging and filtering + * 2. After filtering before paging + * 3. After filtering and paging + * + * @param transformedExecution + */ + transformedData(transformedExecution: Object): Object; + + /** + * Returns summaries data + */ + dataSummaries(): Object; + + /** + * Gets/sets the schema definition. + * + * @param s a schema object + * @param t type of the data source. See settings.type + */ + schema(s?: Object, t?: string): void; + + /** + * Gets/sets a list of paging settings + * + * @param p object holding all paging settings. See settings.paging + */ + pagingSettings(p?: Object): Object; + + /** + * Gets/sets a list of filtering settings + * + * @param f object holding all filtering settings. See settings.filtering + */ + filterSettings(f?: Object): void; + + /** + * Gets/sets a list of paging settings + * + * @param s object holding all sorting settings. See settings.sorting + */ + sortSettings(s?: Object): Object; + + /** + * Gets/sets a list of summaries settings. + * + * @param s object holding all summaries settings. See settings.summaries + */ + summariesSettings(s?: Object): void; + + /** + * Gets/sets the dataSource setting. If no parameter is specified, returns settings.dataSource + * + * @param ds + */ + dataSource(ds?: Object): Object; + + /** + * Gets/sets the type of the dataSource. If no parameter is specified, returns settings.type + * + * @param t + * @return json|xml|unknown|array|function|htmlTableString|htmlTableId|htmlTableDom|invalid|remoteUrl|empty + */ + type(t?: Object): string; + + /** + * Returns a record by a specified key (requires that primaryKey is set in the settings) + * + * @param key Primary key of the record + * @param ds the data source in which to search for the record. When not set it will use the current data source. + * @param objPath Not used in $.ig.DataSource + */ + findRecordByKey(key: string, ds?: string, objPath?: string): Object; + + /** + * Removes a specific record denoted by the primaryKey of the passed key parameter from the data source + * + * @param key primary key of the record + * @param origDs + */ + removeRecordByKey(key: Object, origDs: Object): void; + + /** + * Removes a record from the data source at specific index. + * + * @param index index of record + * @param origDs + */ + removeRecordByIndex(index: number, origDs: Object): void; + + /** + * Deletes a row from the data source. + * + * @param rowId the record key - primaryKey (string) or index (number) + * @param autoCommit if autoCommit is true, the datasource will be updated automatically and the transaction is still stored in the accumulated transaction log + */ + deleteRow(rowId: Object, autoCommit: boolean): Object; + + /** + * Adds a new node to the tree data source. Creates a transaction that can be committed / rolled back + * + * @param data the transaction data + */ + addNode(data: Object): void; + + /** + * Removes a node from the tree data source. Creates a transaction that can be committed / rolled back + * + * @param data the transaction data + */ + removeNode(data: Object): void; + + /** + * Returns a standalone object (copy) that represents the commited transactions, but detached from the data source + * + * @param t a transaction object + */ + getDetachedRecord(t: Object): Object; + + /** + * Update the data source with every transaction from the log + * + * @param id Id of the transaction to commit. If no id is specified, will commit all transactions to the data source. + */ + commit(id?: number): void; + + /** + * Clears the transaction log without updating anything in the data source + * + * @param id Record Id to find transactions for. If no id is specified, will rollback all transactions to the data source. + */ + rollback(id?: Object): void; + + /** + * Returns a list of all transaction objects that are pending to be committed or rolled back to the data source + */ + pendingTransactions(): any[]; + + /** + * Returns a list of all transaction objects that are either pending, or have been committed in the data source. + */ + allTransactions(): any[]; + + /** + * Returns the accumulated transaction log as a string. The purpose of this is to be passed to URLs or used conveniently + */ + transactionsAsString(): string; + + /** + * Posts to the settings.updateUrl using $.ajax, by serializing the changes as url params + * + * @param success Specifies a custom function to be called when AJAX request to the updateUrl option succeeds(optional) + * @param error Specifies a custom function to be called when AJAX request to the updateUrl option fails(optional) + */ + saveChanges(success: Function, error: Function): void; + + /** + * Gets a cell value from the record by the specified fieldName. If there's a mapper defined for the field, the resolved by the mapper value will be returned. + * + * @param fieldName the fieldName - name of the field + * @param record the record from which to get it + */ + getCellValue(fieldName: string, record: Object): Object; + + /** + * Applicable only when the data source is bound to remote data. + * Gets or sets summaries data. + * If key or dsObj are not set then returns summaries data. + * Takes summary data from passed argument dsObj(using argument key) + * + * @param key response key to take summary data(for example "Metadata.Summaries") + * @param dsObj data source object - usually contains information about data records and metadata(holds info about summaries) + */ + summariesResponse(key?: string, dsObj?: Object): Object; + + /** + * Returns filtered data if local filtering is applied. If filtering is not applied OR type of filtering is remote returns undefined. + */ + filteredData(): any[]; + + /** + * Sorts the data source locally. The result (filtered data) can be obtained by calling dataView(). + * Remote filtering can be performed by just calling dataBind() and setting the settings.filtering.expressions + * multi-column sorting can be enabled by setting keepSortState to true. + * fields => an array of fields object definitions: + * example: [{fieldName : "firstName"}, {fieldName : "lastName"}] + * example 2: [{fieldIndex : 1} , {fieldIndex : 2}] + * + * @param fields an array of fields object definitions + * @param direction asc / desc direction + */ + sort(fields: Object, direction: string): void; + + /** + * This clears local sorting applied to the data view by resetting it to the original data and applying any paging + */ + clearLocalSorting(): void; + + /** + * Filters the data source locally. Remote filtering can be performed by just calling dataBind() and + * setting the settings.filtering.expressions. The result (filtered data) can be obtained by calling dataView() + * example: [{fieldName : "firstName", expr: "abc", cond: "StartsWith"}, {fieldName : "lastName"}] + * example 2: [{fieldIndex : 1} , {fieldIndex : 2, expr: "a", cond : "contains"}] + * expr is the filter expression text , such as "abc", or a regular expression such as *test* + * cond is the filtering condition such as startsWith, endsWith, contains, equals, doesNotEqual, doesNotContain + * if expr is detected to be a regular expression, the "cond" part is skipped + * + * @param fieldExpressions a list of field expression definitions + * @param boolLogic boolean logic. Accepted values are AND and OR. + * @param keepFilterState if keepFilterState is set to true, it will not discard previous filtering expressions + * @param fieldExpressionsOnStrings a list of field expression definitions (or a string with the conditions separated by AND/OR operator, example: "ID = 1 OR ID = 2"), which when applied will threat the related field as if it's string and can only apply conditions valid for string types. + */ + filter(fieldExpressions: Object, boolLogic: Object, keepFilterState: boolean, fieldExpressionsOnStrings: Object): void; + + /** + * This clears local filtering applied to the data view by resetting it to the original data and applying any paging + */ + clearLocalFilter(): void; + + /** + * Applicable only when the data source is bound to remote data. + * Gets / sets the total number of records in the data source. + * If data binding is remote, and there's paging or filtering enabled, + * the actual total number of records may not + * match the number of records that exists on the client + * + * @param count the total number of records + * @param key + * @param dsObj + * @param context + */ + totalRecordsCount(count?: number, key?: Object, dsObj?: Object, context?: Object): number; + + /** + * Gets / sets if the response from the server contains a property which specifies the total number of records in the server-side backend + * + * @param hasCount specifies if the data source contains a property that denotes the total number of records in the server-side backend + */ + hasTotalRecordsCount(hasCount: boolean): void; + + /** + * Returns metadata object for the specified key + * + * @param key Primary key of the record + */ + metadata(key: string): Object; + + /** + * Returns the total number of records in the local data source + */ + totalLocalRecordsCount(): number; + + /** + * Returns the total number of pages + */ + pageCount(): number; + + /** + * Gets /sets the current page index. If an index is passed as a parameter, the data source is re-bound. + * + * @param index the page index. If none is specified, returns the current page index. + */ + pageIndex(index?: number): number; + + /** + * Gets /sets the page index that should be persisted. For now ONLY when filtering is applied and call explicitly DataBind. + * + * @param value the page index that should be persisted. If none is specified, returns the current page index that should be persisted. + */ + persistedPageIndex(value?: number): number; + + /** + * Sets the page index to be equal to the previous page index and rebinds the data source + */ + prevPage(): void; + + /** + * Sets the page index to be equal to the next page index and rebinds the data source + */ + nextPage(): void; + + /** + * Gets /sets the page size and rebinds the data source if a parameter is specified. If no parameter is passed, returns the current page size + * + * @param s the page size. + */ + pageSize(s?: number): number; + + /** + * For internal use + * + * @param dirty + */ + pageSizeDirty(dirty: Object): void; + + /** + * Returns a list of records for the specified page. Implies that paging is enabled. + * + * @param p the page index for which records will be returned + */ + recordsForPage(p: number): void; + + /** + * Converts a HTML TABLE dom element to a JavaScript array of objects that contain the records data + * + * @param tableDOM TABLE dom element to transform + */ + tableToObject(tableDOM: Element): Object; + + /** + * Parses the string and returns an evaluated JSON object + * + * @param s the JSON as string. + */ + stringToJSONObject(s: string): void; + + /** + * Parses a string and returns a XML Document + * + * @param s the XML represented as a string + */ + stringToXmlObject(s: string): void; + + /** + * Returns collection of data and non-data(grouped) records. Flat representation of hierarchical data + */ + groupByData(): any[]; + + /** + * Returns collection of data and non-data(grouped) records. Returns only visible records(children of collapsed grouped records are not included in the collection) + */ + visibleGroupByData(): any[]; + + /** + * Returns the current normalized/transformed and paged/filtered/sorted group-by data + */ + groupByDataView(): any[]; + + /** + * Toggle grouped record with the specified id and updates collections visible groupby data and data view + * + * @param id data-id attribute of the respective group row in the DOM + * @param collapsed if true the record should be collapsed, otherwise expanded + */ + toggleGroupByRecord(id: string, collapsed: boolean): void; + + /** + * Check whether the specified gorupby record is collapsed + * + * @param gbRec id of the grouped record OR grouped record + */ + isGroupByRecordCollapsed(gbRec: Object): boolean; + + /** + * Check whether grouping is applied for the specified sorting expressions. + * + * @param exprs array of sorting expressions. If not set check expressions defined in sorting settings + */ + isGroupByApplied(exprs?: any[]): boolean; + } +} +interface IgniteUIStatic { +MashupDataSource: typeof Infragistics.MashupDataSource; +} + +interface HierarchicalDataSourceSettingsPaging { + /** + * Option for HierarchicalDataSourceSettingsPaging + */ + [optionName: string]: any; +} + +interface HierarchicalDataSourceSettingsSorting { + /** + * Option for HierarchicalDataSourceSettingsSorting + */ + [optionName: string]: any; +} + +interface HierarchicalDataSourceSettingsFiltering { + /** + * Option for HierarchicalDataSourceSettingsFiltering + */ + [optionName: string]: any; +} + +interface HierarchicalDataSourceSettingsSchema { + /** + * Option for HierarchicalDataSourceSettingsSchema + */ + [optionName: string]: any; +} + +interface HierarchicalDataSourceSettings { + autogenerate?: boolean; + initialDataBindDepth?: number; + maxDataBindDepth?: number; + defaultChildrenDataProperty?: string; + callback?: any; + callee?: any; + data?: any[]; + dataSource?: any; + dataBinding?: any; + dataBound?: any; + + /** + * Other options + */ + type?: string; + responseDataType?: any; + responseContentType?: any; + localSchemaTransform?: boolean; + urlParamsEncoding?: any; + urlParamsEncoded?: any; + requestType?: string; + odata?: boolean; + paging?: HierarchicalDataSourceSettingsPaging; + sorting?: HierarchicalDataSourceSettingsSorting; + filtering?: HierarchicalDataSourceSettingsFiltering; + + /** + * All of the rest - paging, sorting, filtering, can be defined in the layouts definition, which will "override" the parent defs + * IMPORTANT: if there is no paging, sorting or filtering, an instance of $.ig.DataSource won't be created for child row islands + */ + schema?: HierarchicalDataSourceSettingsSchema; + + /** + * Option for HierarchicalDataSourceSettings + */ + [optionName: string]: any; +} + +declare namespace Infragistics { + class HierarchicalDataSource { + constructor(settings: HierarchicalDataSourceSettings); + dataBind(callback: Object, callee: Object): void; + root(): void; + dataAt(path: Object, keyspath: Object): void; + } +} +interface IgniteUIStatic { +HierarchicalDataSource: typeof Infragistics.HierarchicalDataSource; +} + +interface TreeHierarchicalDataSourceSettingsTreeDSFiltering { + /** + * Specifies from which data bound level to be applied filtering - 0 is the first level + */ + fromLevel?: number; + + /** + * Specifies to which data bound level to be applied filtering - if -1 filtering should be applied to the last data bound level + */ + toLevel?: number; + + /** + * If displayMode is showWithAncestorsAndDescendants, show all records that match filtering conditions and their child records, even if child records don't match filtering conditions. If displayMode is showWithAncestors show only those records that match filtering conditions and do not show child records(if any) that don't match filtering conditions + */ + displayMode?: any; + + /** + * Filtering data source specific property - name of property in dataRecord object - indicates whether dataRow matches filtering conditions. It is used ONLY when filtering is applied. + */ + matchFiltering?: string; + + /** + * Option for TreeHierarchicalDataSourceSettingsTreeDSFiltering + */ + [optionName: string]: any; +} + +interface TreeHierarchicalDataSourceSettingsTreeDSSorting { + /** + * Specifies from which data bound level to be applied sorting - 0 is the first level + */ + fromLevel?: number; + + /** + * Specifies to which data bound level to be applied sorting - if -1 sorting should be applied to the last data bound level + */ + toLevel?: number; + + /** + * Option for TreeHierarchicalDataSourceSettingsTreeDSSorting + */ + [optionName: string]: any; +} + +interface TreeHierarchicalDataSourceSettingsTreeDSPaging { + /** + * Sets gets paging mode. + * + * Valid values: + * "allLevels" includes all visible records in paging. + */ + mode?: string; + + /** + * When data flows to the next page there are a couple of different modes that can help communicate the context of a leaf level row. When mode option is 'rootLevelOnly' then the context row always shows the value of the contextRowRootText option. + * + * + * Valid values: + * "none" Does not render the contextual row + * "parent" Renders a read-only representation of the immediate parent row + * "breadcrumb" Renders a read-only breadcrumb trail representing the full path through all ancestors + */ + contextRowMode?: string; + + /** + * Option for TreeHierarchicalDataSourceSettingsTreeDSPaging + */ + [optionName: string]: any; +} + +interface TreeHierarchicalDataSourceSettingsTreeDS { + /** + * Property name of the array of child data in a hierarchical data source. + */ + childDataKey?: string; + + /** + * Unique identifier used in a self-referencing flat data source. Used with primaryKey to create a relationship among flat data sources. + */ + foreignKey?: string; + + /** + * Specifies the depth down to which the tree grid would be expanded upon initial render. To expand all rows set value to -1. Default is -1. + */ + initialExpandDepth?: number; + + /** + * Specifies if data is loaded on demand from a remote server. Default is false. + */ + enableRemoteLoadOnDemand?: boolean; + + /** + * Specifies a remote URL as a data source, from which data will be retrieved using an AJAX call ($.ajax) + */ + dataSourceUrl?: string; + + /** + * Specifies a custom function to be called when the remote request for data has finished. + */ + requestDataCallback?: Function; + + /** + * Specifies a custom function to be called when the remote request for data has finished successfully. + */ + requestDataSuccessCallback?: Function; + + /** + * Specifies a custom function to be called when the remote request for data has finished with an error. + */ + requestDataErrorCallback?: Function; + + /** + * The name of the property that keeps track of the expansion state of a data item. Defaults to __ig_options.expanded. + */ + propertyExpanded?: string; + + /** + * The name of the property that keeps track of the level in the hierarchy.Defaults to __ig_options.dataLevel. + */ + propertyDataLevel?: string; + + /** + * If set to TRUE it is expected that the source of data is normalized and transformed(has set dataLevel and expansion state). The source of data is used as flatDataView. Usually used when the paging is remote and paging mode is allLevels, or features are remote(and the processing of the returned result should be made on the server) + * + */ + initialFlatDataView?: boolean; + + /** + * Specifies a custom function to be called when requesting data to the server - usually when expanding/collapsing record. If set the function should return the encoded URL. It takes as parameters: data record(type: object), expand - (type: bool). + * + */ + customEncodeUrlFunc?: Function; + + /** + * If true save expansion states in internal list and send it to the server. Applying to one of the main constraint of the REST architecture Stateless Interactions - client specific data(like expansion states) should NOT be stored on the server + * + */ + persistExpansionStates?: boolean; + + /** + * Configure datasource filtering settings. + */ + filtering?: TreeHierarchicalDataSourceSettingsTreeDSFiltering; + + /** + * Configure datasource sorting settings. + */ + sorting?: TreeHierarchicalDataSourceSettingsTreeDSSorting; + + /** + * Configure datasource paging settings. + */ + paging?: TreeHierarchicalDataSourceSettingsTreeDSPaging; + + /** + * Option for TreeHierarchicalDataSourceSettingsTreeDS + */ + [optionName: string]: any; +} + +interface TreeHierarchicalDataSourceSettings { + /** + * Configure tree datasource specific settings + */ + treeDS?: TreeHierarchicalDataSourceSettingsTreeDS; + + /** + * Option for TreeHierarchicalDataSourceSettings + */ + [optionName: string]: any; +} + +declare namespace Infragistics { + class TreeHierarchicalDataSource { + constructor(settings: TreeHierarchicalDataSourceSettings); + + /** + * Data binds to the current data source + * databinding works using the following workflow: + * 1. fire the databinding event + * 2. based on the data source type (see analyzeDataSource()), do the following: + * 3. if type is HtmlTable, parse the table and set the data and dataView respectively. + * if the type is Function, call it, apply Paging/Filtering/Sorting, and set this._dataView . If the developer wants to do his own paging, filtering or sorting + * in that case, then he should handle the PageIndexChanging and/or DataFiltering, and/or ColumnSorting client-side events, and cancel them. + * if no paging/sorting/filtering are enabled, use just this._data to save space + * if the data source is of type RemoteUrl, use jQuery's $.ajax API to trigger a remote request to the service. Use the param() API to encode the URL + * if the data source is invalid, throw an exception + * if the analyzed runtime data source type , that is, the result of analyzeDataSource(), is Unknown, check if + * the value of settings.type is set to XML or JSON. If string, eval for JSON, and parse for the XML to build the object ree + * 4. now normalize/transform the data, if a schema is supplied. This inplies any additional data type conversion + * 5. next, if OpType is Local, apply paging, sorting, and/or filtering to the data, and store the result in this._dataView + * 6. fire the databound event + * + * @param callback callback function + * @param callee callee object on which the callback will be executed. If none is specified, will assume global execution context + */ + dataBind(callback?: string, callee?: Object): void; + + /** + * Gets the passed record's parent records + * + * @param dataRow the child record. + * @param ds the data source in which to search for the related parent records. + */ + getParentRowsForRow(dataRow: Object, ds?: Object): Object; + + /** + * Gets the current data bound depth of the tree grid hierarchy. + */ + getDataBoundDepth(): void; + + /** + * Gets/Sets whether the data source has been transformed from flat to hierarchical + * + * @param isTransformed Determines if the data source is marked as transformed or not. + */ + isTransformedToHierarchicalData(isTransformed?: boolean): void; + + /** + * Transforms flat data to hierararchical data and returns the result + * + * @param data The flat data that will be transformed to hierarchical + */ + transformToHierarchicalData(data: Object): Object; + + /** + * This processes the passed data for the specified level and applies the schema transformation to it. + * + * @param data The data to be processed and transformed + * @param level The level to which the data belongs to. If this is not set it defaults to 0. + * @param suppressTransformation Determines whether the data should go through schema transformation. If true schema transofrmatin will not be applied. + */ + processDataPerLevel(data: Object, level?: number, suppressTransformation?: boolean): Object; + + /** + * Returnschild data transformed to flat data + * + * @param record The data record whose data is transformed and returned as flat + * @param level The level. If not set defaults to 0. + */ + getFlatDataForRecord(record: Object, level?: number): Object; + + /** + * Generates flat data. + * Returns an object that contains the generated flat data, the flat visible data, records count and visible records count. + * + * @param data The data record whose data is transformed. + * @param level The level from which to start recursively generating the flat data. If not set defaults to 0. + */ + generateFlatData(data: Object, level?: number): Object; + + /** + * Generates a flat data view from the current (hierarchical)data + */ + generateFlatDataView(): void; + + /** + * Returns the current flat data view + */ + flatDataView(): Object; + + /** + * Returns flat visible data. + */ + getVisibleFlatData(): Object; + + /** + * Returns flat data(without taking into account visible/expansion state). + */ + getFlatData(): Object; + + /** + * Returns total records count(without taking into account visible/expansion state). + */ + getFlatDataCount(): number; + + /** + * Sets the expanded/collapsed state of a row by its index + * + * @param index The index of the row. + * @param expanded If true then the row will be expanded. Otherwise it will be collapsed. + * @param callbackArgs Specifies a custom function to be called when the state of the row is changed. + */ + setExpandedStateByRowIndex(index: number, expanded: boolean, callbackArgs: Function): void; + + /** + * Sets the expanded state of a row by its primary key + * + * @param rowId The id of the row. + * @param expanded If true the row will be expanded. Otherwise it will be collapsed. + * @param callbackArgs Specifies a custom function to be called when the state of the row is changed. + */ + setExpandedStateByPrimaryKey(rowId: string, expanded: boolean, callbackArgs: Function): void; + + /** + * Gets whether the row with the specified id is expanded.Returns true if the row is expanded or false if it's not. + * + * @param rowId //The id of the row. + */ + getExpandStateById(rowId: string): boolean; + + /** + * Toggles the row's state by the row's id. + * + * @param rowId The id of the row. + * @param callbackArgs Specifies a custom function to be called when the state of the row is changed. + */ + toggleRow(rowId: string, callbackArgs: Function): void; + + /** + * Sorts the data source locally. The result (sorted data) can be obtained by calling dataView(). + * Remote filtering can be performed by just calling dataBind() and setting the settings.sorting.expressions + * multi-column sorting can be enabled by setting keepSortState to true. + * fields => an array of fields object definitions: + * example: [{fieldName : "firstName"}, {fieldName : "lastName"}] + * example 2: [{fieldIndex : 1} , {fieldIndex : 2}] + * + * @param fields an array of fields object definitions + * @param direction asc / desc direction + */ + sort(fields: Object, direction: string): void; + + /** + * Sorts the given data recursively + * fields => an array of fields object definitions: + * example: [{fieldName : "firstName"}, {fieldName : "lastName"}] + * example 2: [{fieldIndex : 1} , {fieldIndex : 2}] + * + * @param data the data array that will be sorted. + * @param level the level to which the data belongs to + * @param fields an array of fields object definitions + * @param direction asc / desc direction + */ + sortDataRecursive(data: Object, level: number, fields: Object, direction: string): void; + + /** + * Sorts the passed data and returns the sorted result. + * + * @param data the data to be sorted + + fields => an array of fields object definitions: + example: [{fieldName : "firstName"}, {fieldName : "lastName"}] + example 2: [{fieldIndex : 1} , {fieldIndex : 2}] + + * @param fields an array of fields object definitions + * @param direction asc / desc direction + */ + sortData(data: Object, fields: Object, direction: string): void; + + /** + * Returns the total number of records in the local data source + */ + totalLocalRecordsCount(): number; + + /** + * Returns the total number of pages + */ + pageCount(): number; + + /** + * Returns the total number of match filtering records in the data source. + * When the dataSource is remote and filtering is applied then it is taken value + * of property "filtering.countRecords" in metatadata - if set. If it is not set returns totalRecordsCount + */ + getFilteringMatchRecordsCount(): number; + + /** + * Filters the data source locally. Remote filtering can be performed by just calling dataBind() and setting the settings.filtering.expressions. The result (filtered data) can be obtained by calling dataView() + * example: [{fieldName : "firstName", expr: "abc", cond: "StartsWith"}, {fieldName : "lastName"}] + * example 2: [{fieldIndex : 1} , {fieldIndex : 2, expr: "a", cond : "contains"}] + * expr is the filter expression text , such as "abc", or a regular expression such as *test* + * cond is the filtering condition such as startsWith, endsWith, contains, equals, doesNotEqual, doesNotContain + * if expr is detected to be a regular expression, the "cond" part is skipped + * + * @param fieldExpressions a list of field expression definitions + * @param boolLogic boolean logic. Accepted values are AND and OR. + * @param keepFilterState if keepFilterState is set to true, it will not discard previous filtering expressions + * @param fieldExpressionsOnStrings + */ + filter(fieldExpressions: Object, boolLogic: Object, keepFilterState: boolean, fieldExpressionsOnStrings: Object): void; + + /** + * Gets the count of the filtered records in the dataView + */ + getFilteredRecordsCountFromDataView(): number; + + /** + * Gets the count of the filtered records + */ + getFilteredRecordsCount(): number; + + /** + * This clears local filtering applied to the data view by resetting it to the original data and applying any paging. + */ + clearLocalFilter(): void; + + /** + * Gets whether the flat data view should be generated by calling the generateFlatDataView method. + */ + shouldCallGenerateFlatDataView(): void; + + /** + * Clears __matchFiltering property from the data record objects in the filtered data source. The __matchFiltering property determines whether a record matches the specified filtering condition. + * + * @param data the array of data objects to be cleared. If not set the current filtered data array is used. + */ + clearMatchFiltering(data?: Object): void; + + /** + * Gets the path of a record by the record or the record's key + * + * @param record the record or the record's key as string or number + */ + getPathBy(record: Object): void; + + /** + * Returns a record by a specified key (requires that primaryKey is set in the settings) + * + * @param key Primary key of the record + * @param ds the data source in which to search for the record. When not set it will use the current data source. + * @param objPath path to the object. Example: {path: '5/1'} + */ + findRecordByKey(key: Object, ds?: string, objPath?: Object): Object; + + /** + * Removes a specific record denoted by the primaryKey of the passed key parameter from the data source + * + * @param key primary key of the record + * @param origDs + */ + removeRecordByKey(key: Object, origDs: Object): void; + + /** + * Deletes a row from the data source. + * + * @param rowId the record key - primaryKey (string) or index (number) + * @param autoCommit if autoCommit is true, the datasource will be updated automatically and the transaction is still stored in the accumulated transaction log + */ + deleteRow(rowId: Object, autoCommit: boolean): Object; + + /** + * Gets the chilren records by the parent record's key in the passed data source + * + * @param key primary key of the record + * @param ds the data source + */ + getChildrenByKey(key: Object, ds: Object): Object; + + /** + * Adds a new row to the data source. Creates a transaction that can be committed / rolled back + * + * @param rowId the record key - primaryKey (string) or index (number) + * @param rowObject the new record data. + * @param rowIndex row index at which to be insert the new row + * @param autoCommit if autoCommit is true, the datasource will be updated automatically and the transaction is still stored in the accumulated transaction log + * @param parentRowId the value of the primary key of the parent row(if any) + */ + insertRow(rowId: Object, rowObject: Object, rowIndex: number, autoCommit: boolean, parentRowId: Object): Object; + + /** + * Sets a list of fields to the data source. If no parameter is specified, just returns the already existing list of fields + * + * @param fields a field has the following format: {key: 'fieldKey', dataType: 'string/number/date' } + */ + fields(fields?: Object): Object; + + /** + * Analyzes the dataSource setting to automatically determine the type of the data source. Returns the data source type. See settings.type + */ + analyzeDataSource(): string; + + /** + * Returns the current normalized/transformed and paged/filtered/sorted data, i.e. the dataView + */ + dataView(): any[]; + + /** + * Returns all of the bound data, without taking into account local paging, sorting, filtering, etc. + */ + data(): Object; + + /** + * Returns transformed data according to transformed execution: + * 1. Before paging and filtering + * 2. After filtering before paging + * 3. After filtering and paging + * + * @param transformedExecution + */ + transformedData(transformedExecution: Object): Object; + + /** + * Returns summaries data + */ + dataSummaries(): Object; + + /** + * Gets/sets the schema definition. + * + * @param s a schema object + * @param t type of the data source. See settings.type + */ + schema(s?: Object, t?: string): void; + + /** + * Gets/sets a list of paging settings + * + * @param p object holding all paging settings. See settings.paging + */ + pagingSettings(p?: Object): Object; + + /** + * Gets/sets a list of filtering settings + * + * @param f object holding all filtering settings. See settings.filtering + */ + filterSettings(f?: Object): void; + + /** + * Gets/sets a list of paging settings + * + * @param s object holding all sorting settings. See settings.sorting + */ + sortSettings(s?: Object): Object; + + /** + * Gets/sets a list of summaries settings. + * + * @param s object holding all summaries settings. See settings.summaries + */ + summariesSettings(s?: Object): void; + + /** + * Gets/sets the dataSource setting. If no parameter is specified, returns settings.dataSource + * + * @param ds + */ + dataSource(ds?: Object): Object; + + /** + * Gets/sets the type of the dataSource. If no parameter is specified, returns settings.type + * + * @param t + * @return json|xml|unknown|array|function|htmlTableString|htmlTableId|htmlTableDom|invalid|remoteUrl|empty + */ + type(t?: Object): string; + + /** + * Removes a record from the data source at specific index. + * + * @param index index of record + * @param origDs + */ + removeRecordByIndex(index: number, origDs: Object): void; + + /** + * Sets a cell value for the cell denoted by rowId and colId. Creates a transaction for the update operation and returns it + * + * @param rowId the rowId - row key (string) or index (number) + * @param colId the column id - column key (string) or index (number) + * @param val The new value + * @param autoCommit if autoCommit is true, it updates the datasource automatically and the transaction is still stored in the accumulated transaction log + */ + setCellValue(rowId: Object, colId: Object, val: Object, autoCommit: boolean): Object; + + /** + * Updates a record in the datasource. Creates a transaction that can be committed / rolled back + * + * @param rowId the record key - primaryKey (string) or index (number) + * @param rowObject the record object containing the key/value pairs we want to update. It doesn't have to include key/value pairs for all fields defined in the schema or in the data source (if no schema is defined) + * @param autoCommit if autoCommit is true, the datasource will be updated automatically and the transaction is still stored in the accumulated transaction log + */ + updateRow(rowId: Object, rowObject: Object, autoCommit: boolean): Object; + + /** + * Adds a new row to the data source. Creates a transaction that can be committed / rolled back + * + * @param rowId the record key - primaryKey (string) or index (number) + * @param rowObject the new record data. + * @param autoCommit if autoCommit is true, the datasource will be updated automatically and the transaction is still stored in the accumulated transaction log + */ + addRow(rowId: Object, rowObject: Object, autoCommit: boolean): Object; + + /** + * Adds a new node to the tree data source. Creates a transaction that can be committed / rolled back + * + * @param data the transaction data + */ + addNode(data: Object): void; + + /** + * Removes a node from the tree data source. Creates a transaction that can be committed / rolled back + * + * @param data the transaction data + */ + removeNode(data: Object): void; + + /** + * Returns a standalone object (copy) that represents the commited transactions, but detached from the data source + * + * @param t a transaction object + */ + getDetachedRecord(t: Object): Object; + + /** + * Update the data source with every transaction from the log + * + * @param id Id of the transaction to commit. If no id is specified, will commit all transactions to the data source. + */ + commit(id?: number): void; + + /** + * Clears the transaction log without updating anything in the data source + * + * @param id Record Id to find transactions for. If no id is specified, will rollback all transactions to the data source. + */ + rollback(id?: Object): void; + + /** + * Returns a list of all transaction objects that are pending to be committed or rolled back to the data source + */ + pendingTransactions(): any[]; + + /** + * Returns a list of all transaction objects that are either pending, or have been committed in the data source. + */ + allTransactions(): any[]; + + /** + * Returns the accumulated transaction log as a string. The purpose of this is to be passed to URLs or used conveniently + */ + transactionsAsString(): string; + + /** + * Posts to the settings.updateUrl using $.ajax, by serializing the changes as url params + * + * @param success Specifies a custom function to be called when AJAX request to the updateUrl option succeeds(optional) + * @param error Specifies a custom function to be called when AJAX request to the updateUrl option fails(optional) + */ + saveChanges(success: Function, error: Function): void; + + /** + * Gets a cell value from the record by the specified fieldName. If there's a mapper defined for the field, the resolved by the mapper value will be returned. + * + * @param fieldName the fieldName - name of the field + * @param record the record from which to get it + */ + getCellValue(fieldName: string, record: Object): Object; + + /** + * Applicable only when the data source is bound to remote data. + * Gets or sets summaries data. + * If key or dsObj are not set then returns summaries data. + * Takes summary data from passed argument dsObj(using argument key) + * + * @param key response key to take summary data(for example "Metadata.Summaries") + * @param dsObj data source object - usually contains information about data records and metadata(holds info about summaries) + */ + summariesResponse(key?: string, dsObj?: Object): Object; + + /** + * Returns filtered data if local filtering is applied. If filtering is not applied OR type of filtering is remote returns undefined. + */ + filteredData(): any[]; + + /** + * This clears local sorting applied to the data view by resetting it to the original data and applying any paging + */ + clearLocalSorting(): void; + + /** + * Applicable only when the data source is bound to remote data. + * Gets / sets the total number of records in the data source. + * If data binding is remote, and there's paging or filtering enabled, + * the actual total number of records may not + * match the number of records that exists on the client + * + * @param count the total number of records + * @param key + * @param dsObj + * @param context + */ + totalRecordsCount(count?: number, key?: Object, dsObj?: Object, context?: Object): number; + + /** + * Gets / sets if the response from the server contains a property which specifies the total number of records in the server-side backend + * + * @param hasCount specifies if the data source contains a property that denotes the total number of records in the server-side backend + */ + hasTotalRecordsCount(hasCount: boolean): void; + + /** + * Returns metadata object for the specified key + * + * @param key Primary key of the record + */ + metadata(key: string): Object; + + /** + * Gets /sets the current page index. If an index is passed as a parameter, the data source is re-bound. + * + * @param index the page index. If none is specified, returns the current page index. + */ + pageIndex(index?: number): number; + + /** + * Gets /sets the page index that should be persisted. For now ONLY when filtering is applied and call explicitly DataBind. + * + * @param value the page index that should be persisted. If none is specified, returns the current page index that should be persisted. + */ + persistedPageIndex(value?: number): number; + + /** + * Sets the page index to be equal to the previous page index and rebinds the data source + */ + prevPage(): void; + + /** + * Sets the page index to be equal to the next page index and rebinds the data source + */ + nextPage(): void; + + /** + * Gets /sets the page size and rebinds the data source if a parameter is specified. If no parameter is passed, returns the current page size + * + * @param s the page size. + */ + pageSize(s?: number): number; + + /** + * For internal use + * + * @param dirty + */ + pageSizeDirty(dirty: Object): void; + + /** + * Returns a list of records for the specified page. Implies that paging is enabled. + * + * @param p the page index for which records will be returned + */ + recordsForPage(p: number): void; + + /** + * Converts a HTML TABLE dom element to a JavaScript array of objects that contain the records data + * + * @param tableDOM TABLE dom element to transform + */ + tableToObject(tableDOM: Element): Object; + + /** + * Parses the string and returns an evaluated JSON object + * + * @param s the JSON as string. + */ + stringToJSONObject(s: string): void; + + /** + * Parses a string and returns a XML Document + * + * @param s the XML represented as a string + */ + stringToXmlObject(s: string): void; + + /** + * Returns collection of data and non-data(grouped) records. Flat representation of hierarchical data + */ + groupByData(): any[]; + + /** + * Returns collection of data and non-data(grouped) records. Returns only visible records(children of collapsed grouped records are not included in the collection) + */ + visibleGroupByData(): any[]; + + /** + * Returns the current normalized/transformed and paged/filtered/sorted group-by data + */ + groupByDataView(): any[]; + + /** + * Toggle grouped record with the specified id and updates collections visible groupby data and data view + * + * @param id data-id attribute of the respective group row in the DOM + * @param collapsed if true the record should be collapsed, otherwise expanded + */ + toggleGroupByRecord(id: string, collapsed: boolean): void; + + /** + * Check whether the specified gorupby record is collapsed + * + * @param gbRec id of the grouped record OR grouped record + */ + isGroupByRecordCollapsed(gbRec: Object): boolean; + + /** + * Check whether grouping is applied for the specified sorting expressions. + * + * @param exprs array of sorting expressions. If not set check expressions defined in sorting settings + */ + isGroupByApplied(exprs?: any[]): boolean; + } +} +interface IgniteUIStatic { +TreeHierarchicalDataSource: typeof Infragistics.TreeHierarchicalDataSource; +} + +declare namespace Infragistics { + class DvCommonWidget { + option(key: Object, value: Object): void; + } +} + +interface SimpleTextMarkerTemplateSettings { + padding?: number; + getText?: any; + backgroundColor?: string; + borderColor?: string; + borderThickness?: number; + textColor?: string; + font?: any; + + /** + * Option for SimpleTextMarkerTemplateSettings + */ + [optionName: string]: any; +} + +declare namespace Infragistics { + class SimpleTextMarkerTemplate { + constructor(requireThis: boolean); + constructor(settings: SimpleTextMarkerTemplateSettings); + getText(item: Object, textDelegate: Object): void; + measure(measureInfo: Object): void; + render(renderInfo: Object): void; + } +} +interface IgniteUIStatic { +SimpleTextMarkerTemplate: typeof Infragistics.SimpleTextMarkerTemplate; +} + +interface GridExcelExporterSettingsGridFeatureOptions { + /** + * Indicates whether sorting will be applied in the exported table. This is set_ to none by default, but will change to applied if sorting feature is defined in the igGrid. + * + * Valid values: + * "none" No sorting will be applied in the excel document. + * "applied" Sorting will be applied in the excel document. + */ + sorting?: string; + + /** + * Indicates whether the rows on the current page or entire data will exported. + * + * Valid values: + * "currentPage" Only current page will be exported to the excel document. + * "allRows" All pages will be exported to the excel document. + */ + paging?: string; + + /** + * Indicates whether hidden columns will be removed from the exported table. This is set to none by default, but will change to applied if hiding feature is defined in the igGrid. + * + * Valid values: + * "none" All hidden columns will be exported to the excel document. + * "applied" Hidden columns will be exported as hidden in the excel document. + * "visibleColumnsOnly" Only visible columns will be exported. + */ + hiding?: string; + + /** + * Indicates whether filtering will be applied in the exported table. this is set to none by default, but will change to applied if filtering feature is defined in the igGrid. + * + * Valid values: + * "none" No filtering will be applied in the excel document. + * "applied" Filtering will be applied in the excel document. + * "filteredRowsOnly" Filtering will be exported in the excel document. + */ + filtering?: string; + + /** + * Indicates whether fixed columns will be applied in the exported table. This is set to none by default, but will change to applied if column fixing feature is defined in the igGrid. + * + * Valid values: + * "none" No column fixing will be applied in the excel document. + * "applied" Column fixing will be applied in the excel document. + */ + columnfixing?: string; + + /** + * Indicates whether summaries will be added in the exported table. This is set to none by default, but will change to applied if summaries feature is defined in the igGrid. + * + * Valid values: + * "none" No summaries will be exported to the excel document. + * "applied" Summaries will be exported to the excel document. + */ + summaries?: string; + + /** + * Option for GridExcelExporterSettingsGridFeatureOptions + */ + [optionName: string]: any; +} + +interface GridExcelExporterSettings { + /** + * Specifies the name of the excel file that will be generated. + */ + fileName?: string; + + /** + * List of export settings which can be used with Grid Excel exporter + */ + gridFeatureOptions?: GridExcelExporterSettingsGridFeatureOptions; + + /** + * Specifies the name of workbook where the igGrid will be exported. + */ + worksheetName?: string; + + /** + * List of strings containing the keys for the worksheet columns which will not be applied any filtering + */ + skipFilteringOn?: any[]; + + /** + * List of strings containing the keys for the columns that will not be exported + */ + columnsToSkip?: any[]; + + /** + * Specifies the excel table style region. + * You can set the following table style + * TableStyleMedium[1-28] + * TableStyleLight[1-21] + * TableStyleDark[1-11] + */ + tableStyle?: string; + + /** + * Indicates whether excel table styles will be the same as grid styles. This is set to applied by default. Custom grid themes are not supported. + * + * Valid values: + * "none" The styles from the grid are not applied to the table region. + * "applied" The styles from the grid are applied to the table region. + */ + gridStyling?: string; + + /** + * Indicates whether all sublevel data will be exported, or only data under expanded rows. + * + * Valid values: + * "allRows" All sublevel data will be exported. + * "expandedRows" Only data under expanded rows will be exported. + */ + dataExportMode?: string; + + /** + * Option for GridExcelExporterSettings + */ + [optionName: string]: any; +} + +interface GridExcelExporterCallbacks { + /** + * Cancel="true" Callback fired when the exporting has started. + * Function takes arguments sender and args. + * Use args.grid to get reference to igGrid widget. + */ + exportStarting?: any; + + /** + * Cancel="true" Callback fired when cell exporting has begin. + * Function takes arguments sender and args. + * Use args.columnKey to get the igGrid column key of the cell. + * Use args.columnIndex to get the igGrid column index of the cell. + * Use args.cellValue to get or set the igGrid cell value. + * Use args.rowId to get key or index of row. + * Use args.xlRow to get reference to the worksheet row. + * Use args.grid to get reference to the igGrid widget. + */ + cellExporting?: any; + + /** + * Callback fired when cell exporting has end. + * Function takes arguments sender and args. + * Use args.columnKey to get the igGrid column key of the cell. + * Use args.columnIndex to get the igGrid column index of the cell. + * Use args.cellValue to get the igGrid cell value. + * Use args.rowId to get key or index of row. + * Use args.xlRow to get reference to the worksheet row. + * Use args.grid to get reference to the igGrid widget. + */ + cellExported?: any; + + /** + * Cancel="true" Callback fired when header cell exporting has begin. + * Function takes arguments sender and args. + * Use args.headerText to get or set the igGrid column key of the header cell. + * Use args.columnKey to get the igGrid column key of the header cell. + * Use args.columnIndex to get the igGrid column index of the header cell. + */ + headerCellExporting?: any; + + /** + * Callback fired when header cell exporting has end. + * Function takes arguments sender and args. + * Use args.headerText to get the igGrid column key of the header cell. + * Use args.columnKey to get the igGrid column key of the header cell. + * Use args.columnIndex to get the igGrid column index of the header cell. + */ + headerCellExported?: any; + + /** + * Cancel="true" Callback fired when row exporting has begin. + * Function takes arguments sender and args. + * Use args.rowId to get key or index of row. + * Use args.element to get row TR element. + * Use args.xlRow to get reference to the worksheet row. + * Use args.grid to get reference to the igGrid widget. + * Note: When exporting an igHierarchicalGrid this callback is available only for the root grid rows. + */ + rowExporting?: any; + + /** + * Cancel="true" Callback fired when row exporting has ended. + * Function takes arguments sender and args. + * Use args.rowId to get key or index of row. + * Use args.element to get row TR element. + * Use args.xlRow to get reference to the worksheet row. + * Use args.grid to get reference to the igGrid widget. + * Note: When exporting an igHierarchicalGrid this callback is available only for the root grid rows. + */ + rowExported?: any; + + /** + * Cancel="true" Callback fired when summary exporting has begun. + * Function takes arguments sender and args. + * Use args.headerText to get the igGrid column header text. + * Use args.columnKey to get the igGrid column key. + * Use args.columnIndex to get the igGrid column index. + * Use args.summary to get a reference to the summary object. + * Use args.xlRowIndex to get reference to worksheet row index. + */ + summaryExporting?: any; + + /** + * Callback fired when cell exporting has end. + * Function takes arguments sender and args. + * Use args.headerText to get the igGrid column header text. + * Use args.columnKey to get the igGrid column key. + * Use args.columnIndex to get the igGrid column index. + * Use args.summary to get a reference to the summary object. + * Use args.xlRowIndex to get the worksheet row index. + */ + summaryExported?: any; + + /** + * Cancel="true" Callback fired when export is ending, but the document is not saved. + * Function takes arguments sender and args. + * Use args.grid to get reference to the igGrid widget. + * Use args.workbook to get reference to the excel workbook. + * Use args.worksheet to get reference to the excel worksheet. + */ + exportEnding?: any; + + /** + * Callback fired when exporting is successful. + * Use data to get the reference of saved object. + */ + success?: any; + + /** + * Callback fired when exporting is failed. + * Use error to get the reference of error object. + */ + error?: any; + + /** + * Option for GridExcelExporterCallbacks + */ + [optionName: string]: any; +} + +declare namespace Infragistics { + class GridExcelExporter { + constructor(settings: GridExcelExporterSettings); + constructor(callbacks: GridExcelExporterCallbacks); + + /** + * Exports the provided igGrid to Excel document. + * + * @param grid Grid to be exported. + * @param userSettings Settings for exporting the grid. + * @param userCallbacks Callbacks for the events. + */ + exportGrid(grid: Object, userSettings: Object, userCallbacks: Object): void; + } +} +interface IgniteUIStatic { +GridExcelExporter: typeof Infragistics.GridExcelExporter; +} + +interface OlapXmlaDataSourceOptionsRequestOptions { + /** + * The value is applied to XmlHttpRequest.withCredentials if supported by the user agent. + * Setting this property to true will allow IE8/IE9 to make authenticated cross-origin requests to tusted domains through XmlHttpRequest instead of XDomainRequest + * and will prompt the user for credentials. + */ + withCredentials?: boolean; + + /** + * A callback to be invoked right before the request is send to the server. Extends beforeSend callback of jQuery.ajax's options object. + */ + beforeSend?: Function; + + /** + * Option for OlapXmlaDataSourceOptionsRequestOptions + */ + [optionName: string]: any; +} + +interface OlapXmlaDataSourceOptionsMdxSettings { + /** + * Optional="true" a value indicating whether a NON EMPTY clause is present on ROWS axis. Default value is true + */ + nonEmptyOnRows?: boolean; + + /** + * Optional="true" a value indicating whether a NON EMPTY clause is present on COLUMNS axis. Default value is true + */ + nonEmptyOnColumns?: boolean; + + /** + * Optional="true" a value indicating whether a members' set expressions on ROWS axis should be wrapped with AddCalculatedMembers MDX method. Default value is true + */ + addCalculatedMembersOnRows?: boolean; + + /** + * Optional="true" a value indicating whether a members' set expressions on COLUMNS axis should be wrapped with AddCalculatedMembers MDX method. Default value is true + */ + addCalculatedMembersOnColumns?: boolean; + + /** + * Optional="true" a string array with the names of intrinsic non-context sensitive member properties applied on ROWS axis. By defult CHILDREN_CARDINALITY and PARENT_UNIQUE_NAME properties are always added to DIMENSION PROPERTIES + */ + dimensionPropertiesOnRows?: any[]; + + /** + * Optional="true" a string array with the names of intrinsic non-context sensitive member properties applied on COLUMNS axis. By defult CHILDREN_CARDINALITY and PARENT_UNIQUE_NAME properties are always added to DIMENSION PROPERTIES + */ + dimensionPropertiesOnColumns?: any[]; + + /** + * Option for OlapXmlaDataSourceOptionsMdxSettings + */ + [optionName: string]: any; +} + +interface OlapXmlaDataSourceOptions { + /** + * Optional="false" The URL of the XMLA server. + */ + serverUrl?: string; + + /** + * The catalog name. + */ + catalog?: string; + + /** + * The name of the cube in the data source. + */ + cube?: string; + + /** + * The name of the measure group in the data source. + */ + measureGroup?: string; + + /** + * A list of measure names separated by comma (,). These will be the measures of the data source. + */ + measures?: string; + + /** + * A list of hierarchy names separated by comma (,). These will be hierarchies in the filters of the data source. + */ + filters?: string; + + /** + * A list of hierarchy names separated by comma (,). These will be the hierarchies in the rows of the data source. + */ + rows?: string; + + /** + * A list of hierarchy names separated by comma (,). These will be the hierarchies in the columns of the data source. + */ + columns?: string; + + /** + * An object containing information about how the request to the XMLA server should be processed. + */ + requestOptions?: OlapXmlaDataSourceOptionsRequestOptions; + + /** + * Enables/disables caching of the XMLA result object. + */ + enableResultCache?: boolean; + + /** + * Additional properties sent with every discover request. + * The object is treated as a key/value store where each property name is used as the key and the property value as the value. + */ + discoverProperties?: any; + + /** + * Additional properties sent with every execute request. + * The object is treated as a key/value store where each property name is used as the key and the property value as the value. + */ + executeProperties?: any; + + /** + * Optional="true" a javascript object containing information about how the request to the xmla server should be processed + */ + mdxSettings?: OlapXmlaDataSourceOptionsMdxSettings; + + /** + * Option for OlapXmlaDataSourceOptions + */ + [optionName: string]: any; +} + +declare namespace Infragistics { + class OlapXmlaDataSource { + constructor(options: OlapXmlaDataSourceOptions); + + /** + * Initializes the data source and returns a promise that will be resolved once the data source is initialized. + * The promise's result will be the metadata tree for the catalog/cube/measureGroup specified in the settings or null if the settings do not provide a valid cube initialization data. + * The data source is not functional until it has been initialized and all other methods other than initialize() will throw an error if isInitialized() returns false. + */ + initialize(): Object; + + /** + * Retrieves the initialization state of the data source. + */ + isInitialized(): boolean; + + /** + * Indicates whether the data source is modified. + */ + isModified(): boolean; + + /** + * Indicates whether the update() method execution is in progress. + */ + isUpdating(): boolean; + + /** + * Retrieves the currently loaded catalogs in the data source. + */ + catalogs(): any[]; + + /** + * Retrieves the current catalog in the data source. + */ + catalog(): Object; + + /** + * Sets the current catalog for the data source and updates the cubes() and catalog() properties. + * + * @param catalogName the name of the catalog. + */ + setCatalog(catalogName: string): Object; + + /** + * Retrieves the currently loaded cubes in the data source. + */ + cubes(): any[]; + + /** + * Retrieves the current cube in the data source. + */ + cube(): Object; + + /** + * Sets the current cube for the data source and updates the cube(), measureGroup() and metadataTree() properties. + * + * @param cubeName the name of the cube. + */ + setCube(cubeName: string): Object; + + /** + * Retrieves the currently loaded measure groups in the data source. + */ + measureGroups(): any[]; + + /** + * Retrieves the current measureGroup in the data source. + */ + measureGroup(): Object; + + /** + * Sets the current measure group for the data source and updates the measureGroup() and metadataTree() properties. + * Even though the catalogs/cubes/measureGroups items are cascading(e.g. in order to load the cubes a catalog has to be set) in order to construct the metadata tree a measure group is not required as it just filters the resulting metadata. + * Once setCube(cubeName) is called the metadata tree would be loaded and the measureGroup() property would be filled with the default '(All)' measure group which indicates that no measure group is selected. + * + * @param measureGroupName the name of the measure group. + */ + setMeasureGroup(measureGroupName: string): Object; + + /** + * Returns the fully loaded metadata tree. + */ + metadataTree(): Object; + + /** + * Adds a hierarchy to the rows of the pivot grid. + * + * @param rowItem An object of type $.ig.Hierarchy which is the hierarchy to add in the pivot grid rows. + */ + addRowItem(rowItem: Object): void; + + /** + * Removes a hierarchy or the measure list from the rows of the pivot grid. + * + * @param rowItem an object of type $.ig.Hierarchy or $.ig.MeasureList which is the hierarchy to remove or the measure list if there are more than one measures added and the measure list location is set to "rows". + */ + removeRowItem(rowItem: Object): void; + + /** + * Adds a hierarchy to the columns of the pivot grid. + * + * @param columnItem an object of type $.ig.Hierarchy which is the hierarchy to add in the pivot grid columns. + */ + addColumnItem(columnItem: Object): void; + + /** + * Removes a hierarchy or the measure list from the columns of the pivot grid. + * + * @param columnItem an object of type $.ig.Hierarchy or $.ig.MeasureList which is the hierarchy to remove or the measure list if there are more than one measures added and the measure list location is set to "columns". + */ + removeColumnItem(columnItem: Object): void; + + /** + * Adds a hierarchy to the filter axis of the pivot grid. + * + * @param filterItem an object of type $.ig.Hierarchy which is the hierarchy to add. + */ + addFilterItem(filterItem: Object): void; + + /** + * Removes a hierarchy from the filter axis of the pivot grid. + * + * @param filterItem an object of type $.ig.Hierarchy which is the hierarchy to remove. + */ + removeFilterItem(filterItem: Object): void; + + /** + * Adds a measure to the measures of the pivot grid. + * + * @param measureItem an object of type $.ig.Measure which is the measure to add. + */ + addMeasureItem(measureItem: Object): void; + + /** + * Removes a measure from the measures of the pivot grid. + * + * @param measureItem An object of type $.ig.Measure which is the measure to remove. + */ + removeMeasureItem(measureItem: Object): void; + + /** + * Sets the index at which the measure list will be positioned in the rows/columns it resides. + * + * @param index the index where measure list to appear. + */ + setMeasureListIndex(index: number): void; + + /** + * Sets the location of the measure list. + * + * @param location accepted values are 'rows' and 'columns'. + */ + setMeasureListLocation(location: Object): void; + + /** + * Sets a tuple member to be expanded next time the update() method is called. + * Calling this method on an already expanded member does nothing. + * + * @param axisName the name of the axis for the tuple. + * @param tupleIndex the index of the tuple in the axis. + * @param memberIndex the index of the member in the tuple. + */ + expandTupleMember(axisName: string, tupleIndex: number, memberIndex: number): void; + + /** + * Sets a tuple member to be collapsed next time the update() method is called. + * Calling this method on an already collapsed member does nothing. + * + * @param axisName the name of the axis for the tuple. + * @param tupleIndex the index of the tuple in the axis. + * @param memberIndex the index of the member in the tuple. + */ + collapseTupleMember(axisName: string, tupleIndex: number, memberIndex: number): void; + + /** + * Returns the items in the row axis. + */ + rowAxis(): any[]; + + /** + * Returns the items in the column axis. + */ + columnAxis(): any[]; + + /** + * Returns the items in the filter axis. + */ + filters(): any[]; + + /** + * Returns the items in the measures axis. + */ + measures(): any[]; + + /** + * Returns the result from the last update or null if the last update was unsuccessful. + */ + result(): Object; + + /** + * Clears all pending changes since last time the update() method is called. + */ + clearPendingChanges(): void; + + /** + * Performs an update with the list of pending changes and updates the data source result. + */ + update(): Object; + + /** + * Gets the first element of the specified elementType which matches the specified predicate or null if there is no such element found. + * + * @param predicate a predicate callback invoked against each core element of the specified type. It has to return true when the element has matched the serach criteria, otherwise - false. + * @param elementType an object specified by $.ig.ICoreOlapElement.prototype.$type property. Valid types which prototype can be examined are: $.ig.Dimension, $.ig.Hierarchy, $.ig.Level, $.ig.Measure and $.ig.MeasureList. + */ + getCoreElement(predicate: Function, elementType: Object): Object; + + /** + * Gets an array with elements of the specified elementType which match the specified predicate or empty array if there is no such element found. + * + * @param predicate a predicate callback invoked against each core element of the specified type. It has to return true when the element has matched the serach criteria, otherwise - false. + * @param elementType an object specified by $.ig.ICoreOlapElement.prototype.$type property. Valid types which prototype can be examined are: $.ig.Dimension, $.ig.Hierarchy, $.ig.Level, $.ig.Measure and $.ig.MeasureList. + */ + getCoreElements(predicate: Function, elementType: Object): Object; + + /** + * Returns $.ig.Dimension object for the specified unique name. + * + * @param dimensionUniqueName the unique name of the searched dimension object. + */ + getDimension(dimensionUniqueName: string): Object; + + /** + * Returns $.ig.Hierarchy object for the specified unique name. + * + * @param hierarchyUniqueName the unique name of the searched hierarchy object. + */ + getHierarchy(hierarchyUniqueName: string): Object; + + /** + * Returns $.ig.Level object for the specified unique name. + * + * @param levelUniqueName the unique name of the searched level object. + */ + getLevel(levelUniqueName: string): Object; + + /** + * Returns $.ig.Measure object for the specified unique name. + * + * @param measureUniqueName the unique name of the searched measure object. + */ + getMeasure(measureUniqueName: string): Object; + + /** + * Returns $.ig.MeasureList object available when operates with more than one $.ig.Measure object. + */ + getMeasureList(): Object; + + /** + * Returns an array of strings with the unique names of selected for given hierarchy filter members. + * + * @param hierarchyUniqueName the unique name of the hierarchy whose active filter members are returned. + */ + getFilterMemberNames(hierarchyUniqueName: string): any[]; + + /** + * Adds a member to list of filter members that will be present in result. + * If a member of given hierarchy is added to this filter list then only those members which are present in this filter list will be present for that hierarchy in the result. + * + * @param hierarchyUniqueName the unique name of the hierarchy this member belongs to. + * @param memberUniqueName the unique name of the member to be added. + */ + addFilterMember(hierarchyUniqueName: string, memberUniqueName: string): void; + + /** + * Removes a member from the list of filter members that will be present in result. + * + * @param hierarchyUniqueName the unique name of the hierarchy this member belongs to. + * @param memberUniqueName the unique name of the member to be removed. + */ + removeFilterMember(hierarchyUniqueName: string, memberUniqueName: string): void; + + /** + * Removes all members from the list of filter members and the filter for the specified hierarchy is cleared. + * + * @param hierarchyUniqueName the unique name of the hierarchy which filter members to be cleared. + */ + removeAllFilterMembers(hierarchyUniqueName: string): void; + + /** + * Returns Promise which on completion provides an array of $.ig.OlapResultAxisMember objects of selected for given level filter member. + * + * @param levelUniqueName the unique name of the member whose active filter members are returned. + */ + getMembersOfLevel(levelUniqueName: string): void; + + /** + * Returns Promise which on completion provides an array of $.ig.OlapResultAxisMember objects of selected for given hierarchy filter member. + * + * @param hierarchyUniqueName the unique name of the member whose active filter members are returned. + */ + getMembersOfHierarchy(hierarchyUniqueName: string): void; + + /** + * Returns Promise which on completion provides an array of $.ig.OlapResultAxisMember objects that are children of the current member. + * + * @param memberUniqueName the unique name of the member whose active filter members are returned. + */ + getMembersOfMember(memberUniqueName: string): void; + } +} +interface IgniteUIStatic { +OlapXmlaDataSource: typeof Infragistics.OlapXmlaDataSource; +} + +interface OlapFlatDataSourceOptionsMetadataCubeMeasuresDimensionMeasure { + /** + * Optional="false" A unique name for the measure. + */ + name?: string; + + /** + * A caption for the measure. + */ + caption?: string; + + /** + * Optional="false" An aggregator function called when each cell is evaluated. + * Returns a value for the cell. If the returned value is null, no cell will be created in for the data source result. + */ + aggregator?: Function; + + /** + * The path used when displaying the measure in the user interface. Nested folders are indicated by a backslash (\). + */ + displayFolder?: string; + + /** + * Option for OlapFlatDataSourceOptionsMetadataCubeMeasuresDimensionMeasure + */ + [optionName: string]: any; +} + +interface OlapFlatDataSourceOptionsMetadataCubeMeasuresDimension { + /** + * A unique name for the measures dimension. + * The default value is "Measures". This name is used to create the names of dimensions using the following pattern: + * [].[] + */ + name?: string; + + /** + * A caption for the measures dimension. + * The default value is "Measures". + */ + caption?: string; + + /** + * An array of measure metadata objects. + */ + measures?: OlapFlatDataSourceOptionsMetadataCubeMeasuresDimensionMeasure[]; + + /** + * Option for OlapFlatDataSourceOptionsMetadataCubeMeasuresDimension + */ + [optionName: string]: any; +} + +interface OlapFlatDataSourceOptionsMetadataCubeDimensionHierarchieLevel { + /** + * Optional="false" A name for the level. + * The unique name of the level is formed using the following pattern: + * {}.[] + */ + name?: string; + + /** + * A caption for the level. + */ + caption?: string; + + /** + * A function called for each item of the data source array when level members are created. + * Based on the item parameter the function should return a value that will form the $.ig.Member’s name and caption. + */ + memberProvider?: Function; + + /** + * Option for OlapFlatDataSourceOptionsMetadataCubeDimensionHierarchieLevel + */ + [optionName: string]: any; +} + +interface OlapFlatDataSourceOptionsMetadataCubeDimensionHierarchie { + /** + * Optional="false" A name for the hierarchy. + * The unique name of the hierarchy is formed using the following pattern: + * [].[] + */ + name?: string; + + /** + * A caption for the hierarchy. + */ + caption?: string; + + /** + * The path to be used when displaying the hierarchy in the user interface. + * Nested folders are indicated by a backslash (\). + * The folder hierarchy will appear under parent dimension node. + */ + displayFolder?: string; + + /** + * An array of level metadata objects. + */ + levels?: OlapFlatDataSourceOptionsMetadataCubeDimensionHierarchieLevel[]; + + /** + * Option for OlapFlatDataSourceOptionsMetadataCubeDimensionHierarchie + */ + [optionName: string]: any; +} + +interface OlapFlatDataSourceOptionsMetadataCubeDimension { + /** + * Optional="false" A unique name for the dimension. + */ + name?: string; + + /** + * A caption for the dimension. + */ + caption?: string; + + /** + * An array of hierarchy metadata objects. + */ + hierarchies?: OlapFlatDataSourceOptionsMetadataCubeDimensionHierarchie[]; + + /** + * Option for OlapFlatDataSourceOptionsMetadataCubeDimension + */ + [optionName: string]: any; +} + +interface OlapFlatDataSourceOptionsMetadataCube { + /** + * Optional="false" A unique name for the cube. + */ + name?: string; + + /** + * A caption for the cube. + */ + caption?: string; + + /** + * An object providing information about the measures' root node. + */ + measuresDimension?: OlapFlatDataSourceOptionsMetadataCubeMeasuresDimension; + + /** + * An array of dimension metadata objects. + */ + dimensions?: OlapFlatDataSourceOptionsMetadataCubeDimension[]; + + /** + * Option for OlapFlatDataSourceOptionsMetadataCube + */ + [optionName: string]: any; +} + +interface OlapFlatDataSourceOptionsMetadata { + /** + * Optional="false" Metadata used for the creation of the cube. + */ + cube?: OlapFlatDataSourceOptionsMetadataCube; + + /** + * Option for OlapFlatDataSourceOptionsMetadata + */ + [optionName: string]: any; +} + +interface OlapFlatDataSourceOptions { + /** + * Optional="true" Specifies any valid data source accepted by $.ig.DataSource, or an instance of an $.ig.DataSource itself. + */ + dataSource?: any; + + /** + * Optional="true" Specifies a remote URL accepted by $.ig.DataSource in order to request data from it. + */ + dataSourceUrl?: string; + + /** + * Optional="true" Explicitly set data source type (such as "json"). Please refer to the documentation of $.ig.DataSource and its type property. + */ + dataSourceType?: string; + + /** + * Optional="true" Specifies the name of the property in which data records are held if the response is wrapped. + */ + responseDataKey?: string; + + /** + * Optional="true" Explicitly set data source type (such as "json"). Please refer to the documentation of $.ig.DataSource and its type property. + */ + responseDataType?: string; + + /** + * A list of measure names separated by comma (,). These will be the measures of the data source. + */ + measures?: string; + + /** + * A list of hierarchy names separated by comma (,). These will be hierarchies in the filters of the data source. + */ + filters?: string; + + /** + * A list of hierarchy names separated by comma (,). These will be the hierarchies in the rows of the data source. + */ + rows?: string; + + /** + * A list of hierarchy names separated by comma (,). These will be the hierarchies in the columns of the data source. + */ + columns?: string; + + /** + * Optional="false" An object containing processing instructions for the $.ig.DataSource data. + */ + metadata?: OlapFlatDataSourceOptionsMetadata; + + /** + * Option for OlapFlatDataSourceOptions + */ + [optionName: string]: any; +} + +declare namespace Infragistics { + class OlapFlatDataSource { + constructor(options: OlapFlatDataSourceOptions); + + /** + * Initializes the data source and returns a promise that will be resolved once the data source is initialized. + * The promise's result will be the metadata tree for the catalog/cube/measureGroup specified in the settings or null if the settings do not provide a valid cube initialization data. + * The data source is not functional until it has been initialized and all other methods other than initialize() will throw an error if isInitialized() returns false. + */ + initialize(): Object; + + /** + * Retrieves the initialization state of the data source. + */ + isInitialized(): boolean; + + /** + * Indicates whether the data source is modified. + */ + isModified(): boolean; + + /** + * Indicates whether the update() method execution is in progress. + */ + isUpdating(): boolean; + + /** + * Retrieves the currently loaded cubes in the data source. + */ + cubes(): any[]; + + /** + * Retrieves the current cube in the data source. + */ + cube(): Object; + + /** + * Sets the current cube for the data source and updates the cube(), measureGroup() and metadataTree() properties. + * + * @param cubeName the name of the cube. + */ + setCube(cubeName: string): Object; + + /** + * Returns the fully loaded metadata tree. + */ + metadataTree(): Object; + + /** + * Adds a hierarchy to the rows of the pivot grid. + * + * @param rowItem An object of type $.ig.Hierarchy which is the hierarchy to add in the pivot grid rows. + */ + addRowItem(rowItem: Object): void; + + /** + * Removes a hierarchy or the measure list from the rows of the pivot grid. + * + * @param rowItem an object of type $.ig.Hierarchy or $.ig.MeasureList which is the hierarchy to remove or the measure list if there are more than one measures added and the measure list location is set to "rows". + */ + removeRowItem(rowItem: Object): void; + + /** + * Adds a hierarchy to the columns of the pivot grid. + * + * @param columnItem an object of type $.ig.Hierarchy which is the hierarchy to add in the pivot grid columns. + */ + addColumnItem(columnItem: Object): void; + + /** + * Removes a hierarchy or the measure list from the columns of the pivot grid. + * + * @param columnItem an object of type $.ig.Hierarchy or $.ig.MeasureList which is the hierarchy to remove or the measure list if there are more than one measures added and the measure list location is set to "columns". + */ + removeColumnItem(columnItem: Object): void; + + /** + * Adds a hierarchy to the filter axis of the pivot grid. + * + * @param filterItem an object of type $.ig.Hierarchy which is the hierarchy to add. + */ + addFilterItem(filterItem: Object): void; + + /** + * Removes a hierarchy from the filter axis of the pivot grid. + * + * @param filterItem an object of type $.ig.Hierarchy which is the hierarchy to remove. + */ + removeFilterItem(filterItem: Object): void; + + /** + * Adds a measure to the measures of the pivot grid. + * + * @param measureItem an object of type $.ig.Measure which is the measure to add. + */ + addMeasureItem(measureItem: Object): void; + + /** + * Removes a measure from the measures of the pivot grid. + * + * @param measureItem An object of type $.ig.Measure which is the measure to remove. + */ + removeMeasureItem(measureItem: Object): void; + + /** + * Sets the index at which the measure list will be positioned in the rows/columns it resides. + * + * @param index the index where measure list to appear. + */ + setMeasureListIndex(index: number): void; + + /** + * Sets the location of the measure list. + * + * @param location accepted values are 'rows' and 'columns'. + */ + setMeasureListLocation(location: Object): void; + + /** + * Sets a tuple member to be expanded next time the update() method is called. + * Calling this method on an already expanded member does nothing. + * + * @param axisName the name of the axis for the tuple. + * @param tupleIndex the index of the tuple in the axis. + * @param memberIndex the index of the member in the tuple. + */ + expandTupleMember(axisName: string, tupleIndex: number, memberIndex: number): void; + + /** + * Sets a tuple member to be collapsed next time the update() method is called. + * Calling this method on an already collapsed member does nothing. + * + * @param axisName the name of the axis for the tuple. + * @param tupleIndex the index of the tuple in the axis. + * @param memberIndex the index of the member in the tuple. + */ + collapseTupleMember(axisName: string, tupleIndex: number, memberIndex: number): void; + + /** + * Returns the items in the row axis. + */ + rowAxis(): any[]; + + /** + * Returns the items in the column axis. + */ + columnAxis(): any[]; + + /** + * Returns the items in the filter axis. + */ + filters(): any[]; + + /** + * Returns the items in the measures axis. + */ + measures(): any[]; + + /** + * Returns the result from the last update or null if the last update was unsuccessful. + */ + result(): Object; + + /** + * Clears all pending changes since last time the update() method is called. + */ + clearPendingChanges(): void; + + /** + * Performs an update with the list of pending changes and updates the data source result. + */ + update(): Object; + + /** + * Gets the first element of the specified elementType which matches the specified predicate or null if there is no such element found. + * + * @param predicate a predicate callback invoked against each core element of the specified type. It has to return true when the element has matched the serach criteria, otherwise - false. + * @param elementType an object specified by $.ig.ICoreOlapElement.prototype.$type property. Valid types which prototype can be examined are: $.ig.Dimension, $.ig.Hierarchy, $.ig.Level, $.ig.Measure and $.ig.MeasureList. + */ + getCoreElement(predicate: Function, elementType: Object): Object; + + /** + * Gets an array with elements of the specified elementType which match the specified predicate or empty array if there is no such element found. + * + * @param predicate a predicate callback invoked against each core element of the specified type. It has to return true when the element has matched the serach criteria, otherwise - false. + * @param elementType an object specified by $.ig.ICoreOlapElement.prototype.$type property. Valid types which prototype can be examined are: $.ig.Dimension, $.ig.Hierarchy, $.ig.Level, $.ig.Measure and $.ig.MeasureList. + */ + getCoreElements(predicate: Function, elementType: Object): Object; + + /** + * Returns $.ig.Dimension object for the specified unique name. + * + * @param dimensionUniqueName the unique name of the searched dimension object. + */ + getDimension(dimensionUniqueName: string): Object; + + /** + * Returns $.ig.Hierarchy object for the specified unique name. + * + * @param hierarchyUniqueName the unique name of the searched hierarchy object. + */ + getHierarchy(hierarchyUniqueName: string): Object; + + /** + * Returns $.ig.Level object for the specified unique name. + * + * @param levelUniqueName the unique name of the searched level object. + */ + getLevel(levelUniqueName: string): Object; + + /** + * Returns $.ig.Measure object for the specified unique name. + * + * @param measureUniqueName the unique name of the searched measure object. + */ + getMeasure(measureUniqueName: string): Object; + + /** + * Returns $.ig.MeasureList object available when operates with more than one $.ig.Measure object. + */ + getMeasureList(): Object; + + /** + * Returns an array of strings with the unique names of selected for given hierarchy filter members. + * + * @param hierarchyUniqueName the unique name of the hierarchy whose active filter members are returned. + */ + getFilterMemberNames(hierarchyUniqueName: string): any[]; + + /** + * Adds a member to list of filter members that will be present in result. + * If a member of given hierarchy is added to this filter list then only those members which are present in this filter list will be present for that hierarchy in the result. + * + * @param hierarchyUniqueName the unique name of the hierarchy this member belongs to. + * @param memberUniqueName the unique name of the member to be added. + */ + addFilterMember(hierarchyUniqueName: string, memberUniqueName: string): void; + + /** + * Removes a member from the list of filter members that will be present in result. + * + * @param hierarchyUniqueName the unique name of the hierarchy this member belongs to. + * @param memberUniqueName the unique name of the member to be removed. + */ + removeFilterMember(hierarchyUniqueName: string, memberUniqueName: string): void; + + /** + * Removes all members from the list of filter members and the filter for the specified hierarchy is cleared. + * + * @param hierarchyUniqueName the unique name of the hierarchy which filter members to be cleared. + */ + removeAllFilterMembers(hierarchyUniqueName: string): void; + + /** + * Returns Promise which on completion provides an array of $.ig.OlapResultAxisMember objects of selected for given level filter member. + * + * @param levelUniqueName the unique name of the level whose active filter members are returned. + */ + getMembersOfLevel(levelUniqueName: string): void; + + /** + * Returns Promise which on completion provides an array of $.ig.OlapResultAxisMember objects of selected for given hierarchy filter member. + * + * @param hierarchyUniqueName the unique name of the hierarchy whose active filter members are returned. + */ + getMembersOfHierarchy(hierarchyUniqueName: string): void; + + /** + * Returns Promise which on completion provides an array of $.ig.OlapResultAxisMember objects that are children of the current member. + * + * @param memberUniqueName the unique name of the member whose active filter members are returned. + */ + getMembersOfMember(memberUniqueName: string): void; + } +} +interface IgniteUIStatic { +OlapFlatDataSource: typeof Infragistics.OlapFlatDataSource; +} + +declare namespace Infragistics { + class OlapMetadataTreeItem { + /** + * Returns the OLAP metadata item that this tree item represents which is an object of type $.ig.Cube, $.ig.Dimension, $.ig.Hierarchy, $.ig.Measure, $.ig.Level. + */ + item(): Object; + + /** + * Returns the metadata tree item type which is a value from the $.ig.MetadataTreeItemType enumeration. + * + * $.ig.MetadataTreeItemType.prototype.cube = 0; + * Item type for the cube tree items. Contain an item() of type $.ig.Cube. + * + * $.ig.MetadataTreeItemType.prototype.dimension = 1; + * Item type for the dimension tree items. Contain an item() of type $.ig.Dimension. + * + * $.ig.MetadataTreeItemType.prototype.group = 2; + * Item type for the group tree items. Does not have item(). + * + * $.ig.MetadataTreeItemType.prototype.userDefinedHierarchy = 3; + * Item type for the userDefinedHierarchy tree items. Contain an item() of type $.ig.Hierarchy. + * + * $.ig.MetadataTreeItemType.prototype.systemEnabledHierarchy = 4; + * Item type for the systemEnabledHierarchy tree items. Contain an item() of type $.ig.Hierarchy. + * + * $.ig.MetadataTreeItemType.prototype.parentChildHierarchy = 5; + * Item type for the parentChildHierarchy tree items. Contain an item() of type $.ig.Hierarchy. + * + * $.ig.MetadataTreeItemType.prototype.measure = 6; + * Item type for the measure tree items. Contain an item() of type $.ig.Measure. + * + * $.ig.MetadataTreeItemType.prototype.level1 = 7; + * Item type for the level1 tree items. Contain an item() of type $.ig.Level. + * + * $.ig.MetadataTreeItemType.prototype.level2 = 8; + * Item type for the level2 tree items. Contain an item() of type $.ig.Level. + * + * $.ig.MetadataTreeItemType.prototype.level3 = 9; + * Item type for the level3 tree items. Contain an item() of type $.ig.Level. + * + * $.ig.MetadataTreeItemType.prototype.level4 = 10; + * Item type for the level4 tree items. Contain an item() of type $.ig.Level. + * + * $.ig.MetadataTreeItemType.prototype.level5 = 11; + * Item type for the level5 tree items. Contain an item() of type $.ig.Level. + */ + type(): number; + + /** + * Returns the caption text that should be displayed for this tree item. + */ + caption(): string; + + /** + * Returns the children ot this tree item. + */ + children(): Object; + } +} + +interface OlapResultViewOptions { + /** + * Optional="false" an object of type $.ig.OlapResult which represents the full cached result. + */ + result?: any; + + /** + * Optional="false" an object of type $.ig.OlapResult which represents the visible part of the result. + */ + visibleResult?: any; + + /** + * Optional="false" a value indicating whether the result has one or more hierarchies in the columns. + */ + hasColumns?: boolean; + + /** + * Optional="false" a value indicating whether the result has one or more hierarchies in the rows. + */ + hasRows?: boolean; + + /** + * Option for OlapResultViewOptions + */ + [optionName: string]: any; +} + +declare namespace Infragistics { + class OlapResultView { + constructor(options: OlapResultViewOptions); + + /** + * Creates a new $.ig.OlapResultView object with result object having the same structure as the original one and new visibleResult where the tuples which appear as children under specified tuple and member index are no longer present. + * + * @param axisName + * @param tupleIndex + * @param memberIndex + */ + collapseTupleMember(axisName: Object, tupleIndex: Object, memberIndex: Object): Object; + + /** + * Creates a $.ig.OlapResultView view object with result object having the same structure as the original one and new visibleResult where the tuples which appear as children under specified tuple and member index are accessible as part of the visibleResult. + * + * @param axisName + * @param tupleIndex + * @param memberIndex + */ + expandTupleMember(axisName: Object, tupleIndex: Object, memberIndex: Object): Object; + + /** + * Creates a new $.ig.OlapResultView object as the axis specified by axisName of the original result object is extended with the tuples of the same axis found into supplied partialResult object. + * + * @param partialResult + * @param axisName + */ + extend(partialResult: Object, axisName: Object): Object; + } +} +interface IgniteUIStatic { +OlapResultView: typeof Infragistics.OlapResultView; +} + +interface OlapTableViewOptionsViewSettings { + /** + * Optional="false" a value indicating whether parent for columns is in front of its children. + * If set to true the query set sorts members in a level in their natural order. Their natural order is the default ordering of the members along the hierarchy when no other sort conditions are specified. + * Child members immediately follow their parent members. + * If set to false the query set sorts the members in a level using a post-natural order. In other words, child members precede their parents. + */ + isParentInFrontForColumns?: boolean; + + /** + * Optional="false" a value indicating whether parent for rows is in front of its children. + * If set to true the query set sorts members in a level in their natural order. Their natural order is the default ordering of the members along the hierarchy when no other sort conditions are specified. + * Child members immediately follow their parent members. + * If set to false the query set sorts the members in a level using a post-natural order. In other words, child members precede their parents. + */ + isParentInFrontForRows?: boolean; + + /** + * Optional="false" value indicating wheter the column headers should be arranged for compact header layout - each hieararchy is in a single row. + */ + compactColumnHeaders?: boolean; + + /** + * Optional="false" value indicating wheter the row headers should be arranged for compact header layout - each hieararchy is in a single row. + */ + compactRowHeaders?: boolean; + + /** + * Option for OlapTableViewOptionsViewSettings + */ + [optionName: string]: any; +} + +interface OlapTableViewOptions { + /** + * Optional="false" an object of type $.ig.OlapResult. + */ + result?: any; + + /** + * Optional="false" a value indicating whether the result has one or more hierarchies in the columns. + */ + hasColumns?: boolean; + + /** + * Optional="false" a value indicating whether the result has one or more hierarchies in the rows. + */ + hasRows?: boolean; + + /** + * Optional="false" an object containing the table view configuration options as properties. + */ + viewSettings?: OlapTableViewOptionsViewSettings; + + /** + * Option for OlapTableViewOptions + */ + [optionName: string]: any; +} + +declare namespace Infragistics { + class OlapTableView { + constructor(options: OlapTableViewOptions); + + /** + * Initializes the table view object as its rowHeaders, columnHeaders and resultCells are created for the result object the table view is related to. + * Applies the items from the columnSortDirections and levelDortDirections to produce the sorted result. + */ + initialize(): void; + + /** + * Returns the configuration object this table view is created with. + */ + viewSettings(): Object; + + /** + * Gets or sets the column sort direction items, which will be applied when the $.ig.OlapTableView is initialized. + * - tupleIndex (number): specifies the index of the tuple, which corresponds to a column in the column axis. + * - sortDirection (string: ascending|descending): indicates the sort direction for the column. The allowed values are 'ascending' (default) and 'descending'. + * - comparer (function): an optional function, which will be used to compare the cells from the column. The function should return a number: + * 1. If Cell1 < Cell2, return a value lower than 0. + * 2. If Cell1 == Cell2, return 0. + * 3. If Cell1 > Cell2, return a value greater than 0. + * + * @param columnSortDirections an array of objects, which have the following properties: + */ + columnSortDirections(columnSortDirections?: any[]): any[]; + + /** + * Returns the column sort direction items, which were applied during the $.ig.OlapTableView initialization. + */ + appliedColumnSortDirections(): any[]; + + /** + * Gets or sets the level sort direction items, which will be applied when the $.ig.OlapTableView is + * - levelUniqueName (string): the name of the level to be sorted. + * - sortDirection (string: ascending|descending): indicates the sort direction for the level. The allowed values are 'ascending' (default) and 'descending'. + * - sortBehavior (string: alphabetical|system): indicates the type of sorting to be applied. The allowed values are 'alphabetical' (default) and 'system'. + * + * @param levelSortDirections an array of objects, which have the following properties: + */ + levelSortDirections(levelSortDirections?: any[]): any[]; + + /** + * Returns the level sort direction items, which were applied during the $.ig.OlapTableView initialization. + */ + appliedLevelSortDirections(): any[]; + + /** + * Returns a javascript object, which maps the applied level sort directions to the axis name, hierarchy index in the axis and the level depth. + * It is used internally to determine, which $.ig.OlapTableViewHeaderCell needs to display a sorting indicator in the user interface. + */ + appliedSortDirectionsMap(): Object; + + /** + * Returns the table row headers. + */ + rowHeaders(): any[]; + + /** + * Returns the table column headers. + */ + columnHeaders(): any[]; + + /** + * Returns the table result cells ordered as if the grid is iterated row by row. + */ + resultCells(): any[]; + + /** + * Returns the sorted $.ig.OlapResult object. + */ + result(): Object; + } +} +interface IgniteUIStatic { +OlapTableView: typeof Infragistics.OlapTableView; +} + +declare namespace Infragistics { + class OlapTableViewHeaderCell { + /** + * Returns the caption for the header cell. + */ + caption(): string; + + /** + * Returns the expaned state for the header cell. + */ + isExpanded(): boolean; + + /** + * Indicates whether the header cell can be expanded. + */ + isExpanable(): boolean; + + /** + * Returns the row index for the header cell. + */ + rowIndex(): number; + + /** + * Returns the row span for the header cell. + */ + rowSpan(): number; + + /** + * Returns the column index for the header cell. + */ + columnIndex(): number; + + /** + * Returns the column span for the header cell. + */ + columnSpan(): number; + + /** + * Returns the name of the axis this header cell is related to. + */ + axisName(): string; + + /** + * Returns the index of tuple in the axis this header cell is related to. + */ + tupleIndex(): number; + + /** + * Returns the index of the axis member in the tuple this header cell is related to. + */ + memberIndex(): number; + } +} + +declare namespace Infragistics { + class OlapTableViewResultCell { + /** + * Returns the value provided by $.ig.Cell object. + */ + value(): Object; + + /** + * Returns the formmated value to be displayed by the data cell. + */ + formattedValue(): string; + + /** + * Returns the ordinal of this cell used to determine its position into the data cells' grid. + */ + cellOrdinal(): number; + + /** + * Returns the index of $.ig.Cell object in $.ig.OlapResult object. + */ + resultCellIndex(): number; + } +} + +declare namespace Infragistics { + class Catalog { + /** + * Returns the name of the catalog. + * + * @param value + */ + name(value: Object): string; + + /** + * Returns the unique name of the catalog. + * + * @param value + */ + uniqueName(value: Object): string; + + /** + * Returns the caption of the catalog used when displaying the name of the catalog to the user. + * + * @param value + */ + caption(value: Object): string; + + /** + * Returns the description of the catalog which is a human-readable description of the catalog + * + * @param value + */ + description(value: Object): string; + } +} + +declare namespace Infragistics { + class Cube { + /** + * Returns the name of the cube. + * + * @param value + */ + name(value: Object): string; + + /** + * Returns the unique name of the cube. + * + * @param value + */ + uniqueName(value: Object): string; + + /** + * Returns the caption of the cube used when displaying the name of the cube to the user. + * + * @param value + */ + caption(value: Object): string; + + /** + * Returns a user-friendly description of the cube. + * + * @param value + */ + description(value: Object): string; + + /** + * Returns the type of the cube which is a value from the $.ig.CubeType enumeration. + * + * $.ig.CubeType.prototype.cube = 0; + * $.ig.CubeType.prototype.dimension = 1; + * $.ig.CubeType.prototype.unknown = 2; + * + * @param value + */ + cubeType(value: Object): number; + + /** + * Returns the date and time on which the cube was last processed. + * + * @param value + */ + lastProcessed(value: Object): Object; + + /** + * Returns the date and time on which the cube was last updated. + * + * @param value + */ + lastUpdated(value: Object): Object; + } +} + +declare namespace Infragistics { + class Dimension { + /** + * Returns the name of the dimension. + * + * @param value + */ + name(value: Object): string; + + /** + * Returns the unique name of the dimension. + * + * @param value + */ + uniqueName(value: Object): string; + + /** + * Returns the caption of the dimension used when displaying the name of the dimension to the user. + * + * @param value + */ + caption(value: Object): string; + + /** + * Returns a user-friendly description of the dimension. + * + * @param value + */ + description(value: Object): string; + + /** + * Returns the type of the dimension which is a value from the $.ig.DimensionType enumeration. + * + * $.ig.DimensionType.prototype.unknown = 0; + * $.ig.DimensionType.prototype.time = 1; + * $.ig.DimensionType.prototype.measure = 2; + * $.ig.DimensionType.prototype.other = 3; + * $.ig.DimensionType.prototype.quantitative = 5; + * $.ig.DimensionType.prototype.accounts = 6; + * $.ig.DimensionType.prototype.customers = 7; + * $.ig.DimensionType.prototype.products = 8; + * $.ig.DimensionType.prototype.scenario = 9; + * $.ig.DimensionType.prototype.utility = 10; + * $.ig.DimensionType.prototype.currency = 11; + * $.ig.DimensionType.prototype.rates = 12; + * $.ig.DimensionType.prototype.channel = 13; + * $.ig.DimensionType.prototype.promotion = 14; + * $.ig.DimensionType.prototype.organization = 15; + * $.ig.DimensionType.prototype.billOfMaterials = 16; + * $.ig.DimensionType.prototype.geography = 17; + * + * @param value + */ + dimensionType(value: Object): number; + } +} + +declare namespace Infragistics { + class Hierarchy { + /** + * Returns the name of the hierarchy. + * + * @param value + */ + name(value: Object): string; + + /** + * Returns the unique name of the hierarchy. + * + * @param value + */ + uniqueName(value: Object): string; + + /** + * Returns the caption of the hierarchy used when displaying the name of the hierarchy to the user. + * + * @param value + */ + caption(value: Object): string; + + /** + * Returns a user-friendly description of the hierarchy. + * + * @param value + */ + description(value: Object): string; + + /** + * Returns the unique name of the default member for the hierarchy. + * + * @param value + */ + defaultMember(value: Object): string; + + /** + * Returns the unique name of the 'All' member for the hierarchy. + * + * @param value + */ + allMember(value: Object): string; + + /** + * Returns the unique name of the dimension that contains the hierarchy. + * + * @param value + */ + dimensionUniqueName(value: Object): string; + + /** + * Returns the source of the hierarchy which is a value from the $.ig.HierarchyOrigin enumeration. + * + * $.ig.HierarchyOrigin.prototype.userDefined = 1; + * Identifies user defined hierarchies. + * + * $.ig.HierarchyOrigin.prototype.systemEnabled = 2; + * Identifies attribute hierarchies. + * + * $.ig.HierarchyOrigin.prototype.systemInternal = 4; + * Identifies attributes with no attribute . + * + * @param value + */ + hierarchyOrigin(value: Object): number; + + /** + * Returns the hierarchy display folder path to be used when displaying the hierarchy in the user interface. + * Folder names will be separated by a semicolon (;). Nested folders are indicated by a backslash (\). + * + * @param value + */ + hierarchyDisplayFolder(value: Object): string; + } +} + +declare namespace Infragistics { + class Measure { + /** + * Returns the name of the measure. + * + * @param value + */ + name(value: Object): string; + + /** + * Returns the unique name of the measure. + * + * @param value + */ + uniqueName(value: Object): string; + + /** + * Returns the caption of the measure used when displaying the name of the measure to the user. + * + * @param value + */ + caption(value: Object): string; + + /** + * Returns a user-friendly description of the measure. + * + * @param value + */ + description(value: Object): string; + + /** + * Returns the name of the measure group this measure belongs to. + * + * @param value + */ + measureGroupName(value: Object): string; + + /** + * Returns the aggregator type that identifies how a measure was derived. It is a value from the $.ig.AggregatorType enumeration. + * + * $.ig.AggregatorType.prototype.unknown = 0; + * The aggregated function is undefined. + * + * $.ig.AggregatorType.prototype.sum = 1; + * The aggregated function adds all values. + * + * $.ig.AggregatorType.prototype.count = 2; + * The aggregated function will count the number of the values. + * + * $.ig.AggregatorType.prototype.min = 3; + * The aggregated function will returns the smallest value. + * + * $.ig.AggregatorType.prototype.max = 4; + * The aggregated function will returns the largest value. + * + * $.ig.AggregatorType.prototype.average = 5; + * The aggregated function will returns the average of cells value. + * + * $.ig.AggregatorType.prototype.variance = 6; + * The aggregated function will estimates variance based on the sample. + * + * $.ig.AggregatorType.prototype.std = 7; + * The aggregated function will estimates the standart deviation based on sample. + * + * $.ig.AggregatorType.prototype.distinctCount = 8; + * The aggregated function will returns the number of distinct, nonempty tuples in a set. + * + * $.ig.AggregatorType.prototype.none = 9; + * No aggregation performed. + * + * $.ig.AggregatorType.prototype.averageOfChildren = 10; + * The aggregated function will returns the average of the measure's children. + * + * $.ig.AggregatorType.prototype.firstNonEmpty = 13; + * The aggregated function will returns the measure's first nonempty member. + * + * $.ig.AggregatorType.prototype.lastNonEmpty = 14; + * The aggregated function will returns the measure's last nonempty member. + * + * $.ig.AggregatorType.prototype.byAccount = 15; + * Aggregated by the aggregation function associated with the specified account type of an attribute in an account dimension. + * + * $.ig.AggregatorType.prototype.calculated = 127; + * The aggregated function will returns the result derived from a formula. + * + * @param value + */ + aggregatorType(value: Object): number; + + /** + * Returns the default format string for the measure. + * + * @param value + */ + defaultFormatString(value: Object): string; + + /** + * Returns the measure display folder path to be used when displaying the measure in the user interface. + * Folder names will be separated by a semicolon (;). Nested folders are indicated by a backslash (\). + * + * @param value + */ + measureDisplayFolder(value: Object): string; + } +} + +declare namespace Infragistics { + class Level { + /** + * Returns the name of the level. + * + * @param value + */ + name(value: Object): string; + + /** + * Returns the unique name of the level. + * + * @param value + */ + uniqueName(value: Object): string; + + /** + * Returns the caption of the level used when displaying the name of the level to the user. + * + * @param value + */ + caption(value: Object): string; + + /** + * Returns a user-friendly description of the level. + * + * @param value + */ + description(value: Object): string; + + /** + * Returns the distance of the level from the root of the level. Root level is zero (0) + * + * @param value + */ + depth(value: Object): number; + + /** + * Returns the unique name of the hierarchy that contains the level. + * + * @param value + */ + hierarchyUniqueName(value: Object): string; + + /** + * Returns the unique name of the dimension that contains the level. + * + * @param value + */ + dimensionUniqueName(value: Object): string; + + /** + * Returns the count of all members in the level. + * + * @param value + */ + membersCount(value: Object): number; + + /** + * Returns a value that defines how the level was sourced. + * + * @param value + */ + levelOrigin(value: Object): number; + + /** + * Returns the ID of the attribute that the level is sorted on. + * + * @param value + */ + levelOrderingProperty(value: Object): number; + } +} + +declare namespace Infragistics { + class MeasureGroup { + /** + * Returns the name of the measure group. + * + * @param value + */ + name(value: Object): string; + + /** + * Returns the caption of the measure group used when displaying the name of the measure group to the user. + * + * @param value + */ + caption(value: Object): string; + + /** + * Returns a user-friendly description of the measure group. + * + * @param value + */ + description(value: Object): string; + + /** + * Returns the name of the catalog to which this measure group belongs. + * + * @param value + */ + catalogName(value: Object): string; + + /** + * Returns the name of the cube to which this measure group belongs + * + * @param value + */ + cubeName(value: Object): string; + } +} + +declare namespace Infragistics { + class MeasureList { + /** + * Returns the caption of the measure list used when displaying the name of the measure list to the user. + * + * @param value + */ + caption(value: Object): string; + + /** + * Returns an array of $.ig.Measure objects this measure list is grouping. + * + * @param value + */ + measures(value: Object): any[]; + } +} + +declare namespace Infragistics { + class OlapResult { + /** + * Returns a value indicating whether the result object contains any data. + * + * @param value + */ + isEmpty(value: Object): boolean; + + /** + * Returns an array of $.ig.OlapResultAxis objects this result is built on. + * + * @param value + */ + axes(value: Object): any[]; + + /** + * Returns an array of $.ig.OlapResultCell objects which hold the result data. + * + * @param value + */ + cells(value: Object): any[]; + } +} + +interface OlapResultAxisOptions { + /** + * Optional="false" array of $.ig.OlapResultTuple objects which form the axis. + */ + tuples?: any[]; + + /** + * Optional="false" the count of the $.ig.OlapResultAxisMember objects of each tuple. + */ + tupleSize?: number; + + /** + * Option for OlapResultAxisOptions + */ + [optionName: string]: any; +} + +declare namespace Infragistics { + class OlapResultAxis { + constructor(options: OlapResultAxisOptions); + + /** + * Returns an array of $.ig.OlapResultTuple objects which form the axis. + */ + tuples(): any[]; + + /** + * Returns the count of the $.ig.OlapResultAxisMember objects of each tuple. + */ + tupleSize(): number; + } +} +interface IgniteUIStatic { +OlapResultAxis: typeof Infragistics.OlapResultAxis; +} + +interface OlapResultTupleOptions { + /** + * Optional="false" array of $.ig.OlapResultAxisMember objects which form the tuple object. + */ + members?: any[]; + + /** + * Option for OlapResultTupleOptions + */ + [optionName: string]: any; +} + +declare namespace Infragistics { + class OlapResultTuple { + constructor(options: OlapResultTupleOptions); + + /** + * Returns an array of $.ig.OlapResultTuple objects which form the axis. + */ + members(): any[]; + } +} +interface IgniteUIStatic { +OlapResultTuple: typeof Infragistics.OlapResultTuple; +} + +declare namespace Infragistics { + class OlapResultAxisMember { + /** + * Returns the unique name of the axis member. + * + * @param value + */ + uniqueName(value: Object): string; + + /** + * Returns the caption of the axis member used when displaying the name of the axis member to the user. + * + * @param value + */ + caption(value: Object): string; + + /** + * Returns the unique name of the level this member belongs to. + * + * @param value + */ + levelUniqueName(value: Object): string; + + /** + * Returns the unique name of the hierarchy that contains the level. + * + * @param value + */ + hierarchyUniqueName(value: Object): string; + + /** + * Returns the distance of member parent level from the root of the level. Root level is zero (0) + * + * @param value + */ + levelNumber(value: Object): number; + + /** + * A bitmap of the information projected by childCount, drilledDown and parentSameAsPrev properties. + * + * @param value + */ + displayInfo(value: Object): number; + + /** + * Returns the count of children members this member has. + * + * @param value + */ + childCount(value: Object): number; + + /** + * Returns a value that indicates whether at least one child of this member appears on the axis, immediately following all occurrences of that member. This can be used by applications to display a "+" or a "-" next to the member. + * + * @param value + */ + drilledDown(value: Object): boolean; + + /** + * Returns a value that indicates whether the parent of this member is the same as the parent of the member preceding all occurrences of the current member. + * + * @param value + */ + parentSameAsPrev(value: Object): boolean; + + /** + * Returns a key value map of the members' properties. By default only 'PARENT_UNIQUE_NAME' and 'CHILDREN_CARDINALITY' properties are available. + * + * @param value + */ + properties(value: Object): Object; + } +} + +declare namespace Infragistics { + class OlapResultCell { + /** + * Returns the position of the cell when cells are iterated row by row. + * + * @param value + */ + cellOrdinal(value: Object): number; + + /** + * Returns a key value map of the cell's properties. Currently only 'Value' and 'FmtValue' properties are available. + * + * @param value + */ + properties(value: Object): Object; + } +} + +interface IgTemplatingRegExp { + /** + * Option for IgTemplatingRegExp + */ + [optionName: string]: any; +} + +declare namespace Infragistics { + class igTemplating { + constructor(regExp: IgTemplatingRegExp); + + /** + * Populates the given template with the provided data. If data is a function that requires arguments, the arguments need to be provided as an array following the data. tmpl(template, data[, args]) + * + * @param template Specifies the template string + * @param data Specifies the data to be templated in the template. If function is provided, then it has to be object or array returning function, possible receiving arguments array which can be specified as the third parameter + * @param args If function is provided as the second parameter, then this parameter is the arguments for the function. + */ + tmpl(template: string, data: Object, args?: any[]): string; + clearTmplCache(): void; + + /** + * Encoding < > ' and " + * + * @param value The string to be encoded. + */ + encode(value: string): string; + } +} +interface IgniteUIStatic { +igTemplating: typeof Infragistics.igTemplating; +} + +interface ErrorMessageDisplayingEvent { + (event: Event, ui: ErrorMessageDisplayingEventUIParam): void; +} + +interface ErrorMessageDisplayingEventUIParam { + /** + * Used to obtain reference to the barcode widget. + */ + owner?: any; + + /** + * Used to get or set the error message that is to be shown. + */ + errorMessage?: any; +} + +interface DataChangedEvent { + (event: Event, ui: DataChangedEventUIParam): void; +} + +interface DataChangedEventUIParam { + /** + * Used to obtain reference to the barcode widget. + */ + owner?: any; + + /** + * Used to obtain the new data. + */ + newData?: any; +} + +interface IgQRCodeBarcode { + /** + * The width of the barcode. It can be set as a number in pixels, string (px) or percentage (%). + */ + width?: string|number; + + /** + * The height of the barcode. It can be set as a number in pixels, string (px) or percentage (%). + */ + height?: string|number; + + /** + * Gets or sets the brush to use to fill the backing of the barcode. + */ + backingBrush?: string; + + /** + * Gets or sets the brush to use for the outline of the backing. + */ + backingOutline?: string; + + /** + * Gets or sets the stroke thickness of the backing outline. + */ + backingStrokeThickness?: number; + + /** + * Gets or sets the brush to use to fill the background of the bars. + */ + barBrush?: string; + + /** + * Gets or sets the brush to use for the label font. + */ + fontBrush?: string; + + /** + * Gets or sets the font of the text displayed by the control. + */ + font?: string; + + /** + * Gets or sets the data value. + */ + data?: string; + + /** + * Gets or sets the message text displayed when some error occurs. + */ + errorMessageText?: string; + + /** + * Gets or sets the stretch. + * + * Valid values: + * "none" + * "fill" + * "uniform" + * "uniformToFill" + */ + stretch?: string; + + /** + * Gets or sets a value which specifies how the grid fills within the barcode control dimensions. + * + * Valid values: + * "fillSpace" FillSpace mode ensures that the barcode grid fills the control dimensions. + * "ensureEqualSize" EnsureEqualSize mode ensures that every grid column/row has the same pixels number width/height. The sum of all columns/rows pixels may be less than the width/height of the control. + */ + barsFillMode?: string; + + /** + * Gets or sets the width (XDimension) to height (YDimension) ratio. It accepts only positive values. This property does not apply for the QR barcode. + */ + widthToHeightRatio?: number; + + /** + * Gets or sets the X-dimension (narrow element width) for a symbol in mm. It accepts values from 0.01 to 100. + */ + xDimension?: number; + + /** + * Gets or sets the error correction level of the QR Code symbol. + * + * Valid values: + * "low" Low error correction level allows recovery of 7% of the symbol codewords. + * "medium" Medium error correction level allows recovery of 15% of the symbol codewords. + * "quartil" Quartil error correction level allows recovery of 25% of the symbol codewords. + * "high" High error correction level allows recovery of 30% of the symbol codewords. + */ + errorCorrectionLevel?: string; + + /** + * Gets or sets the size version of the QR Code symbol. + * + * Valid values: + * "undefined" If set, the QR code barcode sets internally the smallest version that will accommodate the data. + * "version1" Version1 defines size of 21x21 modules for the symbol. + * "version2" Version2 defines size of 25x25 modules for the symbol. + * "version3" Version3 defines size of 29x29 modules for the symbol. + * "version4" Version4 defines size of 33x33 modules for the symbol. + * "version5" Version5 defines size of 37x37 modules for the symbol. + * "version6" Version6 defines size of 41x41 modules for the symbol. + * "version7" Version7 defines size of 45x45 modules for the symbol. + * "version8" Version8 defines size of 49x49 modules for the symbol. + * "version9" Version9 defines size of 53x53 modules for the symbol. + * "version10" Version10 defines size of 57x57 modules for the symbol. + * "version11" Version11 defines size of 61x61 modules for the symbol. + * "version12" Version12 defines size of 65x65 modules for the symbol. + * "version13" Version13 defines size of 69x69 modules for the symbol. + * "version14" Version14 defines size of 73x73 modules for the symbol. + * "version15" Version15 defines size of 77x77 modules for the symbol. + * "version16" Version16 defines size of 81x81 modules for the symbol. + * "version17" Version17 defines size of 85x85 modules for the symbol. + * "version18" Version18 defines size of 89x89 modules for the symbol. + * "version19" Version19 defines size of 93x93 modules for the symbol. + * "version20" Version20 defines size of 97x97 modules for the symbol. + * "version21" Version21 defines size of 101x101 modules for the symbol. + * "version22" Version22 defines size of 105x105 modules for the symbol. + * "version23" Version23 defines size of 109x109 modules for the symbol. + * "version24" Version24 defines size of 113x113 modules for the symbol. + * "version25" Version25 defines size of 117x117 modules for the symbol. + * "version26" Version26 defines size of 121x121 modules for the symbol. + * "version27" Version27 defines size of 125x125 modules for the symbol. + * "version28" Version28 defines size of 129x129 modules for the symbol. + * "version29" Version29 defines size of 133x133 modules for the symbol. + * "version30" Version30 defines size of 137x137 modules for the symbol. + * "version31" Version31 defines size of 141x141 modules for the symbol. + * "version32" Version32 defines size of 145x145 modules for the symbol. + * "version33" Version33 defines size of 149x149 modules for the symbol. + * "version34" Version34 defines size of 153x153 modules for the symbol. + * "version35" Version35 defines size of 157x157 modules for the symbol. + * "version36" Version36 defines size of 161x161 modules for the symbol. + * "version37" Version37 defines size of 165x165 modules for the symbol. + * "version38" Version38 defines size of 169x169 modules for the symbol. + * "version39" Version39 defines size of 173x173 modules for the symbol. + * "version40" Version40 defines size of 177x177 modules for the symbol. + */ + sizeVersion?: string; + + /** + * Gets or sets the encoding mode for compaction of the QR Code symbol data. The default value is undefined if the Shift_JIS encoding is loaded. Otherwise the default value is byte. + * + * Valid values: + * "undefined" When Undefined encoding mode is set, the QR code barcode internally switches between modes as necessary in order to achieve the most efficient conversion of data into a binary string. + * "numeric" Numeric mode encodes data from decimal digit set (0-9). Normally 3 data characters are represented by 10 bits. + * "alphanumeric" Alphanumerc mode encodes data from a set of 45 characters (digits 0-9, upper case letters A-Z, nine other characters: space, $ % * + _ . / : ). Normally two input characters are represented by 11 bits. + * "byte" In Byte mode the data is encoded at 8 bits per character. The character set of the Byte encoding mode is byte data (by default it is ISO/IEC 8859-1 character set). + * "kanji" The Kanji mode efficiently encodes Kanji characters in accordance with the Shift JIS system based on JIS X 0208. Each two-byte character value is compactedd to a 13-bit binary codeword. + */ + encodingMode?: string; + + /** + * Each Extended Channel Interpretation (ECI) is designated by a six-digit assignment number: 000000 - 999999. + * The default value depends on the loaded encodings. The default is ECI 000003 (representing ISO/IEC 8859-1) if the ISO/IEC 8859-1 character set is loaded. Otherwise the default value is 000026 (representing UTF-8). + */ + eciNumber?: number; + + /** + * Gets or sets a value indicating whether to show the ECI header. + * + * Valid values: + * "hide" Hide the header. + * "show" Show the header. + */ + eciHeaderDisplayMode?: string; + + /** + * Gets or sets the FNC1 mode indicator which identifies symbols encoding messages formatted according to specific predefined industry or application specificatoins. + * + * Valid values: + * "none" Do not use any Fnc1 symbols, i.e. the data is not identified according to specific predefined industry or application specifications. + * "gs1" Uses Fnc1 symbol in the first position of the character in Code 128 symbols and designates data formatted in accordance with the GS1 General Specification. + * "industry" Uses Fnc1 symbol in the second position of the character in Code 128 symbols and designates data formatted in accordance with a specific indystry application previously agreed with AIM Inc. + */ + fnc1Mode?: string; + + /** + * Gets or sets the Application Indicator assigned to identify the specification concerned by AIM International. + * The value is respected only when the Fnc1Mode is set to Industry. Its value may take the form of any single Latin alphabetic character from the set {a - z, A - Z} or a two-digit number. + */ + applicationIndicator?: string; + + /** + * Occurs when an error has happened. + * Function takes first argument evt and second argument ui. + * Use ui.owner to obtain reference to the barcode widget. + * Use ui.errorMessage to get or set the error message that is to be shown. + */ + errorMessageDisplaying?: ErrorMessageDisplayingEvent; + + /** + * Occurs when the data has changed. + * Function takes first argument evt and second argument ui. + * Use ui.owner to obtain reference to the barcode widget. + * Use ui.newData to obtain the new data. + */ + dataChanged?: DataChangedEvent; + + /** + * Option for igQRCodeBarcode + */ + [optionName: string]: any; +} +interface IgQRCodeBarcodeMethods { + /** + * Returns information about how the barcode is rendered. + */ + exportVisualData(): Object; + + /** + * Causes all pending changes of the barcode e.g. by changed property values to be rendered immediately. + */ + flush(): void; + + /** + * Destroys widget. + */ + destroy(): void; + + /** + * Re-polls the css styles for the widget. Use this method when the css styles have been modified. + */ + styleUpdated(): void; +} +interface JQuery { + data(propertyName: "igQRCodeBarcode"): IgQRCodeBarcodeMethods; +} + +interface JQuery { + igQRCodeBarcode(methodName: "exportVisualData"): Object; + igQRCodeBarcode(methodName: "flush"): void; + igQRCodeBarcode(methodName: "destroy"): void; + igQRCodeBarcode(methodName: "styleUpdated"): void; + + /** + * The width of the barcode. It can be set as a number in pixels, string (px) or percentage (%). + */ + igQRCodeBarcode(optionLiteral: 'option', optionName: "width"): string|number; + + /** + * The width of the barcode. It can be set as a number in pixels, string (px) or percentage (%). + * + * @optionValue New value to be set. + */ + igQRCodeBarcode(optionLiteral: 'option', optionName: "width", optionValue: string|number): void; + + /** + * The height of the barcode. It can be set as a number in pixels, string (px) or percentage (%). + */ + igQRCodeBarcode(optionLiteral: 'option', optionName: "height"): string|number; + + /** + * The height of the barcode. It can be set as a number in pixels, string (px) or percentage (%). + * + * @optionValue New value to be set. + */ + igQRCodeBarcode(optionLiteral: 'option', optionName: "height", optionValue: string|number): void; + + /** + * Gets the brush to use to fill the backing of the barcode. + */ + igQRCodeBarcode(optionLiteral: 'option', optionName: "backingBrush"): string; + + /** + * Sets the brush to use to fill the backing of the barcode. + * + * @optionValue New value to be set. + */ + igQRCodeBarcode(optionLiteral: 'option', optionName: "backingBrush", optionValue: string): void; + + /** + * Gets the brush to use for the outline of the backing. + */ + igQRCodeBarcode(optionLiteral: 'option', optionName: "backingOutline"): string; + + /** + * Sets the brush to use for the outline of the backing. + * + * @optionValue New value to be set. + */ + igQRCodeBarcode(optionLiteral: 'option', optionName: "backingOutline", optionValue: string): void; + + /** + * Gets the stroke thickness of the backing outline. + */ + igQRCodeBarcode(optionLiteral: 'option', optionName: "backingStrokeThickness"): number; + + /** + * Sets the stroke thickness of the backing outline. + * + * @optionValue New value to be set. + */ + igQRCodeBarcode(optionLiteral: 'option', optionName: "backingStrokeThickness", optionValue: number): void; + + /** + * Gets the brush to use to fill the background of the bars. + */ + igQRCodeBarcode(optionLiteral: 'option', optionName: "barBrush"): string; + + /** + * Sets the brush to use to fill the background of the bars. + * + * @optionValue New value to be set. + */ + igQRCodeBarcode(optionLiteral: 'option', optionName: "barBrush", optionValue: string): void; + + /** + * Gets the brush to use for the label font. + */ + igQRCodeBarcode(optionLiteral: 'option', optionName: "fontBrush"): string; + + /** + * Sets the brush to use for the label font. + * + * @optionValue New value to be set. + */ + igQRCodeBarcode(optionLiteral: 'option', optionName: "fontBrush", optionValue: string): void; + + /** + * Gets the font of the text displayed by the control. + */ + igQRCodeBarcode(optionLiteral: 'option', optionName: "font"): string; + + /** + * Sets the font of the text displayed by the control. + * + * @optionValue New value to be set. + */ + igQRCodeBarcode(optionLiteral: 'option', optionName: "font", optionValue: string): void; + + /** + * Gets the data value. + */ + igQRCodeBarcode(optionLiteral: 'option', optionName: "data"): string; + + /** + * Sets the data value. + * + * @optionValue New value to be set. + */ + igQRCodeBarcode(optionLiteral: 'option', optionName: "data", optionValue: string): void; + + /** + * Gets the message text displayed when some error occurs. + */ + igQRCodeBarcode(optionLiteral: 'option', optionName: "errorMessageText"): string; + + /** + * Sets the message text displayed when some error occurs. + * + * @optionValue New value to be set. + */ + igQRCodeBarcode(optionLiteral: 'option', optionName: "errorMessageText", optionValue: string): void; + + /** + * Gets the stretch. + */ + igQRCodeBarcode(optionLiteral: 'option', optionName: "stretch"): string; + + /** + * Sets the stretch. + * + * @optionValue New value to be set. + */ + igQRCodeBarcode(optionLiteral: 'option', optionName: "stretch", optionValue: string): void; + + /** + * Gets a value which specifies how the grid fills within the barcode control dimensions. + */ + igQRCodeBarcode(optionLiteral: 'option', optionName: "barsFillMode"): string; + + /** + * Sets a value which specifies how the grid fills within the barcode control dimensions. + * + * @optionValue New value to be set. + */ + igQRCodeBarcode(optionLiteral: 'option', optionName: "barsFillMode", optionValue: string): void; + + /** + * Gets the width (XDimension) to height (YDimension) ratio. It accepts only positive values. This property does not apply for the QR barcode. + */ + igQRCodeBarcode(optionLiteral: 'option', optionName: "widthToHeightRatio"): number; + + /** + * Sets the width (XDimension) to height (YDimension) ratio. It accepts only positive values. This property does not apply for the QR barcode. + * + * @optionValue New value to be set. + */ + igQRCodeBarcode(optionLiteral: 'option', optionName: "widthToHeightRatio", optionValue: number): void; + + /** + * Gets the X-dimension (narrow element width) for a symbol in mm. It accepts values from 0.01 to 100. + */ + igQRCodeBarcode(optionLiteral: 'option', optionName: "xDimension"): number; + + /** + * Sets the X-dimension (narrow element width) for a symbol in mm. It accepts values from 0.01 to 100. + * + * @optionValue New value to be set. + */ + igQRCodeBarcode(optionLiteral: 'option', optionName: "xDimension", optionValue: number): void; + + /** + * Gets the error correction level of the QR Code symbol. + */ + igQRCodeBarcode(optionLiteral: 'option', optionName: "errorCorrectionLevel"): string; + + /** + * Sets the error correction level of the QR Code symbol. + * + * @optionValue New value to be set. + */ + igQRCodeBarcode(optionLiteral: 'option', optionName: "errorCorrectionLevel", optionValue: string): void; + + /** + * Gets the size version of the QR Code symbol. + */ + igQRCodeBarcode(optionLiteral: 'option', optionName: "sizeVersion"): string; + + /** + * Sets the size version of the QR Code symbol. + * + * @optionValue New value to be set. + */ + igQRCodeBarcode(optionLiteral: 'option', optionName: "sizeVersion", optionValue: string): void; + + /** + * Gets the encoding mode for compaction of the QR Code symbol data. The default value is undefined if the Shift_JIS encoding is loaded. Otherwise the default value is byte. + */ + igQRCodeBarcode(optionLiteral: 'option', optionName: "encodingMode"): string; + + /** + * Sets the encoding mode for compaction of the QR Code symbol data. The default value is undefined if the Shift_JIS encoding is loaded. Otherwise the default value is byte. + * + * @optionValue New value to be set. + */ + igQRCodeBarcode(optionLiteral: 'option', optionName: "encodingMode", optionValue: string): void; + + /** + * Each Extended Channel Interpretation (ECI) is designated by a six-digit assignment number: 000000 - 999999. + * The default value depends on the loaded encodings. The default is ECI 000003 (representing ISO/IEC 8859-1) if the ISO/IEC 8859-1 character set is loaded. Otherwise the default value is 000026 (representing UTF-8). + */ + igQRCodeBarcode(optionLiteral: 'option', optionName: "eciNumber"): number; + + /** + * Each Extended Channel Interpretation (ECI) is designated by a six-digit assignment number: 000000 - 999999. + * The default value depends on the loaded encodings. The default is ECI 000003 (representing ISO/IEC 8859-1) if the ISO/IEC 8859-1 character set is loaded. Otherwise the default value is 000026 (representing UTF-8). + * + * @optionValue New value to be set. + */ + igQRCodeBarcode(optionLiteral: 'option', optionName: "eciNumber", optionValue: number): void; + + /** + * Gets a value indicating whether to show the ECI header. + */ + igQRCodeBarcode(optionLiteral: 'option', optionName: "eciHeaderDisplayMode"): string; + + /** + * Sets a value indicating whether to show the ECI header. + * + * @optionValue New value to be set. + */ + igQRCodeBarcode(optionLiteral: 'option', optionName: "eciHeaderDisplayMode", optionValue: string): void; + + /** + * Gets the FNC1 mode indicator which identifies symbols encoding messages formatted according to specific predefined industry or application specificatoins. + */ + igQRCodeBarcode(optionLiteral: 'option', optionName: "fnc1Mode"): string; + + /** + * Sets the FNC1 mode indicator which identifies symbols encoding messages formatted according to specific predefined industry or application specificatoins. + * + * @optionValue New value to be set. + */ + igQRCodeBarcode(optionLiteral: 'option', optionName: "fnc1Mode", optionValue: string): void; + + /** + * Gets the Application Indicator assigned to identify the specification concerned by AIM International. + * The value is respected only when the Fnc1Mode is set to Industry. Its value may take the form of any single Latin alphabetic character from the set {a - z, A - Z} or a two-digit number. + */ + igQRCodeBarcode(optionLiteral: 'option', optionName: "applicationIndicator"): string; + + /** + * Sets the Application Indicator assigned to identify the specification concerned by AIM International. + * The value is respected only when the Fnc1Mode is set to Industry. Its value may take the form of any single Latin alphabetic character from the set {a - z, A - Z} or a two-digit number. + * + * @optionValue New value to be set. + */ + igQRCodeBarcode(optionLiteral: 'option', optionName: "applicationIndicator", optionValue: string): void; + + /** + * Occurs when an error has happened. + * Function takes first argument evt and second argument ui. + * Use ui.owner to obtain reference to the barcode widget. + * Use ui.errorMessage to get or set the error message that is to be shown. + */ + igQRCodeBarcode(optionLiteral: 'option', optionName: "errorMessageDisplaying"): ErrorMessageDisplayingEvent; + + /** + * Occurs when an error has happened. + * Function takes first argument evt and second argument ui. + * Use ui.owner to obtain reference to the barcode widget. + * Use ui.errorMessage to get or set the error message that is to be shown. + * + * @optionValue New value to be set. + */ + igQRCodeBarcode(optionLiteral: 'option', optionName: "errorMessageDisplaying", optionValue: ErrorMessageDisplayingEvent): void; + + /** + * Occurs when the data has changed. + * Function takes first argument evt and second argument ui. + * Use ui.owner to obtain reference to the barcode widget. + * Use ui.newData to obtain the new data. + */ + igQRCodeBarcode(optionLiteral: 'option', optionName: "dataChanged"): DataChangedEvent; + + /** + * Occurs when the data has changed. + * Function takes first argument evt and second argument ui. + * Use ui.owner to obtain reference to the barcode widget. + * Use ui.newData to obtain the new data. + * + * @optionValue New value to be set. + */ + igQRCodeBarcode(optionLiteral: 'option', optionName: "dataChanged", optionValue: DataChangedEvent): void; + igQRCodeBarcode(options: IgQRCodeBarcode): JQuery; + igQRCodeBarcode(optionLiteral: 'option', optionName: string): any; + igQRCodeBarcode(optionLiteral: 'option', options: IgQRCodeBarcode): JQuery; + igQRCodeBarcode(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igQRCodeBarcode(methodName: string, ...methodParams: any[]): any; +} +interface DataBindingEvent { + (event: Event, ui: DataBindingEventUIParam): void; +} + +interface DataBindingEventUIParam { + /** + * Used to obtain reference to chart widget. + */ + owner?: any; + + /** + * Used to obtain reference to instance of $.ig.DataSource. + */ + dataSource?: any; +} + +interface DataBoundEvent { + (event: Event, ui: DataBoundEventUIParam): void; +} + +interface DataBoundEventUIParam { + /** + * Used to obtain reference to chart widget. + */ + owner?: any; + + /** + * Used to obtain reference to array actual data which is displayed by chart. + */ + data?: any; + + /** + * Used to obtain reference to instance of $.ig.DataSource. + */ + dataSource?: any; +} + +interface UpdateTooltipEvent { + (event: Event, ui: UpdateTooltipEventUIParam): void; +} + +interface UpdateTooltipEventUIParam { + /** + * Used to obtain reference to chart widget. + */ + owner?: any; + + /** + * Used to obtain html of tooltip. Value of that member can be modified. If modified value is null or empty string, then current content of tooltip keeps old value. + */ + text?: any; + + /** + * Used to obtain reference to item. Value of that member can be modified or replaced by custom item. + */ + item?: any; + + /** + * Used to obtain left position of tooltip in pixels relative to widget. Value of that member can be modified. + */ + x?: any; + + /** + * Used to obtain top position of tooltip in pixels relative to widget. Value of that member can be modified. + */ + y?: any; + + /** + * Used to obtain reference to jquery object which represents tooltip. Value of that member can be replaced by custom element. + */ + element?: any; +} + +interface HideTooltipEvent { + (event: Event, ui: HideTooltipEventUIParam): void; +} + +interface HideTooltipEventUIParam { + /** + * Used to obtain reference to chart widget. + */ + owner?: any; + + /** + * Used to obtain reference to item. + */ + item?: any; + + /** + * Used to obtain reference to jquery object which represents tooltip or value of ui.element from last updateTooltip event. Value of that member can be replaced by custom element. + */ + element?: any; +} + +interface IgBaseChart { + /** + * The width of the chart. + */ + width?: number; + + /** + * The height of the chart. + */ + height?: number; + + /** + * Gets sets template for tooltip associated with chart item. + * Example: "Value: $(ValueMemberPathInDataSource)" + */ + tooltipTemplate?: string; + + /** + * Gets sets maximum number of displayed records in chart. + */ + maxRecCount?: number; + + /** + * Gets sets a valid data source. + * That can be instance of array or primitives, array of objects, instance of $.ig.DataSource, or any other data accepted by $.ig.DataSource. + * Note: if it is set to string and "dataSourceType" option is not set, then $.ig.JSONPDataSource is used. + */ + dataSource?: any; + + /** + * Gets sets data source type (such as "json", "xml", etc). Please refer to the documentation of $.ig.DataSource and its type property + */ + dataSourceType?: string; + + /** + * Gets sets url which is used for sending JSON on request for remote data. + */ + dataSourceUrl?: string; + + /** + * See $.ig.DataSource. property in the response specifying the total number of records on the server. + */ + responseTotalRecCountKey?: string; + + /** + * See $.ig.DataSource. This is basically the property in the responses where data records are held, if the response is wrapped. + */ + responseDataKey?: string; + + /** + * Event which is raised before data binding. + * Return false in order to cancel data binding. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.dataSource to obtain reference to instance of $.ig.DataSource. + */ + dataBinding?: DataBindingEvent; + + /** + * Event which is raised after data binding. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.data to obtain reference to array actual data which is displayed by chart. + * Use ui.dataSource to obtain reference to instance of $.ig.DataSource. + */ + dataBound?: DataBoundEvent; + + /** + * Event which is raised before tooltip is updated. + * Return false in order to cancel updating and hide tooltip. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.text to obtain html of tooltip. Value of that member can be modified. If modified value is null or empty string, then current content of tooltip keeps old value. + * Use ui.item to obtain reference to item. Value of that member can be modified or replaced by custom item. + * Use ui.x to obtain left position of tooltip in pixels relative to widget. Value of that member can be modified. + * Use ui.y to obtain top position of tooltip in pixels relative to widget. Value of that member can be modified. + * Use ui.element to obtain reference to jquery object which represents tooltip. Value of that member can be replaced by custom element. + */ + updateTooltip?: UpdateTooltipEvent; + + /** + * Event which is raised before tooltip is hidden. + * Return false in order to cancel hiding and keep tooltip visible. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.item to obtain reference to item. + * Use ui.element to obtain reference to jquery object which represents tooltip or value of ui.element from last updateTooltip event. Value of that member can be replaced by custom element. + */ + hideTooltip?: HideTooltipEvent; + + /** + * Option for igBaseChart + */ + [optionName: string]: any; +} +interface IgBaseChartMethods { + /** + * Find index of item within actual data used by chart. + * + * @param item The reference to item. + */ + findIndexOfItem(item: Object): number; + + /** + * Get item within actual data used by chart. That is similar to this.getData()[ index ]. + * + * @param index Index of data item. + */ + getDataItem(index: Object): Object; + + /** + * Get reference of actual data used by chart. + */ + getData(): any[]; + + /** + * Adds a new item to the data source and notifies the chart. + * + * @param item The item that we want to add to the data source. + */ + addItem(item: Object): Object; + + /** + * Inserts a new item to the data source and notifies the chart. + * + * @param item the new item that we want to insert in the data source. + * @param index The index in the data source where the new item will be inserted. + */ + insertItem(item: Object, index: number): Object; + + /** + * Deletes an item from the data source and notifies the chart. + * + * @param index The index in the data source from where the item will be been removed. + */ + removeItem(index: number): Object; + + /** + * Updates an item in the data source and notifies the chart. + * + * @param index The index of the item in the data source that we want to change. + * @param item The new item object that will be set in the data source. + */ + setItem(index: number, item: Object): Object; + + /** + * Notifies the chart that an item has been set in an associated data source. + * + * @param dataSource The data source in which the change happened. + * @param index The index in the items source that has been changed. + * @param newItem the new item that has been set in the collection. + * @param oldItem the old item that has been overwritten in the collection. + */ + notifySetItem(dataSource: Object, index: number, newItem: Object, oldItem: Object): Object; + + /** + * Notifies the chart that the items have been cleared from an associated data source. + * It's not necessary to notify more than one target of a change if they share the same items source. + * + * @param dataSource The data source in which the change happened. + */ + notifyClearItems(dataSource: Object): Object; + + /** + * Notifies the target axis or series that an item has been inserted at the specified index in its data source. + * It's not necessary to notify more than one target of a change if they share the same items source. + * + * @param dataSource The data source in which the change happened. + * @param index The index in the items source where the new item has been inserted. + * @param newItem the new item that has been set in the collection. + */ + notifyInsertItem(dataSource: Object, index: number, newItem: Object): Object; + + /** + * Notifies the target axis or series that an item has been removed from the specified index in its data source. + * It's not necessary to notify more than one target of a change if they share the same items source. + * + * @param dataSource The data source in which the change happened. + * @param index The index in the items source from where the old item has been removed. + * @param oldItem the old item that has been removed from the collection. + */ + notifyRemoveItem(dataSource: Object, index: number, oldItem: Object): Object; + + /** + * Get reference to chart object. + */ + chart(): Object; + + /** + * Binds data to the chart + */ + dataBind(): void; + + /** + * Destroys widget. + */ + destroy(): void; +} +interface JQuery { + data(propertyName: "igBaseChart"): IgBaseChartMethods; +} + +interface JQuery { + igBaseChart(methodName: "findIndexOfItem", item: Object): number; + igBaseChart(methodName: "getDataItem", index: Object): Object; + igBaseChart(methodName: "getData"): any[]; + igBaseChart(methodName: "addItem", item: Object): Object; + igBaseChart(methodName: "insertItem", item: Object, index: number): Object; + igBaseChart(methodName: "removeItem", index: number): Object; + igBaseChart(methodName: "setItem", index: number, item: Object): Object; + igBaseChart(methodName: "notifySetItem", dataSource: Object, index: number, newItem: Object, oldItem: Object): Object; + igBaseChart(methodName: "notifyClearItems", dataSource: Object): Object; + igBaseChart(methodName: "notifyInsertItem", dataSource: Object, index: number, newItem: Object): Object; + igBaseChart(methodName: "notifyRemoveItem", dataSource: Object, index: number, oldItem: Object): Object; + igBaseChart(methodName: "chart"): Object; + igBaseChart(methodName: "dataBind"): void; + igBaseChart(methodName: "destroy"): void; + + /** + * The width of the chart. + */ + igBaseChart(optionLiteral: 'option', optionName: "width"): number; + + /** + * The width of the chart. + * + * @optionValue New value to be set. + */ + igBaseChart(optionLiteral: 'option', optionName: "width", optionValue: number): void; + + /** + * The height of the chart. + */ + igBaseChart(optionLiteral: 'option', optionName: "height"): number; + + /** + * The height of the chart. + * + * @optionValue New value to be set. + */ + igBaseChart(optionLiteral: 'option', optionName: "height", optionValue: number): void; + + /** + * Gets template for tooltip associated with chart item. + * Example: "Value: $(ValueMemberPathInDataSource)" + */ + igBaseChart(optionLiteral: 'option', optionName: "tooltipTemplate"): string; + + /** + * Sets template for tooltip associated with chart item. + * Example: "Value: $(ValueMemberPathInDataSource)" + * + * @optionValue New value to be set. + */ + igBaseChart(optionLiteral: 'option', optionName: "tooltipTemplate", optionValue: string): void; + + /** + * Gets maximum number of displayed records in chart. + */ + igBaseChart(optionLiteral: 'option', optionName: "maxRecCount"): number; + + /** + * Sets maximum number of displayed records in chart. + * + * @optionValue New value to be set. + */ + igBaseChart(optionLiteral: 'option', optionName: "maxRecCount", optionValue: number): void; + + /** + * Gets a valid data source. + * That can be instance of array or primitives, array of objects, instance of $.ig.DataSource, or any other data accepted by $.ig.DataSource. + * Note: if it is set to string and "dataSourceType" option is not set, then $.ig.JSONPDataSource is used. + */ + igBaseChart(optionLiteral: 'option', optionName: "dataSource"): any; + + /** + * Sets a valid data source. + * That can be instance of array or primitives, array of objects, instance of $.ig.DataSource, or any other data accepted by $.ig.DataSource. + * Note: if it is set to string and "dataSourceType" option is not set, then $.ig.JSONPDataSource is used. + * + * @optionValue New value to be set. + */ + igBaseChart(optionLiteral: 'option', optionName: "dataSource", optionValue: any): void; + + /** + * Gets data source type (such as "json", "xml", etc). Please refer to the documentation of $.ig.DataSource and its type property + */ + igBaseChart(optionLiteral: 'option', optionName: "dataSourceType"): string; + + /** + * Sets data source type (such as "json", "xml", etc). Please refer to the documentation of $.ig.DataSource and its type property + * + * @optionValue New value to be set. + */ + igBaseChart(optionLiteral: 'option', optionName: "dataSourceType", optionValue: string): void; + + /** + * Gets url which is used for sending JSON on request for remote data. + */ + igBaseChart(optionLiteral: 'option', optionName: "dataSourceUrl"): string; + + /** + * Sets url which is used for sending JSON on request for remote data. + * + * @optionValue New value to be set. + */ + igBaseChart(optionLiteral: 'option', optionName: "dataSourceUrl", optionValue: string): void; + + /** + * See $.ig.DataSource. property in the response specifying the total number of records on the server. + */ + igBaseChart(optionLiteral: 'option', optionName: "responseTotalRecCountKey"): string; + + /** + * See $.ig.DataSource. property in the response specifying the total number of records on the server. + * + * @optionValue New value to be set. + */ + igBaseChart(optionLiteral: 'option', optionName: "responseTotalRecCountKey", optionValue: string): void; + + /** + * See $.ig.DataSource. This is basically the property in the responses where data records are held, if the response is wrapped. + */ + igBaseChart(optionLiteral: 'option', optionName: "responseDataKey"): string; + + /** + * See $.ig.DataSource. This is basically the property in the responses where data records are held, if the response is wrapped. + * + * @optionValue New value to be set. + */ + igBaseChart(optionLiteral: 'option', optionName: "responseDataKey", optionValue: string): void; + + /** + * Event which is raised before data binding. + * Return false in order to cancel data binding. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.dataSource to obtain reference to instance of $.ig.DataSource. + */ + igBaseChart(optionLiteral: 'option', optionName: "dataBinding"): DataBindingEvent; + + /** + * Event which is raised before data binding. + * Return false in order to cancel data binding. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.dataSource to obtain reference to instance of $.ig.DataSource. + * + * @optionValue Define event handler function. + */ + igBaseChart(optionLiteral: 'option', optionName: "dataBinding", optionValue: DataBindingEvent): void; + + /** + * Event which is raised after data binding. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.data to obtain reference to array actual data which is displayed by chart. + * Use ui.dataSource to obtain reference to instance of $.ig.DataSource. + */ + igBaseChart(optionLiteral: 'option', optionName: "dataBound"): DataBoundEvent; + + /** + * Event which is raised after data binding. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.data to obtain reference to array actual data which is displayed by chart. + * Use ui.dataSource to obtain reference to instance of $.ig.DataSource. + * + * @optionValue Define event handler function. + */ + igBaseChart(optionLiteral: 'option', optionName: "dataBound", optionValue: DataBoundEvent): void; + + /** + * Event which is raised before tooltip is updated. + * Return false in order to cancel updating and hide tooltip. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.text to obtain html of tooltip. Value of that member can be modified. If modified value is null or empty string, then current content of tooltip keeps old value. + * Use ui.item to obtain reference to item. Value of that member can be modified or replaced by custom item. + * Use ui.x to obtain left position of tooltip in pixels relative to widget. Value of that member can be modified. + * Use ui.y to obtain top position of tooltip in pixels relative to widget. Value of that member can be modified. + * Use ui.element to obtain reference to jquery object which represents tooltip. Value of that member can be replaced by custom element. + */ + igBaseChart(optionLiteral: 'option', optionName: "updateTooltip"): UpdateTooltipEvent; + + /** + * Event which is raised before tooltip is updated. + * Return false in order to cancel updating and hide tooltip. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.text to obtain html of tooltip. Value of that member can be modified. If modified value is null or empty string, then current content of tooltip keeps old value. + * Use ui.item to obtain reference to item. Value of that member can be modified or replaced by custom item. + * Use ui.x to obtain left position of tooltip in pixels relative to widget. Value of that member can be modified. + * Use ui.y to obtain top position of tooltip in pixels relative to widget. Value of that member can be modified. + * Use ui.element to obtain reference to jquery object which represents tooltip. Value of that member can be replaced by custom element. + * + * @optionValue Define event handler function. + */ + igBaseChart(optionLiteral: 'option', optionName: "updateTooltip", optionValue: UpdateTooltipEvent): void; + + /** + * Event which is raised before tooltip is hidden. + * Return false in order to cancel hiding and keep tooltip visible. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.item to obtain reference to item. + * Use ui.element to obtain reference to jquery object which represents tooltip or value of ui.element from last updateTooltip event. Value of that member can be replaced by custom element. + */ + igBaseChart(optionLiteral: 'option', optionName: "hideTooltip"): HideTooltipEvent; + + /** + * Event which is raised before tooltip is hidden. + * Return false in order to cancel hiding and keep tooltip visible. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.item to obtain reference to item. + * Use ui.element to obtain reference to jquery object which represents tooltip or value of ui.element from last updateTooltip event. Value of that member can be replaced by custom element. + * + * @optionValue Define event handler function. + */ + igBaseChart(optionLiteral: 'option', optionName: "hideTooltip", optionValue: HideTooltipEvent): void; + igBaseChart(options: IgBaseChart): JQuery; + igBaseChart(optionLiteral: 'option', optionName: string): any; + igBaseChart(optionLiteral: 'option', options: IgBaseChart): JQuery; + igBaseChart(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igBaseChart(methodName: string, ...methodParams: any[]): any; +} +interface IgBulletGraphRange { + /** + * Gets or sets the name of the range. + */ + name?: string; + + /** + * Gets or sets the brush to use to fill the range. + */ + brush?: string; + + /** + * Gets or sets the outline to use when rendering the range. + */ + outline?: string; + + /** + * Gets or sets the value at which the range starts along the scale. + */ + startValue?: number; + + /** + * Gets or sets the value at which the range ends along the scale. + */ + endValue?: number; + + /** + * Gets or sets the distance measured from the front/bottom of the bullet graph (from 0 to 1) at which to start rendering the inner edge of the range. + * Values further from zero than 1 can be used to make this extend further than the normal width/height of the bullet graph. + */ + innerStartExtent?: number; + + /** + * Gets or sets the distance measured from the front/bottom of the bullet graph (from 0 to 1) at which to end rendering the inner edge of the range. + * Values further from zero than 1 can be used to make this extend further than the normal width/height of the bullet graph. + */ + innerEndExtent?: number; + + /** + * Gets or sets the distance measured from the front/bottom of the bullet graph (from 0 to 1) at which to start rendering the outer edge of the range. + * Values further from zero than 1 can be used to make this extend further than the normal width/height of the bullet graph. + */ + outerStartExtent?: number; + + /** + * Gets or sets the distance measured from the front/bottom of the bullet graph (from 0 to 1) at which to end rendering the outer edge of the range. + * Values further from zero than 1 can be used to make this extend further than the normal width/height of the bullet graph. + */ + outerEndExtent?: number; + + /** + * Gets or sets the stroke thickness to use when rendering this range's outline. + */ + strokeThickness?: number; + + /** + * Option for IgBulletGraphRange + */ + [optionName: string]: any; +} + +interface FormatLabelEvent { + (event: Event, ui: FormatLabelEventUIParam): void; +} + +interface FormatLabelEventUIParam { +} + +interface AlignLabelEvent { + (event: Event, ui: AlignLabelEventUIParam): void; +} + +interface AlignLabelEventUIParam { +} + +interface IgBulletGraph { + /** + * The width of the gauge. It can be set as a number in pixels, string (px) or percentage (%). + */ + width?: string|number; + + /** + * The height of the gauge. It can be set as a number in pixels, string (px) or percentage (%). + */ + height?: string|number; + + /** + * Gets or sets the scale ranges to render on the bullet graph. + */ + ranges?: IgBulletGraphRange[]; + + /** + * Gets or sets the ranges' tooltip template. + */ + rangeToolTipTemplate?: string; + + /** + * Gets or sets the value's tooltip template. + */ + valueToolTipTemplate?: string; + + /** + * Gets or sets the target value's tooltip template. + */ + targetValueToolTipTemplate?: string; + + /** + * Gets or sets the orientation of the scale. + * + * Valid values: + * "horizontal" + * "vertical" + */ + orientation?: string; + + /** + * Gets or sets a collection of brushes to be used as the palette for bullet graph ranges. + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + rangeBrushes?: any; + + /** + * Gets or sets a collection of brushes to be used as the palette for bullet graph outlines. + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + rangeOutlines?: any; + + /** + * Gets or sets the minimum value of the scale. + */ + minimumValue?: number; + + /** + * Gets or sets the maximum value of the scale. + */ + maximumValue?: number; + + /** + * Gets or sets the value indicated by the target value bar. + */ + targetValue?: number; + + /** + * Gets or sets the name used for the target value. The name is displayed in the default target value tooltip. + */ + targetValueName?: string; + + /** + * Gets or sets the value at which the bar ends. + */ + value?: number; + + /** + * Gets or sets the name used for actual value. + */ + valueName?: string; + + /** + * Gets or sets the position at which to start rendering the ranges, measured from the front/bottom of the control as a value from 0 to 1. + * Values further from zero than 1 can be used to make this extend further than the normal size of the bullet graph. + */ + rangeInnerExtent?: number; + + /** + * Gets or sets the position at which to stop rendering the range as a value from 0 to 1 measured from the front/bottom of the bullet graph. + * Values further from zero than 1 can be used to make this extend further than the normal size of the bullet graph. + */ + rangeOuterExtent?: number; + + /** + * Gets or sets the position at which to start rendering the actual value geometries, measured from the front/bottom of the bullet graph as a value from 0 to 1. + * Values further from zero than 1 can be used to make this extend further than the normal size of the bullet graph. + */ + valueInnerExtent?: number; + + /** + * Gets or sets the position at which to stop rendering the actual value geometries as a value from 0 to 1 measured from the front/bottom of the bullet graph. + * Values further from zero than 1 can be used to make this extend further than the normal size of the bullet graph. + */ + valueOuterExtent?: number; + + /** + * Gets or sets the interval to use for the scale. + */ + interval?: number; + + /** + * A value to start adding tickmarks, added to the scale's MinimumValue. + */ + ticksPostInitial?: number; + + /** + * A value to stop adding tickmarks, subtracted from the scale's MaximumValue. + */ + ticksPreTerminal?: number; + + /** + * Gets or sets the interval to use for rendering labels. This defaults to be the same interval as the tickmarks on the scale. + */ + labelInterval?: number; + + /** + * Gets or sets the position at which to put the labels as a value from 0 to 1, measured from the bottom of the scale. + * Values further from zero than 1 can be used to hide the labels of the bullet graph. + */ + labelExtent?: number; + + /** + * A value to start adding labels, added to the scale's MinimumValue. + */ + labelsPostInitial?: number; + + /** + * A value to stop adding labels, subtracted from the scale's MaximumValue. + */ + labelsPreTerminal?: number; + + /** + * Gets or sets the number of minor tickmarks to place between major tickmarks. + */ + minorTickCount?: number; + + /** + * Gets or sets the position at which to start rendering the major tickmarks as a value from 0 to 1, measured from the front/bottom of the bullet graph. + * Values further from zero than 1 can be used to make this extend further than the normal size of the bullet graph. + */ + tickStartExtent?: number; + + /** + * Gets or sets the position at which to stop rendering the major tickmarks as a value from 0 to 1, measured from the front/bottom of the bullet graph. + * Values further from zero than 1 can be used to make this extend further than the normal size of the bullet graph. + */ + tickEndExtent?: number; + + /** + * Gets or sets the stroke thickness to use when rendering ticks. + */ + tickStrokeThickness?: number; + + /** + * Gets or sets the brush to use for the major tickmarks. + */ + tickBrush?: string; + + /** + * Gets or sets the brush to use for the label font. + */ + fontBrush?: string; + + /** + * Gets or sets the brush to use for the actual value element. + */ + valueBrush?: string; + + /** + * Gets or sets the brush to use for the outline of actual value element. + */ + valueOutline?: string; + + /** + * Gets or sets the stroke thickness to use when rendering single actual value element. + */ + valueStrokeThickness?: number; + + /** + * Gets or sets the position at which to start rendering the minor tickmarks as a value from 0 to 1, measured from the front/bottom of the bullet graph. + * Values further from zero than 1 can be used to make this extend further than the normal size of the bullet graph. + */ + minorTickStartExtent?: number; + + /** + * Gets or sets the position at which to stop rendering the minor tickmarks as a value from 0 to 1, measured from the front/bottom of the bullet graph. + * Values further from zero than 1 can be used to make this extend further than the normal size of the bullet graph. + */ + minorTickEndExtent?: number; + + /** + * Gets or sets the stroke thickness to use when rendering minor ticks. + */ + minorTickStrokeThickness?: number; + + /** + * Gets or sets the brush to use for the minor tickmarks. + */ + minorTickBrush?: string; + + /** + * Gets or sets a value indicating whether the scale is inverted. + * When the scale is inverted the direction in which the scale values increase is right to left. + */ + isScaleInverted?: boolean; + + /** + * Gets or sets the brush to use to fill the backing of the bullet graph. + */ + backingBrush?: string; + + /** + * Gets or sets the brush to use for the outline of the backing. + */ + backingOutline?: string; + + /** + * Gets or sets the stroke thickness of the backing outline. + */ + backingStrokeThickness?: number; + + /** + * Gets or sets the inner extent of the bullet graph backing. + */ + backingInnerExtent?: number; + + /** + * Gets or sets the outer extent of the bullet graph backing. + */ + backingOuterExtent?: number; + + /** + * Gets or sets the position at which to start rendering the scale, measured from the front/bottom of the bullet graph as a value from 0 to 1. + * Values further from zero than 1 can be used to make this extend further than the normal size of the bullet graph. + */ + scaleStartExtent?: number; + + /** + * Gets or sets the position at which to stop rendering the scale as a value from 0 to 1, measured from the front/bottom of the bullet graph. + * Values further from zero than 1 can be used to make this extend further than the normal size of the bullet graph. + */ + scaleEndExtent?: number; + + /** + * Gets or sets the brush to use when rendering the fill of the comparative marker. + */ + targetValueBrush?: string; + + /** + * Get or sets the breadth of the target value element. + */ + targetValueBreadth?: number; + + /** + * Gets or sets the position at which to start rendering the target value, measured from the front/bottom of the control as a value from 0 to 1. + * Values further from zero than 1 can be used to make this extend further than the normal size of the bullet graph. + */ + targetValueInnerExtent?: number; + + /** + * Gets or sets the position at which to start rendering the target value, measured from the front/bottom of the control as a value from 0 to 1. + * Values further from zero than 1 can be used to make this extend further than the normal size of the bullet graph. + */ + targetValueOuterExtent?: number; + + /** + * Gets or sets the brush to use when rendering the outline of the target value. + */ + targetValueOutline?: string; + + /** + * Gets or sets the stroke thickness of the outline of the target value bar. + */ + targetValueStrokeThickness?: number; + + /** + * Gets or sets the number of milliseconds over which changes to the bullet graph should be animated. + */ + transitionDuration?: number; + + /** + * Gets or sets the time in milliseconds that tooltip appearance is delayed with. + */ + showToolTipTimeout?: number; + + /** + * Gets or sets a value indicating whether tooltips are enabled. + */ + showToolTip?: boolean; + + /** + * Gets or sets the font. + */ + font?: string; + pixelScalingRatio?: number; + formatLabel?: FormatLabelEvent; + alignLabel?: AlignLabelEvent; + + /** + * Option for igBulletGraph + */ + [optionName: string]: any; +} +interface IgBulletGraphMethods { + /** + * Returns a string containing the names of all the ranges delimited with a \n symbol. + */ + getRangeNames(): void; + + /** + * Adds a new range to the bullet graph. + * + * @param value The range object to be added. + */ + addRange(value: Object): void; + + /** + * Removes a range from the bullet graph. + * + * @param value A JS object with properties set as follows: name: nameOfTheRangeToRemove, remove: true + */ + removeRange(value: Object): void; + + /** + * Updates the specified range of the bullet graph. + * + * @param value The range object to be updated. + */ + updateRange(value: Object): void; + + /** + * Returns information about how the bullet graph is rendered. + */ + exportVisualData(): Object; + + /** + * Causes all pending changes of the bullet graph e.g. by changed property values to be rendered immediately. + */ + flush(): void; + + /** + * Destroys widget. + */ + destroy(): void; + + /** + * Re-polls the css styles for the widget. Use this method when the css styles have been modified. + */ + styleUpdated(): void; +} +interface JQuery { + data(propertyName: "igBulletGraph"): IgBulletGraphMethods; +} + +interface JQuery { + igBulletGraph(methodName: "getRangeNames"): void; + igBulletGraph(methodName: "addRange", value: Object): void; + igBulletGraph(methodName: "removeRange", value: Object): void; + igBulletGraph(methodName: "updateRange", value: Object): void; + igBulletGraph(methodName: "exportVisualData"): Object; + igBulletGraph(methodName: "flush"): void; + igBulletGraph(methodName: "destroy"): void; + igBulletGraph(methodName: "styleUpdated"): void; + + /** + * The width of the gauge. It can be set as a number in pixels, string (px) or percentage (%). + */ + igBulletGraph(optionLiteral: 'option', optionName: "width"): string|number; + + /** + * The width of the gauge. It can be set as a number in pixels, string (px) or percentage (%). + * + * @optionValue New value to be set. + */ + igBulletGraph(optionLiteral: 'option', optionName: "width", optionValue: string|number): void; + + /** + * The height of the gauge. It can be set as a number in pixels, string (px) or percentage (%). + */ + igBulletGraph(optionLiteral: 'option', optionName: "height"): string|number; + + /** + * The height of the gauge. It can be set as a number in pixels, string (px) or percentage (%). + * + * @optionValue New value to be set. + */ + igBulletGraph(optionLiteral: 'option', optionName: "height", optionValue: string|number): void; + + /** + * Gets the scale ranges to render on the bullet graph. + */ + igBulletGraph(optionLiteral: 'option', optionName: "ranges"): IgBulletGraphRange[]; + + /** + * Sets the scale ranges to render on the bullet graph. + * + * @optionValue New value to be set. + */ + igBulletGraph(optionLiteral: 'option', optionName: "ranges", optionValue: IgBulletGraphRange[]): void; + + /** + * Gets the ranges' tooltip template. + */ + igBulletGraph(optionLiteral: 'option', optionName: "rangeToolTipTemplate"): string; + + /** + * Sets the ranges' tooltip template. + * + * @optionValue New value to be set. + */ + igBulletGraph(optionLiteral: 'option', optionName: "rangeToolTipTemplate", optionValue: string): void; + + /** + * Gets the value's tooltip template. + */ + igBulletGraph(optionLiteral: 'option', optionName: "valueToolTipTemplate"): string; + + /** + * Sets the value's tooltip template. + * + * @optionValue New value to be set. + */ + igBulletGraph(optionLiteral: 'option', optionName: "valueToolTipTemplate", optionValue: string): void; + + /** + * Gets the target value's tooltip template. + */ + igBulletGraph(optionLiteral: 'option', optionName: "targetValueToolTipTemplate"): string; + + /** + * Sets the target value's tooltip template. + * + * @optionValue New value to be set. + */ + igBulletGraph(optionLiteral: 'option', optionName: "targetValueToolTipTemplate", optionValue: string): void; + + /** + * Gets the orientation of the scale. + */ + igBulletGraph(optionLiteral: 'option', optionName: "orientation"): string; + + /** + * Sets the orientation of the scale. + * + * @optionValue New value to be set. + */ + igBulletGraph(optionLiteral: 'option', optionName: "orientation", optionValue: string): void; + + /** + * Gets a collection of brushes to be used as the palette for bullet graph ranges. + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + igBulletGraph(optionLiteral: 'option', optionName: "rangeBrushes"): any; + + /** + * Sets a collection of brushes to be used as the palette for bullet graph ranges. + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + * + * @optionValue New value to be set. + */ + igBulletGraph(optionLiteral: 'option', optionName: "rangeBrushes", optionValue: any): void; + + /** + * Gets a collection of brushes to be used as the palette for bullet graph outlines. + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + igBulletGraph(optionLiteral: 'option', optionName: "rangeOutlines"): any; + + /** + * Sets a collection of brushes to be used as the palette for bullet graph outlines. + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + * + * @optionValue New value to be set. + */ + igBulletGraph(optionLiteral: 'option', optionName: "rangeOutlines", optionValue: any): void; + + /** + * Gets the minimum value of the scale. + */ + igBulletGraph(optionLiteral: 'option', optionName: "minimumValue"): number; + + /** + * Sets the minimum value of the scale. + * + * @optionValue New value to be set. + */ + igBulletGraph(optionLiteral: 'option', optionName: "minimumValue", optionValue: number): void; + + /** + * Gets the maximum value of the scale. + */ + igBulletGraph(optionLiteral: 'option', optionName: "maximumValue"): number; + + /** + * Sets the maximum value of the scale. + * + * @optionValue New value to be set. + */ + igBulletGraph(optionLiteral: 'option', optionName: "maximumValue", optionValue: number): void; + + /** + * Gets the value indicated by the target value bar. + */ + igBulletGraph(optionLiteral: 'option', optionName: "targetValue"): number; + + /** + * Sets the value indicated by the target value bar. + * + * @optionValue New value to be set. + */ + igBulletGraph(optionLiteral: 'option', optionName: "targetValue", optionValue: number): void; + + /** + * Gets the name used for the target value. The name is displayed in the default target value tooltip. + */ + igBulletGraph(optionLiteral: 'option', optionName: "targetValueName"): string; + + /** + * Sets the name used for the target value. The name is displayed in the default target value tooltip. + * + * @optionValue New value to be set. + */ + igBulletGraph(optionLiteral: 'option', optionName: "targetValueName", optionValue: string): void; + + /** + * Gets the value at which the bar ends. + */ + igBulletGraph(optionLiteral: 'option', optionName: "value"): number; + + /** + * Sets the value at which the bar ends. + * + * @optionValue New value to be set. + */ + igBulletGraph(optionLiteral: 'option', optionName: "value", optionValue: number): void; + + /** + * Gets the name used for actual value. + */ + igBulletGraph(optionLiteral: 'option', optionName: "valueName"): string; + + /** + * Sets the name used for actual value. + * + * @optionValue New value to be set. + */ + igBulletGraph(optionLiteral: 'option', optionName: "valueName", optionValue: string): void; + + /** + * Gets the position at which to start rendering the ranges, measured from the front/bottom of the control as a value from 0 to 1. + * Values further from zero than 1 can be used to make this extend further than the normal size of the bullet graph. + */ + igBulletGraph(optionLiteral: 'option', optionName: "rangeInnerExtent"): number; + + /** + * Sets the position at which to start rendering the ranges, measured from the front/bottom of the control as a value from 0 to 1. + * Values further from zero than 1 can be used to make this extend further than the normal size of the bullet graph. + * + * @optionValue New value to be set. + */ + igBulletGraph(optionLiteral: 'option', optionName: "rangeInnerExtent", optionValue: number): void; + + /** + * Gets the position at which to stop rendering the range as a value from 0 to 1 measured from the front/bottom of the bullet graph. + * Values further from zero than 1 can be used to make this extend further than the normal size of the bullet graph. + */ + igBulletGraph(optionLiteral: 'option', optionName: "rangeOuterExtent"): number; + + /** + * Sets the position at which to stop rendering the range as a value from 0 to 1 measured from the front/bottom of the bullet graph. + * Values further from zero than 1 can be used to make this extend further than the normal size of the bullet graph. + * + * @optionValue New value to be set. + */ + igBulletGraph(optionLiteral: 'option', optionName: "rangeOuterExtent", optionValue: number): void; + + /** + * Gets the position at which to start rendering the actual value geometries, measured from the front/bottom of the bullet graph as a value from 0 to 1. + * Values further from zero than 1 can be used to make this extend further than the normal size of the bullet graph. + */ + igBulletGraph(optionLiteral: 'option', optionName: "valueInnerExtent"): number; + + /** + * Sets the position at which to start rendering the actual value geometries, measured from the front/bottom of the bullet graph as a value from 0 to 1. + * Values further from zero than 1 can be used to make this extend further than the normal size of the bullet graph. + * + * @optionValue New value to be set. + */ + igBulletGraph(optionLiteral: 'option', optionName: "valueInnerExtent", optionValue: number): void; + + /** + * Gets the position at which to stop rendering the actual value geometries as a value from 0 to 1 measured from the front/bottom of the bullet graph. + * Values further from zero than 1 can be used to make this extend further than the normal size of the bullet graph. + */ + igBulletGraph(optionLiteral: 'option', optionName: "valueOuterExtent"): number; + + /** + * Sets the position at which to stop rendering the actual value geometries as a value from 0 to 1 measured from the front/bottom of the bullet graph. + * Values further from zero than 1 can be used to make this extend further than the normal size of the bullet graph. + * + * @optionValue New value to be set. + */ + igBulletGraph(optionLiteral: 'option', optionName: "valueOuterExtent", optionValue: number): void; + + /** + * Gets the interval to use for the scale. + */ + igBulletGraph(optionLiteral: 'option', optionName: "interval"): number; + + /** + * Sets the interval to use for the scale. + * + * @optionValue New value to be set. + */ + igBulletGraph(optionLiteral: 'option', optionName: "interval", optionValue: number): void; + + /** + * A value to start adding tickmarks, added to the scale's MinimumValue. + */ + igBulletGraph(optionLiteral: 'option', optionName: "ticksPostInitial"): number; + + /** + * A value to start adding tickmarks, added to the scale's MinimumValue. + * + * @optionValue New value to be set. + */ + igBulletGraph(optionLiteral: 'option', optionName: "ticksPostInitial", optionValue: number): void; + + /** + * A value to stop adding tickmarks, subtracted from the scale's MaximumValue. + */ + igBulletGraph(optionLiteral: 'option', optionName: "ticksPreTerminal"): number; + + /** + * A value to stop adding tickmarks, subtracted from the scale's MaximumValue. + * + * @optionValue New value to be set. + */ + igBulletGraph(optionLiteral: 'option', optionName: "ticksPreTerminal", optionValue: number): void; + + /** + * Gets the interval to use for rendering labels. This defaults to be the same interval as the tickmarks on the scale. + */ + igBulletGraph(optionLiteral: 'option', optionName: "labelInterval"): number; + + /** + * Sets the interval to use for rendering labels. This defaults to be the same interval as the tickmarks on the scale. + * + * @optionValue New value to be set. + */ + igBulletGraph(optionLiteral: 'option', optionName: "labelInterval", optionValue: number): void; + + /** + * Gets the position at which to put the labels as a value from 0 to 1, measured from the bottom of the scale. + * Values further from zero than 1 can be used to hide the labels of the bullet graph. + */ + igBulletGraph(optionLiteral: 'option', optionName: "labelExtent"): number; + + /** + * Sets the position at which to put the labels as a value from 0 to 1, measured from the bottom of the scale. + * Values further from zero than 1 can be used to hide the labels of the bullet graph. + * + * @optionValue New value to be set. + */ + igBulletGraph(optionLiteral: 'option', optionName: "labelExtent", optionValue: number): void; + + /** + * A value to start adding labels, added to the scale's MinimumValue. + */ + igBulletGraph(optionLiteral: 'option', optionName: "labelsPostInitial"): number; + + /** + * A value to start adding labels, added to the scale's MinimumValue. + * + * @optionValue New value to be set. + */ + igBulletGraph(optionLiteral: 'option', optionName: "labelsPostInitial", optionValue: number): void; + + /** + * A value to stop adding labels, subtracted from the scale's MaximumValue. + */ + igBulletGraph(optionLiteral: 'option', optionName: "labelsPreTerminal"): number; + + /** + * A value to stop adding labels, subtracted from the scale's MaximumValue. + * + * @optionValue New value to be set. + */ + igBulletGraph(optionLiteral: 'option', optionName: "labelsPreTerminal", optionValue: number): void; + + /** + * Gets the number of minor tickmarks to place between major tickmarks. + */ + igBulletGraph(optionLiteral: 'option', optionName: "minorTickCount"): number; + + /** + * Sets the number of minor tickmarks to place between major tickmarks. + * + * @optionValue New value to be set. + */ + igBulletGraph(optionLiteral: 'option', optionName: "minorTickCount", optionValue: number): void; + + /** + * Gets the position at which to start rendering the major tickmarks as a value from 0 to 1, measured from the front/bottom of the bullet graph. + * Values further from zero than 1 can be used to make this extend further than the normal size of the bullet graph. + */ + igBulletGraph(optionLiteral: 'option', optionName: "tickStartExtent"): number; + + /** + * Sets the position at which to start rendering the major tickmarks as a value from 0 to 1, measured from the front/bottom of the bullet graph. + * Values further from zero than 1 can be used to make this extend further than the normal size of the bullet graph. + * + * @optionValue New value to be set. + */ + igBulletGraph(optionLiteral: 'option', optionName: "tickStartExtent", optionValue: number): void; + + /** + * Gets the position at which to stop rendering the major tickmarks as a value from 0 to 1, measured from the front/bottom of the bullet graph. + * Values further from zero than 1 can be used to make this extend further than the normal size of the bullet graph. + */ + igBulletGraph(optionLiteral: 'option', optionName: "tickEndExtent"): number; + + /** + * Sets the position at which to stop rendering the major tickmarks as a value from 0 to 1, measured from the front/bottom of the bullet graph. + * Values further from zero than 1 can be used to make this extend further than the normal size of the bullet graph. + * + * @optionValue New value to be set. + */ + igBulletGraph(optionLiteral: 'option', optionName: "tickEndExtent", optionValue: number): void; + + /** + * Gets the stroke thickness to use when rendering ticks. + */ + igBulletGraph(optionLiteral: 'option', optionName: "tickStrokeThickness"): number; + + /** + * Sets the stroke thickness to use when rendering ticks. + * + * @optionValue New value to be set. + */ + igBulletGraph(optionLiteral: 'option', optionName: "tickStrokeThickness", optionValue: number): void; + + /** + * Gets the brush to use for the major tickmarks. + */ + igBulletGraph(optionLiteral: 'option', optionName: "tickBrush"): string; + + /** + * Sets the brush to use for the major tickmarks. + * + * @optionValue New value to be set. + */ + igBulletGraph(optionLiteral: 'option', optionName: "tickBrush", optionValue: string): void; + + /** + * Gets the brush to use for the label font. + */ + igBulletGraph(optionLiteral: 'option', optionName: "fontBrush"): string; + + /** + * Sets the brush to use for the label font. + * + * @optionValue New value to be set. + */ + igBulletGraph(optionLiteral: 'option', optionName: "fontBrush", optionValue: string): void; + + /** + * Gets the brush to use for the actual value element. + */ + igBulletGraph(optionLiteral: 'option', optionName: "valueBrush"): string; + + /** + * Sets the brush to use for the actual value element. + * + * @optionValue New value to be set. + */ + igBulletGraph(optionLiteral: 'option', optionName: "valueBrush", optionValue: string): void; + + /** + * Gets the brush to use for the outline of actual value element. + */ + igBulletGraph(optionLiteral: 'option', optionName: "valueOutline"): string; + + /** + * Sets the brush to use for the outline of actual value element. + * + * @optionValue New value to be set. + */ + igBulletGraph(optionLiteral: 'option', optionName: "valueOutline", optionValue: string): void; + + /** + * Gets the stroke thickness to use when rendering single actual value element. + */ + igBulletGraph(optionLiteral: 'option', optionName: "valueStrokeThickness"): number; + + /** + * Sets the stroke thickness to use when rendering single actual value element. + * + * @optionValue New value to be set. + */ + igBulletGraph(optionLiteral: 'option', optionName: "valueStrokeThickness", optionValue: number): void; + + /** + * Gets the position at which to start rendering the minor tickmarks as a value from 0 to 1, measured from the front/bottom of the bullet graph. + * Values further from zero than 1 can be used to make this extend further than the normal size of the bullet graph. + */ + igBulletGraph(optionLiteral: 'option', optionName: "minorTickStartExtent"): number; + + /** + * Sets the position at which to start rendering the minor tickmarks as a value from 0 to 1, measured from the front/bottom of the bullet graph. + * Values further from zero than 1 can be used to make this extend further than the normal size of the bullet graph. + * + * @optionValue New value to be set. + */ + igBulletGraph(optionLiteral: 'option', optionName: "minorTickStartExtent", optionValue: number): void; + + /** + * Gets the position at which to stop rendering the minor tickmarks as a value from 0 to 1, measured from the front/bottom of the bullet graph. + * Values further from zero than 1 can be used to make this extend further than the normal size of the bullet graph. + */ + igBulletGraph(optionLiteral: 'option', optionName: "minorTickEndExtent"): number; + + /** + * Sets the position at which to stop rendering the minor tickmarks as a value from 0 to 1, measured from the front/bottom of the bullet graph. + * Values further from zero than 1 can be used to make this extend further than the normal size of the bullet graph. + * + * @optionValue New value to be set. + */ + igBulletGraph(optionLiteral: 'option', optionName: "minorTickEndExtent", optionValue: number): void; + + /** + * Gets the stroke thickness to use when rendering minor ticks. + */ + igBulletGraph(optionLiteral: 'option', optionName: "minorTickStrokeThickness"): number; + + /** + * Sets the stroke thickness to use when rendering minor ticks. + * + * @optionValue New value to be set. + */ + igBulletGraph(optionLiteral: 'option', optionName: "minorTickStrokeThickness", optionValue: number): void; + + /** + * Gets the brush to use for the minor tickmarks. + */ + igBulletGraph(optionLiteral: 'option', optionName: "minorTickBrush"): string; + + /** + * Sets the brush to use for the minor tickmarks. + * + * @optionValue New value to be set. + */ + igBulletGraph(optionLiteral: 'option', optionName: "minorTickBrush", optionValue: string): void; + + /** + * Gets a value indicating whether the scale is inverted. + * When the scale is inverted the direction in which the scale values increase is right to left. + */ + igBulletGraph(optionLiteral: 'option', optionName: "isScaleInverted"): boolean; + + /** + * Sets a value indicating whether the scale is inverted. + * When the scale is inverted the direction in which the scale values increase is right to left. + * + * @optionValue New value to be set. + */ + igBulletGraph(optionLiteral: 'option', optionName: "isScaleInverted", optionValue: boolean): void; + + /** + * Gets the brush to use to fill the backing of the bullet graph. + */ + igBulletGraph(optionLiteral: 'option', optionName: "backingBrush"): string; + + /** + * Sets the brush to use to fill the backing of the bullet graph. + * + * @optionValue New value to be set. + */ + igBulletGraph(optionLiteral: 'option', optionName: "backingBrush", optionValue: string): void; + + /** + * Gets the brush to use for the outline of the backing. + */ + igBulletGraph(optionLiteral: 'option', optionName: "backingOutline"): string; + + /** + * Sets the brush to use for the outline of the backing. + * + * @optionValue New value to be set. + */ + igBulletGraph(optionLiteral: 'option', optionName: "backingOutline", optionValue: string): void; + + /** + * Gets the stroke thickness of the backing outline. + */ + igBulletGraph(optionLiteral: 'option', optionName: "backingStrokeThickness"): number; + + /** + * Sets the stroke thickness of the backing outline. + * + * @optionValue New value to be set. + */ + igBulletGraph(optionLiteral: 'option', optionName: "backingStrokeThickness", optionValue: number): void; + + /** + * Gets the inner extent of the bullet graph backing. + */ + igBulletGraph(optionLiteral: 'option', optionName: "backingInnerExtent"): number; + + /** + * Sets the inner extent of the bullet graph backing. + * + * @optionValue New value to be set. + */ + igBulletGraph(optionLiteral: 'option', optionName: "backingInnerExtent", optionValue: number): void; + + /** + * Gets the outer extent of the bullet graph backing. + */ + igBulletGraph(optionLiteral: 'option', optionName: "backingOuterExtent"): number; + + /** + * Sets the outer extent of the bullet graph backing. + * + * @optionValue New value to be set. + */ + igBulletGraph(optionLiteral: 'option', optionName: "backingOuterExtent", optionValue: number): void; + + /** + * Gets the position at which to start rendering the scale, measured from the front/bottom of the bullet graph as a value from 0 to 1. + * Values further from zero than 1 can be used to make this extend further than the normal size of the bullet graph. + */ + igBulletGraph(optionLiteral: 'option', optionName: "scaleStartExtent"): number; + + /** + * Sets the position at which to start rendering the scale, measured from the front/bottom of the bullet graph as a value from 0 to 1. + * Values further from zero than 1 can be used to make this extend further than the normal size of the bullet graph. + * + * @optionValue New value to be set. + */ + igBulletGraph(optionLiteral: 'option', optionName: "scaleStartExtent", optionValue: number): void; + + /** + * Gets the position at which to stop rendering the scale as a value from 0 to 1, measured from the front/bottom of the bullet graph. + * Values further from zero than 1 can be used to make this extend further than the normal size of the bullet graph. + */ + igBulletGraph(optionLiteral: 'option', optionName: "scaleEndExtent"): number; + + /** + * Sets the position at which to stop rendering the scale as a value from 0 to 1, measured from the front/bottom of the bullet graph. + * Values further from zero than 1 can be used to make this extend further than the normal size of the bullet graph. + * + * @optionValue New value to be set. + */ + igBulletGraph(optionLiteral: 'option', optionName: "scaleEndExtent", optionValue: number): void; + + /** + * Gets the brush to use when rendering the fill of the comparative marker. + */ + igBulletGraph(optionLiteral: 'option', optionName: "targetValueBrush"): string; + + /** + * Sets the brush to use when rendering the fill of the comparative marker. + * + * @optionValue New value to be set. + */ + igBulletGraph(optionLiteral: 'option', optionName: "targetValueBrush", optionValue: string): void; + + /** + * Get the breadth of the target value element. + */ + igBulletGraph(optionLiteral: 'option', optionName: "targetValueBreadth"): number; + + /** + * Get or sets the breadth of the target value element. + * + * @optionValue New value to be set. + */ + igBulletGraph(optionLiteral: 'option', optionName: "targetValueBreadth", optionValue: number): void; + + /** + * Gets the position at which to start rendering the target value, measured from the front/bottom of the control as a value from 0 to 1. + * Values further from zero than 1 can be used to make this extend further than the normal size of the bullet graph. + */ + igBulletGraph(optionLiteral: 'option', optionName: "targetValueInnerExtent"): number; + + /** + * Sets the position at which to start rendering the target value, measured from the front/bottom of the control as a value from 0 to 1. + * Values further from zero than 1 can be used to make this extend further than the normal size of the bullet graph. + * + * @optionValue New value to be set. + */ + igBulletGraph(optionLiteral: 'option', optionName: "targetValueInnerExtent", optionValue: number): void; + + /** + * Gets the position at which to start rendering the target value, measured from the front/bottom of the control as a value from 0 to 1. + * Values further from zero than 1 can be used to make this extend further than the normal size of the bullet graph. + */ + igBulletGraph(optionLiteral: 'option', optionName: "targetValueOuterExtent"): number; + + /** + * Sets the position at which to start rendering the target value, measured from the front/bottom of the control as a value from 0 to 1. + * Values further from zero than 1 can be used to make this extend further than the normal size of the bullet graph. + * + * @optionValue New value to be set. + */ + igBulletGraph(optionLiteral: 'option', optionName: "targetValueOuterExtent", optionValue: number): void; + + /** + * Gets the brush to use when rendering the outline of the target value. + */ + igBulletGraph(optionLiteral: 'option', optionName: "targetValueOutline"): string; + + /** + * Sets the brush to use when rendering the outline of the target value. + * + * @optionValue New value to be set. + */ + igBulletGraph(optionLiteral: 'option', optionName: "targetValueOutline", optionValue: string): void; + + /** + * Gets the stroke thickness of the outline of the target value bar. + */ + igBulletGraph(optionLiteral: 'option', optionName: "targetValueStrokeThickness"): number; + + /** + * Sets the stroke thickness of the outline of the target value bar. + * + * @optionValue New value to be set. + */ + igBulletGraph(optionLiteral: 'option', optionName: "targetValueStrokeThickness", optionValue: number): void; + + /** + * Gets the number of milliseconds over which changes to the bullet graph should be animated. + */ + igBulletGraph(optionLiteral: 'option', optionName: "transitionDuration"): number; + + /** + * Sets the number of milliseconds over which changes to the bullet graph should be animated. + * + * @optionValue New value to be set. + */ + igBulletGraph(optionLiteral: 'option', optionName: "transitionDuration", optionValue: number): void; + + /** + * Gets the time in milliseconds that tooltip appearance is delayed with. + */ + igBulletGraph(optionLiteral: 'option', optionName: "showToolTipTimeout"): number; + + /** + * Sets the time in milliseconds that tooltip appearance is delayed with. + * + * @optionValue New value to be set. + */ + igBulletGraph(optionLiteral: 'option', optionName: "showToolTipTimeout", optionValue: number): void; + + /** + * Gets a value indicating whether tooltips are enabled. + */ + igBulletGraph(optionLiteral: 'option', optionName: "showToolTip"): boolean; + + /** + * Sets a value indicating whether tooltips are enabled. + * + * @optionValue New value to be set. + */ + igBulletGraph(optionLiteral: 'option', optionName: "showToolTip", optionValue: boolean): void; + + /** + * Gets the font. + */ + igBulletGraph(optionLiteral: 'option', optionName: "font"): string; + + /** + * Sets the font. + * + * @optionValue New value to be set. + */ + igBulletGraph(optionLiteral: 'option', optionName: "font", optionValue: string): void; + + /** + */ + igBulletGraph(optionLiteral: 'option', optionName: "pixelScalingRatio"): number; + + /** + */ + igBulletGraph(optionLiteral: 'option', optionName: "pixelScalingRatio", optionValue: number): void; + + /** + */ + igBulletGraph(optionLiteral: 'option', optionName: "formatLabel"): FormatLabelEvent; + + /** + */ + igBulletGraph(optionLiteral: 'option', optionName: "formatLabel", optionValue: FormatLabelEvent): void; + + /** + */ + igBulletGraph(optionLiteral: 'option', optionName: "alignLabel"): AlignLabelEvent; + + /** + */ + igBulletGraph(optionLiteral: 'option', optionName: "alignLabel", optionValue: AlignLabelEvent): void; + igBulletGraph(options: IgBulletGraph): JQuery; + igBulletGraph(optionLiteral: 'option', optionName: string): any; + igBulletGraph(optionLiteral: 'option', options: IgBulletGraph): JQuery; + igBulletGraph(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igBulletGraph(methodName: string, ...methodParams: any[]): any; +} +interface PropertyChangedEvent { + (event: Event, ui: PropertyChangedEventUIParam): void; +} + +interface PropertyChangedEventUIParam { +} + +interface IgCategoryChart { + /** + * Gets or sets the data value corresponding to the minimum value of the Y-axis. + */ + yAxisMinimumValue?: number; + + /** + * Gets or sets the data value corresponding to the maximum value of the Y-axis. + */ + yAxisMaximumValue?: number; + + /** + * Gets or sets the left margin of chart title + */ + titleLeftMargin?: number; + + /** + * Gets or sets the right margin of chart title + */ + titleRightMargin?: number; + + /** + * Gets or sets the top margin of chart title + */ + titleTopMargin?: number; + + /** + * Gets or sets the bottom margin of chart title + */ + titleBottomMargin?: number; + + /** + * Gets or sets the duration used for animating series plots when the chart is loading into view + */ + transitionInDuration?: number; + + /** + * Gets or sets the duration used for animating series plots when the data is changing + */ + transitionDuration?: number; + + /** + * Gets or sets the easing function used for animating series plots when the chart is loading into view + * This can be set to one of the known values "linear" or "cubic," or it can be set to an easing function which takes a single numeric parameter and returns a number. + */ + transitionInEasingFunction?: any; + + /** + * Gets or sets the easing function used for animating series plots when the data is changing. + * This can be set to one of the known values "linear" or "cubic," or it can be set to an easing function which takes a single numeric parameter and returns a number. + */ + transitionEasingFunction?: any; + + /** + * Gets or sets the left margin of labels on the X-axis + */ + xAxisLabelLeftMargin?: number; + + /** + * Gets or sets the top margin of labels on the X-axis + */ + xAxisLabelTopMargin?: number; + + /** + * Gets or sets the right margin of labels on the X-axis + */ + xAxisLabelRightMargin?: number; + + /** + * Gets or sets the bottom margin of labels on the X-axis + */ + xAxisLabelBottomMargin?: number; + + /** + * Gets or sets the left margin of labels on the Y-axis + */ + yAxisLabelLeftMargin?: number; + + /** + * Gets or sets the top margin of labels on the Y-axis + */ + yAxisLabelTopMargin?: number; + + /** + * Gets or sets the right margin of labels on the Y-axis + */ + yAxisLabelRightMargin?: number; + + /** + * Gets or sets the bottom margin of labels on the Y-axis + */ + yAxisLabelBottomMargin?: number; + + /** + * Gets or sets color of labels on the X-axis + */ + xAxisLabelTextColor?: string; + + /** + * Gets or sets color of labels on the Y-axis + */ + yAxisLabelTextColor?: string; + + /** + * Gets or sets CSS font property for labels on X-axis + */ + xAxisLabelTextStyle?: string; + + /** + * Gets or sets CSS font property for labels on Y-axis + */ + yAxisLabelTextStyle?: string; + + /** + * Gets or sets the left margin of chart subtitle + */ + subtitleLeftMargin?: number; + + /** + * Gets or sets the top margin of chart subtitle + */ + subtitleTopMargin?: number; + + /** + * Gets or sets the right margin of chart subtitle + */ + subtitleRightMargin?: number; + + /** + * Gets or sets the bottom margin of chart subtitle + */ + subtitleBottomMargin?: number; + + /** + * Gets or sets color of chart subtitle + */ + subtitleTextColor?: string; + + /** + * Gets or sets CSS font property for the chart subtitle + */ + subtitleTextStyle?: string; + + /** + * Gets or sets color of chart title + */ + titleTextColor?: string; + + /** + * Gets or sets CSS font property for the chart title + */ + titleTextStyle?: string; + + /** + * Gets or sets the left margin of the chart content in the canvas + */ + leftMargin?: number; + + /** + * Gets or sets the top margin of the chart content in the canvas + */ + topMargin?: number; + + /** + * Gets or sets the right margin of the chart content in the canvas + */ + rightMargin?: number; + + /** + * Gets or sets the bottom margin around the chart content in the canvas + */ + bottomMargin?: number; + + /** + * Gets or sets the extent area dedicated to the a title on the X-axis. If unspecified, this value is auto-calculated. + */ + xAxisTitleExtent?: number; + + /** + * Gets or sets the extent area dedicated to the a title on the Y-axis. If unspecified, this value is auto-calculated. + */ + yAxisTitleExtent?: number; + + /** + * Gets or sets the margin around a title on the X-axis + */ + xAxisTitleMargin?: number; + + /** + * Gets or sets the margin around a title on the Y-axis + */ + yAxisTitleMargin?: number; + + /** + * Gets or sets the left margin of a title on the X-axis + */ + xAxisTitleLeftMargin?: number; + + /** + * Gets or sets the left margin of a title on the Y-axis + */ + yAxisTitleLeftMargin?: number; + + /** + * Gets or sets the top margin of a title on the X-axis + */ + xAxisTitleTopMargin?: number; + + /** + * Gets or sets the top margin of a title on the Y-axis + */ + yAxisTitleTopMargin?: number; + + /** + * Gets or sets the right margin of a title on the X-axis + */ + xAxisTitleRightMargin?: number; + + /** + * Gets or sets the right margin of a title on the Y-axis + */ + yAxisTitleRightMargin?: number; + + /** + * Gets or sets the bottom margin of a title on the X-axis + */ + xAxisTitleBottomMargin?: number; + + /** + * Gets or sets the bottom margin of a title on the Y-axis + */ + yAxisTitleBottomMargin?: number; + + /** + * Gets or sets the id of a template element to use for tooltips, or markup representing the tooltip template. + */ + tooltipTemplate?: string; + + /** + * Gets or sets function which takes an context object and returns a formatted label for the X-axis. + */ + xAxisFormatLabel?: any; + + /** + * Gets or sets function which takes a context object and returns a formatted label for the Y-axis. + */ + yAxisFormatLabel?: any; + + /** + * Gets or sets color of title on the X-axis + */ + xAxisTitleTextColor?: string; + + /** + * Gets or sets color of title on the Y-axis + */ + yAxisTitleTextColor?: string; + + /** + * Gets or sets CSS font property for title on X-axis + */ + xAxisTitleTextStyle?: string; + + /** + * Gets or sets CSS font property for title on Y-axis + */ + yAxisTitleTextStyle?: string; + widget?: any; + + /** + * Gets or sets a collection of data items used to generate the chart. + * Value of this property can be a list of objects containing one or more numeric properties. Additionally, if the objects in the list implement the IEnumerable interface, the Category Chart will attempt to delve into the sub-collections when reading through the data source. Databinding can be further configured by attributing the data item classes with the DataSeriesMemberIntentAttribute. + */ + itemsSource?: any; + + /** + * Gets or sets a set of property paths that should be included for consideration by the category chart, leaving the remaineder excluded. If null, all properties will be considered. + */ + includedProperties?: any; + + /** + * Gets or sets a set of property paths that should be excluded from consideration by the category chart. + */ + excludedProperties?: any; + + /** + * Gets or sets the type of chart series to generate from the data. + * + * Valid values: + * "line" Specifies category line series with markers at each data point + * "area" Specifies category area series + * "column" Specifies category column chart with vertical rectangles at each data point + * "point" Specifies category point chart with markers at each data point + * "stepLine" Specifies category step line chart + * "stepArea" Specifies category step area chart + * "spline" Specifies category spline line series with markers at each data point + * "splineArea" Specifies category spline area series + * "waterfall" Specifies category waterfall chart + * "auto" Specifies automatic selection of chart type based on suggestions from Data Adapter + */ + chartType?: string; + + /** + * Gets or sets the palette of brushes to use for coloring the chart series. The value provided should be an array of CSS color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + brushes?: any; + + /** + * Gets or sets the palette of brushes to use for outlines on the chart series. The value provided should be an array of CSS color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + outlines?: any; + + /** + * Sets the legend to connect this chart to. + * When the legend property is set, the chart will use it to display information about its series. Legends can be shared by multiple chart controls. + */ + legend?: any; + + /** + * Gets or sets whether the chart should perform horizontal zoom when the user initiates a mouse wheel or mouse drag operation. + */ + isHorizontalZoomEnabled?: boolean; + + /** + * Gets or sets whether the chart should perform vertical zoom when the user initiates a mouse wheel or mouse drag operation. + */ + isVerticalZoomEnabled?: boolean; + + /** + * Gets or sets the rectangle representing the current scroll and zoom state of the chart. + * WindowRect is expressed as a Rectangle with coordinates and sizes between 0 and 1. + * The provided object should have numeric properties called left, top, width and height. + */ + windowRect?: any; + + /** + * Gets or sets text to display above the plot area. + */ + title?: string; + + /** + * Gets or sets text to display below the chart Title, above the plot area. + */ + subtitle?: string; + + /** + * Gets or sets horizontal alignment which determines the title position, relative to the left and right edges of the chart. + * + * Valid values: + * "left" + * "center" + * "right" + * "stretch" + */ + titleAlignment?: string; + + /** + * Gets or sets horizontal alignment which determines the subtitle position, relative to the left and right edges of the chart. + * + * Valid values: + * "left" + * "center" + * "right" + * "stretch" + */ + subtitleAlignment?: string; + + /** + * Gets or sets behavior that determines how unknown values will be plotted on the chart.Null and Double.NaN are two examples of unknown values. + * + * + * Valid values: + * "linearInterpolate" + * "dontPlot" + */ + unknownValuePlotting?: string; + + /** + * Gets or sets behavior for markers in each series which are placed too close together for the current view, resulting in a collision. + * + * Valid values: + * "none" + * "omit" + */ + markerCollisionAvoidance?: string; + + /** + * Gets or sets whether animation of series plots is enabled when the chart is loading into view + */ + isTransitionInEnabled?: boolean; + + /** + * Gets or sets the method that determines how to animate series plots when the chart is loading into view + * + * Valid values: + * "auto" + * "fromZero" + * "sweepFromLeft" + * "sweepFromRight" + * "sweepFromTop" + * "sweepFromBottom" + * "sweepFromCenter" + * "accordionFromLeft" + * "accordionFromRight" + * "accordionFromTop" + * "accordionFromBottom" + * "expand" + * "sweepFromCategoryAxisMinimum" + * "sweepFromCategoryAxisMaximum" + * "sweepFromValueAxisMinimum" + * "sweepFromValueAxisMaximum" + * "accordionFromCategoryAxisMinimum" + * "accordionFromCategoryAxisMaximum" + * "accordionFromValueAxisMinimum" + * "accordionFromValueAxisMaximum" + */ + transitionInMode?: string; + + /** + * Gets or sets the arrival speed used for animating series plots when the chart is loading into view + * + * Valid values: + * "auto" + * "normal" + * "valueScaled" + * "indexScaled" + * "random" + */ + transitionInSpeedType?: string; + + /** + * Gets or sets the frequency of displayed labels along the X-axis. + * Gets or sets the set value is a factor that determines which labels will be hidden. For example, an interval of 2 will display every other label. + */ + xAxisInterval?: number; + + /** + * Gets or sets the frequency of displayed minor lines along the X-axis. + * Gets or sets the set value is a factor that determines how the minor lines will be displayed. + */ + xAxisMinorInterval?: number; + + /** + * Gets or sets the amount of space between adjacent categories for the X-axis. + * The gap is silently clamped to the range [0, 1] when used. + */ + xAxisGap?: number; + + /** + * Gets or sets the amount of overlap between adjacent categories for the X-axis. + * Gets or sets the overlap is silently clamped to the range [-1, 1] when used. + */ + xAxisOverlap?: number; + + /** + * Gets or sets the distance between each labels and grid line along the Y-axis. + */ + yAxisInterval?: number; + + /** + * Gets or sets whether the Y-axis should use a logarithmic scale instead of a linear one. + * Since log(-1) is imaginary and log(0) is undefined, it is recommended to enable this property only when the Y-axis minimum is greater than zero. + */ + yAxisIsLogarithmic?: boolean; + + /** + * Gets or sets the base value to use in the log function when mapping the position of data items along the Y-axis. + * This property is effective only when YAxisIsLogarithmic is true. + */ + yAxisLogarithmBase?: number; + + /** + * Gets or sets the frequency of displayed minor lines along the Y-axis. + */ + yAxisMinorInterval?: number; + + /** + * Gets or sets the format for labels along the X-axis. + */ + xAxisLabel?: any; + + /** + * Gets or sets the format for labels along the Y-axis. + */ + yAxisLabel?: any; + + /** + * Gets or sets the color to apply to major gridlines along the X-axis. + */ + xAxisMajorStroke?: string; + + /** + * Gets or sets the color to apply to major gridlines along the Y-axis. + */ + yAxisMajorStroke?: string; + + /** + * Gets or sets the thickness to apply to major gridlines along the X-axis. + */ + xAxisMajorStrokeThickness?: number; + + /** + * Gets or sets the thickness to apply to major gridlines along the Y-axis. + */ + yAxisMajorStrokeThickness?: number; + + /** + * Gets or sets the thickness to apply to minor gridlines along the X-axis. + */ + xAxisMinorStrokeThickness?: number; + + /** + * Gets or sets the thickness to apply to minor gridlines along the Y-axis. + */ + yAxisMinorStrokeThickness?: number; + + /** + * Gets or sets the color to apply to stripes along the X-axis. + */ + xAxisStrip?: string; + + /** + * Gets or sets the color to apply to stripes along the Y-axis. + */ + yAxisStrip?: string; + + /** + * Gets or sets the color to apply to the X-axis line. + */ + xAxisStroke?: string; + + /** + * Gets or sets the color to apply to the Y-axis line. + */ + yAxisStroke?: string; + + /** + * Gets or sets the thickness to apply to the X-axis line. + */ + xAxisStrokeThickness?: number; + + /** + * Gets or sets the thickness to apply to the Y-axis line. + */ + yAxisStrokeThickness?: number; + + /** + * Gets or sets the length of tickmarks along the X-axis. + */ + xAxisTickLength?: number; + + /** + * Gets or sets the length of tickmarks along the Y-axis. + */ + yAxisTickLength?: number; + + /** + * Gets or sets the color to apply to tickmarks along the X-axis. + */ + xAxisTickStroke?: string; + + /** + * Gets or sets the color to apply to tickmarks along the Y-axis. + */ + yAxisTickStroke?: string; + + /** + * Gets or sets the thickness to apply to tickmarks along the X-axis. + */ + xAxisTickStrokeThickness?: number; + + /** + * Gets or sets the thickness to apply to tickmarks along the Y-axis. + */ + yAxisTickStrokeThickness?: number; + + /** + * Text to display below the X-axis. + */ + xAxisTitle?: string; + + /** + * Text to display to the left of the Y-axis. + */ + yAxisTitle?: string; + + /** + * Gets or sets the color to apply to minor gridlines along the X-axis. + */ + xAxisMinorStroke?: string; + + /** + * Gets or sets the color to apply to minor gridlines along the Y-axis. + */ + yAxisMinorStroke?: string; + + /** + * Gets or sets the angle of rotation for labels along the X-axis. + */ + xAxisLabelAngle?: number; + + /** + * Gets or sets the angle of rotation for labels along the Y-axis. + */ + yAxisLabelAngle?: number; + + /** + * Gets or sets the distance between the X-axis and the bottom of the chart. + */ + xAxisExtent?: number; + + /** + * Gets or sets the distance between the Y-axis and the left edge of the chart. + */ + yAxisExtent?: number; + + /** + * Gets or sets the angle of rotation for the X-axis title. + */ + xAxisTitleAngle?: number; + + /** + * Gets or sets the angle of rotation for the Y-axis title. + */ + yAxisTitleAngle?: number; + + /** + * Gets or sets the rendering resolution for series in this chart. + * Where n = Resolution, for every n horizontal pixels, combine all items into a single datapoint. When Resolution = 0, all datapoints will be rendered as graphical objects. Charts with a higher resolution will have faster performance. + */ + resolution?: number; + + /** + * Gets or sets the palette of brushes to used for coloring trend lines in this chart. The value provided should be an array of CSS color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + trendLineBrushes?: any; + + /** + * Gets or sets the formula used for calculating trend lines in this chart. + * + * Valid values: + * "none" + * "linearFit" + * "quadraticFit" + * "cubicFit" + * "quarticFit" + * "quinticFit" + * "logarithmicFit" + * "exponentialFit" + * "powerLawFit" + * "simpleAverage" + * "exponentialAverage" + * "modifiedAverage" + * "cumulativeAverage" + * "weightedAverage" + */ + trendLineType?: string; + + /** + * Gets or sets the thickness of the chart series. Depending on the ChartType, this can be the main brush used, or just the outline. + */ + thickness?: number; + + /** + * Gets or sets collection of marker shapes used for representing data points of series in this chart. + * When MarkerTypes is null or empty, each series' marker type will be set to none or automatic, depending on the series type. + */ + markerTypes?: any; + + /** + * Gets or sets the palette of brushes used for coloring fill of data point markers. + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + markerBrushes?: any; + + /** + * Gets or sets the palette of brushes used for coloring outline of data point markers. + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + markerOutlines?: any; + + /** + * Gets or sets the thickness of the trend lines in this chart. + */ + trendLineThickness?: number; + + /** + * Gets or sets whether the direction of the X-axis is inverted, placing the first data items on the right side instead of left side + */ + xAxisInverted?: boolean; + + /** + * Gets or sets whether the direction of the Y-axis is inverted, placing minimum numeric value at the top of the axis instead of bottom + */ + yAxisInverted?: boolean; + + /** + * Gets or sets the palette used for coloring negative items of Waterfall chart type. + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + negativeBrushes?: any; + + /** + * Gets or sets the horizontal alignment of the X-axis title. + * + * Valid values: + * "left" + * "center" + * "right" + * "stretch" + */ + xAxisTitleAlignment?: string; + + /** + * Gets or sets the vertical alignment of the Y-axis title. + * + * Valid values: + * "top" + * "center" + * "bottom" + * "stretch" + */ + yAxisTitleAlignment?: string; + + /** + * Gets or sets the horizontal alignment of X-axis labels. + * + * Valid values: + * "left" + * "center" + * "right" + * "stretch" + */ + xAxisLabelHorizontalAlignment?: string; + + /** + * Gets or sets the horizontal alignment of Y-axis labels. + * + * Valid values: + * "left" + * "center" + * "right" + * "stretch" + */ + yAxisLabelHorizontalAlignment?: string; + + /** + * Gets or sets the vertical alignment of X-axis labels. + * + * Valid values: + * "top" + * "center" + * "bottom" + * "stretch" + */ + xAxisLabelVerticalAlignment?: string; + + /** + * Gets or sets the vertical alignment of Y-axis labels. + * + * Valid values: + * "top" + * "center" + * "bottom" + * "stretch" + */ + yAxisLabelVerticalAlignment?: string; + + /** + * Gets or sets the visibility of X-axis labels. + * + * Valid values: + * "visible" + * "collapsed" + */ + xAxisLabelVisibility?: string; + + /** + * Gets or sets the visibility of Y-axis labels. + * + * Valid values: + * "visible" + * "collapsed" + */ + yAxisLabelVisibility?: string; + negativeOutlines?: any; + + /** + * Gets or sets a value indicating whether grid and tick lines are aligned to device pixels. + */ + alignsGridLinesToPixels?: boolean; + + /** + * The width of the chart. + */ + width?: number; + + /** + * The height of the chart. + */ + height?: number; + + /** + * Gets sets maximum number of displayed records in chart. + */ + maxRecCount?: number; + + /** + * Gets sets a valid data source. + * That can be instance of array or primitives, array of objects, instance of $.ig.DataSource, or any other data accepted by $.ig.DataSource. + * Note: if it is set to string and "dataSourceType" option is not set, then $.ig.JSONPDataSource is used. + */ + dataSource?: any; + + /** + * Gets sets data source type (such as "json", "xml", etc). Please refer to the documentation of $.ig.DataSource and its type property + */ + dataSourceType?: string; + + /** + * Gets sets url which is used for sending JSON on request for remote data. + */ + dataSourceUrl?: string; + + /** + * See $.ig.DataSource. property in the response specifying the total number of records on the server. + */ + responseTotalRecCountKey?: string; + + /** + * See $.ig.DataSource. This is basically the property in the responses where data records are held, if the response is wrapped. + */ + responseDataKey?: string; + + /** + * Event raised when a property value is changed. + */ + propertyChanged?: PropertyChangedEvent; + + /** + * Event which is raised before data binding. + * Return false in order to cancel data binding. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.dataSource to obtain reference to instance of $.ig.DataSource. + */ + dataBinding?: DataBindingEvent; + + /** + * Event which is raised after data binding. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.data to obtain reference to array actual data which is displayed by chart. + * Use ui.dataSource to obtain reference to instance of $.ig.DataSource. + */ + dataBound?: DataBoundEvent; + + /** + * Event which is raised before tooltip is updated. + * Return false in order to cancel updating and hide tooltip. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.text to obtain html of tooltip. Value of that member can be modified. If modified value is null or empty string, then current content of tooltip keeps old value. + * Use ui.item to obtain reference to item. Value of that member can be modified or replaced by custom item. + * Use ui.x to obtain left position of tooltip in pixels relative to widget. Value of that member can be modified. + * Use ui.y to obtain top position of tooltip in pixels relative to widget. Value of that member can be modified. + * Use ui.element to obtain reference to jquery object which represents tooltip. Value of that member can be replaced by custom element. + */ + updateTooltip?: UpdateTooltipEvent; + + /** + * Event which is raised before tooltip is hidden. + * Return false in order to cancel hiding and keep tooltip visible. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.item to obtain reference to item. + * Use ui.element to obtain reference to jquery object which represents tooltip or value of ui.element from last updateTooltip event. Value of that member can be replaced by custom element. + */ + hideTooltip?: HideTooltipEvent; + + /** + * Option for igCategoryChart + */ + [optionName: string]: any; +} +interface IgCategoryChartMethods { + destroy(): void; + id(): void; + exportVisualData(): void; + + /** + * Find index of item within actual data used by chart. + * + * @param item The reference to item. + */ + findIndexOfItem(item: Object): number; + + /** + * Get item within actual data used by chart. That is similar to this.getData()[ index ]. + * + * @param index Index of data item. + */ + getDataItem(index: Object): Object; + + /** + * Get reference of actual data used by chart. + */ + getData(): any[]; + + /** + * Adds a new item to the data source and notifies the chart. + * + * @param item The item that we want to add to the data source. + */ + addItem(item: Object): Object; + + /** + * Inserts a new item to the data source and notifies the chart. + * + * @param item the new item that we want to insert in the data source. + * @param index The index in the data source where the new item will be inserted. + */ + insertItem(item: Object, index: number): Object; + + /** + * Deletes an item from the data source and notifies the chart. + * + * @param index The index in the data source from where the item will be been removed. + */ + removeItem(index: number): Object; + + /** + * Updates an item in the data source and notifies the chart. + * + * @param index The index of the item in the data source that we want to change. + * @param item The new item object that will be set in the data source. + */ + setItem(index: number, item: Object): Object; + + /** + * Notifies the chart that an item has been set in an associated data source. + * + * @param dataSource The data source in which the change happened. + * @param index The index in the items source that has been changed. + * @param newItem the new item that has been set in the collection. + * @param oldItem the old item that has been overwritten in the collection. + */ + notifySetItem(dataSource: Object, index: number, newItem: Object, oldItem: Object): Object; + + /** + * Notifies the chart that the items have been cleared from an associated data source. + * It's not necessary to notify more than one target of a change if they share the same items source. + * + * @param dataSource The data source in which the change happened. + */ + notifyClearItems(dataSource: Object): Object; + + /** + * Notifies the target axis or series that an item has been inserted at the specified index in its data source. + * It's not necessary to notify more than one target of a change if they share the same items source. + * + * @param dataSource The data source in which the change happened. + * @param index The index in the items source where the new item has been inserted. + * @param newItem the new item that has been set in the collection. + */ + notifyInsertItem(dataSource: Object, index: number, newItem: Object): Object; + + /** + * Notifies the target axis or series that an item has been removed from the specified index in its data source. + * It's not necessary to notify more than one target of a change if they share the same items source. + * + * @param dataSource The data source in which the change happened. + * @param index The index in the items source from where the old item has been removed. + * @param oldItem the old item that has been removed from the collection. + */ + notifyRemoveItem(dataSource: Object, index: number, oldItem: Object): Object; + + /** + * Get reference to chart object. + */ + chart(): Object; + + /** + * Binds data to the chart + */ + dataBind(): void; +} +interface JQuery { + data(propertyName: "igCategoryChart"): IgCategoryChartMethods; +} + +interface JQuery { + igCategoryChart(methodName: "destroy"): void; + igCategoryChart(methodName: "id"): void; + igCategoryChart(methodName: "exportVisualData"): void; + igCategoryChart(methodName: "findIndexOfItem", item: Object): number; + igCategoryChart(methodName: "getDataItem", index: Object): Object; + igCategoryChart(methodName: "getData"): any[]; + igCategoryChart(methodName: "addItem", item: Object): Object; + igCategoryChart(methodName: "insertItem", item: Object, index: number): Object; + igCategoryChart(methodName: "removeItem", index: number): Object; + igCategoryChart(methodName: "setItem", index: number, item: Object): Object; + igCategoryChart(methodName: "notifySetItem", dataSource: Object, index: number, newItem: Object, oldItem: Object): Object; + igCategoryChart(methodName: "notifyClearItems", dataSource: Object): Object; + igCategoryChart(methodName: "notifyInsertItem", dataSource: Object, index: number, newItem: Object): Object; + igCategoryChart(methodName: "notifyRemoveItem", dataSource: Object, index: number, oldItem: Object): Object; + igCategoryChart(methodName: "chart"): Object; + igCategoryChart(methodName: "dataBind"): void; + + /** + * Gets the data value corresponding to the minimum value of the Y-axis. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisMinimumValue"): number; + + /** + * Sets the data value corresponding to the minimum value of the Y-axis. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisMinimumValue", optionValue: number): void; + + /** + * Gets the data value corresponding to the maximum value of the Y-axis. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisMaximumValue"): number; + + /** + * Sets the data value corresponding to the maximum value of the Y-axis. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisMaximumValue", optionValue: number): void; + + /** + * Gets the left margin of chart title + */ + igCategoryChart(optionLiteral: 'option', optionName: "titleLeftMargin"): number; + + /** + * Sets the left margin of chart title + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "titleLeftMargin", optionValue: number): void; + + /** + * Gets the right margin of chart title + */ + igCategoryChart(optionLiteral: 'option', optionName: "titleRightMargin"): number; + + /** + * Sets the right margin of chart title + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "titleRightMargin", optionValue: number): void; + + /** + * Gets the top margin of chart title + */ + igCategoryChart(optionLiteral: 'option', optionName: "titleTopMargin"): number; + + /** + * Sets the top margin of chart title + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "titleTopMargin", optionValue: number): void; + + /** + * Gets the bottom margin of chart title + */ + igCategoryChart(optionLiteral: 'option', optionName: "titleBottomMargin"): number; + + /** + * Sets the bottom margin of chart title + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "titleBottomMargin", optionValue: number): void; + + /** + * Gets the duration used for animating series plots when the chart is loading into view + */ + igCategoryChart(optionLiteral: 'option', optionName: "transitionInDuration"): number; + + /** + * Sets the duration used for animating series plots when the chart is loading into view + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "transitionInDuration", optionValue: number): void; + + /** + * Gets the duration used for animating series plots when the data is changing + */ + igCategoryChart(optionLiteral: 'option', optionName: "transitionDuration"): number; + + /** + * Sets the duration used for animating series plots when the data is changing + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "transitionDuration", optionValue: number): void; + + /** + * Gets the easing function used for animating series plots when the chart is loading into view + * This can be set to one of the known values "linear" or "cubic," or it can be set to an easing function which takes a single numeric parameter and returns a number. + */ + igCategoryChart(optionLiteral: 'option', optionName: "transitionInEasingFunction"): any; + + /** + * Sets the easing function used for animating series plots when the chart is loading into view + * This can be set to one of the known values "linear" or "cubic," or it can be set to an easing function which takes a single numeric parameter and returns a number. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "transitionInEasingFunction", optionValue: any): void; + + /** + * Gets the easing function used for animating series plots when the data is changing. + * This can be set to one of the known values "linear" or "cubic," or it can be set to an easing function which takes a single numeric parameter and returns a number. + */ + igCategoryChart(optionLiteral: 'option', optionName: "transitionEasingFunction"): any; + + /** + * Sets the easing function used for animating series plots when the data is changing. + * This can be set to one of the known values "linear" or "cubic," or it can be set to an easing function which takes a single numeric parameter and returns a number. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "transitionEasingFunction", optionValue: any): void; + + /** + * Gets the left margin of labels on the X-axis + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisLabelLeftMargin"): number; + + /** + * Sets the left margin of labels on the X-axis + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisLabelLeftMargin", optionValue: number): void; + + /** + * Gets the top margin of labels on the X-axis + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisLabelTopMargin"): number; + + /** + * Sets the top margin of labels on the X-axis + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisLabelTopMargin", optionValue: number): void; + + /** + * Gets the right margin of labels on the X-axis + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisLabelRightMargin"): number; + + /** + * Sets the right margin of labels on the X-axis + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisLabelRightMargin", optionValue: number): void; + + /** + * Gets the bottom margin of labels on the X-axis + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisLabelBottomMargin"): number; + + /** + * Sets the bottom margin of labels on the X-axis + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisLabelBottomMargin", optionValue: number): void; + + /** + * Gets the left margin of labels on the Y-axis + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisLabelLeftMargin"): number; + + /** + * Sets the left margin of labels on the Y-axis + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisLabelLeftMargin", optionValue: number): void; + + /** + * Gets the top margin of labels on the Y-axis + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisLabelTopMargin"): number; + + /** + * Sets the top margin of labels on the Y-axis + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisLabelTopMargin", optionValue: number): void; + + /** + * Gets the right margin of labels on the Y-axis + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisLabelRightMargin"): number; + + /** + * Sets the right margin of labels on the Y-axis + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisLabelRightMargin", optionValue: number): void; + + /** + * Gets the bottom margin of labels on the Y-axis + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisLabelBottomMargin"): number; + + /** + * Sets the bottom margin of labels on the Y-axis + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisLabelBottomMargin", optionValue: number): void; + + /** + * Gets color of labels on the X-axis + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisLabelTextColor"): string; + + /** + * Sets color of labels on the X-axis + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisLabelTextColor", optionValue: string): void; + + /** + * Gets color of labels on the Y-axis + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisLabelTextColor"): string; + + /** + * Sets color of labels on the Y-axis + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisLabelTextColor", optionValue: string): void; + + /** + * Gets CSS font property for labels on X-axis + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisLabelTextStyle"): string; + + /** + * Sets CSS font property for labels on X-axis + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisLabelTextStyle", optionValue: string): void; + + /** + * Gets CSS font property for labels on Y-axis + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisLabelTextStyle"): string; + + /** + * Sets CSS font property for labels on Y-axis + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisLabelTextStyle", optionValue: string): void; + + /** + * Gets the left margin of chart subtitle + */ + igCategoryChart(optionLiteral: 'option', optionName: "subtitleLeftMargin"): number; + + /** + * Sets the left margin of chart subtitle + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "subtitleLeftMargin", optionValue: number): void; + + /** + * Gets the top margin of chart subtitle + */ + igCategoryChart(optionLiteral: 'option', optionName: "subtitleTopMargin"): number; + + /** + * Sets the top margin of chart subtitle + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "subtitleTopMargin", optionValue: number): void; + + /** + * Gets the right margin of chart subtitle + */ + igCategoryChart(optionLiteral: 'option', optionName: "subtitleRightMargin"): number; + + /** + * Sets the right margin of chart subtitle + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "subtitleRightMargin", optionValue: number): void; + + /** + * Gets the bottom margin of chart subtitle + */ + igCategoryChart(optionLiteral: 'option', optionName: "subtitleBottomMargin"): number; + + /** + * Sets the bottom margin of chart subtitle + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "subtitleBottomMargin", optionValue: number): void; + + /** + * Gets color of chart subtitle + */ + igCategoryChart(optionLiteral: 'option', optionName: "subtitleTextColor"): string; + + /** + * Sets color of chart subtitle + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "subtitleTextColor", optionValue: string): void; + + /** + * Gets CSS font property for the chart subtitle + */ + igCategoryChart(optionLiteral: 'option', optionName: "subtitleTextStyle"): string; + + /** + * Sets CSS font property for the chart subtitle + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "subtitleTextStyle", optionValue: string): void; + + /** + * Gets color of chart title + */ + igCategoryChart(optionLiteral: 'option', optionName: "titleTextColor"): string; + + /** + * Sets color of chart title + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "titleTextColor", optionValue: string): void; + + /** + * Gets CSS font property for the chart title + */ + igCategoryChart(optionLiteral: 'option', optionName: "titleTextStyle"): string; + + /** + * Sets CSS font property for the chart title + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "titleTextStyle", optionValue: string): void; + + /** + * Gets the left margin of the chart content in the canvas + */ + igCategoryChart(optionLiteral: 'option', optionName: "leftMargin"): number; + + /** + * Sets the left margin of the chart content in the canvas + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "leftMargin", optionValue: number): void; + + /** + * Gets the top margin of the chart content in the canvas + */ + igCategoryChart(optionLiteral: 'option', optionName: "topMargin"): number; + + /** + * Sets the top margin of the chart content in the canvas + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "topMargin", optionValue: number): void; + + /** + * Gets the right margin of the chart content in the canvas + */ + igCategoryChart(optionLiteral: 'option', optionName: "rightMargin"): number; + + /** + * Sets the right margin of the chart content in the canvas + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "rightMargin", optionValue: number): void; + + /** + * Gets the bottom margin around the chart content in the canvas + */ + igCategoryChart(optionLiteral: 'option', optionName: "bottomMargin"): number; + + /** + * Sets the bottom margin around the chart content in the canvas + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "bottomMargin", optionValue: number): void; + + /** + * Gets the extent area dedicated to the a title on the X-axis. If unspecified, this value is auto-calculated. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisTitleExtent"): number; + + /** + * Sets the extent area dedicated to the a title on the X-axis. If unspecified, this value is auto-calculated. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisTitleExtent", optionValue: number): void; + + /** + * Gets the extent area dedicated to the a title on the Y-axis. If unspecified, this value is auto-calculated. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisTitleExtent"): number; + + /** + * Sets the extent area dedicated to the a title on the Y-axis. If unspecified, this value is auto-calculated. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisTitleExtent", optionValue: number): void; + + /** + * Gets the margin around a title on the X-axis + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisTitleMargin"): number; + + /** + * Sets the margin around a title on the X-axis + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisTitleMargin", optionValue: number): void; + + /** + * Gets the margin around a title on the Y-axis + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisTitleMargin"): number; + + /** + * Sets the margin around a title on the Y-axis + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisTitleMargin", optionValue: number): void; + + /** + * Gets the left margin of a title on the X-axis + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisTitleLeftMargin"): number; + + /** + * Sets the left margin of a title on the X-axis + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisTitleLeftMargin", optionValue: number): void; + + /** + * Gets the left margin of a title on the Y-axis + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisTitleLeftMargin"): number; + + /** + * Sets the left margin of a title on the Y-axis + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisTitleLeftMargin", optionValue: number): void; + + /** + * Gets the top margin of a title on the X-axis + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisTitleTopMargin"): number; + + /** + * Sets the top margin of a title on the X-axis + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisTitleTopMargin", optionValue: number): void; + + /** + * Gets the top margin of a title on the Y-axis + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisTitleTopMargin"): number; + + /** + * Sets the top margin of a title on the Y-axis + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisTitleTopMargin", optionValue: number): void; + + /** + * Gets the right margin of a title on the X-axis + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisTitleRightMargin"): number; + + /** + * Sets the right margin of a title on the X-axis + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisTitleRightMargin", optionValue: number): void; + + /** + * Gets the right margin of a title on the Y-axis + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisTitleRightMargin"): number; + + /** + * Sets the right margin of a title on the Y-axis + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisTitleRightMargin", optionValue: number): void; + + /** + * Gets the bottom margin of a title on the X-axis + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisTitleBottomMargin"): number; + + /** + * Sets the bottom margin of a title on the X-axis + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisTitleBottomMargin", optionValue: number): void; + + /** + * Gets the bottom margin of a title on the Y-axis + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisTitleBottomMargin"): number; + + /** + * Sets the bottom margin of a title on the Y-axis + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisTitleBottomMargin", optionValue: number): void; + + /** + * Gets the id of a template element to use for tooltips, or markup representing the tooltip template. + */ + igCategoryChart(optionLiteral: 'option', optionName: "tooltipTemplate"): string; + + /** + * Sets the id of a template element to use for tooltips, or markup representing the tooltip template. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "tooltipTemplate", optionValue: string): void; + + /** + * Gets function which takes an context object and returns a formatted label for the X-axis. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisFormatLabel"): any; + + /** + * Sets function which takes an context object and returns a formatted label for the X-axis. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisFormatLabel", optionValue: any): void; + + /** + * Gets function which takes a context object and returns a formatted label for the Y-axis. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisFormatLabel"): any; + + /** + * Sets function which takes a context object and returns a formatted label for the Y-axis. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisFormatLabel", optionValue: any): void; + + /** + * Gets color of title on the X-axis + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisTitleTextColor"): string; + + /** + * Sets color of title on the X-axis + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisTitleTextColor", optionValue: string): void; + + /** + * Gets color of title on the Y-axis + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisTitleTextColor"): string; + + /** + * Sets color of title on the Y-axis + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisTitleTextColor", optionValue: string): void; + + /** + * Gets CSS font property for title on X-axis + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisTitleTextStyle"): string; + + /** + * Sets CSS font property for title on X-axis + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisTitleTextStyle", optionValue: string): void; + + /** + * Gets CSS font property for title on Y-axis + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisTitleTextStyle"): string; + + /** + * Sets CSS font property for title on Y-axis + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisTitleTextStyle", optionValue: string): void; + + /** + */ + igCategoryChart(optionLiteral: 'option', optionName: "widget"): any; + + /** + */ + igCategoryChart(optionLiteral: 'option', optionName: "widget", optionValue: any): void; + + /** + * Gets a collection of data items used to generate the chart. + * Value of this property can be a list of objects containing one or more numeric properties. Additionally, if the objects in the list implement the IEnumerable interface, the Category Chart will attempt to delve into the sub-collections when reading through the data source. Databinding can be further configured by attributing the data item classes with the DataSeriesMemberIntentAttribute. + */ + igCategoryChart(optionLiteral: 'option', optionName: "itemsSource"): any; + + /** + * Sets a collection of data items used to generate the chart. + * Value of this property can be a list of objects containing one or more numeric properties. Additionally, if the objects in the list implement the IEnumerable interface, the Category Chart will attempt to delve into the sub-collections when reading through the data source. Databinding can be further configured by attributing the data item classes with the DataSeriesMemberIntentAttribute. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "itemsSource", optionValue: any): void; + + /** + * Gets a set of property paths that should be included for consideration by the category chart, leaving the remaineder excluded. If null, all properties will be considered. + */ + igCategoryChart(optionLiteral: 'option', optionName: "includedProperties"): any; + + /** + * Sets a set of property paths that should be included for consideration by the category chart, leaving the remaineder excluded. If null, all properties will be considered. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "includedProperties", optionValue: any): void; + + /** + * Gets a set of property paths that should be excluded from consideration by the category chart. + */ + igCategoryChart(optionLiteral: 'option', optionName: "excludedProperties"): any; + + /** + * Sets a set of property paths that should be excluded from consideration by the category chart. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "excludedProperties", optionValue: any): void; + + /** + * Gets the type of chart series to generate from the data. + */ + igCategoryChart(optionLiteral: 'option', optionName: "chartType"): string; + + /** + * Sets the type of chart series to generate from the data. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "chartType", optionValue: string): void; + + /** + * Gets the palette of brushes to use for coloring the chart series. The value provided should be an array of CSS color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + igCategoryChart(optionLiteral: 'option', optionName: "brushes"): any; + + /** + * Sets the palette of brushes to use for coloring the chart series. The value provided should be an array of CSS color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "brushes", optionValue: any): void; + + /** + * Gets the palette of brushes to use for outlines on the chart series. The value provided should be an array of CSS color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + igCategoryChart(optionLiteral: 'option', optionName: "outlines"): any; + + /** + * Sets the palette of brushes to use for outlines on the chart series. The value provided should be an array of CSS color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "outlines", optionValue: any): void; + + /** + * Sets the legend to connect this chart to. + * When the legend property is set, the chart will use it to display information about its series. Legends can be shared by multiple chart controls. + */ + igCategoryChart(optionLiteral: 'option', optionName: "legend"): any; + + /** + * Sets the legend to connect this chart to. + * When the legend property is set, the chart will use it to display information about its series. Legends can be shared by multiple chart controls. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "legend", optionValue: any): void; + + /** + * Gets whether the chart should perform horizontal zoom when the user initiates a mouse wheel or mouse drag operation. + */ + igCategoryChart(optionLiteral: 'option', optionName: "isHorizontalZoomEnabled"): boolean; + + /** + * Sets whether the chart should perform horizontal zoom when the user initiates a mouse wheel or mouse drag operation. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "isHorizontalZoomEnabled", optionValue: boolean): void; + + /** + * Gets whether the chart should perform vertical zoom when the user initiates a mouse wheel or mouse drag operation. + */ + igCategoryChart(optionLiteral: 'option', optionName: "isVerticalZoomEnabled"): boolean; + + /** + * Sets whether the chart should perform vertical zoom when the user initiates a mouse wheel or mouse drag operation. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "isVerticalZoomEnabled", optionValue: boolean): void; + + /** + * Gets the rectangle representing the current scroll and zoom state of the chart. + * WindowRect is expressed as a Rectangle with coordinates and sizes between 0 and 1. + * The provided object should have numeric properties called left, top, width and height. + */ + igCategoryChart(optionLiteral: 'option', optionName: "windowRect"): any; + + /** + * Sets the rectangle representing the current scroll and zoom state of the chart. + * WindowRect is expressed as a Rectangle with coordinates and sizes between 0 and 1. + * The provided object should have numeric properties called left, top, width and height. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "windowRect", optionValue: any): void; + + /** + * Gets text to display above the plot area. + */ + igCategoryChart(optionLiteral: 'option', optionName: "title"): string; + + /** + * Sets text to display above the plot area. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "title", optionValue: string): void; + + /** + * Gets text to display below the chart Title, above the plot area. + */ + igCategoryChart(optionLiteral: 'option', optionName: "subtitle"): string; + + /** + * Sets text to display below the chart Title, above the plot area. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "subtitle", optionValue: string): void; + + /** + * Gets horizontal alignment which determines the title position, relative to the left and right edges of the chart. + */ + igCategoryChart(optionLiteral: 'option', optionName: "titleAlignment"): string; + + /** + * Sets horizontal alignment which determines the title position, relative to the left and right edges of the chart. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "titleAlignment", optionValue: string): void; + + /** + * Gets horizontal alignment which determines the subtitle position, relative to the left and right edges of the chart. + */ + igCategoryChart(optionLiteral: 'option', optionName: "subtitleAlignment"): string; + + /** + * Sets horizontal alignment which determines the subtitle position, relative to the left and right edges of the chart. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "subtitleAlignment", optionValue: string): void; + + /** + * Gets behavior that determines how unknown values will be plotted on the chart.Null and Double.NaN are two examples of unknown values. + * + */ + igCategoryChart(optionLiteral: 'option', optionName: "unknownValuePlotting"): string; + + /** + * Sets behavior that determines how unknown values will be plotted on the chart.Null and Double.NaN are two examples of unknown values. + * + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "unknownValuePlotting", optionValue: string): void; + + /** + * Gets behavior for markers in each series which are placed too close together for the current view, resulting in a collision. + */ + igCategoryChart(optionLiteral: 'option', optionName: "markerCollisionAvoidance"): string; + + /** + * Sets behavior for markers in each series which are placed too close together for the current view, resulting in a collision. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "markerCollisionAvoidance", optionValue: string): void; + + /** + * Gets whether animation of series plots is enabled when the chart is loading into view + */ + igCategoryChart(optionLiteral: 'option', optionName: "isTransitionInEnabled"): boolean; + + /** + * Sets whether animation of series plots is enabled when the chart is loading into view + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "isTransitionInEnabled", optionValue: boolean): void; + + /** + * Gets the method that determines how to animate series plots when the chart is loading into view + */ + igCategoryChart(optionLiteral: 'option', optionName: "transitionInMode"): string; + + /** + * Sets the method that determines how to animate series plots when the chart is loading into view + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "transitionInMode", optionValue: string): void; + + /** + * Gets the arrival speed used for animating series plots when the chart is loading into view + */ + igCategoryChart(optionLiteral: 'option', optionName: "transitionInSpeedType"): string; + + /** + * Sets the arrival speed used for animating series plots when the chart is loading into view + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "transitionInSpeedType", optionValue: string): void; + + /** + * Gets the frequency of displayed labels along the X-axis. + * Gets the set value is a factor that determines which labels will be hidden. For example, an interval of 2 will display every other label. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisInterval"): number; + + /** + * Sets the frequency of displayed labels along the X-axis. + * sets the set value is a factor that determines which labels will be hidden. For example, an interval of 2 will display every other label. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisInterval", optionValue: number): void; + + /** + * Gets the frequency of displayed minor lines along the X-axis. + * Gets the set value is a factor that determines how the minor lines will be displayed. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisMinorInterval"): number; + + /** + * Sets the frequency of displayed minor lines along the X-axis. + * sets the set value is a factor that determines how the minor lines will be displayed. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisMinorInterval", optionValue: number): void; + + /** + * Gets the amount of space between adjacent categories for the X-axis. + * The gap is silently clamped to the range [0, 1] when used. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisGap"): number; + + /** + * Sets the amount of space between adjacent categories for the X-axis. + * The gap is silently clamped to the range [0, 1] when used. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisGap", optionValue: number): void; + + /** + * Gets the amount of overlap between adjacent categories for the X-axis. + * Gets the overlap is silently clamped to the range [-1, 1] when used. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisOverlap"): number; + + /** + * Sets the amount of overlap between adjacent categories for the X-axis. + * sets the overlap is silently clamped to the range [-1, 1] when used. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisOverlap", optionValue: number): void; + + /** + * Gets the distance between each labels and grid line along the Y-axis. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisInterval"): number; + + /** + * Sets the distance between each labels and grid line along the Y-axis. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisInterval", optionValue: number): void; + + /** + * Gets whether the Y-axis should use a logarithmic scale instead of a linear one. + * Since log(-1) is imaginary and log(0) is undefined, it is recommended to enable this property only when the Y-axis minimum is greater than zero. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisIsLogarithmic"): boolean; + + /** + * Sets whether the Y-axis should use a logarithmic scale instead of a linear one. + * Since log(-1) is imaginary and log(0) is undefined, it is recommended to enable this property only when the Y-axis minimum is greater than zero. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisIsLogarithmic", optionValue: boolean): void; + + /** + * Gets the base value to use in the log function when mapping the position of data items along the Y-axis. + * This property is effective only when YAxisIsLogarithmic is true. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisLogarithmBase"): number; + + /** + * Sets the base value to use in the log function when mapping the position of data items along the Y-axis. + * This property is effective only when YAxisIsLogarithmic is true. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisLogarithmBase", optionValue: number): void; + + /** + * Gets the frequency of displayed minor lines along the Y-axis. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisMinorInterval"): number; + + /** + * Sets the frequency of displayed minor lines along the Y-axis. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisMinorInterval", optionValue: number): void; + + /** + * Gets the format for labels along the X-axis. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisLabel"): any; + + /** + * Sets the format for labels along the X-axis. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisLabel", optionValue: any): void; + + /** + * Gets the format for labels along the Y-axis. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisLabel"): any; + + /** + * Sets the format for labels along the Y-axis. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisLabel", optionValue: any): void; + + /** + * Gets the color to apply to major gridlines along the X-axis. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisMajorStroke"): string; + + /** + * Sets the color to apply to major gridlines along the X-axis. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisMajorStroke", optionValue: string): void; + + /** + * Gets the color to apply to major gridlines along the Y-axis. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisMajorStroke"): string; + + /** + * Sets the color to apply to major gridlines along the Y-axis. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisMajorStroke", optionValue: string): void; + + /** + * Gets the thickness to apply to major gridlines along the X-axis. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisMajorStrokeThickness"): number; + + /** + * Sets the thickness to apply to major gridlines along the X-axis. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisMajorStrokeThickness", optionValue: number): void; + + /** + * Gets the thickness to apply to major gridlines along the Y-axis. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisMajorStrokeThickness"): number; + + /** + * Sets the thickness to apply to major gridlines along the Y-axis. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisMajorStrokeThickness", optionValue: number): void; + + /** + * Gets the thickness to apply to minor gridlines along the X-axis. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisMinorStrokeThickness"): number; + + /** + * Sets the thickness to apply to minor gridlines along the X-axis. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisMinorStrokeThickness", optionValue: number): void; + + /** + * Gets the thickness to apply to minor gridlines along the Y-axis. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisMinorStrokeThickness"): number; + + /** + * Sets the thickness to apply to minor gridlines along the Y-axis. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisMinorStrokeThickness", optionValue: number): void; + + /** + * Gets the color to apply to stripes along the X-axis. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisStrip"): string; + + /** + * Sets the color to apply to stripes along the X-axis. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisStrip", optionValue: string): void; + + /** + * Gets the color to apply to stripes along the Y-axis. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisStrip"): string; + + /** + * Sets the color to apply to stripes along the Y-axis. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisStrip", optionValue: string): void; + + /** + * Gets the color to apply to the X-axis line. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisStroke"): string; + + /** + * Sets the color to apply to the X-axis line. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisStroke", optionValue: string): void; + + /** + * Gets the color to apply to the Y-axis line. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisStroke"): string; + + /** + * Sets the color to apply to the Y-axis line. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisStroke", optionValue: string): void; + + /** + * Gets the thickness to apply to the X-axis line. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisStrokeThickness"): number; + + /** + * Sets the thickness to apply to the X-axis line. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisStrokeThickness", optionValue: number): void; + + /** + * Gets the thickness to apply to the Y-axis line. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisStrokeThickness"): number; + + /** + * Sets the thickness to apply to the Y-axis line. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisStrokeThickness", optionValue: number): void; + + /** + * Gets the length of tickmarks along the X-axis. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisTickLength"): number; + + /** + * Sets the length of tickmarks along the X-axis. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisTickLength", optionValue: number): void; + + /** + * Gets the length of tickmarks along the Y-axis. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisTickLength"): number; + + /** + * Sets the length of tickmarks along the Y-axis. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisTickLength", optionValue: number): void; + + /** + * Gets the color to apply to tickmarks along the X-axis. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisTickStroke"): string; + + /** + * Sets the color to apply to tickmarks along the X-axis. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisTickStroke", optionValue: string): void; + + /** + * Gets the color to apply to tickmarks along the Y-axis. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisTickStroke"): string; + + /** + * Sets the color to apply to tickmarks along the Y-axis. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisTickStroke", optionValue: string): void; + + /** + * Gets the thickness to apply to tickmarks along the X-axis. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisTickStrokeThickness"): number; + + /** + * Sets the thickness to apply to tickmarks along the X-axis. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisTickStrokeThickness", optionValue: number): void; + + /** + * Gets the thickness to apply to tickmarks along the Y-axis. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisTickStrokeThickness"): number; + + /** + * Sets the thickness to apply to tickmarks along the Y-axis. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisTickStrokeThickness", optionValue: number): void; + + /** + * Text to display below the X-axis. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisTitle"): string; + + /** + * Text to display below the X-axis. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisTitle", optionValue: string): void; + + /** + * Text to display to the left of the Y-axis. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisTitle"): string; + + /** + * Text to display to the left of the Y-axis. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisTitle", optionValue: string): void; + + /** + * Gets the color to apply to minor gridlines along the X-axis. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisMinorStroke"): string; + + /** + * Sets the color to apply to minor gridlines along the X-axis. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisMinorStroke", optionValue: string): void; + + /** + * Gets the color to apply to minor gridlines along the Y-axis. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisMinorStroke"): string; + + /** + * Sets the color to apply to minor gridlines along the Y-axis. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisMinorStroke", optionValue: string): void; + + /** + * Gets the angle of rotation for labels along the X-axis. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisLabelAngle"): number; + + /** + * Sets the angle of rotation for labels along the X-axis. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisLabelAngle", optionValue: number): void; + + /** + * Gets the angle of rotation for labels along the Y-axis. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisLabelAngle"): number; + + /** + * Sets the angle of rotation for labels along the Y-axis. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisLabelAngle", optionValue: number): void; + + /** + * Gets the distance between the X-axis and the bottom of the chart. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisExtent"): number; + + /** + * Sets the distance between the X-axis and the bottom of the chart. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisExtent", optionValue: number): void; + + /** + * Gets the distance between the Y-axis and the left edge of the chart. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisExtent"): number; + + /** + * Sets the distance between the Y-axis and the left edge of the chart. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisExtent", optionValue: number): void; + + /** + * Gets the angle of rotation for the X-axis title. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisTitleAngle"): number; + + /** + * Sets the angle of rotation for the X-axis title. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisTitleAngle", optionValue: number): void; + + /** + * Gets the angle of rotation for the Y-axis title. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisTitleAngle"): number; + + /** + * Sets the angle of rotation for the Y-axis title. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisTitleAngle", optionValue: number): void; + + /** + * Gets the rendering resolution for series in this chart. + * Where n = Resolution, for every n horizontal pixels, combine all items into a single datapoint. When Resolution = 0, all datapoints will be rendered as graphical objects. Charts with a higher resolution will have faster performance. + */ + igCategoryChart(optionLiteral: 'option', optionName: "resolution"): number; + + /** + * Sets the rendering resolution for series in this chart. + * Where n = Resolution, for every n horizontal pixels, combine all items into a single datapoint. When Resolution = 0, all datapoints will be rendered as graphical objects. Charts with a higher resolution will have faster performance. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "resolution", optionValue: number): void; + + /** + * Gets the palette of brushes to used for coloring trend lines in this chart. The value provided should be an array of CSS color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + igCategoryChart(optionLiteral: 'option', optionName: "trendLineBrushes"): any; + + /** + * Sets the palette of brushes to used for coloring trend lines in this chart. The value provided should be an array of CSS color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "trendLineBrushes", optionValue: any): void; + + /** + * Gets the formula used for calculating trend lines in this chart. + */ + igCategoryChart(optionLiteral: 'option', optionName: "trendLineType"): string; + + /** + * Sets the formula used for calculating trend lines in this chart. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "trendLineType", optionValue: string): void; + + /** + * Gets the thickness of the chart series. Depending on the ChartType, this can be the main brush used, or just the outline. + */ + igCategoryChart(optionLiteral: 'option', optionName: "thickness"): number; + + /** + * Sets the thickness of the chart series. Depending on the ChartType, this can be the main brush used, or just the outline. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "thickness", optionValue: number): void; + + /** + * Gets collection of marker shapes used for representing data points of series in this chart. + * When MarkerTypes is null or empty, each series' marker type will be set to none or automatic, depending on the series type. + */ + igCategoryChart(optionLiteral: 'option', optionName: "markerTypes"): any; + + /** + * Sets collection of marker shapes used for representing data points of series in this chart. + * When MarkerTypes is null or empty, each series' marker type will be set to none or automatic, depending on the series type. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "markerTypes", optionValue: any): void; + + /** + * Gets the palette of brushes used for coloring fill of data point markers. + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + igCategoryChart(optionLiteral: 'option', optionName: "markerBrushes"): any; + + /** + * Sets the palette of brushes used for coloring fill of data point markers. + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "markerBrushes", optionValue: any): void; + + /** + * Gets the palette of brushes used for coloring outline of data point markers. + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + igCategoryChart(optionLiteral: 'option', optionName: "markerOutlines"): any; + + /** + * Sets the palette of brushes used for coloring outline of data point markers. + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "markerOutlines", optionValue: any): void; + + /** + * Gets the thickness of the trend lines in this chart. + */ + igCategoryChart(optionLiteral: 'option', optionName: "trendLineThickness"): number; + + /** + * Sets the thickness of the trend lines in this chart. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "trendLineThickness", optionValue: number): void; + + /** + * Gets whether the direction of the X-axis is inverted, placing the first data items on the right side instead of left side + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisInverted"): boolean; + + /** + * Sets whether the direction of the X-axis is inverted, placing the first data items on the right side instead of left side + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisInverted", optionValue: boolean): void; + + /** + * Gets whether the direction of the Y-axis is inverted, placing minimum numeric value at the top of the axis instead of bottom + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisInverted"): boolean; + + /** + * Sets whether the direction of the Y-axis is inverted, placing minimum numeric value at the top of the axis instead of bottom + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisInverted", optionValue: boolean): void; + + /** + * Gets the palette used for coloring negative items of Waterfall chart type. + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + igCategoryChart(optionLiteral: 'option', optionName: "negativeBrushes"): any; + + /** + * Sets the palette used for coloring negative items of Waterfall chart type. + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "negativeBrushes", optionValue: any): void; + + /** + * Gets the horizontal alignment of the X-axis title. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisTitleAlignment"): string; + + /** + * Sets the horizontal alignment of the X-axis title. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisTitleAlignment", optionValue: string): void; + + /** + * Gets the vertical alignment of the Y-axis title. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisTitleAlignment"): string; + + /** + * Sets the vertical alignment of the Y-axis title. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisTitleAlignment", optionValue: string): void; + + /** + * Gets the horizontal alignment of X-axis labels. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisLabelHorizontalAlignment"): string; + + /** + * Sets the horizontal alignment of X-axis labels. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisLabelHorizontalAlignment", optionValue: string): void; + + /** + * Gets the horizontal alignment of Y-axis labels. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisLabelHorizontalAlignment"): string; + + /** + * Sets the horizontal alignment of Y-axis labels. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisLabelHorizontalAlignment", optionValue: string): void; + + /** + * Gets the vertical alignment of X-axis labels. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisLabelVerticalAlignment"): string; + + /** + * Sets the vertical alignment of X-axis labels. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisLabelVerticalAlignment", optionValue: string): void; + + /** + * Gets the vertical alignment of Y-axis labels. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisLabelVerticalAlignment"): string; + + /** + * Sets the vertical alignment of Y-axis labels. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisLabelVerticalAlignment", optionValue: string): void; + + /** + * Gets the visibility of X-axis labels. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisLabelVisibility"): string; + + /** + * Sets the visibility of X-axis labels. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisLabelVisibility", optionValue: string): void; + + /** + * Gets the visibility of Y-axis labels. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisLabelVisibility"): string; + + /** + * Sets the visibility of Y-axis labels. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisLabelVisibility", optionValue: string): void; + + /** + */ + igCategoryChart(optionLiteral: 'option', optionName: "negativeOutlines"): any; + + /** + */ + igCategoryChart(optionLiteral: 'option', optionName: "negativeOutlines", optionValue: any): void; + + /** + * Gets a value indicating whether grid and tick lines are aligned to device pixels. + */ + igCategoryChart(optionLiteral: 'option', optionName: "alignsGridLinesToPixels"): boolean; + + /** + * Sets a value indicating whether grid and tick lines are aligned to device pixels. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "alignsGridLinesToPixels", optionValue: boolean): void; + + /** + * The width of the chart. + */ + igCategoryChart(optionLiteral: 'option', optionName: "width"): number; + + /** + * The width of the chart. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "width", optionValue: number): void; + + /** + * The height of the chart. + */ + igCategoryChart(optionLiteral: 'option', optionName: "height"): number; + + /** + * The height of the chart. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "height", optionValue: number): void; + + /** + * Gets maximum number of displayed records in chart. + */ + igCategoryChart(optionLiteral: 'option', optionName: "maxRecCount"): number; + + /** + * Sets maximum number of displayed records in chart. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "maxRecCount", optionValue: number): void; + + /** + * Gets a valid data source. + * That can be instance of array or primitives, array of objects, instance of $.ig.DataSource, or any other data accepted by $.ig.DataSource. + * Note: if it is set to string and "dataSourceType" option is not set, then $.ig.JSONPDataSource is used. + */ + igCategoryChart(optionLiteral: 'option', optionName: "dataSource"): any; + + /** + * Sets a valid data source. + * That can be instance of array or primitives, array of objects, instance of $.ig.DataSource, or any other data accepted by $.ig.DataSource. + * Note: if it is set to string and "dataSourceType" option is not set, then $.ig.JSONPDataSource is used. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "dataSource", optionValue: any): void; + + /** + * Gets data source type (such as "json", "xml", etc). Please refer to the documentation of $.ig.DataSource and its type property + */ + igCategoryChart(optionLiteral: 'option', optionName: "dataSourceType"): string; + + /** + * Sets data source type (such as "json", "xml", etc). Please refer to the documentation of $.ig.DataSource and its type property + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "dataSourceType", optionValue: string): void; + + /** + * Gets url which is used for sending JSON on request for remote data. + */ + igCategoryChart(optionLiteral: 'option', optionName: "dataSourceUrl"): string; + + /** + * Sets url which is used for sending JSON on request for remote data. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "dataSourceUrl", optionValue: string): void; + + /** + * See $.ig.DataSource. property in the response specifying the total number of records on the server. + */ + igCategoryChart(optionLiteral: 'option', optionName: "responseTotalRecCountKey"): string; + + /** + * See $.ig.DataSource. property in the response specifying the total number of records on the server. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "responseTotalRecCountKey", optionValue: string): void; + + /** + * See $.ig.DataSource. This is basically the property in the responses where data records are held, if the response is wrapped. + */ + igCategoryChart(optionLiteral: 'option', optionName: "responseDataKey"): string; + + /** + * See $.ig.DataSource. This is basically the property in the responses where data records are held, if the response is wrapped. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "responseDataKey", optionValue: string): void; + + /** + * Event raised when a property value is changed. + */ + igCategoryChart(optionLiteral: 'option', optionName: "propertyChanged"): PropertyChangedEvent; + + /** + * Event raised when a property value is changed. + * + * @optionValue Define event handler function. + */ + igCategoryChart(optionLiteral: 'option', optionName: "propertyChanged", optionValue: PropertyChangedEvent): void; + + /** + * Event which is raised before data binding. + * Return false in order to cancel data binding. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.dataSource to obtain reference to instance of $.ig.DataSource. + */ + igCategoryChart(optionLiteral: 'option', optionName: "dataBinding"): DataBindingEvent; + + /** + * Event which is raised before data binding. + * Return false in order to cancel data binding. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.dataSource to obtain reference to instance of $.ig.DataSource. + * + * @optionValue Define event handler function. + */ + igCategoryChart(optionLiteral: 'option', optionName: "dataBinding", optionValue: DataBindingEvent): void; + + /** + * Event which is raised after data binding. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.data to obtain reference to array actual data which is displayed by chart. + * Use ui.dataSource to obtain reference to instance of $.ig.DataSource. + */ + igCategoryChart(optionLiteral: 'option', optionName: "dataBound"): DataBoundEvent; + + /** + * Event which is raised after data binding. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.data to obtain reference to array actual data which is displayed by chart. + * Use ui.dataSource to obtain reference to instance of $.ig.DataSource. + * + * @optionValue Define event handler function. + */ + igCategoryChart(optionLiteral: 'option', optionName: "dataBound", optionValue: DataBoundEvent): void; + + /** + * Event which is raised before tooltip is updated. + * Return false in order to cancel updating and hide tooltip. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.text to obtain html of tooltip. Value of that member can be modified. If modified value is null or empty string, then current content of tooltip keeps old value. + * Use ui.item to obtain reference to item. Value of that member can be modified or replaced by custom item. + * Use ui.x to obtain left position of tooltip in pixels relative to widget. Value of that member can be modified. + * Use ui.y to obtain top position of tooltip in pixels relative to widget. Value of that member can be modified. + * Use ui.element to obtain reference to jquery object which represents tooltip. Value of that member can be replaced by custom element. + */ + igCategoryChart(optionLiteral: 'option', optionName: "updateTooltip"): UpdateTooltipEvent; + + /** + * Event which is raised before tooltip is updated. + * Return false in order to cancel updating and hide tooltip. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.text to obtain html of tooltip. Value of that member can be modified. If modified value is null or empty string, then current content of tooltip keeps old value. + * Use ui.item to obtain reference to item. Value of that member can be modified or replaced by custom item. + * Use ui.x to obtain left position of tooltip in pixels relative to widget. Value of that member can be modified. + * Use ui.y to obtain top position of tooltip in pixels relative to widget. Value of that member can be modified. + * Use ui.element to obtain reference to jquery object which represents tooltip. Value of that member can be replaced by custom element. + * + * @optionValue Define event handler function. + */ + igCategoryChart(optionLiteral: 'option', optionName: "updateTooltip", optionValue: UpdateTooltipEvent): void; + + /** + * Event which is raised before tooltip is hidden. + * Return false in order to cancel hiding and keep tooltip visible. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.item to obtain reference to item. + * Use ui.element to obtain reference to jquery object which represents tooltip or value of ui.element from last updateTooltip event. Value of that member can be replaced by custom element. + */ + igCategoryChart(optionLiteral: 'option', optionName: "hideTooltip"): HideTooltipEvent; + + /** + * Event which is raised before tooltip is hidden. + * Return false in order to cancel hiding and keep tooltip visible. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.item to obtain reference to item. + * Use ui.element to obtain reference to jquery object which represents tooltip or value of ui.element from last updateTooltip event. Value of that member can be replaced by custom element. + * + * @optionValue Define event handler function. + */ + igCategoryChart(optionLiteral: 'option', optionName: "hideTooltip", optionValue: HideTooltipEvent): void; + igCategoryChart(options: IgCategoryChart): JQuery; + igCategoryChart(optionLiteral: 'option', optionName: string): any; + igCategoryChart(optionLiteral: 'option', options: IgCategoryChart): JQuery; + igCategoryChart(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igCategoryChart(methodName: string, ...methodParams: any[]): any; +} +interface IgDataChartCrosshairPoint { + /** + * The x coordinate. + */ + x?: number; + + /** + * The y coordinate. + */ + y?: number; + + /** + * Option for IgDataChartCrosshairPoint + */ + [optionName: string]: any; +} + +interface IgDataChartLegend { + /** + * The name of the element to turn into a legend. + */ + element?: string; + + /** + * Type of the legend. + * + * Valid values: + * "item" Specify the legend as item legend. It displays a legend item for each pie in the igPieChart control. + * "legend" Specify the legend as legend. It is supported by all types of series in the igDataChart control. + */ + type?: string; + + /** + * The width of the legend. + * + * Valid values: + * "null" will stretch to fit data, if no other widths are defined. + */ + width?: string|number; + + /** + * The height of the legend.null will stretch vertically to fit data, no other height are defined. + * + * + * Valid values: + * "null" + */ + height?: string|number; + + /** + * Option for IgDataChartLegend + */ + [optionName: string]: any; +} + +interface IgDataChartAxes { + /** + * Type of the axis. + * + * Valid values: + * "numericX" Specify the axis as numeric X axis. Useful for displaying scatter, category and financial price series. + * "numericY" Specify the axis as numeric Y axis.Useful for displaying scatter, category and financial price series. + * "categoryX" Specify the axis as category X axis. Useful for displaying scatter, category and financial price series. + * "categoryDateTimeX" Specify the axis as category datetime X axis. Useful for displaying category and financial price series with date based data. + * "categoryY" Specify the axis as category Y axis. Useful for displaying scatter, category and financial price series. + * "categoryAngle" Specify the axis as category angle axis. Useful for displaying polar and radial categories. + * "numericAngle" Specify the axis as numeric angle axis. Useful for displaying polar and radial series. + * "numericRadius" Specify the axis as numeric radius axis. Useful for displaying polar and radial series. + */ + type?: string; + + /** + * The unique identifier of the axis. + */ + name?: string; + + /** + * Can be any valid data source accepted by $.ig.DataSource, or an instance of an $.ig.DataSource itself + */ + dataSource?: any; + + /** + * Specifies a remote URL accepted by $.ig.DataSource in order to request data from it + */ + dataSourceUrl?: string; + + /** + * Explicitly set data source type (such as "json"). Please refer to the documentation of $.ig.DataSource and its type property. + */ + dataSourceType?: string; + + /** + * See $.ig.DataSource. Specifies the name of the property in which data records are held if the response is wrapped. + */ + responseDataKey?: string; + + /** + * Set to true in order to have an existing axis removed from the chart, by name + */ + remove?: boolean; + + /** + * Specifies the location to display the axis labels for this axis. + * + * Valid values: + * "outsideTop" The labels should have an outside top position. + * "outsideBottom" The labels should have an outside bottom position. + * "outsideLeft" The labels should have an outside left position. + * "outsideRight" The labels should have an outside right position. + * "insideTop" The labels should have an inside top position. + * "insideBottom" The labels should have an inside bottom position. + * "insideLeft" The labels should have an inside left position. + * "insideRight" The labels should have an inside right position. + */ + labelLocation?: string; + + /** + * Specifies whether the labels are visible. + * + * Valid values: + * "visible" The labels should be visisble for this axis. + * "collapsed" The labels should not be visible for this axis. + */ + labelVisibility?: string; + + /** + * Specifies the extent of the area dedicated to the labels for this axis. If unspecified, this value is auto-calculated. + */ + labelExtent?: number; + + /** + * Specifies the angle that labels on the axis should be rotated + */ + labelAngle?: number; + + /** + * Overrides the style of the text used for the axis labels. + */ + labelTextStyle?: string; + + /** + * Overrides the color of the text used for the axis labels. + */ + labelTextColor?: string; + + /** + * Sets or gets a function which takes an object that produces a formatted label for displaying in the chart. + */ + formatLabel?: any; + + /** + * Gets or sets the Stroke property. + */ + stroke?: string; + + /** + * Gets or sets the StrokeThickness property. + */ + strokeThickness?: number; + + /** + * Gets or sets the Strip property. + */ + strip?: string; + + /** + * Gets or sets the MajorStroke property. + */ + majorStroke?: string; + + /** + * Gets or sets the MajorStrokeThickness property. + */ + majorStrokeThickness?: number; + + /** + * Gets or sets the MinorStroke property. + */ + minorStroke?: string; + + /** + * Gets or sets the MinorStrokeThickness property. + */ + minorStrokeThickness?: number; + + /** + * Gets or sets the IsInverted property. + */ + isInverted?: boolean; + + /** + * Gets or sets the CrossingAxis property. + */ + crossingAxis?: string; + + /** + * Gets or sets the CrossingValue property. + */ + crossingValue?: any; + + /** + * Gets or sets the coercion methods to use when loading data from data sources. + * Should be specified before setting any member paths, if being used. Setting it later + * will not cause data to be reimported into the chart. + */ + coercionMethods?: any; + + /** + * Gets or sets the axis label format string. + */ + label?: any; + + /** + * Gets or sets the amount of space between adjacent categories for the current axis object. + * The gap is silently clamped to the range [0, 1] when used. + */ + gap?: number; + + /** + * Gets or sets the amount of overlap between adjacent categories for the current axis object. + * The overlap is silently clamped to the range [-1, 1] when used. + */ + overlap?: number; + + /** + * Indicates the angle in degress that the chart's 0th angle should be offset. + */ + startAngleOffset?: number; + + /** + * Gets or sets the frequency of displayed labels. + * The set value is a factor that determines which labels will be hidden. For example, an interval of 2 will display every other label. + */ + interval?: number; + + /** + * Gets or sets the axis display type. Continuous display type divides the axis into even intervals, where labels will not necessarily be aligned with data points. Discrete display type will not use a constant interval, but will align each label with its data point. + * + * Valid values: + * "continuous" Points occur at even intervals, even where data is not present at a given point. + * "discrete" Points occur when data is present, possibly at uneven intervals. + */ + displayType?: string; + + /** + * Gets or sets whether the data assigned to the date time axis should be considered pre-sorted by date/time. + */ + isDataPreSorted?: boolean; + + /** + * Gets or sets the axis MinimumValue. + * + * + * Valid values: + * "number" The minimum value can be set to be a number when the axis is of numeric type + * "date" The minimum value can be set to be a date object when [type](ui.igDataChart#options:axes.type) option is set to "categoryDateTimeX" + */ + minimumValue?: number|Date; + + /** + * Gets or sets the axis MaximumValue. + * + * + * Valid values: + * "number" The maximum value can be set to be a number when the axis is of numeric type + * "date" The maximum value can be set to be a date object when [type](ui.igDataChart#options:axes.type) option is set to "categoryDateTimeX" + */ + maximumValue?: number|Date; + + /** + * Gets or sets the DateTime mapping property for the CategoryDateTimeXAxis. + */ + dateTimeMemberPath?: string; + + /** + * Gets or sets the ReferenceValue property. + */ + referenceValue?: number; + + /** + * Gets or sets the IsLogarithmic property. + */ + isLogarithmic?: boolean; + + /** + * Gets or sets the LogarithmBase property. + */ + logarithmBase?: number; + + /** + * Defines the percentage of the maximum radius extent to use as the maximum radius. Should be + * a value between 0.0 and 1.0. + */ + radiusExtentScale?: number; + + /** + * Defines the percentage of the maximum radius extent to leave blank at the center of the chart. Should be + * a value between 0.0 and 1.0. + */ + innerRadiusExtentScale?: number; + + /** + * The title to display for the component. + */ + title?: string; + + /** + * The css font property to use for the title. + */ + titleTextStyle?: string; + + /** + * The margin to display around the title of the axis. + */ + titleMargin?: number; + + /** + * the horizontal alignment to use for the title. + * + * Valid values: + * "left" left aligns the title. + * "center" center aligns the title. + * "right" right aligns the title. + */ + titleHorizontalAlignment?: string; + + /** + * the vertical alignment to use for the title. + * + * Valid values: + * "center" center aligns the title. + */ + titleVerticalAlignment?: string; + + /** + * the position to use for the title. + * + * Valid values: + * "auto" the title is positioned automatically. + * "left" the title is positioned on the left of the labels, if applicable. + * "right" the title is positioned on the right of the labels, if applicable. + * "top" the title is positioned on the top of the labels, if applicable. + * "bottom" the title is positioned on the bottom of the labels, if applicable. + */ + titlePosition?: string; + + /** + * The top margin to use for the title. + */ + titleTopMargin?: number; + + /** + * The left margin to use for the title. + */ + titleLeftMargin?: number; + + /** + * The right margin to use for the title. + */ + titleRightMargin?: number; + + /** + * The bottom margin to use for the title. + */ + titleBottomMargin?: number; + + /** + * the horizontal alignment to use for the labels. Only applicable to vertical axes. + * + * Valid values: + * "left" left aligns the labels. + * "center" center aligns the labels. + * "right" right aligns the labels. + */ + labelHorizontalAlignment?: string; + + /** + * the vertical alignment to use for the labels. Only applicable to horizontal axes. + * + * Valid values: + * "top" top aligns the labels. + * "center" center aligns the labels. + * "bottom" bottom aligns the labels. + */ + labelVerticalAlignment?: string; + + /** + * The margin to use for the labels. + */ + labelMargin?: number; + + /** + * The top margin to use for the labels. + */ + labelTopMargin?: number; + + /** + * The left margin to use for the labels. + */ + labelLeftMargin?: number; + + /** + * The right margin to use for the labels. + */ + labelRightMargin?: number; + + /** + * The bottom margin to use for the labels. + */ + labelBottomMargin?: number; + + /** + * Sets whether or not to show the first label on the axis. + */ + showFirstLabel?: boolean; + + /** + * The angle to use for the axis title. + */ + titleAngle?: number; + + /** + * The length of the tickmarks to display for this axis. + */ + tickLength?: number; + + /** + * The stroke thickness to use for the tickmarks. + */ + tickStrokeThickness?: number; + + /** + * The color to use for the tickmarks. + */ + tickStroke?: any; + + /** + * Gets or sets whether the cateogory axis should use clustering display mode even if no series are present that would force clustering mode. + */ + useClusteringMode?: boolean; + + /** + * Gets or sets whether to use more advanced heuristics when determining the initial number of labels to render, before resolving collisions, etc. + */ + useEnhancedIntervalManagement?: boolean; + + /** + * Gets or sets the mininum desired characters to be displayed for horizontal axes when using advanced label heuristics. -1 will attempt to adjust the interval to precisely fit the horizontal labels. + */ + enhancedIntervalMinimumCharacters?: number; + + /** + * Option for IgDataChartAxes + */ + [optionName: string]: any; +} + +interface IgDataChartSeriesLegend { + /** + * The name of the element to turn into a legend. + */ + element?: string; + + /** + * Type of the legend. + * + * Valid values: + * "item" Specify the legend as item legend. It displays a legend item for each pie in the igPieChart control. + * "legend" Specify the legend as legend. It is supported by all types of series in the igDataChart control. + */ + type?: string; + + /** + * The width of the legend. + * + * Valid values: + * "null" will stretch to fit data, if no other widths are defined + */ + width?: string|number; + + /** + * The height of the legend.null will stretch vertically to fit data, no other height are defined + * + * + * Valid values: + * "null" + */ + height?: string|number; + + /** + * Option for IgDataChartSeriesLegend + */ + [optionName: string]: any; +} + +interface IgDataChartSeries { + /** + * Type of the series. + * + * Valid values: + * "area" Specify the series as Area series. + * "bar" Specify the series as Bar series. + * "column" Specify the series as Column series. + * "line" Specify the series as Line series. + * "rangeArea" Specify the series as Range Area series. + * "rangeColumn" Specify the series as Range Column series. + * "splineArea" Specify the series as Spline Area series. + * "spline" Specify the series as Spline series. + * "stepArea" Specify the series as Step Area series. + * "stepLine" Specify the series as Step Line series. + * "waterfall" Specify the series as Waterfall series. + * "financial" Specify the series as Financial series. + * "typicalPriceIndicator" Specify the series as Typical Price Indicator series. + * "polarArea" Specify the series as Polar Area series. + * "polarLine" Specify the series as Polar Line series. + * "polarScatter" Specify the series as Polar Scatter series. + * "radialColumn" Specify the series as Radial Column series. + * "radialLine" Specify the series as Radial Line series. + * "radialPie" Specify the series as Radial Pie series. + * "scatter" Specify the series as Scatter series. + * "scatterLine" Specify the series as Scatter Line series. + * "bubble" Specify the series as Bubble series. + * "absoluteVolumeOscillatorIndicator" Specify the series as Absolute Volume Oscillator Indicator series. + * "averageTrueRangeIndicator" Specify the series as Average True Range Indicator series. + * "accumulationDistributionIndicator" Specify the series as Accumulation Distribution Indicator series + * "averageDirectionalIndexIndicator" Specify the series as Average Directional Index Indicator series. + */ + type?: string; + + /** + * The unique identifier of the series. + */ + name?: string; + + /** + * Can be any valid data source accepted by $.ig.DataSource, or an instance of an $.ig.DataSource itself + */ + dataSource?: any; + + /** + * Specifies a remote URL accepted by $.ig.DataSource in order to request data from it + */ + dataSourceUrl?: string; + + /** + * Explicitly set data source type (such as "json"). Please refer to the documentation of $.ig.DataSource and its type property. + */ + dataSourceType?: string; + + /** + * See $.ig.DataSource. Specifies the name of the property in which data records are held if the response is wrapped. + */ + responseDataKey?: string; + + /** + * Set to true in order to have an existing series removed from the chart, by name + */ + remove?: boolean; + + /** + * Whether the chart should render a tooltip. + */ + showTooltip?: boolean; + + /** + * The name of template or the template itself that chart tooltip will use to render. + */ + tooltipTemplate?: string; + + /** + * Can be any valid options accepted by $.ig.ChartLegend, or an instance of an $.ig.ChartLegend itself. + */ + legend?: IgDataChartSeriesLegend; + + /** + * Gets or sets the legend item visibility for the current series object. + * + * Valid values: + * "visible" The legend item should be visible. + * "collapsed" The legend item should not be visible. + */ + legendItemVisibility?: string; + + /** + * Gets or sets the LegendItemBadgeTemplate property. + * The legend item badge is created according to the LegendItemBadgeTemplate on-demand by + * the series object itself. + * The provided object should have properties called render and optionally measure. + * These are functions which will be called that will be called to handle the user specified custom rendering. + * measure will be passed an object that looks like this: + * { + * context: [either a DOM element or a CanvasContext2D depending on the particular template scenario], + * width: [if value is present, specifies the available width, user may set to desired width for content], + * height: [if value is present, specifies the available height, user may set to desired height for content], + * isConstant: [user should set to true if desired with and height will always be the same for this template], + * data: [if present, represents the contextual data for this template] + * } + * render will be passed an object that looks like this: + * { + * context: [either a DOM element or a CanvasContext2D depending on the particular template scenario], + * xPosition: [if present, specifies the x position at which to render the content], + * yPosition: [if present, specifies the y position at which to render the content], + * availableWidth: [if present, specifies the available width in which to render the content], + * availableHeight: [if present, specifies the available height in which to render the content], + * data: [if present, specifies the data that is in context for this content], + * isHitTestRender: [if true, indicates that this is a special render pass for hit testing, in which case the brushes from the data should be used] + * } + */ + legendItemBadgeTemplate?: any; + + /** + * Gets or sets the LegendItemTemplate property. + * The legend item control content is created according to the LegendItemTemplate on-demand by + * the series object itself. + * The provided object should have properties called render and optionally measure. See definition for option: legendItemBadgeTemplate + */ + legendItemTemplate?: any; + + /** + * Gets or sets the DiscreteLegendItemTemplate property. + * The legend item control content is created according to the DiscreteLegendItemTemplate on-demand by + * the series object itself. + * The provided object should have properties called render and optionally measure. See definition for option: legendItemBadgeTemplate + */ + discreteLegendItemTemplate?: any; + + /** + * Gets or sets the duration of the current series's morph. + */ + transitionDuration?: number; + + /** + * Provides an easing function to use for the transitions. This should either be a well known name of an easing function (The only currently supported name is cubic), or it should be a function that takes a number and returns the output with the function applied. + */ + transitionEasingFunction?: any; + + /** + * Gets or sets the current series object's rendering resolution. + */ + resolution?: number; + + /** + * Gets or sets the Title property. + * The legend item control is created according to the Title on-demand by + * the series object itself. + */ + title?: string; + + /** + * Gets or sets the brush to use for the series. + */ + brush?: string; + + /** + * Gets or sets the brush to use for the outline of the series. + * Some series types, such as LineSeries, do not display outlines. Therefore, this property does not affect some charts. + */ + outline?: string; + + /** + * Gets or sets the width of the current series object's line thickness. + */ + thickness?: number; + + /** + * Gets or gets the coercion methods to use when loading data from data sources. + * Should be specified before setting any member paths, if being used. Setting it later + * will not cause data to be reimported into the chart. + */ + coercionMethods?: any; + + /** + * Gets or sets the marker type for the current series object. If the MarkerTemplate property is set, the setting of the MarkerType property will be ignored. + * + * Valid values: + * "unset" Marker hasn't been set. + * "none" No markerItems. + * "automatic" Automatic marker shape. + * "circle" Circle marker shape. + * "triangle" Flat-top triangle marker shape. + * "pyramid" Flat-base triangle marker shape. + * "square" Square marker shape. + * "diamond" Diamond marker shape. + * "pentagon" Pentagon marker shape. + * "hexagon" Hexagon marker shape. + * "tetragram" Four-pointed star marker shape. + * "pentagram" Five-pointed star marker shape. + * "hexagram" Six-pointed star marker shape. + */ + markerType?: string; + + /** + * Gets or sets the MarkerTemplate for the current series object. + * The provided object should have properties called render and optionally measure. See definition for option: legendItemBadgeTemplate + */ + markerTemplate?: any; + + /** + * Gets or sets the brush that specifies how the current series object's marker interiors are painted. + */ + markerBrush?: string; + + /** + * Gets or sets the brush that specifies how the current series object's marker outlines are painted. + */ + markerOutline?: string; + + /** + * Gets or sets the effective x-axis for the current object. + */ + xAxis?: string; + + /** + * Gets or sets the effective y-axis for the current object. + */ + yAxis?: string; + + /** + * Gets or sets the value mapping property for the current series object. + */ + xMemberPath?: string; + + /** + * Gets or sets the value mapping property for the current series object. + */ + yMemberPath?: string; + + /** + * Gets or sets the trend type for the current scatter series. + * + * Valid values: + * "none" No trendline should display. + * "linearFit" Linear fit. + * "quadraticFit" Quadratic polynomial fit. + * "cubicFit" Cubic polynomial fit. + * "quarticFit" Quartic polynomial fit. + * "quinticFit" Quintic polynomial fit. + * "logarithmicFit" Logarithmic fit. + * "exponentialFit" Exponential fit. + * "powerLawFit" Powerlaw fit. + * "simpleAverage" Simple moving average. + * "exponentialAverage" Exponential moving average. + * "modifiedAverage" Modified moving average. + * "cumulativeAverage" Cumulative moving average. + * "weightedAverage" Weighted moving average. + */ + trendLineType?: string; + + /** + * Gets or sets the brush to use to draw the trend line. + */ + trendLineBrush?: string; + + /** + * Gets or sets the thickness of the current scatter series object's trend line. + */ + trendLineThickness?: number; + + /** + * Gets or sets the moving average period for the current scatter series object. + * The typical, and initial, value for trend line period is 7. + */ + trendLinePeriod?: number; + + /** + * Gets or sets the Z-Index of the trend line. Values greater than 1000 will result in the trend line being rendered in front of the series data. + */ + trendLineZIndex?: number; + + /** + * Gets or sets the maximum number of markerItems displayed by the current series. + * If more than the specified number of markerItems are visible, the series will automatically + * choose a representative set. + */ + maximumMarkers?: number; + + /** + * Determines how unknown values will be plotted on the chart. Null and Double.NaN are two examples of unknown values. + * + * Valid values: + * "linearInterpolate" Plot the unknown value as the midpoint between surrounding known values using linear interpolation. + * "dontPlot" Do not plot the unknown value on the chart. + */ + unknownValuePlotting?: string; + + /** + * Gets or sets the radius mapping property for the current series object. + */ + radiusMemberPath?: string; + + /** + * Gets or sets the radius size scale for the bubbles. + */ + radiusScale?: any; + + /** + * Gets or sets the Label mapping property for the current series object. + */ + labelMemberPath?: string; + + /** + * Gets or sets the fill mapping property for the current series object. + */ + fillMemberPath?: string; + + /** + * Gets or sets the brush scale for the marker brush. + */ + fillScale?: any; + + /** + * Gets the effective angle axis for the current series object. + */ + angleAxis?: string; + + /** + * Gets the effective value axis for the current series object. + */ + valueAxis?: string; + + /** + * Gets or sets whether to clip the series to the bounds. + * Setting this to true can effect performance. + */ + clipSeriesToBounds?: boolean; + + /** + * Gets or sets the item path that provides the values for the current series. + */ + valueMemberPath?: string; + + /** + * Gets or sets the x-radius of the ellipse that is used to round the corners of the column. + */ + radiusX?: number; + + /** + * Gets or sets the y-radius of the ellipse that is used to round the corners of the column. + */ + radiusY?: number; + + /** + * Gets or sets the x-radius of the ellipse that is used to round the corners of the column. + */ + angleMemberPath?: number; + + /** + * Gets the effective radius axis for the current series object. + */ + radiusAxis?: string; + + /** + * Gets or sets whether Cartesian Interpolation should be used rather than Archimedian + * spiral based interpolation. + */ + useCartesianInterpolation?: boolean; + + /** + * Gets or sets the brush to use for negative portions of the series. + */ + negativeBrush?: string; + + /** + * Gets or sets the type of spline to be rendered. + * + * Valid values: + * "natural" Calculates the spline using a natural spline calculation formula. + * "clamped" Calculated the spline using a clamped spline calculation formula. + */ + splineType?: string; + + /** + * Gets or sets the value mapping property for the current series object. + */ + lowMemberPath?: string; + + /** + * Gets or sets the value mapping property for the current series object. + */ + highMemberPath?: string; + + /** + * Gets or sets the open mapping property for the current series object. + */ + openMemberPath?: string; + + /** + * Gets or sets the close mapping property for the current series object. + */ + closeMemberPath?: string; + + /** + * Gets or sets the volume mapping property for the current series object. + */ + volumeMemberPath?: string; + + /** + * Gets or sets the display for the current FinancialIndicator object. + * + * Valid values: + * "candlestick" Displays prices as a Japanese Candlestick. + * "OHLC" Displays prices as an OHLC bar. + */ + displayType?: string; + + /** + * Gets or sets the number of values to hide at the beginning of the indicator. + */ + ignoreFirst?: number; + + /** + * Gets or sets the moving average period for the current AverageDirectionalIndexIndicator object. + * The typical, and initial, value for AverageDirectionalIndexIndicator periods is 14. + */ + period?: number; + + /** + * Gets or sets the short moving average period for the current AbsoluteVolumeOscillatorIndicator object. + * The typical, and initial, value for short AVO periods is 10. + */ + shortPeriod?: number; + + /** + * Gets or sets the short moving average period for the current AbsoluteVolumeOscillatorIndicator object. + * The typical, and initial, value for long AVO periods is 30. + */ + longPeriod?: number; + + /** + * Gets or sets the MarkerCollisionAvoidance + * + * Valid values: + * "none" No collision avoidance is attempted. + * "omit" Markers that collide will be omitted. + * "fade" Markers that collide will be faded in opacity. + * "omitAndShift" Markers that collide may be shifted or omitted. + */ + markerCollisionAvoidance?: string; + + /** + * Sets or Gets whether to increase marker fidelity for extreme data shapes that have lots of Y variation over short X intervals. + */ + useHighMarkerFidelity?: boolean; + + /** + * Gets or sets whether to use use brute force mode. + */ + useBruteForce?: boolean; + + /** + * Gets or sets whether to progressively load the data into the chart. + */ + progressiveLoad?: boolean; + + /** + * Gets or sets whether the chart reacts to mouse move events. + */ + mouseOverEnabled?: boolean; + + /** + * Gets or sets whether to use squares when halting a render traversal rather than the shape of the coalesced area. + */ + useSquareCutoffStyle?: boolean; + + /** + * Gets or sets the density value that maps to the minimum heat color. + */ + heatMinimum?: number; + + /** + * Gets or sets the value that maps to the maximum heat color. + */ + heatMaximum?: number; + + /** + * Gets or sets the minimum heat color for the density scale. + */ + heatMinimumColor?: any; + + /** + * Gets or sets the maximum heat color for the density scale. + */ + heatMaximumColor?: any; + + /** + * Gets or sets the series for stacked charts. It should contain array of series objects. Each item in array should represent a series with and it may have most options supported by top-level series object, such as xAxis, yAxis, valueMemberPath, etc. + */ + series?: any[]; + + /** + * Gets or sets whether drop shadow should be enabled for this series. + */ + isDropShadowEnabled?: boolean; + + /** + * Gets or sets whether drop shadow is applied to the whole series visual or to each of the individual shapes forming the series. + */ + useSingleShadow?: boolean; + + /** + * Gets or sets the color to use for the drop shadow. + */ + shadowColor?: any; + + /** + * Gets or sets the blur amount to use for the drop shadow. + */ + shadowBlur?: number; + + /** + * Gets or sets the x offset amount to use for the drop shadow. + */ + shadowOffsetX?: number; + + /** + * Gets or sets the y offset amount to use for the drop shadow. + */ + shadowOffsetY?: number; + + /** + * Gets or sets if the series should play a transition in animation when the data source is assigned. Note: Transitions are not currently supported for stacked series. + */ + isTransitionInEnabled?: boolean; + + /** + * Gets or sets the speed to transition in the series data points. + * + * Valid values: + * "auto" A speed type is automatically selected. + * "normal" All speeds are normal, data points will arrive at the same time. + * "valueScaled" Data points will arrive later if their value is further from the start point. + * "indexScaled" Data points will arrive later if their index is further from the axis origin. + * "random" Data points will arrive at random times. + */ + transitionInSpeedType?: string; + + /** + * Gets or sets the method to transition in the series. Note: Transitions are not currently supported for stacked series. + * + * Valid values: + * "auto" Series transitions in an automatically chosen way. + * "fromZero" Series transitions in from the reference value of the value axis. + * "sweepFromLeft" Series sweeps in from the left. + * "sweepFromRight" Series sweeps in from the right. + * "sweepFromTop" Series sweeps in from the top. + * "sweepFromBottom" Series sweeps in from the bottom. + * "sweepFromCenter" Series sweeps in from the center. + * "accordionFromLeft" Series accordions in from the left. + * "accordionFromRight" Series accordions in from the right. + * "accordionFromTop" Series accordions in from the top. + * "accordionFromBottom" Series accordions in from the bottom. + * "expand" Series expands from the value midpoints. + * "sweepFromCategoryAxisMinimum" Series sweeps in from the category axis minimum. + * "sweepFromCategoryAxisMaximum" Series sweeps in from the category axis maximum. + * "sweepFromValueAxisMinimum" Series sweeps in from the value axis minimum. + * "sweepFromValueAxisMaximum" Series sweeps in from the value axis maximum. + * "accordionFromCategoryAxisMinimum" Series accordions in from the category axis minimum. + * "accordionFromCategoryAxisMaximum" Series accordions in from the category axis maximum. + * "accordionFromValueAxisMinimum" Series accordions in from the value axis minimum. + * "accordionFromValueAxisMaximum" Series accordions in from the value axis maximum. + */ + transitionInMode?: string; + + /** + * Gets or sets the duration of the current series's transition in morph in milliseconds. + */ + transitionInDuration?: number; + + /** + * Gets or sets the corner radius to use for the series, if applicable. + */ + radius?: number; + + /** + * Gets or sets the opacity modifier to apply to the area fill shape of the series, if applicable. + */ + areaFillOpacity?: number; + + /** + * Gets or sets whether the series should expect that its data source members need to be called as functions to get their values. + */ + expectFunctions?: boolean; + + /** + * Gets or sets whether the hover layer should use interpolation to position itself relative the closest values. + */ + useInterpolation?: boolean; + + /** + * Gets or sets whether the hover layer should skip unknown values when trying to find the closest values. + */ + skipUnknownValues?: boolean; + + /** + * Gets or sets whether the vertical crosshair portion of the layer should be visible. + * + * Valid values: + * "visible" the vertical crosshair portion of the layer should be visible. + * "collapsed" the vertical crosshair portion of the layer should not be visible. + */ + verticalLineVisibility?: string; + + /** + * Gets or sets whether the horizontal crosshair portion of the layer should be visible. + * + * Valid values: + * "visible" the horizontal crosshair portion of the layer should be visible. + * "collapsed" the horizontal crosshair portion of the layer should not be visible. + */ + horizontalLineVisibility?: string; + + /** + * Gets or sets the name of the target series for the layer, if desired. Setting the target series will scope the layer to target just that series. + */ + targetSeries?: string; + + /** + * Gets or sets the name of the target axis for the layer, if desired. Setting the target axis will scope the layer to target just that axis. + */ + targetAxis?: string; + + /** + * Gets or sets whether a custom category style is allowed. Setting this to true will case the assigningCategoryStyle event to get fired, if provided. + */ + isCustomCategoryStyleAllowed?: boolean; + + /** + * Gets or sets whether a custom category marker style is allowed. Setting this to true will case the assigningCategoryMarkerStyle event to get fired, if provided. + */ + isCustomCategoryMarkerStyleAllowed?: boolean; + + /** + * Gets or sets value that is used to determine positioning logic for data items which have been consolidated into a single visual element. + * + * Valid values: + * "maximum" Consolidated items will be positioned using their maximum value. + * "minimum" Consolidated items will be positioned using their minimum value. + * "median" Consolidated items will be positioned using their median value. + * "relativeMinimum" Consolidated items will be positioned using the value nearest to the reference value of the corresponding axis. + * "relativeMaximum" Consolidated items will be positioned using the value farthest from the reference value of the corresponding axis. + */ + consolidatedColumnVerticalPosition?: string; + + /** + * Gets or sets whether highlighting should be enabled for the series, if supported. + */ + isHighlightingEnabled?: boolean; + + /** + * Gets or sets the width to use for the highlight region if highlighting items in a grid aligned series (line, spline, etc), with a banded shape. + */ + bandHighlightWidth?: number; + + /** + * Gets or sets which type of highlight shape to use when highlighting items. + * + * Valid values: + * "auto" use an automatic highlight type for this series. + * "marker" use a marker highlight type for this series. + * "shape" use a shape highlight type for this series. + */ + highlightType?: string; + + /** + * Gets or sets the Position to apply to the tooltip containers. + * + * Valid values: + * "auto" use an automatic position for the category tooltips. + * "outsideStart" position the category tooltip at the outside start of the value axis. + * "insideStart" position the category tooltip at the inside start of the value axis. + * "insideEnd" position the category tooltip at the inside end of the value axis. + * "outsideEnd" position the category tooltip at the outside end of the value axis. + */ + tooltipPosition?: string; + + /** + * Sets the position a cursor position to use instead of the current mouse cursor position for displaying the annotations in this layer. + * Should be an object with an x and a y property in world coordinates (ranging from 0 to 1) + */ + cursorPosition?: any; + + /** + * Sets if the presence of this layer should disable the default crosshair behavior of the chart, if present. + */ + isDefaultCrosshairDisabled?: boolean; + + /** + * Sets if the current layer should take up a brush/ordering index in the series collection to derive its color automatically. + */ + useIndex?: boolean; + + /** + * Sets if the current layer should have an entry in the legend of the chart. By default annotation layers are not present in the legend. + */ + useLegend?: boolean; + + /** + * Sets whether the order of the fragment series should be reversed in the legend. Note: Reversing the legend order is only supported on stacked series. + */ + reverseLegendOrder?: boolean; + + /** + * Gets or sets which type of hit testing the series should use. + * + * Valid values: + * "auto" automatically decide the appropriate hit test mode for the series. + * "computational" use a computational based approach to determine whether the series has been hit. This uses loose bounding boxes, in some cases, and can range in time complexity between O(1) and O(log n) to find a hit. This decreases frame render time compared to color encoded. + * "colorEncoded" use a color encoded off screen buffer for hit testing. This can have extremely rare false positives where the wrong series is hit (this is due to our inability to disable anti-aliasing in our color buffer), but should always be O(1) time for determining a hit series. This increases frame render time, however. Consider using this if hit testing time is degrading performance. + */ + hitTestMode?: string; + + /** + * Option for IgDataChartSeries + */ + [optionName: string]: any; +} + +interface TooltipShowingEvent { + (event: Event, ui: TooltipShowingEventUIParam): void; +} + +interface TooltipShowingEventUIParam { + /** + * Used to get reference to tooltip DOM element. + */ + element?: any; + + /** + * Used to get reference to current series item object. + */ + item?: any; + + /** + * Used to get reference to chart object. + */ + chart?: any; + + /** + * Used to get reference to current series object. + */ + series?: any; + + /** + * Used to get item brush. + */ + actualItemBrush?: any; + + /** + * Used to get series brush. + */ + actualSeriesBrush?: any; +} + +interface TooltipShownEvent { + (event: Event, ui: TooltipShownEventUIParam): void; +} + +interface TooltipShownEventUIParam { + /** + * Used to get reference to tooltip DOM element. + */ + element?: any; + + /** + * Used to get reference to current series item object. + */ + item?: any; + + /** + * Used to get reference to chart object. + */ + chart?: any; + + /** + * Used to get reference to current series object. + */ + series?: any; + + /** + * Used to get item brush. + */ + actualItemBrush?: any; + + /** + * Used to get series brush. + */ + actualSeriesBrush?: any; +} + +interface TooltipHidingEvent { + (event: Event, ui: TooltipHidingEventUIParam): void; +} + +interface TooltipHidingEventUIParam { + /** + * Used to get reference to tooltip DOM element. + */ + element?: any; + + /** + * Used to get reference to current series item object. + */ + item?: any; + + /** + * Used to get reference to chart object. + */ + chart?: any; + + /** + * Used to get reference to current series object. + */ + series?: any; + + /** + * Used to get item brush. + */ + actualItemBrush?: any; + + /** + * Used to get series brush. + */ + actualSeriesBrush?: any; +} + +interface TooltipHiddenEvent { + (event: Event, ui: TooltipHiddenEventUIParam): void; +} + +interface TooltipHiddenEventUIParam { + /** + * Used to get reference to tooltip DOM element. + */ + element?: any; + + /** + * Used to get reference to current series item object. + */ + item?: any; + + /** + * Used to get reference to chart object. + */ + chart?: any; + + /** + * Used to get reference to current series object. + */ + series?: any; + + /** + * Used to get item brush. + */ + actualItemBrush?: any; + + /** + * Used to get series brush. + */ + actualSeriesBrush?: any; +} + +interface BrowserNotSupportedEvent { + (event: Event, ui: BrowserNotSupportedEventUIParam): void; +} + +interface BrowserNotSupportedEventUIParam { +} + +interface SeriesCursorMouseMoveEvent { + (event: Event, ui: SeriesCursorMouseMoveEventUIParam): void; +} + +interface SeriesCursorMouseMoveEventUIParam { + /** + * Used to get reference to current series item object. + */ + item?: any; + + /** + * Used to get reference to chart object. + */ + chart?: any; + + /** + * Used to get reference to current series object. + */ + series?: any; + + /** + * Used to get item brush. + */ + actualItemBrush?: any; + + /** + * Used to get series brush. + */ + actualSeriesBrush?: any; + + /** + * Used to get mouse X position. + */ + positionX?: any; + + /** + * Used to get mouse Y position. + */ + positionY?: any; +} + +interface SeriesMouseLeftButtonDownEvent { + (event: Event, ui: SeriesMouseLeftButtonDownEventUIParam): void; +} + +interface SeriesMouseLeftButtonDownEventUIParam { + /** + * Used to get reference to current series item object. + */ + item?: any; + + /** + * Used to get reference to chart object. + */ + chart?: any; + + /** + * Used to get reference to current series object. + */ + series?: any; + + /** + * Used to get item brush. + */ + actualItemBrush?: any; + + /** + * Used to get series brush. + */ + actualSeriesBrush?: any; + + /** + * Used to get mouse X position. + */ + positionX?: any; + + /** + * Used to get mouse Y position. + */ + positionY?: any; +} + +interface SeriesMouseLeftButtonUpEvent { + (event: Event, ui: SeriesMouseLeftButtonUpEventUIParam): void; +} + +interface SeriesMouseLeftButtonUpEventUIParam { + /** + * Used to get reference to current series item object. + */ + item?: any; + + /** + * Used to get reference to chart object. + */ + chart?: any; + + /** + * Used to get reference to current series object. + */ + series?: any; + + /** + * Used to get item brush. + */ + actualItemBrush?: any; + + /** + * Used to get series brush. + */ + actualSeriesBrush?: any; + + /** + * Used to get mouse X position. + */ + positionX?: any; + + /** + * Used to get mouse Y position. + */ + positionY?: any; +} + +interface SeriesMouseMoveEvent { + (event: Event, ui: SeriesMouseMoveEventUIParam): void; +} + +interface SeriesMouseMoveEventUIParam { + /** + * Used to get reference to current series item object. + */ + item?: any; + + /** + * Used to get reference to chart object. + */ + chart?: any; + + /** + * Used to get reference to current series object. + */ + series?: any; + + /** + * Used to get item brush. + */ + actualItemBrush?: any; + + /** + * Used to get series brush. + */ + actualSeriesBrush?: any; + + /** + * Used to get mouse X position. + */ + positionX?: any; + + /** + * Used to get mouse Y position. + */ + positionY?: any; +} + +interface SeriesMouseEnterEvent { + (event: Event, ui: SeriesMouseEnterEventUIParam): void; +} + +interface SeriesMouseEnterEventUIParam { + /** + * Used to get reference to current series item object. + */ + item?: any; + + /** + * Used to get reference to chart object. + */ + chart?: any; + + /** + * Used to get reference to current series object. + */ + series?: any; + + /** + * Used to get item brush. + */ + actualItemBrush?: any; + + /** + * Used to get series brush. + */ + actualSeriesBrush?: any; + + /** + * Used to get mouse X position. + */ + positionX?: any; + + /** + * Used to get mouse Y position. + */ + positionY?: any; +} + +interface SeriesMouseLeaveEvent { + (event: Event, ui: SeriesMouseLeaveEventUIParam): void; +} + +interface SeriesMouseLeaveEventUIParam { + /** + * Used to get reference to current series item object. + */ + item?: any; + + /** + * Used to get reference to chart object. + */ + chart?: any; + + /** + * Used to get reference to current series object. + */ + series?: any; + + /** + * Used to get item brush. + */ + actualItemBrush?: any; + + /** + * Used to get series brush. + */ + actualSeriesBrush?: any; + + /** + * Used to get mouse X position. + */ + positionX?: any; + + /** + * Used to get mouse Y position. + */ + positionY?: any; +} + +interface WindowRectChangedEvent { + (event: Event, ui: WindowRectChangedEventUIParam): void; +} + +interface WindowRectChangedEventUIParam { + /** + * Used to get reference to chart object. + */ + chart?: any; + + /** + * Used to get new height value. + */ + newHeight?: any; + + /** + * Used to get new left value. + */ + newLeft?: any; + + /** + * Used to get new top value. + */ + newTop?: any; + + /** + * Used to get new top value. + */ + newWidth?: any; + + /** + * Used to get old height value. + */ + oldHeight?: any; + + /** + * Used to get old left value. + */ + oldLeft?: any; + + /** + * Used to get old top value. + */ + oldTop?: any; + + /** + * Used to get old top value. + */ + oldWidth?: any; +} + +interface GridAreaRectChangedEvent { + (event: Event, ui: GridAreaRectChangedEventUIParam): void; +} + +interface GridAreaRectChangedEventUIParam { + /** + * Used to get reference to chart object. + */ + chart?: any; + + /** + * Used to get new height value. + */ + newHeight?: any; + + /** + * Used to get new left value. + */ + newLeft?: any; + + /** + * Used to get new top value. + */ + newTop?: any; + + /** + * Used to get new top value. + */ + newWidth?: any; + + /** + * Used to get old height value. + */ + oldHeight?: any; + + /** + * Used to get old left value. + */ + oldLeft?: any; + + /** + * Used to get old top value. + */ + oldTop?: any; + + /** + * Used to get old top value. + */ + oldWidth?: any; +} + +interface RefreshCompletedEvent { + (event: Event, ui: RefreshCompletedEventUIParam): void; +} + +interface RefreshCompletedEventUIParam { + /** + * Used to get reference to chart object. + */ + chart?: any; +} + +interface AxisRangeChangedEvent { + (event: Event, ui: AxisRangeChangedEventUIParam): void; +} + +interface AxisRangeChangedEventUIParam { + /** + * Used to get reference to current chart axis object. + */ + axis?: any; + + /** + * Used to get reference to chart object. + */ + chart?: any; + + /** + * Used to get new maximum value. + */ + newMaximumValue?: any; + + /** + * Used to get new minimum value. + */ + newMinimumValue?: any; + + /** + * Used to get old maximum value. + */ + oldMaximumValue?: any; + + /** + * Used to get old minimum value. + */ + oldMinimumValue?: any; +} + +interface TypicalBasedOnEvent { + (event: Event, ui: TypicalBasedOnEventUIParam): void; +} + +interface TypicalBasedOnEventUIParam { + /** + * Used to get reference to chart object. + */ + chart?: any; + + /** + * Used to get reference to current series object. + */ + series?: any; + + /** + * Used to get the number of positions that should be calculated from the start. + */ + count?: any; + + /** + * Used to get the beginning position that should be calculated from. + */ + position?: any; + + /** + * Used to get the supporting calculations to use in the calculation. + */ + supportingCalculations?: any; + + /** + * Used to get the data to use for the calculation. + */ + dataSource?: any; + + /** + * Used to specify which columns changing will invalidate the series and cause it to be recalculated. + */ + basedOn?: any; +} + +interface ProgressiveLoadStatusChangedEvent { + (event: Event, ui: ProgressiveLoadStatusChangedEventUIParam): void; +} + +interface ProgressiveLoadStatusChangedEventUIParam { + /** + * Used to get reference to chart object. + */ + chart?: any; + + /** + * Used to get reference to current series object. + */ + series?: any; + + /** + * Used to get current status. + */ + currentStatus?: any; +} + +interface AssigningCategoryStyleEvent { + (event: Event, ui: AssigningCategoryStyleEventUIParam): void; +} + +interface AssigningCategoryStyleEventUIParam { + /** + * Used to get reference to chart object. + */ + chart?: any; + + /** + * Used to get reference to current series object. + */ + series?: any; + + /** + * Used to get the start index for the current items. + */ + startIndex?: any; + + /** + * Used to get the end index for the current items. + */ + endIndex?: any; + + /** + * Used to tell if you should use the startDate and endDate to know the current items instead of startIndex/endIndex. + */ + hasDateRange?: any; + startDate?: any; + endDate?: any; + + /** + * Used to get all the items associated with the event (only if necessary). + */ + getItems?: any; + + /** + * Used to get or set the fill to use for the current item. + */ + fill?: any; + + /** + * Used to get or set the stroke to use for the current item. + */ + stroke?: any; + + /** + * Used to get or set the opacity to use for the current item. + */ + opacity?: any; + + /** + * Used to set if the default highlighting behavior should not run, given that you are handling it in this event. + */ + highlightingHandled?: any; + + /** + * Used to get the maximum highlighted progress across all series. + */ + maxAllSeriesHighlightingProgress?: any; + + /** + * Used to get the sum of highlighting progtess across all series. + */ + sumAllSeriesHighlightingProgress?: any; +} + +interface AssigningCategoryMarkerStyleEvent { + (event: Event, ui: AssigningCategoryMarkerStyleEventUIParam): void; +} + +interface AssigningCategoryMarkerStyleEventUIParam { + /** + * Used to get reference to chart object. + */ + chart?: any; + + /** + * Used to get reference to current series object. + */ + series?: any; + + /** + * Used to get the start index for the current items. + */ + startIndex?: any; + + /** + * Used to get the end index for the current items. + */ + endIndex?: any; + + /** + * Used to tell if you should use the startDate and endDate to know the current items instead of startIndex/endIndex. + */ + hasDateRange?: any; + startDate?: any; + endDate?: any; + + /** + * Used to get all the items associated with the event (only if necessary). + */ + getItems?: any; + + /** + * Used to get or set the fill to use for the current item. + */ + fill?: any; + + /** + * Used to get or set the stroke to use for the current item. + */ + stroke?: any; + + /** + * Used to get or set the opacity to use for the current item. + */ + opacity?: any; + + /** + * Used to set if the default highlighting behavior should not run, given that you are handling it in this event. + */ + highlightingHandled?: any; + + /** + * Used to get the maximum highlighted progress across all series. + */ + maxAllSeriesHighlightingProgress?: any; + + /** + * Used to get the sum of highlighting progtess across all series. + */ + sumAllSeriesHighlightingProgress?: any; +} + +interface IgDataChart { + /** + * Gets or sets whether the series viewer can allow the page to pan if a control pan is not possible in the requested direction. + */ + isPagePanningAllowed?: boolean; + + /** + * The channel name to use to sync this chart with other charts. + */ + syncChannel?: string; + + /** + * Whether the chart should be synchronized vertically + */ + synchronizeVertically?: boolean; + + /** + * Whether the chart should be synchronized horizontally + */ + synchronizeHorizontally?: boolean; + + /** + * Gets or sets the cross hair point (in world coordinates) + * Either or both of the crosshair point's X and Y may be set to double.NaN, in which + * case the relevant crosshair line is hidden. + */ + crosshairPoint?: IgDataChartCrosshairPoint; + + /** + * A rectangle representing the portion of the chart currently in view. + * A rectangle at X=0, Y=0 with a Height and Width of 1 implies the entire plotting area is in view. A Height and Width of .5 would imply that the view is halfway zoomed in. + * The provided object should have numeric properties called left, top, width and height. + */ + windowRect?: any; + + /** + * Gets or sets the current Chart's horizontal zoomability. + */ + horizontalZoomable?: boolean; + + /** + * Gets or sets the current Chart's vertical zoomability. + */ + verticalZoomable?: boolean; + + /** + * The response to user panning and zooming: whether to update the view immediately while the user action is happening, or to defer the update to after the user action is complete. The user action will be an action such as a mouse drag which causes panning and/or zooming to occur. + * + * + * Valid values: + * "deferred" Defer the view update until after the user action is complete. + * "immediate" Update the view immediately while the user action is happening. + */ + windowResponse?: string; + + /** + * Sets or gets the minimum width that the window rect is allowed to reach before being clamped. + * Decrease this value if you want to allow for further zooming into the viewer. + * If this value is lowered too much it can cause graphical corruption due to floating point arithmetic inaccuracy. + */ + windowRectMinWidth?: number; + + /** + * The visibility of the OverviewPlusDetailPane. + * + * Valid values: + * "visible" The overview pane should be visible. + * "collapsed" The overview pane should not be visible. + */ + overviewPlusDetailPaneVisibility?: string; + + /** + * Gets or sets the current Chart's crosshair visibility override. Note: setting this property does not affect the mobile browser version of the chart. + * + * Valid values: + * "visible" Crosshair should be visible. + * "collapsed" Crosshair should not be visible. + */ + crosshairVisibility?: string; + + /** + * Gets or sets the brush used as the background for the current Chart object's plot area. + */ + plotAreaBackground?: string; + + /** + * Gets or sets the DefaultInteraction property. The default interaction state defines the chart's response to mouse events. + * + * Valid values: + * "none" User gesture will not change the state of the chart. + * "dragZoom" User gesture will start a drag rectangle to zoom the chart. + * "dragPan" User gesture will start a pan action to move the chart's window. + */ + defaultInteraction?: string; + + /** + * Gets or sets the current Chart's DragModifier property. + * + * Valid values: + * "none" No modifier key is set. + * "alt" The modifier is set to alt key. + * "control" The modifier is set to control key. + * "shift" The modifier is set to shift key. + */ + dragModifier?: string; + + /** + * Gets or sets the current Chart's PanModifier property. + * + * Valid values: + * "none" No modifier key is set. + * "alt" The modifier is set to alt key. + * "control" The modifier is set to control key. + * "shift" The modifier is set to shift key. + */ + panModifier?: string; + + /** + * Gets or sets the preview rectangle. + * The preview rectangle may be set to Rect.Empty, in which case the visible preview + * strokePath is hidden. + * The provided object should have numeric properties called left, top, width and height. + */ + previewRect?: any; + + /** + * A number between 0 and 1 determining the position of the horizontal scroll. + * This property is effectively a shortcut to the X position of the WindowRect property. + */ + windowPositionHorizontal?: number; + + /** + * A number between 0 and 1 determining the position of the vertical scroll. + * This property is effectively a shortcut to the Y position of the WindowRect property. + */ + windowPositionVertical?: number; + + /** + * A number between 0 and 1 determining the scale of the horizontal zoom. + * This property is effectively a shortcut to the Width of the WindowRect property. + */ + windowScaleHorizontal?: number; + + /** + * A number between 0 and 1 determining the scale of the vertical zoom. + * This property is effectively a shortcut to the Height of the WindowRect property. + */ + windowScaleVertical?: number; + + /** + * Gets or sets the template to use for circle markers on the chart. + * Defines the marker template used for + * series with a marker type of circle. + * The provided object should have properties called render and optionally measure. See definition for option: legendItemBadgeTemplate + */ + circleMarkerTemplate?: any; + + /** + * Gets or sets the template to use for triangle markers on the chart. + * Defines the marker template used for + * series with a marker type of triangle. + * The provided object should have properties called render and optionally measure. See definition for option: legendItemBadgeTemplate + */ + triangleMarkerTemplate?: any; + + /** + * Gets or sets the template to use for pyramid markers on the chart. + * Defines the marker template used for + * series with a marker type of pyramid. + * The provided object should have properties called render and optionally measure. See definition for option: legendItemBadgeTemplate + */ + pyramidMarkerTemplate?: any; + + /** + * Gets or sets the template to use for square markers on the chart. + * Defines the marker template used for + * series with a marker type of square. + * The provided object should have properties called render and optionally measure. See definition for option: legendItemBadgeTemplate + */ + squareMarkerTemplate?: any; + + /** + * Gets or sets the template to use for diamond markers on the chart. + * Defines the marker template used for + * series with a marker type of diamond. + * The provided object should have properties called render and optionally measure. See definition for option: legendItemBadgeTemplate + */ + diamondMarkerTemplate?: any; + + /** + * Gets or sets the template to use for pentagon markers on the chart. + * Defines the marker template used for + * series with a marker type of pentagon. + * The provided object should have properties called render and optionally measure. See definition for option: legendItemBadgeTemplate + */ + pentagonMarkerTemplate?: any; + + /** + * Gets or sets the template to use for hexagon markers on the chart. + * Defines the marker template used for + * series with a marker type of hexagon. + * The provided object should have properties called render and optionally measure. See definition for option: legendItemBadgeTemplate + */ + hexagonMarkerTemplate?: any; + + /** + * Gets or sets the template to use for tetragram markers on the chart. + * Defines the marker template used for + * series with a marker type of tetragram. + * The provided object should have properties called render and optionally measure. See definition for option: legendItemBadgeTemplate + */ + tetragramMarkerTemplate?: any; + + /** + * Gets or sets the template to use for pentragram markers on the chart. + * Defines the marker template used for + * series with a marker type of pentagram. + * The provided object should have properties called render and optionally measure. See definition for option: legendItemBadgeTemplate + */ + pentagramMarkerTemplate?: any; + + /** + * Gets or sets the template to use for hexagram markers on the chart. + * Defines the marker template used for + * series with a marker type of hexagram. + * The provided object should have properties called render and optionally measure. See definition for option: legendItemBadgeTemplate + */ + hexagramMarkerTemplate?: any; + + /** + * Sets or gets the top margin to use around the chart content in the canvas. + */ + topMargin?: number; + + /** + * Sets or gets the left margin to use around the chart content in the canvas. + */ + leftMargin?: number; + + /** + * Sets or gets the right margin to use around the chart content in the canvas. + */ + rightMargin?: number; + + /** + * Sets or gets the bottom margin to use around the chart content in the canvas. + */ + bottomMargin?: number; + + /** + * Sets or gets the automatic width to add when automatically adding margins to the chart. + */ + autoMarginWidth?: number; + + /** + * Sets or gets the automatic height to add when automatically adding margins to the chart. + */ + autoMarginHeight?: number; + + /** + * Gets or sets whether to use a square aspect ratio for the chart. This is locked to true for polar and radial charts. + */ + isSquare?: boolean; + + /** + * Gets or sets the GridMode property. + * + * Valid values: + * "none" No chart grid. + * "beforeSeries" Chart grid should be rendered before or in front of the data series. + * "behindSeries" Chart grid should be rendered behind or in back of the data series. + */ + gridMode?: string; + + /** + * Gets or sets the Brushes property. + * The brushes property defines the palette from which automatically assigned series brushes are selected. + * The value provided should be an array of css color strings. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + brushes?: any; + + /** + * Gets or sets the MarkerBrushes property. + * The marker brushes property defines the palette from which automatically assigned marker brushes are selected. + * The value provided should be an array of css color strings. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + markerBrushes?: any; + + /** + * Gets or sets the Outlines property. + * The outlines property defines the palette from which automatically assigned series outlines are selected. + * The value provided should be an array of css color strings. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + outlines?: any; + + /** + * Gets or sets the MarkerOutlines property. + * The marker outlines property defines the palette from which automatically assigned marker outlines are selected. + * The value provided should be an array of css color strings. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + markerOutlines?: any; + + /** + * The width of the chart. It can be set as a number in pixels, string (px) or percentage (%). + */ + width?: string|number; + + /** + * The height of the chart. It can be set as a number in pixels, string (px) or percentage (%). + */ + height?: string|number; + + /** + * To set both dimensions of the chart simultaneously an object with a width and height property can be provided + */ + size?: any; + + /** + * Can be any valid data source accepted by $.ig.DataSource, or an instance of an $.ig.DataSource itself + */ + dataSource?: any; + + /** + * Specifies a remote URL accepted by $.ig.DataSource in order to request data from it + */ + dataSourceUrl?: string; + + /** + * Explicitly set data source type (such as "json"). Please refer to the documentation of $.ig.DataSource and its type property. + */ + dataSourceType?: string; + + /** + * See $.ig.DataSource. Specifies the name of the property in which data records are held if the response is wrapped. + */ + responseDataKey?: string; + + /** + * Set to true in order to disable any interactions with the plot surface. + */ + isSurfaceInteractionDisabled?: boolean; + + /** + * Set to true in order to override the default behavior in which series do not animate if an axis range changes + */ + animateSeriesWhenAxisRangeChanges?: boolean; + + /** + * The title to display for the component. + */ + title?: string; + + /** + * The subtitle to display for the component. + */ + subtitle?: string; + + /** + * The css font property to use for the title. + */ + titleTextStyle?: string; + + /** + * The top margin to use for the title. + */ + titleTopMargin?: number; + + /** + * The left margin to use for the title. + */ + titleLeftMargin?: number; + + /** + * The right margin to use for the title. + */ + titleRightMargin?: number; + + /** + * The bottom margin to use for the title. + */ + titleBottomMargin?: number; + + /** + * The css font property to use for the title. + */ + subtitleTextStyle?: string; + + /** + * The top margin to use for the subtitle. + */ + subtitleTopMargin?: number; + + /** + * The left margin to use for the subtitle. + */ + subtitleLeftMargin?: number; + + /** + * The right margin to use for the subtitle. + */ + subtitleRightMargin?: number; + + /** + * The bottom margin to use for the subtitle. + */ + subtitleBottomMargin?: number; + + /** + * The color to use for the title. + */ + titleTextColor?: any; + + /** + * The color to use for the subtitle. + */ + subtitleTextColor?: any; + + /** + * the horizontal alignment to use for the title. + * + * Valid values: + * "left" left aligns the title. + * "center" center aligns the title. + * "right" right aligns the title. + */ + titleHorizontalAlignment?: string; + + /** + * the horizontal alignment to use for the subtitle. + * + * Valid values: + * "left" left aligns the subtitle. + * "center" center aligns the subtitle. + * "right" right aligns the subtitle. + */ + subtitleHorizontalAlignment?: string; + + /** + * The length, in milliseconds of the highlighting transition. + */ + highlightingTransitionDuration?: number; + + /** + * Sets whether the series viewer should use cached tiles during zooms rather than the default live content. + */ + useTiledZooming?: boolean; + + /** + * Sets whether the series viewer should prefer selecting higher resolution tiles over lower resolution tiles when performing tile zooming. Setting this to true will lower performance but increase quality. + */ + preferHigherResolutionTiles?: boolean; + + /** + * Gets or sets the scaling value used by the main canvas rendering context to apply a scale transform to it. + */ + pixelScalingRatio?: number; + + /** + * Sets the maximum number of zoom tiles that the series viewer should cache while in tiled zooming mode. + */ + zoomTileCacheSize?: number; + + /** + * Gets or sets which type of hit testing the series should use. + * + * Valid values: + * "auto" automatically decide the appropriate hit test mode for the series. + * "computational" use a computational based approach to determine which series has been hit. This uses loose bounding boxes, in some cases, and can range in time complexity between O(1) and O(log n) to find a hit. This decreases frame render time compared to color encoded. + * "colorEncoded" use a color encoded off screen buffer for hit testing. This can have extremely rare false positives where the wrong series is hit (this is due to our inability to disable anti-aliasing in our color buffer), but should always be O(1) time for determining a hit series. This increases frame render time, however. Consider using this if hit testing time is degrading performance. + * "mixed" let each series decide which hit testing mode to use individually based on their own hit test mode. + * "mixedFavoringComputational" let each series decide which hit testing mode to use individually based on their own hit test mode, but evaluate all computational hits before evaluating any color encoding hits. + */ + contentHitTestMode?: string; + + /** + * Can be any valid options accepted by $.ig.ChartLegend, or an instance of an $.ig.ChartLegend itself. + */ + legend?: IgDataChartLegend; + + /** + * An array of axis objects + */ + axes?: IgDataChartAxes[]; + + /** + * An array of series objects + */ + series?: IgDataChartSeries[]; + + /** + * The swatch used to style this widget + */ + theme?: string; + + /** + * Event fired when the mouse has hovered on a series and the tooltip is about to show + * Function takes arguments evt and ui. + * Use ui.element to get reference to tooltip DOM element. + * Use ui.item to get reference to current series item object. + * Use ui.chart to get reference to chart object. + * Use ui.series to get reference to current series object. + * Use ui.actualItemBrush to get item brush. + * Use ui.actualSeriesBrush to get series brush. + */ + tooltipShowing?: TooltipShowingEvent; + + /** + * Event fired after a tooltip is shown + * Function takes arguments evt and ui. + * Use ui.element to get reference to tooltip DOM element. + * Use ui.item to get reference to current series item object. + * Use ui.chart to get reference to chart object. + * Use ui.series to get reference to current series object. + * Use ui.actualItemBrush to get item brush. + * Use ui.actualSeriesBrush to get series brush. + */ + tooltipShown?: TooltipShownEvent; + + /** + * Event fired when the mouse has left a series and the tooltip is about to hide + * Function takes arguments evt and ui. + * Use ui.element to get reference to tooltip DOM element. + * Use ui.item to get reference to current series item object. + * Use ui.chart to get reference to chart object. + * Use ui.series to get reference to current series object. + * Use ui.actualItemBrush to get item brush. + * Use ui.actualSeriesBrush to get series brush. + */ + tooltipHiding?: TooltipHidingEvent; + + /** + * Event fired after a tooltip is hidden + * Function takes arguments evt and ui. + * Use ui.element to get reference to tooltip DOM element. + * Use ui.item to get reference to current series item object. + * Use ui.chart to get reference to chart object. + * Use ui.series to get reference to current series object. + * Use ui.actualItemBrush to get item brush. + * Use ui.actualSeriesBrush to get series brush. + */ + tooltipHidden?: TooltipHiddenEvent; + + /** + * Event fired when the control is displayed on a non HTML5 compliant browser + */ + browserNotSupported?: BrowserNotSupportedEvent; + + /** + * Occurs when the cursors are moved over a series in this chart. + * Function takes arguments evt and ui. + * Use ui.item to get reference to current series item object. + * Use ui.chart to get reference to chart object. + * Use ui.series to get reference to current series object. + * Use ui.actualItemBrush to get item brush. + * Use ui.actualSeriesBrush to get series brush. + * Use ui.positionX to get mouse X position. + * Use ui.positionY to get mouse Y position. + */ + seriesCursorMouseMove?: SeriesCursorMouseMoveEvent; + + /** + * Occurs when the left mouse button is pressed while the mouse pointer is over an element of this chart. + * Function takes arguments evt and ui. + * Use ui.item to get reference to current series item object. + * Use ui.chart to get reference to chart object. + * Use ui.series to get reference to current series object. + * Use ui.actualItemBrush to get item brush. + * Use ui.actualSeriesBrush to get series brush. + * Use ui.positionX to get mouse X position. + * Use ui.positionY to get mouse Y position. + */ + seriesMouseLeftButtonDown?: SeriesMouseLeftButtonDownEvent; + + /** + * Occurs when the left mouse button is released while the mouse pointer is over an element of this chart. + * Function takes arguments evt and ui. + * Use ui.item to get reference to current series item object. + * Use ui.chart to get reference to chart object. + * Use ui.series to get reference to current series object. + * Use ui.actualItemBrush to get item brush. + * Use ui.actualSeriesBrush to get series brush. + * Use ui.positionX to get mouse X position. + * Use ui.positionY to get mouse Y position. + */ + seriesMouseLeftButtonUp?: SeriesMouseLeftButtonUpEvent; + + /** + * Occurs when the left mouse pointer moves while over an element of this chart. + * Function takes arguments evt and ui. + * Use ui.item to get reference to current series item object. + * Use ui.chart to get reference to chart object. + * Use ui.series to get reference to current series object. + * Use ui.actualItemBrush to get item brush. + * Use ui.actualSeriesBrush to get series brush. + * Use ui.positionX to get mouse X position. + * Use ui.positionY to get mouse Y position. + */ + seriesMouseMove?: SeriesMouseMoveEvent; + + /** + * Occurs when the left mouse pointer enters an element of this chart. + * Function takes arguments evt and ui. + * Use ui.item to get reference to current series item object. + * Use ui.chart to get reference to chart object. + * Use ui.series to get reference to current series object. + * Use ui.actualItemBrush to get item brush. + * Use ui.actualSeriesBrush to get series brush. + * Use ui.positionX to get mouse X position. + * Use ui.positionY to get mouse Y position. + */ + seriesMouseEnter?: SeriesMouseEnterEvent; + + /** + * Occurs when the left mouse pointer leaves an element of this chart. + * Function takes arguments evt and ui. + * Use ui.item to get reference to current series item object. + * Use ui.chart to get reference to chart object. + * Use ui.series to get reference to current series object. + * Use ui.actualItemBrush to get item brush. + * Use ui.actualSeriesBrush to get series brush. + * Use ui.positionX to get mouse X position. + * Use ui.positionY to get mouse Y position. + */ + seriesMouseLeave?: SeriesMouseLeaveEvent; + + /** + * Occurs just after the current Chart's window rectangle is changed. + * Function takes arguments evt and ui. + * Use ui.chart to get reference to chart object. + * Use ui.newHeight to get new height value. + * Use ui.newLeft to get new left value. + * Use ui.newTop to get new top value. + * Use ui.newWidth to get new top value. + * Use ui.oldHeight to get old height value. + * Use ui.oldLeft to get old left value. + * Use ui.oldTop to get old top value. + * Use ui.oldWidth to get old top value. + */ + windowRectChanged?: WindowRectChangedEvent; + + /** + * Occurs just after the current Chart's grid area rectangle is changed. + * The grid area may change as the result of the Chart being resized, or + * of an axis being added or changing size, possibly in another Chart. + * Function takes arguments evt and ui. + * Use ui.chart to get reference to chart object. + * Use ui.newHeight to get new height value. + * Use ui.newLeft to get new left value. + * Use ui.newTop to get new top value. + * Use ui.newWidth to get new top value. + * Use ui.oldHeight to get old height value. + * Use ui.oldLeft to get old left value. + * Use ui.oldTop to get old top value. + * Use ui.oldWidth to get old top value. + */ + gridAreaRectChanged?: GridAreaRectChangedEvent; + + /** + * Raised when the chart's processing for an update has completed. + * Function takes arguments evt and ui. + * Use ui.chart to get reference to chart object. + */ + refreshCompleted?: RefreshCompletedEvent; + + /** + * Event fired when the range of and axis on the chart changes. + * Function takes arguments evt and ui. + * Use ui.axis to get reference to current chart axis object. + * Use ui.chart to get reference to chart object. + * Use ui.newMaximumValue to get new maximum value. + * Use ui.newMinimumValue to get new minimum value. + * Use ui.oldMaximumValue to get old maximum value. + * Use ui.oldMinimumValue to get old minimum value. + */ + axisRangeChanged?: AxisRangeChangedEvent; + + /** + * Handle this event in order to specify which columns the Typical price calculation is based on. + * Function takes arguments evt and ui. + * Use ui.chart to get reference to chart object. + * Use ui.series to get reference to current series object. + * Use ui.count to get the number of positions that should be calculated from the start. + * Use ui.position to get the beginning position that should be calculated from. + * Use ui.supportingCalculations to get the supporting calculations to use in the calculation. + * Use ui.dataSource to get the data to use for the calculation. + * Use ui.basedOn to specify which columns changing will invalidate the series and cause it to be recalculated. + */ + typicalBasedOn?: TypicalBasedOnEvent; + + /** + * Event fired when the progressive loading state of the series has changed. + * Function takes arguments evt and ui. + * Use ui.chart to get reference to chart object. + * Use ui.series to get reference to current series object. + * Use ui.currentStatus to get current status. + */ + progressiveLoadStatusChanged?: ProgressiveLoadStatusChangedEvent; + + /** + * Event fired to allow you to override the style of items in a category or financial series. Only fires if you set allowCustomCategoryStyle to true for a series. + * Function takes arguments evt and ui. + * Use ui.chart to get reference to chart object. + * Use ui.series to get reference to current series object. + * Use ui.startIndex to get the start index for the current items. + * Use ui.endIndex to get the end index for the current items. + * Use ui.hasDateRange to tell if you should use the startDate and endDate to know the current items instead of startIndex/endIndex. + * Use ui.startDate if ui.hasDateRange is true. + * Use ui.endDate if ui.hasDateRange is true. + * Use ui.getItems to get all the items associated with the event (only if necessary). + * Use ui.fill to get or set the fill to use for the current item. + * Use ui.stroke to get or set the stroke to use for the current item. + * Use ui.opacity to get or set the opacity to use for the current item. + * Use ui.highlightingHandled to set if the default highlighting behavior should not run, given that you are handling it in this event. + * Use ui.maxAllSeriesHighlightingProgress to get the maximum highlighted progress across all series. + * Use ui.sumAllSeriesHighlightingProgress to get the sum of highlighting progtess across all series. + * Use ui.highlightingInfo.progress to tell what the highlighting progress is for the current item, if highlightingInfo is not null. + * Use ui.highlightingInfo.state to tell whether the current item is currently highlighting in or out, is static, if highlightingInfo is not null. + */ + assigningCategoryStyle?: AssigningCategoryStyleEvent; + + /** + * Event fired to allow you to override the style of markers for the items in a category or financial series. Only fires if you set allowCustomCategoryMarkerStyle to true for a series. + * Function takes arguments evt and ui. + * Use ui.chart to get reference to chart object. + * Use ui.series to get reference to current series object. + * Use ui.startIndex to get the start index for the current items. + * Use ui.endIndex to get the end index for the current items. + * Use ui.hasDateRange to tell if you should use the startDate and endDate to know the current items instead of startIndex/endIndex. + * Use ui.startDate if ui.hasDateRange is true. + * Use ui.endDate if ui.hasDateRange is true. + * Use ui.getItems to get all the items associated with the event (only if necessary). + * Use ui.fill to get or set the fill to use for the current item. + * Use ui.stroke to get or set the stroke to use for the current item. + * Use ui.opacity to get or set the opacity to use for the current item. + * Use ui.highlightingHandled to set if the default highlighting behavior should not run, given that you are handling it in this event. + * Use ui.maxAllSeriesHighlightingProgress to get the maximum highlighted progress across all series. + * Use ui.sumAllSeriesHighlightingProgress to get the sum of highlighting progtess across all series. + * Use ui.highlightingInfo.progress to tell what the highlighting progress is for the current item, if highlightingInfo is not null. + * Use ui.highlightingInfo.state to tell whether the current item is currently highlighting in or out, is static, if highlightingInfo is not null. + */ + assigningCategoryMarkerStyle?: AssigningCategoryMarkerStyleEvent; + + /** + * Option for igDataChart + */ + [optionName: string]: any; +} +interface IgDataChartMethods { + option(): void; + + /** + * Returns the element holding the chart. + */ + widget(): void; + + /** + * Returns the ID of parent element holding the chart. + */ + id(): string; + + /** + * Exports the chart to a PNG image. + * + * @param width The width of the image. + * @param height The height of the image. + */ + exportImage(width?: Object, height?: Object): Object; + + /** + * Destroys the widget. + */ + destroy(): void; + + /** + * Notify the chart that styles it draws colors from may have been updated. + */ + styleUpdated(): Object; + + /** + * Resets the zoom level of the chart to default. + */ + resetZoom(): Object; + + /** + * Adds a new item to the data source and notifies the chart. + * + * @param item The item that we want to add to the data source. + * @param targetName The name of the series or axis bound to the data source. This is required only when the data is bound to series or axis. If the data is bound to dataSource of igDataChart, the second parameter should not be set. + */ + addItem(item: Object, targetName: string): void; + + /** + * Inserts a new item to the data source and notifies the chart. + * + * @param item the new item that we want to insert in the data source. + * @param index The index in the data source where the new item will be inserted. + * @param targetName The name of the series or axis bound to the data source. + */ + insertItem(item: Object, index: number, targetName: string): void; + + /** + * Deletes an item from the data source and notifies the chart. + * + * @param index The index in the data source from where the item will be been removed. + * @param targetName The name of the series or axis bound to the data source. This is required only when the data is bound to series or axis. If the data is bound to dataSource of igDataChart, the second parameter should not be set. + */ + removeItem(index: number, targetName: string): void; + + /** + * Updates an item in the data source and notifies the chart. + * + * @param index The index of the item in the data source that we want to change. + * @param item The new item object that will be set in the data source. + * @param targetName The name of the series or axis bound to the data source. + */ + setItem(index: number, item: Object, targetName: string): void; + + /** + * Notifies the chart that an item has been set in an associated data source. + * + * @param dataSource The data source in which the change happened. + * @param index The index in the items source that has been changed. + * @param newItem the new item that has been set in the collection. + * @param oldItem the old item that has been overwritten in the collection. + */ + notifySetItem(dataSource: Object, index: number, newItem: Object, oldItem: Object): Object; + + /** + * Notifies the chart that the items have been cleared from an associated data source. + * It's not necessary to notify more than one target of a change if they share the same items source. + * + * @param dataSource The data source in which the change happened. + */ + notifyClearItems(dataSource: Object): Object; + + /** + * Notifies the target axis or series that an item has been inserted at the specified index in its data source. + * It's not necessary to notify more than one target of a change if they share the same items source. + * + * @param dataSource The data source in which the change happened. + * @param index The index in the items source where the new item has been inserted. + * @param newItem the new item that has been set in the collection. + */ + notifyInsertItem(dataSource: Object, index: number, newItem: Object): Object; + + /** + * Notifies the target axis or series that an item has been removed from the specified index in its data source. + * It's not necessary to notify more than one target of a change if they share the same items source. + * + * @param dataSource The data source in which the change happened. + * @param index The index in the items source from where the old item has been removed. + * @param oldItem the old item that has been removed from the collection. + */ + notifyRemoveItem(dataSource: Object, index: number, oldItem: Object): Object; + + /** + * Notifies the target axis or series that it should scroll the requested data item into view. + * + * @param targetName The name of the axis or series notify. + * @param item The data item to bring into view, if possible. + */ + scrollIntoView(targetName: string, item: Object): Object; + + /** + * Notifies the target axis that it should scale the requested value into chart space from axis space. + * For example you can use this method if you want to find where value 50 of the x axis stands scaled to chart's width. + * + * @param targetName The name of the axis to notify. + * @param unscaledValue The value in axis space to translate into chart space. + */ + scaleValue(targetName: string, unscaledValue: number): number; + + /** + * Notifies the target axis that it should unscale the requested value into axis space from chart space. + * For example you can use this method if you want to find what is the value of x axis unscaled from 0 width of the chart. + * + * @param targetName The name of the axis to notify. + * @param scaledValue The value in chart space to translate into axis space. + */ + unscaleValue(targetName: string, scaledValue: number): number; + + /** + * For the target axis, if using enhanced interval management and precise interval fitting, this will reset the cached maximum label width, and recalculate using the current labels. + * + * @param targetName The name of the axis to notify. + */ + resetCachedEnhancedInterval(targetName: string): Object; + + /** + * Notifies the target series that something that affects its visual properties has changed and the visual output needs a repaint. + * + * @param targetName The name of the series to notify. + */ + notifyVisualPropertiesChanged(targetName: string): Object; + + /** + * Forces any pending deferred work to render on the chart before continuing + */ + flush(): void; + + /** + * Exports visual data from the chart to aid in unit testing + */ + exportVisualData(): void; + + /** + * Gets the actual minimum value of the target numeric or date time axis + * + * @param targetName The name of the axis from which to get the minimum value. + */ + getActualMinimumValue(targetName: string): void; + + /** + * Gets the actual maximum value of the target numeric or date time axis + * + * @param targetName The name of the axis from which to get the maximum value. + */ + getActualMaximumValue(targetName: string): void; + + /** + * Creates a print preview page with the chart, hiding all other elements on the page. + */ + print(): void; + + /** + * Indicates that a series should render, even though no option has been modified that would normally cause it to refresh. + * + * @param targetName The name of the series to render. + * @param animate Whether the change should be animated, if possible. + */ + renderSeries(targetName: string, animate: boolean): void; + + /** + * Gets the item item index associated with the specified world position. + * + * @param targetName The name of the series to target. + * @param worldPoint The world position (in the form {x: [number from 0 to 1], y: [number from 0 to 1]} ) that represents a position in the space of the axes. + */ + getItemIndex(targetName: string, worldPoint: Object): number; + + /** + * Gets the item that is the best match for the specified world coordinates. + * + * @param targetName The name of the series to target. + * @param worldPoint The world position (in the form {x: [number from 0 to 1], y: [number from 0 to 1]} ) that represents a position in the space of the axes. + */ + getItem(targetName: string, worldPoint: Object): Object; + + /** + * For a category plotted series, gets the current width of the items within the categories. This only returns a value if the items have some form of width (e.g. columns, bars, etc.) otherwise 0 is returned. + * + * @param targetName The name of the series to target. + */ + getItemSpan(targetName: string): number; + + /** + * If possible, will return the best available main value of the series for a given world coordinate. + * + * @param targetName The name of the series to target. + * @param worldPoint The world position (in the form {x: [number from 0 to 1], y: [number from 0 to 1]} ) that represents a position in the space of the axes. + * @param useInterpolation If true, interpolation should be used to get in-between values, rather than only the actual values in the data set. + * @param skipUnknowns If true, unknown values should be skipped. + */ + getSeriesValue(targetName: string, worldPoint: Object, useInterpolation: boolean, skipUnknowns: boolean): number; + + /** + * If possible, will return the best available value bounding box within the series that has the best value match for the world position provided. + * + * @param targetName The name of the series to target. + * @param worldPoint The world position (in the form {x: [number from 0 to 1], y: [number from 0 to 1]} ) that represents a position in the space of the axes. + */ + getSeriesValueBoundingBox(targetName: string, worldPoint: Object): Object; + + /** + * If possible, will return the best available value fine grained bounding boxes within the series that have the best value match for the world position provided. + * + * @param targetName The name of the series to target. + * @param worldPoint The world position (in the form {x: [number from 0 to 1], y: [number from 0 to 1]} ) that represents a position in the space of the axes. + */ + getSeriesValueFineGrainedBoundingBoxes(targetName: string, worldPoint: Object): Object; + + /** + * If possible, will return the best available main value position of the series for a given world coordinate. + * + * @param targetName The name of the series to target. + * @param worldPoint The world position (in the form {x: [number from 0 to 1], y: [number from 0 to 1]} ) that represents a position in the space of the axes. + * @param useInterpolation If true, interpolation should be used to get in-between values, rather than only the actual values in the data set. + * @param skipUnknowns If true, unknown values should be skipped. + */ + getSeriesValuePosition(targetName: string, worldPoint: Object, useInterpolation: boolean, skipUnknowns: boolean): Object; + + /** + * If possible, will return the best available main value position of the series for a given world coordinate. + * + * @param targetName The name of the series to target. + * @param seriesPoint The series pixel position (in the form {x: [number], y: [number]} that represents a position within the pixel space of the series. + * @param useInterpolation If true, interpolation should be used to get in-between values, rather than only the actual values in the data set. + * @param skipUnknowns If true, unknown values should be skipped. + */ + getSeriesValuePositionFromSeriesPixel(targetName: string, seriesPoint: Object, useInterpolation: boolean, skipUnknowns: boolean): Object; + + /** + * If possible, will return the best available main value of the series for a given world coordinate. + * + * @param targetName The name of the series to target. + * @param seriesPoint The series pixel position (in the form {x: [number], y: [number]} ) that represents a position in the pixel space of the series. + * @param useInterpolation If true, interpolation should be used to get in-between values, rather than only the actual values in the data set. + * @param skipUnknowns If true, unknown values should be skipped. + */ + getSeriesValueFromSeriesPixel(targetName: string, seriesPoint: Object, useInterpolation: boolean, skipUnknowns: boolean): number; + + /** + * If possible, will return the best available value bounding box within the series that has the best value match for the given series pixel coordinate. + * + * @param targetName The name of the series to target. + * @param seriesPoint The series pixel position (in the form {x: [number], y: [number]} ) that represents a position in the pixel space of the series. + */ + getSeriesValueBoundingBoxFromSeriesPixel(targetName: string, seriesPoint: Object): Object; + + /** + * If possible, will return the best available value fine grained bounding boxes within the series that have the best value match for series pixel position provided. + * + * @param targetName The name of the series to target. + * @param worldPoint The series pixel position (in the form {x: [number], y: [number]} ) that represents a position in the pixel space of the series. + */ + getSeriesValueFineGrainedBoundingBoxesFromSeriesPixel(targetName: string, worldPoint: Object): Object; + + /** + * If possible, will return the best available high value of the series for a given world coordinate. + * + * @param targetName The name of the series to target. + * @param worldPoint The world position (in the form {x: [number from 0 to 1], y: [number from 0 to 1]} ) that represents a position in the space of the axes. + * @param useInterpolation If true, interpolation should be used to get in-between values, rather than only the actual values in the data set. + * @param skipUnknowns If true, unknown values should be skipped. + */ + getSeriesHighValue(targetName: string, worldPoint: Object, useInterpolation: boolean, skipUnknowns: boolean): number; + + /** + * If possible, will return the best available high value position of the series for a given world coordinate. + * + * @param targetName The name of the series to target. + * @param worldPoint The world position (in the form {x: [number from 0 to 1], y: [number from 0 to 1]} ) that represents a position in the space of the axes. + * @param useInterpolation If true, interpolation should be used to get in-between values, rather than only the actual values in the data set. + * @param skipUnknowns If true, unknown values should be skipped. + */ + getSeriesHighValuePosition(targetName: string, worldPoint: Object, useInterpolation: boolean, skipUnknowns: boolean): Object; + + /** + * If possible, will return the best available high value position of the series for a given world coordinate. + * + * @param targetName The name of the series to target. + * @param seriesPoint The series pixel position (in the form {x: [number], y: [number]} that represents a position within the pixel space of the series. + * @param useInterpolation If true, interpolation should be used to get in-between values, rather than only the actual values in the data set. + * @param skipUnknowns If true, unknown values should be skipped. + */ + getSeriesHighValuePositionFromSeriesPixel(targetName: string, seriesPoint: Object, useInterpolation: boolean, skipUnknowns: boolean): Object; + + /** + * If possible, will return the best available high value of the series for a given world coordinate. + * + * @param targetName The name of the series to target. + * @param seriesPoint The series pixel position (in the form {x: [number], y: [number]} ) that represents a position in the pixel space of the series. + * @param useInterpolation If true, interpolation should be used to get in-between values, rather than only the actual values in the data set. + * @param skipUnknowns If true, unknown values should be skipped. + */ + getSeriesHighValueFromSeriesPixel(targetName: string, seriesPoint: Object, useInterpolation: boolean, skipUnknowns: boolean): number; + + /** + * If possible, will return the best available low value of the series for a given world coordinate. + * + * @param targetName The name of the series to target. + * @param worldPoint The world position (in the form {x: [number from 0 to 1], y: [number from 0 to 1]} ) that represents a position in the space of the axes. + * @param useInterpolation If true, interpolation should be used to get in-between values, rather than only the actual values in the data set. + * @param skipUnknowns If true, unknown values should be skipped. + */ + getSeriesLowValue(targetName: string, worldPoint: Object, useInterpolation: boolean, skipUnknowns: boolean): number; + + /** + * If possible, will return the best available low value position of the series for a given world coordinate. + * + * @param targetName The name of the series to target. + * @param worldPoint The world position (in the form {x: [number from 0 to 1], y: [number from 0 to 1]} ) that represents a position in the space of the axes. + * @param useInterpolation If true, interpolation should be used to get in-between values, rather than only the actual values in the data set. + * @param skipUnknowns If true, unknown values should be skipped. + */ + getSeriesLowValuePosition(targetName: string, worldPoint: Object, useInterpolation: boolean, skipUnknowns: boolean): Object; + + /** + * If possible, will return the best available low value position of the series for a given world coordinate. + * + * @param targetName The name of the series to target. + * @param seriesPoint The series pixel position (in the form {x: [number], y: [number]} that represents a position within the pixel space of the series. + * @param useInterpolation If true, interpolation should be used to get in-between values, rather than only the actual values in the data set. + * @param skipUnknowns If true, unknown values should be skipped. + */ + getSeriesLowValuePositionFromSeriesPixel(targetName: string, seriesPoint: Object, useInterpolation: boolean, skipUnknowns: boolean): Object; + + /** + * If possible, will return the best available low value of the series for a given world coordinate. + * + * @param targetName The name of the series to target. + * @param seriesPoint The series pixel position (in the form {x: [number], y: [number]} ) that represents a position in the pixel space of the series. + * @param useInterpolation If true, interpolation should be used to get in-between values, rather than only the actual values in the data set. + * @param skipUnknowns If true, unknown values should be skipped. + */ + getSeriesLowValueFromSeriesPixel(targetName: string, seriesPoint: Object, useInterpolation: boolean, skipUnknowns: boolean): number; + + /** + * Gets the item item index associated with the specified series pixel coordinate. + * + * @param targetName The name of the series to target. + * @param seriesPoint The world position (in the form {x: [number from 0 to 1], y: [number from 0 to 1]} ) that represents a position in the space of the axes. + */ + getItemIndexFromSeriesPixel(targetName: string, seriesPoint: Object): number; + + /** + * Gets the item that is the best match for the specified world coordinates. + * + * @param targetName The name of the series to target. + * @param seriesPoint The series pixel position (in the form {x: [number], y: [number]} ) that represents a position in the pixel space of the series. + */ + getItemFromSeriesPixel(targetName: string, seriesPoint: Object): Object; + + /** + * Gets the category offset for a series, if applicable. + * + * @param targetName The name of the series to target. + */ + getSeriesOffsetValue(targetName: string): number; + + /** + * Gets the category width for a series, if applicable. + * + * @param targetName The name of the series to target. + */ + getSeriesCategoryWidth(targetName: string): number; + + /** + * Replays the transition in animation for a series, if applicable. + * + * @param targetName The name of the series to target. + */ + replayTransitionIn(targetName: string): Object; + + /** + * Simulates a hover interaction over a given point in the viewport of a series. + * + * @param targetName The name of the series to target. + * @param seriesPoint The point at which to hover. Should have an x property with type number and a y property with type number. + */ + simulateHover(targetName: string, seriesPoint: Object): Object; + + /** + * Moves the cursor point of the target annotation layer to the desired world coordinates. + * + * @param targetName The name of the series to target. + * @param worldPoint The point to which to move the cursor. Should have an x property with type number and a y property with type number. + */ + moveCursorPoint(targetName: string, worldPoint: Object): Object; + + /** + * Manually starts a tiled zoom if one isn't already running. + */ + startTiledZoomingIfNecessary(): void; + + /** + * Manually ends a tiled zoom if one is running. + */ + endTiledZoomingIfRunning(): void; + + /** + * Clears the tile zoom tile cache so that new tiles will be generated. Only applies if the viewer is using a tile based zoom. + */ + clearTileZoomCache(): void; +} +interface JQuery { + data(propertyName: "igDataChart"): IgDataChartMethods; +} + +interface IgPieChartLegend { + /** + * The name of the element to turn into a legend. + */ + element?: string; + + /** + * Type of the legend. + * + * Valid values: + * "item" Specify the legend as item legend. It displays a legend item for each pie in the igPieChart control. + * "legend" Specify the legend as legend. It is supported by all types of series in the igDataChart control. + */ + type?: string; + + /** + * The width of the legend. It can be set as a number in pixels, string (px) or percentage (%). + */ + width?: number; + + /** + * The height of the legend. It can be set as a number in pixels, string (px) or percentage (%). + */ + height?: number; + + /** + * Option for IgPieChartLegend + */ + [optionName: string]: any; +} + +interface SliceClickEvent { + (event: Event, ui: SliceClickEventUIParam): void; +} + +interface SliceClickEventUIParam { + /** + * Used to get reference to chart object. + */ + chart?: any; + + /** + * Used to get reference to slice object. + */ + slice?: any; +} + +interface LabelClickEvent { + (event: Event, ui: LabelClickEventUIParam): void; +} + +interface LabelClickEventUIParam { + /** + * Used to get reference to the slice object. + */ + item?: any; + + /** + * Used to determine whether or not the label click should fire slice click event. + */ + allowSliceClick?: any; +} + +interface SelectedItemChangingEvent { + (event: Event, ui: SelectedItemChangingEventUIParam): void; +} + +interface SelectedItemChangingEventUIParam { + /** + * Used to get a reference to the current selected data item. + */ + oldItem?: any; + + /** + * Used to get a reference to the newly selected data item. + */ + newItem?: any; + + /** + * Used to stop the selected item from changing. + */ + cancel?: any; +} + +interface SelectedItemChangedEvent { + (event: Event, ui: SelectedItemChangedEventUIParam): void; +} + +interface SelectedItemChangedEventUIParam { + /** + * Used to get a reference to the previous selected data item. + */ + oldItem?: any; + + /** + * Used to get a reference to the current selected data item. + */ + newItem?: any; +} + +interface SelectedItemsChangingEvent { + (event: Event, ui: SelectedItemsChangingEventUIParam): void; +} + +interface SelectedItemsChangingEventUIParam { + /** + * Used to get a reference to the current selected data items. + */ + oldItems?: any; + + /** + * Used to get a reference to the newly selected data items. + */ + newItems?: any; + + /** + * Used to stop the selected items from changing. + */ + cancel?: any; +} + +interface SelectedItemsChangedEvent { + (event: Event, ui: SelectedItemsChangedEventUIParam): void; +} + +interface SelectedItemsChangedEventUIParam { + /** + * Used to get a reference to the previous selected data items. + */ + oldItems?: any; + + /** + * Used to get a reference to the current selected data items. + */ + newItems?: any; +} + +interface IgPieChart { + /** + * The width of the chart. It can be set as a number in pixels, string (px) or percentage (%). + */ + width?: string|number; + + /** + * The height of the chart. It can be set as a number in pixels, string (px) or percentage (%). + */ + height?: string|number; + + /** + * Can be any valid data source accepted by $.ig.DataSource, or an instance of an $.ig.DataSource itself + */ + dataSource?: any; + + /** + * Specifies a remote URL accepted by $.ig.DataSource in order to request data from it + */ + dataSourceUrl?: string; + + /** + * Explicitly set data source type (such as "json"). Please refer to the documentation of $.ig.DataSource and its type property. + */ + dataSourceType?: string; + + /** + * See $.ig.DataSource. Specifies the name of the property in which data records are held if the response is wrapped. + */ + responseDataKey?: string; + + /** + * Gets or Sets the property name that contains the values. This option is deprecated - please use `dataValue` instead. + */ + valueMemberPath?: string; + + /** + * Gets or sets the property name that contains the labels. This option is deprecated - please use `dataLabel` instead. + */ + labelMemberPath?: string; + + /** + * Gets or Sets the property name that contains the values. + */ + dataValue?: string; + + /** + * Gets or sets the property name that contains the labels. + */ + dataLabel?: string; + + /** + * Gets or sets the position of chart labels. + * + * + * Valid values: + * "none" No labels will be displayed. + * "center" Labels will be displayed in the center. + * "insideEnd" Labels will be displayed inside and by the edge of the container. + * "outsideEnd" Labels will be displayed outside the container. + * "bestFit" Labels will automatically decide their location. + */ + labelsPosition?: string; + + /** + * Gets or sets the color for labels rendered outside of the pie chart. If no color is provided then + * the chart will attempt to find the colors in CSS. If that is not available it will use a default color. + */ + labelOuterColor?: string; + + /** + * Gets or sets the color for labels rendered inside of the pie chart. If no color is provided then + * the chart will attempt to find the colors in CSS. If that is not available it will use a default color. + */ + labelInnerColor?: string; + + /** + * Gets or sets the type of selection the pie chart allows. + * + * + * Valid values: + * "single" A single slice is allowed to be selected. + * "multiple" Multiple slices are allowed to be selected. + * "manual" Slices can only be selected programmatically. + */ + selectionMode?: string; + + /** + * Gets or sets the currently selected data item. If a different data item is provided the pie chart + * will select the slice associated with the new item. + */ + selectedItem?: any; + + /** + * Gets or sets the currently selected data items. Adding or removing data items from this array will + * select or deselect the slices associated with those items. + */ + selectedItems?: any[]; + + /** + * Gets or sets whether the leader lines are visible. + * + * + * Valid values: + * "visible" + * "collapsed" + */ + leaderLineVisibility?: string; + + /** + * Gets or sets what type of leader lines will be used for the outside end labels. + * + * + * Valid values: + * "straight" + * "arc" + * "spline" + */ + leaderLineType?: string; + + /** + * Gets or sets the margin between a label and the end of its leader line. + */ + leaderLineMargin?: number; + + /** + * Gets or sets the threshold value that determines if slices are grouped into the Others slice. + */ + othersCategoryThreshold?: number; + + /** + * Gets or sets the function to use to transform a pie slice data context into a label for the slice. Function takes one argument of type object. + * Use context.item to get the item associated with the slice, if any. + * Use context.outline to get the outline brush used to paint the slice. + * Use context.itemLabel to get the label object that would be used for the slice. + * Use context.percentValue to see the percentage value that is associated with the slice. + * Use context.isOthersSlice to tell if the associated slice is the others slice. + * Should return a string value that should be used for the label. + */ + formatLabel?: Function; + + /** + * Gets or sets a style object that can be used to override the style settings on the others category slice. + */ + othersCategoryStyle?: any; + + /** + * Gets or sets whether to use numeric or percent-based threshold value. + * + * Valid values: + * "number" Data value is compared directly to the value of OthersCategoryThreshold. + * "percent" Data value is compared to OthersCategoryThreshold as a percentage of the total. + */ + othersCategoryType?: string; + + /** + * Gets or sets the label of the Others slice. + */ + othersCategoryText?: string; + + /** + * Determines how much the exploded slice is offset from the center. Value between 0 and 1. + */ + explodedRadius?: number; + + /** + * Gets or sets the scaling factor of the chart's radius. Value between 0 and 1. + */ + radiusFactor?: number; + + /** + * Gets or sets whether the slices can be selected. + */ + allowSliceSelection?: boolean; + + /** + * Gets or sets whether the slices can be exploded. + */ + allowSliceExplosion?: boolean; + + /** + * Gets or sets the collection of exploded slice indices. + * Should be an array of integers that indicate the indexes of the slices to explode. + */ + explodedSlices?: any[]; + + /** + * Sets the collection of selected slice indices. + * Should be an array of integers that indicate the indexes of the slices to select. + */ + selectedSlices?: any[]; + + /** + * Whether the chart should render a tooltip. + */ + showTooltip?: boolean; + + /** + * The name of template or the template itself that chart tooltip will use to render. + */ + tooltipTemplate?: string; + + /** + * Can be any valid options accepted by $.ig.ChartLegend, or an instance of an $.ig.ChartLegend itself. + */ + legend?: IgPieChartLegend; + + /** + * Gets or sets the pixel amount, by which the labels are offset from the edge of the slices. + */ + labelExtent?: number; + + /** + * Gets or sets the starting angle of the chart. + * The default zero value is equivalent to 3 o'clock. + */ + startAngle?: number; + + /** + * Gets or sets the rotational direction of the chart. + * + * + * Valid values: + * "counterclockwise" + * "clockwise" + */ + sweepDirection?: string; + + /** + * Gets or sets the style used when a slice is selected. + */ + selectedStyle?: any; + + /** + * Gets or sets the Brushes property. + * The brushes property defines the palette from which automatically assigned slice brushes are selected. + * The value provided should be an array of css color strings. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + brushes?: any; + + /** + * Gets or sets the Outlines property. + * The Outlines property defines the palette from which automatically assigned slice outlines are selected. + * The value provided should be an array of css color strings. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + outlines?: any; + + /** + * Gets or sets the LegendItemTemplate property. + * The legend item control content is created according to the LegendItemTemplate on-demand by + * the chart object itself. + * The provided object should have properties called render and optionally measure. See definition for option: legendItemBadgeTemplate + */ + legendItemTemplate?: any; + + /** + * Gets or sets the LegendItemBadgeTemplate property. + * The legend item badge is created according to the LegendItemBadgeTemplate on-demand by + * the chart object itself. + * The provided object should have properties called render and optionally measure. See definition for option: legendItemBadgeTemplate + */ + legendItemBadgeTemplate?: any; + + /** + * Overrides the style used for text in the pie chart. + */ + textStyle?: string; + + /** + * The swatch used to style this widget + */ + theme?: string; + + /** + * Event fired when the mouse has hovered on an element long enough to display a tooltip + * Function takes arguments evt and ui. + * Use ui.element to get reference to tooltip DOM element. + * Use ui.item to get reference to current pie chart item. + * Use ui.chart to get reference to chart object. + */ + tooltipShowing?: TooltipShowingEvent; + + /** + * Event fired after a tooltip is shown + * Function takes arguments evt and ui. + * Use ui.element to get reference to tooltip DOM element. + * Use ui.item to get reference to current pie chart item. + * Use ui.chart to get reference to chart object. + */ + tooltipShown?: TooltipShownEvent; + + /** + * Event fired when the mouse has left an element and the tooltip is about to hide + * Function takes arguments evt and ui. + * Use ui.element to get reference to tooltip DOM element. + * Use ui.item to get reference to current pie chart item. + * Use ui.chart to get reference to chart object. + */ + tooltipHiding?: TooltipHidingEvent; + + /** + * Event fired after a tooltip is hidden + * Function takes arguments evt and ui. + * Use ui.element to get reference to tooltip DOM element. + * Use ui.item to get reference to current pie chart item. + * Use ui.chart to get reference to chart object. + */ + tooltipHidden?: TooltipHiddenEvent; + + /** + * Event fired when the control is displayed on a non HTML5 compliant browser + */ + browserNotSupported?: BrowserNotSupportedEvent; + + /** + * Raised when the slice is clicked. + * Function takes arguments evt and ui. + * Use ui.chart to get reference to chart object. + * Use ui.slice to get reference to slice object. + * Use ui.slice.item to get reference to current pie chart item. + * Use ui.slice.isExploded to get is the slice exploded. + * Use ui.slice.isSelected to get is the slice selected. + */ + sliceClick?: SliceClickEvent; + + /** + * Raised when a slice's label is clicked. + * Function takes arguments evt and ui. + * Use ui.item to get reference to the slice object. + * Use ui.allowSliceClick to determine whether or not the label click should fire slice click event. + */ + labelClick?: LabelClickEvent; + + /** + * Event fired when the selectedItem option is about to change. + * Function takes arguments evt and ui. + * Use ui.oldItem to get a reference to the current selected data item. + * Use ui.newItem to get a reference to the newly selected data item. + * Use ui.cancel to stop the selected item from changing. + */ + selectedItemChanging?: SelectedItemChangingEvent; + + /** + * Event fired when the selectedItem option has changed. + * Function takes arguments evt and ui. + * Use ui.oldItem to get a reference to the previous selected data item. + * Use ui.newItem to get a reference to the current selected data item. + */ + selectedItemChanged?: SelectedItemChangedEvent; + + /** + * Event fired when the selectedItems array is about to change. + * Function takes arguments evt and ui. + * Use ui.oldItems to get a reference to the current selected data items. + * Use ui.newItems to get a reference to the newly selected data items. + * Use ui.cancel to stop the selected items from changing. + */ + selectedItemsChanging?: SelectedItemsChangingEvent; + + /** + * Event fired when the selectedItems array has changed. + * Function takes arguments evt and ui. + * Use ui.oldItems to get a reference to the previous selected data items. + * Use ui.newItems to get a reference to the current selected data items. + */ + selectedItemsChanged?: SelectedItemsChangedEvent; + + /** + * Option for igPieChart + */ + [optionName: string]: any; +} +interface IgPieChartMethods { + option(): void; + + /** + * Adds a new item to the data source and notifies the chart. + * + * @param item the new item that will be added to the data source. + */ + addItem(item: Object): void; + + /** + * Inserts a new item to the data source and notifies the chart. + * + * @param item the new item that will be inserted in the data source. + * @param index The index in the data source where the new item will be inserted. + */ + insertItem(item: Object, index: number): void; + + /** + * Deletes an item from the data source and notifies the chart. + * + * @param index The index in the data source from where the item will be been removed. + */ + removeItem(index: number): void; + + /** + * Updates an item in the data source and notifies the chart. + * + * @param index The index in the data source that we want to change. + * @param item the new item that we want to set in the data source. + */ + setItem(index: number, item: Object): void; + + /** + * Exports the chart to a PNG image. + * + * @param width The width of the image. + * @param height The height of the image. + */ + exportImage(width?: Object, height?: Object): Object; + + /** + * Destroys the widget. + */ + destroy(): void; + + /** + * Returns the ID of parent element holding the chart. + */ + id(): string; + + /** + * Returns the element holding the chart. + */ + widget(): void; + + /** + * Creates a print preview page with the chart, hiding all other elements on the page. + */ + print(): void; + + /** + * Exports visual data from the pie chart to aid in unit testing + */ + exportVisualData(): void; +} +interface JQuery { + data(propertyName: "igPieChart"): IgPieChartMethods; +} + +interface JQuery { + igDataChart(methodName: "option"): void; + igDataChart(methodName: "widget"): void; + igDataChart(methodName: "id"): string; + igDataChart(methodName: "exportImage", width?: Object, height?: Object): Object; + igDataChart(methodName: "destroy"): void; + igDataChart(methodName: "styleUpdated"): Object; + igDataChart(methodName: "resetZoom"): Object; + igDataChart(methodName: "addItem", item: Object, targetName: string): void; + igDataChart(methodName: "insertItem", item: Object, index: number, targetName: string): void; + igDataChart(methodName: "removeItem", index: number, targetName: string): void; + igDataChart(methodName: "setItem", index: number, item: Object, targetName: string): void; + igDataChart(methodName: "notifySetItem", dataSource: Object, index: number, newItem: Object, oldItem: Object): Object; + igDataChart(methodName: "notifyClearItems", dataSource: Object): Object; + igDataChart(methodName: "notifyInsertItem", dataSource: Object, index: number, newItem: Object): Object; + igDataChart(methodName: "notifyRemoveItem", dataSource: Object, index: number, oldItem: Object): Object; + igDataChart(methodName: "scrollIntoView", targetName: string, item: Object): Object; + igDataChart(methodName: "scaleValue", targetName: string, unscaledValue: number): number; + igDataChart(methodName: "unscaleValue", targetName: string, scaledValue: number): number; + igDataChart(methodName: "resetCachedEnhancedInterval", targetName: string): Object; + igDataChart(methodName: "notifyVisualPropertiesChanged", targetName: string): Object; + igDataChart(methodName: "flush"): void; + igDataChart(methodName: "exportVisualData"): void; + igDataChart(methodName: "getActualMinimumValue", targetName: string): void; + igDataChart(methodName: "getActualMaximumValue", targetName: string): void; + igDataChart(methodName: "print"): void; + igDataChart(methodName: "renderSeries", targetName: string, animate: boolean): void; + igDataChart(methodName: "getItemIndex", targetName: string, worldPoint: Object): number; + igDataChart(methodName: "getItem", targetName: string, worldPoint: Object): Object; + igDataChart(methodName: "getItemSpan", targetName: string): number; + igDataChart(methodName: "getSeriesValue", targetName: string, worldPoint: Object, useInterpolation: boolean, skipUnknowns: boolean): number; + igDataChart(methodName: "getSeriesValueBoundingBox", targetName: string, worldPoint: Object): Object; + igDataChart(methodName: "getSeriesValueFineGrainedBoundingBoxes", targetName: string, worldPoint: Object): Object; + igDataChart(methodName: "getSeriesValuePosition", targetName: string, worldPoint: Object, useInterpolation: boolean, skipUnknowns: boolean): Object; + igDataChart(methodName: "getSeriesValuePositionFromSeriesPixel", targetName: string, seriesPoint: Object, useInterpolation: boolean, skipUnknowns: boolean): Object; + igDataChart(methodName: "getSeriesValueFromSeriesPixel", targetName: string, seriesPoint: Object, useInterpolation: boolean, skipUnknowns: boolean): number; + igDataChart(methodName: "getSeriesValueBoundingBoxFromSeriesPixel", targetName: string, seriesPoint: Object): Object; + igDataChart(methodName: "getSeriesValueFineGrainedBoundingBoxesFromSeriesPixel", targetName: string, worldPoint: Object): Object; + igDataChart(methodName: "getSeriesHighValue", targetName: string, worldPoint: Object, useInterpolation: boolean, skipUnknowns: boolean): number; + igDataChart(methodName: "getSeriesHighValuePosition", targetName: string, worldPoint: Object, useInterpolation: boolean, skipUnknowns: boolean): Object; + igDataChart(methodName: "getSeriesHighValuePositionFromSeriesPixel", targetName: string, seriesPoint: Object, useInterpolation: boolean, skipUnknowns: boolean): Object; + igDataChart(methodName: "getSeriesHighValueFromSeriesPixel", targetName: string, seriesPoint: Object, useInterpolation: boolean, skipUnknowns: boolean): number; + igDataChart(methodName: "getSeriesLowValue", targetName: string, worldPoint: Object, useInterpolation: boolean, skipUnknowns: boolean): number; + igDataChart(methodName: "getSeriesLowValuePosition", targetName: string, worldPoint: Object, useInterpolation: boolean, skipUnknowns: boolean): Object; + igDataChart(methodName: "getSeriesLowValuePositionFromSeriesPixel", targetName: string, seriesPoint: Object, useInterpolation: boolean, skipUnknowns: boolean): Object; + igDataChart(methodName: "getSeriesLowValueFromSeriesPixel", targetName: string, seriesPoint: Object, useInterpolation: boolean, skipUnknowns: boolean): number; + igDataChart(methodName: "getItemIndexFromSeriesPixel", targetName: string, seriesPoint: Object): number; + igDataChart(methodName: "getItemFromSeriesPixel", targetName: string, seriesPoint: Object): Object; + igDataChart(methodName: "getSeriesOffsetValue", targetName: string): number; + igDataChart(methodName: "getSeriesCategoryWidth", targetName: string): number; + igDataChart(methodName: "replayTransitionIn", targetName: string): Object; + igDataChart(methodName: "simulateHover", targetName: string, seriesPoint: Object): Object; + igDataChart(methodName: "moveCursorPoint", targetName: string, worldPoint: Object): Object; + igDataChart(methodName: "startTiledZoomingIfNecessary"): void; + igDataChart(methodName: "endTiledZoomingIfRunning"): void; + igDataChart(methodName: "clearTileZoomCache"): void; + + /** + * Gets whether the series viewer can allow the page to pan if a control pan is not possible in the requested direction. + */ + igDataChart(optionLiteral: 'option', optionName: "isPagePanningAllowed"): boolean; + + /** + * Sets whether the series viewer can allow the page to pan if a control pan is not possible in the requested direction. + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "isPagePanningAllowed", optionValue: boolean): void; + + /** + * The channel name to use to sync this chart with other charts. + */ + igDataChart(optionLiteral: 'option', optionName: "syncChannel"): string; + + /** + * The channel name to use to sync this chart with other charts. + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "syncChannel", optionValue: string): void; + + /** + * Whether the chart should be synchronized vertically + */ + igDataChart(optionLiteral: 'option', optionName: "synchronizeVertically"): boolean; + + /** + * Whether the chart should be synchronized vertically + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "synchronizeVertically", optionValue: boolean): void; + + /** + * Whether the chart should be synchronized horizontally + */ + igDataChart(optionLiteral: 'option', optionName: "synchronizeHorizontally"): boolean; + + /** + * Whether the chart should be synchronized horizontally + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "synchronizeHorizontally", optionValue: boolean): void; + + /** + * Gets the cross hair point (in world coordinates) + * Either or both of the crosshair point's X and Y may be set to double.NaN, in which + * case the relevant crosshair line is hidden. + */ + igDataChart(optionLiteral: 'option', optionName: "crosshairPoint"): IgDataChartCrosshairPoint; + + /** + * Sets the cross hair point (in world coordinates) + * Either or both of the crosshair point's X and Y may be set to double.NaN, in which + * case the relevant crosshair line is hidden. + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "crosshairPoint", optionValue: IgDataChartCrosshairPoint): void; + + /** + * A rectangle representing the portion of the chart currently in view. + * A rectangle at X=0, Y=0 with a Height and Width of 1 implies the entire plotting area is in view. A Height and Width of .5 would imply that the view is halfway zoomed in. + * The provided object should have numeric properties called left, top, width and height. + */ + igDataChart(optionLiteral: 'option', optionName: "windowRect"): any; + + /** + * A rectangle representing the portion of the chart currently in view. + * A rectangle at X=0, Y=0 with a Height and Width of 1 implies the entire plotting area is in view. A Height and Width of .5 would imply that the view is halfway zoomed in. + * The provided object should have numeric properties called left, top, width and height. + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "windowRect", optionValue: any): void; + + /** + * Gets the current Chart's horizontal zoomability. + */ + igDataChart(optionLiteral: 'option', optionName: "horizontalZoomable"): boolean; + + /** + * Sets the current Chart's horizontal zoomability. + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "horizontalZoomable", optionValue: boolean): void; + + /** + * Gets the current Chart's vertical zoomability. + */ + igDataChart(optionLiteral: 'option', optionName: "verticalZoomable"): boolean; + + /** + * Sets the current Chart's vertical zoomability. + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "verticalZoomable", optionValue: boolean): void; + + /** + * The response to user panning and zooming: whether to update the view immediately while the user action is happening, or to defer the update to after the user action is complete. The user action will be an action such as a mouse drag which causes panning and/or zooming to occur. + * + */ + igDataChart(optionLiteral: 'option', optionName: "windowResponse"): string; + + /** + * The response to user panning and zooming: whether to update the view immediately while the user action is happening, or to defer the update to after the user action is complete. The user action will be an action such as a mouse drag which causes panning and/or zooming to occur. + * + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "windowResponse", optionValue: string): void; + + /** + * Sets or gets the minimum width that the window rect is allowed to reach before being clamped. + * Decrease this value if you want to allow for further zooming into the viewer. + * If this value is lowered too much it can cause graphical corruption due to floating point arithmetic inaccuracy. + */ + igDataChart(optionLiteral: 'option', optionName: "windowRectMinWidth"): number; + + /** + * Sets or gets the minimum width that the window rect is allowed to reach before being clamped. + * Decrease this value if you want to allow for further zooming into the viewer. + * If this value is lowered too much it can cause graphical corruption due to floating point arithmetic inaccuracy. + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "windowRectMinWidth", optionValue: number): void; + + /** + * The visibility of the OverviewPlusDetailPane. + */ + igDataChart(optionLiteral: 'option', optionName: "overviewPlusDetailPaneVisibility"): string; + + /** + * The visibility of the OverviewPlusDetailPane. + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "overviewPlusDetailPaneVisibility", optionValue: string): void; + + /** + * Gets the current Chart's crosshair visibility override. Note: setting this property does not affect the mobile browser version of the chart. + */ + igDataChart(optionLiteral: 'option', optionName: "crosshairVisibility"): string; + + /** + * Sets the current Chart's crosshair visibility override. Note: setting this property does not affect the mobile browser version of the chart. + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "crosshairVisibility", optionValue: string): void; + + /** + * Gets the brush used as the background for the current Chart object's plot area. + */ + igDataChart(optionLiteral: 'option', optionName: "plotAreaBackground"): string; + + /** + * Sets the brush used as the background for the current Chart object's plot area. + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "plotAreaBackground", optionValue: string): void; + + /** + * Gets the DefaultInteraction property. The default interaction state defines the chart's response to mouse events. + */ + igDataChart(optionLiteral: 'option', optionName: "defaultInteraction"): string; + + /** + * Sets the DefaultInteraction property. The default interaction state defines the chart's response to mouse events. + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "defaultInteraction", optionValue: string): void; + + /** + * Gets the current Chart's DragModifier property. + */ + igDataChart(optionLiteral: 'option', optionName: "dragModifier"): string; + + /** + * Sets the current Chart's DragModifier property. + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "dragModifier", optionValue: string): void; + + /** + * Gets the current Chart's PanModifier property. + */ + igDataChart(optionLiteral: 'option', optionName: "panModifier"): string; + + /** + * Sets the current Chart's PanModifier property. + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "panModifier", optionValue: string): void; + + /** + * Gets the preview rectangle. + * The preview rectangle may be set to Rect.Empty, in which case the visible preview + * strokePath is hidden. + * The provided object should have numeric properties called left, top, width and height. + */ + igDataChart(optionLiteral: 'option', optionName: "previewRect"): any; + + /** + * Sets the preview rectangle. + * The preview rectangle may be set to Rect.Empty, in which case the visible preview + * strokePath is hidden. + * The provided object should have numeric properties called left, top, width and height. + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "previewRect", optionValue: any): void; + + /** + * A number between 0 and 1 determining the position of the horizontal scroll. + * This property is effectively a shortcut to the X position of the WindowRect property. + */ + igDataChart(optionLiteral: 'option', optionName: "windowPositionHorizontal"): number; + + /** + * A number between 0 and 1 determining the position of the horizontal scroll. + * This property is effectively a shortcut to the X position of the WindowRect property. + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "windowPositionHorizontal", optionValue: number): void; + + /** + * A number between 0 and 1 determining the position of the vertical scroll. + * This property is effectively a shortcut to the Y position of the WindowRect property. + */ + igDataChart(optionLiteral: 'option', optionName: "windowPositionVertical"): number; + + /** + * A number between 0 and 1 determining the position of the vertical scroll. + * This property is effectively a shortcut to the Y position of the WindowRect property. + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "windowPositionVertical", optionValue: number): void; + + /** + * A number between 0 and 1 determining the scale of the horizontal zoom. + * This property is effectively a shortcut to the Width of the WindowRect property. + */ + igDataChart(optionLiteral: 'option', optionName: "windowScaleHorizontal"): number; + + /** + * A number between 0 and 1 determining the scale of the horizontal zoom. + * This property is effectively a shortcut to the Width of the WindowRect property. + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "windowScaleHorizontal", optionValue: number): void; + + /** + * A number between 0 and 1 determining the scale of the vertical zoom. + * This property is effectively a shortcut to the Height of the WindowRect property. + */ + igDataChart(optionLiteral: 'option', optionName: "windowScaleVertical"): number; + + /** + * A number between 0 and 1 determining the scale of the vertical zoom. + * This property is effectively a shortcut to the Height of the WindowRect property. + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "windowScaleVertical", optionValue: number): void; + + /** + * Gets the template to use for circle markers on the chart. + * Defines the marker template used for + * series with a marker type of circle. + * The provided object should have properties called render and optionally measure. See definition for option: legendItemBadgeTemplate + */ + igDataChart(optionLiteral: 'option', optionName: "circleMarkerTemplate"): any; + + /** + * Sets the template to use for circle markers on the chart. + * Defines the marker template used for + * series with a marker type of circle. + * The provided object should have properties called render and optionally measure. See definition for option: legendItemBadgeTemplate + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "circleMarkerTemplate", optionValue: any): void; + + /** + * Gets the template to use for triangle markers on the chart. + * Defines the marker template used for + * series with a marker type of triangle. + * The provided object should have properties called render and optionally measure. See definition for option: legendItemBadgeTemplate + */ + igDataChart(optionLiteral: 'option', optionName: "triangleMarkerTemplate"): any; + + /** + * Sets the template to use for triangle markers on the chart. + * Defines the marker template used for + * series with a marker type of triangle. + * The provided object should have properties called render and optionally measure. See definition for option: legendItemBadgeTemplate + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "triangleMarkerTemplate", optionValue: any): void; + + /** + * Gets the template to use for pyramid markers on the chart. + * Defines the marker template used for + * series with a marker type of pyramid. + * The provided object should have properties called render and optionally measure. See definition for option: legendItemBadgeTemplate + */ + igDataChart(optionLiteral: 'option', optionName: "pyramidMarkerTemplate"): any; + + /** + * Sets the template to use for pyramid markers on the chart. + * Defines the marker template used for + * series with a marker type of pyramid. + * The provided object should have properties called render and optionally measure. See definition for option: legendItemBadgeTemplate + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "pyramidMarkerTemplate", optionValue: any): void; + + /** + * Gets the template to use for square markers on the chart. + * Defines the marker template used for + * series with a marker type of square. + * The provided object should have properties called render and optionally measure. See definition for option: legendItemBadgeTemplate + */ + igDataChart(optionLiteral: 'option', optionName: "squareMarkerTemplate"): any; + + /** + * Sets the template to use for square markers on the chart. + * Defines the marker template used for + * series with a marker type of square. + * The provided object should have properties called render and optionally measure. See definition for option: legendItemBadgeTemplate + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "squareMarkerTemplate", optionValue: any): void; + + /** + * Gets the template to use for diamond markers on the chart. + * Defines the marker template used for + * series with a marker type of diamond. + * The provided object should have properties called render and optionally measure. See definition for option: legendItemBadgeTemplate + */ + igDataChart(optionLiteral: 'option', optionName: "diamondMarkerTemplate"): any; + + /** + * Sets the template to use for diamond markers on the chart. + * Defines the marker template used for + * series with a marker type of diamond. + * The provided object should have properties called render and optionally measure. See definition for option: legendItemBadgeTemplate + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "diamondMarkerTemplate", optionValue: any): void; + + /** + * Gets the template to use for pentagon markers on the chart. + * Defines the marker template used for + * series with a marker type of pentagon. + * The provided object should have properties called render and optionally measure. See definition for option: legendItemBadgeTemplate + */ + igDataChart(optionLiteral: 'option', optionName: "pentagonMarkerTemplate"): any; + + /** + * Sets the template to use for pentagon markers on the chart. + * Defines the marker template used for + * series with a marker type of pentagon. + * The provided object should have properties called render and optionally measure. See definition for option: legendItemBadgeTemplate + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "pentagonMarkerTemplate", optionValue: any): void; + + /** + * Gets the template to use for hexagon markers on the chart. + * Defines the marker template used for + * series with a marker type of hexagon. + * The provided object should have properties called render and optionally measure. See definition for option: legendItemBadgeTemplate + */ + igDataChart(optionLiteral: 'option', optionName: "hexagonMarkerTemplate"): any; + + /** + * Sets the template to use for hexagon markers on the chart. + * Defines the marker template used for + * series with a marker type of hexagon. + * The provided object should have properties called render and optionally measure. See definition for option: legendItemBadgeTemplate + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "hexagonMarkerTemplate", optionValue: any): void; + + /** + * Gets the template to use for tetragram markers on the chart. + * Defines the marker template used for + * series with a marker type of tetragram. + * The provided object should have properties called render and optionally measure. See definition for option: legendItemBadgeTemplate + */ + igDataChart(optionLiteral: 'option', optionName: "tetragramMarkerTemplate"): any; + + /** + * Sets the template to use for tetragram markers on the chart. + * Defines the marker template used for + * series with a marker type of tetragram. + * The provided object should have properties called render and optionally measure. See definition for option: legendItemBadgeTemplate + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "tetragramMarkerTemplate", optionValue: any): void; + + /** + * Gets the template to use for pentragram markers on the chart. + * Defines the marker template used for + * series with a marker type of pentagram. + * The provided object should have properties called render and optionally measure. See definition for option: legendItemBadgeTemplate + */ + igDataChart(optionLiteral: 'option', optionName: "pentagramMarkerTemplate"): any; + + /** + * Sets the template to use for pentragram markers on the chart. + * Defines the marker template used for + * series with a marker type of pentagram. + * The provided object should have properties called render and optionally measure. See definition for option: legendItemBadgeTemplate + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "pentagramMarkerTemplate", optionValue: any): void; + + /** + * Gets the template to use for hexagram markers on the chart. + * Defines the marker template used for + * series with a marker type of hexagram. + * The provided object should have properties called render and optionally measure. See definition for option: legendItemBadgeTemplate + */ + igDataChart(optionLiteral: 'option', optionName: "hexagramMarkerTemplate"): any; + + /** + * Sets the template to use for hexagram markers on the chart. + * Defines the marker template used for + * series with a marker type of hexagram. + * The provided object should have properties called render and optionally measure. See definition for option: legendItemBadgeTemplate + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "hexagramMarkerTemplate", optionValue: any): void; + + /** + * Sets or gets the top margin to use around the chart content in the canvas. + */ + igDataChart(optionLiteral: 'option', optionName: "topMargin"): number; + + /** + * Sets or gets the top margin to use around the chart content in the canvas. + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "topMargin", optionValue: number): void; + + /** + * Sets or gets the left margin to use around the chart content in the canvas. + */ + igDataChart(optionLiteral: 'option', optionName: "leftMargin"): number; + + /** + * Sets or gets the left margin to use around the chart content in the canvas. + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "leftMargin", optionValue: number): void; + + /** + * Sets or gets the right margin to use around the chart content in the canvas. + */ + igDataChart(optionLiteral: 'option', optionName: "rightMargin"): number; + + /** + * Sets or gets the right margin to use around the chart content in the canvas. + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "rightMargin", optionValue: number): void; + + /** + * Sets or gets the bottom margin to use around the chart content in the canvas. + */ + igDataChart(optionLiteral: 'option', optionName: "bottomMargin"): number; + + /** + * Sets or gets the bottom margin to use around the chart content in the canvas. + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "bottomMargin", optionValue: number): void; + + /** + * Sets or gets the automatic width to add when automatically adding margins to the chart. + */ + igDataChart(optionLiteral: 'option', optionName: "autoMarginWidth"): number; + + /** + * Sets or gets the automatic width to add when automatically adding margins to the chart. + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "autoMarginWidth", optionValue: number): void; + + /** + * Sets or gets the automatic height to add when automatically adding margins to the chart. + */ + igDataChart(optionLiteral: 'option', optionName: "autoMarginHeight"): number; + + /** + * Sets or gets the automatic height to add when automatically adding margins to the chart. + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "autoMarginHeight", optionValue: number): void; + + /** + * Gets whether to use a square aspect ratio for the chart. This is locked to true for polar and radial charts. + */ + igDataChart(optionLiteral: 'option', optionName: "isSquare"): boolean; + + /** + * Sets whether to use a square aspect ratio for the chart. This is locked to true for polar and radial charts. + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "isSquare", optionValue: boolean): void; + + /** + * Gets the GridMode property. + */ + igDataChart(optionLiteral: 'option', optionName: "gridMode"): string; + + /** + * Sets the GridMode property. + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "gridMode", optionValue: string): void; + + /** + * Gets the Brushes property. + * The brushes property defines the palette from which automatically assigned series brushes are selected. + * The value provided should be an array of css color strings. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + igDataChart(optionLiteral: 'option', optionName: "brushes"): any; + + /** + * Sets the Brushes property. + * The brushes property defines the palette from which automatically assigned series brushes are selected. + * The value provided should be an array of css color strings. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "brushes", optionValue: any): void; + + /** + * Gets the MarkerBrushes property. + * The marker brushes property defines the palette from which automatically assigned marker brushes are selected. + * The value provided should be an array of css color strings. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + igDataChart(optionLiteral: 'option', optionName: "markerBrushes"): any; + + /** + * Sets the MarkerBrushes property. + * The marker brushes property defines the palette from which automatically assigned marker brushes are selected. + * The value provided should be an array of css color strings. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "markerBrushes", optionValue: any): void; + + /** + * Gets the Outlines property. + * The outlines property defines the palette from which automatically assigned series outlines are selected. + * The value provided should be an array of css color strings. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + igDataChart(optionLiteral: 'option', optionName: "outlines"): any; + + /** + * Sets the Outlines property. + * The outlines property defines the palette from which automatically assigned series outlines are selected. + * The value provided should be an array of css color strings. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "outlines", optionValue: any): void; + + /** + * Gets the MarkerOutlines property. + * The marker outlines property defines the palette from which automatically assigned marker outlines are selected. + * The value provided should be an array of css color strings. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + igDataChart(optionLiteral: 'option', optionName: "markerOutlines"): any; + + /** + * Sets the MarkerOutlines property. + * The marker outlines property defines the palette from which automatically assigned marker outlines are selected. + * The value provided should be an array of css color strings. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "markerOutlines", optionValue: any): void; + + /** + * The width of the chart. It can be set as a number in pixels, string (px) or percentage (%). + */ + igDataChart(optionLiteral: 'option', optionName: "width"): string|number; + + /** + * The width of the chart. It can be set as a number in pixels, string (px) or percentage (%). + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "width", optionValue: string|number): void; + + /** + * The height of the chart. It can be set as a number in pixels, string (px) or percentage (%). + */ + igDataChart(optionLiteral: 'option', optionName: "height"): string|number; + + /** + * The height of the chart. It can be set as a number in pixels, string (px) or percentage (%). + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "height", optionValue: string|number): void; + + /** + * To set both dimensions of the chart simultaneously an object with a width and height property can be provided + */ + igDataChart(optionLiteral: 'option', optionName: "size"): any; + + /** + * To set both dimensions of the chart simultaneously an object with a width and height property can be provided + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "size", optionValue: any): void; + + /** + * Can be any valid data source accepted by $.ig.DataSource, or an instance of an $.ig.DataSource itself + */ + igDataChart(optionLiteral: 'option', optionName: "dataSource"): any; + + /** + * Can be any valid data source accepted by $.ig.DataSource, or an instance of an $.ig.DataSource itself + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "dataSource", optionValue: any): void; + + /** + * Gets a remote URL accepted by $.ig.DataSource in order to request data from it + */ + igDataChart(optionLiteral: 'option', optionName: "dataSourceUrl"): string; + + /** + * Sets a remote URL accepted by $.ig.DataSource in order to request data from it + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "dataSourceUrl", optionValue: string): void; + + /** + * Explicitly set data source type (such as "json"). Please refer to the documentation of $.ig.DataSource and its type property. + */ + igDataChart(optionLiteral: 'option', optionName: "dataSourceType"): string; + + /** + * Explicitly set data source type (such as "json"). Please refer to the documentation of $.ig.DataSource and its type property. + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "dataSourceType", optionValue: string): void; + + /** + * See $.ig.DataSource. Gets the name of the property in which data records are held if the response is wrapped. + */ + igDataChart(optionLiteral: 'option', optionName: "responseDataKey"): string; + + /** + * See $.ig.DataSource. Sets the name of the property in which data records are held if the response is wrapped. + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "responseDataKey", optionValue: string): void; + + /** + * Set to true in order to disable any interactions with the plot surface. + */ + igDataChart(optionLiteral: 'option', optionName: "isSurfaceInteractionDisabled"): boolean; + + /** + * Set to true in order to disable any interactions with the plot surface. + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "isSurfaceInteractionDisabled", optionValue: boolean): void; + + /** + * Set to true in order to override the default behavior in which series do not animate if an axis range changes + */ + igDataChart(optionLiteral: 'option', optionName: "animateSeriesWhenAxisRangeChanges"): boolean; + + /** + * Set to true in order to override the default behavior in which series do not animate if an axis range changes + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "animateSeriesWhenAxisRangeChanges", optionValue: boolean): void; + + /** + * The title to display for the component. + */ + igDataChart(optionLiteral: 'option', optionName: "title"): string; + + /** + * The title to display for the component. + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "title", optionValue: string): void; + + /** + * The subtitle to display for the component. + */ + igDataChart(optionLiteral: 'option', optionName: "subtitle"): string; + + /** + * The subtitle to display for the component. + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "subtitle", optionValue: string): void; + + /** + * The css font property to use for the title. + */ + igDataChart(optionLiteral: 'option', optionName: "titleTextStyle"): string; + + /** + * The css font property to use for the title. + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "titleTextStyle", optionValue: string): void; + + /** + * The top margin to use for the title. + */ + igDataChart(optionLiteral: 'option', optionName: "titleTopMargin"): number; + + /** + * The top margin to use for the title. + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "titleTopMargin", optionValue: number): void; + + /** + * The left margin to use for the title. + */ + igDataChart(optionLiteral: 'option', optionName: "titleLeftMargin"): number; + + /** + * The left margin to use for the title. + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "titleLeftMargin", optionValue: number): void; + + /** + * The right margin to use for the title. + */ + igDataChart(optionLiteral: 'option', optionName: "titleRightMargin"): number; + + /** + * The right margin to use for the title. + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "titleRightMargin", optionValue: number): void; + + /** + * The bottom margin to use for the title. + */ + igDataChart(optionLiteral: 'option', optionName: "titleBottomMargin"): number; + + /** + * The bottom margin to use for the title. + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "titleBottomMargin", optionValue: number): void; + + /** + * The css font property to use for the title. + */ + igDataChart(optionLiteral: 'option', optionName: "subtitleTextStyle"): string; + + /** + * The css font property to use for the title. + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "subtitleTextStyle", optionValue: string): void; + + /** + * The top margin to use for the subtitle. + */ + igDataChart(optionLiteral: 'option', optionName: "subtitleTopMargin"): number; + + /** + * The top margin to use for the subtitle. + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "subtitleTopMargin", optionValue: number): void; + + /** + * The left margin to use for the subtitle. + */ + igDataChart(optionLiteral: 'option', optionName: "subtitleLeftMargin"): number; + + /** + * The left margin to use for the subtitle. + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "subtitleLeftMargin", optionValue: number): void; + + /** + * The right margin to use for the subtitle. + */ + igDataChart(optionLiteral: 'option', optionName: "subtitleRightMargin"): number; + + /** + * The right margin to use for the subtitle. + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "subtitleRightMargin", optionValue: number): void; + + /** + * The bottom margin to use for the subtitle. + */ + igDataChart(optionLiteral: 'option', optionName: "subtitleBottomMargin"): number; + + /** + * The bottom margin to use for the subtitle. + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "subtitleBottomMargin", optionValue: number): void; + + /** + * The color to use for the title. + */ + igDataChart(optionLiteral: 'option', optionName: "titleTextColor"): any; + + /** + * The color to use for the title. + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "titleTextColor", optionValue: any): void; + + /** + * The color to use for the subtitle. + */ + igDataChart(optionLiteral: 'option', optionName: "subtitleTextColor"): any; + + /** + * The color to use for the subtitle. + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "subtitleTextColor", optionValue: any): void; + + /** + * The horizontal alignment to use for the title. + */ + igDataChart(optionLiteral: 'option', optionName: "titleHorizontalAlignment"): string; + + /** + * The horizontal alignment to use for the title. + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "titleHorizontalAlignment", optionValue: string): void; + + /** + * The horizontal alignment to use for the subtitle. + */ + igDataChart(optionLiteral: 'option', optionName: "subtitleHorizontalAlignment"): string; + + /** + * The horizontal alignment to use for the subtitle. + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "subtitleHorizontalAlignment", optionValue: string): void; + + /** + * The length, in milliseconds of the highlighting transition. + */ + igDataChart(optionLiteral: 'option', optionName: "highlightingTransitionDuration"): number; + + /** + * The length, in milliseconds of the highlighting transition. + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "highlightingTransitionDuration", optionValue: number): void; + + /** + * Whether the series viewer should use cached tiles during zooms rather than the default live content. + */ + igDataChart(optionLiteral: 'option', optionName: "useTiledZooming"): boolean; + + /** + * Sets whether the series viewer should use cached tiles during zooms rather than the default live content. + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "useTiledZooming", optionValue: boolean): void; + + /** + * Whether the series viewer should prefer selecting higher resolution tiles over lower resolution tiles when performing tile zooming. Setting this to true will lower performance but increase quality. + */ + igDataChart(optionLiteral: 'option', optionName: "preferHigherResolutionTiles"): boolean; + + /** + * Sets whether the series viewer should prefer selecting higher resolution tiles over lower resolution tiles when performing tile zooming. Setting this to true will lower performance but increase quality. + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "preferHigherResolutionTiles", optionValue: boolean): void; + + /** + * Gets the scaling value used by the main canvas rendering context to apply a scale transform to it. + */ + igDataChart(optionLiteral: 'option', optionName: "pixelScalingRatio"): number; + + /** + * Sets the scaling value used by the main canvas rendering context to apply a scale transform to it. + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "pixelScalingRatio", optionValue: number): void; + + /** + * The maximum number of zoom tiles that the series viewer should cache while in tiled zooming mode. + */ + igDataChart(optionLiteral: 'option', optionName: "zoomTileCacheSize"): number; + + /** + * Sets the maximum number of zoom tiles that the series viewer should cache while in tiled zooming mode. + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "zoomTileCacheSize", optionValue: number): void; + + /** + * Gets which type of hit testing the series should use. + */ + igDataChart(optionLiteral: 'option', optionName: "contentHitTestMode"): string; + + /** + * Sets which type of hit testing the series should use. + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "contentHitTestMode", optionValue: string): void; + + /** + * Can be any valid options accepted by $.ig.ChartLegend, or an instance of an $.ig.ChartLegend itself. + */ + igDataChart(optionLiteral: 'option', optionName: "legend"): IgDataChartLegend; + + /** + * Can be any valid options accepted by $.ig.ChartLegend, or an instance of an $.ig.ChartLegend itself. + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "legend", optionValue: IgDataChartLegend): void; + + /** + * An array of axis objects + */ + igDataChart(optionLiteral: 'option', optionName: "axes"): IgDataChartAxes[]; + + /** + * An array of axis objects + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "axes", optionValue: IgDataChartAxes[]): void; + + /** + * An array of series objects + */ + igDataChart(optionLiteral: 'option', optionName: "series"): IgDataChartSeries[]; + + /** + * An array of series objects + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "series", optionValue: IgDataChartSeries[]): void; + + /** + * The swatch used to style this widget + */ + igDataChart(optionLiteral: 'option', optionName: "theme"): string; + + /** + * The swatch used to style this widget + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "theme", optionValue: string): void; + + /** + * Event fired when the mouse has hovered on a series and the tooltip is about to show + * Function takes arguments evt and ui. + * Use ui.element to get reference to tooltip DOM element. + * Use ui.item to get reference to current series item object. + * Use ui.chart to get reference to chart object. + * Use ui.series to get reference to current series object. + * Use ui.actualItemBrush to get item brush. + * Use ui.actualSeriesBrush to get series brush. + */ + igDataChart(optionLiteral: 'option', optionName: "tooltipShowing"): TooltipShowingEvent; + + /** + * Event fired when the mouse has hovered on a series and the tooltip is about to show + * Function takes arguments evt and ui. + * Use ui.element to get reference to tooltip DOM element. + * Use ui.item to get reference to current series item object. + * Use ui.chart to get reference to chart object. + * Use ui.series to get reference to current series object. + * Use ui.actualItemBrush to get item brush. + * Use ui.actualSeriesBrush to get series brush. + * + * @optionValue Define event handler function. + */ + igDataChart(optionLiteral: 'option', optionName: "tooltipShowing", optionValue: TooltipShowingEvent): void; + + /** + * Event fired after a tooltip is shown + * Function takes arguments evt and ui. + * Use ui.element to get reference to tooltip DOM element. + * Use ui.item to get reference to current series item object. + * Use ui.chart to get reference to chart object. + * Use ui.series to get reference to current series object. + * Use ui.actualItemBrush to get item brush. + * Use ui.actualSeriesBrush to get series brush. + */ + igDataChart(optionLiteral: 'option', optionName: "tooltipShown"): TooltipShownEvent; + + /** + * Event fired after a tooltip is shown + * Function takes arguments evt and ui. + * Use ui.element to get reference to tooltip DOM element. + * Use ui.item to get reference to current series item object. + * Use ui.chart to get reference to chart object. + * Use ui.series to get reference to current series object. + * Use ui.actualItemBrush to get item brush. + * Use ui.actualSeriesBrush to get series brush. + * + * @optionValue Define event handler function. + */ + igDataChart(optionLiteral: 'option', optionName: "tooltipShown", optionValue: TooltipShownEvent): void; + + /** + * Event fired when the mouse has left a series and the tooltip is about to hide + * Function takes arguments evt and ui. + * Use ui.element to get reference to tooltip DOM element. + * Use ui.item to get reference to current series item object. + * Use ui.chart to get reference to chart object. + * Use ui.series to get reference to current series object. + * Use ui.actualItemBrush to get item brush. + * Use ui.actualSeriesBrush to get series brush. + */ + igDataChart(optionLiteral: 'option', optionName: "tooltipHiding"): TooltipHidingEvent; + + /** + * Event fired when the mouse has left a series and the tooltip is about to hide + * Function takes arguments evt and ui. + * Use ui.element to get reference to tooltip DOM element. + * Use ui.item to get reference to current series item object. + * Use ui.chart to get reference to chart object. + * Use ui.series to get reference to current series object. + * Use ui.actualItemBrush to get item brush. + * Use ui.actualSeriesBrush to get series brush. + * + * @optionValue Define event handler function. + */ + igDataChart(optionLiteral: 'option', optionName: "tooltipHiding", optionValue: TooltipHidingEvent): void; + + /** + * Event fired after a tooltip is hidden + * Function takes arguments evt and ui. + * Use ui.element to get reference to tooltip DOM element. + * Use ui.item to get reference to current series item object. + * Use ui.chart to get reference to chart object. + * Use ui.series to get reference to current series object. + * Use ui.actualItemBrush to get item brush. + * Use ui.actualSeriesBrush to get series brush. + */ + igDataChart(optionLiteral: 'option', optionName: "tooltipHidden"): TooltipHiddenEvent; + + /** + * Event fired after a tooltip is hidden + * Function takes arguments evt and ui. + * Use ui.element to get reference to tooltip DOM element. + * Use ui.item to get reference to current series item object. + * Use ui.chart to get reference to chart object. + * Use ui.series to get reference to current series object. + * Use ui.actualItemBrush to get item brush. + * Use ui.actualSeriesBrush to get series brush. + * + * @optionValue Define event handler function. + */ + igDataChart(optionLiteral: 'option', optionName: "tooltipHidden", optionValue: TooltipHiddenEvent): void; + + /** + * Event fired when the control is displayed on a non HTML5 compliant browser + */ + igDataChart(optionLiteral: 'option', optionName: "browserNotSupported"): BrowserNotSupportedEvent; + + /** + * Event fired when the control is displayed on a non HTML5 compliant browser + * + * @optionValue Define event handler function. + */ + igDataChart(optionLiteral: 'option', optionName: "browserNotSupported", optionValue: BrowserNotSupportedEvent): void; + + /** + * Occurs when the cursors are moved over a series in this chart. + * Function takes arguments evt and ui. + * Use ui.item to get reference to current series item object. + * Use ui.chart to get reference to chart object. + * Use ui.series to get reference to current series object. + * Use ui.actualItemBrush to get item brush. + * Use ui.actualSeriesBrush to get series brush. + * Use ui.positionX to get mouse X position. + * Use ui.positionY to get mouse Y position. + */ + igDataChart(optionLiteral: 'option', optionName: "seriesCursorMouseMove"): SeriesCursorMouseMoveEvent; + + /** + * Occurs when the cursors are moved over a series in this chart. + * Function takes arguments evt and ui. + * Use ui.item to get reference to current series item object. + * Use ui.chart to get reference to chart object. + * Use ui.series to get reference to current series object. + * Use ui.actualItemBrush to get item brush. + * Use ui.actualSeriesBrush to get series brush. + * Use ui.positionX to get mouse X position. + * Use ui.positionY to get mouse Y position. + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "seriesCursorMouseMove", optionValue: SeriesCursorMouseMoveEvent): void; + + /** + * Occurs when the left mouse button is pressed while the mouse pointer is over an element of this chart. + * Function takes arguments evt and ui. + * Use ui.item to get reference to current series item object. + * Use ui.chart to get reference to chart object. + * Use ui.series to get reference to current series object. + * Use ui.actualItemBrush to get item brush. + * Use ui.actualSeriesBrush to get series brush. + * Use ui.positionX to get mouse X position. + * Use ui.positionY to get mouse Y position. + */ + igDataChart(optionLiteral: 'option', optionName: "seriesMouseLeftButtonDown"): SeriesMouseLeftButtonDownEvent; + + /** + * Occurs when the left mouse button is pressed while the mouse pointer is over an element of this chart. + * Function takes arguments evt and ui. + * Use ui.item to get reference to current series item object. + * Use ui.chart to get reference to chart object. + * Use ui.series to get reference to current series object. + * Use ui.actualItemBrush to get item brush. + * Use ui.actualSeriesBrush to get series brush. + * Use ui.positionX to get mouse X position. + * Use ui.positionY to get mouse Y position. + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "seriesMouseLeftButtonDown", optionValue: SeriesMouseLeftButtonDownEvent): void; + + /** + * Occurs when the left mouse button is released while the mouse pointer is over an element of this chart. + * Function takes arguments evt and ui. + * Use ui.item to get reference to current series item object. + * Use ui.chart to get reference to chart object. + * Use ui.series to get reference to current series object. + * Use ui.actualItemBrush to get item brush. + * Use ui.actualSeriesBrush to get series brush. + * Use ui.positionX to get mouse X position. + * Use ui.positionY to get mouse Y position. + */ + igDataChart(optionLiteral: 'option', optionName: "seriesMouseLeftButtonUp"): SeriesMouseLeftButtonUpEvent; + + /** + * Occurs when the left mouse button is released while the mouse pointer is over an element of this chart. + * Function takes arguments evt and ui. + * Use ui.item to get reference to current series item object. + * Use ui.chart to get reference to chart object. + * Use ui.series to get reference to current series object. + * Use ui.actualItemBrush to get item brush. + * Use ui.actualSeriesBrush to get series brush. + * Use ui.positionX to get mouse X position. + * Use ui.positionY to get mouse Y position. + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "seriesMouseLeftButtonUp", optionValue: SeriesMouseLeftButtonUpEvent): void; + + /** + * Occurs when the left mouse pointer moves while over an element of this chart. + * Function takes arguments evt and ui. + * Use ui.item to get reference to current series item object. + * Use ui.chart to get reference to chart object. + * Use ui.series to get reference to current series object. + * Use ui.actualItemBrush to get item brush. + * Use ui.actualSeriesBrush to get series brush. + * Use ui.positionX to get mouse X position. + * Use ui.positionY to get mouse Y position. + */ + igDataChart(optionLiteral: 'option', optionName: "seriesMouseMove"): SeriesMouseMoveEvent; + + /** + * Occurs when the left mouse pointer moves while over an element of this chart. + * Function takes arguments evt and ui. + * Use ui.item to get reference to current series item object. + * Use ui.chart to get reference to chart object. + * Use ui.series to get reference to current series object. + * Use ui.actualItemBrush to get item brush. + * Use ui.actualSeriesBrush to get series brush. + * Use ui.positionX to get mouse X position. + * Use ui.positionY to get mouse Y position. + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "seriesMouseMove", optionValue: SeriesMouseMoveEvent): void; + + /** + * Occurs when the left mouse pointer enters an element of this chart. + * Function takes arguments evt and ui. + * Use ui.item to get reference to current series item object. + * Use ui.chart to get reference to chart object. + * Use ui.series to get reference to current series object. + * Use ui.actualItemBrush to get item brush. + * Use ui.actualSeriesBrush to get series brush. + * Use ui.positionX to get mouse X position. + * Use ui.positionY to get mouse Y position. + */ + igDataChart(optionLiteral: 'option', optionName: "seriesMouseEnter"): SeriesMouseEnterEvent; + + /** + * Occurs when the left mouse pointer enters an element of this chart. + * Function takes arguments evt and ui. + * Use ui.item to get reference to current series item object. + * Use ui.chart to get reference to chart object. + * Use ui.series to get reference to current series object. + * Use ui.actualItemBrush to get item brush. + * Use ui.actualSeriesBrush to get series brush. + * Use ui.positionX to get mouse X position. + * Use ui.positionY to get mouse Y position. + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "seriesMouseEnter", optionValue: SeriesMouseEnterEvent): void; + + /** + * Occurs when the left mouse pointer leaves an element of this chart. + * Function takes arguments evt and ui. + * Use ui.item to get reference to current series item object. + * Use ui.chart to get reference to chart object. + * Use ui.series to get reference to current series object. + * Use ui.actualItemBrush to get item brush. + * Use ui.actualSeriesBrush to get series brush. + * Use ui.positionX to get mouse X position. + * Use ui.positionY to get mouse Y position. + */ + igDataChart(optionLiteral: 'option', optionName: "seriesMouseLeave"): SeriesMouseLeaveEvent; + + /** + * Occurs when the left mouse pointer leaves an element of this chart. + * Function takes arguments evt and ui. + * Use ui.item to get reference to current series item object. + * Use ui.chart to get reference to chart object. + * Use ui.series to get reference to current series object. + * Use ui.actualItemBrush to get item brush. + * Use ui.actualSeriesBrush to get series brush. + * Use ui.positionX to get mouse X position. + * Use ui.positionY to get mouse Y position. + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "seriesMouseLeave", optionValue: SeriesMouseLeaveEvent): void; + + /** + * Occurs just after the current Chart's window rectangle is changed. + * Function takes arguments evt and ui. + * Use ui.chart to get reference to chart object. + * Use ui.newHeight to get new height value. + * Use ui.newLeft to get new left value. + * Use ui.newTop to get new top value. + * Use ui.newWidth to get new top value. + * Use ui.oldHeight to get old height value. + * Use ui.oldLeft to get old left value. + * Use ui.oldTop to get old top value. + * Use ui.oldWidth to get old top value. + */ + igDataChart(optionLiteral: 'option', optionName: "windowRectChanged"): WindowRectChangedEvent; + + /** + * Occurs just after the current Chart's window rectangle is changed. + * Function takes arguments evt and ui. + * Use ui.chart to get reference to chart object. + * Use ui.newHeight to get new height value. + * Use ui.newLeft to get new left value. + * Use ui.newTop to get new top value. + * Use ui.newWidth to get new top value. + * Use ui.oldHeight to get old height value. + * Use ui.oldLeft to get old left value. + * Use ui.oldTop to get old top value. + * Use ui.oldWidth to get old top value. + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "windowRectChanged", optionValue: WindowRectChangedEvent): void; + + /** + * Occurs just after the current Chart's grid area rectangle is changed. + * The grid area may change as the result of the Chart being resized, or + * of an axis being added or changing size, possibly in another Chart. + * Function takes arguments evt and ui. + * Use ui.chart to get reference to chart object. + * Use ui.newHeight to get new height value. + * Use ui.newLeft to get new left value. + * Use ui.newTop to get new top value. + * Use ui.newWidth to get new top value. + * Use ui.oldHeight to get old height value. + * Use ui.oldLeft to get old left value. + * Use ui.oldTop to get old top value. + * Use ui.oldWidth to get old top value. + */ + igDataChart(optionLiteral: 'option', optionName: "gridAreaRectChanged"): GridAreaRectChangedEvent; + + /** + * Occurs just after the current Chart's grid area rectangle is changed. + * The grid area may change as the result of the Chart being resized, or + * of an axis being added or changing size, possibly in another Chart. + * Function takes arguments evt and ui. + * Use ui.chart to get reference to chart object. + * Use ui.newHeight to get new height value. + * Use ui.newLeft to get new left value. + * Use ui.newTop to get new top value. + * Use ui.newWidth to get new top value. + * Use ui.oldHeight to get old height value. + * Use ui.oldLeft to get old left value. + * Use ui.oldTop to get old top value. + * Use ui.oldWidth to get old top value. + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "gridAreaRectChanged", optionValue: GridAreaRectChangedEvent): void; + + /** + * Raised when the chart's processing for an update has completed. + * Function takes arguments evt and ui. + * Use ui.chart to get reference to chart object. + */ + igDataChart(optionLiteral: 'option', optionName: "refreshCompleted"): RefreshCompletedEvent; + + /** + * Raised when the chart's processing for an update has completed. + * Function takes arguments evt and ui. + * Use ui.chart to get reference to chart object. + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "refreshCompleted", optionValue: RefreshCompletedEvent): void; + + /** + * Event fired when the range of and axis on the chart changes. + * Function takes arguments evt and ui. + * Use ui.axis to get reference to current chart axis object. + * Use ui.chart to get reference to chart object. + * Use ui.newMaximumValue to get new maximum value. + * Use ui.newMinimumValue to get new minimum value. + * Use ui.oldMaximumValue to get old maximum value. + * Use ui.oldMinimumValue to get old minimum value. + */ + igDataChart(optionLiteral: 'option', optionName: "axisRangeChanged"): AxisRangeChangedEvent; + + /** + * Event fired when the range of and axis on the chart changes. + * Function takes arguments evt and ui. + * Use ui.axis to get reference to current chart axis object. + * Use ui.chart to get reference to chart object. + * Use ui.newMaximumValue to get new maximum value. + * Use ui.newMinimumValue to get new minimum value. + * Use ui.oldMaximumValue to get old maximum value. + * Use ui.oldMinimumValue to get old minimum value. + * + * @optionValue Define event handler function. + */ + igDataChart(optionLiteral: 'option', optionName: "axisRangeChanged", optionValue: AxisRangeChangedEvent): void; + + /** + * Handle this event in order to specify which columns the Typical price calculation is based on. + * Function takes arguments evt and ui. + * Use ui.chart to get reference to chart object. + * Use ui.series to get reference to current series object. + * Use ui.count to get the number of positions that should be calculated from the start. + * Use ui.position to get the beginning position that should be calculated from. + * Use ui.supportingCalculations to get the supporting calculations to use in the calculation. + * Use ui.dataSource to get the data to use for the calculation. + * Use ui.basedOn to specify which columns changing will invalidate the series and cause it to be recalculated. + */ + igDataChart(optionLiteral: 'option', optionName: "typicalBasedOn"): TypicalBasedOnEvent; + + /** + * Handle this event in order to specify which columns the Typical price calculation is based on. + * Function takes arguments evt and ui. + * Use ui.chart to get reference to chart object. + * Use ui.series to get reference to current series object. + * Use ui.count to get the number of positions that should be calculated from the start. + * Use ui.position to get the beginning position that should be calculated from. + * Use ui.supportingCalculations to get the supporting calculations to use in the calculation. + * Use ui.dataSource to get the data to use for the calculation. + * Use ui.basedOn to specify which columns changing will invalidate the series and cause it to be recalculated. + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "typicalBasedOn", optionValue: TypicalBasedOnEvent): void; + + /** + * Event fired when the progressive loading state of the series has changed. + * Function takes arguments evt and ui. + * Use ui.chart to get reference to chart object. + * Use ui.series to get reference to current series object. + * Use ui.currentStatus to get current status. + */ + igDataChart(optionLiteral: 'option', optionName: "progressiveLoadStatusChanged"): ProgressiveLoadStatusChangedEvent; + + /** + * Event fired when the progressive loading state of the series has changed. + * Function takes arguments evt and ui. + * Use ui.chart to get reference to chart object. + * Use ui.series to get reference to current series object. + * Use ui.currentStatus to get current status. + * + * @optionValue Define event handler function. + */ + igDataChart(optionLiteral: 'option', optionName: "progressiveLoadStatusChanged", optionValue: ProgressiveLoadStatusChangedEvent): void; + + /** + * Event fired to allow you to override the style of items in a category or financial series. Only fires if you set allowCustomCategoryStyle to true for a series. + * Function takes arguments evt and ui. + * Use ui.chart to get reference to chart object. + * Use ui.series to get reference to current series object. + * Use ui.startIndex to get the start index for the current items. + * Use ui.endIndex to get the end index for the current items. + * Use ui.hasDateRange to tell if you should use the startDate and endDate to know the current items instead of startIndex/endIndex. + * Use ui.startDate if ui.hasDateRange is true. + * Use ui.endDate if ui.hasDateRange is true. + * Use ui.getItems to get all the items associated with the event (only if necessary). + * Use ui.fill to get or set the fill to use for the current item. + * Use ui.stroke to get or set the stroke to use for the current item. + * Use ui.opacity to get or set the opacity to use for the current item. + * Use ui.highlightingHandled to set if the default highlighting behavior should not run, given that you are handling it in this event. + * Use ui.maxAllSeriesHighlightingProgress to get the maximum highlighted progress across all series. + * Use ui.sumAllSeriesHighlightingProgress to get the sum of highlighting progtess across all series. + * Use ui.highlightingInfo.progress to tell what the highlighting progress is for the current item, if highlightingInfo is not null. + * Use ui.highlightingInfo.state to tell whether the current item is currently highlighting in or out, is static, if highlightingInfo is not null. + */ + igDataChart(optionLiteral: 'option', optionName: "assigningCategoryStyle"): AssigningCategoryStyleEvent; + + /** + * Event fired to allow you to override the style of items in a category or financial series. Only fires if you set allowCustomCategoryStyle to true for a series. + * Function takes arguments evt and ui. + * Use ui.chart to get reference to chart object. + * Use ui.series to get reference to current series object. + * Use ui.startIndex to get the start index for the current items. + * Use ui.endIndex to get the end index for the current items. + * Use ui.hasDateRange to tell if you should use the startDate and endDate to know the current items instead of startIndex/endIndex. + * Use ui.startDate if ui.hasDateRange is true. + * Use ui.endDate if ui.hasDateRange is true. + * Use ui.getItems to get all the items associated with the event (only if necessary). + * Use ui.fill to get or set the fill to use for the current item. + * Use ui.stroke to get or set the stroke to use for the current item. + * Use ui.opacity to get or set the opacity to use for the current item. + * Use ui.highlightingHandled to set if the default highlighting behavior should not run, given that you are handling it in this event. + * Use ui.maxAllSeriesHighlightingProgress to get the maximum highlighted progress across all series. + * Use ui.sumAllSeriesHighlightingProgress to get the sum of highlighting progtess across all series. + * Use ui.highlightingInfo.progress to tell what the highlighting progress is for the current item, if highlightingInfo is not null. + * Use ui.highlightingInfo.state to tell whether the current item is currently highlighting in or out, is static, if highlightingInfo is not null. + * + * @optionValue Define event handler function. + */ + igDataChart(optionLiteral: 'option', optionName: "assigningCategoryStyle", optionValue: AssigningCategoryStyleEvent): void; + + /** + * Event fired to allow you to override the style of markers for the items in a category or financial series. Only fires if you set allowCustomCategoryMarkerStyle to true for a series. + * Function takes arguments evt and ui. + * Use ui.chart to get reference to chart object. + * Use ui.series to get reference to current series object. + * Use ui.startIndex to get the start index for the current items. + * Use ui.endIndex to get the end index for the current items. + * Use ui.hasDateRange to tell if you should use the startDate and endDate to know the current items instead of startIndex/endIndex. + * Use ui.startDate if ui.hasDateRange is true. + * Use ui.endDate if ui.hasDateRange is true. + * Use ui.getItems to get all the items associated with the event (only if necessary). + * Use ui.fill to get or set the fill to use for the current item. + * Use ui.stroke to get or set the stroke to use for the current item. + * Use ui.opacity to get or set the opacity to use for the current item. + * Use ui.highlightingHandled to set if the default highlighting behavior should not run, given that you are handling it in this event. + * Use ui.maxAllSeriesHighlightingProgress to get the maximum highlighted progress across all series. + * Use ui.sumAllSeriesHighlightingProgress to get the sum of highlighting progtess across all series. + * Use ui.highlightingInfo.progress to tell what the highlighting progress is for the current item, if highlightingInfo is not null. + * Use ui.highlightingInfo.state to tell whether the current item is currently highlighting in or out, is static, if highlightingInfo is not null. + */ + igDataChart(optionLiteral: 'option', optionName: "assigningCategoryMarkerStyle"): AssigningCategoryMarkerStyleEvent; + + /** + * Event fired to allow you to override the style of markers for the items in a category or financial series. Only fires if you set allowCustomCategoryMarkerStyle to true for a series. + * Function takes arguments evt and ui. + * Use ui.chart to get reference to chart object. + * Use ui.series to get reference to current series object. + * Use ui.startIndex to get the start index for the current items. + * Use ui.endIndex to get the end index for the current items. + * Use ui.hasDateRange to tell if you should use the startDate and endDate to know the current items instead of startIndex/endIndex. + * Use ui.startDate if ui.hasDateRange is true. + * Use ui.endDate if ui.hasDateRange is true. + * Use ui.getItems to get all the items associated with the event (only if necessary). + * Use ui.fill to get or set the fill to use for the current item. + * Use ui.stroke to get or set the stroke to use for the current item. + * Use ui.opacity to get or set the opacity to use for the current item. + * Use ui.highlightingHandled to set if the default highlighting behavior should not run, given that you are handling it in this event. + * Use ui.maxAllSeriesHighlightingProgress to get the maximum highlighted progress across all series. + * Use ui.sumAllSeriesHighlightingProgress to get the sum of highlighting progtess across all series. + * Use ui.highlightingInfo.progress to tell what the highlighting progress is for the current item, if highlightingInfo is not null. + * Use ui.highlightingInfo.state to tell whether the current item is currently highlighting in or out, is static, if highlightingInfo is not null. + * + * @optionValue Define event handler function. + */ + igDataChart(optionLiteral: 'option', optionName: "assigningCategoryMarkerStyle", optionValue: AssigningCategoryMarkerStyleEvent): void; + igDataChart(options: IgDataChart): JQuery; + igDataChart(optionLiteral: 'option', optionName: string): any; + igDataChart(optionLiteral: 'option', options: IgDataChart): JQuery; + igDataChart(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igDataChart(methodName: string, ...methodParams: any[]): any; +} +interface JQuery { + igPieChart(methodName: "option"): void; + igPieChart(methodName: "addItem", item: Object): void; + igPieChart(methodName: "insertItem", item: Object, index: number): void; + igPieChart(methodName: "removeItem", index: number): void; + igPieChart(methodName: "setItem", index: number, item: Object): void; + igPieChart(methodName: "exportImage", width?: Object, height?: Object): Object; + igPieChart(methodName: "destroy"): void; + igPieChart(methodName: "id"): string; + igPieChart(methodName: "widget"): void; + igPieChart(methodName: "print"): void; + igPieChart(methodName: "exportVisualData"): void; + + /** + * The width of the chart. It can be set as a number in pixels, string (px) or percentage (%). + */ + igPieChart(optionLiteral: 'option', optionName: "width"): string|number; + + /** + * The width of the chart. It can be set as a number in pixels, string (px) or percentage (%). + * + * @optionValue New value to be set. + */ + igPieChart(optionLiteral: 'option', optionName: "width", optionValue: string|number): void; + + /** + * The height of the chart. It can be set as a number in pixels, string (px) or percentage (%). + */ + igPieChart(optionLiteral: 'option', optionName: "height"): string|number; + + /** + * The height of the chart. It can be set as a number in pixels, string (px) or percentage (%). + * + * @optionValue New value to be set. + */ + igPieChart(optionLiteral: 'option', optionName: "height", optionValue: string|number): void; + + /** + * Can be any valid data source accepted by $.ig.DataSource, or an instance of an $.ig.DataSource itself + */ + igPieChart(optionLiteral: 'option', optionName: "dataSource"): any; + + /** + * Can be any valid data source accepted by $.ig.DataSource, or an instance of an $.ig.DataSource itself + * + * @optionValue New value to be set. + */ + igPieChart(optionLiteral: 'option', optionName: "dataSource", optionValue: any): void; + + /** + * Gets a remote URL accepted by $.ig.DataSource in order to request data from it + */ + igPieChart(optionLiteral: 'option', optionName: "dataSourceUrl"): string; + + /** + * Sets a remote URL accepted by $.ig.DataSource in order to request data from it + * + * @optionValue New value to be set. + */ + igPieChart(optionLiteral: 'option', optionName: "dataSourceUrl", optionValue: string): void; + + /** + * Explicitly set data source type (such as "json"). Please refer to the documentation of $.ig.DataSource and its type property. + */ + igPieChart(optionLiteral: 'option', optionName: "dataSourceType"): string; + + /** + * Explicitly set data source type (such as "json"). Please refer to the documentation of $.ig.DataSource and its type property. + * + * @optionValue New value to be set. + */ + igPieChart(optionLiteral: 'option', optionName: "dataSourceType", optionValue: string): void; + + /** + * See $.ig.DataSource. Gets the name of the property in which data records are held if the response is wrapped. + */ + igPieChart(optionLiteral: 'option', optionName: "responseDataKey"): string; + + /** + * See $.ig.DataSource. Sets the name of the property in which data records are held if the response is wrapped. + * + * @optionValue New value to be set. + */ + igPieChart(optionLiteral: 'option', optionName: "responseDataKey", optionValue: string): void; + + /** + * Gets or Sets the property name that contains the values. This option is deprecated - please use `dataValue` instead. + */ + igPieChart(optionLiteral: 'option', optionName: "valueMemberPath"): string; + + /** + * Sets the property name that contains the values. This option is deprecated - please use `dataValue` instead. + * + * @optionValue New value to be set. + */ + igPieChart(optionLiteral: 'option', optionName: "valueMemberPath", optionValue: string): void; + + /** + * Gets the property name that contains the labels. This option is deprecated - please use `dataLabel` instead. + */ + igPieChart(optionLiteral: 'option', optionName: "labelMemberPath"): string; + + /** + * Sets the property name that contains the labels. This option is deprecated - please use `dataLabel` instead. + * + * @optionValue New value to be set. + */ + igPieChart(optionLiteral: 'option', optionName: "labelMemberPath", optionValue: string): void; + + /** + * Gets or Sets the property name that contains the values. + */ + igPieChart(optionLiteral: 'option', optionName: "dataValue"): string; + + /** + * Sets the property name that contains the values. + * + * @optionValue New value to be set. + */ + igPieChart(optionLiteral: 'option', optionName: "dataValue", optionValue: string): void; + + /** + * Gets the property name that contains the labels. + */ + igPieChart(optionLiteral: 'option', optionName: "dataLabel"): string; + + /** + * Sets the property name that contains the labels. + * + * @optionValue New value to be set. + */ + igPieChart(optionLiteral: 'option', optionName: "dataLabel", optionValue: string): void; + + /** + * Gets the position of chart labels. + * + */ + igPieChart(optionLiteral: 'option', optionName: "labelsPosition"): string; + + /** + * Sets the position of chart labels. + * + * + * @optionValue New value to be set. + */ + igPieChart(optionLiteral: 'option', optionName: "labelsPosition", optionValue: string): void; + + /** + * Gets the color for labels rendered outside of the pie chart. If no color is provided then + * the chart will attempt to find the colors in CSS. If that is not available it will use a default color. + */ + igPieChart(optionLiteral: 'option', optionName: "labelOuterColor"): string; + + /** + * Sets the color for labels rendered outside of the pie chart. If no color is provided then + * the chart will attempt to find the colors in CSS. If that is not available it will use a default color. + * + * @optionValue New value to be set. + */ + igPieChart(optionLiteral: 'option', optionName: "labelOuterColor", optionValue: string): void; + + /** + * Gets the color for labels rendered inside of the pie chart. If no color is provided then + * the chart will attempt to find the colors in CSS. If that is not available it will use a default color. + */ + igPieChart(optionLiteral: 'option', optionName: "labelInnerColor"): string; + + /** + * Sets the color for labels rendered inside of the pie chart. If no color is provided then + * the chart will attempt to find the colors in CSS. If that is not available it will use a default color. + * + * @optionValue New value to be set. + */ + igPieChart(optionLiteral: 'option', optionName: "labelInnerColor", optionValue: string): void; + + /** + * Gets the type of selection the pie chart allows. + * + */ + igPieChart(optionLiteral: 'option', optionName: "selectionMode"): string; + + /** + * Sets the type of selection the pie chart allows. + * + * + * @optionValue New value to be set. + */ + igPieChart(optionLiteral: 'option', optionName: "selectionMode", optionValue: string): void; + + /** + * Gets the currently selected data item. If a different data item is provided the pie chart + * will select the slice associated with the new item. + */ + igPieChart(optionLiteral: 'option', optionName: "selectedItem"): any; + + /** + * Sets the currently selected data item. If a different data item is provided the pie chart + * will select the slice associated with the new item. + * + * @optionValue New value to be set. + */ + igPieChart(optionLiteral: 'option', optionName: "selectedItem", optionValue: any): void; + + /** + * Gets the currently selected data items. Adding or removing data items from this array will + * select or deselect the slices associated with those items. + */ + igPieChart(optionLiteral: 'option', optionName: "selectedItems"): any[]; + + /** + * Sets the currently selected data items. Adding or removing data items from this array will + * select or deselect the slices associated with those items. + * + * @optionValue New value to be set. + */ + igPieChart(optionLiteral: 'option', optionName: "selectedItems", optionValue: any[]): void; + + /** + * Gets whether the leader lines are visible. + * + */ + igPieChart(optionLiteral: 'option', optionName: "leaderLineVisibility"): string; + + /** + * Sets whether the leader lines are visible. + * + * + * @optionValue New value to be set. + */ + igPieChart(optionLiteral: 'option', optionName: "leaderLineVisibility", optionValue: string): void; + + /** + * Gets what type of leader lines will be used for the outside end labels. + * + */ + igPieChart(optionLiteral: 'option', optionName: "leaderLineType"): string; + + /** + * Sets what type of leader lines will be used for the outside end labels. + * + * + * @optionValue New value to be set. + */ + igPieChart(optionLiteral: 'option', optionName: "leaderLineType", optionValue: string): void; + + /** + * Gets the margin between a label and the end of its leader line. + */ + igPieChart(optionLiteral: 'option', optionName: "leaderLineMargin"): number; + + /** + * Sets the margin between a label and the end of its leader line. + * + * @optionValue New value to be set. + */ + igPieChart(optionLiteral: 'option', optionName: "leaderLineMargin", optionValue: number): void; + + /** + * Gets the threshold value that determines if slices are grouped into the Others slice. + */ + igPieChart(optionLiteral: 'option', optionName: "othersCategoryThreshold"): number; + + /** + * Sets the threshold value that determines if slices are grouped into the Others slice. + * + * @optionValue New value to be set. + */ + igPieChart(optionLiteral: 'option', optionName: "othersCategoryThreshold", optionValue: number): void; + + /** + * Gets the function to use to transform a pie slice data context into a label for the slice. Function takes one argument of type object. + * Use context.item to get the item associated with the slice, if any. + * Use context.outline to get the outline brush used to paint the slice. + * Use context.itemLabel to get the label object that would be used for the slice. + * Use context.percentValue to see the percentage value that is associated with the slice. + * Use context.isOthersSlice to tell if the associated slice is the others slice. + * Should return a string value that should be used for the label. + */ + igPieChart(optionLiteral: 'option', optionName: "formatLabel"): Function; + + /** + * Sets the function to use to transform a pie slice data context into a label for the slice. Function takes one argument of type object. + * Use context.item to get the item associated with the slice, if any. + * Use context.outline to get the outline brush used to paint the slice. + * Use context.itemLabel to get the label object that would be used for the slice. + * Use context.percentValue to see the percentage value that is associated with the slice. + * Use context.isOthersSlice to tell if the associated slice is the others slice. + * Should return a string value that should be used for the label. + * + * @optionValue New value to be set. + */ + igPieChart(optionLiteral: 'option', optionName: "formatLabel", optionValue: Function): void; + + /** + * Gets a style object that can be used to override the style settings on the others category slice. + */ + igPieChart(optionLiteral: 'option', optionName: "othersCategoryStyle"): any; + + /** + * Sets a style object that can be used to override the style settings on the others category slice. + * + * @optionValue New value to be set. + */ + igPieChart(optionLiteral: 'option', optionName: "othersCategoryStyle", optionValue: any): void; + + /** + * Gets whether to use numeric or percent-based threshold value. + */ + igPieChart(optionLiteral: 'option', optionName: "othersCategoryType"): string; + + /** + * Sets whether to use numeric or percent-based threshold value. + * + * @optionValue New value to be set. + */ + igPieChart(optionLiteral: 'option', optionName: "othersCategoryType", optionValue: string): void; + + /** + * Gets the label of the Others slice. + */ + igPieChart(optionLiteral: 'option', optionName: "othersCategoryText"): string; + + /** + * Sets the label of the Others slice. + * + * @optionValue New value to be set. + */ + igPieChart(optionLiteral: 'option', optionName: "othersCategoryText", optionValue: string): void; + + /** + * Determines how much the exploded slice is offset from the center. Value between 0 and 1. + */ + igPieChart(optionLiteral: 'option', optionName: "explodedRadius"): number; + + /** + * Determines how much the exploded slice is offset from the center. Value between 0 and 1. + * + * @optionValue New value to be set. + */ + igPieChart(optionLiteral: 'option', optionName: "explodedRadius", optionValue: number): void; + + /** + * Gets the scaling factor of the chart's radius. Value between 0 and 1. + */ + igPieChart(optionLiteral: 'option', optionName: "radiusFactor"): number; + + /** + * Sets the scaling factor of the chart's radius. Value between 0 and 1. + * + * @optionValue New value to be set. + */ + igPieChart(optionLiteral: 'option', optionName: "radiusFactor", optionValue: number): void; + + /** + * Gets whether the slices can be selected. + */ + igPieChart(optionLiteral: 'option', optionName: "allowSliceSelection"): boolean; + + /** + * Sets whether the slices can be selected. + * + * @optionValue New value to be set. + */ + igPieChart(optionLiteral: 'option', optionName: "allowSliceSelection", optionValue: boolean): void; + + /** + * Gets whether the slices can be exploded. + */ + igPieChart(optionLiteral: 'option', optionName: "allowSliceExplosion"): boolean; + + /** + * Sets whether the slices can be exploded. + * + * @optionValue New value to be set. + */ + igPieChart(optionLiteral: 'option', optionName: "allowSliceExplosion", optionValue: boolean): void; + + /** + * Gets the collection of exploded slice indices. + * Should be an array of integers that indicate the indexes of the slices to explode. + */ + igPieChart(optionLiteral: 'option', optionName: "explodedSlices"): any[]; + + /** + * Sets the collection of exploded slice indices. + * Should be an array of integers that indicate the indexes of the slices to explode. + * + * @optionValue New value to be set. + */ + igPieChart(optionLiteral: 'option', optionName: "explodedSlices", optionValue: any[]): void; + + /** + * Sets the collection of selected slice indices. + * Should be an array of integers that indicate the indexes of the slices to select. + */ + igPieChart(optionLiteral: 'option', optionName: "selectedSlices"): any[]; + + /** + * Sets the collection of selected slice indices. + * Should be an array of integers that indicate the indexes of the slices to select. + * + * @optionValue New value to be set. + */ + igPieChart(optionLiteral: 'option', optionName: "selectedSlices", optionValue: any[]): void; + + /** + * Whether the chart should render a tooltip. + */ + igPieChart(optionLiteral: 'option', optionName: "showTooltip"): boolean; + + /** + * Whether the chart should render a tooltip. + * + * @optionValue New value to be set. + */ + igPieChart(optionLiteral: 'option', optionName: "showTooltip", optionValue: boolean): void; + + /** + * The name of template or the template itself that chart tooltip will use to render. + */ + igPieChart(optionLiteral: 'option', optionName: "tooltipTemplate"): string; + + /** + * The name of template or the template itself that chart tooltip will use to render. + * + * @optionValue New value to be set. + */ + igPieChart(optionLiteral: 'option', optionName: "tooltipTemplate", optionValue: string): void; + + /** + * Can be any valid options accepted by $.ig.ChartLegend, or an instance of an $.ig.ChartLegend itself. + */ + igPieChart(optionLiteral: 'option', optionName: "legend"): IgPieChartLegend; + + /** + * Can be any valid options accepted by $.ig.ChartLegend, or an instance of an $.ig.ChartLegend itself. + * + * @optionValue New value to be set. + */ + igPieChart(optionLiteral: 'option', optionName: "legend", optionValue: IgPieChartLegend): void; + + /** + * Gets the pixel amount, by which the labels are offset from the edge of the slices. + */ + igPieChart(optionLiteral: 'option', optionName: "labelExtent"): number; + + /** + * Sets the pixel amount, by which the labels are offset from the edge of the slices. + * + * @optionValue New value to be set. + */ + igPieChart(optionLiteral: 'option', optionName: "labelExtent", optionValue: number): void; + + /** + * Gets the starting angle of the chart. + * The default zero value is equivalent to 3 o'clock. + */ + igPieChart(optionLiteral: 'option', optionName: "startAngle"): number; + + /** + * Sets the starting angle of the chart. + * The default zero value is equivalent to 3 o'clock. + * + * @optionValue New value to be set. + */ + igPieChart(optionLiteral: 'option', optionName: "startAngle", optionValue: number): void; + + /** + * Gets the rotational direction of the chart. + * + */ + igPieChart(optionLiteral: 'option', optionName: "sweepDirection"): string; + + /** + * Sets the rotational direction of the chart. + * + * + * @optionValue New value to be set. + */ + igPieChart(optionLiteral: 'option', optionName: "sweepDirection", optionValue: string): void; + + /** + * Gets the style used when a slice is selected. + */ + igPieChart(optionLiteral: 'option', optionName: "selectedStyle"): any; + + /** + * Sets the style used when a slice is selected. + * + * @optionValue New value to be set. + */ + igPieChart(optionLiteral: 'option', optionName: "selectedStyle", optionValue: any): void; + + /** + * Gets the Brushes property. + * The brushes property defines the palette from which automatically assigned slice brushes are selected. + * The value provided should be an array of css color strings. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + igPieChart(optionLiteral: 'option', optionName: "brushes"): any; + + /** + * Sets the Brushes property. + * The brushes property defines the palette from which automatically assigned slice brushes are selected. + * The value provided should be an array of css color strings. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + * + * @optionValue New value to be set. + */ + igPieChart(optionLiteral: 'option', optionName: "brushes", optionValue: any): void; + + /** + * Gets the Outlines property. + * The Outlines property defines the palette from which automatically assigned slice outlines are selected. + * The value provided should be an array of css color strings. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + igPieChart(optionLiteral: 'option', optionName: "outlines"): any; + + /** + * Sets the Outlines property. + * The Outlines property defines the palette from which automatically assigned slice outlines are selected. + * The value provided should be an array of css color strings. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + * + * @optionValue New value to be set. + */ + igPieChart(optionLiteral: 'option', optionName: "outlines", optionValue: any): void; + + /** + * Gets the LegendItemTemplate property. + * The legend item control content is created according to the LegendItemTemplate on-demand by + * the chart object itself. + * The provided object should have properties called render and optionally measure. See definition for option: legendItemBadgeTemplate + */ + igPieChart(optionLiteral: 'option', optionName: "legendItemTemplate"): any; + + /** + * Sets the LegendItemTemplate property. + * The legend item control content is created according to the LegendItemTemplate on-demand by + * the chart object itself. + * The provided object should have properties called render and optionally measure. See definition for option: legendItemBadgeTemplate + * + * @optionValue New value to be set. + */ + igPieChart(optionLiteral: 'option', optionName: "legendItemTemplate", optionValue: any): void; + + /** + * Gets the LegendItemBadgeTemplate property. + * The legend item badge is created according to the LegendItemBadgeTemplate on-demand by + * the chart object itself. + * The provided object should have properties called render and optionally measure. See definition for option: legendItemBadgeTemplate + */ + igPieChart(optionLiteral: 'option', optionName: "legendItemBadgeTemplate"): any; + + /** + * Sets the LegendItemBadgeTemplate property. + * The legend item badge is created according to the LegendItemBadgeTemplate on-demand by + * the chart object itself. + * The provided object should have properties called render and optionally measure. See definition for option: legendItemBadgeTemplate + * + * @optionValue New value to be set. + */ + igPieChart(optionLiteral: 'option', optionName: "legendItemBadgeTemplate", optionValue: any): void; + + /** + * Overrides the style used for text in the pie chart. + */ + igPieChart(optionLiteral: 'option', optionName: "textStyle"): string; + + /** + * Overrides the style used for text in the pie chart. + * + * @optionValue New value to be set. + */ + igPieChart(optionLiteral: 'option', optionName: "textStyle", optionValue: string): void; + + /** + * The swatch used to style this widget + */ + igPieChart(optionLiteral: 'option', optionName: "theme"): string; + + /** + * The swatch used to style this widget + * + * @optionValue New value to be set. + */ + igPieChart(optionLiteral: 'option', optionName: "theme", optionValue: string): void; + + /** + * Event fired when the mouse has hovered on an element long enough to display a tooltip + * Function takes arguments evt and ui. + * Use ui.element to get reference to tooltip DOM element. + * Use ui.item to get reference to current pie chart item. + * Use ui.chart to get reference to chart object. + */ + igPieChart(optionLiteral: 'option', optionName: "tooltipShowing"): TooltipShowingEvent; + + /** + * Event fired when the mouse has hovered on an element long enough to display a tooltip + * Function takes arguments evt and ui. + * Use ui.element to get reference to tooltip DOM element. + * Use ui.item to get reference to current pie chart item. + * Use ui.chart to get reference to chart object. + * + * @optionValue Define event handler function. + */ + igPieChart(optionLiteral: 'option', optionName: "tooltipShowing", optionValue: TooltipShowingEvent): void; + + /** + * Event fired after a tooltip is shown + * Function takes arguments evt and ui. + * Use ui.element to get reference to tooltip DOM element. + * Use ui.item to get reference to current pie chart item. + * Use ui.chart to get reference to chart object. + */ + igPieChart(optionLiteral: 'option', optionName: "tooltipShown"): TooltipShownEvent; + + /** + * Event fired after a tooltip is shown + * Function takes arguments evt and ui. + * Use ui.element to get reference to tooltip DOM element. + * Use ui.item to get reference to current pie chart item. + * Use ui.chart to get reference to chart object. + * + * @optionValue Define event handler function. + */ + igPieChart(optionLiteral: 'option', optionName: "tooltipShown", optionValue: TooltipShownEvent): void; + + /** + * Event fired when the mouse has left an element and the tooltip is about to hide + * Function takes arguments evt and ui. + * Use ui.element to get reference to tooltip DOM element. + * Use ui.item to get reference to current pie chart item. + * Use ui.chart to get reference to chart object. + */ + igPieChart(optionLiteral: 'option', optionName: "tooltipHiding"): TooltipHidingEvent; + + /** + * Event fired when the mouse has left an element and the tooltip is about to hide + * Function takes arguments evt and ui. + * Use ui.element to get reference to tooltip DOM element. + * Use ui.item to get reference to current pie chart item. + * Use ui.chart to get reference to chart object. + * + * @optionValue Define event handler function. + */ + igPieChart(optionLiteral: 'option', optionName: "tooltipHiding", optionValue: TooltipHidingEvent): void; + + /** + * Event fired after a tooltip is hidden + * Function takes arguments evt and ui. + * Use ui.element to get reference to tooltip DOM element. + * Use ui.item to get reference to current pie chart item. + * Use ui.chart to get reference to chart object. + */ + igPieChart(optionLiteral: 'option', optionName: "tooltipHidden"): TooltipHiddenEvent; + + /** + * Event fired after a tooltip is hidden + * Function takes arguments evt and ui. + * Use ui.element to get reference to tooltip DOM element. + * Use ui.item to get reference to current pie chart item. + * Use ui.chart to get reference to chart object. + * + * @optionValue Define event handler function. + */ + igPieChart(optionLiteral: 'option', optionName: "tooltipHidden", optionValue: TooltipHiddenEvent): void; + + /** + * Event fired when the control is displayed on a non HTML5 compliant browser + */ + igPieChart(optionLiteral: 'option', optionName: "browserNotSupported"): BrowserNotSupportedEvent; + + /** + * Event fired when the control is displayed on a non HTML5 compliant browser + * + * @optionValue Define event handler function. + */ + igPieChart(optionLiteral: 'option', optionName: "browserNotSupported", optionValue: BrowserNotSupportedEvent): void; + + /** + * Raised when the slice is clicked. + * Function takes arguments evt and ui. + * Use ui.chart to get reference to chart object. + * Use ui.slice to get reference to slice object. + * Use ui.slice.item to get reference to current pie chart item. + * Use ui.slice.isExploded to get is the slice exploded. + * Use ui.slice.isSelected to get is the slice selected. + */ + igPieChart(optionLiteral: 'option', optionName: "sliceClick"): SliceClickEvent; + + /** + * Raised when the slice is clicked. + * Function takes arguments evt and ui. + * Use ui.chart to get reference to chart object. + * Use ui.slice to get reference to slice object. + * Use ui.slice.item to get reference to current pie chart item. + * Use ui.slice.isExploded to get is the slice exploded. + * Use ui.slice.isSelected to get is the slice selected. + * + * @optionValue New value to be set. + */ + igPieChart(optionLiteral: 'option', optionName: "sliceClick", optionValue: SliceClickEvent): void; + + /** + * Raised when a slice's label is clicked. + * Function takes arguments evt and ui. + * Use ui.item to get reference to the slice object. + * Use ui.allowSliceClick to determine whether or not the label click should fire slice click event. + */ + igPieChart(optionLiteral: 'option', optionName: "labelClick"): LabelClickEvent; + + /** + * Raised when a slice's label is clicked. + * Function takes arguments evt and ui. + * Use ui.item to get reference to the slice object. + * Use ui.allowSliceClick to determine whether or not the label click should fire slice click event. + * + * @optionValue New value to be set. + */ + igPieChart(optionLiteral: 'option', optionName: "labelClick", optionValue: LabelClickEvent): void; + + /** + * Event fired when the selectedItem option is about to change. + * Function takes arguments evt and ui. + * Use ui.oldItem to get a reference to the current selected data item. + * Use ui.newItem to get a reference to the newly selected data item. + * Use ui.cancel to stop the selected item from changing. + */ + igPieChart(optionLiteral: 'option', optionName: "selectedItemChanging"): SelectedItemChangingEvent; + + /** + * Event fired when the selectedItem option is about to change. + * Function takes arguments evt and ui. + * Use ui.oldItem to get a reference to the current selected data item. + * Use ui.newItem to get a reference to the newly selected data item. + * Use ui.cancel to stop the selected item from changing. + * + * @optionValue Define event handler function. + */ + igPieChart(optionLiteral: 'option', optionName: "selectedItemChanging", optionValue: SelectedItemChangingEvent): void; + + /** + * Event fired when the selectedItem option has changed. + * Function takes arguments evt and ui. + * Use ui.oldItem to get a reference to the previous selected data item. + * Use ui.newItem to get a reference to the current selected data item. + */ + igPieChart(optionLiteral: 'option', optionName: "selectedItemChanged"): SelectedItemChangedEvent; + + /** + * Event fired when the selectedItem option has changed. + * Function takes arguments evt and ui. + * Use ui.oldItem to get a reference to the previous selected data item. + * Use ui.newItem to get a reference to the current selected data item. + * + * @optionValue Define event handler function. + */ + igPieChart(optionLiteral: 'option', optionName: "selectedItemChanged", optionValue: SelectedItemChangedEvent): void; + + /** + * Event fired when the selectedItems array is about to change. + * Function takes arguments evt and ui. + * Use ui.oldItems to get a reference to the current selected data items. + * Use ui.newItems to get a reference to the newly selected data items. + * Use ui.cancel to stop the selected items from changing. + */ + igPieChart(optionLiteral: 'option', optionName: "selectedItemsChanging"): SelectedItemsChangingEvent; + + /** + * Event fired when the selectedItems array is about to change. + * Function takes arguments evt and ui. + * Use ui.oldItems to get a reference to the current selected data items. + * Use ui.newItems to get a reference to the newly selected data items. + * Use ui.cancel to stop the selected items from changing. + * + * @optionValue Define event handler function. + */ + igPieChart(optionLiteral: 'option', optionName: "selectedItemsChanging", optionValue: SelectedItemsChangingEvent): void; + + /** + * Event fired when the selectedItems array has changed. + * Function takes arguments evt and ui. + * Use ui.oldItems to get a reference to the previous selected data items. + * Use ui.newItems to get a reference to the current selected data items. + */ + igPieChart(optionLiteral: 'option', optionName: "selectedItemsChanged"): SelectedItemsChangedEvent; + + /** + * Event fired when the selectedItems array has changed. + * Function takes arguments evt and ui. + * Use ui.oldItems to get a reference to the previous selected data items. + * Use ui.newItems to get a reference to the current selected data items. + * + * @optionValue Define event handler function. + */ + igPieChart(optionLiteral: 'option', optionName: "selectedItemsChanged", optionValue: SelectedItemsChangedEvent): void; + igPieChart(options: IgPieChart): JQuery; + igPieChart(optionLiteral: 'option', optionName: string): any; + igPieChart(optionLiteral: 'option', options: IgPieChart): JQuery; + igPieChart(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igPieChart(methodName: string, ...methodParams: any[]): any; +} +interface LegendItemMouseLeftButtonDownEvent { + (event: Event, ui: LegendItemMouseLeftButtonDownEventUIParam): void; +} + +interface LegendItemMouseLeftButtonDownEventUIParam { + /** + * Used to get reference to current legend object. + */ + legend?: any; + + /** + * Used to get reference to chart owner object. + */ + chart?: any; + + /** + * Used to get reference to current series owner object. + */ + series?: any; + + /** + * Used to get legend item brush. + */ + actualItemBrush?: any; + + /** + * Used to get series owner brush. + */ + actualSeriesBrush?: any; + + /** + * Used to get reference to chart item related to event. + */ + item?: any; +} + +interface LegendItemMouseLeftButtonUpEvent { + (event: Event, ui: LegendItemMouseLeftButtonUpEventUIParam): void; +} + +interface LegendItemMouseLeftButtonUpEventUIParam { + /** + * Used to get reference to current legend object. + */ + legend?: any; + + /** + * Used to get reference to chart owner object. + */ + chart?: any; + + /** + * Used to get reference to current series owner object. + */ + series?: any; + + /** + * Used to get legend item brush. + */ + actualItemBrush?: any; + + /** + * Used to get series owner brush. + */ + actualSeriesBrush?: any; + + /** + * Used to get reference to chart item related to event. + */ + item?: any; +} + +interface LegendItemMouseEnterEvent { + (event: Event, ui: LegendItemMouseEnterEventUIParam): void; +} + +interface LegendItemMouseEnterEventUIParam { + /** + * Used to get reference to current legend object. + */ + legend?: any; + + /** + * Used to get reference to chart owner object. + */ + chart?: any; + + /** + * Used to get reference to current series owner object. + */ + series?: any; + + /** + * Used to get legend item brush. + */ + actualItemBrush?: any; + + /** + * Used to get series owner brush. + */ + actualSeriesBrush?: any; + + /** + * Used to get reference to chart item related to event. + */ + item?: any; +} + +interface LegendItemMouseLeaveEvent { + (event: Event, ui: LegendItemMouseLeaveEventUIParam): void; +} + +interface LegendItemMouseLeaveEventUIParam { + /** + * Used to get reference to current legend object. + */ + legend?: any; + + /** + * Used to get reference to chart owner object. + */ + chart?: any; + + /** + * Used to get reference to current series owner object. + */ + series?: any; + + /** + * Used to get legend item brush. + */ + actualItemBrush?: any; + + /** + * Used to get series owner brush. + */ + actualSeriesBrush?: any; + + /** + * Used to get reference to chart item related to event. + */ + item?: any; +} + +interface IgChartLegend { + /** + * Type of the legend. + * + * Valid values: + * "item" Specify the legend as item legend. It displays a legend item for each pie in the igPieChart control. + * "legend" Specify the legend as legend. It is supported by all types of series in the igDataChart control. + * "scale" Specify the legend as a scale legend. It displays a color/size scale for the bubble series. + */ + type?: string; + + /** + * The width of the legend. It can be set as a number in pixels, string (px) or percentage (%). + */ + width?: string|number; + + /** + * The height of the legend. It can be set as a number in pixels, string (px) or percentage (%). + */ + height?: string|number; + + /** + * The swatch used to style this widget + */ + theme?: string; + + /** + * Occurs when the left mouse button is pressed while the mouse pointer is over an element of this legend. + * Function takes arguments evt and ui. + * Use ui.legend to get reference to current legend object. + * Use ui.chart to get reference to chart owner object. + * Use ui.series to get reference to current series owner object. + * Use ui.actualItemBrush to get legend item brush. + * Use ui.actualSeriesBrush to get series owner brush. + * Use ui.item to get reference to chart item related to event. + */ + legendItemMouseLeftButtonDown?: LegendItemMouseLeftButtonDownEvent; + + /** + * Occurs when the left mouse button is released while the mouse pointer is over an element of this legend. + * Function takes arguments evt and ui. + * Use ui.legend to get reference to current legend object. + * Use ui.chart to get reference to chart owner object. + * Use ui.series to get reference to current series owner object. + * Use ui.actualItemBrush to get legend item brush. + * Use ui.actualSeriesBrush to get series owner brush. + * Use ui.item to get reference to chart item related to event. + */ + legendItemMouseLeftButtonUp?: LegendItemMouseLeftButtonUpEvent; + + /** + * Occurs when the left mouse pointer enters an element of this legend. + * Function takes arguments evt and ui. + * Use ui.legend to get reference to current legend object. + * Use ui.chart to get reference to chart owner object. + * Use ui.series to get reference to current series owner object. + * Use ui.actualItemBrush to get legend item brush. + * Use ui.actualSeriesBrush to get series owner brush. + * Use ui.item to get reference to chart item related to event. + */ + legendItemMouseEnter?: LegendItemMouseEnterEvent; + + /** + * Occurs when the left mouse pointer leaves an element of this legend. + * Function takes arguments evt and ui. + * Use ui.legend to get reference to current legend object. + * Use ui.chart to get reference to chart owner object. + * Use ui.series to get reference to current series owner object. + * Use ui.actualItemBrush to get legend item brush. + * Use ui.actualSeriesBrush to get series owner brush. + * Use ui.item to get reference to chart item related to event. + */ + legendItemMouseLeave?: LegendItemMouseLeaveEvent; + + /** + * Option for igChartLegend + */ + [optionName: string]: any; +} +interface IgChartLegendMethods { + exportVisualData(): void; + + /** + * Destroys the widget. + */ + destroy(): void; + + /** + * Returns the element holding the legend. + */ + widget(): void; + + /** + * Returns the ID of the DOM element holding the legend. + */ + id(): string; +} +interface JQuery { + data(propertyName: "igChartLegend"): IgChartLegendMethods; +} + +interface JQuery { + igChartLegend(methodName: "exportVisualData"): void; + igChartLegend(methodName: "destroy"): void; + igChartLegend(methodName: "widget"): void; + igChartLegend(methodName: "id"): string; + + /** + * Type of the legend. + */ + igChartLegend(optionLiteral: 'option', optionName: "type"): string; + + /** + * Type of the legend. + * + * @optionValue New value to be set. + */ + igChartLegend(optionLiteral: 'option', optionName: "type", optionValue: string): void; + + /** + * The width of the legend. It can be set as a number in pixels, string (px) or percentage (%). + */ + igChartLegend(optionLiteral: 'option', optionName: "width"): string|number; + + /** + * The width of the legend. It can be set as a number in pixels, string (px) or percentage (%). + * + * @optionValue New value to be set. + */ + igChartLegend(optionLiteral: 'option', optionName: "width", optionValue: string|number): void; + + /** + * The height of the legend. It can be set as a number in pixels, string (px) or percentage (%). + */ + igChartLegend(optionLiteral: 'option', optionName: "height"): string|number; + + /** + * The height of the legend. It can be set as a number in pixels, string (px) or percentage (%). + * + * @optionValue New value to be set. + */ + igChartLegend(optionLiteral: 'option', optionName: "height", optionValue: string|number): void; + + /** + * The swatch used to style this widget + */ + igChartLegend(optionLiteral: 'option', optionName: "theme"): string; + + /** + * The swatch used to style this widget + * + * @optionValue New value to be set. + */ + igChartLegend(optionLiteral: 'option', optionName: "theme", optionValue: string): void; + + /** + * Occurs when the left mouse button is pressed while the mouse pointer is over an element of this legend. + * Function takes arguments evt and ui. + * Use ui.legend to get reference to current legend object. + * Use ui.chart to get reference to chart owner object. + * Use ui.series to get reference to current series owner object. + * Use ui.actualItemBrush to get legend item brush. + * Use ui.actualSeriesBrush to get series owner brush. + * Use ui.item to get reference to chart item related to event. + */ + igChartLegend(optionLiteral: 'option', optionName: "legendItemMouseLeftButtonDown"): LegendItemMouseLeftButtonDownEvent; + + /** + * Occurs when the left mouse button is pressed while the mouse pointer is over an element of this legend. + * Function takes arguments evt and ui. + * Use ui.legend to get reference to current legend object. + * Use ui.chart to get reference to chart owner object. + * Use ui.series to get reference to current series owner object. + * Use ui.actualItemBrush to get legend item brush. + * Use ui.actualSeriesBrush to get series owner brush. + * Use ui.item to get reference to chart item related to event. + * + * @optionValue New value to be set. + */ + igChartLegend(optionLiteral: 'option', optionName: "legendItemMouseLeftButtonDown", optionValue: LegendItemMouseLeftButtonDownEvent): void; + + /** + * Occurs when the left mouse button is released while the mouse pointer is over an element of this legend. + * Function takes arguments evt and ui. + * Use ui.legend to get reference to current legend object. + * Use ui.chart to get reference to chart owner object. + * Use ui.series to get reference to current series owner object. + * Use ui.actualItemBrush to get legend item brush. + * Use ui.actualSeriesBrush to get series owner brush. + * Use ui.item to get reference to chart item related to event. + */ + igChartLegend(optionLiteral: 'option', optionName: "legendItemMouseLeftButtonUp"): LegendItemMouseLeftButtonUpEvent; + + /** + * Occurs when the left mouse button is released while the mouse pointer is over an element of this legend. + * Function takes arguments evt and ui. + * Use ui.legend to get reference to current legend object. + * Use ui.chart to get reference to chart owner object. + * Use ui.series to get reference to current series owner object. + * Use ui.actualItemBrush to get legend item brush. + * Use ui.actualSeriesBrush to get series owner brush. + * Use ui.item to get reference to chart item related to event. + * + * @optionValue New value to be set. + */ + igChartLegend(optionLiteral: 'option', optionName: "legendItemMouseLeftButtonUp", optionValue: LegendItemMouseLeftButtonUpEvent): void; + + /** + * Occurs when the left mouse pointer enters an element of this legend. + * Function takes arguments evt and ui. + * Use ui.legend to get reference to current legend object. + * Use ui.chart to get reference to chart owner object. + * Use ui.series to get reference to current series owner object. + * Use ui.actualItemBrush to get legend item brush. + * Use ui.actualSeriesBrush to get series owner brush. + * Use ui.item to get reference to chart item related to event. + */ + igChartLegend(optionLiteral: 'option', optionName: "legendItemMouseEnter"): LegendItemMouseEnterEvent; + + /** + * Occurs when the left mouse pointer enters an element of this legend. + * Function takes arguments evt and ui. + * Use ui.legend to get reference to current legend object. + * Use ui.chart to get reference to chart owner object. + * Use ui.series to get reference to current series owner object. + * Use ui.actualItemBrush to get legend item brush. + * Use ui.actualSeriesBrush to get series owner brush. + * Use ui.item to get reference to chart item related to event. + * + * @optionValue New value to be set. + */ + igChartLegend(optionLiteral: 'option', optionName: "legendItemMouseEnter", optionValue: LegendItemMouseEnterEvent): void; + + /** + * Occurs when the left mouse pointer leaves an element of this legend. + * Function takes arguments evt and ui. + * Use ui.legend to get reference to current legend object. + * Use ui.chart to get reference to chart owner object. + * Use ui.series to get reference to current series owner object. + * Use ui.actualItemBrush to get legend item brush. + * Use ui.actualSeriesBrush to get series owner brush. + * Use ui.item to get reference to chart item related to event. + */ + igChartLegend(optionLiteral: 'option', optionName: "legendItemMouseLeave"): LegendItemMouseLeaveEvent; + + /** + * Occurs when the left mouse pointer leaves an element of this legend. + * Function takes arguments evt and ui. + * Use ui.legend to get reference to current legend object. + * Use ui.chart to get reference to chart owner object. + * Use ui.series to get reference to current series owner object. + * Use ui.actualItemBrush to get legend item brush. + * Use ui.actualSeriesBrush to get series owner brush. + * Use ui.item to get reference to chart item related to event. + * + * @optionValue New value to be set. + */ + igChartLegend(optionLiteral: 'option', optionName: "legendItemMouseLeave", optionValue: LegendItemMouseLeaveEvent): void; + igChartLegend(options: IgChartLegend): JQuery; + igChartLegend(optionLiteral: 'option', optionName: string): any; + igChartLegend(optionLiteral: 'option', options: IgChartLegend): JQuery; + igChartLegend(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igChartLegend(methodName: string, ...methodParams: any[]): any; +} +interface ColorSelectedEvent { + (event: Event, ui: ColorSelectedEventUIParam): void; +} + +interface ColorSelectedEventUIParam { + /** + * Used to get a reference to the color object. + */ + color?: any; +} + +interface IgColorPicker { + /** + * Gets/Sets the default colors. Default colors are the ones displayed in the upper table of the color picker. + * The array should contain arrays that contain the color values for every next row. + * + */ + colors?: string; + + /** + * Gets/Sets the standard colors. Standard colors are the ones displayed in the color picker bottom, + * visually separated from the default colors. The array should contain the color values. + * + */ + standardColors?: any[]; + + /** + * The event is fired when a color is selected. + * + * Function takes arguments evt and ui. + * Use ui.color to get a reference to the color object. + */ + colorSelected?: ColorSelectedEvent; + + /** + * Option for igColorPicker + */ + [optionName: string]: any; +} +interface IgColorPickerMethods { + /** + * Gets a reference to the div element of the color table + */ + colorTable(): Object; + + /** + * Gets a reference to the div element with the default or custom colors table. + */ + customColorTable(): Object; + + /** + * Returns the div element with the standard color table. + */ + standardColorsTable(): Object; + + /** + * Gets the color for an element from the color picker in RGB format. + * + * @param $element A jQuery element in the color picker from which the color will be retrieved. + */ + colorFromElement($element: Object): string; + + /** + * Returns the hexademical string of the currently selected color in the color picker. Returns null if no color is selected. + * @return string|null Returns the selected color if available. Null if no color is selected. + */ + selectedColor(): string; + + /** + * Select a color. + * + * @param color The #RGB value of the color to be selected. + */ + selectColor(color: string): Object; +} +interface JQuery { + data(propertyName: "igColorPicker"): IgColorPickerMethods; +} + +interface JQuery { + igColorPicker(methodName: "colorTable"): Object; + igColorPicker(methodName: "customColorTable"): Object; + igColorPicker(methodName: "standardColorsTable"): Object; + igColorPicker(methodName: "colorFromElement", $element: Object): string; + igColorPicker(methodName: "selectedColor"): string; + igColorPicker(methodName: "selectColor", color: string): Object; + + /** + * Gets/Sets the default colors. Default colors are the ones displayed in the upper table of the color picker. + * The array should contain arrays that contain the color values for every next row. + * + */ + igColorPicker(optionLiteral: 'option', optionName: "colors"): string; + + /** + * /Sets the default colors. Default colors are the ones displayed in the upper table of the color picker. + * The array should contain arrays that contain the color values for every next row. + * + * + * @optionValue New value to be set. + */ + igColorPicker(optionLiteral: 'option', optionName: "colors", optionValue: string): void; + + /** + * Gets/Sets the standard colors. Standard colors are the ones displayed in the color picker bottom, + * visually separated from the default colors. The array should contain the color values. + * + */ + igColorPicker(optionLiteral: 'option', optionName: "standardColors"): any[]; + + /** + * /Sets the standard colors. Standard colors are the ones displayed in the color picker bottom, + * visually separated from the default colors. The array should contain the color values. + * + * + * @optionValue New value to be set. + */ + igColorPicker(optionLiteral: 'option', optionName: "standardColors", optionValue: any[]): void; + + /** + * The event is fired when a color is selected. + * + * Function takes arguments evt and ui. + * Use ui.color to get a reference to the color object. + */ + igColorPicker(optionLiteral: 'option', optionName: "colorSelected"): ColorSelectedEvent; + + /** + * The event is fired when a color is selected. + * + * Function takes arguments evt and ui. + * Use ui.color to get a reference to the color object. + * + * @optionValue New value to be set. + */ + igColorPicker(optionLiteral: 'option', optionName: "colorSelected", optionValue: ColorSelectedEvent): void; + igColorPicker(options: IgColorPicker): JQuery; + igColorPicker(optionLiteral: 'option', optionName: string): any; + igColorPicker(optionLiteral: 'option', options: IgColorPicker): JQuery; + igColorPicker(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igColorPicker(methodName: string, ...methodParams: any[]): any; +} +interface ClickEvent { + (event: Event, ui: ClickEventUIParam): void; +} + +interface ClickEventUIParam { + /** + * Used to get a reference the igSplitButton element. + */ + item?: any; +} + +interface ExpandedEvent { + (event: Event, ui: ExpandedEventUIParam): void; +} + +interface ExpandedEventUIParam { + /** + * Used to get a reference the igSplitButton. + */ + owner?: any; +} + +interface ExpandingEvent { + (event: Event, ui: ExpandingEventUIParam): void; +} + +interface ExpandingEventUIParam { + /** + * Used to get a reference the igSplitButton. + */ + owner?: any; +} + +interface CollapsedEvent { + (event: Event, ui: CollapsedEventUIParam): void; +} + +interface CollapsedEventUIParam { + /** + * Used to get a reference the igSplitButton. + */ + owner?: any; +} + +interface CollapsingEvent { + (event: Event, ui: CollapsingEventUIParam): void; +} + +interface CollapsingEventUIParam { + /** + * Used to get a reference the igSplitButton. + */ + owner?: any; +} + +interface IgColorPickerSplitButton { + /** + * Button items. + * + */ + items?: any[]; + + /** + * Gets/sets the button default color value. + * + */ + defaultColor?: string; + + /** + * If this option is set to true, the igColorPickerSplitButton will be rendered with an icon. + * + */ + hasDefaultIcon?: boolean; + + /** + * Default button item name. + * + */ + defaultItemName?: string; + + /** + * Specifies whether the default button will be switched when another button is selected. + * + */ + swapDefaultEnabled?: boolean; + + /** + * Event fired when the button is clicked. + * + * Function takes arguments evt and ui. + * Use ui.item to get a reference the igSplitButton element. + */ + click?: ClickEvent; + + /** + * Event fired after the button is expanded. + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference the igSplitButton. + */ + expanded?: ExpandedEvent; + + /** + * Event fired before a button item is expanded. + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference the igSplitButton. + */ + expanding?: ExpandingEvent; + + /** + * Event fired after the button is collapsed. + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference the igSplitButton. + */ + collapsed?: CollapsedEvent; + + /** + * Event fired before a button item is collapsed. + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference the igSplitButton. + */ + collapsing?: CollapsingEvent; + + /** + * Option for igColorPickerSplitButton + */ + [optionName: string]: any; +} +interface IgColorPickerSplitButtonMethods { + /** + * Sets the color of the split button + * + * @param color The color value to be set. + */ + setColor(color: string): Object; + + /** + * Collapse the widget. + * + * @param e + */ + collapse(e: Object): Object; + + /** + * Expands the widget. + * + * @param e + */ + expand(e: Object): Object; + + /** + * Destroys the widget. + */ + destroy(): Object; + + /** + * Switch to given igToolbar button. + * + * @param button . The button jQuery element. + */ + switchToButton(button: Object): void; + widget(): void; + + /** + * Toggle widget state between collapsed and expanded. + * + * @param e The igSplitButton to be expanded/collapsed. + */ + toggle(e: Object): Object; +} +interface JQuery { + data(propertyName: "igColorPickerSplitButton"): IgColorPickerSplitButtonMethods; +} + +interface JQuery { + igColorPickerSplitButton(methodName: "setColor", color: string): Object; + igColorPickerSplitButton(methodName: "collapse", e: Object): Object; + igColorPickerSplitButton(methodName: "expand", e: Object): Object; + igColorPickerSplitButton(methodName: "destroy"): Object; + igColorPickerSplitButton(methodName: "switchToButton", button: Object): void; + igColorPickerSplitButton(methodName: "widget"): void; + igColorPickerSplitButton(methodName: "toggle", e: Object): Object; + + /** + * Button items. + * + */ + igColorPickerSplitButton(optionLiteral: 'option', optionName: "items"): any[]; + + /** + * Button items. + * + * + * @optionValue New value to be set. + */ + igColorPickerSplitButton(optionLiteral: 'option', optionName: "items", optionValue: any[]): void; + + /** + * Gets/ the button default color value. + * + */ + igColorPickerSplitButton(optionLiteral: 'option', optionName: "defaultColor"): string; + + /** + * /sets the button default color value. + * + * + * @optionValue New value to be set. + */ + igColorPickerSplitButton(optionLiteral: 'option', optionName: "defaultColor", optionValue: string): void; + + /** + * If this option is set to true, the igColorPickerSplitButton will be rendered with an icon. + * + */ + igColorPickerSplitButton(optionLiteral: 'option', optionName: "hasDefaultIcon"): boolean; + + /** + * If this option is set to true, the igColorPickerSplitButton will be rendered with an icon. + * + * + * @optionValue New value to be set. + */ + igColorPickerSplitButton(optionLiteral: 'option', optionName: "hasDefaultIcon", optionValue: boolean): void; + + /** + * Default button item name. + * + */ + igColorPickerSplitButton(optionLiteral: 'option', optionName: "defaultItemName"): string; + + /** + * Default button item name. + * + * + * @optionValue New value to be set. + */ + igColorPickerSplitButton(optionLiteral: 'option', optionName: "defaultItemName", optionValue: string): void; + + /** + * Gets whether the default button will be switched when another button is selected. + * + */ + igColorPickerSplitButton(optionLiteral: 'option', optionName: "swapDefaultEnabled"): boolean; + + /** + * Sets whether the default button will be switched when another button is selected. + * + * + * @optionValue New value to be set. + */ + igColorPickerSplitButton(optionLiteral: 'option', optionName: "swapDefaultEnabled", optionValue: boolean): void; + + /** + * Event fired when the button is clicked. + * + * Function takes arguments evt and ui. + * Use ui.item to get a reference the igSplitButton element. + */ + igColorPickerSplitButton(optionLiteral: 'option', optionName: "click"): ClickEvent; + + /** + * Event fired when the button is clicked. + * + * Function takes arguments evt and ui. + * Use ui.item to get a reference the igSplitButton element. + * + * @optionValue Define event handler function. + */ + igColorPickerSplitButton(optionLiteral: 'option', optionName: "click", optionValue: ClickEvent): void; + + /** + * Event fired after the button is expanded. + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference the igSplitButton. + */ + igColorPickerSplitButton(optionLiteral: 'option', optionName: "expanded"): ExpandedEvent; + + /** + * Event fired after the button is expanded. + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference the igSplitButton. + * + * @optionValue Define event handler function. + */ + igColorPickerSplitButton(optionLiteral: 'option', optionName: "expanded", optionValue: ExpandedEvent): void; + + /** + * Event fired before a button item is expanded. + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference the igSplitButton. + */ + igColorPickerSplitButton(optionLiteral: 'option', optionName: "expanding"): ExpandingEvent; + + /** + * Event fired before a button item is expanded. + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference the igSplitButton. + * + * @optionValue Define event handler function. + */ + igColorPickerSplitButton(optionLiteral: 'option', optionName: "expanding", optionValue: ExpandingEvent): void; + + /** + * Event fired after the button is collapsed. + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference the igSplitButton. + */ + igColorPickerSplitButton(optionLiteral: 'option', optionName: "collapsed"): CollapsedEvent; + + /** + * Event fired after the button is collapsed. + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference the igSplitButton. + * + * @optionValue Define event handler function. + */ + igColorPickerSplitButton(optionLiteral: 'option', optionName: "collapsed", optionValue: CollapsedEvent): void; + + /** + * Event fired before a button item is collapsed. + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference the igSplitButton. + */ + igColorPickerSplitButton(optionLiteral: 'option', optionName: "collapsing"): CollapsingEvent; + + /** + * Event fired before a button item is collapsed. + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference the igSplitButton. + * + * @optionValue Define event handler function. + */ + igColorPickerSplitButton(optionLiteral: 'option', optionName: "collapsing", optionValue: CollapsingEvent): void; + igColorPickerSplitButton(options: IgColorPickerSplitButton): JQuery; + igColorPickerSplitButton(optionLiteral: 'option', optionName: string): any; + igColorPickerSplitButton(optionLiteral: 'option', options: IgColorPickerSplitButton): JQuery; + igColorPickerSplitButton(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igColorPickerSplitButton(methodName: string, ...methodParams: any[]): any; +} +interface IgComboLoadOnDemandSettings { + /** + * Gets/Sets option to enable load on demand. + * + */ + enabled?: boolean; + + /** + * Gets/Sets number of records loaded on each request. + * + */ + pageSize?: number; + + /** + * Option for IgComboLoadOnDemandSettings + */ + [optionName: string]: any; +} + +interface IgComboMultiSelection { + /** + * Set enabled to true to turn multi selection on. Set to true by default when target element for the combo is a select with the multiple attribute set. + * + */ + enabled?: boolean; + + /** + * Set addWithKeyModifier to true to disable the additive selection, then additive selection can be done by ctrl + mouse click / enter. + * + */ + addWithKeyModifier?: boolean; + + /** + * Set showCheckboxes to true to render check boxes in front of each drop down item. + * + */ + showCheckboxes?: boolean; + + /** + * Use itemSeparator to set what string to be rendered between items in field. + * + */ + itemSeparator?: string; + + /** + * Option for IgComboMultiSelection + */ + [optionName: string]: any; +} + +interface IgComboGrouping { + /** + * Gets/Sets name of column by which the records will be grouped. Setting this option enables the grouping. + * + */ + key?: string; + + /** + * Specifies the sort order - ascending or descending. + * + * + * Valid values: + * "asc" + * "desc" + */ + dir?: string; + + /** + * Option for IgComboGrouping + */ + [optionName: string]: any; +} + +interface IgComboInitialSelectedItem { + /** + * Optional="true" Index of item in the list. The index should be greater than -1 and less than the count of the [items](ui.igcombo#methods:items) in the list (rows in dataSource). + * + */ + index?: number; + + /** + * Optional="true" Value matching the [valueKey](ui.igcombo#options:valueKey) property of the item. + * + */ + value?: any; + + /** + * Option for IgComboInitialSelectedItem + */ + [optionName: string]: any; +} + +interface RenderedEvent { + (event: Event, ui: RenderedEventUIParam): void; +} + +interface RenderedEventUIParam { + /** + * Used to get a reference to the combo performing rendering. + */ + owner?: any; + + /** + * Used to get a reference to the main/top combo element. + */ + element?: any; +} + +interface FilteringEvent { + (event: Event, ui: FilteringEventUIParam): void; +} + +interface FilteringEventUIParam { + /** + * Used to obtain reference to igCombo. + */ + owner?: any; + + /** + * Used to obtain reference to array which contains expressions supported by [$.ig.DataSource](ig.datasource). + */ + expression?: any; +} + +interface FilteredEvent { + (event: Event, ui: FilteredEventUIParam): void; +} + +interface FilteredEventUIParam { + /** + * Used to obtain reference to igCombo. + */ + owner?: any; + + /** + * Used to obtain a jquery reference to the rendered filtered elements. + */ + elements?: any; +} + +interface ItemsRenderingEvent { + (event: Event, ui: ItemsRenderingEventUIParam): void; +} + +interface ItemsRenderingEventUIParam { + /** + * Used to get a reference to the combo performing rendering. + */ + owner?: any; + + /** + * Used to get a reference to the [$.ig.DataSource](ig.datasource) combo is databound to. + */ + dataSource?: any; +} + +interface ItemsRenderedEvent { + (event: Event, ui: ItemsRenderedEventUIParam): void; +} + +interface ItemsRenderedEventUIParam { + /** + * Used to get a reference to the combo performing rendering. + */ + owner?: any; + + /** + * Used to get a reference to the [$.ig.DataSource](ig.datasource) combo is databound to. + */ + dataSource?: any; +} + +interface DropDownOpeningEvent { + (event: Event, ui: DropDownOpeningEventUIParam): void; +} + +interface DropDownOpeningEventUIParam { + /** + * Used to obtain reference to igCombo. + */ + owner?: any; + + /** + * Used to obtain reference to jquery DOM element which represents drop down list container. + */ + list?: any; +} + +interface DropDownOpenedEvent { + (event: Event, ui: DropDownOpenedEventUIParam): void; +} + +interface DropDownOpenedEventUIParam { + /** + * Used to obtain reference to igCombo. + */ + owner?: any; + + /** + * Used to obtain reference to jquery DOM element which represents drop down list container. + */ + list?: any; +} + +interface DropDownClosingEvent { + (event: Event, ui: DropDownClosingEventUIParam): void; +} + +interface DropDownClosingEventUIParam { + /** + * Used to obtain reference to igCombo. + */ + owner?: any; + + /** + * Used to obtain reference to jquery DOM element which represents drop down list container. + */ + list?: any; +} + +interface DropDownClosedEvent { + (event: Event, ui: DropDownClosedEventUIParam): void; +} + +interface DropDownClosedEventUIParam { + /** + * Used to obtain reference to igCombo. + */ + owner?: any; + + /** + * Used to obtain reference to jquery DOM element which represents drop down list container. + */ + list?: any; +} + +interface SelectionChangingEvent { + (event: Event, ui: SelectionChangingEventUIParam): void; +} + +interface SelectionChangingEventUIParam { + /** + * Used to obtain reference to igCombo. + */ + owner?: any; + + /** + * Used to obtain reference to array of the selected items before the new selection has happened. That can be null. + */ + currentItems?: any; + + /** + * Used to obtain reference to array of all items that will be selected after the selection finish. That can be null. + */ + items?: any; +} + +interface SelectionChangedEvent { + (event: Event, ui: SelectionChangedEventUIParam): void; +} + +interface SelectionChangedEventUIParam { + /** + * Used to obtain reference to igCombo. + */ + owner?: any; + + /** + * Used to obtain reference to array of new selected items. That can be null. + */ + items?: any; + + /** + * Used to obtain reference to array of old selected items. That can be null. + */ + oldItems?: any; +} + +interface IgCombo { + /** + * Gets/Sets the width of combo. The numeric and string values (valid html units for size) are supported. It includes %, px, em and other units. + * + */ + width?: string|number; + + /** + * Gets/Sets height of combo. The numeric and string values (valid html units for size) are supported. It includes %, px, em and other units. + * + */ + height?: string|number; + + /** + * Gets/Sets the width of drop-down list in pixels. + * + * + * Valid values: + * "string" The default drop-down list width can be set in pixels (px). + * "number" The default drop-down list width can be set as a number. + */ + dropDownWidth?: string|number; + + /** + * Gets/Sets a valid data source accepted by [$.ig.DataSource](ig.datasource), or an instance of an [$.ig.DataSource](ig.datasource) itself. + * Note: if it is set to string and [dataSourceType](ui.igcombo#options:dataSourceType) option is not set, then [$.ig.JSONDataSource](ig.jsondatasource) is used. + * + */ + dataSource?: any; + + /** + * Sets data source type (such as "json", "xml", etc). Please refer to the documentation of [$.ig.DataSource](ig.datasource) and its [type](ig.datasource#options:settings.type) property. + * + */ + dataSourceType?: string; + + /** + * Sets URL which is used for sending JSON on request for remote filtering (MVC for example). That option is required when [load on demand](ui.igcombo#options:loadOnDemandSettings) is + * [enabled](ui.igcombo#options:loadOnDemandSettings.enabled) and its [type](ui.igcombo#options:filteringType) is remote. + * + */ + dataSourceUrl?: string; + + /** + * See [$.ig.DataSource](ig.datasource) property in the response specifying the total number of records on the server. + * + */ + responseTotalRecCountKey?: string; + + /** + * See [$.ig.DataSource](ig.datasource) This is basically the property in the response where data records are held, if the response is wrapped. + * + */ + responseDataKey?: string; + + /** + * Response type when a URL is set as the data source. See http://api.jquery.com/jQuery.ajax/ => dataType. + * + * + * Valid values: + * "json" + * "xml" + * "html" + * "script" + * "jsonp" + * "text" + */ + responseDataType?: string; + + /** + * Content type of the response. See http://api.jquery.com/jQuery.ajax/ => contentType. + * + */ + responseContentType?: string; + + /** + * Specifies the HTTP verb to be used to issue the request. + * + */ + requestType?: string; + + /** + * Gets/Sets name of column which contains the "value". If it is missing, then the name of first column will be used. + * + */ + valueKey?: string; + + /** + * Gets/Sets name of column which contains the displayed text. If it is missing, then [valueKey](ui.igcombo#options:valueKey) option will be used. + * + */ + textKey?: string; + + /** + * Gets/Sets a template used to render an item in list. The igCombo utilizes igTemplating for generating node content templates. + * More info on the templating engine can be found here: http://www.igniteui.com/help/infragistics-templating-engine. + * + */ + itemTemplate?: string; + + /** + * Gets/Sets template used to render a header in the drop-down list. The template is rendered inside of a DIV html element. + * + */ + headerTemplate?: string; + + /** + * Gets/Sets template used to render a footer in the drop-down list. + * Notes: + * 1. The template is rendered inside of DIV html element. + * 2. The following variables can be used: + * - {0}: Number of records in igCombo (view of dataSource) + * - {1}: Number of records in dataSource + * - {2}: Number of (filtered) records on server + * - {3}: Number of all records on server + * + */ + footerTemplate?: string; + + /** + * Gets/Sets the name of a hidden INPUT element, which is used when submitting data. Its value will be set to the values of the selected items valueKeys separated by ',' character on any change in igCombo. If the combo element has 'name' attribute and this option is not set, the 'name' attribute will be used for the input name. + * + */ + inputName?: string; + + /** + * Gets/Sets show drop-down list animation duration in milliseconds. + * + */ + animationShowDuration?: number; + + /** + * Gets/Sets hide drop-down list animation duration in milliseconds. + * + */ + animationHideDuration?: number; + + /** + * If set to true, the container of the drop-down list is appended to the body. + * If set to false, it is appended to the parent element of the combo. + * + */ + dropDownAttachedToBody?: boolean; + + /** + * Gets/Sets type of filtering.Note: option is set to "remote", then the "css.waitFiltering" is applied to combo and its drop-down list. + * + * + * + * Valid values: + * "remote" filtering is performed by server + * "local" filtering is performed by $.ig.DataSource + * "none" filtering is disabled + */ + filteringType?: string; + + /** + * Gets/Sets URL key name that specifies how the remote filtering expressions will be encoded for remote requests, e.g. &filter('col') = startsWith. Default is OData. + * + */ + filterExprUrlKey?: string; + + /** + * Gets/Sets condition used for filtering.Note: When [autoComplete](ui.igcombo#options:autoComplete) is enabled, the filtering condition is always "startsWith". + * + * + * + * Valid values: + * "contains" + * "doesNotContain" + * "startsWith" + * "endsWith" + * "greaterThan" + * "lessThan" + * "greaterThanOrEqualTo" + * "lessThanOrEqualTo" + * "equals" + * "doesNotEqual" + */ + filteringCondition?: string; + + /** + * Gets/Sets filtering logic. + * + * + * Valid values: + * "OR" + * "AND" + */ + filteringLogic?: string; + + /** + * Gets/Sets text of list item for condition when [filteringType](ui.igcombo#options:filteringType) option is enabled and no match was found. That is an override for the $.ig.Combo.locale.noMatchFoundText. + * + */ + noMatchFoundText?: string; + + /** + * Gets/Sets container of variables which define load on demand functionality. + * Notes: + * That option has effect only when data is loaded remotely using [dataSourceUrl](ui.igcombo#options:dataSourceUrl). + * Selection is supported only for already loaded items. + * + */ + loadOnDemandSettings?: IgComboLoadOnDemandSettings; + + /** + * Gets/Sets how many items should be shown at once. + * Notes: + * This option is used for [virtualization](ui.igcombo#options:virtualization) in order to render initial list items. + * + */ + visibleItemsCount?: number; + + /** + * Gets/Sets value that is displayed when input field is empty. That is an override for the $.ig.Combo.locale.placeHolder. + * + */ + placeHolder?: string; + + /** + * Sets gets functionality mode. + * + * + * Valid values: + * "editable" Allows to modify value by edit field and drop-down list. + * "dropdown" Allows to modify value by drop-down list only. + * "readonlylist" Allows to open list, but does not allow any changes in field or selection in drop-down list. If selection is not set, then first item in [dataSource](ui.igcombo#options:dataSource) is automatically selected. + * "readonly" Does not allow to open list or change value in field. If selection is not set, then first item in [dataSource](ui.igcombo#options:dataSource) is automatically selected. + */ + mode?: string; + + /** + * Gets/Sets ability to use virtual rendering for drop-down list. Enable to boost performance when combo has lots of records. + * If that option is enabled, then only visible items are created and the top edge of the first visible item in list is aligned to the top edge of list. + * + */ + virtualization?: boolean; + + /** + * Gets/Sets object specifying multi selection feature options. Note showCheckboxes and itemSeparator has effect only if multi selection is enabled. + * + */ + multiSelection?: IgComboMultiSelection; + + /** + * Gets/Sets object specifying grouping feature options. The option has key and dir properties. + * + */ + grouping?: IgComboGrouping; + + /** + * Gets/Sets object which contains options supported by [igValidator](ui.igvalidator). + * Notes: in order for validator to work, application should ensure that [igValidator](ui.igvalidator) is loaded (ig.ui.validator.js/css files). + * + */ + validatorOptions?: any; + + /** + * Gets/Sets condition used for highlighting of matching parts in items of drop-down list. + * + * + * Valid values: + * "multi" multiple matches in a single item are rendered + * "contains" match at any position in item is rendered + * "startsWith" only match which starts from the beginning of text is rendered + * "full" only fully matched items are rendered + * "null" matches are not rendered + */ + highlightMatchesMode?: string; + + /** + * If set to true, filtering and auto selection will be case-sensitive. + * + */ + caseSensitive?: boolean; + + /** + * Gets/Sets whether the first matching item should be auto selected when typing in input. When [multiSelection](ui.igcombo#options:multiSelection) is enabled this option will instead put the active item on the matching element. + * + */ + autoSelectFirstMatch?: boolean; + + /** + * Gets/Sets ability to autocomplete field from first matching item in list. + * Note: When autoComplete option is enabled, then "startsWith" is used for [filteringCondition](ui.igcombo#options:filteringCondition). + * + */ + autoComplete?: boolean; + + /** + * If set to true: + * 1. Allows custom value input only with single selection. + * 2. Custom values will be auto completed to the closest value if [autoComplete](ui.igcombo#options:autoComplete) is enabled. + * + */ + allowCustomValue?: boolean; + + /** + * Gets/Sets ability to close drop-down list when control loses focus. + * + */ + closeDropDownOnBlur?: boolean; + + /** + * Specifies the delay duration before processing the changes in the input. Useful to boost performance by lowering the count of selection, filtering, auto complete and highlighting operations executed on each input change. + * + */ + delayInputChangeProcessing?: number; + + /** + * Gets/Sets tabIndex for the field of the combo. + * + */ + tabIndex?: number; + + /** + * Gets/Sets ability to show the drop-down list when the combo is in focus. This option has effect only if the combo is in editable [mode](ui.igcombo#options:mode). + * + */ + dropDownOnFocus?: boolean; + + /** + * Gets sets ability to close drop-down list when single item in the list is selected with mouse click or enter press. The default value when [multiSelection](ui.igcombo#options:multiSelection) is enabled will be false. This option will not close the drop down when [multiSelection](ui.igcombo#options:multiSelection) is enabled and additive selection is performed. + * + */ + closeDropDownOnSelect?: boolean; + + /** + * Gets/Sets ability to select items by space button press. + * + */ + selectItemBySpaceKey?: boolean; + + /** + * Gets/Sets list of items to be selected when the combo is initialized. It should contain array of objects with index or value property, then on initialization the matching items will be selected. If initialSelectedItems are not set, the combo is with single selection and it is in a dropdown, readonly or readonlylist [mode](ui.igcombo#options:mode), the first item will be automatically selected. + * Note: Only items loaded on initialization can be selected. When using [load on demand](ui.igCombo#options:loadOnDemandSettings), selecting an item which is not loaded yet will fail. + * + */ + initialSelectedItems?: IgComboInitialSelectedItem[]; + + /** + * Gets/Sets ability to prevent submitting form on enter key press. + * + */ + preventSubmitOnEnter?: boolean; + + /** + * Gets/Sets the format string that is used to format the text display values in the combo. + * Valid options are: + * "auto" (default) - uses automatic formatting for Date and number objects. + * "none", "", or null - will disable formatting + * + * Custom values can be something like "currency", "percent", "dateLong", "time", "MMM-dd-yyyy H:mm tt", etc. + * + * Custom format strings should match the data type in "textKey" column. + * + */ + format?: string; + + /** + * Gets/Sets whether the onscreen keyboard should be shown when the dropdown button is clicked (touch devices only). + * Note: The keyboard will still show when the combo input is focused in editable mode. + * + */ + suppressKeyboard?: boolean; + + /** + * Specifies whether the clear button should be rendered. + * When the [mode](ui.igcombo#options:mode) is single selection, readonly or readonlylist this option will default to false. It can still be enabled when it is specifically set to true. + * + */ + enableClearButton?: boolean; + + /** + * Gets/Sets title for html element which represent the drop-down button. This is an override for the $.ig.Combo.locale.dropDownButtonTitle. + * + */ + dropDownButtonTitle?: string; + + /** + * Gets/Sets title for html element which represent clear button (this is an override for the $.ig.Combo.locale.clearButtonTitle). + * + */ + clearButtonTitle?: string; + + /** + * Gets/Sets drop-down list orientation when open button is clicked. + * + * + * Valid values: + * "auto" if there is enough space, it positions the drop-down list below the combo input, otherwise - above the combo input + * "bottom" below the combo input + * "top" above the combo input + */ + dropDownOrientation?: string; + + /** + * Event which is raised after rendering of the combo completes. + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the combo performing rendering. + * Use ui.element to get a reference to the main/top combo element. + */ + rendered?: RenderedEvent; + + /** + * Event which is raised before data binding is performed. + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to igCombo performing the databinding. + * Use ui.dataSource to get a reference to the [$.ig.DataSource](ig.datasource) combo is to be databound to. + */ + dataBinding?: DataBindingEvent; + + /** + * Event which is raised after data binding is complete. + * + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igCombo performing the data binding. + * Use ui.dataSource to get a reference to the [$.ig.DataSource](ig.datasource) combo is databound to. + * Use ui.success to see if the databinding was performed correctly. + * Use ui.errorMessage to get the error message if the databinding failed. + */ + dataBound?: DataBoundEvent; + + /** + * Event which is raised before data filtering. + * + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igCombo. + * Use ui.expression to obtain reference to array which contains expressions supported by [$.ig.DataSource](ig.datasource). + * Each expression-item contains following members: fieldName ([textKey](ui.igcombo#options:textKey)), cond ([filteringCondition](ui.igcombo#options:filteringCondition)), expr (value/string to filter). + */ + filtering?: FilteringEvent; + + /** + * Event which is raised after filtering. + * + * Function takes arguments evt and ui. + * Use evt.originalEvent to obtain reference to event of browser. That can be null. + * Use ui.owner to obtain reference to igCombo. + * Use ui.elements to obtain a jquery reference to the rendered filtered elements. + */ + filtered?: FilteredEvent; + + /** + * Event which is raised before rendering of the combo items is performed. + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the combo performing rendering. + * Use ui.dataSource to get a reference to the [$.ig.DataSource](ig.datasource) combo is databound to. + */ + itemsRendering?: ItemsRenderingEvent; + + /** + * Event which is raised after rendering of the combo items completes. + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the combo performing rendering. + * Use ui.dataSource to get a reference to the [$.ig.DataSource](ig.datasource) combo is databound to. + */ + itemsRendered?: ItemsRenderedEvent; + + /** + * Event which is raised before drop-down list is opened. + * + * Return false in order to cancel drop-down action. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igCombo. + * Use ui.list to obtain reference to jquery DOM element which represents drop down list container. + */ + dropDownOpening?: DropDownOpeningEvent; + + /** + * Event which is raised after drop-down list was opened. + * + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igCombo. + * Use ui.list to obtain reference to jquery DOM element which represents drop down list container. + */ + dropDownOpened?: DropDownOpenedEvent; + + /** + * Event which is raised before drop-down list is closed. + * + * Return false in order to cancel hide action. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igCombo. + * Use ui.list to obtain reference to jquery DOM element which represents drop down list container. + */ + dropDownClosing?: DropDownClosingEvent; + + /** + * Event which is raised after drop-down list was closed. + * + * Function takes arguments evt and ui. + * Use evt.originalEvent to obtain reference to event of browser. + * Use ui.owner to obtain reference to igCombo. + * Use ui.list to obtain reference to jquery DOM element which represents drop down list container. + */ + dropDownClosed?: DropDownClosedEvent; + + /** + * Event which is raised before selection change. + * + * Return false in order to cancel change. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igCombo. + * Use ui.currentItems to obtain reference to array of the selected items before the new selection has happened. That can be null. + * Use ui.items to obtain reference to array of all items that will be selected after the selection finish. That can be null. + */ + selectionChanging?: SelectionChangingEvent; + + /** + * Event which is raised after selection change. + * + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igCombo. + * Use ui.items to obtain reference to array of new selected items. That can be null. + * Use ui.oldItems to obtain reference to array of old selected items. That can be null. + */ + selectionChanged?: SelectionChangedEvent; + + /** + * Option for igCombo + */ + [optionName: string]: any; +} +interface IgComboMethods { + /** + * Performs databinding on the combo box. The [databinding](ui.igcombo#events:dataBinding) and [dataBound](ui.igcombo#events:dataBound) events are always raised. + */ + dataBind(): Object; + + /** + * Forces an update of the igCombo value according to the current text in the igCombo input. + * + * The refresh is primarily intended to be used with [allowCustomValue](ui.igcombo#options:allowCustomValue) set to true. + * The refresh will take the current text and, if no selection is applied, will set it as igCombo value provided that [allowCustomValue](ui.igcombo#options:allowCustomValue) true. + */ + refreshValue(): Object; + + /** + * Gets the associated data of an item by value matching it's [valueKey](ui.igcombo#options:valueKey) property. + * + * @param value Value matching the valueKey property of item to be tested if it is selected + */ + dataForValue(value: Object): Object; + + /** + * Gets the associated data of li element in the combo. + * + * @param $element jQuery element of item in the drop down list + */ + dataForElement($element: Object): Object; + + /** + * Gets object/s containing data and list item in the combo by element/s. + * + * @param $element jQuery object with drop down list item element or elements + */ + itemsFromElement($element: Object): Object; + + /** + * Gets object/s containing data and list item in the combo by value/s. + * + * @param value Value of item in the drop down list or array with values. + */ + itemsFromValue(value: Object): Object; + + /** + * Gets object/s containing data and list item in the combo by index/es. + * + * @param index Index or array of indexes of items in the drop down list + */ + itemsFromIndex(index: number): Object; + + /** + * Gets array with data and objects representing li elements in combo box. + */ + items(): any[]; + + /** + * Gets array with objects representing the filtered li elements in combo box. + */ + filteredItems(): any[]; + + /** + * Gets array with objects representing selected li elements in combo box. + */ + selectedItems(): any[]; + + /** + * Triggers filtering. + * + * @param texts Filter by string, or array of strings. + * @param event Indicates the browser event which triggered this action (not API). Calling the method with this param set to "true" will trigger [filtering](ui.igcombo#events:filtering) and [filtered](ui.igcombo#events:filtered) events. + */ + filter(texts?: Object, event?: Object): Object; + + /** + * Clears filtering. + * + * @param event Indicates the browser event which triggered this action (not API). Calling the method with this param set to "true" will trigger [filtering](ui.igcombo#events:filtering) and [filtered](ui.igcombo#events:filtered) events. + */ + clearFiltering(event?: Object): Object; + + /** + * Opens the drop-down. + * + * @param callback Specifies callback function to be executed when open animation is completed. + * @param focusCombo Set to false to not focus combo"s text input after the drop down is opened. By default the combo's input is focused. + * @param event Indicates the browser event which triggered this action (not API). Calling the method with this param set to "true" will trigger [dropDownOpening](ui.igcombo#events:dropDownOpening) and [dropDownOpened](ui.igcombo#events:dropDownOpened) events. + */ + openDropDown(callback?: Function, focusCombo?: boolean, event?: Object): Object; + + /** + * Closes the drop down. + * + * @param callback Specifies callback function to be executed when close animation is completed. + * @param event Indicates the browser event which triggered this action (not API). Calling the method with this param set to "true" will trigger [dropDownClosing](ui.igcombo#events:dropDownClosing) and [dropDownClosed](ui.igcombo#events:dropDownClosed) events. + */ + closeDropDown(callback?: Function, event?: Object): Object; + + /** + * Clears the input text, resets highlighting, filtering and selection. + * + * @param options Object with set of options controlling the behavior of this api method. + focusCombo (boolean): Set to true to focus combo after clearing the input. + * @param event Indicates the browser event which triggered this action (not API). Calling the method with this param set to "true" will trigger [selectionChanging](ui.igcombo#events:selectionChanging) and [selectionChanged](ui.igcombo#events:selectionChanged) events. + */ + clearInput(options?: Object, event?: Object): Object; + + /** + * Verifies whether the specified li is selected. + * + * @param $item jQuery object with item to verify whether it is selected. + */ + isSelected($item: Object): boolean; + + /** + * Verifies whether a specified value is selected. + * + * @param value Value matching the [valueKey](ui.igcombo#options:valueKey) property of item to be tested if it is selected + */ + isValueSelected(value: Object): boolean; + + /** + * Verifies whether the li representing the data source's record at the specified index is selected. + * + * @param index Index of data source record + */ + isIndexSelected(index: Object): boolean; + + /** + * Selects list item/items from the drop-down list by specified value or array of values. When called witout params will return the value of the selected item or if [multiSelection](ui.igcombo#options:multiSelection) is enabled array of selected values. + * + * @param value Value or array of values matching the valueKey property of item/items to be selected + * @param options Object with set of options controlling the behavior of this api method. + closeDropDown (boolean): Set to true to close the drop down list after the selection. + focusCombo (boolean): Set to true to focus combo after the selection. + additive (boolean): Set to true to select the item without losing other selection. Works only when multi selection is enabled. + keepFiltering (boolean): Set to true to keep filtering after the selection. By default the filtering is cleared. + keepInputText (boolean): Set to true to keep input text unchanged after the selection. By default input text is updated. + keepHighlighting (boolean): Set to true to keep highlighting unchanged after the selection. By default highlighting is removed. + keepNavItem (boolean): Set to true to keep current navigation item unchanged after the selection. By default the navigation item is changed to the new selected item. + keepScrollPosition (boolean): Set to true to keep current scroll position. By default the scroll position will change so that the last selected item is visible. + * @param event Indicates the browser event which triggered this action (not API). Calling the method with this param set to "true" will trigger [selectionChanging](ui.igcombo#events:selectionChanging) and [selectionChanged](ui.igcombo#events:selectionChanged) events. + */ + value(value?: Object, options?: Object, event?: Object): Object; + + /** + * Selects a list item from the drop-down list. + * + * @param $items jQuery object with item or items to be selected. + * @param options Object with set of options controlling the behavior of this api method. + closeDropDown (boolean): Set to true to close the drop down list after the selection. + focusCombo (boolean): Set to true to focus combo after the selection. + additive (boolean): Set to true to select the item without losing other selection. Works only when multi selection is enabled. + keepFiltering (boolean): Set to true to keep filtering after the selection. By default the filtering is cleared. + keepInputText (boolean): Set to true to keep input text unchanged after the selection. By default input text is updated. + keepHighlighting (boolean): Set to true to keep highlighting unchanged after the selection. By default highlighting is removed. + keepNavItem (boolean): Set to true to keep current navigation item unchanged after the selection. By default the navigation item is changed to the new selected item. + keepScrollPosition (boolean): Set to true to keep current scroll position. By default the scroll position will change so that the last selected item is visible. + * @param event Indicates the browser event which triggered this action (not API). Calling the method with this param set to "true" will trigger [selectionChanging](ui.igcombo#events:selectionChanging) and [selectionChanged](ui.igcombo#events:selectionChanged) events. + */ + select($items: Object, options?: Object, event?: Object): Object; + + /** + * Gets/Sets selected item/s from the drop-down list by specified index. + * + * @param index Index or array of indexes of items to be selected + * @param options Object with set of options controlling the behavior of this api method. + closeDropDown (boolean): Set to true to close the drop down list after the selection. + focusCombo (boolean): Set to true to focus combo after the selection. + additive (boolean): Set to true to select the item without losing other selection. Works only when multi selection is enabled. + keepFiltering (boolean): Set to true to keep filtering after the selection. By default the filtering is cleared. + keepInputText (boolean): Set to true to keep input text unchanged after the selection. By default input text is updated. + keepHighlighting (boolean): Set to true to keep highlighting unchanged after the selection. By default highlighting is removed. + keepNavItem (boolean): Set to true to keep current navigation item unchanged after the selection. By default the navigation item is changed to the new selected item. + keepScrollPosition (boolean): Set to true to keep current scroll position. By default the scroll position will change so that the last selected item is visible. + * @param event Indicates the browser event which triggered this action (not API). Calling the method with this param set to "true" will trigger [selectionChanging](ui.igcombo#events:selectionChanging) and [selectionChanged](ui.igcombo#events:selectionChanged) events. + */ + index(index?: Object, options?: Object, event?: Object): Object; + + /** + * Selects all items from the drop-down list. + * + * @param options Object with set of options controlling the behavior of this api method. + closeDropDown (boolean): Set to true to close the drop down list after the selection. + focusCombo (boolean): Set to true to focus combo after the selection. + keepFiltering (boolean): Set to true to keep filtering after the selection. By default the filtering is cleared. + keepInputText (boolean): Set to true to keep input text unchanged after the selection. By default input text is updated. + keepHighlighting (boolean): Set to true to keep highlighting unchanged after the selection. By default highlighting is removed. + keepNavItem (boolean): Set to true to keep current navigation item unchanged after the selection. By default the navigation item is changed to the new selected item. + keepScrollPosition (boolean): Set to true to keep current scroll position. By default the scroll position will change so that the last selected item is visible. + * @param event Indicates the browser event which triggered this action (not API). Calling the method with this param set to "true" will trigger [selectionChanging](ui.igcombo#events:selectionChanging) and [selectionChanged](ui.igcombo#events:selectionChanged) events. + */ + selectAll(options?: Object, event?: Object): Object; + + /** + * Deselects a list item from the drop down list by value. + * + * @param value Value or array of values matching the [valueKey](ui.igcombo#options:valueKey) property of item/items to be deselected + * @param options Object with set of options controlling the behavior of this api method. + focusCombo (boolean): Set to true to focus combo after the deselection. + keepInputText (boolean): Set to true to keep input text unchanged after the deselection. By default input text is updated. + * @param event Indicates the browser event which triggered this action (not API). Calling the method with this param set to "true" will trigger [selectionChanging](ui.igcombo#events:selectionChanging) and [selectionChanged](ui.igcombo#events:selectionChanged) events. + */ + deselectByValue(value: Object, options?: Object, event?: Object): Object; + + /** + * Deselects a list item from the drop down list. + * + * @param $items jQuery object with item or items to be deselected + * @param options Object with set of options controlling the behavior of this api method. + focusCombo (boolean): Set to true to focus combo after the deselection. + keepInputText (boolean): Set to true to keep input text unchanged after the deselection. By default input text is updated. + * @param event Indicates the browser event which triggered this action (not API). Calling the method with this param set to "true" will trigger [selectionChanging](ui.igcombo#events:selectionChanging) and [selectionChanged](ui.igcombo#events:selectionChanged) events. + */ + deselect($items: Object, options?: Object, event?: Object): Object; + + /** + * Deselects a list item from the drop down list by index. + * + * @param index Index or array of indexes of items to be selected + * @param options Object with set of options controlling the behavior of this api method. + focusCombo (boolean): Set to true to focus combo after the deselection. + keepInputText (boolean): Set to true to keep input text unchanged after the deselection. By default input text is updated. + * @param event Indicates the browser event which triggered this action (not API). Calling the method with this param set to "true" will trigger [selectionChanging](ui.igcombo#events:selectionChanging) and [selectionChanged](ui.igcombo#events:selectionChanged) events. + */ + deselectByIndex(index: Object, options?: Object, event?: Object): Object; + + /** + * Deselects all selected items from the drop down list. + * + * @param options Object with set of options controlling the behavior of this api method. + focusCombo (boolean): Set to true to focus combo after the deselection. + keepInputText (boolean): Set to true to keep input text unchanged after the deselection. By default input text is updated. + * @param event Indicates the browser event which triggered this action (not API). Calling the method with this param set to "true" will trigger [selectionChanging](ui.igcombo#events:selectionChanging) and [selectionChanged](ui.igcombo#events:selectionChanged) events. + */ + deselectAll(options?: Object, event?: Object): Object; + + /** + * Gets/Sets index of active item in list. + * + * @param index New active index for list. In order to clear active item, use -1. + * @return number|object Returns index of active item in list or -1, if parameter is undefined. Otherwise, it returns reference to this igCombo. + */ + activeIndex(index?: number): number|Object; + + /** + * Gets/Sets text in text input field. + * + * @param text New text value for combo's input field. + * @return string|object If parameter is undefined, then current text in field is returned. Otherwise, it returns reference to this igCombo. + */ + text(text?: string): string|Object; + + /** + * Gets/Sets scrollTop attribute of html element, which scrolls drop-down list of items. + * + * @param value New value for scroll top in list. Note: if list is closed and new value is provided, then openDropDown() is called automatically. + * @return number|object If parameter is undefined, then scrollTop is returned. Otherwise, it returns reference to this igCombo. + */ + listScrollTop(value?: number): number|Object; + + /** + * Gets jQuery objects representing all rendered list items in the combo drop down list. + */ + listItems(): Object; + + /** + * Gets jQuery object of the outer element of the combo. + */ + comboWrapper(): Object; + + /** + * Gets jQuery object of the drop down associated with this combo widget + */ + dropDown(): Object; + + /** + * Gets jQuery object of the container that holds the list with items. + */ + list(): Object; + + /** + * Gets jQuery object of the text input associated with this combo widget. + */ + textInput(): Object; + + /** + * Gets jQuery object of the value input associated with this combo widget. + */ + valueInput(): Object; + + /** + * Gets reference to [igValidator](ui.igvalidator) used by igCombo. + * + * @param destroy Request to destroy validator. + */ + validator(destroy?: boolean): Object; + + /** + * Trigger validation. + */ + validate(): boolean; + + /** + * Returns boolean representing whether the combo drop down list is opened. + */ + dropDownOpened(): boolean; + + /** + * Repositions drop down under combo input. Has effect only when the drop down is attached to body. + */ + positionDropDown(): Object; + + /** + * Destroys the igCombo widget. + */ + destroy(): Object; +} +interface JQuery { + data(propertyName: "igCombo"): IgComboMethods; +} + +interface JQuery { + igCombo(methodName: "dataBind"): Object; + igCombo(methodName: "refreshValue"): Object; + igCombo(methodName: "dataForValue", value: Object): Object; + igCombo(methodName: "dataForElement", $element: Object): Object; + igCombo(methodName: "itemsFromElement", $element: Object): Object; + igCombo(methodName: "itemsFromValue", value: Object): Object; + igCombo(methodName: "itemsFromIndex", index: number): Object; + igCombo(methodName: "items"): any[]; + igCombo(methodName: "filteredItems"): any[]; + igCombo(methodName: "selectedItems"): any[]; + igCombo(methodName: "filter", texts?: Object, event?: Object): Object; + igCombo(methodName: "clearFiltering", event?: Object): Object; + igCombo(methodName: "openDropDown", callback?: Function, focusCombo?: boolean, event?: Object): Object; + igCombo(methodName: "closeDropDown", callback?: Function, event?: Object): Object; + igCombo(methodName: "clearInput", options?: Object, event?: Object): Object; + igCombo(methodName: "isSelected", $item: Object): boolean; + igCombo(methodName: "isValueSelected", value: Object): boolean; + igCombo(methodName: "isIndexSelected", index: Object): boolean; + igCombo(methodName: "value", value?: Object, options?: Object, event?: Object): Object; + igCombo(methodName: "select", $items: Object, options?: Object, event?: Object): Object; + igCombo(methodName: "index", index?: Object, options?: Object, event?: Object): Object; + igCombo(methodName: "selectAll", options?: Object, event?: Object): Object; + igCombo(methodName: "deselectByValue", value: Object, options?: Object, event?: Object): Object; + igCombo(methodName: "deselect", $items: Object, options?: Object, event?: Object): Object; + igCombo(methodName: "deselectByIndex", index: Object, options?: Object, event?: Object): Object; + igCombo(methodName: "deselectAll", options?: Object, event?: Object): Object; + igCombo(methodName: "activeIndex", index?: number): number|Object; + igCombo(methodName: "text", text?: string): string|Object; + igCombo(methodName: "listScrollTop", value?: number): number|Object; + igCombo(methodName: "listItems"): Object; + igCombo(methodName: "comboWrapper"): Object; + igCombo(methodName: "dropDown"): Object; + igCombo(methodName: "list"): Object; + igCombo(methodName: "textInput"): Object; + igCombo(methodName: "valueInput"): Object; + igCombo(methodName: "validator", destroy?: boolean): Object; + igCombo(methodName: "validate"): boolean; + igCombo(methodName: "dropDownOpened"): boolean; + igCombo(methodName: "positionDropDown"): Object; + igCombo(methodName: "destroy"): Object; + + /** + * Gets/Sets the width of combo. The numeric and string values (valid html units for size) are supported. It includes %, px, em and other units. + * + */ + igCombo(optionLiteral: 'option', optionName: "width"): string|number; + + /** + * /Sets the width of combo. The numeric and string values (valid html units for size) are supported. It includes %, px, em and other units. + * + * + * @optionValue New value to be set. + */ + igCombo(optionLiteral: 'option', optionName: "width", optionValue: string|number): void; + + /** + * Gets/Sets height of combo. The numeric and string values (valid html units for size) are supported. It includes %, px, em and other units. + * + */ + igCombo(optionLiteral: 'option', optionName: "height"): string|number; + + /** + * /Sets height of combo. The numeric and string values (valid html units for size) are supported. It includes %, px, em and other units. + * + * + * @optionValue New value to be set. + */ + igCombo(optionLiteral: 'option', optionName: "height", optionValue: string|number): void; + + /** + * Gets/Sets the width of drop-down list in pixels. + * + */ + igCombo(optionLiteral: 'option', optionName: "dropDownWidth"): string|number; + + /** + * /Sets the width of drop-down list in pixels. + * + * + * @optionValue New value to be set. + */ + igCombo(optionLiteral: 'option', optionName: "dropDownWidth", optionValue: string|number): void; + + /** + * Gets/Sets a valid data source accepted by [$.ig.DataSource](ig.datasource), or an instance of an [$.ig.DataSource](ig.datasource) itself. + * Note: if it is set to string and [dataSourceType](ui.igcombo#options:dataSourceType) option is not set, then [$.ig.JSONDataSource](ig.jsondatasource) is used. + * + */ + igCombo(optionLiteral: 'option', optionName: "dataSource"): any; + + /** + * /Sets a valid data source accepted by [$.ig.DataSource](ig.datasource), or an instance of an [$.ig.DataSource](ig.datasource) itself. + * Note: if it is set to string and [dataSourceType](ui.igcombo#options:dataSourceType) option is not set, then [$.ig.JSONDataSource](ig.jsondatasource) is used. + * + * + * @optionValue New value to be set. + */ + igCombo(optionLiteral: 'option', optionName: "dataSource", optionValue: any): void; + + /** + * Sets data source type (such as "json", "xml", etc). Please refer to the documentation of [$.ig.DataSource](ig.datasource) and its [type](ig.datasource#options:settings.type) property. + * + */ + igCombo(optionLiteral: 'option', optionName: "dataSourceType"): string; + + /** + * Sets data source type (such as "json", "xml", etc). Please refer to the documentation of [$.ig.DataSource](ig.datasource) and its [type](ig.datasource#options:settings.type) property. + * + * + * @optionValue New value to be set. + */ + igCombo(optionLiteral: 'option', optionName: "dataSourceType", optionValue: string): void; + + /** + * Sets URL which is used for sending JSON on request for remote filtering (MVC for example). That option is required when [load on demand](ui.igcombo#options:loadOnDemandSettings) is + * [enabled](ui.igcombo#options:loadOnDemandSettings.enabled) and its [type](ui.igcombo#options:filteringType) is remote. + * + */ + igCombo(optionLiteral: 'option', optionName: "dataSourceUrl"): string; + + /** + * Sets URL which is used for sending JSON on request for remote filtering (MVC for example). That option is required when [load on demand](ui.igcombo#options:loadOnDemandSettings) is + * [enabled](ui.igcombo#options:loadOnDemandSettings.enabled) and its [type](ui.igcombo#options:filteringType) is remote. + * + * + * @optionValue New value to be set. + */ + igCombo(optionLiteral: 'option', optionName: "dataSourceUrl", optionValue: string): void; + + /** + * See [$.ig.DataSource](ig.datasource) property in the response specifying the total number of records on the server. + * + */ + igCombo(optionLiteral: 'option', optionName: "responseTotalRecCountKey"): string; + + /** + * See [$.ig.DataSource](ig.datasource) property in the response specifying the total number of records on the server. + * + * + * @optionValue New value to be set. + */ + igCombo(optionLiteral: 'option', optionName: "responseTotalRecCountKey", optionValue: string): void; + + /** + * See [$.ig.DataSource](ig.datasource) This is basically the property in the response where data records are held, if the response is wrapped. + * + */ + igCombo(optionLiteral: 'option', optionName: "responseDataKey"): string; + + /** + * See [$.ig.DataSource](ig.datasource) This is basically the property in the response where data records are held, if the response is wrapped. + * + * + * @optionValue New value to be set. + */ + igCombo(optionLiteral: 'option', optionName: "responseDataKey", optionValue: string): void; + + /** + * Response type when a URL is set as the data source. See http://api.jquery.com/jQuery.ajax/ => dataType. + * + */ + igCombo(optionLiteral: 'option', optionName: "responseDataType"): string; + + /** + * Response type when a URL is set as the data source. See http://api.jquery.com/jQuery.ajax/ => dataType. + * + * + * @optionValue New value to be set. + */ + igCombo(optionLiteral: 'option', optionName: "responseDataType", optionValue: string): void; + + /** + * Content type of the response. See http://api.jquery.com/jQuery.ajax/ => contentType. + * + */ + igCombo(optionLiteral: 'option', optionName: "responseContentType"): string; + + /** + * Content type of the response. See http://api.jquery.com/jQuery.ajax/ => contentType. + * + * + * @optionValue New value to be set. + */ + igCombo(optionLiteral: 'option', optionName: "responseContentType", optionValue: string): void; + + /** + * Specifies the HTTP verb to be used to issue the request. + * + */ + igCombo(optionLiteral: 'option', optionName: "requestType"): string; + + /** + * Specifies the HTTP verb to be used to issue the request. + * + * + * @optionValue New value to be set. + */ + igCombo(optionLiteral: 'option', optionName: "requestType", optionValue: string): void; + + /** + * Gets/Sets name of column which contains the "value". If it is missing, then the name of first column will be used. + * + */ + igCombo(optionLiteral: 'option', optionName: "valueKey"): string; + + /** + * /Sets name of column which contains the "value". If it is missing, then the name of first column will be used. + * + * + * @optionValue New value to be set. + */ + igCombo(optionLiteral: 'option', optionName: "valueKey", optionValue: string): void; + + /** + * Gets/Sets name of column which contains the displayed text. If it is missing, then [valueKey](ui.igcombo#options:valueKey) option will be used. + * + */ + igCombo(optionLiteral: 'option', optionName: "textKey"): string; + + /** + * /Sets name of column which contains the displayed text. If it is missing, then [valueKey](ui.igcombo#options:valueKey) option will be used. + * + * + * @optionValue New value to be set. + */ + igCombo(optionLiteral: 'option', optionName: "textKey", optionValue: string): void; + + /** + * Gets/Sets a template used to render an item in list. The igCombo utilizes igTemplating for generating node content templates. + * More info on the templating engine can be found here: http://www.igniteui.com/help/infragistics-templating-engine. + * + */ + igCombo(optionLiteral: 'option', optionName: "itemTemplate"): string; + + /** + * /Sets a template used to render an item in list. The igCombo utilizes igTemplating for generating node content templates. + * More info on the templating engine can be found here: http://www.igniteui.com/help/infragistics-templating-engine. + * + * + * @optionValue New value to be set. + */ + igCombo(optionLiteral: 'option', optionName: "itemTemplate", optionValue: string): void; + + /** + * Gets/Sets template used to render a header in the drop-down list. The template is rendered inside of a DIV html element. + * + */ + igCombo(optionLiteral: 'option', optionName: "headerTemplate"): string; + + /** + * /Sets template used to render a header in the drop-down list. The template is rendered inside of a DIV html element. + * + * + * @optionValue New value to be set. + */ + igCombo(optionLiteral: 'option', optionName: "headerTemplate", optionValue: string): void; + + /** + * Gets/Sets template used to render a footer in the drop-down list. + * Notes: + * 1. The template is rendered inside of DIV html element. + * 2. The following variables can be used: + * - {0}: Number of records in igCombo (view of dataSource) + * - {1}: Number of records in dataSource + * - {2}: Number of (filtered) records on server + * - {3}: Number of all records on server + * + */ + igCombo(optionLiteral: 'option', optionName: "footerTemplate"): string; + + /** + * /Sets template used to render a footer in the drop-down list. + * Notes: + * 1. The template is rendered inside of DIV html element. + * 2. The following variables can be used: + * - {0}: Number of records in igCombo (view of dataSource) + * - {1}: Number of records in dataSource + * - {2}: Number of (filtered) records on server + * - {3}: Number of all records on server + * + * + * @optionValue New value to be set. + */ + igCombo(optionLiteral: 'option', optionName: "footerTemplate", optionValue: string): void; + + /** + * Gets/Sets the name of a hidden INPUT element, which is used when submitting data. Its value will be set to the values of the selected items valueKeys separated by ',' character on any change in igCombo. If the combo element has 'name' attribute and this option is not set, the 'name' attribute will be used for the input name. + * + */ + igCombo(optionLiteral: 'option', optionName: "inputName"): string; + + /** + * /Sets the name of a hidden INPUT element, which is used when submitting data. Its value will be set to the values of the selected items valueKeys separated by ',' character on any change in igCombo. If the combo element has 'name' attribute and this option is not set, the 'name' attribute will be used for the input name. + * + * + * @optionValue New value to be set. + */ + igCombo(optionLiteral: 'option', optionName: "inputName", optionValue: string): void; + + /** + * Gets/Sets show drop-down list animation duration in milliseconds. + * + */ + igCombo(optionLiteral: 'option', optionName: "animationShowDuration"): number; + + /** + * /Sets show drop-down list animation duration in milliseconds. + * + * + * @optionValue New value to be set. + */ + igCombo(optionLiteral: 'option', optionName: "animationShowDuration", optionValue: number): void; + + /** + * Gets/Sets hide drop-down list animation duration in milliseconds. + * + */ + igCombo(optionLiteral: 'option', optionName: "animationHideDuration"): number; + + /** + * /Sets hide drop-down list animation duration in milliseconds. + * + * + * @optionValue New value to be set. + */ + igCombo(optionLiteral: 'option', optionName: "animationHideDuration", optionValue: number): void; + + /** + * If set to true, the container of the drop-down list is appended to the body. + * If set to false, it is appended to the parent element of the combo. + * + */ + igCombo(optionLiteral: 'option', optionName: "dropDownAttachedToBody"): boolean; + + /** + * If set to true, the container of the drop-down list is appended to the body. + * If set to false, it is appended to the parent element of the combo. + * + * + * @optionValue New value to be set. + */ + igCombo(optionLiteral: 'option', optionName: "dropDownAttachedToBody", optionValue: boolean): void; + + /** + * Gets/Sets type of filtering.Note: option is set to "remote", then the "css.waitFiltering" is applied to combo and its drop-down list. + * + * + */ + igCombo(optionLiteral: 'option', optionName: "filteringType"): string; + + /** + * /Sets type of filtering.Note: option is set to "remote", then the "css.waitFiltering" is applied to combo and its drop-down list. + * + * + * + * @optionValue New value to be set. + */ + igCombo(optionLiteral: 'option', optionName: "filteringType", optionValue: string): void; + + /** + * Gets/Sets URL key name that specifies how the remote filtering expressions will be encoded for remote requests, e.g. &filter('col') = startsWith. Default is OData. + * + */ + igCombo(optionLiteral: 'option', optionName: "filterExprUrlKey"): string; + + /** + * /Sets URL key name that specifies how the remote filtering expressions will be encoded for remote requests, e.g. &filter('col') = startsWith. Default is OData. + * + * + * @optionValue New value to be set. + */ + igCombo(optionLiteral: 'option', optionName: "filterExprUrlKey", optionValue: string): void; + + /** + * Gets/Sets condition used for filtering.Note: When [autoComplete](ui.igcombo#options:autoComplete) is enabled, the filtering condition is always "startsWith". + * + * + */ + igCombo(optionLiteral: 'option', optionName: "filteringCondition"): string; + + /** + * /Sets condition used for filtering.Note: When [autoComplete](ui.igcombo#options:autoComplete) is enabled, the filtering condition is always "startsWith". + * + * + * + * @optionValue New value to be set. + */ + igCombo(optionLiteral: 'option', optionName: "filteringCondition", optionValue: string): void; + + /** + * Gets/Sets filtering logic. + * + */ + igCombo(optionLiteral: 'option', optionName: "filteringLogic"): string; + + /** + * /Sets filtering logic. + * + * + * @optionValue New value to be set. + */ + igCombo(optionLiteral: 'option', optionName: "filteringLogic", optionValue: string): void; + + /** + * Gets/Sets text of list item for condition when [filteringType](ui.igcombo#options:filteringType) option is enabled and no match was found. That is an override for the $.ig.Combo.locale.noMatchFoundText. + * + */ + igCombo(optionLiteral: 'option', optionName: "noMatchFoundText"): string; + + /** + * /Sets text of list item for condition when [filteringType](ui.igcombo#options:filteringType) option is enabled and no match was found. That is an override for the $.ig.Combo.locale.noMatchFoundText. + * + * + * @optionValue New value to be set. + */ + igCombo(optionLiteral: 'option', optionName: "noMatchFoundText", optionValue: string): void; + + /** + * Gets/Sets container of variables which define load on demand functionality. + * Notes: + * That option has effect only when data is loaded remotely using [dataSourceUrl](ui.igcombo#options:dataSourceUrl). + * Selection is supported only for already loaded items. + * + */ + igCombo(optionLiteral: 'option', optionName: "loadOnDemandSettings"): IgComboLoadOnDemandSettings; + + /** + * /Sets container of variables which define load on demand functionality. + * Notes: + * That option has effect only when data is loaded remotely using [dataSourceUrl](ui.igcombo#options:dataSourceUrl). + * Selection is supported only for already loaded items. + * + * + * @optionValue New value to be set. + */ + igCombo(optionLiteral: 'option', optionName: "loadOnDemandSettings", optionValue: IgComboLoadOnDemandSettings): void; + + /** + * Gets/Sets how many items should be shown at once. + * Notes: + * This option is used for [virtualization](ui.igcombo#options:virtualization) in order to render initial list items. + * + */ + igCombo(optionLiteral: 'option', optionName: "visibleItemsCount"): number; + + /** + * /Sets how many items should be shown at once. + * Notes: + * This option is used for [virtualization](ui.igcombo#options:virtualization) in order to render initial list items. + * + * + * @optionValue New value to be set. + */ + igCombo(optionLiteral: 'option', optionName: "visibleItemsCount", optionValue: number): void; + + /** + * Gets/Sets value that is displayed when input field is empty. That is an override for the $.ig.Combo.locale.placeHolder. + * + */ + igCombo(optionLiteral: 'option', optionName: "placeHolder"): string; + + /** + * /Sets value that is displayed when input field is empty. That is an override for the $.ig.Combo.locale.placeHolder. + * + * + * @optionValue New value to be set. + */ + igCombo(optionLiteral: 'option', optionName: "placeHolder", optionValue: string): void; + + /** + * Sets gets functionality mode. + * + */ + igCombo(optionLiteral: 'option', optionName: "mode"): string; + + /** + * Sets gets functionality mode. + * + * + * @optionValue New value to be set. + */ + igCombo(optionLiteral: 'option', optionName: "mode", optionValue: string): void; + + /** + * Gets/Sets ability to use virtual rendering for drop-down list. Enable to boost performance when combo has lots of records. + * If that option is enabled, then only visible items are created and the top edge of the first visible item in list is aligned to the top edge of list. + * + */ + igCombo(optionLiteral: 'option', optionName: "virtualization"): boolean; + + /** + * /Sets ability to use virtual rendering for drop-down list. Enable to boost performance when combo has lots of records. + * If that option is enabled, then only visible items are created and the top edge of the first visible item in list is aligned to the top edge of list. + * + * + * @optionValue New value to be set. + */ + igCombo(optionLiteral: 'option', optionName: "virtualization", optionValue: boolean): void; + + /** + * Gets/Sets object specifying multi selection feature options. Note showCheckboxes and itemSeparator has effect only if multi selection is enabled. + * + */ + igCombo(optionLiteral: 'option', optionName: "multiSelection"): IgComboMultiSelection; + + /** + * /Sets object specifying multi selection feature options. Note showCheckboxes and itemSeparator has effect only if multi selection is enabled. + * + * + * @optionValue New value to be set. + */ + igCombo(optionLiteral: 'option', optionName: "multiSelection", optionValue: IgComboMultiSelection): void; + + /** + * Gets/Sets object specifying grouping feature options. The option has key and dir properties. + * + */ + igCombo(optionLiteral: 'option', optionName: "grouping"): IgComboGrouping; + + /** + * /Sets object specifying grouping feature options. The option has key and dir properties. + * + * + * @optionValue New value to be set. + */ + igCombo(optionLiteral: 'option', optionName: "grouping", optionValue: IgComboGrouping): void; + + /** + * Gets/Sets object which contains options supported by [igValidator](ui.igvalidator). + * Notes: in order for validator to work, application should ensure that [igValidator](ui.igvalidator) is loaded (ig.ui.validator.js/css files). + * + */ + igCombo(optionLiteral: 'option', optionName: "validatorOptions"): any; + + /** + * /Sets object which contains options supported by [igValidator](ui.igvalidator). + * Notes: in order for validator to work, application should ensure that [igValidator](ui.igvalidator) is loaded (ig.ui.validator.js/css files). + * + * + * @optionValue New value to be set. + */ + igCombo(optionLiteral: 'option', optionName: "validatorOptions", optionValue: any): void; + + /** + * Gets/Sets condition used for highlighting of matching parts in items of drop-down list. + * + */ + igCombo(optionLiteral: 'option', optionName: "highlightMatchesMode"): string; + + /** + * /Sets condition used for highlighting of matching parts in items of drop-down list. + * + * + * @optionValue New value to be set. + */ + igCombo(optionLiteral: 'option', optionName: "highlightMatchesMode", optionValue: string): void; + + /** + * If set to true, filtering and auto selection will be case-sensitive. + * + */ + igCombo(optionLiteral: 'option', optionName: "caseSensitive"): boolean; + + /** + * If set to true, filtering and auto selection will be case-sensitive. + * + * + * @optionValue New value to be set. + */ + igCombo(optionLiteral: 'option', optionName: "caseSensitive", optionValue: boolean): void; + + /** + * Gets/Sets whether the first matching item should be auto selected when typing in input. When [multiSelection](ui.igcombo#options:multiSelection) is enabled this option will instead put the active item on the matching element. + * + */ + igCombo(optionLiteral: 'option', optionName: "autoSelectFirstMatch"): boolean; + + /** + * /Sets whether the first matching item should be auto selected when typing in input. When [multiSelection](ui.igcombo#options:multiSelection) is enabled this option will instead put the active item on the matching element. + * + * + * @optionValue New value to be set. + */ + igCombo(optionLiteral: 'option', optionName: "autoSelectFirstMatch", optionValue: boolean): void; + + /** + * Gets/Sets ability to autocomplete field from first matching item in list. + * Note: When autoComplete option is enabled, then "startsWith" is used for [filteringCondition](ui.igcombo#options:filteringCondition). + * + */ + igCombo(optionLiteral: 'option', optionName: "autoComplete"): boolean; + + /** + * /Sets ability to autocomplete field from first matching item in list. + * Note: When autoComplete option is enabled, then "startsWith" is used for [filteringCondition](ui.igcombo#options:filteringCondition). + * + * + * @optionValue New value to be set. + */ + igCombo(optionLiteral: 'option', optionName: "autoComplete", optionValue: boolean): void; + + /** + * If set to true: + * 1. Allows custom value input only with single selection. + * 2. Custom values will be auto completed to the closest value if [autoComplete](ui.igcombo#options:autoComplete) is enabled. + * + */ + igCombo(optionLiteral: 'option', optionName: "allowCustomValue"): boolean; + + /** + * If set to true: + * 1. Allows custom value input only with single selection. + * 2. Custom values will be auto completed to the closest value if [autoComplete](ui.igcombo#options:autoComplete) is enabled. + * + * + * @optionValue New value to be set. + */ + igCombo(optionLiteral: 'option', optionName: "allowCustomValue", optionValue: boolean): void; + + /** + * Gets/Sets ability to close drop-down list when control loses focus. + * + */ + igCombo(optionLiteral: 'option', optionName: "closeDropDownOnBlur"): boolean; + + /** + * /Sets ability to close drop-down list when control loses focus. + * + * + * @optionValue New value to be set. + */ + igCombo(optionLiteral: 'option', optionName: "closeDropDownOnBlur", optionValue: boolean): void; + + /** + * Gets the delay duration before processing the changes in the input. Useful to boost performance by lowering the count of selection, filtering, auto complete and highlighting operations executed on each input change. + * + */ + igCombo(optionLiteral: 'option', optionName: "delayInputChangeProcessing"): number; + + /** + * Sets the delay duration before processing the changes in the input. Useful to boost performance by lowering the count of selection, filtering, auto complete and highlighting operations executed on each input change. + * + * + * @optionValue New value to be set. + */ + igCombo(optionLiteral: 'option', optionName: "delayInputChangeProcessing", optionValue: number): void; + + /** + * Gets/Sets tabIndex for the field of the combo. + * + */ + igCombo(optionLiteral: 'option', optionName: "tabIndex"): number; + + /** + * /Sets tabIndex for the field of the combo. + * + * + * @optionValue New value to be set. + */ + igCombo(optionLiteral: 'option', optionName: "tabIndex", optionValue: number): void; + + /** + * Gets/Sets ability to show the drop-down list when the combo is in focus. This option has effect only if the combo is in editable [mode](ui.igcombo#options:mode). + * + */ + igCombo(optionLiteral: 'option', optionName: "dropDownOnFocus"): boolean; + + /** + * /Sets ability to show the drop-down list when the combo is in focus. This option has effect only if the combo is in editable [mode](ui.igcombo#options:mode). + * + * + * @optionValue New value to be set. + */ + igCombo(optionLiteral: 'option', optionName: "dropDownOnFocus", optionValue: boolean): void; + + /** + * Gets ability to close drop-down list when single item in the list is selected with mouse click or enter press. The default value when [multiSelection](ui.igcombo#options:multiSelection) is enabled will be false. This option will not close the drop down when [multiSelection](ui.igcombo#options:multiSelection) is enabled and additive selection is performed. + * + */ + igCombo(optionLiteral: 'option', optionName: "closeDropDownOnSelect"): boolean; + + /** + * Sets ability to close drop-down list when single item in the list is selected with mouse click or enter press. The default value when [multiSelection](ui.igcombo#options:multiSelection) is enabled will be false. This option will not close the drop down when [multiSelection](ui.igcombo#options:multiSelection) is enabled and additive selection is performed. + * + * + * @optionValue New value to be set. + */ + igCombo(optionLiteral: 'option', optionName: "closeDropDownOnSelect", optionValue: boolean): void; + + /** + * Gets/Sets ability to select items by space button press. + * + */ + igCombo(optionLiteral: 'option', optionName: "selectItemBySpaceKey"): boolean; + + /** + * /Sets ability to select items by space button press. + * + * + * @optionValue New value to be set. + */ + igCombo(optionLiteral: 'option', optionName: "selectItemBySpaceKey", optionValue: boolean): void; + + /** + * Gets/Sets list of items to be selected when the combo is initialized. It should contain array of objects with index or value property, then on initialization the matching items will be selected. If initialSelectedItems are not set, the combo is with single selection and it is in a dropdown, readonly or readonlylist [mode](ui.igcombo#options:mode), the first item will be automatically selected. + * Note: Only items loaded on initialization can be selected. When using [load on demand](ui.igCombo#options:loadOnDemandSettings), selecting an item which is not loaded yet will fail. + * + */ + igCombo(optionLiteral: 'option', optionName: "initialSelectedItems"): IgComboInitialSelectedItem[]; + + /** + * /Sets list of items to be selected when the combo is initialized. It should contain array of objects with index or value property, then on initialization the matching items will be selected. If initialSelectedItems are not set, the combo is with single selection and it is in a dropdown, readonly or readonlylist [mode](ui.igcombo#options:mode), the first item will be automatically selected. + * Note: Only items loaded on initialization can be selected. When using [load on demand](ui.igCombo#options:loadOnDemandSettings), selecting an item which is not loaded yet will fail. + * + * + * @optionValue New value to be set. + */ + igCombo(optionLiteral: 'option', optionName: "initialSelectedItems", optionValue: IgComboInitialSelectedItem[]): void; + + /** + * Gets/Sets ability to prevent submitting form on enter key press. + * + */ + igCombo(optionLiteral: 'option', optionName: "preventSubmitOnEnter"): boolean; + + /** + * /Sets ability to prevent submitting form on enter key press. + * + * + * @optionValue New value to be set. + */ + igCombo(optionLiteral: 'option', optionName: "preventSubmitOnEnter", optionValue: boolean): void; + + /** + * Gets/Sets the format string that is used to format the text display values in the combo. + * Valid options are: + * "auto" (default) - uses automatic formatting for Date and number objects. + * "none", "", or null - will disable formatting + * + * Custom values can be something like "currency", "percent", "dateLong", "time", "MMM-dd-yyyy H:mm tt", etc. + * + * Custom format strings should match the data type in "textKey" column. + * + */ + igCombo(optionLiteral: 'option', optionName: "format"): string; + + /** + * /Sets the format string that is used to format the text display values in the combo. + * Valid options are: + * "auto" (default) - uses automatic formatting for Date and number objects. + * "none", "", or null - will disable formatting + * + * Custom values can be something like "currency", "percent", "dateLong", "time", "MMM-dd-yyyy H:mm tt", etc. + * + * Custom format strings should match the data type in "textKey" column. + * + * + * @optionValue New value to be set. + */ + igCombo(optionLiteral: 'option', optionName: "format", optionValue: string): void; + + /** + * Gets/Sets whether the onscreen keyboard should be shown when the dropdown button is clicked (touch devices only). + * Note: The keyboard will still show when the combo input is focused in editable mode. + * + */ + igCombo(optionLiteral: 'option', optionName: "suppressKeyboard"): boolean; + + /** + * /Sets whether the onscreen keyboard should be shown when the dropdown button is clicked (touch devices only). + * Note: The keyboard will still show when the combo input is focused in editable mode. + * + * + * @optionValue New value to be set. + */ + igCombo(optionLiteral: 'option', optionName: "suppressKeyboard", optionValue: boolean): void; + + /** + * Gets whether the clear button should be rendered. + * When the [mode](ui.igcombo#options:mode) is single selection, readonly or readonlylist this option will default to false. It can still be enabled when it is specifically set to true. + * + */ + igCombo(optionLiteral: 'option', optionName: "enableClearButton"): boolean; + + /** + * Sets whether the clear button should be rendered. + * When the [mode](ui.igcombo#options:mode) is single selection, readonly or readonlylist this option will default to false. It can still be enabled when it is specifically set to true. + * + * + * @optionValue New value to be set. + */ + igCombo(optionLiteral: 'option', optionName: "enableClearButton", optionValue: boolean): void; + + /** + * Gets/Sets title for html element which represent the drop-down button. This is an override for the $.ig.Combo.locale.dropDownButtonTitle. + * + */ + igCombo(optionLiteral: 'option', optionName: "dropDownButtonTitle"): string; + + /** + * /Sets title for html element which represent the drop-down button. This is an override for the $.ig.Combo.locale.dropDownButtonTitle. + * + * + * @optionValue New value to be set. + */ + igCombo(optionLiteral: 'option', optionName: "dropDownButtonTitle", optionValue: string): void; + + /** + * Gets/Sets title for html element which represent clear button (this is an override for the $.ig.Combo.locale.clearButtonTitle). + * + */ + igCombo(optionLiteral: 'option', optionName: "clearButtonTitle"): string; + + /** + * /Sets title for html element which represent clear button (this is an override for the $.ig.Combo.locale.clearButtonTitle). + * + * + * @optionValue New value to be set. + */ + igCombo(optionLiteral: 'option', optionName: "clearButtonTitle", optionValue: string): void; + + /** + * Gets/Sets drop-down list orientation when open button is clicked. + * + */ + igCombo(optionLiteral: 'option', optionName: "dropDownOrientation"): string; + + /** + * /Sets drop-down list orientation when open button is clicked. + * + * + * @optionValue New value to be set. + */ + igCombo(optionLiteral: 'option', optionName: "dropDownOrientation", optionValue: string): void; + + /** + * Event which is raised after rendering of the combo completes. + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the combo performing rendering. + * Use ui.element to get a reference to the main/top combo element. + */ + igCombo(optionLiteral: 'option', optionName: "rendered"): RenderedEvent; + + /** + * Event which is raised after rendering of the combo completes. + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the combo performing rendering. + * Use ui.element to get a reference to the main/top combo element. + * + * @optionValue Define event handler function. + */ + igCombo(optionLiteral: 'option', optionName: "rendered", optionValue: RenderedEvent): void; + + /** + * Event which is raised before data binding is performed. + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to igCombo performing the databinding. + * Use ui.dataSource to get a reference to the [$.ig.DataSource](ig.datasource) combo is to be databound to. + */ + igCombo(optionLiteral: 'option', optionName: "dataBinding"): DataBindingEvent; + + /** + * Event which is raised before data binding is performed. + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to igCombo performing the databinding. + * Use ui.dataSource to get a reference to the [$.ig.DataSource](ig.datasource) combo is to be databound to. + * + * @optionValue Define event handler function. + */ + igCombo(optionLiteral: 'option', optionName: "dataBinding", optionValue: DataBindingEvent): void; + + /** + * Event which is raised after data binding is complete. + * + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igCombo performing the data binding. + * Use ui.dataSource to get a reference to the [$.ig.DataSource](ig.datasource) combo is databound to. + * Use ui.success to see if the databinding was performed correctly. + * Use ui.errorMessage to get the error message if the databinding failed. + */ + igCombo(optionLiteral: 'option', optionName: "dataBound"): DataBoundEvent; + + /** + * Event which is raised after data binding is complete. + * + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igCombo performing the data binding. + * Use ui.dataSource to get a reference to the [$.ig.DataSource](ig.datasource) combo is databound to. + * Use ui.success to see if the databinding was performed correctly. + * Use ui.errorMessage to get the error message if the databinding failed. + * + * @optionValue Define event handler function. + */ + igCombo(optionLiteral: 'option', optionName: "dataBound", optionValue: DataBoundEvent): void; + + /** + * Event which is raised before data filtering. + * + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igCombo. + * Use ui.expression to obtain reference to array which contains expressions supported by [$.ig.DataSource](ig.datasource). + * Each expression-item contains following members: fieldName ([textKey](ui.igcombo#options:textKey)), cond ([filteringCondition](ui.igcombo#options:filteringCondition)), expr (value/string to filter). + */ + igCombo(optionLiteral: 'option', optionName: "filtering"): FilteringEvent; + + /** + * Event which is raised before data filtering. + * + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igCombo. + * Use ui.expression to obtain reference to array which contains expressions supported by [$.ig.DataSource](ig.datasource). + * Each expression-item contains following members: fieldName ([textKey](ui.igcombo#options:textKey)), cond ([filteringCondition](ui.igcombo#options:filteringCondition)), expr (value/string to filter). + * + * @optionValue Define event handler function. + */ + igCombo(optionLiteral: 'option', optionName: "filtering", optionValue: FilteringEvent): void; + + /** + * Event which is raised after filtering. + * + * Function takes arguments evt and ui. + * Use evt.originalEvent to obtain reference to event of browser. That can be null. + * Use ui.owner to obtain reference to igCombo. + * Use ui.elements to obtain a jquery reference to the rendered filtered elements. + */ + igCombo(optionLiteral: 'option', optionName: "filtered"): FilteredEvent; + + /** + * Event which is raised after filtering. + * + * Function takes arguments evt and ui. + * Use evt.originalEvent to obtain reference to event of browser. That can be null. + * Use ui.owner to obtain reference to igCombo. + * Use ui.elements to obtain a jquery reference to the rendered filtered elements. + * + * @optionValue Define event handler function. + */ + igCombo(optionLiteral: 'option', optionName: "filtered", optionValue: FilteredEvent): void; + + /** + * Event which is raised before rendering of the combo items is performed. + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the combo performing rendering. + * Use ui.dataSource to get a reference to the [$.ig.DataSource](ig.datasource) combo is databound to. + */ + igCombo(optionLiteral: 'option', optionName: "itemsRendering"): ItemsRenderingEvent; + + /** + * Event which is raised before rendering of the combo items is performed. + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the combo performing rendering. + * Use ui.dataSource to get a reference to the [$.ig.DataSource](ig.datasource) combo is databound to. + * + * @optionValue Define event handler function. + */ + igCombo(optionLiteral: 'option', optionName: "itemsRendering", optionValue: ItemsRenderingEvent): void; + + /** + * Event which is raised after rendering of the combo items completes. + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the combo performing rendering. + * Use ui.dataSource to get a reference to the [$.ig.DataSource](ig.datasource) combo is databound to. + */ + igCombo(optionLiteral: 'option', optionName: "itemsRendered"): ItemsRenderedEvent; + + /** + * Event which is raised after rendering of the combo items completes. + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the combo performing rendering. + * Use ui.dataSource to get a reference to the [$.ig.DataSource](ig.datasource) combo is databound to. + * + * @optionValue Define event handler function. + */ + igCombo(optionLiteral: 'option', optionName: "itemsRendered", optionValue: ItemsRenderedEvent): void; + + /** + * Event which is raised before drop-down list is opened. + * + * Return false in order to cancel drop-down action. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igCombo. + * Use ui.list to obtain reference to jquery DOM element which represents drop down list container. + */ + igCombo(optionLiteral: 'option', optionName: "dropDownOpening"): DropDownOpeningEvent; + + /** + * Event which is raised before drop-down list is opened. + * + * Return false in order to cancel drop-down action. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igCombo. + * Use ui.list to obtain reference to jquery DOM element which represents drop down list container. + * + * @optionValue Define event handler function. + */ + igCombo(optionLiteral: 'option', optionName: "dropDownOpening", optionValue: DropDownOpeningEvent): void; + + /** + * Event which is raised after drop-down list was opened. + * + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igCombo. + * Use ui.list to obtain reference to jquery DOM element which represents drop down list container. + */ + igCombo(optionLiteral: 'option', optionName: "dropDownOpened"): DropDownOpenedEvent; + + /** + * Event which is raised after drop-down list was opened. + * + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igCombo. + * Use ui.list to obtain reference to jquery DOM element which represents drop down list container. + * + * @optionValue Define event handler function. + */ + igCombo(optionLiteral: 'option', optionName: "dropDownOpened", optionValue: DropDownOpenedEvent): void; + + /** + * Event which is raised before drop-down list is closed. + * + * Return false in order to cancel hide action. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igCombo. + * Use ui.list to obtain reference to jquery DOM element which represents drop down list container. + */ + igCombo(optionLiteral: 'option', optionName: "dropDownClosing"): DropDownClosingEvent; + + /** + * Event which is raised before drop-down list is closed. + * + * Return false in order to cancel hide action. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igCombo. + * Use ui.list to obtain reference to jquery DOM element which represents drop down list container. + * + * @optionValue Define event handler function. + */ + igCombo(optionLiteral: 'option', optionName: "dropDownClosing", optionValue: DropDownClosingEvent): void; + + /** + * Event which is raised after drop-down list was closed. + * + * Function takes arguments evt and ui. + * Use evt.originalEvent to obtain reference to event of browser. + * Use ui.owner to obtain reference to igCombo. + * Use ui.list to obtain reference to jquery DOM element which represents drop down list container. + */ + igCombo(optionLiteral: 'option', optionName: "dropDownClosed"): DropDownClosedEvent; + + /** + * Event which is raised after drop-down list was closed. + * + * Function takes arguments evt and ui. + * Use evt.originalEvent to obtain reference to event of browser. + * Use ui.owner to obtain reference to igCombo. + * Use ui.list to obtain reference to jquery DOM element which represents drop down list container. + * + * @optionValue Define event handler function. + */ + igCombo(optionLiteral: 'option', optionName: "dropDownClosed", optionValue: DropDownClosedEvent): void; + + /** + * Event which is raised before selection change. + * + * Return false in order to cancel change. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igCombo. + * Use ui.currentItems to obtain reference to array of the selected items before the new selection has happened. That can be null. + * Use ui.items to obtain reference to array of all items that will be selected after the selection finish. That can be null. + */ + igCombo(optionLiteral: 'option', optionName: "selectionChanging"): SelectionChangingEvent; + + /** + * Event which is raised before selection change. + * + * Return false in order to cancel change. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igCombo. + * Use ui.currentItems to obtain reference to array of the selected items before the new selection has happened. That can be null. + * Use ui.items to obtain reference to array of all items that will be selected after the selection finish. That can be null. + * + * @optionValue Define event handler function. + */ + igCombo(optionLiteral: 'option', optionName: "selectionChanging", optionValue: SelectionChangingEvent): void; + + /** + * Event which is raised after selection change. + * + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igCombo. + * Use ui.items to obtain reference to array of new selected items. That can be null. + * Use ui.oldItems to obtain reference to array of old selected items. That can be null. + */ + igCombo(optionLiteral: 'option', optionName: "selectionChanged"): SelectionChangedEvent; + + /** + * Event which is raised after selection change. + * + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igCombo. + * Use ui.items to obtain reference to array of new selected items. That can be null. + * Use ui.oldItems to obtain reference to array of old selected items. That can be null. + * + * @optionValue Define event handler function. + */ + igCombo(optionLiteral: 'option', optionName: "selectionChanged", optionValue: SelectionChangedEvent): void; + igCombo(options: IgCombo): JQuery; + igCombo(optionLiteral: 'option', optionName: string): any; + igCombo(optionLiteral: 'option', options: IgCombo): JQuery; + igCombo(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igCombo(methodName: string, ...methodParams: any[]): any; +} +interface StateChangingEvent { + (event: Event, ui: StateChangingEventUIParam): void; +} + +interface StateChangingEventUIParam { + /** + * Used to obtain a reference to the igDialog. + */ + owner?: any; + + /** + * Used ton to obtain the name of the button, which triggered the event. Note: if the state was modified from the code, then "button" is undefined. + */ + button?: any; + + /** + * Used to obtain the old state of the dialog, which can be one of the following: "opened", "minimized", "maximized", "closed". + */ + oldState?: any; + + /** + * Used to obtain the boolean value of the old pin state of the dialog. + */ + oldPinned?: any; + + /** + * Used to obtain the name of the action. That can be one of the following: + */ + action?: any; +} + +interface StateChangedEvent { + (event: Event, ui: StateChangedEventUIParam): void; +} + +interface StateChangedEventUIParam { + /** + * Used to obtain a reference to the igDialog. + */ + owner?: any; + + /** + * Used ton to obtain the name of the button, which triggered the event. Note: if the state was modified from the code, then "button" is undefined. + */ + button?: any; + + /** + * Used to obtain the old state of the dialog, which can be one of the following: "opened", "minimized", "maximized", "closed". + */ + oldState?: any; + + /** + * Used to obtain the boolean value of the old pin state of the dialog. + */ + oldPinned?: any; + + /** + * Used to obtain the name of the action. That can be one of the following: + */ + action?: any; +} + +interface AnimationEndedEvent { + (event: Event, ui: AnimationEndedEventUIParam): void; +} + +interface AnimationEndedEventUIParam { + /** + * Used to obtain a reference to the igDialog. + */ + owner?: any; + + /** + * Used to obtain the name of the action, which triggered the animation. + */ + action?: any; +} + +interface FocusEvent { + (event: Event, ui: FocusEventUIParam): void; +} + +interface FocusEventUIParam { + /** + * Used to obtain a reference to the igDialog. + */ + owner?: any; +} + +interface BlurEvent { + (event: Event, ui: BlurEventUIParam): void; +} + +interface BlurEventUIParam { + /** + * Used to obtain a reference to the igDialog. + */ + owner?: any; +} + +interface IgDialog { + /** + * Gets the jquery DIV object which is used as the main container for the dialog. + * Notes: + * 1. That object is optional and it should not contain any children. + * 2. It should not have parent. + * 3. It should not contain attributes which might destroy layout or appearance of the dialog. + * 4. Change of that option is not supported. + * + */ + mainElement?: Element; + + /** + * Gets/Sets the state of the dialog.Note: when the dialog is modal, then pinned and minimized states are not supported, because that will trigger misbehavior. + * + * + * + * Valid values: + * "opened" The dialog is opened. + * "minimized" The dialog is minimized. + * "maximized" The dialog is maximized. + * "closed" The dialog is closed. + */ + state?: string; + + /** + * Gets/Sets whether the dialog is pinned. + * When the dialog is pinned, then the html element of the dialog is moved to the original container where the target element was located and position:absolute is removed. + * The pinned dialog does not support modal state, maximized state and it can not be moved. + * Notes: + * 1. If the parent element of the original target-element is invisible, then the pinned dialog becomes invisible as well. + * 2. Pinned state is not supported for modal dialog. + * + */ + pinned?: boolean; + + /** + * Gets/Sets whether the dialog should close when Esc key is pressed. + * + */ + closeOnEscape?: boolean; + + /** + * Gets/Sets whether the close button in the dialog header should be visible. + * + */ + showCloseButton?: boolean; + + /** + * Gets/Sets whether the maximize button in the dialog header should be visible. + * + */ + showMaximizeButton?: boolean; + + /** + * Gets/Sets whether the minimize button in the dialog header should be visible. + * + */ + showMinimizeButton?: boolean; + + /** + * Gets/Sets whether the pin button in the dialog header should be visible. + * + */ + showPinButton?: boolean; + + /** + * Gets/Sets whether the dialog will be pinned on minimize. + * + */ + pinOnMinimized?: boolean; + + /** + * Gets the name of the css class which is applied to the SPAN element located on the left side of the header. + * + */ + imageClass?: string; + + /** + * Gets/Sets the text which appears in the header of the dialog. + * + */ + headerText?: string; + + /** + * Gets/Sets whether the dialog header should be visible. + * + */ + showHeader?: boolean; + + /** + * Gets/Sets whether the dialog footer should be visible. + * + */ + showFooter?: boolean; + + /** + * Gets/Sets the text which appears in the footer of the dialog. + * + */ + footerText?: string; + + /** + * Gets the name of the css class which is applied to the main DIV element of the dialog. + * + */ + dialogClass?: string; + + /** + * Gets/Sets the container html element for the dialog. + * That can be reference to html element, jquery selector or jquery object. + * By default the parent form of the original target element is used. If a form is not found, then the body is used. + * Note: If the "position" of the container is not set or it is "static", then the position is set to "relative". + * + */ + container?: any; + + /** + * Gets/Sets the initial height of the dialog in pixels for normal state.Besides numeric values, following units are supported: "px", "em" and "%". + * In case of "%", the size of browser window is used and it has effect only on open action. + * + * + */ + height?: number|string; + + /** + * Gets/Sets the initial width of the dialog in pixels for normal state.Besides numeric values, following units are supported: "px", "em" and "%". + * In case of "%", the size of browser window is used and it has effect only on open action. + * + * + */ + width?: number|string; + + /** + * Gets/Sets the minimal height of the dialog in normal state. + * + */ + minHeight?: number; + + /** + * Gets/Sets the minimal width of the dialog in normal state. + * + */ + minWidth?: number; + + /** + * Gets/Sets the maximal height of the dialog in normal state. Note: that option has effect only while resizing the dialog by the end user. + * + */ + maxHeight?: number; + + /** + * Gets/Sets the maximal width of the dialog in normal state. Note: that option has effect only while resizing the dialog by the end user. + * + */ + maxWidth?: number; + + /** + * Gets/Sets whether the dialog can be dragged by the user. + * + */ + draggable?: boolean; + + /** + * Gets/Sets the initial position of the dialog. That should be an object, which contains "top" and "left" members or an object + * supported by jquery.position(param) method. Examples: { left: 100, top: 200 }, { my: "left top", at: "left top", offset: "100 200" } + * + */ + position?: any; + + /** + * Gets/Sets whether the dialog can be resized by the user. + * + */ + resizable?: boolean; + + /** + * Gets/Sets the value for the tabIndex attribute applied to the main html element of the dialog. + * + */ + tabIndex?: number; + + /** + * Gets/Sets the animation applied to the dialog when it is opened. That can be any object supported by the jquery show(param) method. + * + */ + openAnimation?: any; + + /** + * Gets/Sets the animation applied to the dialog when it is closed. That can be any object supported by the jquery hide(param) method. + * + */ + closeAnimation?: any; + + /** + * Gets/Sets the value of zIndex applied to the main html element of the dialog. If value is not set, then 1000 is used. + * + */ + zIndex?: number; + + /** + * Gets/Sets the modal state of the dialog. + * If there are more than 1 modal igDialog, then the last opened dialog wins and becomes on the top. + * Note: the modal functionality is not supported when the dialog is minimized or pinned, because that will trigger misbehavior. + * + */ + modal?: boolean; + + /** + * Gets/Sets the ability to process focus and blur events of the child elements located in the dialog in order to maintain the focused state. + * Notes: + * If that option is enabled, then focus and blur event handlers are added to all the child elements of the dialog. + * If the dialog is modal or it can be maximized, then it is not recommended to disable that option. + * If that option is modified after the igDialog was already created, then depending on current state of the dialog, it will be temporary closed-opened or opened-closed. + * + */ + trackFocus?: boolean; + + /** + * Gets/Sets the title/tooltip for the close button in the dialog. That is an override for $.ig.Dialog.locale.closeButtonTitle. + * + */ + closeButtonTitle?: string; + + /** + * Gets/Sets the title/tooltip for the minimize button in the dialog. That is an override for $.ig.Dialog.locale.minimizeButtonTitle. + * + */ + minimizeButtonTitle?: string; + + /** + * Gets/Sets the title/tooltip for the maximize button in the dialog. That is an override for $.ig.Dialog.locale.maximizeButtonTitle. + * + */ + maximizeButtonTitle?: string; + + /** + * Gets/Sets the title/tooltip for the pin button in the dialog. That is an override for $.ig.Dialog.locale.pinButtonTitle. + * + */ + pinButtonTitle?: string; + + /** + * Gets/Sets the title/tooltip for the unpin button in the dialog. That is an override for $.ig.Dialog.locale.unpinButtonTitle. + * + */ + unpinButtonTitle?: string; + + /** + * Gets/Sets the title/tooltip for the restore button in the dialog. That is an override for $.ig.Dialog.locale.restoreButtonTitle. + * + */ + restoreButtonTitle?: string; + + /** + * Gets/Sets the temporary value for src, which is used while changing the parent of the base element if it is an instance of IFRAME. That allows getting around possible JavaScript exceptions under IE. + * + */ + temporaryUrl?: string; + + /** + * Gets/Sets the ability to adjust the state of the header depending on focused and not-focused states. Note: the "trackFocus" option should be enabled. + * + */ + enableHeaderFocus?: boolean; + + /** + * Gets/Sets the processing of the double-click on the dialog-header.If this option is not false and dialog was minimized, then its state will be set to normal. + * If this option is set to "auto" and showMaximizeButton is enabled or if this option is set to true, then the dialog will be maximized when it was in normal state, + * and dialog-state will be set to normal if it was maximized. + * + * + */ + enableDblclick?: any; + + /** + * Event which is raised before the state of dialog was changed. + * Return false in order to cancel action. + * + * The function takes arguments "evt" and "ui". + * Use evt to obtain the browser event. That parameter can be null if the state was modified from the code. + * Use ui.owner to obtain a reference to the igDialog. + * Use ui.button to obtain the name of the button, which triggered the event. Note: if the state was modified from the code, then "button" is undefined. + * Use ui.oldState to obtain the old state of the dialog, which can be one of the following: "opened", "minimized", "maximized", "closed". + * Use ui.oldPinned to obtain the boolean value of the old pin state of the dialog. + * Use ui.action to obtain the name of the action. That can be one of the following: + * "open" - request to open the dialog + * "close" - request to close the dialog + * "minimize" - request to minimize the dialog + * "maximize" - request to maximize the dialog + * "restore" - request to restore the dialog from minimized or maximized state + * "pin" - request to pin the dialog + * "unpin" - request to unpin the dialog + */ + stateChanging?: StateChangingEvent; + + /** + * Event which is raised after the state of the dialog was changed. + * + * The function takes arguments "evt" and "ui". + * Use evt to obtain the browser event. That parameter can be null if the state was modified from the code. + * Use ui.owner to obtain a reference to the igDialog. + * Use ui.button to obtain the name of the button, which triggered the event. Note: if the state was modified from the code, then "button" is undefined. + * Use ui.oldState to obtain the old state of the dialog, which can be one of the following: "opened", "minimized", "maximized", "closed". + * Use ui.oldPinned to obtain the boolean value of the old pin state of the dialog. + * Use ui.action to obtain the name of the action. That can be one of the following: + * "open" - the dialog was opened. Note: the event is raised before a possible "openAnimation" started. + * "close" - the dialog was closed. Note: the event is raised before a possible "closeAnimation" started. + * "minimize" - the dialog was minimized + * "maximize" - the dialog was maximized + * "restore" - the dialog was restored from minimized or maximized state + * "pin" - the dialog was pinned + * "unpin" - the dialog was unpinned + */ + stateChanged?: StateChangedEvent; + + /** + * Event which is raised after the end of the animation when the dialod was closed or opened. + * + * The function takes arguments "evt" and "ui". + * Use ui.owner to obtain a reference to the igDialog. + * Use ui.action to obtain the name of the action, which triggered the animation. + * "open" - the dialog was opened + * "close" - the dialog was closed + */ + animationEnded?: AnimationEndedEvent; + + /** + * Event which is raised when the dialog or its content gets focus. + * + * The function takes arguments "evt" and "ui". + * Use evt to obtain the browser event. + * Use ui.owner to obtain a reference to the igDialog. + */ + focus?: FocusEvent; + + /** + * Event which is raised when the dialog or its content loses focus. + * + * The function takes arguments "evt" and "ui". + * Use evt to obtain the browser event. + * Use ui.owner to obtain a reference to the igDialog. + */ + blur?: BlurEvent; + + /** + * Option for igDialog + */ + [optionName: string]: any; +} +interface IgDialogMethods { + /** + * Destroys the igDialog and moves the target element to its original parent. + */ + destroy(): Object; + + /** + * Gets/Sets the state of the editor. + * Note: If the state of the dialog changes, then stateChanging and stateChanged events are raised. + * + * @param state New state. + */ + state(state?: string): string; + + /** + * Gets reference to the dynamically created DIV element which represents the dialog. + */ + mainElement(): Element; + + /** + * Closes the dialog if it is opened. + * Notes: + * 1. If the state of the dialog changes, then stateChanging and stateChanged events are raised. + * 2. That method does not change minimized or maximized state of the dialog. + * It means that method "open" will open the dialog and keep previous minimized or maximized state. + * + * @param e Browser event: internal use only. + */ + close(e?: Object): Object; + + /** + * Opens the dialog if it is closed. Notes: + * 1. If the state of the dialog changes, then stateChanging and stateChanged events are raised. + * 2. That method does not change minimized or maximized state of the dialog. It means that if the dialog was in minimized or maximized stated when closed by "close" method, then the dialog will open in minimized or maximized state respectively. + */ + open(): Object; + + /** + * Minimizes the dialog if it is not minimized. + * Note: If the state of the dialog changes, then stateChanging and stateChanged events are raised. + */ + minimize(): Object; + + /** + * Maximizes the dialog if it is not maximized. + * Note: If the state of the dialog changes, then stateChanging and stateChanged events are raised. + */ + maximize(): Object; + + /** + * Sets the normal state for the dialog if it was maximized or minimized. + * Note: If the state of the dialog changes, then stateChanging and stateChanged events are raised. + */ + restore(): Object; + + /** + * Pins the dialog if it is not pinned. + * When the dialog is pinned, then the html element of the dialog is moved to the original container where the target element was located and position:absolute is removed. + * The pinned dialog does not support modal state, maximized state and it can not be moved. + * Notes: + * 1. If the parent element of the original target-element is invisible, then the pinned dialog becomes invisible as well. + * 2. If the state of the dialog changes, then stateChanging and stateChanged events are raised. + */ + pin(): Object; + + /** + * Unpins the dialog if it is pinned. + * Note: If the state of the dialog changes, then stateChanging and stateChanged events are raised. + */ + unpin(): Object; + + /** + * Gets a reference to the top modal dialog. + */ + getTopModal(): Object; + + /** + * Checks if the dialog is modal and if it is currently active. + */ + isTopModal(): boolean; + + /** + * Moves a not modal dialog to the top. + * + * @param e Original event of browser. + */ + moveToTop(e?: Object): Object; + + /** + * Retrieves the igDialog content container or sets its content to be the new content provided. + * + * @param newContent The new html content provided as a string. If the parameter is provided then the method acts as a setter. + */ + content(newContent?: string): Object; +} +interface JQuery { + data(propertyName: "igDialog"): IgDialogMethods; +} + +interface JQuery { + igDialog(methodName: "destroy"): Object; + igDialog(methodName: "state", state?: string): string; + igDialog(methodName: "mainElement"): Element; + igDialog(methodName: "close", e?: Object): Object; + igDialog(methodName: "open"): Object; + igDialog(methodName: "minimize"): Object; + igDialog(methodName: "maximize"): Object; + igDialog(methodName: "restore"): Object; + igDialog(methodName: "pin"): Object; + igDialog(methodName: "unpin"): Object; + igDialog(methodName: "getTopModal"): Object; + igDialog(methodName: "isTopModal"): boolean; + igDialog(methodName: "moveToTop", e?: Object): Object; + igDialog(methodName: "content", newContent?: string): Object; + + /** + * Gets the jquery DIV object which is used as the main container for the dialog. + * Notes: + * 1. That object is optional and it should not contain any children. + * 2. It should not have parent. + * 3. It should not contain attributes which might destroy layout or appearance of the dialog. + * 4. Change of that option is not supported. + * + */ + igDialog(optionLiteral: 'option', optionName: "mainElement"): Element; + + /** + * The jquery DIV object which is used as the main container for the dialog. + * Notes: + * 1. That object is optional and it should not contain any children. + * 2. It should not have parent. + * 3. It should not contain attributes which might destroy layout or appearance of the dialog. + * 4. Change of that option is not supported. + * + * + * @optionValue New value to be set. + */ + igDialog(optionLiteral: 'option', optionName: "mainElement", optionValue: Element): void; + + /** + * Gets/Sets the state of the dialog.Note: when the dialog is modal, then pinned and minimized states are not supported, because that will trigger misbehavior. + * + * + */ + igDialog(optionLiteral: 'option', optionName: "state"): string; + + /** + * /Sets the state of the dialog.Note: when the dialog is modal, then pinned and minimized states are not supported, because that will trigger misbehavior. + * + * + * + * @optionValue New value to be set. + */ + igDialog(optionLiteral: 'option', optionName: "state", optionValue: string): void; + + /** + * Gets/Sets whether the dialog is pinned. + * When the dialog is pinned, then the html element of the dialog is moved to the original container where the target element was located and position:absolute is removed. + * The pinned dialog does not support modal state, maximized state and it can not be moved. + * Notes: + * 1. If the parent element of the original target-element is invisible, then the pinned dialog becomes invisible as well. + * 2. Pinned state is not supported for modal dialog. + * + */ + igDialog(optionLiteral: 'option', optionName: "pinned"): boolean; + + /** + * /Sets whether the dialog is pinned. + * When the dialog is pinned, then the html element of the dialog is moved to the original container where the target element was located and position:absolute is removed. + * The pinned dialog does not support modal state, maximized state and it can not be moved. + * Notes: + * 1. If the parent element of the original target-element is invisible, then the pinned dialog becomes invisible as well. + * 2. Pinned state is not supported for modal dialog. + * + * + * @optionValue New value to be set. + */ + igDialog(optionLiteral: 'option', optionName: "pinned", optionValue: boolean): void; + + /** + * Gets/Sets whether the dialog should close when Esc key is pressed. + * + */ + igDialog(optionLiteral: 'option', optionName: "closeOnEscape"): boolean; + + /** + * /Sets whether the dialog should close when Esc key is pressed. + * + * + * @optionValue New value to be set. + */ + igDialog(optionLiteral: 'option', optionName: "closeOnEscape", optionValue: boolean): void; + + /** + * Gets/Sets whether the close button in the dialog header should be visible. + * + */ + igDialog(optionLiteral: 'option', optionName: "showCloseButton"): boolean; + + /** + * /Sets whether the close button in the dialog header should be visible. + * + * + * @optionValue New value to be set. + */ + igDialog(optionLiteral: 'option', optionName: "showCloseButton", optionValue: boolean): void; + + /** + * Gets/Sets whether the maximize button in the dialog header should be visible. + * + */ + igDialog(optionLiteral: 'option', optionName: "showMaximizeButton"): boolean; + + /** + * /Sets whether the maximize button in the dialog header should be visible. + * + * + * @optionValue New value to be set. + */ + igDialog(optionLiteral: 'option', optionName: "showMaximizeButton", optionValue: boolean): void; + + /** + * Gets/Sets whether the minimize button in the dialog header should be visible. + * + */ + igDialog(optionLiteral: 'option', optionName: "showMinimizeButton"): boolean; + + /** + * /Sets whether the minimize button in the dialog header should be visible. + * + * + * @optionValue New value to be set. + */ + igDialog(optionLiteral: 'option', optionName: "showMinimizeButton", optionValue: boolean): void; + + /** + * Gets/Sets whether the pin button in the dialog header should be visible. + * + */ + igDialog(optionLiteral: 'option', optionName: "showPinButton"): boolean; + + /** + * /Sets whether the pin button in the dialog header should be visible. + * + * + * @optionValue New value to be set. + */ + igDialog(optionLiteral: 'option', optionName: "showPinButton", optionValue: boolean): void; + + /** + * Gets/Sets whether the dialog will be pinned on minimize. + * + */ + igDialog(optionLiteral: 'option', optionName: "pinOnMinimized"): boolean; + + /** + * /Sets whether the dialog will be pinned on minimize. + * + * + * @optionValue New value to be set. + */ + igDialog(optionLiteral: 'option', optionName: "pinOnMinimized", optionValue: boolean): void; + + /** + * Gets the name of the css class which is applied to the SPAN element located on the left side of the header. + * + */ + igDialog(optionLiteral: 'option', optionName: "imageClass"): string; + + /** + * The name of the css class which is applied to the SPAN element located on the left side of the header. + * + * + * @optionValue New value to be set. + */ + igDialog(optionLiteral: 'option', optionName: "imageClass", optionValue: string): void; + + /** + * Gets/Sets the text which appears in the header of the dialog. + * + */ + igDialog(optionLiteral: 'option', optionName: "headerText"): string; + + /** + * /Sets the text which appears in the header of the dialog. + * + * + * @optionValue New value to be set. + */ + igDialog(optionLiteral: 'option', optionName: "headerText", optionValue: string): void; + + /** + * Gets/Sets whether the dialog header should be visible. + * + */ + igDialog(optionLiteral: 'option', optionName: "showHeader"): boolean; + + /** + * /Sets whether the dialog header should be visible. + * + * + * @optionValue New value to be set. + */ + igDialog(optionLiteral: 'option', optionName: "showHeader", optionValue: boolean): void; + + /** + * Gets/Sets whether the dialog footer should be visible. + * + */ + igDialog(optionLiteral: 'option', optionName: "showFooter"): boolean; + + /** + * /Sets whether the dialog footer should be visible. + * + * + * @optionValue New value to be set. + */ + igDialog(optionLiteral: 'option', optionName: "showFooter", optionValue: boolean): void; + + /** + * Gets/Sets the text which appears in the footer of the dialog. + * + */ + igDialog(optionLiteral: 'option', optionName: "footerText"): string; + + /** + * /Sets the text which appears in the footer of the dialog. + * + * + * @optionValue New value to be set. + */ + igDialog(optionLiteral: 'option', optionName: "footerText", optionValue: string): void; + + /** + * Gets the name of the css class which is applied to the main DIV element of the dialog. + * + */ + igDialog(optionLiteral: 'option', optionName: "dialogClass"): string; + + /** + * The name of the css class which is applied to the main DIV element of the dialog. + * + * + * @optionValue New value to be set. + */ + igDialog(optionLiteral: 'option', optionName: "dialogClass", optionValue: string): void; + + /** + * Gets/Sets the container html element for the dialog. + * That can be reference to html element, jquery selector or jquery object. + * By default the parent form of the original target element is used. If a form is not found, then the body is used. + * Note: If the "position" of the container is not set or it is "static", then the position is set to "relative". + * + */ + igDialog(optionLiteral: 'option', optionName: "container"): any; + + /** + * /Sets the container html element for the dialog. + * That can be reference to html element, jquery selector or jquery object. + * By default the parent form of the original target element is used. If a form is not found, then the body is used. + * Note: If the "position" of the container is not set or it is "static", then the position is set to "relative". + * + * + * @optionValue New value to be set. + */ + igDialog(optionLiteral: 'option', optionName: "container", optionValue: any): void; + + /** + * Gets/Sets the initial height of the dialog in pixels for normal state.Besides numeric values, following units are supported: "px", "em" and "%". + * In case of "%", the size of browser window is used and it has effect only on open action. + * + * + */ + igDialog(optionLiteral: 'option', optionName: "height"): number|string; + + /** + * /Sets the initial height of the dialog in pixels for normal state.Besides numeric values, following units are supported: "px", "em" and "%". + * In case of "%", the size of browser window is used and it has effect only on open action. + * + * + * + * @optionValue New value to be set. + */ + igDialog(optionLiteral: 'option', optionName: "height", optionValue: number|string): void; + + /** + * Gets/Sets the initial width of the dialog in pixels for normal state.Besides numeric values, following units are supported: "px", "em" and "%". + * In case of "%", the size of browser window is used and it has effect only on open action. + * + * + */ + igDialog(optionLiteral: 'option', optionName: "width"): number|string; + + /** + * /Sets the initial width of the dialog in pixels for normal state.Besides numeric values, following units are supported: "px", "em" and "%". + * In case of "%", the size of browser window is used and it has effect only on open action. + * + * + * + * @optionValue New value to be set. + */ + igDialog(optionLiteral: 'option', optionName: "width", optionValue: number|string): void; + + /** + * Gets/Sets the minimal height of the dialog in normal state. + * + */ + igDialog(optionLiteral: 'option', optionName: "minHeight"): number; + + /** + * /Sets the minimal height of the dialog in normal state. + * + * + * @optionValue New value to be set. + */ + igDialog(optionLiteral: 'option', optionName: "minHeight", optionValue: number): void; + + /** + * Gets/Sets the minimal width of the dialog in normal state. + * + */ + igDialog(optionLiteral: 'option', optionName: "minWidth"): number; + + /** + * /Sets the minimal width of the dialog in normal state. + * + * + * @optionValue New value to be set. + */ + igDialog(optionLiteral: 'option', optionName: "minWidth", optionValue: number): void; + + /** + * Gets/Sets the maximal height of the dialog in normal state. Note: that option has effect only while resizing the dialog by the end user. + * + */ + igDialog(optionLiteral: 'option', optionName: "maxHeight"): number; + + /** + * /Sets the maximal height of the dialog in normal state. Note: that option has effect only while resizing the dialog by the end user. + * + * + * @optionValue New value to be set. + */ + igDialog(optionLiteral: 'option', optionName: "maxHeight", optionValue: number): void; + + /** + * Gets/Sets the maximal width of the dialog in normal state. Note: that option has effect only while resizing the dialog by the end user. + * + */ + igDialog(optionLiteral: 'option', optionName: "maxWidth"): number; + + /** + * /Sets the maximal width of the dialog in normal state. Note: that option has effect only while resizing the dialog by the end user. + * + * + * @optionValue New value to be set. + */ + igDialog(optionLiteral: 'option', optionName: "maxWidth", optionValue: number): void; + + /** + * Gets/Sets whether the dialog can be dragged by the user. + * + */ + igDialog(optionLiteral: 'option', optionName: "draggable"): boolean; + + /** + * /Sets whether the dialog can be dragged by the user. + * + * + * @optionValue New value to be set. + */ + igDialog(optionLiteral: 'option', optionName: "draggable", optionValue: boolean): void; + + /** + * Gets/Sets the initial position of the dialog. That should be an object, which contains "top" and "left" members or an object + * supported by jquery.position(param) method. Examples: { left: 100, top: 200 }, { my: "left top", at: "left top", offset: "100 200" } + * + */ + igDialog(optionLiteral: 'option', optionName: "position"): any; + + /** + * /Sets the initial position of the dialog. That should be an object, which contains "top" and "left" members or an object + * supported by jquery.position(param) method. Examples: { left: 100, top: 200 }, { my: "left top", at: "left top", offset: "100 200" } + * + * + * @optionValue New value to be set. + */ + igDialog(optionLiteral: 'option', optionName: "position", optionValue: any): void; + + /** + * Gets/Sets whether the dialog can be resized by the user. + * + */ + igDialog(optionLiteral: 'option', optionName: "resizable"): boolean; + + /** + * /Sets whether the dialog can be resized by the user. + * + * + * @optionValue New value to be set. + */ + igDialog(optionLiteral: 'option', optionName: "resizable", optionValue: boolean): void; + + /** + * Gets/Sets the value for the tabIndex attribute applied to the main html element of the dialog. + * + */ + igDialog(optionLiteral: 'option', optionName: "tabIndex"): number; + + /** + * /Sets the value for the tabIndex attribute applied to the main html element of the dialog. + * + * + * @optionValue New value to be set. + */ + igDialog(optionLiteral: 'option', optionName: "tabIndex", optionValue: number): void; + + /** + * Gets/Sets the animation applied to the dialog when it is opened. That can be any object supported by the jquery show(param) method. + * + */ + igDialog(optionLiteral: 'option', optionName: "openAnimation"): any; + + /** + * /Sets the animation applied to the dialog when it is opened. That can be any object supported by the jquery show(param) method. + * + * + * @optionValue New value to be set. + */ + igDialog(optionLiteral: 'option', optionName: "openAnimation", optionValue: any): void; + + /** + * Gets/Sets the animation applied to the dialog when it is closed. That can be any object supported by the jquery hide(param) method. + * + */ + igDialog(optionLiteral: 'option', optionName: "closeAnimation"): any; + + /** + * /Sets the animation applied to the dialog when it is closed. That can be any object supported by the jquery hide(param) method. + * + * + * @optionValue New value to be set. + */ + igDialog(optionLiteral: 'option', optionName: "closeAnimation", optionValue: any): void; + + /** + * Gets/Sets the value of zIndex applied to the main html element of the dialog. If value is not set, then 1000 is used. + * + */ + igDialog(optionLiteral: 'option', optionName: "zIndex"): number; + + /** + * /Sets the value of zIndex applied to the main html element of the dialog. If value is not set, then 1000 is used. + * + * + * @optionValue New value to be set. + */ + igDialog(optionLiteral: 'option', optionName: "zIndex", optionValue: number): void; + + /** + * Gets/Sets the modal state of the dialog. + * If there are more than 1 modal igDialog, then the last opened dialog wins and becomes on the top. + * Note: the modal functionality is not supported when the dialog is minimized or pinned, because that will trigger misbehavior. + * + */ + igDialog(optionLiteral: 'option', optionName: "modal"): boolean; + + /** + * /Sets the modal state of the dialog. + * If there are more than 1 modal igDialog, then the last opened dialog wins and becomes on the top. + * Note: the modal functionality is not supported when the dialog is minimized or pinned, because that will trigger misbehavior. + * + * + * @optionValue New value to be set. + */ + igDialog(optionLiteral: 'option', optionName: "modal", optionValue: boolean): void; + + /** + * Gets/Sets the ability to process focus and blur events of the child elements located in the dialog in order to maintain the focused state. + * Notes: + * If that option is enabled, then focus and blur event handlers are added to all the child elements of the dialog. + * If the dialog is modal or it can be maximized, then it is not recommended to disable that option. + * If that option is modified after the igDialog was already created, then depending on current state of the dialog, it will be temporary closed-opened or opened-closed. + * + */ + igDialog(optionLiteral: 'option', optionName: "trackFocus"): boolean; + + /** + * /Sets the ability to process focus and blur events of the child elements located in the dialog in order to maintain the focused state. + * Notes: + * If that option is enabled, then focus and blur event handlers are added to all the child elements of the dialog. + * If the dialog is modal or it can be maximized, then it is not recommended to disable that option. + * If that option is modified after the igDialog was already created, then depending on current state of the dialog, it will be temporary closed-opened or opened-closed. + * + * + * @optionValue New value to be set. + */ + igDialog(optionLiteral: 'option', optionName: "trackFocus", optionValue: boolean): void; + + /** + * Gets/Sets the title/tooltip for the close button in the dialog. That is an override for $.ig.Dialog.locale.closeButtonTitle. + * + */ + igDialog(optionLiteral: 'option', optionName: "closeButtonTitle"): string; + + /** + * /Sets the title/tooltip for the close button in the dialog. That is an override for $.ig.Dialog.locale.closeButtonTitle. + * + * + * @optionValue New value to be set. + */ + igDialog(optionLiteral: 'option', optionName: "closeButtonTitle", optionValue: string): void; + + /** + * Gets/Sets the title/tooltip for the minimize button in the dialog. That is an override for $.ig.Dialog.locale.minimizeButtonTitle. + * + */ + igDialog(optionLiteral: 'option', optionName: "minimizeButtonTitle"): string; + + /** + * /Sets the title/tooltip for the minimize button in the dialog. That is an override for $.ig.Dialog.locale.minimizeButtonTitle. + * + * + * @optionValue New value to be set. + */ + igDialog(optionLiteral: 'option', optionName: "minimizeButtonTitle", optionValue: string): void; + + /** + * Gets/Sets the title/tooltip for the maximize button in the dialog. That is an override for $.ig.Dialog.locale.maximizeButtonTitle. + * + */ + igDialog(optionLiteral: 'option', optionName: "maximizeButtonTitle"): string; + + /** + * /Sets the title/tooltip for the maximize button in the dialog. That is an override for $.ig.Dialog.locale.maximizeButtonTitle. + * + * + * @optionValue New value to be set. + */ + igDialog(optionLiteral: 'option', optionName: "maximizeButtonTitle", optionValue: string): void; + + /** + * Gets/Sets the title/tooltip for the pin button in the dialog. That is an override for $.ig.Dialog.locale.pinButtonTitle. + * + */ + igDialog(optionLiteral: 'option', optionName: "pinButtonTitle"): string; + + /** + * /Sets the title/tooltip for the pin button in the dialog. That is an override for $.ig.Dialog.locale.pinButtonTitle. + * + * + * @optionValue New value to be set. + */ + igDialog(optionLiteral: 'option', optionName: "pinButtonTitle", optionValue: string): void; + + /** + * Gets/Sets the title/tooltip for the unpin button in the dialog. That is an override for $.ig.Dialog.locale.unpinButtonTitle. + * + */ + igDialog(optionLiteral: 'option', optionName: "unpinButtonTitle"): string; + + /** + * /Sets the title/tooltip for the unpin button in the dialog. That is an override for $.ig.Dialog.locale.unpinButtonTitle. + * + * + * @optionValue New value to be set. + */ + igDialog(optionLiteral: 'option', optionName: "unpinButtonTitle", optionValue: string): void; + + /** + * Gets/Sets the title/tooltip for the restore button in the dialog. That is an override for $.ig.Dialog.locale.restoreButtonTitle. + * + */ + igDialog(optionLiteral: 'option', optionName: "restoreButtonTitle"): string; + + /** + * /Sets the title/tooltip for the restore button in the dialog. That is an override for $.ig.Dialog.locale.restoreButtonTitle. + * + * + * @optionValue New value to be set. + */ + igDialog(optionLiteral: 'option', optionName: "restoreButtonTitle", optionValue: string): void; + + /** + * Gets/Sets the temporary value for src, which is used while changing the parent of the base element if it is an instance of IFRAME. That allows getting around possible JavaScript exceptions under IE. + * + */ + igDialog(optionLiteral: 'option', optionName: "temporaryUrl"): string; + + /** + * /Sets the temporary value for src, which is used while changing the parent of the base element if it is an instance of IFRAME. That allows getting around possible JavaScript exceptions under IE. + * + * + * @optionValue New value to be set. + */ + igDialog(optionLiteral: 'option', optionName: "temporaryUrl", optionValue: string): void; + + /** + * Gets/Sets the ability to adjust the state of the header depending on focused and not-focused states. Note: the "trackFocus" option should be enabled. + * + */ + igDialog(optionLiteral: 'option', optionName: "enableHeaderFocus"): boolean; + + /** + * /Sets the ability to adjust the state of the header depending on focused and not-focused states. Note: the "trackFocus" option should be enabled. + * + * + * @optionValue New value to be set. + */ + igDialog(optionLiteral: 'option', optionName: "enableHeaderFocus", optionValue: boolean): void; + + /** + * Gets/Sets the processing of the double-click on the dialog-header.If this option is not false and dialog was minimized, then its state will be set to normal. + * If this option is set to "auto" and showMaximizeButton is enabled or if this option is set to true, then the dialog will be maximized when it was in normal state, + * and dialog-state will be set to normal if it was maximized. + * + * + */ + igDialog(optionLiteral: 'option', optionName: "enableDblclick"): any; + + /** + * /Sets the processing of the double-click on the dialog-header.If this option is not false and dialog was minimized, then its state will be set to normal. + * If this option is set to "auto" and showMaximizeButton is enabled or if this option is set to true, then the dialog will be maximized when it was in normal state, + * and dialog-state will be set to normal if it was maximized. + * + * + * + * @optionValue New value to be set. + */ + igDialog(optionLiteral: 'option', optionName: "enableDblclick", optionValue: any): void; + + /** + * Event which is raised before the state of dialog was changed. + * Return false in order to cancel action. + * + * The function takes arguments "evt" and "ui". + * Use evt to obtain the browser event. That parameter can be null if the state was modified from the code. + * Use ui.owner to obtain a reference to the igDialog. + * Use ui.button to obtain the name of the button, which triggered the event. Note: if the state was modified from the code, then "button" is undefined. + * Use ui.oldState to obtain the old state of the dialog, which can be one of the following: "opened", "minimized", "maximized", "closed". + * Use ui.oldPinned to obtain the boolean value of the old pin state of the dialog. + * Use ui.action to obtain the name of the action. That can be one of the following: + * "open" - request to open the dialog + * "close" - request to close the dialog + * "minimize" - request to minimize the dialog + * "maximize" - request to maximize the dialog + * "restore" - request to restore the dialog from minimized or maximized state + * "pin" - request to pin the dialog + * "unpin" - request to unpin the dialog + */ + igDialog(optionLiteral: 'option', optionName: "stateChanging"): StateChangingEvent; + + /** + * Event which is raised before the state of dialog was changed. + * Return false in order to cancel action. + * + * The function takes arguments "evt" and "ui". + * Use evt to obtain the browser event. That parameter can be null if the state was modified from the code. + * Use ui.owner to obtain a reference to the igDialog. + * Use ui.button to obtain the name of the button, which triggered the event. Note: if the state was modified from the code, then "button" is undefined. + * Use ui.oldState to obtain the old state of the dialog, which can be one of the following: "opened", "minimized", "maximized", "closed". + * Use ui.oldPinned to obtain the boolean value of the old pin state of the dialog. + * Use ui.action to obtain the name of the action. That can be one of the following: + * "open" - request to open the dialog + * "close" - request to close the dialog + * "minimize" - request to minimize the dialog + * "maximize" - request to maximize the dialog + * "restore" - request to restore the dialog from minimized or maximized state + * "pin" - request to pin the dialog + * "unpin" - request to unpin the dialog + * + * @optionValue Define event handler function. + */ + igDialog(optionLiteral: 'option', optionName: "stateChanging", optionValue: StateChangingEvent): void; + + /** + * Event which is raised after the state of the dialog was changed. + * + * The function takes arguments "evt" and "ui". + * Use evt to obtain the browser event. That parameter can be null if the state was modified from the code. + * Use ui.owner to obtain a reference to the igDialog. + * Use ui.button to obtain the name of the button, which triggered the event. Note: if the state was modified from the code, then "button" is undefined. + * Use ui.oldState to obtain the old state of the dialog, which can be one of the following: "opened", "minimized", "maximized", "closed". + * Use ui.oldPinned to obtain the boolean value of the old pin state of the dialog. + * Use ui.action to obtain the name of the action. That can be one of the following: + * "open" - the dialog was opened. Note: the event is raised before a possible "openAnimation" started. + * "close" - the dialog was closed. Note: the event is raised before a possible "closeAnimation" started. + * "minimize" - the dialog was minimized + * "maximize" - the dialog was maximized + * "restore" - the dialog was restored from minimized or maximized state + * "pin" - the dialog was pinned + * "unpin" - the dialog was unpinned + */ + igDialog(optionLiteral: 'option', optionName: "stateChanged"): StateChangedEvent; + + /** + * Event which is raised after the state of the dialog was changed. + * + * The function takes arguments "evt" and "ui". + * Use evt to obtain the browser event. That parameter can be null if the state was modified from the code. + * Use ui.owner to obtain a reference to the igDialog. + * Use ui.button to obtain the name of the button, which triggered the event. Note: if the state was modified from the code, then "button" is undefined. + * Use ui.oldState to obtain the old state of the dialog, which can be one of the following: "opened", "minimized", "maximized", "closed". + * Use ui.oldPinned to obtain the boolean value of the old pin state of the dialog. + * Use ui.action to obtain the name of the action. That can be one of the following: + * "open" - the dialog was opened. Note: the event is raised before a possible "openAnimation" started. + * "close" - the dialog was closed. Note: the event is raised before a possible "closeAnimation" started. + * "minimize" - the dialog was minimized + * "maximize" - the dialog was maximized + * "restore" - the dialog was restored from minimized or maximized state + * "pin" - the dialog was pinned + * "unpin" - the dialog was unpinned + * + * @optionValue Define event handler function. + */ + igDialog(optionLiteral: 'option', optionName: "stateChanged", optionValue: StateChangedEvent): void; + + /** + * Event which is raised after the end of the animation when the dialod was closed or opened. + * + * The function takes arguments "evt" and "ui". + * Use ui.owner to obtain a reference to the igDialog. + * Use ui.action to obtain the name of the action, which triggered the animation. + * "open" - the dialog was opened + * "close" - the dialog was closed + */ + igDialog(optionLiteral: 'option', optionName: "animationEnded"): AnimationEndedEvent; + + /** + * Event which is raised after the end of the animation when the dialod was closed or opened. + * + * The function takes arguments "evt" and "ui". + * Use ui.owner to obtain a reference to the igDialog. + * Use ui.action to obtain the name of the action, which triggered the animation. + * "open" - the dialog was opened + * "close" - the dialog was closed + * + * @optionValue Define event handler function. + */ + igDialog(optionLiteral: 'option', optionName: "animationEnded", optionValue: AnimationEndedEvent): void; + + /** + * Event which is raised when the dialog or its content gets focus. + * + * The function takes arguments "evt" and "ui". + * Use evt to obtain the browser event. + * Use ui.owner to obtain a reference to the igDialog. + */ + igDialog(optionLiteral: 'option', optionName: "focus"): FocusEvent; + + /** + * Event which is raised when the dialog or its content gets focus. + * + * The function takes arguments "evt" and "ui". + * Use evt to obtain the browser event. + * Use ui.owner to obtain a reference to the igDialog. + * + * @optionValue Define event handler function. + */ + igDialog(optionLiteral: 'option', optionName: "focus", optionValue: FocusEvent): void; + + /** + * Event which is raised when the dialog or its content loses focus. + * + * The function takes arguments "evt" and "ui". + * Use evt to obtain the browser event. + * Use ui.owner to obtain a reference to the igDialog. + */ + igDialog(optionLiteral: 'option', optionName: "blur"): BlurEvent; + + /** + * Event which is raised when the dialog or its content loses focus. + * + * The function takes arguments "evt" and "ui". + * Use evt to obtain the browser event. + * Use ui.owner to obtain a reference to the igDialog. + * + * @optionValue Define event handler function. + */ + igDialog(optionLiteral: 'option', optionName: "blur", optionValue: BlurEvent): void; + igDialog(options: IgDialog): JQuery; + igDialog(optionLiteral: 'option', optionName: string): any; + igDialog(optionLiteral: 'option', options: IgDialog): JQuery; + igDialog(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igDialog(methodName: string, ...methodParams: any[]): any; +} +interface IgDoughnutChartSeries { + /** + * Gets or sets the current series type. + * + * Valid values: + * "flat" Series has flat 1-dimensional data. + */ + type?: string; + + /** + * Whether the series should render a tooltip. + */ + showTooltip?: boolean; + + /** + * The name of template or the template itself that chart tooltip will use to render. + */ + tooltipTemplate?: string; + + /** + * Gets or sets the data source for the chart. + */ + itemsSource?: any; + + /** + * Gets or Sets the property name that contains the values. + */ + valueMemberPath?: string; + + /** + * Gets or sets the property name that contains the labels. + */ + labelMemberPath?: string; + + /** + * Gets or sets the property name that contains the legend labels. + */ + legendLabelMemberPath?: string; + + /** + * Gets or sets the position of chart labels. + * + * Valid values: + * "none" + * "center" + * "insideEnd" + * "outsideEnd" + * "bestFit" + */ + labelsPosition?: string; + + /** + * Gets or sets whether the leader lines are visible. + * + * Valid values: + * "visible" + * "collapsed" + */ + leaderLineVisibility?: string; + + /** + * Gets or sets the style for the leader lines. + */ + leaderLineStyle?: any; + + /** + * Gets or sets what type of leader lines will be used for the outside end labels. + * + * Valid values: + * "straight" + * "arc" + * "spline" + */ + leaderLineType?: string; + + /** + * Gets or sets the margin between a label and its leader line. The default is 6 pixels. + */ + leaderLineMargin?: number; + + /** + * Gets or sets the threshold value that determines if slices are grouped into the Others slice. + */ + othersCategoryThreshold?: number; + + /** + * Gets or sets whether to use numeric or percent-based threshold value. + * + * Valid values: + * "number" + * "percent" + */ + othersCategoryType?: string; + + /** + * Gets or sets the label of the Others slice. + */ + othersCategoryText?: string; + + /** + * Gets or sets the legend used for the current chart. + */ + legend?: any; + + /** + * Sets or gets a function which takes an object that produces a formatted label for displaying in the chart. + */ + formatLabel?: any; + + /** + * Sets or gets a function which takes an object that produces a formatted label for displaying in the chart's legend. + */ + formatLegendLabel?: any; + + /** + * Gets or sets the pixel amount, by which the labels are offset from the edge of the slices. + */ + labelExtent?: number; + + /** + * Gets or sets the starting angle of the chart. + * The default zero value is equivalent to 3 o'clock. + */ + startAngle?: number; + + /** + * Gets or sets the style used when a slice is selected. + */ + selectedStyle?: any; + + /** + * Gets or sets the Brushes property. + * The brushes property defines the palette from which automatically assigned slice brushes are selected. + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + brushes?: any; + + /** + * Gets or sets the Outlines property. + * The Outlines property defines the palette from which automatically assigned slice outlines are selected. + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + outlines?: any; + + /** + * Gets or sets whether all surface interactions with the plot area should be disabled. + */ + isSurfaceInteractionDisabled?: any; + + /** + * Gets or sets the scaling factor of the chart's radius. Value between 0 and 1. + */ + radiusFactor?: number; + + /** + * Option for IgDoughnutChartSeries + */ + [optionName: string]: any; +} + +interface HoleDimensionsChangedEvent { + (event: Event, ui: HoleDimensionsChangedEventUIParam): void; +} + +interface HoleDimensionsChangedEventUIParam { +} + +interface IgDoughnutChart { + /** + * The width of the chart. It can be set as a number in pixels, string (px) or percentage (%). + */ + width?: string|number; + + /** + * The height of the chart. It can be set as a number in pixels, string (px) or percentage (%). + */ + height?: string|number; + + /** + * An array of series objects. + */ + series?: IgDoughnutChartSeries[]; + + /** + * Gets or sets whether the slices can be selected. + */ + allowSliceSelection?: boolean; + + /** + * Gets or sets whether all surface interactions with the plot area should be disabled. + */ + isSurfaceInteractionDisabled?: any; + + /** + * Gets or sets whether the slices can be exploded. + */ + allowSliceExplosion?: boolean; + + /** + * Gets or sets the inner extent of the doughnut chart. It is percent from the outer ring's radius. + */ + innerExtent?: number; + + /** + * Gets or sets the style used when a slice is selected. + */ + selectedStyle?: any; + + /** + * Gets sets template for tooltip associated with chart item. + * Example: "Value: $(ValueMemberPathInDataSource)" + */ + tooltipTemplate?: string; + + /** + * Gets sets maximum number of displayed records in chart. + */ + maxRecCount?: number; + + /** + * Gets sets a valid data source. + * That can be instance of array or primitives, array of objects, instance of $.ig.DataSource, or any other data accepted by $.ig.DataSource. + * Note: if it is set to string and "dataSourceType" option is not set, then $.ig.JSONPDataSource is used. + */ + dataSource?: any; + + /** + * Gets sets data source type (such as "json", "xml", etc). Please refer to the documentation of $.ig.DataSource and its type property + */ + dataSourceType?: string; + + /** + * Gets sets url which is used for sending JSON on request for remote data. + */ + dataSourceUrl?: string; + + /** + * See $.ig.DataSource. property in the response specifying the total number of records on the server. + */ + responseTotalRecCountKey?: string; + + /** + * See $.ig.DataSource. This is basically the property in the responses where data records are held, if the response is wrapped. + */ + responseDataKey?: string; + + /** + * Event fired when the mouse has hovered on a series and the tooltip is about to show + * Function takes arguments evt and ui. + * Use ui.element to get reference to tooltip DOM element. + * Use ui.item to get reference to current series item object. + * Use ui.chart to get reference to chart object. + * Use ui.series to get reference to current series object. + * Use ui.actualItemBrush to get item brush. + * Use ui.actualSeriesBrush to get series brush. + */ + tooltipShowing?: TooltipShowingEvent; + + /** + * Event fired after a tooltip is shown + * Function takes arguments evt and ui. + * Use ui.element to get reference to tooltip DOM element. + * Use ui.item to get reference to current series item object. + * Use ui.chart to get reference to chart object. + * Use ui.series to get reference to current series object. + * Use ui.actualItemBrush to get item brush. + * Use ui.actualSeriesBrush to get series brush. + */ + tooltipShown?: TooltipShownEvent; + + /** + * Event fired when the mouse has left a series and the tooltip is about to hide + * Function takes arguments evt and ui. + * Use ui.element to get reference to tooltip DOM element. + * Use ui.item to get reference to current series item object. + * Use ui.chart to get reference to chart object. + * Use ui.series to get reference to current series object. + * Use ui.actualItemBrush to get item brush. + * Use ui.actualSeriesBrush to get series brush. + */ + tooltipHiding?: TooltipHidingEvent; + + /** + * Event fired after a tooltip is hidden + * Function takes arguments evt and ui. + * Use ui.element to get reference to tooltip DOM element. + * Use ui.item to get reference to current series item object. + * Use ui.chart to get reference to chart object. + * Use ui.series to get reference to current series object. + * Use ui.actualItemBrush to get item brush. + * Use ui.actualSeriesBrush to get series brush. + */ + tooltipHidden?: TooltipHiddenEvent; + + /** + * Event fired when the control is displayed on a non HTML5 compliant browser + */ + browserNotSupported?: BrowserNotSupportedEvent; + + /** + * Raised when the slice is clicked. + */ + sliceClick?: SliceClickEvent; + + /** + * Raised when the dimensions (center point or radius) of the doughnut hole change. + */ + holeDimensionsChanged?: HoleDimensionsChangedEvent; + + /** + * Event which is raised before data binding. + * Return false in order to cancel data binding. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.dataSource to obtain reference to instance of $.ig.DataSource. + */ + dataBinding?: DataBindingEvent; + + /** + * Event which is raised after data binding. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.data to obtain reference to array actual data which is displayed by chart. + * Use ui.dataSource to obtain reference to instance of $.ig.DataSource. + */ + dataBound?: DataBoundEvent; + + /** + * Event which is raised before tooltip is updated. + * Return false in order to cancel updating and hide tooltip. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.text to obtain html of tooltip. Value of that member can be modified. If modified value is null or empty string, then current content of tooltip keeps old value. + * Use ui.item to obtain reference to item. Value of that member can be modified or replaced by custom item. + * Use ui.x to obtain left position of tooltip in pixels relative to widget. Value of that member can be modified. + * Use ui.y to obtain top position of tooltip in pixels relative to widget. Value of that member can be modified. + * Use ui.element to obtain reference to jquery object which represents tooltip. Value of that member can be replaced by custom element. + */ + updateTooltip?: UpdateTooltipEvent; + + /** + * Event which is raised before tooltip is hidden. + * Return false in order to cancel hiding and keep tooltip visible. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.item to obtain reference to item. + * Use ui.element to obtain reference to jquery object which represents tooltip or value of ui.element from last updateTooltip event. Value of that member can be replaced by custom element. + */ + hideTooltip?: HideTooltipEvent; + + /** + * Option for igDoughnutChart + */ + [optionName: string]: any; +} +interface IgDoughnutChartMethods { + /** + * Adds a new series to the doughnut chart. + * + * @param seriesObj The series object to be added. + */ + addSeries(seriesObj: Object): void; + + /** + * Removes the specified series from the doughnut chart. + * + * @param seriesObj The series object identifying the series to be removed. + */ + removeSeries(seriesObj: Object): void; + + /** + * Updates the series with the specified name with the specified new property values. + * + * @param value The series object identifying the series to be updated. + */ + updateSeries(value: Object): void; + + /** + * Returns the center of the doughnut chart. + */ + getCenterCoordinates(): Object; + + /** + * Returns the radius of the chart's hole. + */ + getHoleRadius(): number; + + /** + * Returns information about how the doughnut chart is rendered. + */ + exportVisualData(): Object; + + /** + * Causes all of the series that have pending changes e.g. by changed property values to be rendered immediately. + */ + flush(): void; + + /** + * Destroys the widget. + */ + destroy(): void; + + /** + * Find index of item within actual data used by chart. + * + * @param item The reference to item. + */ + findIndexOfItem(item: Object): number; + + /** + * Get item within actual data used by chart. That is similar to this.getData()[ index ]. + * + * @param index Index of data item. + */ + getDataItem(index: Object): Object; + + /** + * Get reference of actual data used by chart. + */ + getData(): any[]; + + /** + * Adds a new item to the data source and notifies the chart. + * + * @param item The item that we want to add to the data source. + */ + addItem(item: Object): Object; + + /** + * Inserts a new item to the data source and notifies the chart. + * + * @param item the new item that we want to insert in the data source. + * @param index The index in the data source where the new item will be inserted. + */ + insertItem(item: Object, index: number): Object; + + /** + * Deletes an item from the data source and notifies the chart. + * + * @param index The index in the data source from where the item will be been removed. + */ + removeItem(index: number): Object; + + /** + * Updates an item in the data source and notifies the chart. + * + * @param index The index of the item in the data source that we want to change. + * @param item The new item object that will be set in the data source. + */ + setItem(index: number, item: Object): Object; + + /** + * Notifies the chart that an item has been set in an associated data source. + * + * @param dataSource The data source in which the change happened. + * @param index The index in the items source that has been changed. + * @param newItem the new item that has been set in the collection. + * @param oldItem the old item that has been overwritten in the collection. + */ + notifySetItem(dataSource: Object, index: number, newItem: Object, oldItem: Object): Object; + + /** + * Notifies the chart that the items have been cleared from an associated data source. + * It's not necessary to notify more than one target of a change if they share the same items source. + * + * @param dataSource The data source in which the change happened. + */ + notifyClearItems(dataSource: Object): Object; + + /** + * Notifies the target axis or series that an item has been inserted at the specified index in its data source. + * It's not necessary to notify more than one target of a change if they share the same items source. + * + * @param dataSource The data source in which the change happened. + * @param index The index in the items source where the new item has been inserted. + * @param newItem the new item that has been set in the collection. + */ + notifyInsertItem(dataSource: Object, index: number, newItem: Object): Object; + + /** + * Notifies the target axis or series that an item has been removed from the specified index in its data source. + * It's not necessary to notify more than one target of a change if they share the same items source. + * + * @param dataSource The data source in which the change happened. + * @param index The index in the items source from where the old item has been removed. + * @param oldItem the old item that has been removed from the collection. + */ + notifyRemoveItem(dataSource: Object, index: number, oldItem: Object): Object; + + /** + * Get reference to chart object. + */ + chart(): Object; + + /** + * Binds data to the chart + */ + dataBind(): void; +} +interface JQuery { + data(propertyName: "igDoughnutChart"): IgDoughnutChartMethods; +} + +interface JQuery { + igDoughnutChart(methodName: "addSeries", seriesObj: Object): void; + igDoughnutChart(methodName: "removeSeries", seriesObj: Object): void; + igDoughnutChart(methodName: "updateSeries", value: Object): void; + igDoughnutChart(methodName: "getCenterCoordinates"): Object; + igDoughnutChart(methodName: "getHoleRadius"): number; + igDoughnutChart(methodName: "exportVisualData"): Object; + igDoughnutChart(methodName: "flush"): void; + igDoughnutChart(methodName: "destroy"): void; + igDoughnutChart(methodName: "findIndexOfItem", item: Object): number; + igDoughnutChart(methodName: "getDataItem", index: Object): Object; + igDoughnutChart(methodName: "getData"): any[]; + igDoughnutChart(methodName: "addItem", item: Object): Object; + igDoughnutChart(methodName: "insertItem", item: Object, index: number): Object; + igDoughnutChart(methodName: "removeItem", index: number): Object; + igDoughnutChart(methodName: "setItem", index: number, item: Object): Object; + igDoughnutChart(methodName: "notifySetItem", dataSource: Object, index: number, newItem: Object, oldItem: Object): Object; + igDoughnutChart(methodName: "notifyClearItems", dataSource: Object): Object; + igDoughnutChart(methodName: "notifyInsertItem", dataSource: Object, index: number, newItem: Object): Object; + igDoughnutChart(methodName: "notifyRemoveItem", dataSource: Object, index: number, oldItem: Object): Object; + igDoughnutChart(methodName: "chart"): Object; + igDoughnutChart(methodName: "dataBind"): void; + + /** + * The width of the chart. It can be set as a number in pixels, string (px) or percentage (%). + */ + igDoughnutChart(optionLiteral: 'option', optionName: "width"): string|number; + + /** + * The width of the chart. It can be set as a number in pixels, string (px) or percentage (%). + * + * @optionValue New value to be set. + */ + igDoughnutChart(optionLiteral: 'option', optionName: "width", optionValue: string|number): void; + + /** + * The height of the chart. It can be set as a number in pixels, string (px) or percentage (%). + */ + igDoughnutChart(optionLiteral: 'option', optionName: "height"): string|number; + + /** + * The height of the chart. It can be set as a number in pixels, string (px) or percentage (%). + * + * @optionValue New value to be set. + */ + igDoughnutChart(optionLiteral: 'option', optionName: "height", optionValue: string|number): void; + + /** + * An array of series objects. + */ + igDoughnutChart(optionLiteral: 'option', optionName: "series"): IgDoughnutChartSeries[]; + + /** + * An array of series objects. + * + * @optionValue New value to be set. + */ + igDoughnutChart(optionLiteral: 'option', optionName: "series", optionValue: IgDoughnutChartSeries[]): void; + + /** + * Gets whether the slices can be selected. + */ + igDoughnutChart(optionLiteral: 'option', optionName: "allowSliceSelection"): boolean; + + /** + * Sets whether the slices can be selected. + * + * @optionValue New value to be set. + */ + igDoughnutChart(optionLiteral: 'option', optionName: "allowSliceSelection", optionValue: boolean): void; + + /** + * Gets whether all surface interactions with the plot area should be disabled. + */ + igDoughnutChart(optionLiteral: 'option', optionName: "isSurfaceInteractionDisabled"): any; + + /** + * Sets whether all surface interactions with the plot area should be disabled. + * + * @optionValue New value to be set. + */ + igDoughnutChart(optionLiteral: 'option', optionName: "isSurfaceInteractionDisabled", optionValue: any): void; + + /** + * Gets whether the slices can be exploded. + */ + igDoughnutChart(optionLiteral: 'option', optionName: "allowSliceExplosion"): boolean; + + /** + * Sets whether the slices can be exploded. + * + * @optionValue New value to be set. + */ + igDoughnutChart(optionLiteral: 'option', optionName: "allowSliceExplosion", optionValue: boolean): void; + + /** + * Gets the inner extent of the doughnut chart. It is percent from the outer ring's radius. + */ + igDoughnutChart(optionLiteral: 'option', optionName: "innerExtent"): number; + + /** + * Sets the inner extent of the doughnut chart. It is percent from the outer ring's radius. + * + * @optionValue New value to be set. + */ + igDoughnutChart(optionLiteral: 'option', optionName: "innerExtent", optionValue: number): void; + + /** + * Gets the style used when a slice is selected. + */ + igDoughnutChart(optionLiteral: 'option', optionName: "selectedStyle"): any; + + /** + * Sets the style used when a slice is selected. + * + * @optionValue New value to be set. + */ + igDoughnutChart(optionLiteral: 'option', optionName: "selectedStyle", optionValue: any): void; + + /** + * Gets template for tooltip associated with chart item. + * Example: "Value: $(ValueMemberPathInDataSource)" + */ + igDoughnutChart(optionLiteral: 'option', optionName: "tooltipTemplate"): string; + + /** + * Sets template for tooltip associated with chart item. + * Example: "Value: $(ValueMemberPathInDataSource)" + * + * @optionValue New value to be set. + */ + igDoughnutChart(optionLiteral: 'option', optionName: "tooltipTemplate", optionValue: string): void; + + /** + * Gets maximum number of displayed records in chart. + */ + igDoughnutChart(optionLiteral: 'option', optionName: "maxRecCount"): number; + + /** + * Sets maximum number of displayed records in chart. + * + * @optionValue New value to be set. + */ + igDoughnutChart(optionLiteral: 'option', optionName: "maxRecCount", optionValue: number): void; + + /** + * Gets a valid data source. + * That can be instance of array or primitives, array of objects, instance of $.ig.DataSource, or any other data accepted by $.ig.DataSource. + * Note: if it is set to string and "dataSourceType" option is not set, then $.ig.JSONPDataSource is used. + */ + igDoughnutChart(optionLiteral: 'option', optionName: "dataSource"): any; + + /** + * Sets a valid data source. + * That can be instance of array or primitives, array of objects, instance of $.ig.DataSource, or any other data accepted by $.ig.DataSource. + * Note: if it is set to string and "dataSourceType" option is not set, then $.ig.JSONPDataSource is used. + * + * @optionValue New value to be set. + */ + igDoughnutChart(optionLiteral: 'option', optionName: "dataSource", optionValue: any): void; + + /** + * Gets data source type (such as "json", "xml", etc). Please refer to the documentation of $.ig.DataSource and its type property + */ + igDoughnutChart(optionLiteral: 'option', optionName: "dataSourceType"): string; + + /** + * Sets data source type (such as "json", "xml", etc). Please refer to the documentation of $.ig.DataSource and its type property + * + * @optionValue New value to be set. + */ + igDoughnutChart(optionLiteral: 'option', optionName: "dataSourceType", optionValue: string): void; + + /** + * Gets url which is used for sending JSON on request for remote data. + */ + igDoughnutChart(optionLiteral: 'option', optionName: "dataSourceUrl"): string; + + /** + * Sets url which is used for sending JSON on request for remote data. + * + * @optionValue New value to be set. + */ + igDoughnutChart(optionLiteral: 'option', optionName: "dataSourceUrl", optionValue: string): void; + + /** + * See $.ig.DataSource. property in the response specifying the total number of records on the server. + */ + igDoughnutChart(optionLiteral: 'option', optionName: "responseTotalRecCountKey"): string; + + /** + * See $.ig.DataSource. property in the response specifying the total number of records on the server. + * + * @optionValue New value to be set. + */ + igDoughnutChart(optionLiteral: 'option', optionName: "responseTotalRecCountKey", optionValue: string): void; + + /** + * See $.ig.DataSource. This is basically the property in the responses where data records are held, if the response is wrapped. + */ + igDoughnutChart(optionLiteral: 'option', optionName: "responseDataKey"): string; + + /** + * See $.ig.DataSource. This is basically the property in the responses where data records are held, if the response is wrapped. + * + * @optionValue New value to be set. + */ + igDoughnutChart(optionLiteral: 'option', optionName: "responseDataKey", optionValue: string): void; + + /** + * Event fired when the mouse has hovered on a series and the tooltip is about to show + * Function takes arguments evt and ui. + * Use ui.element to get reference to tooltip DOM element. + * Use ui.item to get reference to current series item object. + * Use ui.chart to get reference to chart object. + * Use ui.series to get reference to current series object. + * Use ui.actualItemBrush to get item brush. + * Use ui.actualSeriesBrush to get series brush. + */ + igDoughnutChart(optionLiteral: 'option', optionName: "tooltipShowing"): TooltipShowingEvent; + + /** + * Event fired when the mouse has hovered on a series and the tooltip is about to show + * Function takes arguments evt and ui. + * Use ui.element to get reference to tooltip DOM element. + * Use ui.item to get reference to current series item object. + * Use ui.chart to get reference to chart object. + * Use ui.series to get reference to current series object. + * Use ui.actualItemBrush to get item brush. + * Use ui.actualSeriesBrush to get series brush. + * + * @optionValue Define event handler function. + */ + igDoughnutChart(optionLiteral: 'option', optionName: "tooltipShowing", optionValue: TooltipShowingEvent): void; + + /** + * Event fired after a tooltip is shown + * Function takes arguments evt and ui. + * Use ui.element to get reference to tooltip DOM element. + * Use ui.item to get reference to current series item object. + * Use ui.chart to get reference to chart object. + * Use ui.series to get reference to current series object. + * Use ui.actualItemBrush to get item brush. + * Use ui.actualSeriesBrush to get series brush. + */ + igDoughnutChart(optionLiteral: 'option', optionName: "tooltipShown"): TooltipShownEvent; + + /** + * Event fired after a tooltip is shown + * Function takes arguments evt and ui. + * Use ui.element to get reference to tooltip DOM element. + * Use ui.item to get reference to current series item object. + * Use ui.chart to get reference to chart object. + * Use ui.series to get reference to current series object. + * Use ui.actualItemBrush to get item brush. + * Use ui.actualSeriesBrush to get series brush. + * + * @optionValue Define event handler function. + */ + igDoughnutChart(optionLiteral: 'option', optionName: "tooltipShown", optionValue: TooltipShownEvent): void; + + /** + * Event fired when the mouse has left a series and the tooltip is about to hide + * Function takes arguments evt and ui. + * Use ui.element to get reference to tooltip DOM element. + * Use ui.item to get reference to current series item object. + * Use ui.chart to get reference to chart object. + * Use ui.series to get reference to current series object. + * Use ui.actualItemBrush to get item brush. + * Use ui.actualSeriesBrush to get series brush. + */ + igDoughnutChart(optionLiteral: 'option', optionName: "tooltipHiding"): TooltipHidingEvent; + + /** + * Event fired when the mouse has left a series and the tooltip is about to hide + * Function takes arguments evt and ui. + * Use ui.element to get reference to tooltip DOM element. + * Use ui.item to get reference to current series item object. + * Use ui.chart to get reference to chart object. + * Use ui.series to get reference to current series object. + * Use ui.actualItemBrush to get item brush. + * Use ui.actualSeriesBrush to get series brush. + * + * @optionValue Define event handler function. + */ + igDoughnutChart(optionLiteral: 'option', optionName: "tooltipHiding", optionValue: TooltipHidingEvent): void; + + /** + * Event fired after a tooltip is hidden + * Function takes arguments evt and ui. + * Use ui.element to get reference to tooltip DOM element. + * Use ui.item to get reference to current series item object. + * Use ui.chart to get reference to chart object. + * Use ui.series to get reference to current series object. + * Use ui.actualItemBrush to get item brush. + * Use ui.actualSeriesBrush to get series brush. + */ + igDoughnutChart(optionLiteral: 'option', optionName: "tooltipHidden"): TooltipHiddenEvent; + + /** + * Event fired after a tooltip is hidden + * Function takes arguments evt and ui. + * Use ui.element to get reference to tooltip DOM element. + * Use ui.item to get reference to current series item object. + * Use ui.chart to get reference to chart object. + * Use ui.series to get reference to current series object. + * Use ui.actualItemBrush to get item brush. + * Use ui.actualSeriesBrush to get series brush. + * + * @optionValue Define event handler function. + */ + igDoughnutChart(optionLiteral: 'option', optionName: "tooltipHidden", optionValue: TooltipHiddenEvent): void; + + /** + * Event fired when the control is displayed on a non HTML5 compliant browser + */ + igDoughnutChart(optionLiteral: 'option', optionName: "browserNotSupported"): BrowserNotSupportedEvent; + + /** + * Event fired when the control is displayed on a non HTML5 compliant browser + * + * @optionValue Define event handler function. + */ + igDoughnutChart(optionLiteral: 'option', optionName: "browserNotSupported", optionValue: BrowserNotSupportedEvent): void; + + /** + * Raised when the slice is clicked. + */ + igDoughnutChart(optionLiteral: 'option', optionName: "sliceClick"): SliceClickEvent; + + /** + * Raised when the slice is clicked. + * + * @optionValue New value to be set. + */ + igDoughnutChart(optionLiteral: 'option', optionName: "sliceClick", optionValue: SliceClickEvent): void; + + /** + * Raised when the dimensions (center point or radius) of the doughnut hole change. + */ + igDoughnutChart(optionLiteral: 'option', optionName: "holeDimensionsChanged"): HoleDimensionsChangedEvent; + + /** + * Raised when the dimensions (center point or radius) of the doughnut hole change. + * + * @optionValue New value to be set. + */ + igDoughnutChart(optionLiteral: 'option', optionName: "holeDimensionsChanged", optionValue: HoleDimensionsChangedEvent): void; + + /** + * Event which is raised before data binding. + * Return false in order to cancel data binding. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.dataSource to obtain reference to instance of $.ig.DataSource. + */ + igDoughnutChart(optionLiteral: 'option', optionName: "dataBinding"): DataBindingEvent; + + /** + * Event which is raised before data binding. + * Return false in order to cancel data binding. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.dataSource to obtain reference to instance of $.ig.DataSource. + * + * @optionValue Define event handler function. + */ + igDoughnutChart(optionLiteral: 'option', optionName: "dataBinding", optionValue: DataBindingEvent): void; + + /** + * Event which is raised after data binding. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.data to obtain reference to array actual data which is displayed by chart. + * Use ui.dataSource to obtain reference to instance of $.ig.DataSource. + */ + igDoughnutChart(optionLiteral: 'option', optionName: "dataBound"): DataBoundEvent; + + /** + * Event which is raised after data binding. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.data to obtain reference to array actual data which is displayed by chart. + * Use ui.dataSource to obtain reference to instance of $.ig.DataSource. + * + * @optionValue Define event handler function. + */ + igDoughnutChart(optionLiteral: 'option', optionName: "dataBound", optionValue: DataBoundEvent): void; + + /** + * Event which is raised before tooltip is updated. + * Return false in order to cancel updating and hide tooltip. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.text to obtain html of tooltip. Value of that member can be modified. If modified value is null or empty string, then current content of tooltip keeps old value. + * Use ui.item to obtain reference to item. Value of that member can be modified or replaced by custom item. + * Use ui.x to obtain left position of tooltip in pixels relative to widget. Value of that member can be modified. + * Use ui.y to obtain top position of tooltip in pixels relative to widget. Value of that member can be modified. + * Use ui.element to obtain reference to jquery object which represents tooltip. Value of that member can be replaced by custom element. + */ + igDoughnutChart(optionLiteral: 'option', optionName: "updateTooltip"): UpdateTooltipEvent; + + /** + * Event which is raised before tooltip is updated. + * Return false in order to cancel updating and hide tooltip. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.text to obtain html of tooltip. Value of that member can be modified. If modified value is null or empty string, then current content of tooltip keeps old value. + * Use ui.item to obtain reference to item. Value of that member can be modified or replaced by custom item. + * Use ui.x to obtain left position of tooltip in pixels relative to widget. Value of that member can be modified. + * Use ui.y to obtain top position of tooltip in pixels relative to widget. Value of that member can be modified. + * Use ui.element to obtain reference to jquery object which represents tooltip. Value of that member can be replaced by custom element. + * + * @optionValue Define event handler function. + */ + igDoughnutChart(optionLiteral: 'option', optionName: "updateTooltip", optionValue: UpdateTooltipEvent): void; + + /** + * Event which is raised before tooltip is hidden. + * Return false in order to cancel hiding and keep tooltip visible. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.item to obtain reference to item. + * Use ui.element to obtain reference to jquery object which represents tooltip or value of ui.element from last updateTooltip event. Value of that member can be replaced by custom element. + */ + igDoughnutChart(optionLiteral: 'option', optionName: "hideTooltip"): HideTooltipEvent; + + /** + * Event which is raised before tooltip is hidden. + * Return false in order to cancel hiding and keep tooltip visible. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.item to obtain reference to item. + * Use ui.element to obtain reference to jquery object which represents tooltip or value of ui.element from last updateTooltip event. Value of that member can be replaced by custom element. + * + * @optionValue Define event handler function. + */ + igDoughnutChart(optionLiteral: 'option', optionName: "hideTooltip", optionValue: HideTooltipEvent): void; + igDoughnutChart(options: IgDoughnutChart): JQuery; + igDoughnutChart(optionLiteral: 'option', optionName: string): any; + igDoughnutChart(optionLiteral: 'option', options: IgDoughnutChart): JQuery; + igDoughnutChart(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igDoughnutChart(methodName: string, ...methodParams: any[]): any; +} +interface RenderingEvent { + (event: Event, ui: RenderingEventUIParam): void; +} + +interface RenderingEventUIParam { + /** + * Used to get a reference to the editor performing rendering. + */ + owner?: any; + + /** + * Used to get a reference to the editor element. + */ + element?: any; +} + +interface MousedownEvent { + (event: Event, ui: MousedownEventUIParam): void; +} + +interface MousedownEventUIParam { + /** + * Used to obtain reference to igEditor. + */ + owner?: any; + + /** + * Used to obtain a reference to the event target. + */ + element?: any; + + /** + * Used torInput to get a reference to the editor field. + */ + editorInput?: any; +} + +interface MouseupEvent { + (event: Event, ui: MouseupEventUIParam): void; +} + +interface MouseupEventUIParam { + /** + * Used to obtain reference to igEditor. + */ + owner?: any; + + /** + * Used to obtain a reference to the event target. + */ + element?: any; + + /** + * Used torInput to get a reference to the editor field. + */ + editorInput?: any; +} + +interface MousemoveEvent { + (event: Event, ui: MousemoveEventUIParam): void; +} + +interface MousemoveEventUIParam { + /** + * Used to obtain reference to igEditor. + */ + owner?: any; + + /** + * Used to obtain a reference to the event target. + */ + element?: any; + + /** + * Used torInput to get a reference to the editor field. + */ + editorInput?: any; +} + +interface MouseoverEvent { + (event: Event, ui: MouseoverEventUIParam): void; +} + +interface MouseoverEventUIParam { + /** + * Used to obtain reference to igEditor. + */ + owner?: any; + + /** + * Used to obtain a reference to the event target. + */ + element?: any; + + /** + * Used torInput to get a reference to the editor field. + */ + editorInput?: any; +} + +interface MouseoutEvent { + (event: Event, ui: MouseoutEventUIParam): void; +} + +interface MouseoutEventUIParam { + /** + * Used to obtain reference to igEditor. + */ + owner?: any; + + /** + * Used to obtain a reference to the event target. + */ + element?: any; + + /** + * Used torInput to get a reference to the editor field. + */ + editorInput?: any; +} + +interface KeydownEvent { + (event: Event, ui: KeydownEventUIParam): void; +} + +interface KeydownEventUIParam { + /** + * Used to obtain reference to igEditor. + */ + owner?: any; + + /** + * Used to obtain value of keyCode. + */ + key?: any; +} + +interface KeypressEvent { + (event: Event, ui: KeypressEventUIParam): void; +} + +interface KeypressEventUIParam { + /** + * Used to obtain reference to igEditor. + */ + owner?: any; + + /** + * Used to obtain value of keyCode. + */ + key?: any; +} + +interface KeyupEvent { + (event: Event, ui: KeyupEventUIParam): void; +} + +interface KeyupEventUIParam { + /** + * Used to obtain reference to igEditor. + */ + owner?: any; + + /** + * Used to obtain value of keyCode. + */ + key?: any; +} + +interface ValueChangingEvent { + (event: Event, ui: ValueChangingEventUIParam): void; +} + +interface ValueChangingEventUIParam { + /** + * Used to obtain reference to igEditor. + */ + owner?: any; + + /** + * Used to obtain the new value. + */ + newValue?: any; + + /** + * Used to obtain the old value. + */ + oldValue?: any; + + /** + * Used torInput to obtain reference to the editor input. + */ + editorInput?: any; +} + +interface ValueChangedEvent { + (event: Event, ui: ValueChangedEventUIParam): void; +} + +interface ValueChangedEventUIParam { + /** + * Used to obtain reference to igEditor. + */ + owner?: any; + + /** + * Used to obtain the new value. + */ + newValue?: any; + + /** + * Used to obtain the original value. + */ + originalValue?: any; + + /** + * Used torInput to obtain reference to the editor input. + */ + editorInput?: any; +} + +interface IgBaseEditor { + /** + * Gets/Sets the width of the control. + * + * + * Valid values: + * "null" will stretch to fit data, if no other widths are defined. + */ + width?: string|number; + + /** + * Gets/Sets the height of the control. + * + * + * Valid values: + * "null" will fit the editor inside its parent container, if no other heights are defined. + */ + height?: string|number; + + /** + * Gets/Sets value in editor. The effect of setting/getting that option depends on type of editor and on dataMode options for every type of editor. + * + */ + value?: any; + + /** + * Gets/Sets tabIndex attribute for the editor input. + * + */ + tabIndex?: number; + + /** + * Gets/Sets whether the editor value can become null. + * If that option is false, and editor has no value, then value is set to an empty string. + * + */ + allowNullValue?: boolean; + + /** + * Gets/Sets the representation of null value. In case of default the value for the input is set to null, which makes the input to hold an empty string + * + */ + nullValue?: string|number; + + /** + * Gets/Sets the name attribute of the value input. This input is used to sent the value to the server. In case the target element is input and it has name attribute, but the developer has set the inputName option, so this option overwrites the value input and removes the attribute from the element. + * + */ + inputName?: string; + + /** + * Gets/Sets the readonly attribute for the input. If set to true the input is readonly, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is submitted. + * + */ + readOnly?: boolean; + + /** + * Gets/Sets the disabled attribute for the input. If set to true the input is disabled, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is not submitted. + * + */ + disabled?: boolean; + + /** + * Gets/Sets options supported by the [igValidator](ui.igvalidator#options) widget. + * Note: Validation rules of [igValidator](ui.igvalidator#options), such as min and max value/length are applied separately triggering errors, + * while the corresponding options of the editor prevent values violating the defined rules from being entered. + * + */ + validatorOptions?: any; + + /** + * Event which is raised before rendering of the editor completes. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the editor performing rendering. + * Use ui.element to get a reference to the editor element. + */ + rendering?: RenderingEvent; + + /** + * Event which is raised after rendering of the editor completes. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the editor performing rendering. + * Use ui.element to get a reference to the editor element. + */ + rendered?: RenderedEvent; + + /** + * Event which is raised on mousedown event. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.element to obtain a reference to the event target. + * Use ui.editorInput to get a reference to the editor field. + */ + mousedown?: MousedownEvent; + + /** + * Event which is raised on mouseup event. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.element to obtain a reference to the event target. + * Use ui.editorInput to get a reference to the editor field. + */ + mouseup?: MouseupEvent; + + /** + * Event which is raised on mousemove at any part of editor including drop-down list. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.element to obtain a reference to the event target. + * Use ui.editorInput to get a reference to the editor field. + */ + mousemove?: MousemoveEvent; + + /** + * Event which is raised on mouseover at any part of editor including drop-down list. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.element to obtain a reference to the event target. + * Use ui.editorInput to get a reference to the editor field. + */ + mouseover?: MouseoverEvent; + + /** + * Event which is raised on mouseleave at any part of editor including drop-down list. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.element to obtain a reference to the event target. + * Use ui.editorInput to get a reference to the editor field. + */ + mouseout?: MouseoutEvent; + + /** + * Event which is raised when input field of editor loses focus. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.element to obtain a reference to the event target. + * Use ui.editorInput to get a reference to the editor field. + */ + blur?: BlurEvent; + + /** + * Event which is raised when input field of editor gets focus. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.element to obtain a reference to the event target. + * Use ui.editorInput to get a reference to the editor field. + */ + focus?: FocusEvent; + + /** + * Event which is raised on keydown event. + * Return false in order to cancel key action. + * Function takes arguments evt and ui. + * Use evt.originalEvent to obtain reference to event of browser. + * Use ui.owner to obtain reference to igEditor. + * Use ui.key to obtain value of keyCode. + */ + keydown?: KeydownEvent; + + /** + * Event which is raised on keypress event. + * Return false in order to cancel key action. + * Function takes arguments evt and ui. + * Use evt.originalEvent to obtain reference to event of browser. + * Use ui.owner to obtain reference to igEditor. + * Use ui.key to obtain value of keyCode. + */ + keypress?: KeypressEvent; + + /** + * Event which is raised on keyup event. + * Function takes arguments evt and ui. + * Use evt.originalEvent to obtain reference to event of browser. + * Use ui.owner to obtain reference to igEditor. + * Use ui.key to obtain value of keyCode. + */ + keyup?: KeyupEvent; + + /** + * Event which is raised before the editor value is changed. + * Return false in order to cancel change. + * It can be raised after loosing focus or on spin events. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.newValue to obtain the new value. + * Use ui.oldValue to obtain the old value. + * Use ui.editorInput to obtain reference to the editor input. + */ + valueChanging?: ValueChangingEvent; + + /** + * Event which is raised after the editor value is changed. It can be raised after loosing focus or on spin events. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.newValue to obtain the new value. + * Use ui.originalValue to obtain the original value. + * Use ui.editorInput to obtain reference to the editor input. + */ + valueChanged?: ValueChangedEvent; + + /** + * Option for igBaseEditor + */ + [optionName: string]: any; +} +interface IgBaseEditorMethods { + /** + * Gets/Sets name attribute applied to the editor element. + * + * @param newValue The new input name. + */ + inputName(newValue?: string): string; + value(newValue: Object): void; + + /** + * Gets the input element of the editor. + */ + field(): string; + + /** + * Gets a reference to the jQuery element that wraps the editor. + */ + editorContainer(): string; + + /** + * Gets whether the editor has focus. + */ + hasFocus(): boolean; + + /** + * Sets focus to the editor after the specified delay. + * + * @param delay The delay before focusing the editor. + */ + setFocus(delay?: number): void; + + /** + * Hides the editor. + */ + hide(): void; + + /** + * Shows the editor. + */ + show(): void; + + /** + * Gets a reference to [igValidator](ui.igvalidator) used by the editor. + */ + validator(): Object; + + /** + * Checks if the value in the editor is valid. Note: This function will not trigger automatic notifications. + */ + isValid(): boolean; + + /** + * Triggers validation for the editor. If validatorOptions are set will also call validate on the [igValidator](ui.igvalidator). + */ + validate(): boolean; + + /** + * Destroys the widget + */ + destroy(): void; +} +interface JQuery { + data(propertyName: "igBaseEditor"): IgBaseEditorMethods; +} + +interface DropDownListOpeningEvent { + (event: Event, ui: DropDownListOpeningEventUIParam): void; +} + +interface DropDownListOpeningEventUIParam { + /** + * Used to obtain reference to igEditor. + */ + owner?: any; + + /** + * Used torInput to obtain reference to the editable input + */ + editorInput?: any; + + /** + * Used to obtain reference to the list contaier. + */ + list?: any; +} + +interface DropDownListOpenedEvent { + (event: Event, ui: DropDownListOpenedEventUIParam): void; +} + +interface DropDownListOpenedEventUIParam { + /** + * Used to obtain reference to igEditor. + */ + owner?: any; + + /** + * Used torInput to obtain reference to the editable input + */ + editorInput?: any; + + /** + * Used to obtain reference to the list contaier. + */ + list?: any; +} + +interface DropDownListClosingEvent { + (event: Event, ui: DropDownListClosingEventUIParam): void; +} + +interface DropDownListClosingEventUIParam { + /** + * Used to obtain reference to igEditor. + */ + owner?: any; + + /** + * Used torInput to obtain reference to the editable input + */ + editorInput?: any; + + /** + * Used to obtain reference to the list contaier. + */ + list?: any; +} + +interface DropDownListClosedEvent { + (event: Event, ui: DropDownListClosedEventUIParam): void; +} + +interface DropDownListClosedEventUIParam { + /** + * Used to obtain reference to igEditor. + */ + owner?: any; + + /** + * Used torInput to obtain reference to the editable input + */ + editorInput?: any; + + /** + * Used to obtain reference to the list contaier. + */ + list?: any; +} + +interface DropDownItemSelectingEvent { + (event: Event, ui: DropDownItemSelectingEventUIParam): void; +} + +interface DropDownItemSelectingEventUIParam { + /** + * Used to obtain reference to igEditor. + */ + owner?: any; + + /** + * Used torInput to obtain reference to the editable input + */ + editorInput?: any; + + /** + * Used to obtain reference to the list contaier. + */ + list?: any; + + /** + * Used to obtain reference to the list item which is about to be selected. + */ + item?: any; +} + +interface DropDownItemSelectedEvent { + (event: Event, ui: DropDownItemSelectedEventUIParam): void; +} + +interface DropDownItemSelectedEventUIParam { + /** + * Used to obtain reference to igEditor. + */ + owner?: any; + + /** + * Used torInput to obtain reference to the editable input + */ + editorInput?: any; + + /** + * Used to obtain reference to the list contaier. + */ + list?: any; + + /** + * Used to obtain reference to the list item which is selected. + */ + item?: any; +} + +interface TextChangedEvent { + (event: Event, ui: TextChangedEventUIParam): void; +} + +interface TextChangedEventUIParam { + /** + * Used to obtain reference to igEditor. + */ + owner?: any; + + /** + * Used to obtain new text + */ + text?: any; + + /** + * Used to obtain the old text. + */ + oldText?: any; +} + +interface IgTextEditor { + /** + * Gets visibility of the spin, clear and drop-down button. That option can be set only on initialization. Combinations like 'dropdown,spin' or 'spin,clear' are supported too.Note! This option can not be set runtime. + * + * + * + * Valid values: + * "dropdown" A button to open/close the list is located on the right side of the editor. + * "clear" A button to clear the value is located on the right side of the editor. + * "spin" Spin buttons are located on the right side of the editor. + */ + buttonType?: string; + + /** + * Gets/Sets list of items which are used as a source for the drop-down list. + * Items in the list can be of type string, number or object. The items are directly rendered without any casting, or manipulation. + * + */ + listItems?: any[]; + + /** + * Gets/Sets custom width of the drop-down list in pixels. If the value is equal to 0 or negative, then the width of editor is set as a drop-down width. + * + */ + listWidth?: number; + + /** + * Gets/Sets the hover/unhover animation duration of a drop-down list item. + * + */ + listItemHoverDuration?: number; + + /** + * Gets wheather the drop-down list element is attached to the body of the document, or to the editor container element. + * If the option is set to false the editor will attach the drop-down list element to the editor container + * If the option is set to true the editor will attach its drop-down list to as a child of the body. + * Note! This option can not be set runtime. + * + */ + dropDownAttachedToBody?: boolean; + + /** + * Gets/Sets show/hide drop-down list animation duration in milliseconds. + * + */ + dropDownAnimationDuration?: number; + + /** + * Gets the number of the items to be shown at once when the drop-down list get opened. + * Notes: + * This option is overwritten if the number of list items is less than the set value. In that case the drop-down list displays all the items. + * This option can not be set runtime. + * + */ + visibleItemsCount?: number; + + /** + * Gets/Sets the ability of the editor to allow entering only specific characters in the input-field from the keyboard and on paste. + * Notes: + * If both "excludeKeys" and "includeKeys" options are used, then "excludeKeys" has priority and includeKeys options is not respected. + * The option is case sensitive! If the option is set runtime it's not applied on the current value. + * + */ + includeKeys?: string; + + /** + * Gets/Sets the ability of the editor to prevent entering specific characters from the keyboard or on paste. + * Notes: + * If both "excludeKeys" and "includeKeys" options are used, then "excludeKeys" has priority and includeKeys options is not respected. + * The option is case sensitive! If the option is set runtime it's not applied on the current value. + * + */ + excludeKeys?: string; + + /** + * Gets/Sets the horizontal alignment of the text in the editor. + * + * + * Valid values: + * "left" The text into the input gets aligned to the left. + * "right" The text into the input gets aligned to the right. + * "center" The text into the input gets aligned to the center. + */ + textAlign?: string; + + /** + * Gets/Sets the text which appears in the editor when it has no focus and the "value" is null or empty string. + * + */ + placeHolder?: string; + + /** + * Gets/Sets the action when the editor gets focused. The default value is selectAll. + * + * + * Valid values: + * "selectAll" Setting this option will select all the text into the editor when the edit mode gets enetered. + * "atStart" Setting this option will move the cursor at the begining the text into the editor when the edit mode gets enetered. + * "atEnd" Setting this option will move the cursor at the end the text into the editor when the edit mode gets enetered. + * "browserDefault" Setting this option won't do any extra logic, but proceed with the browser default behavior. + */ + selectionOnFocus?: string; + + /** + * Gets the text mode of the editor such as: single-line text editor, password editor or multiline editor. That option has effect only on initialization. If based element (selector) is TEXTAREA, then it is used as input-field. + * + * + * Valid values: + * "text" Single line text editor based on INPUT element is created. + * "password" Editor based on INPUT element with type password is created. + * "multiline" Multiline editor based on TEXTAREA element is created. + */ + textMode?: string; + + /** + * Gets/Sets the ability of the editor to automatically change the hoverd item into the opened dropdown list to its oposide side. When the last item is reached and the spin down is clicked, the first item gets hovered and vice versa. This option has no effect there is no drop-down list. + * + */ + spinWrapAround?: boolean; + + /** + * Gets/Sets if the editor should only allow values set into the list of items. This validation is done only when the editor is blured, or enter key is pressed + * + */ + isLimitedToListValues?: boolean; + + /** + * Gets/Sets if the editor should revert it's value to the previously valid value in case the value on blur, or enter key is not valid. If the opiton is set to false, editor calls clear functionality. + * + */ + revertIfNotValid?: boolean; + + /** + * Gets/Sets if the editor should prevent form submition when enter key is pressed. + * + */ + preventSubmitOnEnter?: boolean; + + /** + * Gets/Sets the drop-down list opening orientation when the list gets open. If the option is set to auto the editor has priority to open the drop-down list bottom. If the space is not enough it tries to open the list top. If the space is not enough in both directions then the list gets opened at the bottom of the editor. + * + * + * Valid values: + * "auto" If the option is set to auto the editor has priority to open the drop-down list bottom. If the space is not enough it tries to open the list top. If the space is not enough in both directions then the list gets opened at the bottom of the editor. + * "bottom" The drop-down list is opened at the bottom of the editor. + * "top" The drop-down list is opened at the top of the editor. + */ + dropDownOrientation?: string; + + /** + * Gets/Sets the maximum length of a text which can be entered by the user. + * Negative values or 0 disables that behavior. If set at runtime the editor doesn't apply the option to the cuurent value. + * + */ + maxLength?: number; + + /** + * Gets the ability to limit the editor to be used only as a dropdown list. When set to true the editor input is not editable. + * Note! In case there are no list items - the editor will reamin readonly + * Note! This option can not be set runtime. + * + */ + dropDownOnReadOnly?: boolean; + + /** + * Gets/Sets the ability to convert the input characters to upper case (true) or keeps the characters as they are (false). The option has effect only while keyboard entries and paste. + * Note! When the option is set at runtime the editor is not changing the current value. + * + */ + toUpper?: boolean; + + /** + * Gets/Sets the ability to convert the input characters to lower case (true) or keeps the characters as they are (false). The option has effect only while keyboard entries and paste. + * Note! When the option is set at runtime the editor is not changing the current value. + * + */ + toLower?: boolean; + + /** + * Gets/Sets the strings used for the localization of the component. This includes button titles, error messages etc. Value of the object should contain pairs or key:value members. Note: any sub-option of locale can appear within the main option of igEditor. In this case those values within main options will have highest priority and override corresponding value in locale. + * + */ + locale?: any; + + /** + * Disables/Enables default notifications for basic validation scenarios built in the editors such as required list selection, value wrapping around or spin limits. + * + */ + suppressNotifications?: boolean; + + /** + * Gets/Sets the width of the control. + * + * + * Valid values: + * "null" will stretch to fit data, if no other widths are defined. + */ + width?: string|number; + + /** + * Gets/Sets the height of the control. + * + * + * Valid values: + * "null" will fit the editor inside its parent container, if no other heights are defined. + */ + height?: string|number; + + /** + * Gets/Sets value in editor. The effect of setting/getting that option depends on type of editor and on dataMode options for every type of editor. + * + */ + value?: any; + + /** + * Gets/Sets tabIndex attribute for the editor input. + * + */ + tabIndex?: number; + + /** + * Gets/Sets whether the editor value can become null. + * If that option is false, and editor has no value, then value is set to an empty string. + * + */ + allowNullValue?: boolean; + + /** + * Gets/Sets the representation of null value. In case of default the value for the input is set to null, which makes the input to hold an empty string + * + */ + nullValue?: string|number; + + /** + * Gets/Sets the name attribute of the value input. This input is used to sent the value to the server. In case the target element is input and it has name attribute, but the developer has set the inputName option, so this option overwrites the value input and removes the attribute from the element. + * + */ + inputName?: string; + + /** + * Gets/Sets the readonly attribute for the input. If set to true the input is readonly, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is submitted. + * + */ + readOnly?: boolean; + + /** + * Gets/Sets the disabled attribute for the input. If set to true the input is disabled, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is not submitted. + * + */ + disabled?: boolean; + + /** + * Gets/Sets options supported by the [igValidator](ui.igvalidator#options) widget. + * Note: Validation rules of [igValidator](ui.igvalidator#options), such as min and max value/length are applied separately triggering errors, + * while the corresponding options of the editor prevent values violating the defined rules from being entered. + * + */ + validatorOptions?: any; + + /** + * Event which is raised when the drop down is opening. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.editorInput to obtain reference to the editable input + * Use ui.list to obtain reference to the list contaier. + */ + dropDownListOpening?: DropDownListOpeningEvent; + + /** + * Event which is raised after the drop down is opened. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.editorInput to obtain reference to the editable input + * Use ui.list to obtain reference to the list contaier. + */ + dropDownListOpened?: DropDownListOpenedEvent; + + /** + * Event which is raised when the drop down is closing. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.editorInput to obtain reference to the editable input + * Use ui.list to obtain reference to the list contaier. + */ + dropDownListClosing?: DropDownListClosingEvent; + + /** + * Event which is raised after the drop down is closed. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.editorInput to obtain reference to the editable input + * Use ui.list to obtain reference to the list contaier. + */ + dropDownListClosed?: DropDownListClosedEvent; + + /** + * Event which is raised when an item in the drop down list is being selected. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.editorInput to obtain reference to the editable input + * Use ui.list to obtain reference to the list contaier. + * Use ui.item to obtain reference to the list item which is about to be selected. + */ + dropDownItemSelecting?: DropDownItemSelectingEvent; + + /** + * Event which is raised after an item in the drop down list is selected. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.editorInput to obtain reference to the editable input + * Use ui.list to obtain reference to the list contaier. + * Use ui.item to obtain reference to the list item which is selected. + */ + dropDownItemSelected?: DropDownItemSelectedEvent; + + /** + * Event which is raised after text in the editor was changed. It can be raised when keyUp event occurs, + * when the clear button is clicked or when an item from a list is selected. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.text to obtain new text + * Use ui.oldText to obtain the old text. + */ + textChanged?: TextChangedEvent; + + /** + * Event which is raised before rendering of the editor completes. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the editor performing rendering. + * Use ui.element to get a reference to the editor element. + */ + rendering?: RenderingEvent; + + /** + * Event which is raised after rendering of the editor completes. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the editor performing rendering. + * Use ui.element to get a reference to the editor element. + */ + rendered?: RenderedEvent; + + /** + * Event which is raised on mousedown event. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.element to obtain a reference to the event target. + * Use ui.editorInput to get a reference to the editor field. + */ + mousedown?: MousedownEvent; + + /** + * Event which is raised on mouseup event. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.element to obtain a reference to the event target. + * Use ui.editorInput to get a reference to the editor field. + */ + mouseup?: MouseupEvent; + + /** + * Event which is raised on mousemove at any part of editor including drop-down list. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.element to obtain a reference to the event target. + * Use ui.editorInput to get a reference to the editor field. + */ + mousemove?: MousemoveEvent; + + /** + * Event which is raised on mouseover at any part of editor including drop-down list. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.element to obtain a reference to the event target. + * Use ui.editorInput to get a reference to the editor field. + */ + mouseover?: MouseoverEvent; + + /** + * Event which is raised on mouseleave at any part of editor including drop-down list. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.element to obtain a reference to the event target. + * Use ui.editorInput to get a reference to the editor field. + */ + mouseout?: MouseoutEvent; + + /** + * Event which is raised when input field of editor loses focus. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.element to obtain a reference to the event target. + * Use ui.editorInput to get a reference to the editor field. + */ + blur?: BlurEvent; + + /** + * Event which is raised when input field of editor gets focus. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.element to obtain a reference to the event target. + * Use ui.editorInput to get a reference to the editor field. + */ + focus?: FocusEvent; + + /** + * Event which is raised on keydown event. + * Return false in order to cancel key action. + * Function takes arguments evt and ui. + * Use evt.originalEvent to obtain reference to event of browser. + * Use ui.owner to obtain reference to igEditor. + * Use ui.key to obtain value of keyCode. + */ + keydown?: KeydownEvent; + + /** + * Event which is raised on keypress event. + * Return false in order to cancel key action. + * Function takes arguments evt and ui. + * Use evt.originalEvent to obtain reference to event of browser. + * Use ui.owner to obtain reference to igEditor. + * Use ui.key to obtain value of keyCode. + */ + keypress?: KeypressEvent; + + /** + * Event which is raised on keyup event. + * Function takes arguments evt and ui. + * Use evt.originalEvent to obtain reference to event of browser. + * Use ui.owner to obtain reference to igEditor. + * Use ui.key to obtain value of keyCode. + */ + keyup?: KeyupEvent; + + /** + * Event which is raised before the editor value is changed. + * Return false in order to cancel change. + * It can be raised after loosing focus or on spin events. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.newValue to obtain the new value. + * Use ui.oldValue to obtain the old value. + * Use ui.editorInput to obtain reference to the editor input. + */ + valueChanging?: ValueChangingEvent; + + /** + * Event which is raised after the editor value is changed. It can be raised after loosing focus or on spin events. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.newValue to obtain the new value. + * Use ui.originalValue to obtain the original value. + * Use ui.editorInput to obtain reference to the editor input. + */ + valueChanged?: ValueChangedEvent; + + /** + * Option for igTextEditor + */ + [optionName: string]: any; +} +interface IgTextEditorMethods { + /** + * Gets the visible text in the editor. + */ + displayValue(): string; + + /** + * Gets reference to jquery object which is used as container of drop-down list. + */ + dropDownContainer(): string; + + /** + * Shows the drop down list. + */ + showDropDown(): void; + + /** + * Hides the drop down list. + */ + hideDropDown(): void; + + /** + * Returns a reference to the drop-down button UI element of the editor. + */ + dropDownButton(): string; + + /** + * Returns if the drop-down list is visible. + */ + dropDownVisible(): boolean; + + /** + * Returns a reference to the clear button UI element of the editor. + */ + clearButton(): string; + + /** + * Finds index of list item by text that matches with the search parameters. + * + * @param text The text to search for in the drop down list. + * @param matchType The rule that is applied for searching the text. + */ + findListItemIndex(text: string, matchType?: Object): number; + + /** + * Gets the index of the selected list item. Sets selected item by index. + * + * @param index The index of the item that needs to be selected. + */ + selectedListIndex(index?: number): number; + + /** + * Gets the selected list item. + */ + getSelectedListItem(): string; + + /** + * Gets the selected text from the editor in edit mode. This can be done on key event like keydown or keyup. This method can be used only when the editor is focused. If you call this method in display mode (The editor input is blured) the returned value will be an empty string. + */ + getSelectedText(): string; + + /** + * Gets the start index of the selected text in the editor. + */ + getSelectionStart(): number; + + /** + * Gets the end index of the selected text in the editor. + */ + getSelectionEnd(): number; + + /** + * Inserts the text at the location of the caret or over the current selection. If the editor is focused the method will insert the text over the current selection. If the editor is not focused the method will set the text as value of the editor. + * Note: The method raises [textChanged](ui.igtexteditor#events:textChanged) event. + * + * @param string The string to be inserted. + */ + insert(string: string): void; + + /** + * Selects the text between start and end indices in the editor. If the parameters are equal, then the method sets location of caret. The method has effect only when the editor has focus. + * + * @param start Start of the selection. + * @param end End of the selection. + */ + select(start: number, end: number): void; + + /** + * Hovers the previous item in the drop-down list if the list is opened. + */ + spinUp(): void; + + /** + * Hovers the next item in the drop-down list if the list is opened. + */ + spinDown(): void; + + /** + * Returns a reference to the spin up UI element of the editor. + */ + spinUpButton(): string; + + /** + * Returns a reference to the spin down UI element of the editor. + */ + spinDownButton(): string; + + /** + * Gets/Sets name attribute applied to the editor element. + * + * @param newValue The new input name. + */ + inputName(newValue?: string): string; + value(newValue: Object): void; + + /** + * Gets the input element of the editor. + */ + field(): string; + + /** + * Gets a reference to the jQuery element that wraps the editor. + */ + editorContainer(): string; + + /** + * Gets whether the editor has focus. + */ + hasFocus(): boolean; + + /** + * Sets focus to the editor after the specified delay. + * + * @param delay The delay before focusing the editor. + */ + setFocus(delay?: number): void; + + /** + * Hides the editor. + */ + hide(): void; + + /** + * Shows the editor. + */ + show(): void; + + /** + * Gets a reference to [igValidator](ui.igvalidator) used by the editor. + */ + validator(): Object; + + /** + * Checks if the value in the editor is valid. Note: This function will not trigger automatic notifications. + */ + isValid(): boolean; + + /** + * Triggers validation for the editor. If validatorOptions are set will also call validate on the [igValidator](ui.igvalidator). + */ + validate(): boolean; + + /** + * Destroys the widget + */ + destroy(): void; +} +interface JQuery { + data(propertyName: "igTextEditor"): IgTextEditorMethods; +} + +interface IgNumericEditor { + /** + * Gets/Sets list of items which are used as a source for the drop-down list. + * Items in the list can be of type string, number or object. The items are directly rendered without any casting, or manipulation. + * + */ + listItems?: any[]; + + /** + * Gets/Sets custom regional settings for editor. If it is string, then $.ig.regional[stringValue] is assumed. + * + */ + regional?: any; + + /** + * Gets/Sets the character, which is used as negative sign. + * Note: This option has priority over possible regional settings. + * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * + */ + negativeSign?: string; + + /** + * Gets/Sets the string, which is used as negative pattern. The "n" flag represents the value of number. The "-" and "()" flags are static part of pattern. + * Note: This option has priority over possible regional settings. + * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * + */ + negativePattern?: string; + + /** + * Gets/Sets the character, which is used as decimal separator. + * Note: this option has priority over possible regional settings. + * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * + */ + decimalSeparator?: string; + + /** + * Gets/Sets the character, which is used as separator for groups (like thousands). + * That option has effect only in display mode(no focus). + * Note: this option has priority over possible regional settings. + * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * + */ + groupSeparator?: string; + + /** + * (array of number objects) Gets/Sets the number of digits in the integer part of a number, which are divided into groups. + * The "groupSeparator" is inserted between groups. + * If the sum of all values in array is smaller than the length of integer part, then the last item in array is used for all following groups. + * Count of groups starts from the decimal point (from right to left). + * That option has effect only in display mode(no focus). + * Note: this option has priority over possible regional settings. + * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * + */ + groups?: any[]; + + /** + * Gets/Sets the maximum number of decimal places which are used in display mode(no focus). + * Note: this option has priority over possible regional settings. + * Note: In case of min decimals value higher than max decimals - max decimals are equaled to min decimals property. + * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * + */ + maxDecimals?: number; + + /** + * Gets/Sets the minimum number of decimal places which are used in display (no focus) state. + * If number of digits in fractional part of number is less than the value of this option, then the "0" characters are used to fill missing digits. + * Note: This option has priority over possible regional settings. + * Note: In case of min decimals value higher than max decimals - max decimals are equaled to min decimals property. + * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * Note: This option supports values below or equal to 20. + * + */ + minDecimals?: number; + + /** + * Gets/Sets the horizontal alignment of the text in the editor. + * + * + * Valid values: + * "left" The text into the input gets aligned to the left. + * "right" The text into the input gets aligned to the right. + * "center" The text into the input gets aligned to the center. + */ + textAlign?: string; + + /** + * Defines the range that editor's value can accept.This is achieved by setting the [minValue](ui.igNumericEditor#options:minValue) and [maxValue](ui.igNumericEditor#options:maxValue) editor's options, accordingly to the lowest and highest accepted values for the defined numeric mode. + * The range for the specific type follows the numeric type standards, e.g. in .NET Framework [floating-point](https://msdn.microsoft.com/en-us/library/9ahet949.aspx) types and [integral types](https://msdn.microsoft.com/en-us/library/exx3b86w.aspx). + * In addition, the maximum value that can be set to [minDecimals](ui.igNumericEditor#options:minDecimals) and [maxDecimals](ui.igNumericEditor#options:maxDecimals) options can be 15, when editor is in 'double' mode and 7, when in 'float' mode. + * + * + * + * Valid values: + * "double" the Number object is used with the limits of a double and if the value is not set, then the null or Number.NaN is used depending on the option [allowNullValue](ui.igNumericEditor#options:allowNullValue). Note: that is used as default. + * "float" the Number object is used with the limits of a float and if the value is not set, then the null or Number.NaN is used depending on the option [allowNullValue](ui.igNumericEditor#options:allowNullValue). + * "long" the Number object is used with the limits of a signed long and if the value is not set, then the null or 0 is used depending on the option [allowNullValue](ui.igNumericEditor#options:allowNullValue). + * "ulong" the Number object is used with the limits of an unsigned long and if the value is not set, then the null or 0 is used depending on the option [allowNullValue](ui.igNumericEditor#options:allowNullValue). + * "int" the Number object is used with the limits of a signed int and if the value is not set, then the null or 0 is used depending on the option [allowNullValue](ui.igNumericEditor#options:allowNullValue). + * "uint" the Number object is used with the limits of an unsigned int and if the value is not set, then the null or 0 is used depending on the option [allowNullValue](ui.igNumericEditor#options:allowNullValue). + * "short" the Number object is used with the limits of a signed short and if the value is not set, then the null or 0 is used depending on the option [allowNullValue](ui.igNumericEditor#options:allowNullValue). + * "ushort" the Number object is used with the limits of an unsigned short and if the value is not set, then the null or 0 is used depending on the option [allowNullValue](ui.igNumericEditor#options:allowNullValue). + * "sbyte" the Number object is used with the limits of a signed byte and if the value is not set, then the null or 0 is used depending on the option [allowNullValue](ui.igNumericEditor#options:allowNullValue). + * "byte" the Number object is used with the limits of an unsigned byte and if the value is not set, then the null or 0 is used depending on the option [allowNullValue](ui.igNumericEditor#options:allowNullValue). + */ + dataMode?: string; + + /** + * Gets/Sets the minimum value which can be entered in the editor by the end user. + * + */ + minValue?: number; + + /** + * Gets/Sets the maximum value which can be entered in the editor by the end user. + * + */ + maxValue?: number; + + /** + * Gets/Sets whether the editor value can become null. + * If that option is disabled, and editor has no value, then value is set to 0 (or minValue/maxValue). + * + */ + allowNullValue?: boolean; + + /** + * Gets/Sets the default delta-value which is used with "spin" [buttonType](ui.igNumericEditor#options:buttonType) or [spinUp](ui.igNumericEditor#methods:spinUp) and [spinDown](ui.igNumericEditor#methods:spinDown) methods to increment or decrement value in the editor. The value can not be negative. Non integer value is supported only for dataMode double and float. + * + */ + spinDelta?: number; + + /** + * Gets/Sets support for scientific format in edit mode. + * If that option is set, then numeric value appears as a string with possible E-power flag. In edit mode the "E" or "e" character can be entered as well. + * Notes: The "+" character is not supported in edit mode. + * + * + * + * Valid values: + * "null" scientific format is disabled. + * "E" scientific format is enabled and the "E" character is used. + * "e" scientific format is enabled and the "e" character is used. + * "E+" scientific format is enabled and the "E" character is used. The "E+" is used for positive values in display mode. + * "e+" scientific format is enabled and the "e" character is used. The "e+" is used for positive values in display mode. + */ + scientificFormat?: string; + + /** + * Gets/Set the ability of the editor to automatically set value in the editor to the opposite side of the limit, when the spin action reaches minimum or maximum limit. + * + */ + spinWrapAround?: boolean; + + /** + * Removed from numeric editor options + */ + maxLength?: any; + + /** + * Removed from numeric editor options + */ + excludeKeys?: any; + + /** + * Removed from numeric editor options + */ + includeKeys?: any; + + /** + * Removed from numeric editor options + */ + toLower?: any; + + /** + * Removed from numeric editor options + */ + toUpper?: any; + + /** + * + */ + textMode?: any; + + /** + * Gets/Sets value in editor. The effect of setting/getting that option depends on type of editor and on dataMode options for every type of editor. + * + * + */ + value?: any; + + /** + * Gets visibility of the spin, clear and drop-down button. That option can be set only on initialization. Combinations like 'dropdown,spin' or 'spin,clear' are supported too.Note! This option can not be set runtime. + * + * + * + * Valid values: + * "dropdown" A button to open/close the list is located on the right side of the editor. + * "clear" A button to clear the value is located on the right side of the editor. + * "spin" Spin buttons are located on the right side of the editor. + */ + buttonType?: string; + + /** + * Gets/Sets custom width of the drop-down list in pixels. If the value is equal to 0 or negative, then the width of editor is set as a drop-down width. + * + */ + listWidth?: number; + + /** + * Gets/Sets the hover/unhover animation duration of a drop-down list item. + * + */ + listItemHoverDuration?: number; + + /** + * Gets wheather the drop-down list element is attached to the body of the document, or to the editor container element. + * If the option is set to false the editor will attach the drop-down list element to the editor container + * If the option is set to true the editor will attach its drop-down list to as a child of the body. + * Note! This option can not be set runtime. + * + */ + dropDownAttachedToBody?: boolean; + + /** + * Gets/Sets show/hide drop-down list animation duration in milliseconds. + * + */ + dropDownAnimationDuration?: number; + + /** + * Gets the number of the items to be shown at once when the drop-down list get opened. + * Notes: + * This option is overwritten if the number of list items is less than the set value. In that case the drop-down list displays all the items. + * This option can not be set runtime. + * + */ + visibleItemsCount?: number; + + /** + * Gets/Sets the text which appears in the editor when it has no focus and the "value" is null or empty string. + * + */ + placeHolder?: string; + + /** + * Gets/Sets the action when the editor gets focused. The default value is selectAll. + * + * + * Valid values: + * "selectAll" Setting this option will select all the text into the editor when the edit mode gets enetered. + * "atStart" Setting this option will move the cursor at the begining the text into the editor when the edit mode gets enetered. + * "atEnd" Setting this option will move the cursor at the end the text into the editor when the edit mode gets enetered. + * "browserDefault" Setting this option won't do any extra logic, but proceed with the browser default behavior. + */ + selectionOnFocus?: string; + + /** + * Gets/Sets if the editor should only allow values set into the list of items. This validation is done only when the editor is blured, or enter key is pressed + * + */ + isLimitedToListValues?: boolean; + + /** + * Gets/Sets if the editor should revert it's value to the previously valid value in case the value on blur, or enter key is not valid. If the opiton is set to false, editor calls clear functionality. + * + */ + revertIfNotValid?: boolean; + + /** + * Gets/Sets if the editor should prevent form submition when enter key is pressed. + * + */ + preventSubmitOnEnter?: boolean; + + /** + * Gets/Sets the drop-down list opening orientation when the list gets open. If the option is set to auto the editor has priority to open the drop-down list bottom. If the space is not enough it tries to open the list top. If the space is not enough in both directions then the list gets opened at the bottom of the editor. + * + * + * Valid values: + * "auto" If the option is set to auto the editor has priority to open the drop-down list bottom. If the space is not enough it tries to open the list top. If the space is not enough in both directions then the list gets opened at the bottom of the editor. + * "bottom" The drop-down list is opened at the bottom of the editor. + * "top" The drop-down list is opened at the top of the editor. + */ + dropDownOrientation?: string; + + /** + * Gets the ability to limit the editor to be used only as a dropdown list. When set to true the editor input is not editable. + * Note! In case there are no list items - the editor will reamin readonly + * Note! This option can not be set runtime. + * + */ + dropDownOnReadOnly?: boolean; + + /** + * Gets/Sets the strings used for the localization of the component. This includes button titles, error messages etc. Value of the object should contain pairs or key:value members. Note: any sub-option of locale can appear within the main option of igEditor. In this case those values within main options will have highest priority and override corresponding value in locale. + * + */ + locale?: any; + + /** + * Disables/Enables default notifications for basic validation scenarios built in the editors such as required list selection, value wrapping around or spin limits. + * + */ + suppressNotifications?: boolean; + + /** + * Gets/Sets the width of the control. + * + * + * Valid values: + * "null" will stretch to fit data, if no other widths are defined. + */ + width?: string|number; + + /** + * Gets/Sets the height of the control. + * + * + * Valid values: + * "null" will fit the editor inside its parent container, if no other heights are defined. + */ + height?: string|number; + + /** + * Gets/Sets tabIndex attribute for the editor input. + * + */ + tabIndex?: number; + + /** + * Gets/Sets the representation of null value. In case of default the value for the input is set to null, which makes the input to hold an empty string + * + */ + nullValue?: string|number; + + /** + * Gets/Sets the name attribute of the value input. This input is used to sent the value to the server. In case the target element is input and it has name attribute, but the developer has set the inputName option, so this option overwrites the value input and removes the attribute from the element. + * + */ + inputName?: string; + + /** + * Gets/Sets the readonly attribute for the input. If set to true the input is readonly, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is submitted. + * + */ + readOnly?: boolean; + + /** + * Gets/Sets the disabled attribute for the input. If set to true the input is disabled, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is not submitted. + * + */ + disabled?: boolean; + + /** + * Gets/Sets options supported by the [igValidator](ui.igvalidator#options) widget. + * Note: Validation rules of [igValidator](ui.igvalidator#options), such as min and max value/length are applied separately triggering errors, + * while the corresponding options of the editor prevent values violating the defined rules from being entered. + * + */ + validatorOptions?: any; + + /** + * Event which is raised when the drop down is opening. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.editorInput to obtain reference to the editable input + * Use ui.list to obtain reference to the list contaier. + */ + dropDownListOpening?: DropDownListOpeningEvent; + + /** + * Event which is raised after the drop down is opened. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.editorInput to obtain reference to the editable input + * Use ui.list to obtain reference to the list contaier. + */ + dropDownListOpened?: DropDownListOpenedEvent; + + /** + * Event which is raised when the drop down is closing. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.editorInput to obtain reference to the editable input + * Use ui.list to obtain reference to the list contaier. + */ + dropDownListClosing?: DropDownListClosingEvent; + + /** + * Event which is raised after the drop down is closed. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.editorInput to obtain reference to the editable input + * Use ui.list to obtain reference to the list contaier. + */ + dropDownListClosed?: DropDownListClosedEvent; + + /** + * Event which is raised when an item in the drop down list is being selected. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.editorInput to obtain reference to the editable input + * Use ui.list to obtain reference to the list contaier. + * Use ui.item to obtain reference to the list item which is about to be selected. + */ + dropDownItemSelecting?: DropDownItemSelectingEvent; + + /** + * Event which is raised after an item in the drop down list is selected. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.editorInput to obtain reference to the editable input + * Use ui.list to obtain reference to the list contaier. + * Use ui.item to obtain reference to the list item which is selected. + */ + dropDownItemSelected?: DropDownItemSelectedEvent; + + /** + * Event which is raised after text in the editor was changed. It can be raised when keyUp event occurs, + * when the clear button is clicked or when an item from a list is selected. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.text to obtain new text + * Use ui.oldText to obtain the old text. + */ + textChanged?: TextChangedEvent; + + /** + * Option for igNumericEditor + */ + [optionName: string]: any; +} +interface IgNumericEditorMethods { + /** + * Gets/Sets editor value. + * + * @param newValue New editor value. + */ + value(newValue?: number): number; + + /** + * Finds index of list item by text that matches with the search parameters. + * + * @param number The text to search for. + */ + findListItemIndex(number: number): number; + getSelectedText(): void; + getSelectionStart(): void; + getSelectionEnd(): void; + + /** + * Increments value in editor according to the parameter. + * + * @param delta Increments value. + */ + spinUp(delta?: number): void; + + /** + * Decrements value in editor according to the parameter. + * + * @param delta Decrement value. + */ + spinDown(delta?: number): void; + + /** + * Moves the hovered index to the item that appears above the current one in the list. + */ + selectListIndexUp(): void; + + /** + * Moves the hovered index to the item that appears above the current one in the list. + */ + selectListIndexDown(): void; + + /** + * Gets current regional. + */ + getRegionalOption(): string; + + /** + * Gets the visible text in the editor. + */ + displayValue(): string; + + /** + * Gets reference to jquery object which is used as container of drop-down list. + */ + dropDownContainer(): string; + + /** + * Shows the drop down list. + */ + showDropDown(): void; + + /** + * Hides the drop down list. + */ + hideDropDown(): void; + + /** + * Returns a reference to the drop-down button UI element of the editor. + */ + dropDownButton(): string; + + /** + * Returns if the drop-down list is visible. + */ + dropDownVisible(): boolean; + + /** + * Returns a reference to the clear button UI element of the editor. + */ + clearButton(): string; + + /** + * Gets the index of the selected list item. Sets selected item by index. + * + * @param index The index of the item that needs to be selected. + */ + selectedListIndex(index?: number): number; + + /** + * Gets the selected list item. + */ + getSelectedListItem(): string; + + /** + * Inserts the text at the location of the caret or over the current selection. If the editor is focused the method will insert the text over the current selection. If the editor is not focused the method will set the text as value of the editor. + * Note: The method raises [textChanged](ui.igtexteditor#events:textChanged) event. + * + * @param string The string to be inserted. + */ + insert(string: string): void; + + /** + * Selects the text between start and end indices in the editor. If the parameters are equal, then the method sets location of caret. The method has effect only when the editor has focus. + * + * @param start Start of the selection. + * @param end End of the selection. + */ + select(start: number, end: number): void; + + /** + * Returns a reference to the spin up UI element of the editor. + */ + spinUpButton(): string; + + /** + * Returns a reference to the spin down UI element of the editor. + */ + spinDownButton(): string; +} +interface JQuery { + data(propertyName: "igNumericEditor"): IgNumericEditorMethods; +} + +interface IgCurrencyEditor { + /** + * Gets/Sets the string, which is used as positive pattern. The "n" flag represents the value of number. + * Note: This option has priority over possible regional settings. + * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * + */ + positivePattern?: string; + + /** + * Gets/Sets a string that is used as the currency symbol that is shown in display mode. + * + */ + currencySymbol?: string; + + /** + * Gets/Sets list of items which are used as a source for the drop-down list. + * Items in the list can be of type string, number or object. The items are directly rendered without any casting, or manipulation. + * + */ + listItems?: any[]; + + /** + * Gets/Sets custom regional settings for editor. If it is string, then $.ig.regional[stringValue] is assumed. + * + */ + regional?: any; + + /** + * Gets/Sets the character, which is used as negative sign. + * Note: This option has priority over possible regional settings. + * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * + */ + negativeSign?: string; + + /** + * Gets/Sets the string, which is used as negative pattern. The "n" flag represents the value of number. The "-" and "()" flags are static part of pattern. + * Note: This option has priority over possible regional settings. + * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * + */ + negativePattern?: string; + + /** + * Gets/Sets the character, which is used as decimal separator. + * Note: this option has priority over possible regional settings. + * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * + */ + decimalSeparator?: string; + + /** + * Gets/Sets the character, which is used as separator for groups (like thousands). + * That option has effect only in display mode(no focus). + * Note: this option has priority over possible regional settings. + * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * + */ + groupSeparator?: string; + + /** + * (array of number objects) Gets/Sets the number of digits in the integer part of a number, which are divided into groups. + * The "groupSeparator" is inserted between groups. + * If the sum of all values in array is smaller than the length of integer part, then the last item in array is used for all following groups. + * Count of groups starts from the decimal point (from right to left). + * That option has effect only in display mode(no focus). + * Note: this option has priority over possible regional settings. + * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * + */ + groups?: any[]; + + /** + * Gets/Sets the maximum number of decimal places which are used in display mode(no focus). + * Note: this option has priority over possible regional settings. + * Note: In case of min decimals value higher than max decimals - max decimals are equaled to min decimals property. + * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * + */ + maxDecimals?: number; + + /** + * Gets/Sets the minimum number of decimal places which are used in display (no focus) state. + * If number of digits in fractional part of number is less than the value of this option, then the "0" characters are used to fill missing digits. + * Note: This option has priority over possible regional settings. + * Note: In case of min decimals value higher than max decimals - max decimals are equaled to min decimals property. + * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * Note: This option supports values below or equal to 20. + * + */ + minDecimals?: number; + + /** + * Gets/Sets the horizontal alignment of the text in the editor. + * + * + * Valid values: + * "left" The text into the input gets aligned to the left. + * "right" The text into the input gets aligned to the right. + * "center" The text into the input gets aligned to the center. + */ + textAlign?: string; + + /** + * Defines the range that editor's value can accept.This is achieved by setting the [minValue](ui.igNumericEditor#options:minValue) and [maxValue](ui.igNumericEditor#options:maxValue) editor's options, accordingly to the lowest and highest accepted values for the defined numeric mode. + * The range for the specific type follows the numeric type standards, e.g. in .NET Framework [floating-point](https://msdn.microsoft.com/en-us/library/9ahet949.aspx) types and [integral types](https://msdn.microsoft.com/en-us/library/exx3b86w.aspx). + * In addition, the maximum value that can be set to [minDecimals](ui.igNumericEditor#options:minDecimals) and [maxDecimals](ui.igNumericEditor#options:maxDecimals) options can be 15, when editor is in 'double' mode and 7, when in 'float' mode. + * + * + * + * Valid values: + * "double" the Number object is used with the limits of a double and if the value is not set, then the null or Number.NaN is used depending on the option [allowNullValue](ui.igNumericEditor#options:allowNullValue). Note: that is used as default. + * "float" the Number object is used with the limits of a float and if the value is not set, then the null or Number.NaN is used depending on the option [allowNullValue](ui.igNumericEditor#options:allowNullValue). + * "long" the Number object is used with the limits of a signed long and if the value is not set, then the null or 0 is used depending on the option [allowNullValue](ui.igNumericEditor#options:allowNullValue). + * "ulong" the Number object is used with the limits of an unsigned long and if the value is not set, then the null or 0 is used depending on the option [allowNullValue](ui.igNumericEditor#options:allowNullValue). + * "int" the Number object is used with the limits of a signed int and if the value is not set, then the null or 0 is used depending on the option [allowNullValue](ui.igNumericEditor#options:allowNullValue). + * "uint" the Number object is used with the limits of an unsigned int and if the value is not set, then the null or 0 is used depending on the option [allowNullValue](ui.igNumericEditor#options:allowNullValue). + * "short" the Number object is used with the limits of a signed short and if the value is not set, then the null or 0 is used depending on the option [allowNullValue](ui.igNumericEditor#options:allowNullValue). + * "ushort" the Number object is used with the limits of an unsigned short and if the value is not set, then the null or 0 is used depending on the option [allowNullValue](ui.igNumericEditor#options:allowNullValue). + * "sbyte" the Number object is used with the limits of a signed byte and if the value is not set, then the null or 0 is used depending on the option [allowNullValue](ui.igNumericEditor#options:allowNullValue). + * "byte" the Number object is used with the limits of an unsigned byte and if the value is not set, then the null or 0 is used depending on the option [allowNullValue](ui.igNumericEditor#options:allowNullValue). + */ + dataMode?: string; + + /** + * Gets/Sets the minimum value which can be entered in the editor by the end user. + * + */ + minValue?: number; + + /** + * Gets/Sets the maximum value which can be entered in the editor by the end user. + * + */ + maxValue?: number; + + /** + * Gets/Sets whether the editor value can become null. + * If that option is disabled, and editor has no value, then value is set to 0 (or minValue/maxValue). + * + */ + allowNullValue?: boolean; + + /** + * Gets/Sets the default delta-value which is used with "spin" [buttonType](ui.igNumericEditor#options:buttonType) or [spinUp](ui.igNumericEditor#methods:spinUp) and [spinDown](ui.igNumericEditor#methods:spinDown) methods to increment or decrement value in the editor. The value can not be negative. Non integer value is supported only for dataMode double and float. + * + */ + spinDelta?: number; + + /** + * Gets/Sets support for scientific format in edit mode. + * If that option is set, then numeric value appears as a string with possible E-power flag. In edit mode the "E" or "e" character can be entered as well. + * Notes: The "+" character is not supported in edit mode. + * + * + * + * Valid values: + * "null" scientific format is disabled. + * "E" scientific format is enabled and the "E" character is used. + * "e" scientific format is enabled and the "e" character is used. + * "E+" scientific format is enabled and the "E" character is used. The "E+" is used for positive values in display mode. + * "e+" scientific format is enabled and the "e" character is used. The "e+" is used for positive values in display mode. + */ + scientificFormat?: string; + + /** + * Gets/Set the ability of the editor to automatically set value in the editor to the opposite side of the limit, when the spin action reaches minimum or maximum limit. + * + */ + spinWrapAround?: boolean; + + /** + * Removed from numeric editor options + */ + maxLength?: any; + + /** + * Removed from numeric editor options + */ + excludeKeys?: any; + + /** + * Removed from numeric editor options + */ + includeKeys?: any; + + /** + * Removed from numeric editor options + */ + toLower?: any; + + /** + * Removed from numeric editor options + */ + toUpper?: any; + + /** + * + */ + textMode?: any; + + /** + * Gets/Sets value in editor. The effect of setting/getting that option depends on type of editor and on dataMode options for every type of editor. + * + * + */ + value?: any; + + /** + * Gets visibility of the spin, clear and drop-down button. That option can be set only on initialization. Combinations like 'dropdown,spin' or 'spin,clear' are supported too.Note! This option can not be set runtime. + * + * + * + * Valid values: + * "dropdown" A button to open/close the list is located on the right side of the editor. + * "clear" A button to clear the value is located on the right side of the editor. + * "spin" Spin buttons are located on the right side of the editor. + */ + buttonType?: string; + + /** + * Gets/Sets custom width of the drop-down list in pixels. If the value is equal to 0 or negative, then the width of editor is set as a drop-down width. + * + */ + listWidth?: number; + + /** + * Gets/Sets the hover/unhover animation duration of a drop-down list item. + * + */ + listItemHoverDuration?: number; + + /** + * Gets wheather the drop-down list element is attached to the body of the document, or to the editor container element. + * If the option is set to false the editor will attach the drop-down list element to the editor container + * If the option is set to true the editor will attach its drop-down list to as a child of the body. + * Note! This option can not be set runtime. + * + */ + dropDownAttachedToBody?: boolean; + + /** + * Gets/Sets show/hide drop-down list animation duration in milliseconds. + * + */ + dropDownAnimationDuration?: number; + + /** + * Gets the number of the items to be shown at once when the drop-down list get opened. + * Notes: + * This option is overwritten if the number of list items is less than the set value. In that case the drop-down list displays all the items. + * This option can not be set runtime. + * + */ + visibleItemsCount?: number; + + /** + * Gets/Sets the text which appears in the editor when it has no focus and the "value" is null or empty string. + * + */ + placeHolder?: string; + + /** + * Gets/Sets the action when the editor gets focused. The default value is selectAll. + * + * + * Valid values: + * "selectAll" Setting this option will select all the text into the editor when the edit mode gets enetered. + * "atStart" Setting this option will move the cursor at the begining the text into the editor when the edit mode gets enetered. + * "atEnd" Setting this option will move the cursor at the end the text into the editor when the edit mode gets enetered. + * "browserDefault" Setting this option won't do any extra logic, but proceed with the browser default behavior. + */ + selectionOnFocus?: string; + + /** + * Gets/Sets if the editor should only allow values set into the list of items. This validation is done only when the editor is blured, or enter key is pressed + * + */ + isLimitedToListValues?: boolean; + + /** + * Gets/Sets if the editor should revert it's value to the previously valid value in case the value on blur, or enter key is not valid. If the opiton is set to false, editor calls clear functionality. + * + */ + revertIfNotValid?: boolean; + + /** + * Gets/Sets if the editor should prevent form submition when enter key is pressed. + * + */ + preventSubmitOnEnter?: boolean; + + /** + * Gets/Sets the drop-down list opening orientation when the list gets open. If the option is set to auto the editor has priority to open the drop-down list bottom. If the space is not enough it tries to open the list top. If the space is not enough in both directions then the list gets opened at the bottom of the editor. + * + * + * Valid values: + * "auto" If the option is set to auto the editor has priority to open the drop-down list bottom. If the space is not enough it tries to open the list top. If the space is not enough in both directions then the list gets opened at the bottom of the editor. + * "bottom" The drop-down list is opened at the bottom of the editor. + * "top" The drop-down list is opened at the top of the editor. + */ + dropDownOrientation?: string; + + /** + * Gets the ability to limit the editor to be used only as a dropdown list. When set to true the editor input is not editable. + * Note! In case there are no list items - the editor will reamin readonly + * Note! This option can not be set runtime. + * + */ + dropDownOnReadOnly?: boolean; + + /** + * Gets/Sets the strings used for the localization of the component. This includes button titles, error messages etc. Value of the object should contain pairs or key:value members. Note: any sub-option of locale can appear within the main option of igEditor. In this case those values within main options will have highest priority and override corresponding value in locale. + * + */ + locale?: any; + + /** + * Disables/Enables default notifications for basic validation scenarios built in the editors such as required list selection, value wrapping around or spin limits. + * + */ + suppressNotifications?: boolean; + + /** + * Gets/Sets the width of the control. + * + * + * Valid values: + * "null" will stretch to fit data, if no other widths are defined. + */ + width?: string|number; + + /** + * Gets/Sets the height of the control. + * + * + * Valid values: + * "null" will fit the editor inside its parent container, if no other heights are defined. + */ + height?: string|number; + + /** + * Gets/Sets tabIndex attribute for the editor input. + * + */ + tabIndex?: number; + + /** + * Gets/Sets the representation of null value. In case of default the value for the input is set to null, which makes the input to hold an empty string + * + */ + nullValue?: string|number; + + /** + * Gets/Sets the name attribute of the value input. This input is used to sent the value to the server. In case the target element is input and it has name attribute, but the developer has set the inputName option, so this option overwrites the value input and removes the attribute from the element. + * + */ + inputName?: string; + + /** + * Gets/Sets the readonly attribute for the input. If set to true the input is readonly, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is submitted. + * + */ + readOnly?: boolean; + + /** + * Gets/Sets the disabled attribute for the input. If set to true the input is disabled, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is not submitted. + * + */ + disabled?: boolean; + + /** + * Gets/Sets options supported by the [igValidator](ui.igvalidator#options) widget. + * Note: Validation rules of [igValidator](ui.igvalidator#options), such as min and max value/length are applied separately triggering errors, + * while the corresponding options of the editor prevent values violating the defined rules from being entered. + * + */ + validatorOptions?: any; + + /** + * Option for igCurrencyEditor + */ + [optionName: string]: any; +} +interface IgCurrencyEditorMethods { + /** + * Gets/sets a string that is used as the currency symbol shown with the number in the input. The value provided as a param is propagated to the currencySymbol option and thus has the same priority as the option. + * + * @param symbol New currency symbol. + */ + currencySymbol(symbol?: Object): string; + + /** + * Gets/Sets editor value. + * + * @param newValue New editor value. + */ + value(newValue?: number): number; + + /** + * Finds index of list item by text that matches with the search parameters. + * + * @param number The text to search for. + */ + findListItemIndex(number: number): number; + getSelectedText(): void; + getSelectionStart(): void; + getSelectionEnd(): void; + + /** + * Increments value in editor according to the parameter. + * + * @param delta Increments value. + */ + spinUp(delta?: number): void; + + /** + * Decrements value in editor according to the parameter. + * + * @param delta Decrement value. + */ + spinDown(delta?: number): void; + + /** + * Moves the hovered index to the item that appears above the current one in the list. + */ + selectListIndexUp(): void; + + /** + * Moves the hovered index to the item that appears above the current one in the list. + */ + selectListIndexDown(): void; + + /** + * Gets current regional. + */ + getRegionalOption(): string; +} +interface JQuery { + data(propertyName: "igCurrencyEditor"): IgCurrencyEditorMethods; +} + +interface IgPercentEditor { + /** + * Gets/Sets the pattern for positive numeric values, which is used in display (no focus) state. + * If you use the "en-US" culture the default value for "positivePattern" will be "n$" where the "$" flag represents the "numericSymbol" and the "n" flag represents the value of the number. + * Note: this option has priority over possible regional settings. + * + */ + positivePattern?: string; + + /** + * Gets/Sets the symbol, which is used in display (no focus) state. + * Note: this option has priority over possible regional settings. + * + */ + percentSymbol?: string; + + /** + * Gets/Sets the factor which is used for the get and set of the "value" method. + * On get the number (string) entered by the user is divided by that factor and on set the number (string) displayed in the editor is multiplied by that factor. + * For example, if the factor is 100 and the "value" is set to 0.123, then the editor will show string "12.3". + * Possible values: 1 or 100. + * Note: this option has priority over possible regional settings. + * + */ + displayFactor?: number; + + /** + * Defines the range that editor's value can accept.This is achieved by setting the [minValue](ui.igPercentEditor#options:minValue) and [maxValue](ui.igPercentEditor#options:maxValue) editor's options, accordingly to the lowest and highest accepted values for the defined numeric mode. + * The range for the specific type follows the numeric type standards, e.g. in .NET Framework [floating-point](https://msdn.microsoft.com/en-us/library/9ahet949.aspx) types and [integral types](https://msdn.microsoft.com/en-us/library/exx3b86w.aspx). + * In addition, the maximum value that can be set to [minDecimals](ui.igPercentEditor#options:minDecimals) and [maxDecimals](ui.igPercentEditor#options:maxDecimals) options can be 15, when editor is in 'double' mode and 7, when in 'float' mode. + * + * + * + * Valid values: + * "double" the Number object is used with the limits of a double and if the value is not set, then the null or Number.NaN is used depending on the option [allowNullValue](ui.igpercenteditor#options:allowNullValue). Note: that is used as default. + * "float" the Number object is used with the limits of a float and if the value is not set, then the null or Number.NaN is used depending on the option [allowNullValue](ui.igpercenteditor#options:allowNullValue). + * "long" the Number object is used with the limits of a signed long and if the value is not set, then the null or 0 is used depending on the option [allowNullValue](ui.igpercenteditor#options:allowNullValue). + * "ulong" the Number object is used with the limits of an unsigned long and if the value is not set, then the null or 0 is used depending on the option [allowNullValue](ui.igpercenteditor#options:allowNullValue). + * "int" the Number object is used with the limits of a signed int and if the value is not set, then the null or 0 is used depending on the option [allowNullValue](ui.igpercenteditor#options:allowNullValue). + * "uint" the Number object is used with the limits of an unsigned int and if the value is not set, then the null or 0 is used depending on the option [allowNullValue](ui.igpercenteditor#options:allowNullValue). + * "short" the Number object is used with the limits of a signed short and if the value is not set, then the null or 0 is used depending on the option [allowNullValue](ui.igpercenteditor#options:allowNullValue). + * "ushort" the Number object is used with the limits of an unsigned short and if the value is not set, then the null or 0 is used depending on the option [allowNullValue](ui.igpercenteditor#options:allowNullValue). + * "sbyte" the Number object is used with the limits of a signed byte and if the value is not set, then the null or 0 is used depending on the option [allowNullValue](ui.igpercenteditor#options:allowNullValue). + * "byte" the Number object is used with the limits of an unsigned byte and if the value is not set, then the null or 0 is used depending on the option [allowNullValue](ui.igpercenteditor#options:allowNullValue). + */ + dataMode?: string; + + /** + * Gets/Sets the default delta-value which is used with "spin" [buttonType](ui.igpercenteditor#options:buttonType) or [spinUp](ui.igpercenteditor#methods:spinUp) and [spinDown](ui.igpercenteditor#methods:spinDown) methods to increment or decrement value in the editor. The value can not be negative. Non integer value is supported only for dataMode double and float. + * + */ + spinDelta?: number; + + /** + * Gets/Sets list of items which are used as a source for the drop-down list. + * Items in the list can be of type string, number or object. The items are directly rendered without any casting, or manipulation. + * + */ + listItems?: any[]; + + /** + * Gets/Sets custom regional settings for editor. If it is string, then $.ig.regional[stringValue] is assumed. + * + */ + regional?: any; + + /** + * Gets/Sets the character, which is used as negative sign. + * Note: This option has priority over possible regional settings. + * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * + */ + negativeSign?: string; + + /** + * Gets/Sets the string, which is used as negative pattern. The "n" flag represents the value of number. The "-" and "()" flags are static part of pattern. + * Note: This option has priority over possible regional settings. + * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * + */ + negativePattern?: string; + + /** + * Gets/Sets the character, which is used as decimal separator. + * Note: this option has priority over possible regional settings. + * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * + */ + decimalSeparator?: string; + + /** + * Gets/Sets the character, which is used as separator for groups (like thousands). + * That option has effect only in display mode(no focus). + * Note: this option has priority over possible regional settings. + * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * + */ + groupSeparator?: string; + + /** + * (array of number objects) Gets/Sets the number of digits in the integer part of a number, which are divided into groups. + * The "groupSeparator" is inserted between groups. + * If the sum of all values in array is smaller than the length of integer part, then the last item in array is used for all following groups. + * Count of groups starts from the decimal point (from right to left). + * That option has effect only in display mode(no focus). + * Note: this option has priority over possible regional settings. + * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * + */ + groups?: any[]; + + /** + * Gets/Sets the maximum number of decimal places which are used in display mode(no focus). + * Note: this option has priority over possible regional settings. + * Note: In case of min decimals value higher than max decimals - max decimals are equaled to min decimals property. + * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * + */ + maxDecimals?: number; + + /** + * Gets/Sets the minimum number of decimal places which are used in display (no focus) state. + * If number of digits in fractional part of number is less than the value of this option, then the "0" characters are used to fill missing digits. + * Note: This option has priority over possible regional settings. + * Note: In case of min decimals value higher than max decimals - max decimals are equaled to min decimals property. + * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * Note: This option supports values below or equal to 20. + * + */ + minDecimals?: number; + + /** + * Gets/Sets the horizontal alignment of the text in the editor. + * + * + * Valid values: + * "left" The text into the input gets aligned to the left. + * "right" The text into the input gets aligned to the right. + * "center" The text into the input gets aligned to the center. + */ + textAlign?: string; + + /** + * Gets/Sets the minimum value which can be entered in the editor by the end user. + * + */ + minValue?: number; + + /** + * Gets/Sets the maximum value which can be entered in the editor by the end user. + * + */ + maxValue?: number; + + /** + * Gets/Sets whether the editor value can become null. + * If that option is disabled, and editor has no value, then value is set to 0 (or minValue/maxValue). + * + */ + allowNullValue?: boolean; + + /** + * Gets/Sets support for scientific format in edit mode. + * If that option is set, then numeric value appears as a string with possible E-power flag. In edit mode the "E" or "e" character can be entered as well. + * Notes: The "+" character is not supported in edit mode. + * + * + * + * Valid values: + * "null" scientific format is disabled. + * "E" scientific format is enabled and the "E" character is used. + * "e" scientific format is enabled and the "e" character is used. + * "E+" scientific format is enabled and the "E" character is used. The "E+" is used for positive values in display mode. + * "e+" scientific format is enabled and the "e" character is used. The "e+" is used for positive values in display mode. + */ + scientificFormat?: string; + + /** + * Gets/Set the ability of the editor to automatically set value in the editor to the opposite side of the limit, when the spin action reaches minimum or maximum limit. + * + */ + spinWrapAround?: boolean; + + /** + * Removed from numeric editor options + */ + maxLength?: any; + + /** + * Removed from numeric editor options + */ + excludeKeys?: any; + + /** + * Removed from numeric editor options + */ + includeKeys?: any; + + /** + * Removed from numeric editor options + */ + toLower?: any; + + /** + * Removed from numeric editor options + */ + toUpper?: any; + + /** + * + */ + textMode?: any; + + /** + * Gets/Sets value in editor. The effect of setting/getting that option depends on type of editor and on dataMode options for every type of editor. + * + * + */ + value?: any; + + /** + * Gets visibility of the spin, clear and drop-down button. That option can be set only on initialization. Combinations like 'dropdown,spin' or 'spin,clear' are supported too.Note! This option can not be set runtime. + * + * + * + * Valid values: + * "dropdown" A button to open/close the list is located on the right side of the editor. + * "clear" A button to clear the value is located on the right side of the editor. + * "spin" Spin buttons are located on the right side of the editor. + */ + buttonType?: string; + + /** + * Gets/Sets custom width of the drop-down list in pixels. If the value is equal to 0 or negative, then the width of editor is set as a drop-down width. + * + */ + listWidth?: number; + + /** + * Gets/Sets the hover/unhover animation duration of a drop-down list item. + * + */ + listItemHoverDuration?: number; + + /** + * Gets wheather the drop-down list element is attached to the body of the document, or to the editor container element. + * If the option is set to false the editor will attach the drop-down list element to the editor container + * If the option is set to true the editor will attach its drop-down list to as a child of the body. + * Note! This option can not be set runtime. + * + */ + dropDownAttachedToBody?: boolean; + + /** + * Gets/Sets show/hide drop-down list animation duration in milliseconds. + * + */ + dropDownAnimationDuration?: number; + + /** + * Gets the number of the items to be shown at once when the drop-down list get opened. + * Notes: + * This option is overwritten if the number of list items is less than the set value. In that case the drop-down list displays all the items. + * This option can not be set runtime. + * + */ + visibleItemsCount?: number; + + /** + * Gets/Sets the text which appears in the editor when it has no focus and the "value" is null or empty string. + * + */ + placeHolder?: string; + + /** + * Gets/Sets the action when the editor gets focused. The default value is selectAll. + * + * + * Valid values: + * "selectAll" Setting this option will select all the text into the editor when the edit mode gets enetered. + * "atStart" Setting this option will move the cursor at the begining the text into the editor when the edit mode gets enetered. + * "atEnd" Setting this option will move the cursor at the end the text into the editor when the edit mode gets enetered. + * "browserDefault" Setting this option won't do any extra logic, but proceed with the browser default behavior. + */ + selectionOnFocus?: string; + + /** + * Gets/Sets if the editor should only allow values set into the list of items. This validation is done only when the editor is blured, or enter key is pressed + * + */ + isLimitedToListValues?: boolean; + + /** + * Gets/Sets if the editor should revert it's value to the previously valid value in case the value on blur, or enter key is not valid. If the opiton is set to false, editor calls clear functionality. + * + */ + revertIfNotValid?: boolean; + + /** + * Gets/Sets if the editor should prevent form submition when enter key is pressed. + * + */ + preventSubmitOnEnter?: boolean; + + /** + * Gets/Sets the drop-down list opening orientation when the list gets open. If the option is set to auto the editor has priority to open the drop-down list bottom. If the space is not enough it tries to open the list top. If the space is not enough in both directions then the list gets opened at the bottom of the editor. + * + * + * Valid values: + * "auto" If the option is set to auto the editor has priority to open the drop-down list bottom. If the space is not enough it tries to open the list top. If the space is not enough in both directions then the list gets opened at the bottom of the editor. + * "bottom" The drop-down list is opened at the bottom of the editor. + * "top" The drop-down list is opened at the top of the editor. + */ + dropDownOrientation?: string; + + /** + * Gets the ability to limit the editor to be used only as a dropdown list. When set to true the editor input is not editable. + * Note! In case there are no list items - the editor will reamin readonly + * Note! This option can not be set runtime. + * + */ + dropDownOnReadOnly?: boolean; + + /** + * Gets/Sets the strings used for the localization of the component. This includes button titles, error messages etc. Value of the object should contain pairs or key:value members. Note: any sub-option of locale can appear within the main option of igEditor. In this case those values within main options will have highest priority and override corresponding value in locale. + * + */ + locale?: any; + + /** + * Disables/Enables default notifications for basic validation scenarios built in the editors such as required list selection, value wrapping around or spin limits. + * + */ + suppressNotifications?: boolean; + + /** + * Gets/Sets the width of the control. + * + * + * Valid values: + * "null" will stretch to fit data, if no other widths are defined. + */ + width?: string|number; + + /** + * Gets/Sets the height of the control. + * + * + * Valid values: + * "null" will fit the editor inside its parent container, if no other heights are defined. + */ + height?: string|number; + + /** + * Gets/Sets tabIndex attribute for the editor input. + * + */ + tabIndex?: number; + + /** + * Gets/Sets the representation of null value. In case of default the value for the input is set to null, which makes the input to hold an empty string + * + */ + nullValue?: string|number; + + /** + * Gets/Sets the name attribute of the value input. This input is used to sent the value to the server. In case the target element is input and it has name attribute, but the developer has set the inputName option, so this option overwrites the value input and removes the attribute from the element. + * + */ + inputName?: string; + + /** + * Gets/Sets the readonly attribute for the input. If set to true the input is readonly, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is submitted. + * + */ + readOnly?: boolean; + + /** + * Gets/Sets the disabled attribute for the input. If set to true the input is disabled, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is not submitted. + * + */ + disabled?: boolean; + + /** + * Gets/Sets options supported by the [igValidator](ui.igvalidator#options) widget. + * Note: Validation rules of [igValidator](ui.igvalidator#options), such as min and max value/length are applied separately triggering errors, + * while the corresponding options of the editor prevent values violating the defined rules from being entered. + * + */ + validatorOptions?: any; + + /** + * Option for igPercentEditor + */ + [optionName: string]: any; +} +interface IgPercentEditorMethods { + /** + * Paste text at location of the caret or over the current selection. Best used during editing, as the method will instead set the text as value (modified by the [displayFactor](ui.igpercenteditor#options:displayFactor)) if the editor is not focused. + * Note: the method raises the [textChanged](ui.igpercenteditor#events:textChanged) event. + * + * @param string The string to be inserted. + */ + insert(string: string): void; + + /** + * Gets/Sets a string that is used as the percent symbol shown with the number in the input. The value provided as a param is propagated to the [percentSymbol](ui.igpercenteditor#options:percentSymbol) option and thus has the same priority as the option. + * + * @param symbol New percent symbol. + */ + percentSymbol(symbol?: Object): string; + + /** + * Gets/Sets editor value. + * + * @param newValue New editor value. + */ + value(newValue?: number): number; + + /** + * Finds index of list item by text that matches with the search parameters. + * + * @param number The text to search for. + */ + findListItemIndex(number: number): number; + getSelectedText(): void; + getSelectionStart(): void; + getSelectionEnd(): void; + + /** + * Increments value in editor according to the parameter. + * + * @param delta Increments value. + */ + spinUp(delta?: number): void; + + /** + * Decrements value in editor according to the parameter. + * + * @param delta Decrement value. + */ + spinDown(delta?: number): void; + + /** + * Moves the hovered index to the item that appears above the current one in the list. + */ + selectListIndexUp(): void; + + /** + * Moves the hovered index to the item that appears above the current one in the list. + */ + selectListIndexDown(): void; + + /** + * Gets current regional. + */ + getRegionalOption(): string; +} +interface JQuery { + data(propertyName: "igPercentEditor"): IgPercentEditorMethods; +} + +interface IgMaskEditor { + /** + * Gets custom regional settings for editor. If it is string, then $.ig.regional[stringValue] is assumed. + * + */ + regional?: any; + + /** + * Gets visibility of the clear button. That option can be set only on initialization. + * + * clear A button to clear the value is located on the right side of the editor. + */ + buttonType?: string; + + /** + * Gets input mask. Mask may include filter-flags and literal characters. + * Literal characters are part of mask which cannot be modified by end user. In order to use a filter-flag as a literal character, the escape "\\" character should be used. + * Default is "CCCCCCCCCC" + * Note: optional flags/entries affect the value returned by get of the [value](ui.igmaskeditor#methods:value) methods. + * List of filter-flags: + * C: any keyboard character. Entry is optional. + * &: any keyboard character. Entry is required. + * a: letter or digit character. Entry is optional. + * A: letter or digit character. Entry is required. + * ?: letter character. Entry is optional. + * L: letter character. Entry is required. + * 9: digit character. Entry is optional. + * 0: digit character. Entry is required. + * #: digit character or "+" or "_". Entry is optional with replacement by [emptyChar](ui.igmaskeditor#options:emptyChar) or by [padChar](ui.igmaskeditor#options:padChar). + * >: all letters to the right are converted to the upper case. In order to disable conversion, the ">" flag should be used again. + * <: all letters to the right are converted to the lower case. In order to disable conversion, the "<" flag should be used again. + * Note! This option can not be set runtime. + * + */ + inputMask?: string; + + /** + * Gets/Sets type of value returned by the get of [value](ui.igmaskeditor#methods:value) method. That also affects functionality of the set value(val) method and the copy/paste operations of browser. + * + * + * Valid values: + * "rawText" only entered text. All unfilled prompts (positions) and literals are ignored (removed). + * "rawTextWithRequiredPrompts" only entered text and required prompts (positions). All optional unfilled prompts and literals are ignored (removed) + * "rawTextWithAllPrompts" only entered text and prompts (positions). All literals are ignored (removed). + * "rawTextWithLiterals" only entered text and literals. All unfilled prompts are ignored (removed). + * "rawTextWithRequiredPromptsAndLiterals" only entered text, required prompts (positions) and literals. All optional unfilled prompts are ignored (removed). + * "allText" entered text, all prompts (positions) and literals. Note: that is used as default. + */ + dataMode?: string; + + /** + * Gets character which is used as prompt in edit mode for available entry position. + * + */ + unfilledCharsPrompt?: string; + + /** + * Gets/Sets character which is used as replacement of not-filled required position in mask when editor is in display mode (not focused). Note that this option is visible, only when the [revertIfNotValid](ui.igmaskeditor#options:revertIfNotValid) option is set to false. + * + */ + padChar?: string; + + /** + * Gets/Sets character which is used as replacement of not-filled required position in mask when application calls get for the [value](ui.igmaskeditor#methods:value) methods. + * + */ + emptyChar?: string; + + /** + * Gets ability to enter only specific characters in input-field from keyboard and on paste. + * Notes: + * If "excludeKeys" option contains same characters as this option, then "excludeKeys" has priority. + * Note! This option can not be se runtime. + * + */ + includeKeys?: string; + + /** + * Gets ability to prevent entering specific characters from keyboard or on paste. + * Notes: + * If a character is specified in "includeKeys" option also, then "excludeKeys" has priority. + * Note! This option can not be se runtime. + * + */ + excludeKeys?: string; + + /** + * Gets/Sets the ability of the editor to automatically change the hoverd item into the opened dropdown list to its oposide side. + */ + spinWrapAround?: boolean; + + /** + * Sets gets list of items which are used for drop-down list. + * Items in list can be strings, numbers or objects. The items are directly rendered without casting, or manipulating them. + */ + listItems?: any[]; + + /** + * Sets gets custom width of drop-down list in pixels. If value is equal to 0 or negative, then the width of editor is used. + */ + listWidth?: number; + + /** + * Sets the hover/unhover animation duration. + */ + listItemHoverDuration?: number; + + /** + * Sets the ability to allow values only set into the list items. This validation is done only when the editor is blured, or enter key is pressed + */ + isLimitedToListValues?: boolean; + + /** + * This option is inherited from a parent widget and it's not applicable for igMaskEditor + */ + dropDownOrientation?: string; + + /** + * This option is inherited from a parent widget and it's not applicable for igMaskEditor + */ + dropDownAttachedToBody?: boolean; + + /** + * This option is inherited from a parent widget and it's not applicable for igMaskEditor + */ + dropDownAnimationDuration?: number; + + /** + * This option is inherited from a parent widget and it's not applicable for igMaskEditor + */ + dropDownOnReadOnly?: boolean; + + /** + * + */ + textMode?: any; + + /** + * Gets/Sets how many items should be shown at once. + * Notes: + * That option is overwritten if the number of list items is less than the value. In that case the height of the dropdown is adjusted to the number of items. + * Note! This option can not be set runtime. + */ + visibleItemsCount?: number; + + /** + * This option is inherited from a parent widget and it's not applicable for igMaskEditor + */ + maxLength?: any; + + /** + * Gets/Sets value in editor. The effect of setting/getting that option depends on type of editor and on dataMode options for every type of editor. + * + */ + value?: any; + + /** + * Gets/Sets the horizontal alignment of the text in the editor. + * + * + * Valid values: + * "left" The text into the input gets aligned to the left. + * "right" The text into the input gets aligned to the right. + * "center" The text into the input gets aligned to the center. + */ + textAlign?: string; + + /** + * Gets/Sets the text which appears in the editor when it has no focus and the "value" is null or empty string. + * + */ + placeHolder?: string; + + /** + * Gets/Sets the action when the editor gets focused. The default value is selectAll. + * + * + * Valid values: + * "selectAll" Setting this option will select all the text into the editor when the edit mode gets enetered. + * "atStart" Setting this option will move the cursor at the begining the text into the editor when the edit mode gets enetered. + * "atEnd" Setting this option will move the cursor at the end the text into the editor when the edit mode gets enetered. + * "browserDefault" Setting this option won't do any extra logic, but proceed with the browser default behavior. + */ + selectionOnFocus?: string; + + /** + * Gets/Sets if the editor should revert it's value to the previously valid value in case the value on blur, or enter key is not valid. If the opiton is set to false, editor calls clear functionality. + * + */ + revertIfNotValid?: boolean; + + /** + * Gets/Sets if the editor should prevent form submition when enter key is pressed. + * + */ + preventSubmitOnEnter?: boolean; + + /** + * Gets/Sets the ability to convert the input characters to upper case (true) or keeps the characters as they are (false). The option has effect only while keyboard entries and paste. + * Note! When the option is set at runtime the editor is not changing the current value. + * + */ + toUpper?: boolean; + + /** + * Gets/Sets the ability to convert the input characters to lower case (true) or keeps the characters as they are (false). The option has effect only while keyboard entries and paste. + * Note! When the option is set at runtime the editor is not changing the current value. + * + */ + toLower?: boolean; + + /** + * Gets/Sets the strings used for the localization of the component. This includes button titles, error messages etc. Value of the object should contain pairs or key:value members. Note: any sub-option of locale can appear within the main option of igEditor. In this case those values within main options will have highest priority and override corresponding value in locale. + * + */ + locale?: any; + + /** + * Disables/Enables default notifications for basic validation scenarios built in the editors such as required list selection, value wrapping around or spin limits. + * + */ + suppressNotifications?: boolean; + + /** + * Gets/Sets the width of the control. + * + * + * Valid values: + * "null" will stretch to fit data, if no other widths are defined. + */ + width?: string|number; + + /** + * Gets/Sets the height of the control. + * + * + * Valid values: + * "null" will fit the editor inside its parent container, if no other heights are defined. + */ + height?: string|number; + + /** + * Gets/Sets tabIndex attribute for the editor input. + * + */ + tabIndex?: number; + + /** + * Gets/Sets whether the editor value can become null. + * If that option is false, and editor has no value, then value is set to an empty string. + * + */ + allowNullValue?: boolean; + + /** + * Gets/Sets the representation of null value. In case of default the value for the input is set to null, which makes the input to hold an empty string + * + */ + nullValue?: string|number; + + /** + * Gets/Sets the name attribute of the value input. This input is used to sent the value to the server. In case the target element is input and it has name attribute, but the developer has set the inputName option, so this option overwrites the value input and removes the attribute from the element. + * + */ + inputName?: string; + + /** + * Gets/Sets the readonly attribute for the input. If set to true the input is readonly, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is submitted. + * + */ + readOnly?: boolean; + + /** + * Gets/Sets the disabled attribute for the input. If set to true the input is disabled, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is not submitted. + * + */ + disabled?: boolean; + + /** + * Gets/Sets options supported by the [igValidator](ui.igvalidator#options) widget. + * Note: Validation rules of [igValidator](ui.igvalidator#options), such as min and max value/length are applied separately triggering errors, + * while the corresponding options of the editor prevent values violating the defined rules from being entered. + * + */ + validatorOptions?: any; + dropDownListOpening?: DropDownListOpeningEvent; + dropDownListOpened?: DropDownListOpenedEvent; + dropDownListClosing?: DropDownListClosingEvent; + dropDownListClosed?: DropDownListClosedEvent; + dropDownItemSelecting?: DropDownItemSelectingEvent; + dropDownItemSelected?: DropDownItemSelectedEvent; + + /** + * Event which is raised after text in the editor was changed. It can be raised when keyUp event occurs, + * when the clear button is clicked or when an item from a list is selected. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.text to obtain new text + * Use ui.oldText to obtain the old text. + */ + textChanged?: TextChangedEvent; + + /** + * Option for igMaskEditor + */ + [optionName: string]: any; +} +interface IgMaskEditorMethods { + /** + * Gets/Sets mask editor value. + * + * @param newValue New mask editor value. + */ + value(newValue?: string): string; + dropDownContainer(): void; + showDropDown(): void; + hideDropDown(): void; + dropDownButton(): void; + spinUpButton(): void; + spinDownButton(): void; + dropDownVisible(): void; + findListItemIndex(): void; + selectedListIndex(): void; + getSelectedListItem(): void; + spinUp(): void; + spinDown(): void; + + /** + * Checks if the value in the editor is valid. Note: This function will not trigger automatic notifications. + */ + isValid(): boolean; + + /** + * Gets the visible text in the editor. + */ + displayValue(): string; + + /** + * Returns a reference to the clear button UI element of the editor. + */ + clearButton(): string; + + /** + * Gets the selected text from the editor in edit mode. This can be done on key event like keydown or keyup. This method can be used only when the editor is focused. If you call this method in display mode (The editor input is blured) the returned value will be an empty string. + */ + getSelectedText(): string; + + /** + * Gets the start index of the selected text in the editor. + */ + getSelectionStart(): number; + + /** + * Gets the end index of the selected text in the editor. + */ + getSelectionEnd(): number; + + /** + * Inserts the text at the location of the caret or over the current selection. If the editor is focused the method will insert the text over the current selection. If the editor is not focused the method will set the text as value of the editor. + * Note: The method raises [textChanged](ui.igtexteditor#events:textChanged) event. + * + * @param string The string to be inserted. + */ + insert(string: string): void; + + /** + * Selects the text between start and end indices in the editor. If the parameters are equal, then the method sets location of caret. The method has effect only when the editor has focus. + * + * @param start Start of the selection. + * @param end End of the selection. + */ + select(start: number, end: number): void; +} +interface JQuery { + data(propertyName: "igMaskEditor"): IgMaskEditorMethods; +} + +interface IgDateEditor { + /** + * Gets/Sets the value of the editor. Date object can be set as value. String can be set and the editor will pass it to the Date object constructor and use the corresponding Date object as the value. MVC date format can be used too. + * Note! This option doesn't use the displayInputFormat to extract the date. + * + */ + value?: Object; + + /** + * Gets the minimum value which can be entered in editor by user. Date object can be set as value. String value can be passed and the editor will use the javascript Date object constructor to create date object and will use it for the comparison. MVC date format can be used too. + * Note! This option doesn't use the displayInputFormat to extract the date. + * + */ + minValue?: Object; + + /** + * Gets the maximum value which can be entered in editor by user. Date object can be set as value. String value can be passed and the editor will use the javascript Date object constructor to create date object and will use it for the comparison. MVC date format can be used too. + * Note! This option doesn't use the displayInputFormat to extract the date. + * + */ + maxValue?: Object; + + /** + * Gets/Sets format of date while editor has no focus. + * Value of that option can be set to a specific date pattern or to a flag defined by regional settings. + * If value is not set, then the dateInputFormat is used automatically. + * If value is set to explicit date pattern and pattern besides date-flags has explicit characters which match with date-flags or mask-flags, then the "escape" character should be used in front of them. + * List of predefined regional flags: + * "date": the datePattern member of regional option is used + * "dateLong": the dateLongPattern member of regional option is used + * "time": the timePattern member of regional option is used + * "timeLong": the timeLongPattern member of regional option is used + * "dateTime": the dateTimePattern member of regional option is used + * List of explicit characters, which should have escape \\ character in front of them: + * C, &, a, A, ?, L, 9, 0, #, >, <, y, M, d, h, H, m, s, t, f. + * List of date-flags when explicit date pattern is used: + * "y": year field without century and without leading zero + * "yy": year field without century and with leading zero + * "yyyy": year field with leading zeros + * "M": month field as digit without leading zero + * "MM": month field as digit with leading zero + * "MMM": month field as short month name + * "MMMM": month field as long month name + * "d": day of month field without leading zero + * "dd": day of month field with leading zero + * "ddd": day of the week as short name + * "dddd": day of the week as long name + * "t": first character of string which represents AM/PM field + * "tt": 2 characters of string which represents AM/PM field + * "h": hours field in 12-hours format without leading zero + * "hh": hours field in 12-hours format with leading zero + * "H": hours field in 24-hours format without leading zero + * "HH": hours field in 24-hours format with leading zero + * "m": minutes field without leading zero + * "mm": minutes field with leading zero + * "s": seconds field without leading zero + * "ss": seconds field with leading zero + * "f": milliseconds field in hundreds + * "ff": milliseconds field in tenths + * "fff": milliseconds field + * + */ + dateDisplayFormat?: string; + + /** + * Gets format of date while editor has focus. + * Value of that option can be set to explicit date pattern or to a flag defined by regional settings. + * If value is set to explicit date pattern and pattern besides date-flags has explicit characters which match with date-flags or mask-flags, then the "escape" character should be used in front of them. + * If option is not set, then the "date" is used automatically. + * List of predefined regional flags: + * "date": the datePattern member of regional option is used + * "dateLong": the dateLongPattern member of regional option is used + * "time": the timePattern member of regional option is used + * "timeLong": the timeLongPattern member of regional option is used + * "dateTime": the dateTimePattern member of regional option is used + * List of explicit characters, which should have escape \\ character in front of them: C, &, a, A, ?, L, 9, 0, #, >, <, y, M, d, h, H, m, s, t, f. + * List of date-flags when explicit date pattern is used: + * "yy": year field without century and with leading zero + * "yyyy": year field with leading zeros + * "MM": month field as digit with leading zero + * "dd": day of month field with leading zero + * "t": first character of string which represents AM/PM field + * "tt": 2 characters of string which represents AM/PM field + * "hh": hours field in 12-hours format with leading zero + * "HH": hours field in 24-hours format with leading zero + * "mm": minutes field with leading zero + * "ss": seconds field with leading zero + * "f": milliseconds field in hundreds + * "ff": milliseconds field in tenths + * "fff": milliseconds field + * Note! This option can not be set runtime. + * + */ + dateInputFormat?: string; + + /** + * Gets/Sets the value type returned by the get of value() method. That also affects functionality of the set value(val) method and the copy/paste operations of browser. + * Note: That is used as default. + * + * + * Valid values: + * "date" The Date object is used. When that mode is set the value send to the server on submit is string value converter from the javascript Date object using "toISOString" method. + * "displayModeText" The String object is used and the "text" in display mode (no focus) format (pattern). + * "editModeText" The String object is used and the "text" in edit mode (focus) format (pattern). + */ + dataMode?: string; + + /** + * Gets visibility of the spin and clear buttons. That option can be set only on initialization. Combinations like 'spin,clear' are supported too. + * + * + * Valid values: + * "clear" A button to clear the value is located on the right side of the editor. + * "spin" Spin buttons are located on the right side of the editor + */ + buttonType?: string; + + /** + * Gets/Sets delta-value which is used to increment or decrement value in editor on spin events. If value is set to negative value an exception is thrown. Non integer value is supported only for dataMode double and float. + * + */ + spinDelta?: number; + + /** + * Gets/Sets ability to modify only 1 date field on spin events. + * Value false enables changes of other date fields when incremented or decremented date-field reaches its limits. + * Value true modifies only value of one field. + * + */ + limitSpinToCurrentField?: boolean; + + /** + * Gets/Sets formatting of the dates as UTC. + * That option is supported only when dataMode option is 'date' and Date objects are used to get/set value of editor. + * Notes: + * That option affects only functionality of get/set value method and the Date-value, which was set on initialization. + * When application uses the set-value, then internal Date-value and displayed-text is incremented by TimezoneOffset. + * When application uses the get-value, then editor returns internal Date-value decremented by TimezoneOffset. + * When that option is modified after initialization, then displayed text and internal Date-value are not affected. + * It is not recommended to change that option without resetting Date-value. + * + */ + enableUTCDates?: boolean; + + /** + * Gets/Sets year for auto detection of 20th and 21st centuries. + * That option is used to automatically fill century when the user entered only 1 or 2 digits into the year field or when the date pattern contains only 1 or 2 year positions, e.g. "yy" or "y". + * If user entered value larger than value of this option, then 20th century is used, otherwise the 21st. + * + */ + centuryThreshold?: number; + + /** + * Gets/Set value used to increase/decrease year part of the date, in order to set difference between year in Gregorian calendar and displayed year. + * + */ + yearShift?: number; + + /** + * Gets/Sets the representation of null value. In case of default the value for the input is set to null, which makes the input to hold an empty string + * + */ + nullValue?: string|number; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + */ + isLimitedToListValues?: boolean; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + */ + listItemHoverDuration?: number; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + */ + listItems?: any; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + */ + listWidth?: number; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + */ + dropDownAnimationDuration?: number; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + */ + dropDownAttachedToBody?: boolean; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + */ + dropDownOnReadOnly?: boolean; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + */ + inputMask?: string; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + */ + unfilledCharsPrompt?: string; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + */ + padChar?: string; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + */ + emptyChar?: string; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + */ + toUpper?: boolean; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + */ + toLower?: boolean; + + /** + * Gets custom regional settings for editor. If it is string, then $.ig.regional[stringValue] is assumed. + * + */ + regional?: any; + + /** + * Gets ability to enter only specific characters in input-field from keyboard and on paste. + * Notes: + * If "excludeKeys" option contains same characters as this option, then "excludeKeys" has priority. + * Note! This option can not be se runtime. + * + */ + includeKeys?: string; + + /** + * Gets ability to prevent entering specific characters from keyboard or on paste. + * Notes: + * If a character is specified in "includeKeys" option also, then "excludeKeys" has priority. + * Note! This option can not be se runtime. + * + */ + excludeKeys?: string; + + /** + * Gets/Sets the ability of the editor to automatically change the hoverd item into the opened dropdown list to its oposide side. + */ + spinWrapAround?: boolean; + + /** + * This option is inherited from a parent widget and it's not applicable for igMaskEditor + */ + dropDownOrientation?: string; + + /** + * + */ + textMode?: any; + + /** + * Gets/Sets how many items should be shown at once. + * Notes: + * That option is overwritten if the number of list items is less than the value. In that case the height of the dropdown is adjusted to the number of items. + * Note! This option can not be set runtime. + */ + visibleItemsCount?: number; + + /** + * This option is inherited from a parent widget and it's not applicable for igMaskEditor + */ + maxLength?: any; + + /** + * Gets/Sets the horizontal alignment of the text in the editor. + * + * + * Valid values: + * "left" The text into the input gets aligned to the left. + * "right" The text into the input gets aligned to the right. + * "center" The text into the input gets aligned to the center. + */ + textAlign?: string; + + /** + * Gets/Sets the text which appears in the editor when it has no focus and the "value" is null or empty string. + * + */ + placeHolder?: string; + + /** + * Gets/Sets the action when the editor gets focused. The default value is selectAll. + * + * + * Valid values: + * "selectAll" Setting this option will select all the text into the editor when the edit mode gets enetered. + * "atStart" Setting this option will move the cursor at the begining the text into the editor when the edit mode gets enetered. + * "atEnd" Setting this option will move the cursor at the end the text into the editor when the edit mode gets enetered. + * "browserDefault" Setting this option won't do any extra logic, but proceed with the browser default behavior. + */ + selectionOnFocus?: string; + + /** + * Gets/Sets if the editor should revert it's value to the previously valid value in case the value on blur, or enter key is not valid. If the opiton is set to false, editor calls clear functionality. + * + */ + revertIfNotValid?: boolean; + + /** + * Gets/Sets if the editor should prevent form submition when enter key is pressed. + * + */ + preventSubmitOnEnter?: boolean; + + /** + * Gets/Sets the strings used for the localization of the component. This includes button titles, error messages etc. Value of the object should contain pairs or key:value members. Note: any sub-option of locale can appear within the main option of igEditor. In this case those values within main options will have highest priority and override corresponding value in locale. + * + */ + locale?: any; + + /** + * Disables/Enables default notifications for basic validation scenarios built in the editors such as required list selection, value wrapping around or spin limits. + * + */ + suppressNotifications?: boolean; + + /** + * Gets/Sets the width of the control. + * + * + * Valid values: + * "null" will stretch to fit data, if no other widths are defined. + */ + width?: string|number; + + /** + * Gets/Sets the height of the control. + * + * + * Valid values: + * "null" will fit the editor inside its parent container, if no other heights are defined. + */ + height?: string|number; + + /** + * Gets/Sets tabIndex attribute for the editor input. + * + */ + tabIndex?: number; + + /** + * Gets/Sets whether the editor value can become null. + * If that option is false, and editor has no value, then value is set to an empty string. + * + */ + allowNullValue?: boolean; + + /** + * Gets/Sets the name attribute of the value input. This input is used to sent the value to the server. In case the target element is input and it has name attribute, but the developer has set the inputName option, so this option overwrites the value input and removes the attribute from the element. + * + */ + inputName?: string; + + /** + * Gets/Sets the readonly attribute for the input. If set to true the input is readonly, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is submitted. + * + */ + readOnly?: boolean; + + /** + * Gets/Sets the disabled attribute for the input. If set to true the input is disabled, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is not submitted. + * + */ + disabled?: boolean; + + /** + * Gets/Sets options supported by the [igValidator](ui.igvalidator#options) widget. + * Note: Validation rules of [igValidator](ui.igvalidator#options), such as min and max value/length are applied separately triggering errors, + * while the corresponding options of the editor prevent values violating the defined rules from being entered. + * + */ + validatorOptions?: any; + + /** + * This event is inherited from a parent widget and it's not triggered in igDateEditor + */ + dropDownListOpening?: DropDownListOpeningEvent; + + /** + * This event is inherited from a parent widget and it's not triggered in igDateEditor + */ + dropDownListOpened?: DropDownListOpenedEvent; + + /** + * This event is inherited from a parent widget and it's not triggered in igDateEditor + */ + dropDownListClosing?: DropDownListClosingEvent; + + /** + * This event is inherited from a parent widget and it's not triggered in igDateEditor + */ + dropDownListClosed?: DropDownListClosedEvent; + + /** + * This event is inherited from a parent widget and it's not triggered in igDateEditor + */ + dropDownItemSelecting?: DropDownItemSelectingEvent; + + /** + * This event is inherited from a parent widget and it's not triggered in igDateEditor + */ + dropDownItemSelected?: DropDownItemSelectedEvent; + + /** + * Option for igDateEditor + */ + [optionName: string]: any; +} +interface IgDateEditorMethods { + /** + * Gets/Sets editor value. + * + * Note! This option doesn't use the displayInputFormat to extract the date + * + * @param newValue New editor value. Date object can be set as value. String value can be passed and the editor will use the javascript Date object constructor to create date object and will use it for the comparison. MVC date format can be used too. For example Date(/"thicks"/). + */ + value(newValue?: Object): Object; + + /** + * Gets selected date. + */ + getSelectedDate(): Object; + + /** + * Sets selected date. + * + * @param date + */ + selectDate(date: Object): void; + + /** + * Increases the date or time period, depending on the current cursor position. + * + * @param delta The increase delta. + */ + spinUp(delta?: number): void; + + /** + * Decreases the date or time period, depending on the current cursor position. + * + * @param delta The decrease delta. + */ + spinDown(delta?: number): void; + + /** + * Returns a reference to the spin up UI element of the editor. + */ + spinUpButton(): string; + + /** + * Returns a reference to the spin down UI element of the editor. + */ + spinDownButton(): string; + + /** + * Checks if the value in the editor is valid. Note: This function will not trigger automatic notifications. + */ + isValid(): boolean; + dropDownButton(): void; + dropDownContainer(): void; + dropDownVisible(): void; + findListItemIndex(): void; + getSelectedListItem(): void; + selectedListIndex(): void; + showDropDown(): void; + hideDropDown(): void; +} +interface JQuery { + data(propertyName: "igDateEditor"): IgDateEditorMethods; +} + +interface ItemSelectedEvent { + (event: Event, ui: ItemSelectedEventUIParam): void; +} + +interface ItemSelectedEventUIParam { + /** + * Used to obtain reference to igEditor. + */ + owner?: any; + + /** + * Used to obtain reference to the date object which is selected. + */ + dateFromPicker?: any; + + /** + * Used to obtain a referece to the selected html element from the calendar. + */ + item?: any; + + /** + * Used to obtain a reference to jQuery UI date picker, used as a calendar from the igDatePicker. + */ + calendar?: any; +} + +interface IgDatePicker { + /** + * Gets/Sets the custom regional settings for the editor. If it is a string, then $.ig.regional[stringValue] is assumed. + * + */ + regional?: any; + + /** + * Gets visibility of the spin, clear and drop-down button. That option can be set only on initialization. Combinations like 'dropdown,spin' or 'spin,clear' are supported too. + * + * + * Valid values: + * "dropdown" A button to open/close the list is located on the right side of the editor. + * "clear" A button to clear the value is located on the right side of the editor. + * "spin" Spin buttons are located on the right side of the editor. + */ + buttonType?: string; + + /** + * Gets/Sets the options supported by the [jquery.ui.datepicker](http://api.jqueryui.com/datepicker/). Only options related to the drop-down calendar are supported. + * + */ + datepickerOptions?: any; + + /** + * Gets the ability to limit igDatePicker to be used only as s calendar. When set to true the editor input is not editable. + * Note! This option can not be set runtime. + * + */ + dropDownOnReadOnly?: boolean; + + /** + * This option is inherited from a parent widget and it's not applicable for igDatePicker + */ + dropDownAttachedToBody?: boolean; + + /** + * This option is inherited from a parent widget and it's not applicable for igDatePicker + */ + isLimitedToListValues?: boolean; + + /** + * This option is inherited from a parent widget and it's not applicable for igDatePicker + */ + listItemHoverDuration?: number; + + /** + * This option is inherited from a parent widget and it's not applicable for igDatePicker + */ + listItems?: any; + + /** + * This option is inherited from a parent widget and it's not applicable for igDatePicker + */ + listWidth?: number; + + /** + * Gets/Sets the value of the editor. Date object can be set as value. String can be set and the editor will pass it to the Date object constructor and use the corresponding Date object as the value. MVC date format can be used too. + * Note! This option doesn't use the displayInputFormat to extract the date. + * + */ + value?: Object; + + /** + * Gets the minimum value which can be entered in editor by user. Date object can be set as value. String value can be passed and the editor will use the javascript Date object constructor to create date object and will use it for the comparison. MVC date format can be used too. + * Note! This option doesn't use the displayInputFormat to extract the date. + * + */ + minValue?: Object; + + /** + * Gets the maximum value which can be entered in editor by user. Date object can be set as value. String value can be passed and the editor will use the javascript Date object constructor to create date object and will use it for the comparison. MVC date format can be used too. + * Note! This option doesn't use the displayInputFormat to extract the date. + * + */ + maxValue?: Object; + + /** + * Gets/Sets format of date while editor has no focus. + * Value of that option can be set to a specific date pattern or to a flag defined by regional settings. + * If value is not set, then the dateInputFormat is used automatically. + * If value is set to explicit date pattern and pattern besides date-flags has explicit characters which match with date-flags or mask-flags, then the "escape" character should be used in front of them. + * List of predefined regional flags: + * "date": the datePattern member of regional option is used + * "dateLong": the dateLongPattern member of regional option is used + * "time": the timePattern member of regional option is used + * "timeLong": the timeLongPattern member of regional option is used + * "dateTime": the dateTimePattern member of regional option is used + * List of explicit characters, which should have escape \\ character in front of them: + * C, &, a, A, ?, L, 9, 0, #, >, <, y, M, d, h, H, m, s, t, f. + * List of date-flags when explicit date pattern is used: + * "y": year field without century and without leading zero + * "yy": year field without century and with leading zero + * "yyyy": year field with leading zeros + * "M": month field as digit without leading zero + * "MM": month field as digit with leading zero + * "MMM": month field as short month name + * "MMMM": month field as long month name + * "d": day of month field without leading zero + * "dd": day of month field with leading zero + * "ddd": day of the week as short name + * "dddd": day of the week as long name + * "t": first character of string which represents AM/PM field + * "tt": 2 characters of string which represents AM/PM field + * "h": hours field in 12-hours format without leading zero + * "hh": hours field in 12-hours format with leading zero + * "H": hours field in 24-hours format without leading zero + * "HH": hours field in 24-hours format with leading zero + * "m": minutes field without leading zero + * "mm": minutes field with leading zero + * "s": seconds field without leading zero + * "ss": seconds field with leading zero + * "f": milliseconds field in hundreds + * "ff": milliseconds field in tenths + * "fff": milliseconds field + * + */ + dateDisplayFormat?: string; + + /** + * Gets format of date while editor has focus. + * Value of that option can be set to explicit date pattern or to a flag defined by regional settings. + * If value is set to explicit date pattern and pattern besides date-flags has explicit characters which match with date-flags or mask-flags, then the "escape" character should be used in front of them. + * If option is not set, then the "date" is used automatically. + * List of predefined regional flags: + * "date": the datePattern member of regional option is used + * "dateLong": the dateLongPattern member of regional option is used + * "time": the timePattern member of regional option is used + * "timeLong": the timeLongPattern member of regional option is used + * "dateTime": the dateTimePattern member of regional option is used + * List of explicit characters, which should have escape \\ character in front of them: C, &, a, A, ?, L, 9, 0, #, >, <, y, M, d, h, H, m, s, t, f. + * List of date-flags when explicit date pattern is used: + * "yy": year field without century and with leading zero + * "yyyy": year field with leading zeros + * "MM": month field as digit with leading zero + * "dd": day of month field with leading zero + * "t": first character of string which represents AM/PM field + * "tt": 2 characters of string which represents AM/PM field + * "hh": hours field in 12-hours format with leading zero + * "HH": hours field in 24-hours format with leading zero + * "mm": minutes field with leading zero + * "ss": seconds field with leading zero + * "f": milliseconds field in hundreds + * "ff": milliseconds field in tenths + * "fff": milliseconds field + * Note! This option can not be set runtime. + * + */ + dateInputFormat?: string; + + /** + * Gets/Sets the value type returned by the get of value() method. That also affects functionality of the set value(val) method and the copy/paste operations of browser. + * Note: That is used as default. + * + * + * Valid values: + * "date" The Date object is used. When that mode is set the value send to the server on submit is string value converter from the javascript Date object using "toISOString" method. + * "displayModeText" The String object is used and the "text" in display mode (no focus) format (pattern). + * "editModeText" The String object is used and the "text" in edit mode (focus) format (pattern). + */ + dataMode?: string; + + /** + * Gets/Sets delta-value which is used to increment or decrement value in editor on spin events. If value is set to negative value an exception is thrown. Non integer value is supported only for dataMode double and float. + * + */ + spinDelta?: number; + + /** + * Gets/Sets ability to modify only 1 date field on spin events. + * Value false enables changes of other date fields when incremented or decremented date-field reaches its limits. + * Value true modifies only value of one field. + * + */ + limitSpinToCurrentField?: boolean; + + /** + * Gets/Sets formatting of the dates as UTC. + * That option is supported only when dataMode option is 'date' and Date objects are used to get/set value of editor. + * Notes: + * That option affects only functionality of get/set value method and the Date-value, which was set on initialization. + * When application uses the set-value, then internal Date-value and displayed-text is incremented by TimezoneOffset. + * When application uses the get-value, then editor returns internal Date-value decremented by TimezoneOffset. + * When that option is modified after initialization, then displayed text and internal Date-value are not affected. + * It is not recommended to change that option without resetting Date-value. + * + */ + enableUTCDates?: boolean; + + /** + * Gets/Sets year for auto detection of 20th and 21st centuries. + * That option is used to automatically fill century when the user entered only 1 or 2 digits into the year field or when the date pattern contains only 1 or 2 year positions, e.g. "yy" or "y". + * If user entered value larger than value of this option, then 20th century is used, otherwise the 21st. + * + */ + centuryThreshold?: number; + + /** + * Gets/Set value used to increase/decrease year part of the date, in order to set difference between year in Gregorian calendar and displayed year. + * + */ + yearShift?: number; + + /** + * Gets/Sets the representation of null value. In case of default the value for the input is set to null, which makes the input to hold an empty string + * + */ + nullValue?: string|number; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + */ + dropDownAnimationDuration?: number; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + */ + inputMask?: string; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + */ + unfilledCharsPrompt?: string; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + */ + padChar?: string; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + */ + emptyChar?: string; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + */ + toUpper?: boolean; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + */ + toLower?: boolean; + + /** + * Gets ability to enter only specific characters in input-field from keyboard and on paste. + * Notes: + * If "excludeKeys" option contains same characters as this option, then "excludeKeys" has priority. + * Note! This option can not be se runtime. + * + */ + includeKeys?: string; + + /** + * Gets ability to prevent entering specific characters from keyboard or on paste. + * Notes: + * If a character is specified in "includeKeys" option also, then "excludeKeys" has priority. + * Note! This option can not be se runtime. + * + */ + excludeKeys?: string; + + /** + * Gets/Sets the ability of the editor to automatically change the hoverd item into the opened dropdown list to its oposide side. + */ + spinWrapAround?: boolean; + + /** + * This option is inherited from a parent widget and it's not applicable for igMaskEditor + */ + dropDownOrientation?: string; + + /** + * + */ + textMode?: any; + + /** + * Gets/Sets how many items should be shown at once. + * Notes: + * That option is overwritten if the number of list items is less than the value. In that case the height of the dropdown is adjusted to the number of items. + * Note! This option can not be set runtime. + */ + visibleItemsCount?: number; + + /** + * This option is inherited from a parent widget and it's not applicable for igMaskEditor + */ + maxLength?: any; + + /** + * Gets/Sets the horizontal alignment of the text in the editor. + * + * + * Valid values: + * "left" The text into the input gets aligned to the left. + * "right" The text into the input gets aligned to the right. + * "center" The text into the input gets aligned to the center. + */ + textAlign?: string; + + /** + * Gets/Sets the text which appears in the editor when it has no focus and the "value" is null or empty string. + * + */ + placeHolder?: string; + + /** + * Gets/Sets the action when the editor gets focused. The default value is selectAll. + * + * + * Valid values: + * "selectAll" Setting this option will select all the text into the editor when the edit mode gets enetered. + * "atStart" Setting this option will move the cursor at the begining the text into the editor when the edit mode gets enetered. + * "atEnd" Setting this option will move the cursor at the end the text into the editor when the edit mode gets enetered. + * "browserDefault" Setting this option won't do any extra logic, but proceed with the browser default behavior. + */ + selectionOnFocus?: string; + + /** + * Gets/Sets if the editor should revert it's value to the previously valid value in case the value on blur, or enter key is not valid. If the opiton is set to false, editor calls clear functionality. + * + */ + revertIfNotValid?: boolean; + + /** + * Gets/Sets if the editor should prevent form submition when enter key is pressed. + * + */ + preventSubmitOnEnter?: boolean; + + /** + * Gets/Sets the strings used for the localization of the component. This includes button titles, error messages etc. Value of the object should contain pairs or key:value members. Note: any sub-option of locale can appear within the main option of igEditor. In this case those values within main options will have highest priority and override corresponding value in locale. + * + */ + locale?: any; + + /** + * Disables/Enables default notifications for basic validation scenarios built in the editors such as required list selection, value wrapping around or spin limits. + * + */ + suppressNotifications?: boolean; + + /** + * Gets/Sets the width of the control. + * + * + * Valid values: + * "null" will stretch to fit data, if no other widths are defined. + */ + width?: string|number; + + /** + * Gets/Sets the height of the control. + * + * + * Valid values: + * "null" will fit the editor inside its parent container, if no other heights are defined. + */ + height?: string|number; + + /** + * Gets/Sets tabIndex attribute for the editor input. + * + */ + tabIndex?: number; + + /** + * Gets/Sets whether the editor value can become null. + * If that option is false, and editor has no value, then value is set to an empty string. + * + */ + allowNullValue?: boolean; + + /** + * Gets/Sets the name attribute of the value input. This input is used to sent the value to the server. In case the target element is input and it has name attribute, but the developer has set the inputName option, so this option overwrites the value input and removes the attribute from the element. + * + */ + inputName?: string; + + /** + * Gets/Sets the readonly attribute for the input. If set to true the input is readonly, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is submitted. + * + */ + readOnly?: boolean; + + /** + * Gets/Sets the disabled attribute for the input. If set to true the input is disabled, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is not submitted. + * + */ + disabled?: boolean; + + /** + * Gets/Sets options supported by the [igValidator](ui.igvalidator#options) widget. + * Note: Validation rules of [igValidator](ui.igvalidator#options), such as min and max value/length are applied separately triggering errors, + * while the corresponding options of the editor prevent values violating the defined rules from being entered. + * + */ + validatorOptions?: any; + + /** + * Event which is raised when the drop down is opening. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.editorInput to obtain reference to the editable input + * Use ui.calendar to obtain a reference to jQuery UI date picker widget, used as a calendar from the igDatePicker. + */ + dropDownListOpening?: DropDownListOpeningEvent; + + /** + * Event which is raised after the drop down is opened. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.editorInput to obtain reference to the editable input + * Use ui.calendar to obtain a reference to jQuery UI date picker widget, used as a calendar from the igDatePicker. + */ + dropDownListOpened?: DropDownListOpenedEvent; + + /** + * This event is inherited from a parent widget and it's not triggered in igDatePicker + */ + dropDownListClosing?: DropDownListClosingEvent; + + /** + * This event is inherited from a parent widget and it's not triggered in igDatePicker + */ + dropDownItemSelecting?: DropDownItemSelectingEvent; + + /** + * Event which is raised after the drop down (calendar) is closed. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.editorInput to obtain reference to the editable input + * Use ui.calendar to obtain a reference to jQuery UI date picker widget, used as a calendar from the igDatePicker. + */ + dropDownListClosed?: DropDownListClosedEvent; + + /** + * This event is inherited from a parent widget and it's not triggered in igDatePicker + */ + dropDownItemSelected?: DropDownItemSelectedEvent; + + /** + * Event which is raised after a date selection in the calendar. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.dateFromPicker to obtain reference to the date object which is selected. + * Use ui.item to obtain a referece to the selected html element from the calendar. + * Use ui.calendar to obtain a reference to jQuery UI date picker, used as a calendar from the igDatePicker. + */ + itemSelected?: ItemSelectedEvent; + + /** + * Option for igDatePicker + */ + [optionName: string]: any; +} +interface IgDatePickerMethods { + /** + * Returns a reference to the jQuery calendar used as a picker selector + */ + getCalendar(): string; + dropDownContainer(): void; + findListItemIndex(): void; + getSelectedListItem(): void; + selectedListIndex(): void; + + /** + * Shows the drop down list. + */ + showDropDown(): void; + + /** + * Hides the drop down list. + */ + hideDropDown(): void; + + /** + * Returns a reference to the calendar button UI element of the editor. + */ + dropDownButton(): string; + + /** + * Returns the visibility state of the calendar. + */ + dropDownVisible(): boolean; + + /** + * Destroys the widget + */ + destroy(): void; + + /** + * Gets/Sets editor value. + * + * Note! This option doesn't use the displayInputFormat to extract the date + * + * @param newValue New editor value. Date object can be set as value. String value can be passed and the editor will use the javascript Date object constructor to create date object and will use it for the comparison. MVC date format can be used too. For example Date(/"thicks"/). + */ + value(newValue?: Object): Object; + + /** + * Gets selected date. + */ + getSelectedDate(): Object; + + /** + * Sets selected date. + * + * @param date + */ + selectDate(date: Object): void; + + /** + * Increases the date or time period, depending on the current cursor position. + * + * @param delta The increase delta. + */ + spinUp(delta?: number): void; + + /** + * Decreases the date or time period, depending on the current cursor position. + * + * @param delta The decrease delta. + */ + spinDown(delta?: number): void; + + /** + * Returns a reference to the spin up UI element of the editor. + */ + spinUpButton(): string; + + /** + * Returns a reference to the spin down UI element of the editor. + */ + spinDownButton(): string; + + /** + * Checks if the value in the editor is valid. Note: This function will not trigger automatic notifications. + */ + isValid(): boolean; +} +interface JQuery { + data(propertyName: "igDatePicker"): IgDatePickerMethods; +} + +interface IgCheckboxEditor { + /** + * Gets/Sets whether the checkbox is checked. + * + */ + checked?: boolean; + + /** + * Gets/Sets size of the checkbox based on preset styles.For different sizes, define 'width' and 'height' options instead. + * + * + * + * Valid values: + * "verysmall" The size of the Checkbox editor is very small. + * "small" The size of the Checkbox editor is small. + * "normal" The size of the Checkbox editor is normal. + * "large" The size of the Checkbox editor is large. + */ + size?: string; + + /** + * Gets/Sets a custom class on the checkbox. Custom image can be used this way. + * The following jQuery classes can be used in addition http://api.jqueryui.com/theming/icons/ + * + */ + iconClass?: string; + + /** + * Gets/Sets tabIndex attribute for the editor input. + * + */ + tabIndex?: number; + + /** + * Gets/Sets the readonly attribute. Does not allow editing. Disables changing the checkbox state as an interaction, but it still can be changed programmatically. On submit the current value is sent into the request. + * + */ + readOnly?: boolean; + allowNullValue?: boolean; + nullValue?: any; + + /** + * Gets/Sets the width of the control. + * + * + * Valid values: + * "null" will stretch to fit data, if no other widths are defined. + */ + width?: string|number; + + /** + * Gets/Sets the height of the control. + * + * + * Valid values: + * "null" will fit the editor inside its parent container, if no other heights are defined. + */ + height?: string|number; + + /** + * Gets/Sets value in editor. The effect of setting/getting that option depends on type of editor and on dataMode options for every type of editor. + * + */ + value?: any; + + /** + * Gets/Sets the name attribute of the value input. This input is used to sent the value to the server. In case the target element is input and it has name attribute, but the developer has set the inputName option, so this option overwrites the value input and removes the attribute from the element. + * + */ + inputName?: string; + + /** + * Gets/Sets the disabled attribute for the input. If set to true the input is disabled, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is not submitted. + * + */ + disabled?: boolean; + + /** + * Gets/Sets options supported by the [igValidator](ui.igvalidator#options) widget. + * Note: Validation rules of [igValidator](ui.igvalidator#options), such as min and max value/length are applied separately triggering errors, + * while the corresponding options of the editor prevent values violating the defined rules from being entered. + * + */ + validatorOptions?: any; + + /** + * Event which is raised before value in editor was changed. + * Return false in order to cancel change. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.newValue to obtain the new value. + * Use ui.newState to obtain the new state. + * Use ui.oldValue to obtain the old value. + * Use ui.oldState to obtain the old state. + * Use ui.element to obtain a reference to the event target. + * Use ui.editorInput obtain reference to the editor element. + */ + valueChanging?: ValueChangingEvent; + + /** + * Event which is raised after value in editor was changed. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.newValue to obtain the new value. + * Use ui.newState to obtain the new state. + * Use ui.element to obtain a reference to the event target. + * Use ui.editorInput obtain reference to the editor element. + */ + valueChanged?: ValueChangedEvent; + + /** + * Event which is raised before rendering of the editor completes. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the editor performing rendering. + * Use ui.element to get a reference to the editor element. + */ + rendering?: RenderingEvent; + + /** + * Event which is raised after rendering of the editor completes. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the editor performing rendering. + * Use ui.element to get a reference to the editor element. + */ + rendered?: RenderedEvent; + + /** + * Event which is raised on mousedown event. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.element to obtain a reference to the event target. + * Use ui.editorInput to get a reference to the editor field. + */ + mousedown?: MousedownEvent; + + /** + * Event which is raised on mouseup event. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.element to obtain a reference to the event target. + * Use ui.editorInput to get a reference to the editor field. + */ + mouseup?: MouseupEvent; + + /** + * Event which is raised on mousemove at any part of editor including drop-down list. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.element to obtain a reference to the event target. + * Use ui.editorInput to get a reference to the editor field. + */ + mousemove?: MousemoveEvent; + + /** + * Event which is raised on mouseover at any part of editor including drop-down list. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.element to obtain a reference to the event target. + * Use ui.editorInput to get a reference to the editor field. + */ + mouseover?: MouseoverEvent; + + /** + * Event which is raised on mouseleave at any part of editor including drop-down list. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.element to obtain a reference to the event target. + * Use ui.editorInput to get a reference to the editor field. + */ + mouseout?: MouseoutEvent; + + /** + * Event which is raised when input field of editor loses focus. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.element to obtain a reference to the event target. + * Use ui.editorInput to get a reference to the editor field. + */ + blur?: BlurEvent; + + /** + * Event which is raised when input field of editor gets focus. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.element to obtain a reference to the event target. + * Use ui.editorInput to get a reference to the editor field. + */ + focus?: FocusEvent; + + /** + * Event which is raised on keydown event. + * Return false in order to cancel key action. + * Function takes arguments evt and ui. + * Use evt.originalEvent to obtain reference to event of browser. + * Use ui.owner to obtain reference to igEditor. + * Use ui.key to obtain value of keyCode. + */ + keydown?: KeydownEvent; + + /** + * Event which is raised on keypress event. + * Return false in order to cancel key action. + * Function takes arguments evt and ui. + * Use evt.originalEvent to obtain reference to event of browser. + * Use ui.owner to obtain reference to igEditor. + * Use ui.key to obtain value of keyCode. + */ + keypress?: KeypressEvent; + + /** + * Event which is raised on keyup event. + * Function takes arguments evt and ui. + * Use evt.originalEvent to obtain reference to event of browser. + * Use ui.owner to obtain reference to igEditor. + * Use ui.key to obtain value of keyCode. + */ + keyup?: KeyupEvent; + + /** + * Option for igCheckboxEditor + */ + [optionName: string]: any; +} +interface IgCheckboxEditorMethods { + /** + * Checks if the value in the editor is valid. Note: This function will not trigger automatic notifications. + */ + isValid(): boolean; + + /** + * Gets/Sets Current checked state/Value of the igCheckboxEditor that will be submitted by the HTML form. + * 1. If the [value](ui.igcheckboxeditor#options:value) option IS NOT defined, then 'value' method will match the checked state of the editor. + * This option is used when the checkbox is intended to operate as a Boolean editor. In that case the return type is bool. + * 2. If the [value](ui.igcheckboxeditor#options:value) option IS defined, then 'value' method will return the value that will be submitted when the editor is checked and the form is submitted. + * To get checked state regardless of the 'value' option, use $(".selector").igCheckboxEditor("option", "checked"); + * + * @param newValue + */ + value(newValue: Object): string; + + /** + * Toggles the state of the checkbox. + */ + toggle(): void; + + /** + * Gets/Sets name attribute applied to the editor element. + * + * @param newValue The new input name. + */ + inputName(newValue?: string): string; + + /** + * Gets the input element of the editor. + */ + field(): string; + + /** + * Gets a reference to the jQuery element that wraps the editor. + */ + editorContainer(): string; + + /** + * Gets whether the editor has focus. + */ + hasFocus(): boolean; + + /** + * Sets focus to the editor after the specified delay. + * + * @param delay The delay before focusing the editor. + */ + setFocus(delay?: number): void; + + /** + * Hides the editor. + */ + hide(): void; + + /** + * Shows the editor. + */ + show(): void; + + /** + * Gets a reference to [igValidator](ui.igvalidator) used by the editor. + */ + validator(): Object; + + /** + * Triggers validation for the editor. If validatorOptions are set will also call validate on the [igValidator](ui.igvalidator). + */ + validate(): boolean; + + /** + * Destroys the widget + */ + destroy(): void; +} +interface JQuery { + data(propertyName: "igCheckboxEditor"): IgCheckboxEditorMethods; +} + +interface JQuery { + igBaseEditor(methodName: "inputName", newValue?: string): string; + igBaseEditor(methodName: "value", newValue: Object): void; + igBaseEditor(methodName: "field"): string; + igBaseEditor(methodName: "editorContainer"): string; + igBaseEditor(methodName: "hasFocus"): boolean; + igBaseEditor(methodName: "setFocus", delay?: number): void; + igBaseEditor(methodName: "hide"): void; + igBaseEditor(methodName: "show"): void; + igBaseEditor(methodName: "validator"): Object; + igBaseEditor(methodName: "isValid"): boolean; + igBaseEditor(methodName: "validate"): boolean; + igBaseEditor(methodName: "destroy"): void; + + /** + * Gets/Sets the width of the control. + * + */ + igBaseEditor(optionLiteral: 'option', optionName: "width"): string|number; + + /** + * /Sets the width of the control. + * + * + * @optionValue New value to be set. + */ + igBaseEditor(optionLiteral: 'option', optionName: "width", optionValue: string|number): void; + + /** + * Gets/Sets the height of the control. + * + */ + igBaseEditor(optionLiteral: 'option', optionName: "height"): string|number; + + /** + * /Sets the height of the control. + * + * + * @optionValue New value to be set. + */ + igBaseEditor(optionLiteral: 'option', optionName: "height", optionValue: string|number): void; + + /** + * Gets/Sets value in editor. The effect of setting/getting that option depends on type of editor and on dataMode options for every type of editor. + * + */ + igBaseEditor(optionLiteral: 'option', optionName: "value"): any; + + /** + * /Sets value in editor. The effect of setting/getting that option depends on type of editor and on dataMode options for every type of editor. + * + * + * @optionValue New value to be set. + */ + igBaseEditor(optionLiteral: 'option', optionName: "value", optionValue: any): void; + + /** + * Gets/Sets tabIndex attribute for the editor input. + * + */ + igBaseEditor(optionLiteral: 'option', optionName: "tabIndex"): number; + + /** + * /Sets tabIndex attribute for the editor input. + * + * + * @optionValue New value to be set. + */ + igBaseEditor(optionLiteral: 'option', optionName: "tabIndex", optionValue: number): void; + + /** + * Gets/Sets whether the editor value can become null. + * If that option is false, and editor has no value, then value is set to an empty string. + * + */ + igBaseEditor(optionLiteral: 'option', optionName: "allowNullValue"): boolean; + + /** + * /Sets whether the editor value can become null. + * If that option is false, and editor has no value, then value is set to an empty string. + * + * + * @optionValue New value to be set. + */ + igBaseEditor(optionLiteral: 'option', optionName: "allowNullValue", optionValue: boolean): void; + + /** + * Gets/Sets the representation of null value. In case of default the value for the input is set to null, which makes the input to hold an empty string + * + */ + igBaseEditor(optionLiteral: 'option', optionName: "nullValue"): string|number; + + /** + * /Sets the representation of null value. In case of default the value for the input is set to null, which makes the input to hold an empty string + * + * + * @optionValue New value to be set. + */ + igBaseEditor(optionLiteral: 'option', optionName: "nullValue", optionValue: string|number): void; + + /** + * Gets/Sets the name attribute of the value input. This input is used to sent the value to the server. In case the target element is input and it has name attribute, but the developer has set the inputName option, so this option overwrites the value input and removes the attribute from the element. + * + */ + igBaseEditor(optionLiteral: 'option', optionName: "inputName"): string; + + /** + * /Sets the name attribute of the value input. This input is used to sent the value to the server. In case the target element is input and it has name attribute, but the developer has set the inputName option, so this option overwrites the value input and removes the attribute from the element. + * + * + * @optionValue New value to be set. + */ + igBaseEditor(optionLiteral: 'option', optionName: "inputName", optionValue: string): void; + + /** + * Gets/Sets the readonly attribute for the input. If set to true the input is readonly, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is submitted. + * + */ + igBaseEditor(optionLiteral: 'option', optionName: "readOnly"): boolean; + + /** + * /Sets the readonly attribute for the input. If set to true the input is readonly, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is submitted. + * + * + * @optionValue New value to be set. + */ + igBaseEditor(optionLiteral: 'option', optionName: "readOnly", optionValue: boolean): void; + + /** + * Gets/Sets the disabled attribute for the input. If set to true the input is disabled, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is not submitted. + * + */ + igBaseEditor(optionLiteral: 'option', optionName: "disabled"): boolean; + + /** + * /Sets the disabled attribute for the input. If set to true the input is disabled, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is not submitted. + * + * + * @optionValue New value to be set. + */ + igBaseEditor(optionLiteral: 'option', optionName: "disabled", optionValue: boolean): void; + + /** + * Gets/Sets options supported by the [igValidator](ui.igvalidator#options) widget. + * Note: Validation rules of [igValidator](ui.igvalidator#options), such as min and max value/length are applied separately triggering errors, + * while the corresponding options of the editor prevent values violating the defined rules from being entered. + * + */ + igBaseEditor(optionLiteral: 'option', optionName: "validatorOptions"): any; + + /** + * /Sets options supported by the [igValidator](ui.igvalidator#options) widget. + * Note: Validation rules of [igValidator](ui.igvalidator#options), such as min and max value/length are applied separately triggering errors, + * while the corresponding options of the editor prevent values violating the defined rules from being entered. + * + * + * @optionValue New value to be set. + */ + igBaseEditor(optionLiteral: 'option', optionName: "validatorOptions", optionValue: any): void; + + /** + * Event which is raised before rendering of the editor completes. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the editor performing rendering. + * Use ui.element to get a reference to the editor element. + */ + igBaseEditor(optionLiteral: 'option', optionName: "rendering"): RenderingEvent; + + /** + * Event which is raised before rendering of the editor completes. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the editor performing rendering. + * Use ui.element to get a reference to the editor element. + * + * @optionValue Define event handler function. + */ + igBaseEditor(optionLiteral: 'option', optionName: "rendering", optionValue: RenderingEvent): void; + + /** + * Event which is raised after rendering of the editor completes. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the editor performing rendering. + * Use ui.element to get a reference to the editor element. + */ + igBaseEditor(optionLiteral: 'option', optionName: "rendered"): RenderedEvent; + + /** + * Event which is raised after rendering of the editor completes. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the editor performing rendering. + * Use ui.element to get a reference to the editor element. + * + * @optionValue Define event handler function. + */ + igBaseEditor(optionLiteral: 'option', optionName: "rendered", optionValue: RenderedEvent): void; + + /** + * Event which is raised on mousedown event. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.element to obtain a reference to the event target. + * Use ui.editorInput to get a reference to the editor field. + */ + igBaseEditor(optionLiteral: 'option', optionName: "mousedown"): MousedownEvent; + + /** + * Event which is raised on mousedown event. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.element to obtain a reference to the event target. + * Use ui.editorInput to get a reference to the editor field. + * + * @optionValue Define event handler function. + */ + igBaseEditor(optionLiteral: 'option', optionName: "mousedown", optionValue: MousedownEvent): void; + + /** + * Event which is raised on mouseup event. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.element to obtain a reference to the event target. + * Use ui.editorInput to get a reference to the editor field. + */ + igBaseEditor(optionLiteral: 'option', optionName: "mouseup"): MouseupEvent; + + /** + * Event which is raised on mouseup event. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.element to obtain a reference to the event target. + * Use ui.editorInput to get a reference to the editor field. + * + * @optionValue Define event handler function. + */ + igBaseEditor(optionLiteral: 'option', optionName: "mouseup", optionValue: MouseupEvent): void; + + /** + * Event which is raised on mousemove at any part of editor including drop-down list. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.element to obtain a reference to the event target. + * Use ui.editorInput to get a reference to the editor field. + */ + igBaseEditor(optionLiteral: 'option', optionName: "mousemove"): MousemoveEvent; + + /** + * Event which is raised on mousemove at any part of editor including drop-down list. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.element to obtain a reference to the event target. + * Use ui.editorInput to get a reference to the editor field. + * + * @optionValue Define event handler function. + */ + igBaseEditor(optionLiteral: 'option', optionName: "mousemove", optionValue: MousemoveEvent): void; + + /** + * Event which is raised on mouseover at any part of editor including drop-down list. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.element to obtain a reference to the event target. + * Use ui.editorInput to get a reference to the editor field. + */ + igBaseEditor(optionLiteral: 'option', optionName: "mouseover"): MouseoverEvent; + + /** + * Event which is raised on mouseover at any part of editor including drop-down list. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.element to obtain a reference to the event target. + * Use ui.editorInput to get a reference to the editor field. + * + * @optionValue Define event handler function. + */ + igBaseEditor(optionLiteral: 'option', optionName: "mouseover", optionValue: MouseoverEvent): void; + + /** + * Event which is raised on mouseleave at any part of editor including drop-down list. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.element to obtain a reference to the event target. + * Use ui.editorInput to get a reference to the editor field. + */ + igBaseEditor(optionLiteral: 'option', optionName: "mouseout"): MouseoutEvent; + + /** + * Event which is raised on mouseleave at any part of editor including drop-down list. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.element to obtain a reference to the event target. + * Use ui.editorInput to get a reference to the editor field. + * + * @optionValue Define event handler function. + */ + igBaseEditor(optionLiteral: 'option', optionName: "mouseout", optionValue: MouseoutEvent): void; + + /** + * Event which is raised when input field of editor loses focus. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.element to obtain a reference to the event target. + * Use ui.editorInput to get a reference to the editor field. + */ + igBaseEditor(optionLiteral: 'option', optionName: "blur"): BlurEvent; + + /** + * Event which is raised when input field of editor loses focus. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.element to obtain a reference to the event target. + * Use ui.editorInput to get a reference to the editor field. + * + * @optionValue Define event handler function. + */ + igBaseEditor(optionLiteral: 'option', optionName: "blur", optionValue: BlurEvent): void; + + /** + * Event which is raised when input field of editor gets focus. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.element to obtain a reference to the event target. + * Use ui.editorInput to get a reference to the editor field. + */ + igBaseEditor(optionLiteral: 'option', optionName: "focus"): FocusEvent; + + /** + * Event which is raised when input field of editor gets focus. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.element to obtain a reference to the event target. + * Use ui.editorInput to get a reference to the editor field. + * + * @optionValue Define event handler function. + */ + igBaseEditor(optionLiteral: 'option', optionName: "focus", optionValue: FocusEvent): void; + + /** + * Event which is raised on keydown event. + * Return false in order to cancel key action. + * Function takes arguments evt and ui. + * Use evt.originalEvent to obtain reference to event of browser. + * Use ui.owner to obtain reference to igEditor. + * Use ui.key to obtain value of keyCode. + */ + igBaseEditor(optionLiteral: 'option', optionName: "keydown"): KeydownEvent; + + /** + * Event which is raised on keydown event. + * Return false in order to cancel key action. + * Function takes arguments evt and ui. + * Use evt.originalEvent to obtain reference to event of browser. + * Use ui.owner to obtain reference to igEditor. + * Use ui.key to obtain value of keyCode. + * + * @optionValue Define event handler function. + */ + igBaseEditor(optionLiteral: 'option', optionName: "keydown", optionValue: KeydownEvent): void; + + /** + * Event which is raised on keypress event. + * Return false in order to cancel key action. + * Function takes arguments evt and ui. + * Use evt.originalEvent to obtain reference to event of browser. + * Use ui.owner to obtain reference to igEditor. + * Use ui.key to obtain value of keyCode. + */ + igBaseEditor(optionLiteral: 'option', optionName: "keypress"): KeypressEvent; + + /** + * Event which is raised on keypress event. + * Return false in order to cancel key action. + * Function takes arguments evt and ui. + * Use evt.originalEvent to obtain reference to event of browser. + * Use ui.owner to obtain reference to igEditor. + * Use ui.key to obtain value of keyCode. + * + * @optionValue Define event handler function. + */ + igBaseEditor(optionLiteral: 'option', optionName: "keypress", optionValue: KeypressEvent): void; + + /** + * Event which is raised on keyup event. + * Function takes arguments evt and ui. + * Use evt.originalEvent to obtain reference to event of browser. + * Use ui.owner to obtain reference to igEditor. + * Use ui.key to obtain value of keyCode. + */ + igBaseEditor(optionLiteral: 'option', optionName: "keyup"): KeyupEvent; + + /** + * Event which is raised on keyup event. + * Function takes arguments evt and ui. + * Use evt.originalEvent to obtain reference to event of browser. + * Use ui.owner to obtain reference to igEditor. + * Use ui.key to obtain value of keyCode. + * + * @optionValue Define event handler function. + */ + igBaseEditor(optionLiteral: 'option', optionName: "keyup", optionValue: KeyupEvent): void; + + /** + * Event which is raised before the editor value is changed. + * Return false in order to cancel change. + * It can be raised after loosing focus or on spin events. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.newValue to obtain the new value. + * Use ui.oldValue to obtain the old value. + * Use ui.editorInput to obtain reference to the editor input. + */ + igBaseEditor(optionLiteral: 'option', optionName: "valueChanging"): ValueChangingEvent; + + /** + * Event which is raised before the editor value is changed. + * Return false in order to cancel change. + * It can be raised after loosing focus or on spin events. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.newValue to obtain the new value. + * Use ui.oldValue to obtain the old value. + * Use ui.editorInput to obtain reference to the editor input. + * + * @optionValue Define event handler function. + */ + igBaseEditor(optionLiteral: 'option', optionName: "valueChanging", optionValue: ValueChangingEvent): void; + + /** + * Event which is raised after the editor value is changed. It can be raised after loosing focus or on spin events. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.newValue to obtain the new value. + * Use ui.originalValue to obtain the original value. + * Use ui.editorInput to obtain reference to the editor input. + */ + igBaseEditor(optionLiteral: 'option', optionName: "valueChanged"): ValueChangedEvent; + + /** + * Event which is raised after the editor value is changed. It can be raised after loosing focus or on spin events. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.newValue to obtain the new value. + * Use ui.originalValue to obtain the original value. + * Use ui.editorInput to obtain reference to the editor input. + * + * @optionValue Define event handler function. + */ + igBaseEditor(optionLiteral: 'option', optionName: "valueChanged", optionValue: ValueChangedEvent): void; + igBaseEditor(options: IgBaseEditor): JQuery; + igBaseEditor(optionLiteral: 'option', optionName: string): any; + igBaseEditor(optionLiteral: 'option', options: IgBaseEditor): JQuery; + igBaseEditor(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igBaseEditor(methodName: string, ...methodParams: any[]): any; +} +interface JQuery { + igTextEditor(methodName: "displayValue"): string; + igTextEditor(methodName: "dropDownContainer"): string; + igTextEditor(methodName: "showDropDown"): void; + igTextEditor(methodName: "hideDropDown"): void; + igTextEditor(methodName: "dropDownButton"): string; + igTextEditor(methodName: "dropDownVisible"): boolean; + igTextEditor(methodName: "clearButton"): string; + igTextEditor(methodName: "findListItemIndex", text: string, matchType?: Object): number; + igTextEditor(methodName: "selectedListIndex", index?: number): number; + igTextEditor(methodName: "getSelectedListItem"): string; + igTextEditor(methodName: "getSelectedText"): string; + igTextEditor(methodName: "getSelectionStart"): number; + igTextEditor(methodName: "getSelectionEnd"): number; + igTextEditor(methodName: "insert", string: string): void; + igTextEditor(methodName: "select", start: number, end: number): void; + igTextEditor(methodName: "spinUp"): void; + igTextEditor(methodName: "spinDown"): void; + igTextEditor(methodName: "spinUpButton"): string; + igTextEditor(methodName: "spinDownButton"): string; + igTextEditor(methodName: "inputName", newValue?: string): string; + igTextEditor(methodName: "value", newValue: Object): void; + igTextEditor(methodName: "field"): string; + igTextEditor(methodName: "editorContainer"): string; + igTextEditor(methodName: "hasFocus"): boolean; + igTextEditor(methodName: "setFocus", delay?: number): void; + igTextEditor(methodName: "hide"): void; + igTextEditor(methodName: "show"): void; + igTextEditor(methodName: "validator"): Object; + igTextEditor(methodName: "isValid"): boolean; + igTextEditor(methodName: "validate"): boolean; + igTextEditor(methodName: "destroy"): void; + + /** + * Gets visibility of the spin, clear and drop-down button. That option can be set only on initialization. Combinations like 'dropdown,spin' or 'spin,clear' are supported too.Note! This option can not be set runtime. + * + * + */ + igTextEditor(optionLiteral: 'option', optionName: "buttonType"): string; + + /** + * Visibility of the spin, clear and drop-down button. That option can be set only on initialization. Combinations like 'dropdown,spin' or 'spin,clear' are supported too.Note! This option can not be set runtime. + * + * + * + * @optionValue New value to be set. + */ + igTextEditor(optionLiteral: 'option', optionName: "buttonType", optionValue: string): void; + + /** + * Gets/Sets list of items which are used as a source for the drop-down list. + * Items in the list can be of type string, number or object. The items are directly rendered without any casting, or manipulation. + * + */ + igTextEditor(optionLiteral: 'option', optionName: "listItems"): any[]; + + /** + * /Sets list of items which are used as a source for the drop-down list. + * Items in the list can be of type string, number or object. The items are directly rendered without any casting, or manipulation. + * + * + * @optionValue New value to be set. + */ + igTextEditor(optionLiteral: 'option', optionName: "listItems", optionValue: any[]): void; + + /** + * Gets/Sets custom width of the drop-down list in pixels. If the value is equal to 0 or negative, then the width of editor is set as a drop-down width. + * + */ + igTextEditor(optionLiteral: 'option', optionName: "listWidth"): number; + + /** + * /Sets custom width of the drop-down list in pixels. If the value is equal to 0 or negative, then the width of editor is set as a drop-down width. + * + * + * @optionValue New value to be set. + */ + igTextEditor(optionLiteral: 'option', optionName: "listWidth", optionValue: number): void; + + /** + * Gets/Sets the hover/unhover animation duration of a drop-down list item. + * + */ + igTextEditor(optionLiteral: 'option', optionName: "listItemHoverDuration"): number; + + /** + * /Sets the hover/unhover animation duration of a drop-down list item. + * + * + * @optionValue New value to be set. + */ + igTextEditor(optionLiteral: 'option', optionName: "listItemHoverDuration", optionValue: number): void; + + /** + * Gets wheather the drop-down list element is attached to the body of the document, or to the editor container element. + * If the option is set to false the editor will attach the drop-down list element to the editor container + * If the option is set to true the editor will attach its drop-down list to as a child of the body. + * Note! This option can not be set runtime. + * + */ + igTextEditor(optionLiteral: 'option', optionName: "dropDownAttachedToBody"): boolean; + + /** + * Wheather the drop-down list element is attached to the body of the document, or to the editor container element. + * If the option is set to false the editor will attach the drop-down list element to the editor container + * If the option is set to true the editor will attach its drop-down list to as a child of the body. + * Note! This option can not be set runtime. + * + * + * @optionValue New value to be set. + */ + igTextEditor(optionLiteral: 'option', optionName: "dropDownAttachedToBody", optionValue: boolean): void; + + /** + * Gets/Sets show/hide drop-down list animation duration in milliseconds. + * + */ + igTextEditor(optionLiteral: 'option', optionName: "dropDownAnimationDuration"): number; + + /** + * /Sets show/hide drop-down list animation duration in milliseconds. + * + * + * @optionValue New value to be set. + */ + igTextEditor(optionLiteral: 'option', optionName: "dropDownAnimationDuration", optionValue: number): void; + + /** + * Gets the number of the items to be shown at once when the drop-down list get opened. + * Notes: + * This option is overwritten if the number of list items is less than the set value. In that case the drop-down list displays all the items. + * This option can not be set runtime. + * + */ + igTextEditor(optionLiteral: 'option', optionName: "visibleItemsCount"): number; + + /** + * The number of the items to be shown at once when the drop-down list get opened. + * Notes: + * This option is overwritten if the number of list items is less than the set value. In that case the drop-down list displays all the items. + * This option can not be set runtime. + * + * + * @optionValue New value to be set. + */ + igTextEditor(optionLiteral: 'option', optionName: "visibleItemsCount", optionValue: number): void; + + /** + * Gets/Sets the ability of the editor to allow entering only specific characters in the input-field from the keyboard and on paste. + * Notes: + * If both "excludeKeys" and "includeKeys" options are used, then "excludeKeys" has priority and includeKeys options is not respected. + * The option is case sensitive! If the option is set runtime it's not applied on the current value. + * + */ + igTextEditor(optionLiteral: 'option', optionName: "includeKeys"): string; + + /** + * /Sets the ability of the editor to allow entering only specific characters in the input-field from the keyboard and on paste. + * Notes: + * If both "excludeKeys" and "includeKeys" options are used, then "excludeKeys" has priority and includeKeys options is not respected. + * The option is case sensitive! If the option is set runtime it's not applied on the current value. + * + * + * @optionValue New value to be set. + */ + igTextEditor(optionLiteral: 'option', optionName: "includeKeys", optionValue: string): void; + + /** + * Gets/Sets the ability of the editor to prevent entering specific characters from the keyboard or on paste. + * Notes: + * If both "excludeKeys" and "includeKeys" options are used, then "excludeKeys" has priority and includeKeys options is not respected. + * The option is case sensitive! If the option is set runtime it's not applied on the current value. + * + */ + igTextEditor(optionLiteral: 'option', optionName: "excludeKeys"): string; + + /** + * /Sets the ability of the editor to prevent entering specific characters from the keyboard or on paste. + * Notes: + * If both "excludeKeys" and "includeKeys" options are used, then "excludeKeys" has priority and includeKeys options is not respected. + * The option is case sensitive! If the option is set runtime it's not applied on the current value. + * + * + * @optionValue New value to be set. + */ + igTextEditor(optionLiteral: 'option', optionName: "excludeKeys", optionValue: string): void; + + /** + * Gets/Sets the horizontal alignment of the text in the editor. + * + */ + igTextEditor(optionLiteral: 'option', optionName: "textAlign"): string; + + /** + * /Sets the horizontal alignment of the text in the editor. + * + * + * @optionValue New value to be set. + */ + igTextEditor(optionLiteral: 'option', optionName: "textAlign", optionValue: string): void; + + /** + * Gets/Sets the text which appears in the editor when it has no focus and the "value" is null or empty string. + * + */ + igTextEditor(optionLiteral: 'option', optionName: "placeHolder"): string; + + /** + * /Sets the text which appears in the editor when it has no focus and the "value" is null or empty string. + * + * + * @optionValue New value to be set. + */ + igTextEditor(optionLiteral: 'option', optionName: "placeHolder", optionValue: string): void; + + /** + * Gets/Sets the action when the editor gets focused. The default value is selectAll. + * + */ + igTextEditor(optionLiteral: 'option', optionName: "selectionOnFocus"): string; + + /** + * /Sets the action when the editor gets focused. The default value is selectAll. + * + * + * @optionValue New value to be set. + */ + igTextEditor(optionLiteral: 'option', optionName: "selectionOnFocus", optionValue: string): void; + + /** + * Gets the text mode of the editor such as: single-line text editor, password editor or multiline editor. That option has effect only on initialization. If based element (selector) is TEXTAREA, then it is used as input-field. + * + */ + igTextEditor(optionLiteral: 'option', optionName: "textMode"): string; + + /** + * The text mode of the editor such as: single-line text editor, password editor or multiline editor. That option has effect only on initialization. If based element (selector) is TEXTAREA, then it is used as input-field. + * + * + * @optionValue New value to be set. + */ + igTextEditor(optionLiteral: 'option', optionName: "textMode", optionValue: string): void; + + /** + * Gets/Sets the ability of the editor to automatically change the hoverd item into the opened dropdown list to its oposide side. When the last item is reached and the spin down is clicked, the first item gets hovered and vice versa. This option has no effect there is no drop-down list. + * + */ + igTextEditor(optionLiteral: 'option', optionName: "spinWrapAround"): boolean; + + /** + * /Sets the ability of the editor to automatically change the hoverd item into the opened dropdown list to its oposide side. When the last item is reached and the spin down is clicked, the first item gets hovered and vice versa. This option has no effect there is no drop-down list. + * + * + * @optionValue New value to be set. + */ + igTextEditor(optionLiteral: 'option', optionName: "spinWrapAround", optionValue: boolean): void; + + /** + * Gets/Sets if the editor should only allow values set into the list of items. This validation is done only when the editor is blured, or enter key is pressed + * + */ + igTextEditor(optionLiteral: 'option', optionName: "isLimitedToListValues"): boolean; + + /** + * /Sets if the editor should only allow values set into the list of items. This validation is done only when the editor is blured, or enter key is pressed + * + * + * @optionValue New value to be set. + */ + igTextEditor(optionLiteral: 'option', optionName: "isLimitedToListValues", optionValue: boolean): void; + + /** + * Gets/Sets if the editor should revert it's value to the previously valid value in case the value on blur, or enter key is not valid. If the opiton is set to false, editor calls clear functionality. + * + */ + igTextEditor(optionLiteral: 'option', optionName: "revertIfNotValid"): boolean; + + /** + * /Sets if the editor should revert it's value to the previously valid value in case the value on blur, or enter key is not valid. If the opiton is set to false, editor calls clear functionality. + * + * + * @optionValue New value to be set. + */ + igTextEditor(optionLiteral: 'option', optionName: "revertIfNotValid", optionValue: boolean): void; + + /** + * Gets/Sets if the editor should prevent form submition when enter key is pressed. + * + */ + igTextEditor(optionLiteral: 'option', optionName: "preventSubmitOnEnter"): boolean; + + /** + * /Sets if the editor should prevent form submition when enter key is pressed. + * + * + * @optionValue New value to be set. + */ + igTextEditor(optionLiteral: 'option', optionName: "preventSubmitOnEnter", optionValue: boolean): void; + + /** + * Gets/Sets the drop-down list opening orientation when the list gets open. If the option is set to auto the editor has priority to open the drop-down list bottom. If the space is not enough it tries to open the list top. If the space is not enough in both directions then the list gets opened at the bottom of the editor. + * + */ + igTextEditor(optionLiteral: 'option', optionName: "dropDownOrientation"): string; + + /** + * /Sets the drop-down list opening orientation when the list gets open. If the option is set to auto the editor has priority to open the drop-down list bottom. If the space is not enough it tries to open the list top. If the space is not enough in both directions then the list gets opened at the bottom of the editor. + * + * + * @optionValue New value to be set. + */ + igTextEditor(optionLiteral: 'option', optionName: "dropDownOrientation", optionValue: string): void; + + /** + * Gets/Sets the maximum length of a text which can be entered by the user. + * Negative values or 0 disables that behavior. If set at runtime the editor doesn't apply the option to the cuurent value. + * + */ + igTextEditor(optionLiteral: 'option', optionName: "maxLength"): number; + + /** + * /Sets the maximum length of a text which can be entered by the user. + * Negative values or 0 disables that behavior. If set at runtime the editor doesn't apply the option to the cuurent value. + * + * + * @optionValue New value to be set. + */ + igTextEditor(optionLiteral: 'option', optionName: "maxLength", optionValue: number): void; + + /** + * Gets the ability to limit the editor to be used only as a dropdown list. When set to true the editor input is not editable. + * Note! In case there are no list items - the editor will reamin readonly + * Note! This option can not be set runtime. + * + */ + igTextEditor(optionLiteral: 'option', optionName: "dropDownOnReadOnly"): boolean; + + /** + * The ability to limit the editor to be used only as a dropdown list. When set to true the editor input is not editable. + * Note! In case there are no list items - the editor will reamin readonly + * Note! This option can not be set runtime. + * + * + * @optionValue New value to be set. + */ + igTextEditor(optionLiteral: 'option', optionName: "dropDownOnReadOnly", optionValue: boolean): void; + + /** + * Gets/Sets the ability to convert the input characters to upper case (true) or keeps the characters as they are (false). The option has effect only while keyboard entries and paste. + * Note! When the option is set at runtime the editor is not changing the current value. + * + */ + igTextEditor(optionLiteral: 'option', optionName: "toUpper"): boolean; + + /** + * /Sets the ability to convert the input characters to upper case (true) or keeps the characters as they are (false). The option has effect only while keyboard entries and paste. + * Note! When the option is set at runtime the editor is not changing the current value. + * + * + * @optionValue New value to be set. + */ + igTextEditor(optionLiteral: 'option', optionName: "toUpper", optionValue: boolean): void; + + /** + * Gets/Sets the ability to convert the input characters to lower case (true) or keeps the characters as they are (false). The option has effect only while keyboard entries and paste. + * Note! When the option is set at runtime the editor is not changing the current value. + * + */ + igTextEditor(optionLiteral: 'option', optionName: "toLower"): boolean; + + /** + * /Sets the ability to convert the input characters to lower case (true) or keeps the characters as they are (false). The option has effect only while keyboard entries and paste. + * Note! When the option is set at runtime the editor is not changing the current value. + * + * + * @optionValue New value to be set. + */ + igTextEditor(optionLiteral: 'option', optionName: "toLower", optionValue: boolean): void; + + /** + * Gets/Sets the strings used for the localization of the component. This includes button titles, error messages etc. Value of the object should contain pairs or key:value members. Note: any sub-option of locale can appear within the main option of igEditor. In this case those values within main options will have highest priority and override corresponding value in locale. + * + */ + igTextEditor(optionLiteral: 'option', optionName: "locale"): any; + + /** + * /Sets the strings used for the localization of the component. This includes button titles, error messages etc. Value of the object should contain pairs or key:value members. Note: any sub-option of locale can appear within the main option of igEditor. In this case those values within main options will have highest priority and override corresponding value in locale. + * + * + * @optionValue New value to be set. + */ + igTextEditor(optionLiteral: 'option', optionName: "locale", optionValue: any): void; + + /** + * Disables/Enables default notifications for basic validation scenarios built in the editors such as required list selection, value wrapping around or spin limits. + * + */ + igTextEditor(optionLiteral: 'option', optionName: "suppressNotifications"): boolean; + + /** + * Disables/Enables default notifications for basic validation scenarios built in the editors such as required list selection, value wrapping around or spin limits. + * + * + * @optionValue New value to be set. + */ + igTextEditor(optionLiteral: 'option', optionName: "suppressNotifications", optionValue: boolean): void; + + /** + * Gets/Sets the width of the control. + * + */ + igTextEditor(optionLiteral: 'option', optionName: "width"): string|number; + + /** + * /Sets the width of the control. + * + * + * @optionValue New value to be set. + */ + igTextEditor(optionLiteral: 'option', optionName: "width", optionValue: string|number): void; + + /** + * Gets/Sets the height of the control. + * + */ + igTextEditor(optionLiteral: 'option', optionName: "height"): string|number; + + /** + * /Sets the height of the control. + * + * + * @optionValue New value to be set. + */ + igTextEditor(optionLiteral: 'option', optionName: "height", optionValue: string|number): void; + + /** + * Gets/Sets value in editor. The effect of setting/getting that option depends on type of editor and on dataMode options for every type of editor. + * + */ + igTextEditor(optionLiteral: 'option', optionName: "value"): any; + + /** + * /Sets value in editor. The effect of setting/getting that option depends on type of editor and on dataMode options for every type of editor. + * + * + * @optionValue New value to be set. + */ + igTextEditor(optionLiteral: 'option', optionName: "value", optionValue: any): void; + + /** + * Gets/Sets tabIndex attribute for the editor input. + * + */ + igTextEditor(optionLiteral: 'option', optionName: "tabIndex"): number; + + /** + * /Sets tabIndex attribute for the editor input. + * + * + * @optionValue New value to be set. + */ + igTextEditor(optionLiteral: 'option', optionName: "tabIndex", optionValue: number): void; + + /** + * Gets/Sets whether the editor value can become null. + * If that option is false, and editor has no value, then value is set to an empty string. + * + */ + igTextEditor(optionLiteral: 'option', optionName: "allowNullValue"): boolean; + + /** + * /Sets whether the editor value can become null. + * If that option is false, and editor has no value, then value is set to an empty string. + * + * + * @optionValue New value to be set. + */ + igTextEditor(optionLiteral: 'option', optionName: "allowNullValue", optionValue: boolean): void; + + /** + * Gets/Sets the representation of null value. In case of default the value for the input is set to null, which makes the input to hold an empty string + * + */ + igTextEditor(optionLiteral: 'option', optionName: "nullValue"): string|number; + + /** + * /Sets the representation of null value. In case of default the value for the input is set to null, which makes the input to hold an empty string + * + * + * @optionValue New value to be set. + */ + igTextEditor(optionLiteral: 'option', optionName: "nullValue", optionValue: string|number): void; + + /** + * Gets/Sets the name attribute of the value input. This input is used to sent the value to the server. In case the target element is input and it has name attribute, but the developer has set the inputName option, so this option overwrites the value input and removes the attribute from the element. + * + */ + igTextEditor(optionLiteral: 'option', optionName: "inputName"): string; + + /** + * /Sets the name attribute of the value input. This input is used to sent the value to the server. In case the target element is input and it has name attribute, but the developer has set the inputName option, so this option overwrites the value input and removes the attribute from the element. + * + * + * @optionValue New value to be set. + */ + igTextEditor(optionLiteral: 'option', optionName: "inputName", optionValue: string): void; + + /** + * Gets/Sets the readonly attribute for the input. If set to true the input is readonly, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is submitted. + * + */ + igTextEditor(optionLiteral: 'option', optionName: "readOnly"): boolean; + + /** + * /Sets the readonly attribute for the input. If set to true the input is readonly, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is submitted. + * + * + * @optionValue New value to be set. + */ + igTextEditor(optionLiteral: 'option', optionName: "readOnly", optionValue: boolean): void; + + /** + * Gets/Sets the disabled attribute for the input. If set to true the input is disabled, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is not submitted. + * + */ + igTextEditor(optionLiteral: 'option', optionName: "disabled"): boolean; + + /** + * /Sets the disabled attribute for the input. If set to true the input is disabled, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is not submitted. + * + * + * @optionValue New value to be set. + */ + igTextEditor(optionLiteral: 'option', optionName: "disabled", optionValue: boolean): void; + + /** + * Gets/Sets options supported by the [igValidator](ui.igvalidator#options) widget. + * Note: Validation rules of [igValidator](ui.igvalidator#options), such as min and max value/length are applied separately triggering errors, + * while the corresponding options of the editor prevent values violating the defined rules from being entered. + * + */ + igTextEditor(optionLiteral: 'option', optionName: "validatorOptions"): any; + + /** + * /Sets options supported by the [igValidator](ui.igvalidator#options) widget. + * Note: Validation rules of [igValidator](ui.igvalidator#options), such as min and max value/length are applied separately triggering errors, + * while the corresponding options of the editor prevent values violating the defined rules from being entered. + * + * + * @optionValue New value to be set. + */ + igTextEditor(optionLiteral: 'option', optionName: "validatorOptions", optionValue: any): void; + + /** + * Event which is raised when the drop down is opening. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.editorInput to obtain reference to the editable input + * Use ui.list to obtain reference to the list contaier. + */ + igTextEditor(optionLiteral: 'option', optionName: "dropDownListOpening"): DropDownListOpeningEvent; + + /** + * Event which is raised when the drop down is opening. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.editorInput to obtain reference to the editable input + * Use ui.list to obtain reference to the list contaier. + * + * @optionValue Define event handler function. + */ + igTextEditor(optionLiteral: 'option', optionName: "dropDownListOpening", optionValue: DropDownListOpeningEvent): void; + + /** + * Event which is raised after the drop down is opened. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.editorInput to obtain reference to the editable input + * Use ui.list to obtain reference to the list contaier. + */ + igTextEditor(optionLiteral: 'option', optionName: "dropDownListOpened"): DropDownListOpenedEvent; + + /** + * Event which is raised after the drop down is opened. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.editorInput to obtain reference to the editable input + * Use ui.list to obtain reference to the list contaier. + * + * @optionValue Define event handler function. + */ + igTextEditor(optionLiteral: 'option', optionName: "dropDownListOpened", optionValue: DropDownListOpenedEvent): void; + + /** + * Event which is raised when the drop down is closing. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.editorInput to obtain reference to the editable input + * Use ui.list to obtain reference to the list contaier. + */ + igTextEditor(optionLiteral: 'option', optionName: "dropDownListClosing"): DropDownListClosingEvent; + + /** + * Event which is raised when the drop down is closing. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.editorInput to obtain reference to the editable input + * Use ui.list to obtain reference to the list contaier. + * + * @optionValue Define event handler function. + */ + igTextEditor(optionLiteral: 'option', optionName: "dropDownListClosing", optionValue: DropDownListClosingEvent): void; + + /** + * Event which is raised after the drop down is closed. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.editorInput to obtain reference to the editable input + * Use ui.list to obtain reference to the list contaier. + */ + igTextEditor(optionLiteral: 'option', optionName: "dropDownListClosed"): DropDownListClosedEvent; + + /** + * Event which is raised after the drop down is closed. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.editorInput to obtain reference to the editable input + * Use ui.list to obtain reference to the list contaier. + * + * @optionValue Define event handler function. + */ + igTextEditor(optionLiteral: 'option', optionName: "dropDownListClosed", optionValue: DropDownListClosedEvent): void; + + /** + * Event which is raised when an item in the drop down list is being selected. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.editorInput to obtain reference to the editable input + * Use ui.list to obtain reference to the list contaier. + * Use ui.item to obtain reference to the list item which is about to be selected. + */ + igTextEditor(optionLiteral: 'option', optionName: "dropDownItemSelecting"): DropDownItemSelectingEvent; + + /** + * Event which is raised when an item in the drop down list is being selected. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.editorInput to obtain reference to the editable input + * Use ui.list to obtain reference to the list contaier. + * Use ui.item to obtain reference to the list item which is about to be selected. + * + * @optionValue Define event handler function. + */ + igTextEditor(optionLiteral: 'option', optionName: "dropDownItemSelecting", optionValue: DropDownItemSelectingEvent): void; + + /** + * Event which is raised after an item in the drop down list is selected. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.editorInput to obtain reference to the editable input + * Use ui.list to obtain reference to the list contaier. + * Use ui.item to obtain reference to the list item which is selected. + */ + igTextEditor(optionLiteral: 'option', optionName: "dropDownItemSelected"): DropDownItemSelectedEvent; + + /** + * Event which is raised after an item in the drop down list is selected. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.editorInput to obtain reference to the editable input + * Use ui.list to obtain reference to the list contaier. + * Use ui.item to obtain reference to the list item which is selected. + * + * @optionValue Define event handler function. + */ + igTextEditor(optionLiteral: 'option', optionName: "dropDownItemSelected", optionValue: DropDownItemSelectedEvent): void; + + /** + * Event which is raised after text in the editor was changed. It can be raised when keyUp event occurs, + * when the clear button is clicked or when an item from a list is selected. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.text to obtain new text + * Use ui.oldText to obtain the old text. + */ + igTextEditor(optionLiteral: 'option', optionName: "textChanged"): TextChangedEvent; + + /** + * Event which is raised after text in the editor was changed. It can be raised when keyUp event occurs, + * when the clear button is clicked or when an item from a list is selected. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.text to obtain new text + * Use ui.oldText to obtain the old text. + * + * @optionValue Define event handler function. + */ + igTextEditor(optionLiteral: 'option', optionName: "textChanged", optionValue: TextChangedEvent): void; + + /** + * Event which is raised before rendering of the editor completes. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the editor performing rendering. + * Use ui.element to get a reference to the editor element. + */ + igTextEditor(optionLiteral: 'option', optionName: "rendering"): RenderingEvent; + + /** + * Event which is raised before rendering of the editor completes. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the editor performing rendering. + * Use ui.element to get a reference to the editor element. + * + * @optionValue Define event handler function. + */ + igTextEditor(optionLiteral: 'option', optionName: "rendering", optionValue: RenderingEvent): void; + + /** + * Event which is raised after rendering of the editor completes. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the editor performing rendering. + * Use ui.element to get a reference to the editor element. + */ + igTextEditor(optionLiteral: 'option', optionName: "rendered"): RenderedEvent; + + /** + * Event which is raised after rendering of the editor completes. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the editor performing rendering. + * Use ui.element to get a reference to the editor element. + * + * @optionValue Define event handler function. + */ + igTextEditor(optionLiteral: 'option', optionName: "rendered", optionValue: RenderedEvent): void; + + /** + * Event which is raised on mousedown event. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.element to obtain a reference to the event target. + * Use ui.editorInput to get a reference to the editor field. + */ + igTextEditor(optionLiteral: 'option', optionName: "mousedown"): MousedownEvent; + + /** + * Event which is raised on mousedown event. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.element to obtain a reference to the event target. + * Use ui.editorInput to get a reference to the editor field. + * + * @optionValue Define event handler function. + */ + igTextEditor(optionLiteral: 'option', optionName: "mousedown", optionValue: MousedownEvent): void; + + /** + * Event which is raised on mouseup event. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.element to obtain a reference to the event target. + * Use ui.editorInput to get a reference to the editor field. + */ + igTextEditor(optionLiteral: 'option', optionName: "mouseup"): MouseupEvent; + + /** + * Event which is raised on mouseup event. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.element to obtain a reference to the event target. + * Use ui.editorInput to get a reference to the editor field. + * + * @optionValue Define event handler function. + */ + igTextEditor(optionLiteral: 'option', optionName: "mouseup", optionValue: MouseupEvent): void; + + /** + * Event which is raised on mousemove at any part of editor including drop-down list. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.element to obtain a reference to the event target. + * Use ui.editorInput to get a reference to the editor field. + */ + igTextEditor(optionLiteral: 'option', optionName: "mousemove"): MousemoveEvent; + + /** + * Event which is raised on mousemove at any part of editor including drop-down list. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.element to obtain a reference to the event target. + * Use ui.editorInput to get a reference to the editor field. + * + * @optionValue Define event handler function. + */ + igTextEditor(optionLiteral: 'option', optionName: "mousemove", optionValue: MousemoveEvent): void; + + /** + * Event which is raised on mouseover at any part of editor including drop-down list. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.element to obtain a reference to the event target. + * Use ui.editorInput to get a reference to the editor field. + */ + igTextEditor(optionLiteral: 'option', optionName: "mouseover"): MouseoverEvent; + + /** + * Event which is raised on mouseover at any part of editor including drop-down list. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.element to obtain a reference to the event target. + * Use ui.editorInput to get a reference to the editor field. + * + * @optionValue Define event handler function. + */ + igTextEditor(optionLiteral: 'option', optionName: "mouseover", optionValue: MouseoverEvent): void; + + /** + * Event which is raised on mouseleave at any part of editor including drop-down list. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.element to obtain a reference to the event target. + * Use ui.editorInput to get a reference to the editor field. + */ + igTextEditor(optionLiteral: 'option', optionName: "mouseout"): MouseoutEvent; + + /** + * Event which is raised on mouseleave at any part of editor including drop-down list. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.element to obtain a reference to the event target. + * Use ui.editorInput to get a reference to the editor field. + * + * @optionValue Define event handler function. + */ + igTextEditor(optionLiteral: 'option', optionName: "mouseout", optionValue: MouseoutEvent): void; + + /** + * Event which is raised when input field of editor loses focus. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.element to obtain a reference to the event target. + * Use ui.editorInput to get a reference to the editor field. + */ + igTextEditor(optionLiteral: 'option', optionName: "blur"): BlurEvent; + + /** + * Event which is raised when input field of editor loses focus. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.element to obtain a reference to the event target. + * Use ui.editorInput to get a reference to the editor field. + * + * @optionValue Define event handler function. + */ + igTextEditor(optionLiteral: 'option', optionName: "blur", optionValue: BlurEvent): void; + + /** + * Event which is raised when input field of editor gets focus. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.element to obtain a reference to the event target. + * Use ui.editorInput to get a reference to the editor field. + */ + igTextEditor(optionLiteral: 'option', optionName: "focus"): FocusEvent; + + /** + * Event which is raised when input field of editor gets focus. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.element to obtain a reference to the event target. + * Use ui.editorInput to get a reference to the editor field. + * + * @optionValue Define event handler function. + */ + igTextEditor(optionLiteral: 'option', optionName: "focus", optionValue: FocusEvent): void; + + /** + * Event which is raised on keydown event. + * Return false in order to cancel key action. + * Function takes arguments evt and ui. + * Use evt.originalEvent to obtain reference to event of browser. + * Use ui.owner to obtain reference to igEditor. + * Use ui.key to obtain value of keyCode. + */ + igTextEditor(optionLiteral: 'option', optionName: "keydown"): KeydownEvent; + + /** + * Event which is raised on keydown event. + * Return false in order to cancel key action. + * Function takes arguments evt and ui. + * Use evt.originalEvent to obtain reference to event of browser. + * Use ui.owner to obtain reference to igEditor. + * Use ui.key to obtain value of keyCode. + * + * @optionValue Define event handler function. + */ + igTextEditor(optionLiteral: 'option', optionName: "keydown", optionValue: KeydownEvent): void; + + /** + * Event which is raised on keypress event. + * Return false in order to cancel key action. + * Function takes arguments evt and ui. + * Use evt.originalEvent to obtain reference to event of browser. + * Use ui.owner to obtain reference to igEditor. + * Use ui.key to obtain value of keyCode. + */ + igTextEditor(optionLiteral: 'option', optionName: "keypress"): KeypressEvent; + + /** + * Event which is raised on keypress event. + * Return false in order to cancel key action. + * Function takes arguments evt and ui. + * Use evt.originalEvent to obtain reference to event of browser. + * Use ui.owner to obtain reference to igEditor. + * Use ui.key to obtain value of keyCode. + * + * @optionValue Define event handler function. + */ + igTextEditor(optionLiteral: 'option', optionName: "keypress", optionValue: KeypressEvent): void; + + /** + * Event which is raised on keyup event. + * Function takes arguments evt and ui. + * Use evt.originalEvent to obtain reference to event of browser. + * Use ui.owner to obtain reference to igEditor. + * Use ui.key to obtain value of keyCode. + */ + igTextEditor(optionLiteral: 'option', optionName: "keyup"): KeyupEvent; + + /** + * Event which is raised on keyup event. + * Function takes arguments evt and ui. + * Use evt.originalEvent to obtain reference to event of browser. + * Use ui.owner to obtain reference to igEditor. + * Use ui.key to obtain value of keyCode. + * + * @optionValue Define event handler function. + */ + igTextEditor(optionLiteral: 'option', optionName: "keyup", optionValue: KeyupEvent): void; + + /** + * Event which is raised before the editor value is changed. + * Return false in order to cancel change. + * It can be raised after loosing focus or on spin events. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.newValue to obtain the new value. + * Use ui.oldValue to obtain the old value. + * Use ui.editorInput to obtain reference to the editor input. + */ + igTextEditor(optionLiteral: 'option', optionName: "valueChanging"): ValueChangingEvent; + + /** + * Event which is raised before the editor value is changed. + * Return false in order to cancel change. + * It can be raised after loosing focus or on spin events. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.newValue to obtain the new value. + * Use ui.oldValue to obtain the old value. + * Use ui.editorInput to obtain reference to the editor input. + * + * @optionValue Define event handler function. + */ + igTextEditor(optionLiteral: 'option', optionName: "valueChanging", optionValue: ValueChangingEvent): void; + + /** + * Event which is raised after the editor value is changed. It can be raised after loosing focus or on spin events. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.newValue to obtain the new value. + * Use ui.originalValue to obtain the original value. + * Use ui.editorInput to obtain reference to the editor input. + */ + igTextEditor(optionLiteral: 'option', optionName: "valueChanged"): ValueChangedEvent; + + /** + * Event which is raised after the editor value is changed. It can be raised after loosing focus or on spin events. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.newValue to obtain the new value. + * Use ui.originalValue to obtain the original value. + * Use ui.editorInput to obtain reference to the editor input. + * + * @optionValue Define event handler function. + */ + igTextEditor(optionLiteral: 'option', optionName: "valueChanged", optionValue: ValueChangedEvent): void; + igTextEditor(options: IgTextEditor): JQuery; + igTextEditor(optionLiteral: 'option', optionName: string): any; + igTextEditor(optionLiteral: 'option', options: IgTextEditor): JQuery; + igTextEditor(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igTextEditor(methodName: string, ...methodParams: any[]): any; +} +interface JQuery { + igNumericEditor(methodName: "value", newValue?: number): number; + igNumericEditor(methodName: "findListItemIndex", number: number): number; + igNumericEditor(methodName: "getSelectedText"): void; + igNumericEditor(methodName: "getSelectionStart"): void; + igNumericEditor(methodName: "getSelectionEnd"): void; + igNumericEditor(methodName: "spinUp", delta?: number): void; + igNumericEditor(methodName: "spinDown", delta?: number): void; + igNumericEditor(methodName: "selectListIndexUp"): void; + igNumericEditor(methodName: "selectListIndexDown"): void; + igNumericEditor(methodName: "getRegionalOption"): string; + igNumericEditor(methodName: "displayValue"): string; + igNumericEditor(methodName: "dropDownContainer"): string; + igNumericEditor(methodName: "showDropDown"): void; + igNumericEditor(methodName: "hideDropDown"): void; + igNumericEditor(methodName: "dropDownButton"): string; + igNumericEditor(methodName: "dropDownVisible"): boolean; + igNumericEditor(methodName: "clearButton"): string; + igNumericEditor(methodName: "selectedListIndex", index?: number): number; + igNumericEditor(methodName: "getSelectedListItem"): string; + igNumericEditor(methodName: "insert", string: string): void; + igNumericEditor(methodName: "select", start: number, end: number): void; + igNumericEditor(methodName: "spinUpButton"): string; + igNumericEditor(methodName: "spinDownButton"): string; + + /** + * Gets/Sets list of items which are used as a source for the drop-down list. + * Items in the list can be of type string, number or object. The items are directly rendered without any casting, or manipulation. + * + */ + igNumericEditor(optionLiteral: 'option', optionName: "listItems"): any[]; + + /** + * /Sets list of items which are used as a source for the drop-down list. + * Items in the list can be of type string, number or object. The items are directly rendered without any casting, or manipulation. + * + * + * @optionValue New value to be set. + */ + igNumericEditor(optionLiteral: 'option', optionName: "listItems", optionValue: any[]): void; + + /** + * Gets/Sets custom regional settings for editor. If it is string, then $.ig.regional[stringValue] is assumed. + * + */ + igNumericEditor(optionLiteral: 'option', optionName: "regional"): any; + + /** + * /Sets custom regional settings for editor. If it is string, then $.ig.regional[stringValue] is assumed. + * + * + * @optionValue New value to be set. + */ + igNumericEditor(optionLiteral: 'option', optionName: "regional", optionValue: any): void; + + /** + * Gets/Sets the character, which is used as negative sign. + * Note: This option has priority over possible regional settings. + * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * + */ + igNumericEditor(optionLiteral: 'option', optionName: "negativeSign"): string; + + /** + * /Sets the character, which is used as negative sign. + * Note: This option has priority over possible regional settings. + * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * + * + * @optionValue New value to be set. + */ + igNumericEditor(optionLiteral: 'option', optionName: "negativeSign", optionValue: string): void; + + /** + * Gets/Sets the string, which is used as negative pattern. The "n" flag represents the value of number. The "-" and "()" flags are static part of pattern. + * Note: This option has priority over possible regional settings. + * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * + */ + igNumericEditor(optionLiteral: 'option', optionName: "negativePattern"): string; + + /** + * /Sets the string, which is used as negative pattern. The "n" flag represents the value of number. The "-" and "()" flags are static part of pattern. + * Note: This option has priority over possible regional settings. + * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * + * + * @optionValue New value to be set. + */ + igNumericEditor(optionLiteral: 'option', optionName: "negativePattern", optionValue: string): void; + + /** + * Gets/Sets the character, which is used as decimal separator. + * Note: this option has priority over possible regional settings. + * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * + */ + igNumericEditor(optionLiteral: 'option', optionName: "decimalSeparator"): string; + + /** + * /Sets the character, which is used as decimal separator. + * Note: this option has priority over possible regional settings. + * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * + * + * @optionValue New value to be set. + */ + igNumericEditor(optionLiteral: 'option', optionName: "decimalSeparator", optionValue: string): void; + + /** + * Gets/Sets the character, which is used as separator for groups (like thousands). + * That option has effect only in display mode(no focus). + * Note: this option has priority over possible regional settings. + * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * + */ + igNumericEditor(optionLiteral: 'option', optionName: "groupSeparator"): string; + + /** + * /Sets the character, which is used as separator for groups (like thousands). + * That option has effect only in display mode(no focus). + * Note: this option has priority over possible regional settings. + * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * + * + * @optionValue New value to be set. + */ + igNumericEditor(optionLiteral: 'option', optionName: "groupSeparator", optionValue: string): void; + + /** + * (array of number objects) Gets/Sets the number of digits in the integer part of a number, which are divided into groups. + * The "groupSeparator" is inserted between groups. + * If the sum of all values in array is smaller than the length of integer part, then the last item in array is used for all following groups. + * Count of groups starts from the decimal point (from right to left). + * That option has effect only in display mode(no focus). + * Note: this option has priority over possible regional settings. + * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * + */ + igNumericEditor(optionLiteral: 'option', optionName: "groups"): any[]; + + /** + * (array of number objects) /Sets the number of digits in the integer part of a number, which are divided into groups. + * The "groupSeparator" is inserted between groups. + * If the sum of all values in array is smaller than the length of integer part, then the last item in array is used for all following groups. + * Count of groups starts from the decimal point (from right to left). + * That option has effect only in display mode(no focus). + * Note: this option has priority over possible regional settings. + * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * + * + * @optionValue New value to be set. + */ + igNumericEditor(optionLiteral: 'option', optionName: "groups", optionValue: any[]): void; + + /** + * Gets/Sets the maximum number of decimal places which are used in display mode(no focus). + * Note: this option has priority over possible regional settings. + * Note: In case of min decimals value higher than max decimals - max decimals are equaled to min decimals property. + * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * + */ + igNumericEditor(optionLiteral: 'option', optionName: "maxDecimals"): number; + + /** + * /Sets the maximum number of decimal places which are used in display mode(no focus). + * Note: this option has priority over possible regional settings. + * Note: In case of min decimals value higher than max decimals - max decimals are equaled to min decimals property. + * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * + * + * @optionValue New value to be set. + */ + igNumericEditor(optionLiteral: 'option', optionName: "maxDecimals", optionValue: number): void; + + /** + * Gets/Sets the minimum number of decimal places which are used in display (no focus) state. + * If number of digits in fractional part of number is less than the value of this option, then the "0" characters are used to fill missing digits. + * Note: This option has priority over possible regional settings. + * Note: In case of min decimals value higher than max decimals - max decimals are equaled to min decimals property. + * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * Note: This option supports values below or equal to 20. + * + */ + igNumericEditor(optionLiteral: 'option', optionName: "minDecimals"): number; + + /** + * /Sets the minimum number of decimal places which are used in display (no focus) state. + * If number of digits in fractional part of number is less than the value of this option, then the "0" characters are used to fill missing digits. + * Note: This option has priority over possible regional settings. + * Note: In case of min decimals value higher than max decimals - max decimals are equaled to min decimals property. + * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * Note: This option supports values below or equal to 20. + * + * + * @optionValue New value to be set. + */ + igNumericEditor(optionLiteral: 'option', optionName: "minDecimals", optionValue: number): void; + + /** + * Gets/Sets the horizontal alignment of the text in the editor. + * + */ + igNumericEditor(optionLiteral: 'option', optionName: "textAlign"): string; + + /** + * /Sets the horizontal alignment of the text in the editor. + * + * + * @optionValue New value to be set. + */ + igNumericEditor(optionLiteral: 'option', optionName: "textAlign", optionValue: string): void; + + /** + * Defines the range that editor's value can accept.This is achieved by setting the [minValue](ui.igNumericEditor#options:minValue) and [maxValue](ui.igNumericEditor#options:maxValue) editor's options, accordingly to the lowest and highest accepted values for the defined numeric mode. + * The range for the specific type follows the numeric type standards, e.g. in .NET Framework [floating-point](https://msdn.microsoft.com/en-us/library/9ahet949.aspx) types and [integral types](https://msdn.microsoft.com/en-us/library/exx3b86w.aspx). + * In addition, the maximum value that can be set to [minDecimals](ui.igNumericEditor#options:minDecimals) and [maxDecimals](ui.igNumericEditor#options:maxDecimals) options can be 15, when editor is in 'double' mode and 7, when in 'float' mode. + * + * + */ + igNumericEditor(optionLiteral: 'option', optionName: "dataMode"): string; + + /** + * Defines the range that editor's value can accept.This is achieved by setting the [minValue](ui.igNumericEditor#options:minValue) and [maxValue](ui.igNumericEditor#options:maxValue) editor's options, accordingly to the lowest and highest accepted values for the defined numeric mode. + * The range for the specific type follows the numeric type standards, e.g. in .NET Framework [floating-point](https://msdn.microsoft.com/en-us/library/9ahet949.aspx) types and [integral types](https://msdn.microsoft.com/en-us/library/exx3b86w.aspx). + * In addition, the maximum value that can be set to [minDecimals](ui.igNumericEditor#options:minDecimals) and [maxDecimals](ui.igNumericEditor#options:maxDecimals) options can be 15, when editor is in 'double' mode and 7, when in 'float' mode. + * + * + * + * @optionValue New value to be set. + */ + igNumericEditor(optionLiteral: 'option', optionName: "dataMode", optionValue: string): void; + + /** + * Gets/Sets the minimum value which can be entered in the editor by the end user. + * + */ + igNumericEditor(optionLiteral: 'option', optionName: "minValue"): number; + + /** + * /Sets the minimum value which can be entered in the editor by the end user. + * + * + * @optionValue New value to be set. + */ + igNumericEditor(optionLiteral: 'option', optionName: "minValue", optionValue: number): void; + + /** + * Gets/Sets the maximum value which can be entered in the editor by the end user. + * + */ + igNumericEditor(optionLiteral: 'option', optionName: "maxValue"): number; + + /** + * /Sets the maximum value which can be entered in the editor by the end user. + * + * + * @optionValue New value to be set. + */ + igNumericEditor(optionLiteral: 'option', optionName: "maxValue", optionValue: number): void; + + /** + * Gets/Sets whether the editor value can become null. + * If that option is disabled, and editor has no value, then value is set to 0 (or minValue/maxValue). + * + */ + igNumericEditor(optionLiteral: 'option', optionName: "allowNullValue"): boolean; + + /** + * /Sets whether the editor value can become null. + * If that option is disabled, and editor has no value, then value is set to 0 (or minValue/maxValue). + * + * + * @optionValue New value to be set. + */ + igNumericEditor(optionLiteral: 'option', optionName: "allowNullValue", optionValue: boolean): void; + + /** + * Gets/Sets the default delta-value which is used with "spin" [buttonType](ui.igNumericEditor#options:buttonType) or [spinUp](ui.igNumericEditor#methods:spinUp) and [spinDown](ui.igNumericEditor#methods:spinDown) methods to increment or decrement value in the editor. The value can not be negative. Non integer value is supported only for dataMode double and float. + * + */ + igNumericEditor(optionLiteral: 'option', optionName: "spinDelta"): number; + + /** + * /Sets the default delta-value which is used with "spin" [buttonType](ui.igNumericEditor#options:buttonType) or [spinUp](ui.igNumericEditor#methods:spinUp) and [spinDown](ui.igNumericEditor#methods:spinDown) methods to increment or decrement value in the editor. The value can not be negative. Non integer value is supported only for dataMode double and float. + * + * + * @optionValue New value to be set. + */ + igNumericEditor(optionLiteral: 'option', optionName: "spinDelta", optionValue: number): void; + + /** + * Gets/Sets support for scientific format in edit mode. + * If that option is set, then numeric value appears as a string with possible E-power flag. In edit mode the "E" or "e" character can be entered as well. + * Notes: The "+" character is not supported in edit mode. + * + * + */ + igNumericEditor(optionLiteral: 'option', optionName: "scientificFormat"): string; + + /** + * /Sets support for scientific format in edit mode. + * If that option is set, then numeric value appears as a string with possible E-power flag. In edit mode the "E" or "e" character can be entered as well. + * Notes: The "+" character is not supported in edit mode. + * + * + * + * @optionValue New value to be set. + */ + igNumericEditor(optionLiteral: 'option', optionName: "scientificFormat", optionValue: string): void; + + /** + * Gets/Set the ability of the editor to automatically set value in the editor to the opposite side of the limit, when the spin action reaches minimum or maximum limit. + * + */ + igNumericEditor(optionLiteral: 'option', optionName: "spinWrapAround"): boolean; + + /** + * /Set the ability of the editor to automatically set value in the editor to the opposite side of the limit, when the spin action reaches minimum or maximum limit. + * + * + * @optionValue New value to be set. + */ + igNumericEditor(optionLiteral: 'option', optionName: "spinWrapAround", optionValue: boolean): void; + + /** + * Removed from numeric editor options + */ + igNumericEditor(optionLiteral: 'option', optionName: "maxLength"): any; + + /** + * Removed from numeric editor options + * + * @optionValue New value to be set. + */ + igNumericEditor(optionLiteral: 'option', optionName: "maxLength", optionValue: any): void; + + /** + * Removed from numeric editor options + */ + igNumericEditor(optionLiteral: 'option', optionName: "excludeKeys"): any; + + /** + * Removed from numeric editor options + * + * @optionValue New value to be set. + */ + igNumericEditor(optionLiteral: 'option', optionName: "excludeKeys", optionValue: any): void; + + /** + * Removed from numeric editor options + */ + igNumericEditor(optionLiteral: 'option', optionName: "includeKeys"): any; + + /** + * Removed from numeric editor options + * + * @optionValue New value to be set. + */ + igNumericEditor(optionLiteral: 'option', optionName: "includeKeys", optionValue: any): void; + + /** + * Removed from numeric editor options + */ + igNumericEditor(optionLiteral: 'option', optionName: "toLower"): any; + + /** + * Removed from numeric editor options + * + * @optionValue New value to be set. + */ + igNumericEditor(optionLiteral: 'option', optionName: "toLower", optionValue: any): void; + + /** + * Removed from numeric editor options + */ + igNumericEditor(optionLiteral: 'option', optionName: "toUpper"): any; + + /** + * Removed from numeric editor options + * + * @optionValue New value to be set. + */ + igNumericEditor(optionLiteral: 'option', optionName: "toUpper", optionValue: any): void; + + /** + */ + igNumericEditor(optionLiteral: 'option', optionName: "textMode"): any; + + /** + */ + igNumericEditor(optionLiteral: 'option', optionName: "textMode", optionValue: any): void; + + /** + * Gets/Sets value in editor. The effect of setting/getting that option depends on type of editor and on dataMode options for every type of editor. + * + * + */ + igNumericEditor(optionLiteral: 'option', optionName: "value"): any; + + /** + * /Sets value in editor. The effect of setting/getting that option depends on type of editor and on dataMode options for every type of editor. + * + * + * + * @optionValue New value to be set. + */ + igNumericEditor(optionLiteral: 'option', optionName: "value", optionValue: any): void; + + /** + * Gets visibility of the spin, clear and drop-down button. That option can be set only on initialization. Combinations like 'dropdown,spin' or 'spin,clear' are supported too.Note! This option can not be set runtime. + * + * + */ + igNumericEditor(optionLiteral: 'option', optionName: "buttonType"): string; + + /** + * Visibility of the spin, clear and drop-down button. That option can be set only on initialization. Combinations like 'dropdown,spin' or 'spin,clear' are supported too.Note! This option can not be set runtime. + * + * + * + * @optionValue New value to be set. + */ + igNumericEditor(optionLiteral: 'option', optionName: "buttonType", optionValue: string): void; + + /** + * Gets/Sets custom width of the drop-down list in pixels. If the value is equal to 0 or negative, then the width of editor is set as a drop-down width. + * + */ + igNumericEditor(optionLiteral: 'option', optionName: "listWidth"): number; + + /** + * /Sets custom width of the drop-down list in pixels. If the value is equal to 0 or negative, then the width of editor is set as a drop-down width. + * + * + * @optionValue New value to be set. + */ + igNumericEditor(optionLiteral: 'option', optionName: "listWidth", optionValue: number): void; + + /** + * Gets/Sets the hover/unhover animation duration of a drop-down list item. + * + */ + igNumericEditor(optionLiteral: 'option', optionName: "listItemHoverDuration"): number; + + /** + * /Sets the hover/unhover animation duration of a drop-down list item. + * + * + * @optionValue New value to be set. + */ + igNumericEditor(optionLiteral: 'option', optionName: "listItemHoverDuration", optionValue: number): void; + + /** + * Gets wheather the drop-down list element is attached to the body of the document, or to the editor container element. + * If the option is set to false the editor will attach the drop-down list element to the editor container + * If the option is set to true the editor will attach its drop-down list to as a child of the body. + * Note! This option can not be set runtime. + * + */ + igNumericEditor(optionLiteral: 'option', optionName: "dropDownAttachedToBody"): boolean; + + /** + * Wheather the drop-down list element is attached to the body of the document, or to the editor container element. + * If the option is set to false the editor will attach the drop-down list element to the editor container + * If the option is set to true the editor will attach its drop-down list to as a child of the body. + * Note! This option can not be set runtime. + * + * + * @optionValue New value to be set. + */ + igNumericEditor(optionLiteral: 'option', optionName: "dropDownAttachedToBody", optionValue: boolean): void; + + /** + * Gets/Sets show/hide drop-down list animation duration in milliseconds. + * + */ + igNumericEditor(optionLiteral: 'option', optionName: "dropDownAnimationDuration"): number; + + /** + * /Sets show/hide drop-down list animation duration in milliseconds. + * + * + * @optionValue New value to be set. + */ + igNumericEditor(optionLiteral: 'option', optionName: "dropDownAnimationDuration", optionValue: number): void; + + /** + * Gets the number of the items to be shown at once when the drop-down list get opened. + * Notes: + * This option is overwritten if the number of list items is less than the set value. In that case the drop-down list displays all the items. + * This option can not be set runtime. + * + */ + igNumericEditor(optionLiteral: 'option', optionName: "visibleItemsCount"): number; + + /** + * The number of the items to be shown at once when the drop-down list get opened. + * Notes: + * This option is overwritten if the number of list items is less than the set value. In that case the drop-down list displays all the items. + * This option can not be set runtime. + * + * + * @optionValue New value to be set. + */ + igNumericEditor(optionLiteral: 'option', optionName: "visibleItemsCount", optionValue: number): void; + + /** + * Gets/Sets the text which appears in the editor when it has no focus and the "value" is null or empty string. + * + */ + igNumericEditor(optionLiteral: 'option', optionName: "placeHolder"): string; + + /** + * /Sets the text which appears in the editor when it has no focus and the "value" is null or empty string. + * + * + * @optionValue New value to be set. + */ + igNumericEditor(optionLiteral: 'option', optionName: "placeHolder", optionValue: string): void; + + /** + * Gets/Sets the action when the editor gets focused. The default value is selectAll. + * + */ + igNumericEditor(optionLiteral: 'option', optionName: "selectionOnFocus"): string; + + /** + * /Sets the action when the editor gets focused. The default value is selectAll. + * + * + * @optionValue New value to be set. + */ + igNumericEditor(optionLiteral: 'option', optionName: "selectionOnFocus", optionValue: string): void; + + /** + * Gets/Sets if the editor should only allow values set into the list of items. This validation is done only when the editor is blured, or enter key is pressed + * + */ + igNumericEditor(optionLiteral: 'option', optionName: "isLimitedToListValues"): boolean; + + /** + * /Sets if the editor should only allow values set into the list of items. This validation is done only when the editor is blured, or enter key is pressed + * + * + * @optionValue New value to be set. + */ + igNumericEditor(optionLiteral: 'option', optionName: "isLimitedToListValues", optionValue: boolean): void; + + /** + * Gets/Sets if the editor should revert it's value to the previously valid value in case the value on blur, or enter key is not valid. If the opiton is set to false, editor calls clear functionality. + * + */ + igNumericEditor(optionLiteral: 'option', optionName: "revertIfNotValid"): boolean; + + /** + * /Sets if the editor should revert it's value to the previously valid value in case the value on blur, or enter key is not valid. If the opiton is set to false, editor calls clear functionality. + * + * + * @optionValue New value to be set. + */ + igNumericEditor(optionLiteral: 'option', optionName: "revertIfNotValid", optionValue: boolean): void; + + /** + * Gets/Sets if the editor should prevent form submition when enter key is pressed. + * + */ + igNumericEditor(optionLiteral: 'option', optionName: "preventSubmitOnEnter"): boolean; + + /** + * /Sets if the editor should prevent form submition when enter key is pressed. + * + * + * @optionValue New value to be set. + */ + igNumericEditor(optionLiteral: 'option', optionName: "preventSubmitOnEnter", optionValue: boolean): void; + + /** + * Gets/Sets the drop-down list opening orientation when the list gets open. If the option is set to auto the editor has priority to open the drop-down list bottom. If the space is not enough it tries to open the list top. If the space is not enough in both directions then the list gets opened at the bottom of the editor. + * + */ + igNumericEditor(optionLiteral: 'option', optionName: "dropDownOrientation"): string; + + /** + * /Sets the drop-down list opening orientation when the list gets open. If the option is set to auto the editor has priority to open the drop-down list bottom. If the space is not enough it tries to open the list top. If the space is not enough in both directions then the list gets opened at the bottom of the editor. + * + * + * @optionValue New value to be set. + */ + igNumericEditor(optionLiteral: 'option', optionName: "dropDownOrientation", optionValue: string): void; + + /** + * Gets the ability to limit the editor to be used only as a dropdown list. When set to true the editor input is not editable. + * Note! In case there are no list items - the editor will reamin readonly + * Note! This option can not be set runtime. + * + */ + igNumericEditor(optionLiteral: 'option', optionName: "dropDownOnReadOnly"): boolean; + + /** + * The ability to limit the editor to be used only as a dropdown list. When set to true the editor input is not editable. + * Note! In case there are no list items - the editor will reamin readonly + * Note! This option can not be set runtime. + * + * + * @optionValue New value to be set. + */ + igNumericEditor(optionLiteral: 'option', optionName: "dropDownOnReadOnly", optionValue: boolean): void; + + /** + * Gets/Sets the strings used for the localization of the component. This includes button titles, error messages etc. Value of the object should contain pairs or key:value members. Note: any sub-option of locale can appear within the main option of igEditor. In this case those values within main options will have highest priority and override corresponding value in locale. + * + */ + igNumericEditor(optionLiteral: 'option', optionName: "locale"): any; + + /** + * /Sets the strings used for the localization of the component. This includes button titles, error messages etc. Value of the object should contain pairs or key:value members. Note: any sub-option of locale can appear within the main option of igEditor. In this case those values within main options will have highest priority and override corresponding value in locale. + * + * + * @optionValue New value to be set. + */ + igNumericEditor(optionLiteral: 'option', optionName: "locale", optionValue: any): void; + + /** + * Disables/Enables default notifications for basic validation scenarios built in the editors such as required list selection, value wrapping around or spin limits. + * + */ + igNumericEditor(optionLiteral: 'option', optionName: "suppressNotifications"): boolean; + + /** + * Disables/Enables default notifications for basic validation scenarios built in the editors such as required list selection, value wrapping around or spin limits. + * + * + * @optionValue New value to be set. + */ + igNumericEditor(optionLiteral: 'option', optionName: "suppressNotifications", optionValue: boolean): void; + + /** + * Gets/Sets the width of the control. + * + */ + igNumericEditor(optionLiteral: 'option', optionName: "width"): string|number; + + /** + * /Sets the width of the control. + * + * + * @optionValue New value to be set. + */ + igNumericEditor(optionLiteral: 'option', optionName: "width", optionValue: string|number): void; + + /** + * Gets/Sets the height of the control. + * + */ + igNumericEditor(optionLiteral: 'option', optionName: "height"): string|number; + + /** + * /Sets the height of the control. + * + * + * @optionValue New value to be set. + */ + igNumericEditor(optionLiteral: 'option', optionName: "height", optionValue: string|number): void; + + /** + * Gets/Sets tabIndex attribute for the editor input. + * + */ + igNumericEditor(optionLiteral: 'option', optionName: "tabIndex"): number; + + /** + * /Sets tabIndex attribute for the editor input. + * + * + * @optionValue New value to be set. + */ + igNumericEditor(optionLiteral: 'option', optionName: "tabIndex", optionValue: number): void; + + /** + * Gets/Sets the representation of null value. In case of default the value for the input is set to null, which makes the input to hold an empty string + * + */ + igNumericEditor(optionLiteral: 'option', optionName: "nullValue"): string|number; + + /** + * /Sets the representation of null value. In case of default the value for the input is set to null, which makes the input to hold an empty string + * + * + * @optionValue New value to be set. + */ + igNumericEditor(optionLiteral: 'option', optionName: "nullValue", optionValue: string|number): void; + + /** + * Gets/Sets the name attribute of the value input. This input is used to sent the value to the server. In case the target element is input and it has name attribute, but the developer has set the inputName option, so this option overwrites the value input and removes the attribute from the element. + * + */ + igNumericEditor(optionLiteral: 'option', optionName: "inputName"): string; + + /** + * /Sets the name attribute of the value input. This input is used to sent the value to the server. In case the target element is input and it has name attribute, but the developer has set the inputName option, so this option overwrites the value input and removes the attribute from the element. + * + * + * @optionValue New value to be set. + */ + igNumericEditor(optionLiteral: 'option', optionName: "inputName", optionValue: string): void; + + /** + * Gets/Sets the readonly attribute for the input. If set to true the input is readonly, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is submitted. + * + */ + igNumericEditor(optionLiteral: 'option', optionName: "readOnly"): boolean; + + /** + * /Sets the readonly attribute for the input. If set to true the input is readonly, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is submitted. + * + * + * @optionValue New value to be set. + */ + igNumericEditor(optionLiteral: 'option', optionName: "readOnly", optionValue: boolean): void; + + /** + * Gets/Sets the disabled attribute for the input. If set to true the input is disabled, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is not submitted. + * + */ + igNumericEditor(optionLiteral: 'option', optionName: "disabled"): boolean; + + /** + * /Sets the disabled attribute for the input. If set to true the input is disabled, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is not submitted. + * + * + * @optionValue New value to be set. + */ + igNumericEditor(optionLiteral: 'option', optionName: "disabled", optionValue: boolean): void; + + /** + * Gets/Sets options supported by the [igValidator](ui.igvalidator#options) widget. + * Note: Validation rules of [igValidator](ui.igvalidator#options), such as min and max value/length are applied separately triggering errors, + * while the corresponding options of the editor prevent values violating the defined rules from being entered. + * + */ + igNumericEditor(optionLiteral: 'option', optionName: "validatorOptions"): any; + + /** + * /Sets options supported by the [igValidator](ui.igvalidator#options) widget. + * Note: Validation rules of [igValidator](ui.igvalidator#options), such as min and max value/length are applied separately triggering errors, + * while the corresponding options of the editor prevent values violating the defined rules from being entered. + * + * + * @optionValue New value to be set. + */ + igNumericEditor(optionLiteral: 'option', optionName: "validatorOptions", optionValue: any): void; + + /** + * Event which is raised when the drop down is opening. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.editorInput to obtain reference to the editable input + * Use ui.list to obtain reference to the list contaier. + */ + igNumericEditor(optionLiteral: 'option', optionName: "dropDownListOpening"): DropDownListOpeningEvent; + + /** + * Event which is raised when the drop down is opening. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.editorInput to obtain reference to the editable input + * Use ui.list to obtain reference to the list contaier. + * + * @optionValue Define event handler function. + */ + igNumericEditor(optionLiteral: 'option', optionName: "dropDownListOpening", optionValue: DropDownListOpeningEvent): void; + + /** + * Event which is raised after the drop down is opened. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.editorInput to obtain reference to the editable input + * Use ui.list to obtain reference to the list contaier. + */ + igNumericEditor(optionLiteral: 'option', optionName: "dropDownListOpened"): DropDownListOpenedEvent; + + /** + * Event which is raised after the drop down is opened. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.editorInput to obtain reference to the editable input + * Use ui.list to obtain reference to the list contaier. + * + * @optionValue Define event handler function. + */ + igNumericEditor(optionLiteral: 'option', optionName: "dropDownListOpened", optionValue: DropDownListOpenedEvent): void; + + /** + * Event which is raised when the drop down is closing. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.editorInput to obtain reference to the editable input + * Use ui.list to obtain reference to the list contaier. + */ + igNumericEditor(optionLiteral: 'option', optionName: "dropDownListClosing"): DropDownListClosingEvent; + + /** + * Event which is raised when the drop down is closing. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.editorInput to obtain reference to the editable input + * Use ui.list to obtain reference to the list contaier. + * + * @optionValue Define event handler function. + */ + igNumericEditor(optionLiteral: 'option', optionName: "dropDownListClosing", optionValue: DropDownListClosingEvent): void; + + /** + * Event which is raised after the drop down is closed. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.editorInput to obtain reference to the editable input + * Use ui.list to obtain reference to the list contaier. + */ + igNumericEditor(optionLiteral: 'option', optionName: "dropDownListClosed"): DropDownListClosedEvent; + + /** + * Event which is raised after the drop down is closed. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.editorInput to obtain reference to the editable input + * Use ui.list to obtain reference to the list contaier. + * + * @optionValue Define event handler function. + */ + igNumericEditor(optionLiteral: 'option', optionName: "dropDownListClosed", optionValue: DropDownListClosedEvent): void; + + /** + * Event which is raised when an item in the drop down list is being selected. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.editorInput to obtain reference to the editable input + * Use ui.list to obtain reference to the list contaier. + * Use ui.item to obtain reference to the list item which is about to be selected. + */ + igNumericEditor(optionLiteral: 'option', optionName: "dropDownItemSelecting"): DropDownItemSelectingEvent; + + /** + * Event which is raised when an item in the drop down list is being selected. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.editorInput to obtain reference to the editable input + * Use ui.list to obtain reference to the list contaier. + * Use ui.item to obtain reference to the list item which is about to be selected. + * + * @optionValue Define event handler function. + */ + igNumericEditor(optionLiteral: 'option', optionName: "dropDownItemSelecting", optionValue: DropDownItemSelectingEvent): void; + + /** + * Event which is raised after an item in the drop down list is selected. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.editorInput to obtain reference to the editable input + * Use ui.list to obtain reference to the list contaier. + * Use ui.item to obtain reference to the list item which is selected. + */ + igNumericEditor(optionLiteral: 'option', optionName: "dropDownItemSelected"): DropDownItemSelectedEvent; + + /** + * Event which is raised after an item in the drop down list is selected. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.editorInput to obtain reference to the editable input + * Use ui.list to obtain reference to the list contaier. + * Use ui.item to obtain reference to the list item which is selected. + * + * @optionValue Define event handler function. + */ + igNumericEditor(optionLiteral: 'option', optionName: "dropDownItemSelected", optionValue: DropDownItemSelectedEvent): void; + + /** + * Event which is raised after text in the editor was changed. It can be raised when keyUp event occurs, + * when the clear button is clicked or when an item from a list is selected. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.text to obtain new text + * Use ui.oldText to obtain the old text. + */ + igNumericEditor(optionLiteral: 'option', optionName: "textChanged"): TextChangedEvent; + + /** + * Event which is raised after text in the editor was changed. It can be raised when keyUp event occurs, + * when the clear button is clicked or when an item from a list is selected. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.text to obtain new text + * Use ui.oldText to obtain the old text. + * + * @optionValue Define event handler function. + */ + igNumericEditor(optionLiteral: 'option', optionName: "textChanged", optionValue: TextChangedEvent): void; + igNumericEditor(options: IgNumericEditor): JQuery; + igNumericEditor(optionLiteral: 'option', optionName: string): any; + igNumericEditor(optionLiteral: 'option', options: IgNumericEditor): JQuery; + igNumericEditor(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igNumericEditor(methodName: string, ...methodParams: any[]): any; +} +interface JQuery { + igCurrencyEditor(methodName: "currencySymbol", symbol?: Object): string; + igCurrencyEditor(methodName: "value", newValue?: number): number; + igCurrencyEditor(methodName: "findListItemIndex", number: number): number; + igCurrencyEditor(methodName: "getSelectedText"): void; + igCurrencyEditor(methodName: "getSelectionStart"): void; + igCurrencyEditor(methodName: "getSelectionEnd"): void; + igCurrencyEditor(methodName: "spinUp", delta?: number): void; + igCurrencyEditor(methodName: "spinDown", delta?: number): void; + igCurrencyEditor(methodName: "selectListIndexUp"): void; + igCurrencyEditor(methodName: "selectListIndexDown"): void; + igCurrencyEditor(methodName: "getRegionalOption"): string; + + /** + * Gets/Sets the string, which is used as positive pattern. The "n" flag represents the value of number. + * Note: This option has priority over possible regional settings. + * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "positivePattern"): string; + + /** + * /Sets the string, which is used as positive pattern. The "n" flag represents the value of number. + * Note: This option has priority over possible regional settings. + * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * + * + * @optionValue New value to be set. + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "positivePattern", optionValue: string): void; + + /** + * Gets/Sets a string that is used as the currency symbol that is shown in display mode. + * + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "currencySymbol"): string; + + /** + * /Sets a string that is used as the currency symbol that is shown in display mode. + * + * + * @optionValue New value to be set. + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "currencySymbol", optionValue: string): void; + + /** + * Gets/Sets list of items which are used as a source for the drop-down list. + * Items in the list can be of type string, number or object. The items are directly rendered without any casting, or manipulation. + * + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "listItems"): any[]; + + /** + * /Sets list of items which are used as a source for the drop-down list. + * Items in the list can be of type string, number or object. The items are directly rendered without any casting, or manipulation. + * + * + * @optionValue New value to be set. + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "listItems", optionValue: any[]): void; + + /** + * Gets/Sets custom regional settings for editor. If it is string, then $.ig.regional[stringValue] is assumed. + * + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "regional"): any; + + /** + * /Sets custom regional settings for editor. If it is string, then $.ig.regional[stringValue] is assumed. + * + * + * @optionValue New value to be set. + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "regional", optionValue: any): void; + + /** + * Gets/Sets the character, which is used as negative sign. + * Note: This option has priority over possible regional settings. + * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "negativeSign"): string; + + /** + * /Sets the character, which is used as negative sign. + * Note: This option has priority over possible regional settings. + * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * + * + * @optionValue New value to be set. + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "negativeSign", optionValue: string): void; + + /** + * Gets/Sets the string, which is used as negative pattern. The "n" flag represents the value of number. The "-" and "()" flags are static part of pattern. + * Note: This option has priority over possible regional settings. + * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "negativePattern"): string; + + /** + * /Sets the string, which is used as negative pattern. The "n" flag represents the value of number. The "-" and "()" flags are static part of pattern. + * Note: This option has priority over possible regional settings. + * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * + * + * @optionValue New value to be set. + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "negativePattern", optionValue: string): void; + + /** + * Gets/Sets the character, which is used as decimal separator. + * Note: this option has priority over possible regional settings. + * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "decimalSeparator"): string; + + /** + * /Sets the character, which is used as decimal separator. + * Note: this option has priority over possible regional settings. + * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * + * + * @optionValue New value to be set. + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "decimalSeparator", optionValue: string): void; + + /** + * Gets/Sets the character, which is used as separator for groups (like thousands). + * That option has effect only in display mode(no focus). + * Note: this option has priority over possible regional settings. + * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "groupSeparator"): string; + + /** + * /Sets the character, which is used as separator for groups (like thousands). + * That option has effect only in display mode(no focus). + * Note: this option has priority over possible regional settings. + * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * + * + * @optionValue New value to be set. + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "groupSeparator", optionValue: string): void; + + /** + * (array of number objects) Gets/Sets the number of digits in the integer part of a number, which are divided into groups. + * The "groupSeparator" is inserted between groups. + * If the sum of all values in array is smaller than the length of integer part, then the last item in array is used for all following groups. + * Count of groups starts from the decimal point (from right to left). + * That option has effect only in display mode(no focus). + * Note: this option has priority over possible regional settings. + * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "groups"): any[]; + + /** + * (array of number objects) /Sets the number of digits in the integer part of a number, which are divided into groups. + * The "groupSeparator" is inserted between groups. + * If the sum of all values in array is smaller than the length of integer part, then the last item in array is used for all following groups. + * Count of groups starts from the decimal point (from right to left). + * That option has effect only in display mode(no focus). + * Note: this option has priority over possible regional settings. + * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * + * + * @optionValue New value to be set. + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "groups", optionValue: any[]): void; + + /** + * Gets/Sets the maximum number of decimal places which are used in display mode(no focus). + * Note: this option has priority over possible regional settings. + * Note: In case of min decimals value higher than max decimals - max decimals are equaled to min decimals property. + * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "maxDecimals"): number; + + /** + * /Sets the maximum number of decimal places which are used in display mode(no focus). + * Note: this option has priority over possible regional settings. + * Note: In case of min decimals value higher than max decimals - max decimals are equaled to min decimals property. + * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * + * + * @optionValue New value to be set. + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "maxDecimals", optionValue: number): void; + + /** + * Gets/Sets the minimum number of decimal places which are used in display (no focus) state. + * If number of digits in fractional part of number is less than the value of this option, then the "0" characters are used to fill missing digits. + * Note: This option has priority over possible regional settings. + * Note: In case of min decimals value higher than max decimals - max decimals are equaled to min decimals property. + * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * Note: This option supports values below or equal to 20. + * + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "minDecimals"): number; + + /** + * /Sets the minimum number of decimal places which are used in display (no focus) state. + * If number of digits in fractional part of number is less than the value of this option, then the "0" characters are used to fill missing digits. + * Note: This option has priority over possible regional settings. + * Note: In case of min decimals value higher than max decimals - max decimals are equaled to min decimals property. + * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * Note: This option supports values below or equal to 20. + * + * + * @optionValue New value to be set. + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "minDecimals", optionValue: number): void; + + /** + * Gets/Sets the horizontal alignment of the text in the editor. + * + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "textAlign"): string; + + /** + * /Sets the horizontal alignment of the text in the editor. + * + * + * @optionValue New value to be set. + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "textAlign", optionValue: string): void; + + /** + * Defines the range that editor's value can accept.This is achieved by setting the [minValue](ui.igNumericEditor#options:minValue) and [maxValue](ui.igNumericEditor#options:maxValue) editor's options, accordingly to the lowest and highest accepted values for the defined numeric mode. + * The range for the specific type follows the numeric type standards, e.g. in .NET Framework [floating-point](https://msdn.microsoft.com/en-us/library/9ahet949.aspx) types and [integral types](https://msdn.microsoft.com/en-us/library/exx3b86w.aspx). + * In addition, the maximum value that can be set to [minDecimals](ui.igNumericEditor#options:minDecimals) and [maxDecimals](ui.igNumericEditor#options:maxDecimals) options can be 15, when editor is in 'double' mode and 7, when in 'float' mode. + * + * + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "dataMode"): string; + + /** + * Defines the range that editor's value can accept.This is achieved by setting the [minValue](ui.igNumericEditor#options:minValue) and [maxValue](ui.igNumericEditor#options:maxValue) editor's options, accordingly to the lowest and highest accepted values for the defined numeric mode. + * The range for the specific type follows the numeric type standards, e.g. in .NET Framework [floating-point](https://msdn.microsoft.com/en-us/library/9ahet949.aspx) types and [integral types](https://msdn.microsoft.com/en-us/library/exx3b86w.aspx). + * In addition, the maximum value that can be set to [minDecimals](ui.igNumericEditor#options:minDecimals) and [maxDecimals](ui.igNumericEditor#options:maxDecimals) options can be 15, when editor is in 'double' mode and 7, when in 'float' mode. + * + * + * + * @optionValue New value to be set. + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "dataMode", optionValue: string): void; + + /** + * Gets/Sets the minimum value which can be entered in the editor by the end user. + * + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "minValue"): number; + + /** + * /Sets the minimum value which can be entered in the editor by the end user. + * + * + * @optionValue New value to be set. + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "minValue", optionValue: number): void; + + /** + * Gets/Sets the maximum value which can be entered in the editor by the end user. + * + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "maxValue"): number; + + /** + * /Sets the maximum value which can be entered in the editor by the end user. + * + * + * @optionValue New value to be set. + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "maxValue", optionValue: number): void; + + /** + * Gets/Sets whether the editor value can become null. + * If that option is disabled, and editor has no value, then value is set to 0 (or minValue/maxValue). + * + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "allowNullValue"): boolean; + + /** + * /Sets whether the editor value can become null. + * If that option is disabled, and editor has no value, then value is set to 0 (or minValue/maxValue). + * + * + * @optionValue New value to be set. + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "allowNullValue", optionValue: boolean): void; + + /** + * Gets/Sets the default delta-value which is used with "spin" [buttonType](ui.igNumericEditor#options:buttonType) or [spinUp](ui.igNumericEditor#methods:spinUp) and [spinDown](ui.igNumericEditor#methods:spinDown) methods to increment or decrement value in the editor. The value can not be negative. Non integer value is supported only for dataMode double and float. + * + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "spinDelta"): number; + + /** + * /Sets the default delta-value which is used with "spin" [buttonType](ui.igNumericEditor#options:buttonType) or [spinUp](ui.igNumericEditor#methods:spinUp) and [spinDown](ui.igNumericEditor#methods:spinDown) methods to increment or decrement value in the editor. The value can not be negative. Non integer value is supported only for dataMode double and float. + * + * + * @optionValue New value to be set. + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "spinDelta", optionValue: number): void; + + /** + * Gets/Sets support for scientific format in edit mode. + * If that option is set, then numeric value appears as a string with possible E-power flag. In edit mode the "E" or "e" character can be entered as well. + * Notes: The "+" character is not supported in edit mode. + * + * + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "scientificFormat"): string; + + /** + * /Sets support for scientific format in edit mode. + * If that option is set, then numeric value appears as a string with possible E-power flag. In edit mode the "E" or "e" character can be entered as well. + * Notes: The "+" character is not supported in edit mode. + * + * + * + * @optionValue New value to be set. + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "scientificFormat", optionValue: string): void; + + /** + * Gets/Set the ability of the editor to automatically set value in the editor to the opposite side of the limit, when the spin action reaches minimum or maximum limit. + * + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "spinWrapAround"): boolean; + + /** + * /Set the ability of the editor to automatically set value in the editor to the opposite side of the limit, when the spin action reaches minimum or maximum limit. + * + * + * @optionValue New value to be set. + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "spinWrapAround", optionValue: boolean): void; + + /** + * Removed from numeric editor options + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "maxLength"): any; + + /** + * Removed from numeric editor options + * + * @optionValue New value to be set. + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "maxLength", optionValue: any): void; + + /** + * Removed from numeric editor options + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "excludeKeys"): any; + + /** + * Removed from numeric editor options + * + * @optionValue New value to be set. + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "excludeKeys", optionValue: any): void; + + /** + * Removed from numeric editor options + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "includeKeys"): any; + + /** + * Removed from numeric editor options + * + * @optionValue New value to be set. + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "includeKeys", optionValue: any): void; + + /** + * Removed from numeric editor options + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "toLower"): any; + + /** + * Removed from numeric editor options + * + * @optionValue New value to be set. + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "toLower", optionValue: any): void; + + /** + * Removed from numeric editor options + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "toUpper"): any; + + /** + * Removed from numeric editor options + * + * @optionValue New value to be set. + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "toUpper", optionValue: any): void; + + /** + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "textMode"): any; + + /** + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "textMode", optionValue: any): void; + + /** + * Gets/Sets value in editor. The effect of setting/getting that option depends on type of editor and on dataMode options for every type of editor. + * + * + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "value"): any; + + /** + * /Sets value in editor. The effect of setting/getting that option depends on type of editor and on dataMode options for every type of editor. + * + * + * + * @optionValue New value to be set. + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "value", optionValue: any): void; + + /** + * Gets visibility of the spin, clear and drop-down button. That option can be set only on initialization. Combinations like 'dropdown,spin' or 'spin,clear' are supported too.Note! This option can not be set runtime. + * + * + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "buttonType"): string; + + /** + * Visibility of the spin, clear and drop-down button. That option can be set only on initialization. Combinations like 'dropdown,spin' or 'spin,clear' are supported too.Note! This option can not be set runtime. + * + * + * + * @optionValue New value to be set. + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "buttonType", optionValue: string): void; + + /** + * Gets/Sets custom width of the drop-down list in pixels. If the value is equal to 0 or negative, then the width of editor is set as a drop-down width. + * + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "listWidth"): number; + + /** + * /Sets custom width of the drop-down list in pixels. If the value is equal to 0 or negative, then the width of editor is set as a drop-down width. + * + * + * @optionValue New value to be set. + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "listWidth", optionValue: number): void; + + /** + * Gets/Sets the hover/unhover animation duration of a drop-down list item. + * + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "listItemHoverDuration"): number; + + /** + * /Sets the hover/unhover animation duration of a drop-down list item. + * + * + * @optionValue New value to be set. + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "listItemHoverDuration", optionValue: number): void; + + /** + * Gets wheather the drop-down list element is attached to the body of the document, or to the editor container element. + * If the option is set to false the editor will attach the drop-down list element to the editor container + * If the option is set to true the editor will attach its drop-down list to as a child of the body. + * Note! This option can not be set runtime. + * + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "dropDownAttachedToBody"): boolean; + + /** + * Wheather the drop-down list element is attached to the body of the document, or to the editor container element. + * If the option is set to false the editor will attach the drop-down list element to the editor container + * If the option is set to true the editor will attach its drop-down list to as a child of the body. + * Note! This option can not be set runtime. + * + * + * @optionValue New value to be set. + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "dropDownAttachedToBody", optionValue: boolean): void; + + /** + * Gets/Sets show/hide drop-down list animation duration in milliseconds. + * + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "dropDownAnimationDuration"): number; + + /** + * /Sets show/hide drop-down list animation duration in milliseconds. + * + * + * @optionValue New value to be set. + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "dropDownAnimationDuration", optionValue: number): void; + + /** + * Gets the number of the items to be shown at once when the drop-down list get opened. + * Notes: + * This option is overwritten if the number of list items is less than the set value. In that case the drop-down list displays all the items. + * This option can not be set runtime. + * + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "visibleItemsCount"): number; + + /** + * The number of the items to be shown at once when the drop-down list get opened. + * Notes: + * This option is overwritten if the number of list items is less than the set value. In that case the drop-down list displays all the items. + * This option can not be set runtime. + * + * + * @optionValue New value to be set. + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "visibleItemsCount", optionValue: number): void; + + /** + * Gets/Sets the text which appears in the editor when it has no focus and the "value" is null or empty string. + * + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "placeHolder"): string; + + /** + * /Sets the text which appears in the editor when it has no focus and the "value" is null or empty string. + * + * + * @optionValue New value to be set. + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "placeHolder", optionValue: string): void; + + /** + * Gets/Sets the action when the editor gets focused. The default value is selectAll. + * + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "selectionOnFocus"): string; + + /** + * /Sets the action when the editor gets focused. The default value is selectAll. + * + * + * @optionValue New value to be set. + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "selectionOnFocus", optionValue: string): void; + + /** + * Gets/Sets if the editor should only allow values set into the list of items. This validation is done only when the editor is blured, or enter key is pressed + * + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "isLimitedToListValues"): boolean; + + /** + * /Sets if the editor should only allow values set into the list of items. This validation is done only when the editor is blured, or enter key is pressed + * + * + * @optionValue New value to be set. + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "isLimitedToListValues", optionValue: boolean): void; + + /** + * Gets/Sets if the editor should revert it's value to the previously valid value in case the value on blur, or enter key is not valid. If the opiton is set to false, editor calls clear functionality. + * + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "revertIfNotValid"): boolean; + + /** + * /Sets if the editor should revert it's value to the previously valid value in case the value on blur, or enter key is not valid. If the opiton is set to false, editor calls clear functionality. + * + * + * @optionValue New value to be set. + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "revertIfNotValid", optionValue: boolean): void; + + /** + * Gets/Sets if the editor should prevent form submition when enter key is pressed. + * + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "preventSubmitOnEnter"): boolean; + + /** + * /Sets if the editor should prevent form submition when enter key is pressed. + * + * + * @optionValue New value to be set. + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "preventSubmitOnEnter", optionValue: boolean): void; + + /** + * Gets/Sets the drop-down list opening orientation when the list gets open. If the option is set to auto the editor has priority to open the drop-down list bottom. If the space is not enough it tries to open the list top. If the space is not enough in both directions then the list gets opened at the bottom of the editor. + * + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "dropDownOrientation"): string; + + /** + * /Sets the drop-down list opening orientation when the list gets open. If the option is set to auto the editor has priority to open the drop-down list bottom. If the space is not enough it tries to open the list top. If the space is not enough in both directions then the list gets opened at the bottom of the editor. + * + * + * @optionValue New value to be set. + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "dropDownOrientation", optionValue: string): void; + + /** + * Gets the ability to limit the editor to be used only as a dropdown list. When set to true the editor input is not editable. + * Note! In case there are no list items - the editor will reamin readonly + * Note! This option can not be set runtime. + * + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "dropDownOnReadOnly"): boolean; + + /** + * The ability to limit the editor to be used only as a dropdown list. When set to true the editor input is not editable. + * Note! In case there are no list items - the editor will reamin readonly + * Note! This option can not be set runtime. + * + * + * @optionValue New value to be set. + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "dropDownOnReadOnly", optionValue: boolean): void; + + /** + * Gets/Sets the strings used for the localization of the component. This includes button titles, error messages etc. Value of the object should contain pairs or key:value members. Note: any sub-option of locale can appear within the main option of igEditor. In this case those values within main options will have highest priority and override corresponding value in locale. + * + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "locale"): any; + + /** + * /Sets the strings used for the localization of the component. This includes button titles, error messages etc. Value of the object should contain pairs or key:value members. Note: any sub-option of locale can appear within the main option of igEditor. In this case those values within main options will have highest priority and override corresponding value in locale. + * + * + * @optionValue New value to be set. + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "locale", optionValue: any): void; + + /** + * Disables/Enables default notifications for basic validation scenarios built in the editors such as required list selection, value wrapping around or spin limits. + * + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "suppressNotifications"): boolean; + + /** + * Disables/Enables default notifications for basic validation scenarios built in the editors such as required list selection, value wrapping around or spin limits. + * + * + * @optionValue New value to be set. + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "suppressNotifications", optionValue: boolean): void; + + /** + * Gets/Sets the width of the control. + * + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "width"): string|number; + + /** + * /Sets the width of the control. + * + * + * @optionValue New value to be set. + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "width", optionValue: string|number): void; + + /** + * Gets/Sets the height of the control. + * + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "height"): string|number; + + /** + * /Sets the height of the control. + * + * + * @optionValue New value to be set. + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "height", optionValue: string|number): void; + + /** + * Gets/Sets tabIndex attribute for the editor input. + * + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "tabIndex"): number; + + /** + * /Sets tabIndex attribute for the editor input. + * + * + * @optionValue New value to be set. + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "tabIndex", optionValue: number): void; + + /** + * Gets/Sets the representation of null value. In case of default the value for the input is set to null, which makes the input to hold an empty string + * + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "nullValue"): string|number; + + /** + * /Sets the representation of null value. In case of default the value for the input is set to null, which makes the input to hold an empty string + * + * + * @optionValue New value to be set. + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "nullValue", optionValue: string|number): void; + + /** + * Gets/Sets the name attribute of the value input. This input is used to sent the value to the server. In case the target element is input and it has name attribute, but the developer has set the inputName option, so this option overwrites the value input and removes the attribute from the element. + * + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "inputName"): string; + + /** + * /Sets the name attribute of the value input. This input is used to sent the value to the server. In case the target element is input and it has name attribute, but the developer has set the inputName option, so this option overwrites the value input and removes the attribute from the element. + * + * + * @optionValue New value to be set. + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "inputName", optionValue: string): void; + + /** + * Gets/Sets the readonly attribute for the input. If set to true the input is readonly, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is submitted. + * + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "readOnly"): boolean; + + /** + * /Sets the readonly attribute for the input. If set to true the input is readonly, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is submitted. + * + * + * @optionValue New value to be set. + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "readOnly", optionValue: boolean): void; + + /** + * Gets/Sets the disabled attribute for the input. If set to true the input is disabled, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is not submitted. + * + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "disabled"): boolean; + + /** + * /Sets the disabled attribute for the input. If set to true the input is disabled, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is not submitted. + * + * + * @optionValue New value to be set. + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "disabled", optionValue: boolean): void; + + /** + * Gets/Sets options supported by the [igValidator](ui.igvalidator#options) widget. + * Note: Validation rules of [igValidator](ui.igvalidator#options), such as min and max value/length are applied separately triggering errors, + * while the corresponding options of the editor prevent values violating the defined rules from being entered. + * + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "validatorOptions"): any; + + /** + * /Sets options supported by the [igValidator](ui.igvalidator#options) widget. + * Note: Validation rules of [igValidator](ui.igvalidator#options), such as min and max value/length are applied separately triggering errors, + * while the corresponding options of the editor prevent values violating the defined rules from being entered. + * + * + * @optionValue New value to be set. + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "validatorOptions", optionValue: any): void; + igCurrencyEditor(options: IgCurrencyEditor): JQuery; + igCurrencyEditor(optionLiteral: 'option', optionName: string): any; + igCurrencyEditor(optionLiteral: 'option', options: IgCurrencyEditor): JQuery; + igCurrencyEditor(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igCurrencyEditor(methodName: string, ...methodParams: any[]): any; +} +interface JQuery { + igPercentEditor(methodName: "insert", string: string): void; + igPercentEditor(methodName: "percentSymbol", symbol?: Object): string; + igPercentEditor(methodName: "value", newValue?: number): number; + igPercentEditor(methodName: "findListItemIndex", number: number): number; + igPercentEditor(methodName: "getSelectedText"): void; + igPercentEditor(methodName: "getSelectionStart"): void; + igPercentEditor(methodName: "getSelectionEnd"): void; + igPercentEditor(methodName: "spinUp", delta?: number): void; + igPercentEditor(methodName: "spinDown", delta?: number): void; + igPercentEditor(methodName: "selectListIndexUp"): void; + igPercentEditor(methodName: "selectListIndexDown"): void; + igPercentEditor(methodName: "getRegionalOption"): string; + + /** + * Gets/Sets the pattern for positive numeric values, which is used in display (no focus) state. + * If you use the "en-US" culture the default value for "positivePattern" will be "n$" where the "$" flag represents the "numericSymbol" and the "n" flag represents the value of the number. + * Note: this option has priority over possible regional settings. + * + */ + igPercentEditor(optionLiteral: 'option', optionName: "positivePattern"): string; + + /** + * /Sets the pattern for positive numeric values, which is used in display (no focus) state. + * If you use the "en-US" culture the default value for "positivePattern" will be "n$" where the "$" flag represents the "numericSymbol" and the "n" flag represents the value of the number. + * Note: this option has priority over possible regional settings. + * + * + * @optionValue New value to be set. + */ + igPercentEditor(optionLiteral: 'option', optionName: "positivePattern", optionValue: string): void; + + /** + * Gets/Sets the symbol, which is used in display (no focus) state. + * Note: this option has priority over possible regional settings. + * + */ + igPercentEditor(optionLiteral: 'option', optionName: "percentSymbol"): string; + + /** + * /Sets the symbol, which is used in display (no focus) state. + * Note: this option has priority over possible regional settings. + * + * + * @optionValue New value to be set. + */ + igPercentEditor(optionLiteral: 'option', optionName: "percentSymbol", optionValue: string): void; + + /** + * Gets/Sets the factor which is used for the get and set of the "value" method. + * On get the number (string) entered by the user is divided by that factor and on set the number (string) displayed in the editor is multiplied by that factor. + * For example, if the factor is 100 and the "value" is set to 0.123, then the editor will show string "12.3". + * Possible values: 1 or 100. + * Note: this option has priority over possible regional settings. + * + */ + igPercentEditor(optionLiteral: 'option', optionName: "displayFactor"): number; + + /** + * /Sets the factor which is used for the get and set of the "value" method. + * On get the number (string) entered by the user is divided by that factor and on set the number (string) displayed in the editor is multiplied by that factor. + * For example, if the factor is 100 and the "value" is set to 0.123, then the editor will show string "12.3". + * Possible values: 1 or 100. + * Note: this option has priority over possible regional settings. + * + * + * @optionValue New value to be set. + */ + igPercentEditor(optionLiteral: 'option', optionName: "displayFactor", optionValue: number): void; + + /** + * Defines the range that editor's value can accept.This is achieved by setting the [minValue](ui.igPercentEditor#options:minValue) and [maxValue](ui.igPercentEditor#options:maxValue) editor's options, accordingly to the lowest and highest accepted values for the defined numeric mode. + * The range for the specific type follows the numeric type standards, e.g. in .NET Framework [floating-point](https://msdn.microsoft.com/en-us/library/9ahet949.aspx) types and [integral types](https://msdn.microsoft.com/en-us/library/exx3b86w.aspx). + * In addition, the maximum value that can be set to [minDecimals](ui.igPercentEditor#options:minDecimals) and [maxDecimals](ui.igPercentEditor#options:maxDecimals) options can be 15, when editor is in 'double' mode and 7, when in 'float' mode. + * + * + */ + igPercentEditor(optionLiteral: 'option', optionName: "dataMode"): string; + + /** + * Defines the range that editor's value can accept.This is achieved by setting the [minValue](ui.igPercentEditor#options:minValue) and [maxValue](ui.igPercentEditor#options:maxValue) editor's options, accordingly to the lowest and highest accepted values for the defined numeric mode. + * The range for the specific type follows the numeric type standards, e.g. in .NET Framework [floating-point](https://msdn.microsoft.com/en-us/library/9ahet949.aspx) types and [integral types](https://msdn.microsoft.com/en-us/library/exx3b86w.aspx). + * In addition, the maximum value that can be set to [minDecimals](ui.igPercentEditor#options:minDecimals) and [maxDecimals](ui.igPercentEditor#options:maxDecimals) options can be 15, when editor is in 'double' mode and 7, when in 'float' mode. + * + * + * + * @optionValue New value to be set. + */ + igPercentEditor(optionLiteral: 'option', optionName: "dataMode", optionValue: string): void; + + /** + * Gets/Sets the default delta-value which is used with "spin" [buttonType](ui.igpercenteditor#options:buttonType) or [spinUp](ui.igpercenteditor#methods:spinUp) and [spinDown](ui.igpercenteditor#methods:spinDown) methods to increment or decrement value in the editor. The value can not be negative. Non integer value is supported only for dataMode double and float. + * + */ + igPercentEditor(optionLiteral: 'option', optionName: "spinDelta"): number; + + /** + * /Sets the default delta-value which is used with "spin" [buttonType](ui.igpercenteditor#options:buttonType) or [spinUp](ui.igpercenteditor#methods:spinUp) and [spinDown](ui.igpercenteditor#methods:spinDown) methods to increment or decrement value in the editor. The value can not be negative. Non integer value is supported only for dataMode double and float. + * + * + * @optionValue New value to be set. + */ + igPercentEditor(optionLiteral: 'option', optionName: "spinDelta", optionValue: number): void; + + /** + * Gets/Sets list of items which are used as a source for the drop-down list. + * Items in the list can be of type string, number or object. The items are directly rendered without any casting, or manipulation. + * + */ + igPercentEditor(optionLiteral: 'option', optionName: "listItems"): any[]; + + /** + * /Sets list of items which are used as a source for the drop-down list. + * Items in the list can be of type string, number or object. The items are directly rendered without any casting, or manipulation. + * + * + * @optionValue New value to be set. + */ + igPercentEditor(optionLiteral: 'option', optionName: "listItems", optionValue: any[]): void; + + /** + * Gets/Sets custom regional settings for editor. If it is string, then $.ig.regional[stringValue] is assumed. + * + */ + igPercentEditor(optionLiteral: 'option', optionName: "regional"): any; + + /** + * /Sets custom regional settings for editor. If it is string, then $.ig.regional[stringValue] is assumed. + * + * + * @optionValue New value to be set. + */ + igPercentEditor(optionLiteral: 'option', optionName: "regional", optionValue: any): void; + + /** + * Gets/Sets the character, which is used as negative sign. + * Note: This option has priority over possible regional settings. + * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * + */ + igPercentEditor(optionLiteral: 'option', optionName: "negativeSign"): string; + + /** + * /Sets the character, which is used as negative sign. + * Note: This option has priority over possible regional settings. + * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * + * + * @optionValue New value to be set. + */ + igPercentEditor(optionLiteral: 'option', optionName: "negativeSign", optionValue: string): void; + + /** + * Gets/Sets the string, which is used as negative pattern. The "n" flag represents the value of number. The "-" and "()" flags are static part of pattern. + * Note: This option has priority over possible regional settings. + * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * + */ + igPercentEditor(optionLiteral: 'option', optionName: "negativePattern"): string; + + /** + * /Sets the string, which is used as negative pattern. The "n" flag represents the value of number. The "-" and "()" flags are static part of pattern. + * Note: This option has priority over possible regional settings. + * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * + * + * @optionValue New value to be set. + */ + igPercentEditor(optionLiteral: 'option', optionName: "negativePattern", optionValue: string): void; + + /** + * Gets/Sets the character, which is used as decimal separator. + * Note: this option has priority over possible regional settings. + * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * + */ + igPercentEditor(optionLiteral: 'option', optionName: "decimalSeparator"): string; + + /** + * /Sets the character, which is used as decimal separator. + * Note: this option has priority over possible regional settings. + * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * + * + * @optionValue New value to be set. + */ + igPercentEditor(optionLiteral: 'option', optionName: "decimalSeparator", optionValue: string): void; + + /** + * Gets/Sets the character, which is used as separator for groups (like thousands). + * That option has effect only in display mode(no focus). + * Note: this option has priority over possible regional settings. + * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * + */ + igPercentEditor(optionLiteral: 'option', optionName: "groupSeparator"): string; + + /** + * /Sets the character, which is used as separator for groups (like thousands). + * That option has effect only in display mode(no focus). + * Note: this option has priority over possible regional settings. + * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * + * + * @optionValue New value to be set. + */ + igPercentEditor(optionLiteral: 'option', optionName: "groupSeparator", optionValue: string): void; + + /** + * (array of number objects) Gets/Sets the number of digits in the integer part of a number, which are divided into groups. + * The "groupSeparator" is inserted between groups. + * If the sum of all values in array is smaller than the length of integer part, then the last item in array is used for all following groups. + * Count of groups starts from the decimal point (from right to left). + * That option has effect only in display mode(no focus). + * Note: this option has priority over possible regional settings. + * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * + */ + igPercentEditor(optionLiteral: 'option', optionName: "groups"): any[]; + + /** + * (array of number objects) /Sets the number of digits in the integer part of a number, which are divided into groups. + * The "groupSeparator" is inserted between groups. + * If the sum of all values in array is smaller than the length of integer part, then the last item in array is used for all following groups. + * Count of groups starts from the decimal point (from right to left). + * That option has effect only in display mode(no focus). + * Note: this option has priority over possible regional settings. + * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * + * + * @optionValue New value to be set. + */ + igPercentEditor(optionLiteral: 'option', optionName: "groups", optionValue: any[]): void; + + /** + * Gets/Sets the maximum number of decimal places which are used in display mode(no focus). + * Note: this option has priority over possible regional settings. + * Note: In case of min decimals value higher than max decimals - max decimals are equaled to min decimals property. + * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * + */ + igPercentEditor(optionLiteral: 'option', optionName: "maxDecimals"): number; + + /** + * /Sets the maximum number of decimal places which are used in display mode(no focus). + * Note: this option has priority over possible regional settings. + * Note: In case of min decimals value higher than max decimals - max decimals are equaled to min decimals property. + * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * + * + * @optionValue New value to be set. + */ + igPercentEditor(optionLiteral: 'option', optionName: "maxDecimals", optionValue: number): void; + + /** + * Gets/Sets the minimum number of decimal places which are used in display (no focus) state. + * If number of digits in fractional part of number is less than the value of this option, then the "0" characters are used to fill missing digits. + * Note: This option has priority over possible regional settings. + * Note: In case of min decimals value higher than max decimals - max decimals are equaled to min decimals property. + * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * Note: This option supports values below or equal to 20. + * + */ + igPercentEditor(optionLiteral: 'option', optionName: "minDecimals"): number; + + /** + * /Sets the minimum number of decimal places which are used in display (no focus) state. + * If number of digits in fractional part of number is less than the value of this option, then the "0" characters are used to fill missing digits. + * Note: This option has priority over possible regional settings. + * Note: In case of min decimals value higher than max decimals - max decimals are equaled to min decimals property. + * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * Note: This option supports values below or equal to 20. + * + * + * @optionValue New value to be set. + */ + igPercentEditor(optionLiteral: 'option', optionName: "minDecimals", optionValue: number): void; + + /** + * Gets/Sets the horizontal alignment of the text in the editor. + * + */ + igPercentEditor(optionLiteral: 'option', optionName: "textAlign"): string; + + /** + * /Sets the horizontal alignment of the text in the editor. + * + * + * @optionValue New value to be set. + */ + igPercentEditor(optionLiteral: 'option', optionName: "textAlign", optionValue: string): void; + + /** + * Gets/Sets the minimum value which can be entered in the editor by the end user. + * + */ + igPercentEditor(optionLiteral: 'option', optionName: "minValue"): number; + + /** + * /Sets the minimum value which can be entered in the editor by the end user. + * + * + * @optionValue New value to be set. + */ + igPercentEditor(optionLiteral: 'option', optionName: "minValue", optionValue: number): void; + + /** + * Gets/Sets the maximum value which can be entered in the editor by the end user. + * + */ + igPercentEditor(optionLiteral: 'option', optionName: "maxValue"): number; + + /** + * /Sets the maximum value which can be entered in the editor by the end user. + * + * + * @optionValue New value to be set. + */ + igPercentEditor(optionLiteral: 'option', optionName: "maxValue", optionValue: number): void; + + /** + * Gets/Sets whether the editor value can become null. + * If that option is disabled, and editor has no value, then value is set to 0 (or minValue/maxValue). + * + */ + igPercentEditor(optionLiteral: 'option', optionName: "allowNullValue"): boolean; + + /** + * /Sets whether the editor value can become null. + * If that option is disabled, and editor has no value, then value is set to 0 (or minValue/maxValue). + * + * + * @optionValue New value to be set. + */ + igPercentEditor(optionLiteral: 'option', optionName: "allowNullValue", optionValue: boolean): void; + + /** + * Gets/Sets support for scientific format in edit mode. + * If that option is set, then numeric value appears as a string with possible E-power flag. In edit mode the "E" or "e" character can be entered as well. + * Notes: The "+" character is not supported in edit mode. + * + * + */ + igPercentEditor(optionLiteral: 'option', optionName: "scientificFormat"): string; + + /** + * /Sets support for scientific format in edit mode. + * If that option is set, then numeric value appears as a string with possible E-power flag. In edit mode the "E" or "e" character can be entered as well. + * Notes: The "+" character is not supported in edit mode. + * + * + * + * @optionValue New value to be set. + */ + igPercentEditor(optionLiteral: 'option', optionName: "scientificFormat", optionValue: string): void; + + /** + * Gets/Set the ability of the editor to automatically set value in the editor to the opposite side of the limit, when the spin action reaches minimum or maximum limit. + * + */ + igPercentEditor(optionLiteral: 'option', optionName: "spinWrapAround"): boolean; + + /** + * /Set the ability of the editor to automatically set value in the editor to the opposite side of the limit, when the spin action reaches minimum or maximum limit. + * + * + * @optionValue New value to be set. + */ + igPercentEditor(optionLiteral: 'option', optionName: "spinWrapAround", optionValue: boolean): void; + + /** + * Removed from numeric editor options + */ + igPercentEditor(optionLiteral: 'option', optionName: "maxLength"): any; + + /** + * Removed from numeric editor options + * + * @optionValue New value to be set. + */ + igPercentEditor(optionLiteral: 'option', optionName: "maxLength", optionValue: any): void; + + /** + * Removed from numeric editor options + */ + igPercentEditor(optionLiteral: 'option', optionName: "excludeKeys"): any; + + /** + * Removed from numeric editor options + * + * @optionValue New value to be set. + */ + igPercentEditor(optionLiteral: 'option', optionName: "excludeKeys", optionValue: any): void; + + /** + * Removed from numeric editor options + */ + igPercentEditor(optionLiteral: 'option', optionName: "includeKeys"): any; + + /** + * Removed from numeric editor options + * + * @optionValue New value to be set. + */ + igPercentEditor(optionLiteral: 'option', optionName: "includeKeys", optionValue: any): void; + + /** + * Removed from numeric editor options + */ + igPercentEditor(optionLiteral: 'option', optionName: "toLower"): any; + + /** + * Removed from numeric editor options + * + * @optionValue New value to be set. + */ + igPercentEditor(optionLiteral: 'option', optionName: "toLower", optionValue: any): void; + + /** + * Removed from numeric editor options + */ + igPercentEditor(optionLiteral: 'option', optionName: "toUpper"): any; + + /** + * Removed from numeric editor options + * + * @optionValue New value to be set. + */ + igPercentEditor(optionLiteral: 'option', optionName: "toUpper", optionValue: any): void; + + /** + */ + igPercentEditor(optionLiteral: 'option', optionName: "textMode"): any; + + /** + */ + igPercentEditor(optionLiteral: 'option', optionName: "textMode", optionValue: any): void; + + /** + * Gets/Sets value in editor. The effect of setting/getting that option depends on type of editor and on dataMode options for every type of editor. + * + * + */ + igPercentEditor(optionLiteral: 'option', optionName: "value"): any; + + /** + * /Sets value in editor. The effect of setting/getting that option depends on type of editor and on dataMode options for every type of editor. + * + * + * + * @optionValue New value to be set. + */ + igPercentEditor(optionLiteral: 'option', optionName: "value", optionValue: any): void; + + /** + * Gets visibility of the spin, clear and drop-down button. That option can be set only on initialization. Combinations like 'dropdown,spin' or 'spin,clear' are supported too.Note! This option can not be set runtime. + * + * + */ + igPercentEditor(optionLiteral: 'option', optionName: "buttonType"): string; + + /** + * Visibility of the spin, clear and drop-down button. That option can be set only on initialization. Combinations like 'dropdown,spin' or 'spin,clear' are supported too.Note! This option can not be set runtime. + * + * + * + * @optionValue New value to be set. + */ + igPercentEditor(optionLiteral: 'option', optionName: "buttonType", optionValue: string): void; + + /** + * Gets/Sets custom width of the drop-down list in pixels. If the value is equal to 0 or negative, then the width of editor is set as a drop-down width. + * + */ + igPercentEditor(optionLiteral: 'option', optionName: "listWidth"): number; + + /** + * /Sets custom width of the drop-down list in pixels. If the value is equal to 0 or negative, then the width of editor is set as a drop-down width. + * + * + * @optionValue New value to be set. + */ + igPercentEditor(optionLiteral: 'option', optionName: "listWidth", optionValue: number): void; + + /** + * Gets/Sets the hover/unhover animation duration of a drop-down list item. + * + */ + igPercentEditor(optionLiteral: 'option', optionName: "listItemHoverDuration"): number; + + /** + * /Sets the hover/unhover animation duration of a drop-down list item. + * + * + * @optionValue New value to be set. + */ + igPercentEditor(optionLiteral: 'option', optionName: "listItemHoverDuration", optionValue: number): void; + + /** + * Gets wheather the drop-down list element is attached to the body of the document, or to the editor container element. + * If the option is set to false the editor will attach the drop-down list element to the editor container + * If the option is set to true the editor will attach its drop-down list to as a child of the body. + * Note! This option can not be set runtime. + * + */ + igPercentEditor(optionLiteral: 'option', optionName: "dropDownAttachedToBody"): boolean; + + /** + * Wheather the drop-down list element is attached to the body of the document, or to the editor container element. + * If the option is set to false the editor will attach the drop-down list element to the editor container + * If the option is set to true the editor will attach its drop-down list to as a child of the body. + * Note! This option can not be set runtime. + * + * + * @optionValue New value to be set. + */ + igPercentEditor(optionLiteral: 'option', optionName: "dropDownAttachedToBody", optionValue: boolean): void; + + /** + * Gets/Sets show/hide drop-down list animation duration in milliseconds. + * + */ + igPercentEditor(optionLiteral: 'option', optionName: "dropDownAnimationDuration"): number; + + /** + * /Sets show/hide drop-down list animation duration in milliseconds. + * + * + * @optionValue New value to be set. + */ + igPercentEditor(optionLiteral: 'option', optionName: "dropDownAnimationDuration", optionValue: number): void; + + /** + * Gets the number of the items to be shown at once when the drop-down list get opened. + * Notes: + * This option is overwritten if the number of list items is less than the set value. In that case the drop-down list displays all the items. + * This option can not be set runtime. + * + */ + igPercentEditor(optionLiteral: 'option', optionName: "visibleItemsCount"): number; + + /** + * The number of the items to be shown at once when the drop-down list get opened. + * Notes: + * This option is overwritten if the number of list items is less than the set value. In that case the drop-down list displays all the items. + * This option can not be set runtime. + * + * + * @optionValue New value to be set. + */ + igPercentEditor(optionLiteral: 'option', optionName: "visibleItemsCount", optionValue: number): void; + + /** + * Gets/Sets the text which appears in the editor when it has no focus and the "value" is null or empty string. + * + */ + igPercentEditor(optionLiteral: 'option', optionName: "placeHolder"): string; + + /** + * /Sets the text which appears in the editor when it has no focus and the "value" is null or empty string. + * + * + * @optionValue New value to be set. + */ + igPercentEditor(optionLiteral: 'option', optionName: "placeHolder", optionValue: string): void; + + /** + * Gets/Sets the action when the editor gets focused. The default value is selectAll. + * + */ + igPercentEditor(optionLiteral: 'option', optionName: "selectionOnFocus"): string; + + /** + * /Sets the action when the editor gets focused. The default value is selectAll. + * + * + * @optionValue New value to be set. + */ + igPercentEditor(optionLiteral: 'option', optionName: "selectionOnFocus", optionValue: string): void; + + /** + * Gets/Sets if the editor should only allow values set into the list of items. This validation is done only when the editor is blured, or enter key is pressed + * + */ + igPercentEditor(optionLiteral: 'option', optionName: "isLimitedToListValues"): boolean; + + /** + * /Sets if the editor should only allow values set into the list of items. This validation is done only when the editor is blured, or enter key is pressed + * + * + * @optionValue New value to be set. + */ + igPercentEditor(optionLiteral: 'option', optionName: "isLimitedToListValues", optionValue: boolean): void; + + /** + * Gets/Sets if the editor should revert it's value to the previously valid value in case the value on blur, or enter key is not valid. If the opiton is set to false, editor calls clear functionality. + * + */ + igPercentEditor(optionLiteral: 'option', optionName: "revertIfNotValid"): boolean; + + /** + * /Sets if the editor should revert it's value to the previously valid value in case the value on blur, or enter key is not valid. If the opiton is set to false, editor calls clear functionality. + * + * + * @optionValue New value to be set. + */ + igPercentEditor(optionLiteral: 'option', optionName: "revertIfNotValid", optionValue: boolean): void; + + /** + * Gets/Sets if the editor should prevent form submition when enter key is pressed. + * + */ + igPercentEditor(optionLiteral: 'option', optionName: "preventSubmitOnEnter"): boolean; + + /** + * /Sets if the editor should prevent form submition when enter key is pressed. + * + * + * @optionValue New value to be set. + */ + igPercentEditor(optionLiteral: 'option', optionName: "preventSubmitOnEnter", optionValue: boolean): void; + + /** + * Gets/Sets the drop-down list opening orientation when the list gets open. If the option is set to auto the editor has priority to open the drop-down list bottom. If the space is not enough it tries to open the list top. If the space is not enough in both directions then the list gets opened at the bottom of the editor. + * + */ + igPercentEditor(optionLiteral: 'option', optionName: "dropDownOrientation"): string; + + /** + * /Sets the drop-down list opening orientation when the list gets open. If the option is set to auto the editor has priority to open the drop-down list bottom. If the space is not enough it tries to open the list top. If the space is not enough in both directions then the list gets opened at the bottom of the editor. + * + * + * @optionValue New value to be set. + */ + igPercentEditor(optionLiteral: 'option', optionName: "dropDownOrientation", optionValue: string): void; + + /** + * Gets the ability to limit the editor to be used only as a dropdown list. When set to true the editor input is not editable. + * Note! In case there are no list items - the editor will reamin readonly + * Note! This option can not be set runtime. + * + */ + igPercentEditor(optionLiteral: 'option', optionName: "dropDownOnReadOnly"): boolean; + + /** + * The ability to limit the editor to be used only as a dropdown list. When set to true the editor input is not editable. + * Note! In case there are no list items - the editor will reamin readonly + * Note! This option can not be set runtime. + * + * + * @optionValue New value to be set. + */ + igPercentEditor(optionLiteral: 'option', optionName: "dropDownOnReadOnly", optionValue: boolean): void; + + /** + * Gets/Sets the strings used for the localization of the component. This includes button titles, error messages etc. Value of the object should contain pairs or key:value members. Note: any sub-option of locale can appear within the main option of igEditor. In this case those values within main options will have highest priority and override corresponding value in locale. + * + */ + igPercentEditor(optionLiteral: 'option', optionName: "locale"): any; + + /** + * /Sets the strings used for the localization of the component. This includes button titles, error messages etc. Value of the object should contain pairs or key:value members. Note: any sub-option of locale can appear within the main option of igEditor. In this case those values within main options will have highest priority and override corresponding value in locale. + * + * + * @optionValue New value to be set. + */ + igPercentEditor(optionLiteral: 'option', optionName: "locale", optionValue: any): void; + + /** + * Disables/Enables default notifications for basic validation scenarios built in the editors such as required list selection, value wrapping around or spin limits. + * + */ + igPercentEditor(optionLiteral: 'option', optionName: "suppressNotifications"): boolean; + + /** + * Disables/Enables default notifications for basic validation scenarios built in the editors such as required list selection, value wrapping around or spin limits. + * + * + * @optionValue New value to be set. + */ + igPercentEditor(optionLiteral: 'option', optionName: "suppressNotifications", optionValue: boolean): void; + + /** + * Gets/Sets the width of the control. + * + */ + igPercentEditor(optionLiteral: 'option', optionName: "width"): string|number; + + /** + * /Sets the width of the control. + * + * + * @optionValue New value to be set. + */ + igPercentEditor(optionLiteral: 'option', optionName: "width", optionValue: string|number): void; + + /** + * Gets/Sets the height of the control. + * + */ + igPercentEditor(optionLiteral: 'option', optionName: "height"): string|number; + + /** + * /Sets the height of the control. + * + * + * @optionValue New value to be set. + */ + igPercentEditor(optionLiteral: 'option', optionName: "height", optionValue: string|number): void; + + /** + * Gets/Sets tabIndex attribute for the editor input. + * + */ + igPercentEditor(optionLiteral: 'option', optionName: "tabIndex"): number; + + /** + * /Sets tabIndex attribute for the editor input. + * + * + * @optionValue New value to be set. + */ + igPercentEditor(optionLiteral: 'option', optionName: "tabIndex", optionValue: number): void; + + /** + * Gets/Sets the representation of null value. In case of default the value for the input is set to null, which makes the input to hold an empty string + * + */ + igPercentEditor(optionLiteral: 'option', optionName: "nullValue"): string|number; + + /** + * /Sets the representation of null value. In case of default the value for the input is set to null, which makes the input to hold an empty string + * + * + * @optionValue New value to be set. + */ + igPercentEditor(optionLiteral: 'option', optionName: "nullValue", optionValue: string|number): void; + + /** + * Gets/Sets the name attribute of the value input. This input is used to sent the value to the server. In case the target element is input and it has name attribute, but the developer has set the inputName option, so this option overwrites the value input and removes the attribute from the element. + * + */ + igPercentEditor(optionLiteral: 'option', optionName: "inputName"): string; + + /** + * /Sets the name attribute of the value input. This input is used to sent the value to the server. In case the target element is input and it has name attribute, but the developer has set the inputName option, so this option overwrites the value input and removes the attribute from the element. + * + * + * @optionValue New value to be set. + */ + igPercentEditor(optionLiteral: 'option', optionName: "inputName", optionValue: string): void; + + /** + * Gets/Sets the readonly attribute for the input. If set to true the input is readonly, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is submitted. + * + */ + igPercentEditor(optionLiteral: 'option', optionName: "readOnly"): boolean; + + /** + * /Sets the readonly attribute for the input. If set to true the input is readonly, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is submitted. + * + * + * @optionValue New value to be set. + */ + igPercentEditor(optionLiteral: 'option', optionName: "readOnly", optionValue: boolean): void; + + /** + * Gets/Sets the disabled attribute for the input. If set to true the input is disabled, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is not submitted. + * + */ + igPercentEditor(optionLiteral: 'option', optionName: "disabled"): boolean; + + /** + * /Sets the disabled attribute for the input. If set to true the input is disabled, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is not submitted. + * + * + * @optionValue New value to be set. + */ + igPercentEditor(optionLiteral: 'option', optionName: "disabled", optionValue: boolean): void; + + /** + * Gets/Sets options supported by the [igValidator](ui.igvalidator#options) widget. + * Note: Validation rules of [igValidator](ui.igvalidator#options), such as min and max value/length are applied separately triggering errors, + * while the corresponding options of the editor prevent values violating the defined rules from being entered. + * + */ + igPercentEditor(optionLiteral: 'option', optionName: "validatorOptions"): any; + + /** + * /Sets options supported by the [igValidator](ui.igvalidator#options) widget. + * Note: Validation rules of [igValidator](ui.igvalidator#options), such as min and max value/length are applied separately triggering errors, + * while the corresponding options of the editor prevent values violating the defined rules from being entered. + * + * + * @optionValue New value to be set. + */ + igPercentEditor(optionLiteral: 'option', optionName: "validatorOptions", optionValue: any): void; + igPercentEditor(options: IgPercentEditor): JQuery; + igPercentEditor(optionLiteral: 'option', optionName: string): any; + igPercentEditor(optionLiteral: 'option', options: IgPercentEditor): JQuery; + igPercentEditor(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igPercentEditor(methodName: string, ...methodParams: any[]): any; +} +interface JQuery { + igMaskEditor(methodName: "value", newValue?: string): string; + igMaskEditor(methodName: "dropDownContainer"): void; + igMaskEditor(methodName: "showDropDown"): void; + igMaskEditor(methodName: "hideDropDown"): void; + igMaskEditor(methodName: "dropDownButton"): void; + igMaskEditor(methodName: "spinUpButton"): void; + igMaskEditor(methodName: "spinDownButton"): void; + igMaskEditor(methodName: "dropDownVisible"): void; + igMaskEditor(methodName: "findListItemIndex"): void; + igMaskEditor(methodName: "selectedListIndex"): void; + igMaskEditor(methodName: "getSelectedListItem"): void; + igMaskEditor(methodName: "spinUp"): void; + igMaskEditor(methodName: "spinDown"): void; + igMaskEditor(methodName: "isValid"): boolean; + igMaskEditor(methodName: "displayValue"): string; + igMaskEditor(methodName: "clearButton"): string; + igMaskEditor(methodName: "getSelectedText"): string; + igMaskEditor(methodName: "getSelectionStart"): number; + igMaskEditor(methodName: "getSelectionEnd"): number; + igMaskEditor(methodName: "insert", string: string): void; + igMaskEditor(methodName: "select", start: number, end: number): void; + + /** + * Gets custom regional settings for editor. If it is string, then $.ig.regional[stringValue] is assumed. + * + */ + igMaskEditor(optionLiteral: 'option', optionName: "regional"): any; + + /** + * Custom regional settings for editor. If it is string, then $.ig.regional[stringValue] is assumed. + * + * + * @optionValue New value to be set. + */ + igMaskEditor(optionLiteral: 'option', optionName: "regional", optionValue: any): void; + + /** + * Gets visibility of the clear button. That option can be set only on initialization. + * + * clear A button to clear the value is located on the right side of the editor. + */ + igMaskEditor(optionLiteral: 'option', optionName: "buttonType"): string; + + /** + * Visibility of the clear button. That option can be set only on initialization. + * + * clear A button to clear the value is located on the right side of the editor. + * + * @optionValue New value to be set. + */ + igMaskEditor(optionLiteral: 'option', optionName: "buttonType", optionValue: string): void; + + /** + * Gets input mask. Mask may include filter-flags and literal characters. + * Literal characters are part of mask which cannot be modified by end user. In order to use a filter-flag as a literal character, the escape "\\" character should be used. + * Default is "CCCCCCCCCC" + * Note: optional flags/entries affect the value returned by get of the [value](ui.igmaskeditor#methods:value) methods. + * List of filter-flags: + * C: any keyboard character. Entry is optional. + * &: any keyboard character. Entry is required. + * a: letter or digit character. Entry is optional. + * A: letter or digit character. Entry is required. + * ?: letter character. Entry is optional. + * L: letter character. Entry is required. + * 9: digit character. Entry is optional. + * 0: digit character. Entry is required. + * #: digit character or "+" or "_". Entry is optional with replacement by [emptyChar](ui.igmaskeditor#options:emptyChar) or by [padChar](ui.igmaskeditor#options:padChar). + * >: all letters to the right are converted to the upper case. In order to disable conversion, the ">" flag should be used again. + * <: all letters to the right are converted to the lower case. In order to disable conversion, the "<" flag should be used again. + * Note! This option can not be set runtime. + * + */ + igMaskEditor(optionLiteral: 'option', optionName: "inputMask"): string; + + /** + * Input mask. Mask may include filter-flags and literal characters. + * Literal characters are part of mask which cannot be modified by end user. In order to use a filter-flag as a literal character, the escape "\\" character should be used. + * Default is "CCCCCCCCCC" + * Note: optional flags/entries affect the value returned by get of the [value](ui.igmaskeditor#methods:value) methods. + * List of filter-flags: + * C: any keyboard character. Entry is optional. + * &: any keyboard character. Entry is required. + * a: letter or digit character. Entry is optional. + * A: letter or digit character. Entry is required. + * ?: letter character. Entry is optional. + * L: letter character. Entry is required. + * 9: digit character. Entry is optional. + * 0: digit character. Entry is required. + * #: digit character or "+" or "_". Entry is optional with replacement by [emptyChar](ui.igmaskeditor#options:emptyChar) or by [padChar](ui.igmaskeditor#options:padChar). + * >: all letters to the right are converted to the upper case. In order to disable conversion, the ">" flag should be used again. + * <: all letters to the right are converted to the lower case. In order to disable conversion, the "<" flag should be used again. + * Note! This option can not be set runtime. + * + * + * @optionValue New value to be set. + */ + igMaskEditor(optionLiteral: 'option', optionName: "inputMask", optionValue: string): void; + + /** + * Gets/Sets type of value returned by the get of [value](ui.igmaskeditor#methods:value) method. That also affects functionality of the set value(val) method and the copy/paste operations of browser. + * + */ + igMaskEditor(optionLiteral: 'option', optionName: "dataMode"): string; + + /** + * /Sets type of value returned by the get of [value](ui.igmaskeditor#methods:value) method. That also affects functionality of the set value(val) method and the copy/paste operations of browser. + * + * + * @optionValue New value to be set. + */ + igMaskEditor(optionLiteral: 'option', optionName: "dataMode", optionValue: string): void; + + /** + * Gets character which is used as prompt in edit mode for available entry position. + * + */ + igMaskEditor(optionLiteral: 'option', optionName: "unfilledCharsPrompt"): string; + + /** + * Character which is used as prompt in edit mode for available entry position. + * + * + * @optionValue New value to be set. + */ + igMaskEditor(optionLiteral: 'option', optionName: "unfilledCharsPrompt", optionValue: string): void; + + /** + * Gets/Sets character which is used as replacement of not-filled required position in mask when editor is in display mode (not focused). Note that this option is visible, only when the [revertIfNotValid](ui.igmaskeditor#options:revertIfNotValid) option is set to false. + * + */ + igMaskEditor(optionLiteral: 'option', optionName: "padChar"): string; + + /** + * /Sets character which is used as replacement of not-filled required position in mask when editor is in display mode (not focused). Note that this option is visible, only when the [revertIfNotValid](ui.igmaskeditor#options:revertIfNotValid) option is set to false. + * + * + * @optionValue New value to be set. + */ + igMaskEditor(optionLiteral: 'option', optionName: "padChar", optionValue: string): void; + + /** + * Gets/Sets character which is used as replacement of not-filled required position in mask when application calls get for the [value](ui.igmaskeditor#methods:value) methods. + * + */ + igMaskEditor(optionLiteral: 'option', optionName: "emptyChar"): string; + + /** + * /Sets character which is used as replacement of not-filled required position in mask when application calls get for the [value](ui.igmaskeditor#methods:value) methods. + * + * + * @optionValue New value to be set. + */ + igMaskEditor(optionLiteral: 'option', optionName: "emptyChar", optionValue: string): void; + + /** + * Gets ability to enter only specific characters in input-field from keyboard and on paste. + * Notes: + * If "excludeKeys" option contains same characters as this option, then "excludeKeys" has priority. + * Note! This option can not be se runtime. + * + */ + igMaskEditor(optionLiteral: 'option', optionName: "includeKeys"): string; + + /** + * Ability to enter only specific characters in input-field from keyboard and on paste. + * Notes: + * If "excludeKeys" option contains same characters as this option, then "excludeKeys" has priority. + * Note! This option can not be se runtime. + * + * + * @optionValue New value to be set. + */ + igMaskEditor(optionLiteral: 'option', optionName: "includeKeys", optionValue: string): void; + + /** + * Gets ability to prevent entering specific characters from keyboard or on paste. + * Notes: + * If a character is specified in "includeKeys" option also, then "excludeKeys" has priority. + * Note! This option can not be se runtime. + * + */ + igMaskEditor(optionLiteral: 'option', optionName: "excludeKeys"): string; + + /** + * Ability to prevent entering specific characters from keyboard or on paste. + * Notes: + * If a character is specified in "includeKeys" option also, then "excludeKeys" has priority. + * Note! This option can not be se runtime. + * + * + * @optionValue New value to be set. + */ + igMaskEditor(optionLiteral: 'option', optionName: "excludeKeys", optionValue: string): void; + + /** + * Gets/Sets the ability of the editor to automatically change the hoverd item into the opened dropdown list to its oposide side. + */ + igMaskEditor(optionLiteral: 'option', optionName: "spinWrapAround"): boolean; + + /** + * /Sets the ability of the editor to automatically change the hoverd item into the opened dropdown list to its oposide side. + * + * @optionValue New value to be set. + */ + igMaskEditor(optionLiteral: 'option', optionName: "spinWrapAround", optionValue: boolean): void; + + /** + * Sets gets list of items which are used for drop-down list. + * Items in list can be strings, numbers or objects. The items are directly rendered without casting, or manipulating them. + */ + igMaskEditor(optionLiteral: 'option', optionName: "listItems"): any[]; + + /** + * Sets gets list of items which are used for drop-down list. + * Items in list can be strings, numbers or objects. The items are directly rendered without casting, or manipulating them. + * + * @optionValue New value to be set. + */ + igMaskEditor(optionLiteral: 'option', optionName: "listItems", optionValue: any[]): void; + + /** + * Sets gets custom width of drop-down list in pixels. If value is equal to 0 or negative, then the width of editor is used. + */ + igMaskEditor(optionLiteral: 'option', optionName: "listWidth"): number; + + /** + * Sets gets custom width of drop-down list in pixels. If value is equal to 0 or negative, then the width of editor is used. + * + * @optionValue New value to be set. + */ + igMaskEditor(optionLiteral: 'option', optionName: "listWidth", optionValue: number): void; + + /** + * Sets the hover/unhover animation duration. + */ + igMaskEditor(optionLiteral: 'option', optionName: "listItemHoverDuration"): number; + + /** + * Sets the hover/unhover animation duration. + * + * @optionValue New value to be set. + */ + igMaskEditor(optionLiteral: 'option', optionName: "listItemHoverDuration", optionValue: number): void; + + /** + * Sets the ability to allow values only set into the list items. This validation is done only when the editor is blured, or enter key is pressed + */ + igMaskEditor(optionLiteral: 'option', optionName: "isLimitedToListValues"): boolean; + + /** + * Sets the ability to allow values only set into the list items. This validation is done only when the editor is blured, or enter key is pressed + * + * @optionValue New value to be set. + */ + igMaskEditor(optionLiteral: 'option', optionName: "isLimitedToListValues", optionValue: boolean): void; + + /** + * This option is inherited from a parent widget and it's not applicable for igMaskEditor + */ + igMaskEditor(optionLiteral: 'option', optionName: "dropDownOrientation"): string; + + /** + * This option is inherited from a parent widget and it's not applicable for igMaskEditor + * + * @optionValue New value to be set. + */ + igMaskEditor(optionLiteral: 'option', optionName: "dropDownOrientation", optionValue: string): void; + + /** + * This option is inherited from a parent widget and it's not applicable for igMaskEditor + */ + igMaskEditor(optionLiteral: 'option', optionName: "dropDownAttachedToBody"): boolean; + + /** + * This option is inherited from a parent widget and it's not applicable for igMaskEditor + * + * @optionValue New value to be set. + */ + igMaskEditor(optionLiteral: 'option', optionName: "dropDownAttachedToBody", optionValue: boolean): void; + + /** + * This option is inherited from a parent widget and it's not applicable for igMaskEditor + */ + igMaskEditor(optionLiteral: 'option', optionName: "dropDownAnimationDuration"): number; + + /** + * This option is inherited from a parent widget and it's not applicable for igMaskEditor + * + * @optionValue New value to be set. + */ + igMaskEditor(optionLiteral: 'option', optionName: "dropDownAnimationDuration", optionValue: number): void; + + /** + * This option is inherited from a parent widget and it's not applicable for igMaskEditor + */ + igMaskEditor(optionLiteral: 'option', optionName: "dropDownOnReadOnly"): boolean; + + /** + * This option is inherited from a parent widget and it's not applicable for igMaskEditor + * + * @optionValue New value to be set. + */ + igMaskEditor(optionLiteral: 'option', optionName: "dropDownOnReadOnly", optionValue: boolean): void; + + /** + */ + igMaskEditor(optionLiteral: 'option', optionName: "textMode"): any; + + /** + */ + igMaskEditor(optionLiteral: 'option', optionName: "textMode", optionValue: any): void; + + /** + * Gets/Sets how many items should be shown at once. + * Notes: + * That option is overwritten if the number of list items is less than the value. In that case the height of the dropdown is adjusted to the number of items. + * Note! This option can not be set runtime. + */ + igMaskEditor(optionLiteral: 'option', optionName: "visibleItemsCount"): number; + + /** + * /Sets how many items should be shown at once. + * Notes: + * That option is overwritten if the number of list items is less than the value. In that case the height of the dropdown is adjusted to the number of items. + * Note! This option can not be set runtime. + * + * @optionValue New value to be set. + */ + igMaskEditor(optionLiteral: 'option', optionName: "visibleItemsCount", optionValue: number): void; + + /** + * This option is inherited from a parent widget and it's not applicable for igMaskEditor + */ + igMaskEditor(optionLiteral: 'option', optionName: "maxLength"): any; + + /** + * This option is inherited from a parent widget and it's not applicable for igMaskEditor + * + * @optionValue New value to be set. + */ + igMaskEditor(optionLiteral: 'option', optionName: "maxLength", optionValue: any): void; + + /** + * Gets/Sets value in editor. The effect of setting/getting that option depends on type of editor and on dataMode options for every type of editor. + * + */ + igMaskEditor(optionLiteral: 'option', optionName: "value"): any; + + /** + * /Sets value in editor. The effect of setting/getting that option depends on type of editor and on dataMode options for every type of editor. + * + * + * @optionValue New value to be set. + */ + igMaskEditor(optionLiteral: 'option', optionName: "value", optionValue: any): void; + + /** + * Gets/Sets the horizontal alignment of the text in the editor. + * + */ + igMaskEditor(optionLiteral: 'option', optionName: "textAlign"): string; + + /** + * /Sets the horizontal alignment of the text in the editor. + * + * + * @optionValue New value to be set. + */ + igMaskEditor(optionLiteral: 'option', optionName: "textAlign", optionValue: string): void; + + /** + * Gets/Sets the text which appears in the editor when it has no focus and the "value" is null or empty string. + * + */ + igMaskEditor(optionLiteral: 'option', optionName: "placeHolder"): string; + + /** + * /Sets the text which appears in the editor when it has no focus and the "value" is null or empty string. + * + * + * @optionValue New value to be set. + */ + igMaskEditor(optionLiteral: 'option', optionName: "placeHolder", optionValue: string): void; + + /** + * Gets/Sets the action when the editor gets focused. The default value is selectAll. + * + */ + igMaskEditor(optionLiteral: 'option', optionName: "selectionOnFocus"): string; + + /** + * /Sets the action when the editor gets focused. The default value is selectAll. + * + * + * @optionValue New value to be set. + */ + igMaskEditor(optionLiteral: 'option', optionName: "selectionOnFocus", optionValue: string): void; + + /** + * Gets/Sets if the editor should revert it's value to the previously valid value in case the value on blur, or enter key is not valid. If the opiton is set to false, editor calls clear functionality. + * + */ + igMaskEditor(optionLiteral: 'option', optionName: "revertIfNotValid"): boolean; + + /** + * /Sets if the editor should revert it's value to the previously valid value in case the value on blur, or enter key is not valid. If the opiton is set to false, editor calls clear functionality. + * + * + * @optionValue New value to be set. + */ + igMaskEditor(optionLiteral: 'option', optionName: "revertIfNotValid", optionValue: boolean): void; + + /** + * Gets/Sets if the editor should prevent form submition when enter key is pressed. + * + */ + igMaskEditor(optionLiteral: 'option', optionName: "preventSubmitOnEnter"): boolean; + + /** + * /Sets if the editor should prevent form submition when enter key is pressed. + * + * + * @optionValue New value to be set. + */ + igMaskEditor(optionLiteral: 'option', optionName: "preventSubmitOnEnter", optionValue: boolean): void; + + /** + * Gets/Sets the ability to convert the input characters to upper case (true) or keeps the characters as they are (false). The option has effect only while keyboard entries and paste. + * Note! When the option is set at runtime the editor is not changing the current value. + * + */ + igMaskEditor(optionLiteral: 'option', optionName: "toUpper"): boolean; + + /** + * /Sets the ability to convert the input characters to upper case (true) or keeps the characters as they are (false). The option has effect only while keyboard entries and paste. + * Note! When the option is set at runtime the editor is not changing the current value. + * + * + * @optionValue New value to be set. + */ + igMaskEditor(optionLiteral: 'option', optionName: "toUpper", optionValue: boolean): void; + + /** + * Gets/Sets the ability to convert the input characters to lower case (true) or keeps the characters as they are (false). The option has effect only while keyboard entries and paste. + * Note! When the option is set at runtime the editor is not changing the current value. + * + */ + igMaskEditor(optionLiteral: 'option', optionName: "toLower"): boolean; + + /** + * /Sets the ability to convert the input characters to lower case (true) or keeps the characters as they are (false). The option has effect only while keyboard entries and paste. + * Note! When the option is set at runtime the editor is not changing the current value. + * + * + * @optionValue New value to be set. + */ + igMaskEditor(optionLiteral: 'option', optionName: "toLower", optionValue: boolean): void; + + /** + * Gets/Sets the strings used for the localization of the component. This includes button titles, error messages etc. Value of the object should contain pairs or key:value members. Note: any sub-option of locale can appear within the main option of igEditor. In this case those values within main options will have highest priority and override corresponding value in locale. + * + */ + igMaskEditor(optionLiteral: 'option', optionName: "locale"): any; + + /** + * /Sets the strings used for the localization of the component. This includes button titles, error messages etc. Value of the object should contain pairs or key:value members. Note: any sub-option of locale can appear within the main option of igEditor. In this case those values within main options will have highest priority and override corresponding value in locale. + * + * + * @optionValue New value to be set. + */ + igMaskEditor(optionLiteral: 'option', optionName: "locale", optionValue: any): void; + + /** + * Disables/Enables default notifications for basic validation scenarios built in the editors such as required list selection, value wrapping around or spin limits. + * + */ + igMaskEditor(optionLiteral: 'option', optionName: "suppressNotifications"): boolean; + + /** + * Disables/Enables default notifications for basic validation scenarios built in the editors such as required list selection, value wrapping around or spin limits. + * + * + * @optionValue New value to be set. + */ + igMaskEditor(optionLiteral: 'option', optionName: "suppressNotifications", optionValue: boolean): void; + + /** + * Gets/Sets the width of the control. + * + */ + igMaskEditor(optionLiteral: 'option', optionName: "width"): string|number; + + /** + * /Sets the width of the control. + * + * + * @optionValue New value to be set. + */ + igMaskEditor(optionLiteral: 'option', optionName: "width", optionValue: string|number): void; + + /** + * Gets/Sets the height of the control. + * + */ + igMaskEditor(optionLiteral: 'option', optionName: "height"): string|number; + + /** + * /Sets the height of the control. + * + * + * @optionValue New value to be set. + */ + igMaskEditor(optionLiteral: 'option', optionName: "height", optionValue: string|number): void; + + /** + * Gets/Sets tabIndex attribute for the editor input. + * + */ + igMaskEditor(optionLiteral: 'option', optionName: "tabIndex"): number; + + /** + * /Sets tabIndex attribute for the editor input. + * + * + * @optionValue New value to be set. + */ + igMaskEditor(optionLiteral: 'option', optionName: "tabIndex", optionValue: number): void; + + /** + * Gets/Sets whether the editor value can become null. + * If that option is false, and editor has no value, then value is set to an empty string. + * + */ + igMaskEditor(optionLiteral: 'option', optionName: "allowNullValue"): boolean; + + /** + * /Sets whether the editor value can become null. + * If that option is false, and editor has no value, then value is set to an empty string. + * + * + * @optionValue New value to be set. + */ + igMaskEditor(optionLiteral: 'option', optionName: "allowNullValue", optionValue: boolean): void; + + /** + * Gets/Sets the representation of null value. In case of default the value for the input is set to null, which makes the input to hold an empty string + * + */ + igMaskEditor(optionLiteral: 'option', optionName: "nullValue"): string|number; + + /** + * /Sets the representation of null value. In case of default the value for the input is set to null, which makes the input to hold an empty string + * + * + * @optionValue New value to be set. + */ + igMaskEditor(optionLiteral: 'option', optionName: "nullValue", optionValue: string|number): void; + + /** + * Gets/Sets the name attribute of the value input. This input is used to sent the value to the server. In case the target element is input and it has name attribute, but the developer has set the inputName option, so this option overwrites the value input and removes the attribute from the element. + * + */ + igMaskEditor(optionLiteral: 'option', optionName: "inputName"): string; + + /** + * /Sets the name attribute of the value input. This input is used to sent the value to the server. In case the target element is input and it has name attribute, but the developer has set the inputName option, so this option overwrites the value input and removes the attribute from the element. + * + * + * @optionValue New value to be set. + */ + igMaskEditor(optionLiteral: 'option', optionName: "inputName", optionValue: string): void; + + /** + * Gets/Sets the readonly attribute for the input. If set to true the input is readonly, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is submitted. + * + */ + igMaskEditor(optionLiteral: 'option', optionName: "readOnly"): boolean; + + /** + * /Sets the readonly attribute for the input. If set to true the input is readonly, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is submitted. + * + * + * @optionValue New value to be set. + */ + igMaskEditor(optionLiteral: 'option', optionName: "readOnly", optionValue: boolean): void; + + /** + * Gets/Sets the disabled attribute for the input. If set to true the input is disabled, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is not submitted. + * + */ + igMaskEditor(optionLiteral: 'option', optionName: "disabled"): boolean; + + /** + * /Sets the disabled attribute for the input. If set to true the input is disabled, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is not submitted. + * + * + * @optionValue New value to be set. + */ + igMaskEditor(optionLiteral: 'option', optionName: "disabled", optionValue: boolean): void; + + /** + * Gets/Sets options supported by the [igValidator](ui.igvalidator#options) widget. + * Note: Validation rules of [igValidator](ui.igvalidator#options), such as min and max value/length are applied separately triggering errors, + * while the corresponding options of the editor prevent values violating the defined rules from being entered. + * + */ + igMaskEditor(optionLiteral: 'option', optionName: "validatorOptions"): any; + + /** + * /Sets options supported by the [igValidator](ui.igvalidator#options) widget. + * Note: Validation rules of [igValidator](ui.igvalidator#options), such as min and max value/length are applied separately triggering errors, + * while the corresponding options of the editor prevent values violating the defined rules from being entered. + * + * + * @optionValue New value to be set. + */ + igMaskEditor(optionLiteral: 'option', optionName: "validatorOptions", optionValue: any): void; + + /** + */ + igMaskEditor(optionLiteral: 'option', optionName: "dropDownListOpening"): DropDownListOpeningEvent; + + /** + */ + igMaskEditor(optionLiteral: 'option', optionName: "dropDownListOpening", optionValue: DropDownListOpeningEvent): void; + + /** + */ + igMaskEditor(optionLiteral: 'option', optionName: "dropDownListOpened"): DropDownListOpenedEvent; + + /** + */ + igMaskEditor(optionLiteral: 'option', optionName: "dropDownListOpened", optionValue: DropDownListOpenedEvent): void; + + /** + */ + igMaskEditor(optionLiteral: 'option', optionName: "dropDownListClosing"): DropDownListClosingEvent; + + /** + */ + igMaskEditor(optionLiteral: 'option', optionName: "dropDownListClosing", optionValue: DropDownListClosingEvent): void; + + /** + */ + igMaskEditor(optionLiteral: 'option', optionName: "dropDownListClosed"): DropDownListClosedEvent; + + /** + */ + igMaskEditor(optionLiteral: 'option', optionName: "dropDownListClosed", optionValue: DropDownListClosedEvent): void; + + /** + */ + igMaskEditor(optionLiteral: 'option', optionName: "dropDownItemSelecting"): DropDownItemSelectingEvent; + + /** + */ + igMaskEditor(optionLiteral: 'option', optionName: "dropDownItemSelecting", optionValue: DropDownItemSelectingEvent): void; + + /** + */ + igMaskEditor(optionLiteral: 'option', optionName: "dropDownItemSelected"): DropDownItemSelectedEvent; + + /** + */ + igMaskEditor(optionLiteral: 'option', optionName: "dropDownItemSelected", optionValue: DropDownItemSelectedEvent): void; + + /** + * Event which is raised after text in the editor was changed. It can be raised when keyUp event occurs, + * when the clear button is clicked or when an item from a list is selected. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.text to obtain new text + * Use ui.oldText to obtain the old text. + */ + igMaskEditor(optionLiteral: 'option', optionName: "textChanged"): TextChangedEvent; + + /** + * Event which is raised after text in the editor was changed. It can be raised when keyUp event occurs, + * when the clear button is clicked or when an item from a list is selected. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.text to obtain new text + * Use ui.oldText to obtain the old text. + * + * @optionValue Define event handler function. + */ + igMaskEditor(optionLiteral: 'option', optionName: "textChanged", optionValue: TextChangedEvent): void; + igMaskEditor(options: IgMaskEditor): JQuery; + igMaskEditor(optionLiteral: 'option', optionName: string): any; + igMaskEditor(optionLiteral: 'option', options: IgMaskEditor): JQuery; + igMaskEditor(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igMaskEditor(methodName: string, ...methodParams: any[]): any; +} +interface JQuery { + igDateEditor(methodName: "value", newValue?: Object): Object; + igDateEditor(methodName: "getSelectedDate"): Object; + igDateEditor(methodName: "selectDate", date: Object): void; + igDateEditor(methodName: "spinUp", delta?: number): void; + igDateEditor(methodName: "spinDown", delta?: number): void; + igDateEditor(methodName: "spinUpButton"): string; + igDateEditor(methodName: "spinDownButton"): string; + igDateEditor(methodName: "isValid"): boolean; + igDateEditor(methodName: "dropDownButton"): void; + igDateEditor(methodName: "dropDownContainer"): void; + igDateEditor(methodName: "dropDownVisible"): void; + igDateEditor(methodName: "findListItemIndex"): void; + igDateEditor(methodName: "getSelectedListItem"): void; + igDateEditor(methodName: "selectedListIndex"): void; + igDateEditor(methodName: "showDropDown"): void; + igDateEditor(methodName: "hideDropDown"): void; + + /** + * Gets/Sets the value of the editor. Date object can be set as value. String can be set and the editor will pass it to the Date object constructor and use the corresponding Date object as the value. MVC date format can be used too. + * Note! This option doesn't use the displayInputFormat to extract the date. + * + */ + igDateEditor(optionLiteral: 'option', optionName: "value"): Object; + + /** + * /Sets the value of the editor. Date object can be set as value. String can be set and the editor will pass it to the Date object constructor and use the corresponding Date object as the value. MVC date format can be used too. + * Note! This option doesn't use the displayInputFormat to extract the date. + * + * + * @optionValue New value to be set. + */ + igDateEditor(optionLiteral: 'option', optionName: "value", optionValue: Object): void; + + /** + * Gets the minimum value which can be entered in editor by user. Date object can be set as value. String value can be passed and the editor will use the javascript Date object constructor to create date object and will use it for the comparison. MVC date format can be used too. + * Note! This option doesn't use the displayInputFormat to extract the date. + * + */ + igDateEditor(optionLiteral: 'option', optionName: "minValue"): Object; + + /** + * The minimum value which can be entered in editor by user. Date object can be set as value. String value can be passed and the editor will use the javascript Date object constructor to create date object and will use it for the comparison. MVC date format can be used too. + * Note! This option doesn't use the displayInputFormat to extract the date. + * + * + * @optionValue New value to be set. + */ + igDateEditor(optionLiteral: 'option', optionName: "minValue", optionValue: Object): void; + + /** + * Gets the maximum value which can be entered in editor by user. Date object can be set as value. String value can be passed and the editor will use the javascript Date object constructor to create date object and will use it for the comparison. MVC date format can be used too. + * Note! This option doesn't use the displayInputFormat to extract the date. + * + */ + igDateEditor(optionLiteral: 'option', optionName: "maxValue"): Object; + + /** + * The maximum value which can be entered in editor by user. Date object can be set as value. String value can be passed and the editor will use the javascript Date object constructor to create date object and will use it for the comparison. MVC date format can be used too. + * Note! This option doesn't use the displayInputFormat to extract the date. + * + * + * @optionValue New value to be set. + */ + igDateEditor(optionLiteral: 'option', optionName: "maxValue", optionValue: Object): void; + + /** + * Gets/Sets format of date while editor has no focus. + * Value of that option can be set to a specific date pattern or to a flag defined by regional settings. + * If value is not set, then the dateInputFormat is used automatically. + * If value is set to explicit date pattern and pattern besides date-flags has explicit characters which match with date-flags or mask-flags, then the "escape" character should be used in front of them. + * List of predefined regional flags: + * "date": the datePattern member of regional option is used + * "dateLong": the dateLongPattern member of regional option is used + * "time": the timePattern member of regional option is used + * "timeLong": the timeLongPattern member of regional option is used + * "dateTime": the dateTimePattern member of regional option is used + * List of explicit characters, which should have escape \\ character in front of them: + * C, &, a, A, ?, L, 9, 0, #, >, <, y, M, d, h, H, m, s, t, f. + * List of date-flags when explicit date pattern is used: + * "y": year field without century and without leading zero + * "yy": year field without century and with leading zero + * "yyyy": year field with leading zeros + * "M": month field as digit without leading zero + * "MM": month field as digit with leading zero + * "MMM": month field as short month name + * "MMMM": month field as long month name + * "d": day of month field without leading zero + * "dd": day of month field with leading zero + * "ddd": day of the week as short name + * "dddd": day of the week as long name + * "t": first character of string which represents AM/PM field + * "tt": 2 characters of string which represents AM/PM field + * "h": hours field in 12-hours format without leading zero + * "hh": hours field in 12-hours format with leading zero + * "H": hours field in 24-hours format without leading zero + * "HH": hours field in 24-hours format with leading zero + * "m": minutes field without leading zero + * "mm": minutes field with leading zero + * "s": seconds field without leading zero + * "ss": seconds field with leading zero + * "f": milliseconds field in hundreds + * "ff": milliseconds field in tenths + * "fff": milliseconds field + * + */ + igDateEditor(optionLiteral: 'option', optionName: "dateDisplayFormat"): string; + + /** + * /Sets format of date while editor has no focus. + * Value of that option can be set to a specific date pattern or to a flag defined by regional settings. + * If value is not set, then the dateInputFormat is used automatically. + * If value is set to explicit date pattern and pattern besides date-flags has explicit characters which match with date-flags or mask-flags, then the "escape" character should be used in front of them. + * List of predefined regional flags: + * "date": the datePattern member of regional option is used + * "dateLong": the dateLongPattern member of regional option is used + * "time": the timePattern member of regional option is used + * "timeLong": the timeLongPattern member of regional option is used + * "dateTime": the dateTimePattern member of regional option is used + * List of explicit characters, which should have escape \\ character in front of them: + * C, &, a, A, ?, L, 9, 0, #, >, <, y, M, d, h, H, m, s, t, f. + * List of date-flags when explicit date pattern is used: + * "y": year field without century and without leading zero + * "yy": year field without century and with leading zero + * "yyyy": year field with leading zeros + * "M": month field as digit without leading zero + * "MM": month field as digit with leading zero + * "MMM": month field as short month name + * "MMMM": month field as long month name + * "d": day of month field without leading zero + * "dd": day of month field with leading zero + * "ddd": day of the week as short name + * "dddd": day of the week as long name + * "t": first character of string which represents AM/PM field + * "tt": 2 characters of string which represents AM/PM field + * "h": hours field in 12-hours format without leading zero + * "hh": hours field in 12-hours format with leading zero + * "H": hours field in 24-hours format without leading zero + * "HH": hours field in 24-hours format with leading zero + * "m": minutes field without leading zero + * "mm": minutes field with leading zero + * "s": seconds field without leading zero + * "ss": seconds field with leading zero + * "f": milliseconds field in hundreds + * "ff": milliseconds field in tenths + * "fff": milliseconds field + * + * + * @optionValue New value to be set. + */ + igDateEditor(optionLiteral: 'option', optionName: "dateDisplayFormat", optionValue: string): void; + + /** + * Gets format of date while editor has focus. + * Value of that option can be set to explicit date pattern or to a flag defined by regional settings. + * If value is set to explicit date pattern and pattern besides date-flags has explicit characters which match with date-flags or mask-flags, then the "escape" character should be used in front of them. + * If option is not set, then the "date" is used automatically. + * List of predefined regional flags: + * "date": the datePattern member of regional option is used + * "dateLong": the dateLongPattern member of regional option is used + * "time": the timePattern member of regional option is used + * "timeLong": the timeLongPattern member of regional option is used + * "dateTime": the dateTimePattern member of regional option is used + * List of explicit characters, which should have escape \\ character in front of them: C, &, a, A, ?, L, 9, 0, #, >, <, y, M, d, h, H, m, s, t, f. + * List of date-flags when explicit date pattern is used: + * "yy": year field without century and with leading zero + * "yyyy": year field with leading zeros + * "MM": month field as digit with leading zero + * "dd": day of month field with leading zero + * "t": first character of string which represents AM/PM field + * "tt": 2 characters of string which represents AM/PM field + * "hh": hours field in 12-hours format with leading zero + * "HH": hours field in 24-hours format with leading zero + * "mm": minutes field with leading zero + * "ss": seconds field with leading zero + * "f": milliseconds field in hundreds + * "ff": milliseconds field in tenths + * "fff": milliseconds field + * Note! This option can not be set runtime. + * + */ + igDateEditor(optionLiteral: 'option', optionName: "dateInputFormat"): string; + + /** + * Format of date while editor has focus. + * Value of that option can be set to explicit date pattern or to a flag defined by regional settings. + * If value is set to explicit date pattern and pattern besides date-flags has explicit characters which match with date-flags or mask-flags, then the "escape" character should be used in front of them. + * If option is not set, then the "date" is used automatically. + * List of predefined regional flags: + * "date": the datePattern member of regional option is used + * "dateLong": the dateLongPattern member of regional option is used + * "time": the timePattern member of regional option is used + * "timeLong": the timeLongPattern member of regional option is used + * "dateTime": the dateTimePattern member of regional option is used + * List of explicit characters, which should have escape \\ character in front of them: C, &, a, A, ?, L, 9, 0, #, >, <, y, M, d, h, H, m, s, t, f. + * List of date-flags when explicit date pattern is used: + * "yy": year field without century and with leading zero + * "yyyy": year field with leading zeros + * "MM": month field as digit with leading zero + * "dd": day of month field with leading zero + * "t": first character of string which represents AM/PM field + * "tt": 2 characters of string which represents AM/PM field + * "hh": hours field in 12-hours format with leading zero + * "HH": hours field in 24-hours format with leading zero + * "mm": minutes field with leading zero + * "ss": seconds field with leading zero + * "f": milliseconds field in hundreds + * "ff": milliseconds field in tenths + * "fff": milliseconds field + * Note! This option can not be set runtime. + * + * + * @optionValue New value to be set. + */ + igDateEditor(optionLiteral: 'option', optionName: "dateInputFormat", optionValue: string): void; + + /** + * Gets/Sets the value type returned by the get of value() method. That also affects functionality of the set value(val) method and the copy/paste operations of browser. + * Note: That is used as default. + * + */ + igDateEditor(optionLiteral: 'option', optionName: "dataMode"): string; + + /** + * /Sets the value type returned by the get of value() method. That also affects functionality of the set value(val) method and the copy/paste operations of browser. + * Note: That is used as default. + * + * + * @optionValue New value to be set. + */ + igDateEditor(optionLiteral: 'option', optionName: "dataMode", optionValue: string): void; + + /** + * Gets visibility of the spin and clear buttons. That option can be set only on initialization. Combinations like 'spin,clear' are supported too. + * + */ + igDateEditor(optionLiteral: 'option', optionName: "buttonType"): string; + + /** + * Visibility of the spin and clear buttons. That option can be set only on initialization. Combinations like 'spin,clear' are supported too. + * + * + * @optionValue New value to be set. + */ + igDateEditor(optionLiteral: 'option', optionName: "buttonType", optionValue: string): void; + + /** + * Gets/Sets delta-value which is used to increment or decrement value in editor on spin events. If value is set to negative value an exception is thrown. Non integer value is supported only for dataMode double and float. + * + */ + igDateEditor(optionLiteral: 'option', optionName: "spinDelta"): number; + + /** + * /Sets delta-value which is used to increment or decrement value in editor on spin events. If value is set to negative value an exception is thrown. Non integer value is supported only for dataMode double and float. + * + * + * @optionValue New value to be set. + */ + igDateEditor(optionLiteral: 'option', optionName: "spinDelta", optionValue: number): void; + + /** + * Gets/Sets ability to modify only 1 date field on spin events. + * Value false enables changes of other date fields when incremented or decremented date-field reaches its limits. + * Value true modifies only value of one field. + * + */ + igDateEditor(optionLiteral: 'option', optionName: "limitSpinToCurrentField"): boolean; + + /** + * /Sets ability to modify only 1 date field on spin events. + * Value false enables changes of other date fields when incremented or decremented date-field reaches its limits. + * Value true modifies only value of one field. + * + * + * @optionValue New value to be set. + */ + igDateEditor(optionLiteral: 'option', optionName: "limitSpinToCurrentField", optionValue: boolean): void; + + /** + * Gets/Sets formatting of the dates as UTC. + * That option is supported only when dataMode option is 'date' and Date objects are used to get/set value of editor. + * Notes: + * That option affects only functionality of get/set value method and the Date-value, which was set on initialization. + * When application uses the set-value, then internal Date-value and displayed-text is incremented by TimezoneOffset. + * When application uses the get-value, then editor returns internal Date-value decremented by TimezoneOffset. + * When that option is modified after initialization, then displayed text and internal Date-value are not affected. + * It is not recommended to change that option without resetting Date-value. + * + */ + igDateEditor(optionLiteral: 'option', optionName: "enableUTCDates"): boolean; + + /** + * /Sets formatting of the dates as UTC. + * That option is supported only when dataMode option is 'date' and Date objects are used to get/set value of editor. + * Notes: + * That option affects only functionality of get/set value method and the Date-value, which was set on initialization. + * When application uses the set-value, then internal Date-value and displayed-text is incremented by TimezoneOffset. + * When application uses the get-value, then editor returns internal Date-value decremented by TimezoneOffset. + * When that option is modified after initialization, then displayed text and internal Date-value are not affected. + * It is not recommended to change that option without resetting Date-value. + * + * + * @optionValue New value to be set. + */ + igDateEditor(optionLiteral: 'option', optionName: "enableUTCDates", optionValue: boolean): void; + + /** + * Gets/Sets year for auto detection of 20th and 21st centuries. + * That option is used to automatically fill century when the user entered only 1 or 2 digits into the year field or when the date pattern contains only 1 or 2 year positions, e.g. "yy" or "y". + * If user entered value larger than value of this option, then 20th century is used, otherwise the 21st. + * + */ + igDateEditor(optionLiteral: 'option', optionName: "centuryThreshold"): number; + + /** + * /Sets year for auto detection of 20th and 21st centuries. + * That option is used to automatically fill century when the user entered only 1 or 2 digits into the year field or when the date pattern contains only 1 or 2 year positions, e.g. "yy" or "y". + * If user entered value larger than value of this option, then 20th century is used, otherwise the 21st. + * + * + * @optionValue New value to be set. + */ + igDateEditor(optionLiteral: 'option', optionName: "centuryThreshold", optionValue: number): void; + + /** + * Gets/Set value used to increase/decrease year part of the date, in order to set difference between year in Gregorian calendar and displayed year. + * + */ + igDateEditor(optionLiteral: 'option', optionName: "yearShift"): number; + + /** + * /Set value used to increase/decrease year part of the date, in order to set difference between year in Gregorian calendar and displayed year. + * + * + * @optionValue New value to be set. + */ + igDateEditor(optionLiteral: 'option', optionName: "yearShift", optionValue: number): void; + + /** + * Gets/Sets the representation of null value. In case of default the value for the input is set to null, which makes the input to hold an empty string + * + */ + igDateEditor(optionLiteral: 'option', optionName: "nullValue"): string|number; + + /** + * /Sets the representation of null value. In case of default the value for the input is set to null, which makes the input to hold an empty string + * + * + * @optionValue New value to be set. + */ + igDateEditor(optionLiteral: 'option', optionName: "nullValue", optionValue: string|number): void; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + */ + igDateEditor(optionLiteral: 'option', optionName: "isLimitedToListValues"): boolean; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + * + * @optionValue New value to be set. + */ + igDateEditor(optionLiteral: 'option', optionName: "isLimitedToListValues", optionValue: boolean): void; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + */ + igDateEditor(optionLiteral: 'option', optionName: "listItemHoverDuration"): number; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + * + * @optionValue New value to be set. + */ + igDateEditor(optionLiteral: 'option', optionName: "listItemHoverDuration", optionValue: number): void; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + */ + igDateEditor(optionLiteral: 'option', optionName: "listItems"): any; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + * + * @optionValue New value to be set. + */ + igDateEditor(optionLiteral: 'option', optionName: "listItems", optionValue: any): void; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + */ + igDateEditor(optionLiteral: 'option', optionName: "listWidth"): number; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + * + * @optionValue New value to be set. + */ + igDateEditor(optionLiteral: 'option', optionName: "listWidth", optionValue: number): void; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + */ + igDateEditor(optionLiteral: 'option', optionName: "dropDownAnimationDuration"): number; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + * + * @optionValue New value to be set. + */ + igDateEditor(optionLiteral: 'option', optionName: "dropDownAnimationDuration", optionValue: number): void; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + */ + igDateEditor(optionLiteral: 'option', optionName: "dropDownAttachedToBody"): boolean; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + * + * @optionValue New value to be set. + */ + igDateEditor(optionLiteral: 'option', optionName: "dropDownAttachedToBody", optionValue: boolean): void; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + */ + igDateEditor(optionLiteral: 'option', optionName: "dropDownOnReadOnly"): boolean; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + * + * @optionValue New value to be set. + */ + igDateEditor(optionLiteral: 'option', optionName: "dropDownOnReadOnly", optionValue: boolean): void; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + */ + igDateEditor(optionLiteral: 'option', optionName: "inputMask"): string; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + * + * @optionValue New value to be set. + */ + igDateEditor(optionLiteral: 'option', optionName: "inputMask", optionValue: string): void; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + */ + igDateEditor(optionLiteral: 'option', optionName: "unfilledCharsPrompt"): string; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + * + * @optionValue New value to be set. + */ + igDateEditor(optionLiteral: 'option', optionName: "unfilledCharsPrompt", optionValue: string): void; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + */ + igDateEditor(optionLiteral: 'option', optionName: "padChar"): string; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + * + * @optionValue New value to be set. + */ + igDateEditor(optionLiteral: 'option', optionName: "padChar", optionValue: string): void; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + */ + igDateEditor(optionLiteral: 'option', optionName: "emptyChar"): string; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + * + * @optionValue New value to be set. + */ + igDateEditor(optionLiteral: 'option', optionName: "emptyChar", optionValue: string): void; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + */ + igDateEditor(optionLiteral: 'option', optionName: "toUpper"): boolean; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + * + * @optionValue New value to be set. + */ + igDateEditor(optionLiteral: 'option', optionName: "toUpper", optionValue: boolean): void; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + */ + igDateEditor(optionLiteral: 'option', optionName: "toLower"): boolean; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + * + * @optionValue New value to be set. + */ + igDateEditor(optionLiteral: 'option', optionName: "toLower", optionValue: boolean): void; + + /** + * Gets custom regional settings for editor. If it is string, then $.ig.regional[stringValue] is assumed. + * + */ + igDateEditor(optionLiteral: 'option', optionName: "regional"): any; + + /** + * Custom regional settings for editor. If it is string, then $.ig.regional[stringValue] is assumed. + * + * + * @optionValue New value to be set. + */ + igDateEditor(optionLiteral: 'option', optionName: "regional", optionValue: any): void; + + /** + * Gets ability to enter only specific characters in input-field from keyboard and on paste. + * Notes: + * If "excludeKeys" option contains same characters as this option, then "excludeKeys" has priority. + * Note! This option can not be se runtime. + * + */ + igDateEditor(optionLiteral: 'option', optionName: "includeKeys"): string; + + /** + * Ability to enter only specific characters in input-field from keyboard and on paste. + * Notes: + * If "excludeKeys" option contains same characters as this option, then "excludeKeys" has priority. + * Note! This option can not be se runtime. + * + * + * @optionValue New value to be set. + */ + igDateEditor(optionLiteral: 'option', optionName: "includeKeys", optionValue: string): void; + + /** + * Gets ability to prevent entering specific characters from keyboard or on paste. + * Notes: + * If a character is specified in "includeKeys" option also, then "excludeKeys" has priority. + * Note! This option can not be se runtime. + * + */ + igDateEditor(optionLiteral: 'option', optionName: "excludeKeys"): string; + + /** + * Ability to prevent entering specific characters from keyboard or on paste. + * Notes: + * If a character is specified in "includeKeys" option also, then "excludeKeys" has priority. + * Note! This option can not be se runtime. + * + * + * @optionValue New value to be set. + */ + igDateEditor(optionLiteral: 'option', optionName: "excludeKeys", optionValue: string): void; + + /** + * Gets/Sets the ability of the editor to automatically change the hoverd item into the opened dropdown list to its oposide side. + */ + igDateEditor(optionLiteral: 'option', optionName: "spinWrapAround"): boolean; + + /** + * /Sets the ability of the editor to automatically change the hoverd item into the opened dropdown list to its oposide side. + * + * @optionValue New value to be set. + */ + igDateEditor(optionLiteral: 'option', optionName: "spinWrapAround", optionValue: boolean): void; + + /** + * This option is inherited from a parent widget and it's not applicable for igMaskEditor + */ + igDateEditor(optionLiteral: 'option', optionName: "dropDownOrientation"): string; + + /** + * This option is inherited from a parent widget and it's not applicable for igMaskEditor + * + * @optionValue New value to be set. + */ + igDateEditor(optionLiteral: 'option', optionName: "dropDownOrientation", optionValue: string): void; + + /** + */ + igDateEditor(optionLiteral: 'option', optionName: "textMode"): any; + + /** + */ + igDateEditor(optionLiteral: 'option', optionName: "textMode", optionValue: any): void; + + /** + * Gets/Sets how many items should be shown at once. + * Notes: + * That option is overwritten if the number of list items is less than the value. In that case the height of the dropdown is adjusted to the number of items. + * Note! This option can not be set runtime. + */ + igDateEditor(optionLiteral: 'option', optionName: "visibleItemsCount"): number; + + /** + * /Sets how many items should be shown at once. + * Notes: + * That option is overwritten if the number of list items is less than the value. In that case the height of the dropdown is adjusted to the number of items. + * Note! This option can not be set runtime. + * + * @optionValue New value to be set. + */ + igDateEditor(optionLiteral: 'option', optionName: "visibleItemsCount", optionValue: number): void; + + /** + * This option is inherited from a parent widget and it's not applicable for igMaskEditor + */ + igDateEditor(optionLiteral: 'option', optionName: "maxLength"): any; + + /** + * This option is inherited from a parent widget and it's not applicable for igMaskEditor + * + * @optionValue New value to be set. + */ + igDateEditor(optionLiteral: 'option', optionName: "maxLength", optionValue: any): void; + + /** + * Gets/Sets the horizontal alignment of the text in the editor. + * + */ + igDateEditor(optionLiteral: 'option', optionName: "textAlign"): string; + + /** + * /Sets the horizontal alignment of the text in the editor. + * + * + * @optionValue New value to be set. + */ + igDateEditor(optionLiteral: 'option', optionName: "textAlign", optionValue: string): void; + + /** + * Gets/Sets the text which appears in the editor when it has no focus and the "value" is null or empty string. + * + */ + igDateEditor(optionLiteral: 'option', optionName: "placeHolder"): string; + + /** + * /Sets the text which appears in the editor when it has no focus and the "value" is null or empty string. + * + * + * @optionValue New value to be set. + */ + igDateEditor(optionLiteral: 'option', optionName: "placeHolder", optionValue: string): void; + + /** + * Gets/Sets the action when the editor gets focused. The default value is selectAll. + * + */ + igDateEditor(optionLiteral: 'option', optionName: "selectionOnFocus"): string; + + /** + * /Sets the action when the editor gets focused. The default value is selectAll. + * + * + * @optionValue New value to be set. + */ + igDateEditor(optionLiteral: 'option', optionName: "selectionOnFocus", optionValue: string): void; + + /** + * Gets/Sets if the editor should revert it's value to the previously valid value in case the value on blur, or enter key is not valid. If the opiton is set to false, editor calls clear functionality. + * + */ + igDateEditor(optionLiteral: 'option', optionName: "revertIfNotValid"): boolean; + + /** + * /Sets if the editor should revert it's value to the previously valid value in case the value on blur, or enter key is not valid. If the opiton is set to false, editor calls clear functionality. + * + * + * @optionValue New value to be set. + */ + igDateEditor(optionLiteral: 'option', optionName: "revertIfNotValid", optionValue: boolean): void; + + /** + * Gets/Sets if the editor should prevent form submition when enter key is pressed. + * + */ + igDateEditor(optionLiteral: 'option', optionName: "preventSubmitOnEnter"): boolean; + + /** + * /Sets if the editor should prevent form submition when enter key is pressed. + * + * + * @optionValue New value to be set. + */ + igDateEditor(optionLiteral: 'option', optionName: "preventSubmitOnEnter", optionValue: boolean): void; + + /** + * Gets/Sets the strings used for the localization of the component. This includes button titles, error messages etc. Value of the object should contain pairs or key:value members. Note: any sub-option of locale can appear within the main option of igEditor. In this case those values within main options will have highest priority and override corresponding value in locale. + * + */ + igDateEditor(optionLiteral: 'option', optionName: "locale"): any; + + /** + * /Sets the strings used for the localization of the component. This includes button titles, error messages etc. Value of the object should contain pairs or key:value members. Note: any sub-option of locale can appear within the main option of igEditor. In this case those values within main options will have highest priority and override corresponding value in locale. + * + * + * @optionValue New value to be set. + */ + igDateEditor(optionLiteral: 'option', optionName: "locale", optionValue: any): void; + + /** + * Disables/Enables default notifications for basic validation scenarios built in the editors such as required list selection, value wrapping around or spin limits. + * + */ + igDateEditor(optionLiteral: 'option', optionName: "suppressNotifications"): boolean; + + /** + * Disables/Enables default notifications for basic validation scenarios built in the editors such as required list selection, value wrapping around or spin limits. + * + * + * @optionValue New value to be set. + */ + igDateEditor(optionLiteral: 'option', optionName: "suppressNotifications", optionValue: boolean): void; + + /** + * Gets/Sets the width of the control. + * + */ + igDateEditor(optionLiteral: 'option', optionName: "width"): string|number; + + /** + * /Sets the width of the control. + * + * + * @optionValue New value to be set. + */ + igDateEditor(optionLiteral: 'option', optionName: "width", optionValue: string|number): void; + + /** + * Gets/Sets the height of the control. + * + */ + igDateEditor(optionLiteral: 'option', optionName: "height"): string|number; + + /** + * /Sets the height of the control. + * + * + * @optionValue New value to be set. + */ + igDateEditor(optionLiteral: 'option', optionName: "height", optionValue: string|number): void; + + /** + * Gets/Sets tabIndex attribute for the editor input. + * + */ + igDateEditor(optionLiteral: 'option', optionName: "tabIndex"): number; + + /** + * /Sets tabIndex attribute for the editor input. + * + * + * @optionValue New value to be set. + */ + igDateEditor(optionLiteral: 'option', optionName: "tabIndex", optionValue: number): void; + + /** + * Gets/Sets whether the editor value can become null. + * If that option is false, and editor has no value, then value is set to an empty string. + * + */ + igDateEditor(optionLiteral: 'option', optionName: "allowNullValue"): boolean; + + /** + * /Sets whether the editor value can become null. + * If that option is false, and editor has no value, then value is set to an empty string. + * + * + * @optionValue New value to be set. + */ + igDateEditor(optionLiteral: 'option', optionName: "allowNullValue", optionValue: boolean): void; + + /** + * Gets/Sets the name attribute of the value input. This input is used to sent the value to the server. In case the target element is input and it has name attribute, but the developer has set the inputName option, so this option overwrites the value input and removes the attribute from the element. + * + */ + igDateEditor(optionLiteral: 'option', optionName: "inputName"): string; + + /** + * /Sets the name attribute of the value input. This input is used to sent the value to the server. In case the target element is input and it has name attribute, but the developer has set the inputName option, so this option overwrites the value input and removes the attribute from the element. + * + * + * @optionValue New value to be set. + */ + igDateEditor(optionLiteral: 'option', optionName: "inputName", optionValue: string): void; + + /** + * Gets/Sets the readonly attribute for the input. If set to true the input is readonly, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is submitted. + * + */ + igDateEditor(optionLiteral: 'option', optionName: "readOnly"): boolean; + + /** + * /Sets the readonly attribute for the input. If set to true the input is readonly, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is submitted. + * + * + * @optionValue New value to be set. + */ + igDateEditor(optionLiteral: 'option', optionName: "readOnly", optionValue: boolean): void; + + /** + * Gets/Sets the disabled attribute for the input. If set to true the input is disabled, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is not submitted. + * + */ + igDateEditor(optionLiteral: 'option', optionName: "disabled"): boolean; + + /** + * /Sets the disabled attribute for the input. If set to true the input is disabled, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is not submitted. + * + * + * @optionValue New value to be set. + */ + igDateEditor(optionLiteral: 'option', optionName: "disabled", optionValue: boolean): void; + + /** + * Gets/Sets options supported by the [igValidator](ui.igvalidator#options) widget. + * Note: Validation rules of [igValidator](ui.igvalidator#options), such as min and max value/length are applied separately triggering errors, + * while the corresponding options of the editor prevent values violating the defined rules from being entered. + * + */ + igDateEditor(optionLiteral: 'option', optionName: "validatorOptions"): any; + + /** + * /Sets options supported by the [igValidator](ui.igvalidator#options) widget. + * Note: Validation rules of [igValidator](ui.igvalidator#options), such as min and max value/length are applied separately triggering errors, + * while the corresponding options of the editor prevent values violating the defined rules from being entered. + * + * + * @optionValue New value to be set. + */ + igDateEditor(optionLiteral: 'option', optionName: "validatorOptions", optionValue: any): void; + + /** + * This event is inherited from a parent widget and it's not triggered in igDateEditor + */ + igDateEditor(optionLiteral: 'option', optionName: "dropDownListOpening"): DropDownListOpeningEvent; + + /** + * This event is inherited from a parent widget and it's not triggered in igDateEditor + * + * @optionValue New value to be set. + */ + igDateEditor(optionLiteral: 'option', optionName: "dropDownListOpening", optionValue: DropDownListOpeningEvent): void; + + /** + * This event is inherited from a parent widget and it's not triggered in igDateEditor + */ + igDateEditor(optionLiteral: 'option', optionName: "dropDownListOpened"): DropDownListOpenedEvent; + + /** + * This event is inherited from a parent widget and it's not triggered in igDateEditor + * + * @optionValue New value to be set. + */ + igDateEditor(optionLiteral: 'option', optionName: "dropDownListOpened", optionValue: DropDownListOpenedEvent): void; + + /** + * This event is inherited from a parent widget and it's not triggered in igDateEditor + */ + igDateEditor(optionLiteral: 'option', optionName: "dropDownListClosing"): DropDownListClosingEvent; + + /** + * This event is inherited from a parent widget and it's not triggered in igDateEditor + * + * @optionValue New value to be set. + */ + igDateEditor(optionLiteral: 'option', optionName: "dropDownListClosing", optionValue: DropDownListClosingEvent): void; + + /** + * This event is inherited from a parent widget and it's not triggered in igDateEditor + */ + igDateEditor(optionLiteral: 'option', optionName: "dropDownListClosed"): DropDownListClosedEvent; + + /** + * This event is inherited from a parent widget and it's not triggered in igDateEditor + * + * @optionValue New value to be set. + */ + igDateEditor(optionLiteral: 'option', optionName: "dropDownListClosed", optionValue: DropDownListClosedEvent): void; + + /** + * This event is inherited from a parent widget and it's not triggered in igDateEditor + */ + igDateEditor(optionLiteral: 'option', optionName: "dropDownItemSelecting"): DropDownItemSelectingEvent; + + /** + * This event is inherited from a parent widget and it's not triggered in igDateEditor + * + * @optionValue New value to be set. + */ + igDateEditor(optionLiteral: 'option', optionName: "dropDownItemSelecting", optionValue: DropDownItemSelectingEvent): void; + + /** + * This event is inherited from a parent widget and it's not triggered in igDateEditor + */ + igDateEditor(optionLiteral: 'option', optionName: "dropDownItemSelected"): DropDownItemSelectedEvent; + + /** + * This event is inherited from a parent widget and it's not triggered in igDateEditor + * + * @optionValue New value to be set. + */ + igDateEditor(optionLiteral: 'option', optionName: "dropDownItemSelected", optionValue: DropDownItemSelectedEvent): void; + igDateEditor(options: IgDateEditor): JQuery; + igDateEditor(optionLiteral: 'option', optionName: string): any; + igDateEditor(optionLiteral: 'option', options: IgDateEditor): JQuery; + igDateEditor(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igDateEditor(methodName: string, ...methodParams: any[]): any; +} +interface JQuery { + igDatePicker(methodName: "getCalendar"): string; + igDatePicker(methodName: "dropDownContainer"): void; + igDatePicker(methodName: "findListItemIndex"): void; + igDatePicker(methodName: "getSelectedListItem"): void; + igDatePicker(methodName: "selectedListIndex"): void; + igDatePicker(methodName: "showDropDown"): void; + igDatePicker(methodName: "hideDropDown"): void; + igDatePicker(methodName: "dropDownButton"): string; + igDatePicker(methodName: "dropDownVisible"): boolean; + igDatePicker(methodName: "destroy"): void; + igDatePicker(methodName: "value", newValue?: Object): Object; + igDatePicker(methodName: "getSelectedDate"): Object; + igDatePicker(methodName: "selectDate", date: Object): void; + igDatePicker(methodName: "spinUp", delta?: number): void; + igDatePicker(methodName: "spinDown", delta?: number): void; + igDatePicker(methodName: "spinUpButton"): string; + igDatePicker(methodName: "spinDownButton"): string; + igDatePicker(methodName: "isValid"): boolean; + + /** + * Gets/Sets the custom regional settings for the editor. If it is a string, then $.ig.regional[stringValue] is assumed. + * + */ + igDatePicker(optionLiteral: 'option', optionName: "regional"): any; + + /** + * /Sets the custom regional settings for the editor. If it is a string, then $.ig.regional[stringValue] is assumed. + * + * + * @optionValue New value to be set. + */ + igDatePicker(optionLiteral: 'option', optionName: "regional", optionValue: any): void; + + /** + * Gets visibility of the spin, clear and drop-down button. That option can be set only on initialization. Combinations like 'dropdown,spin' or 'spin,clear' are supported too. + * + */ + igDatePicker(optionLiteral: 'option', optionName: "buttonType"): string; + + /** + * Visibility of the spin, clear and drop-down button. That option can be set only on initialization. Combinations like 'dropdown,spin' or 'spin,clear' are supported too. + * + * + * @optionValue New value to be set. + */ + igDatePicker(optionLiteral: 'option', optionName: "buttonType", optionValue: string): void; + + /** + * Gets/Sets the options supported by the [jquery.ui.datepicker](http://api.jqueryui.com/datepicker/). Only options related to the drop-down calendar are supported. + * + */ + igDatePicker(optionLiteral: 'option', optionName: "datepickerOptions"): any; + + /** + * /Sets the options supported by the [jquery.ui.datepicker](http://api.jqueryui.com/datepicker/). Only options related to the drop-down calendar are supported. + * + * + * @optionValue New value to be set. + */ + igDatePicker(optionLiteral: 'option', optionName: "datepickerOptions", optionValue: any): void; + + /** + * Gets the ability to limit igDatePicker to be used only as s calendar. When set to true the editor input is not editable. + * Note! This option can not be set runtime. + * + */ + igDatePicker(optionLiteral: 'option', optionName: "dropDownOnReadOnly"): boolean; + + /** + * The ability to limit igDatePicker to be used only as s calendar. When set to true the editor input is not editable. + * Note! This option can not be set runtime. + * + * + * @optionValue New value to be set. + */ + igDatePicker(optionLiteral: 'option', optionName: "dropDownOnReadOnly", optionValue: boolean): void; + + /** + * This option is inherited from a parent widget and it's not applicable for igDatePicker + */ + igDatePicker(optionLiteral: 'option', optionName: "dropDownAttachedToBody"): boolean; + + /** + * This option is inherited from a parent widget and it's not applicable for igDatePicker + * + * @optionValue New value to be set. + */ + igDatePicker(optionLiteral: 'option', optionName: "dropDownAttachedToBody", optionValue: boolean): void; + + /** + * This option is inherited from a parent widget and it's not applicable for igDatePicker + */ + igDatePicker(optionLiteral: 'option', optionName: "isLimitedToListValues"): boolean; + + /** + * This option is inherited from a parent widget and it's not applicable for igDatePicker + * + * @optionValue New value to be set. + */ + igDatePicker(optionLiteral: 'option', optionName: "isLimitedToListValues", optionValue: boolean): void; + + /** + * This option is inherited from a parent widget and it's not applicable for igDatePicker + */ + igDatePicker(optionLiteral: 'option', optionName: "listItemHoverDuration"): number; + + /** + * This option is inherited from a parent widget and it's not applicable for igDatePicker + * + * @optionValue New value to be set. + */ + igDatePicker(optionLiteral: 'option', optionName: "listItemHoverDuration", optionValue: number): void; + + /** + * This option is inherited from a parent widget and it's not applicable for igDatePicker + */ + igDatePicker(optionLiteral: 'option', optionName: "listItems"): any; + + /** + * This option is inherited from a parent widget and it's not applicable for igDatePicker + * + * @optionValue New value to be set. + */ + igDatePicker(optionLiteral: 'option', optionName: "listItems", optionValue: any): void; + + /** + * This option is inherited from a parent widget and it's not applicable for igDatePicker + */ + igDatePicker(optionLiteral: 'option', optionName: "listWidth"): number; + + /** + * This option is inherited from a parent widget and it's not applicable for igDatePicker + * + * @optionValue New value to be set. + */ + igDatePicker(optionLiteral: 'option', optionName: "listWidth", optionValue: number): void; + + /** + * Gets/Sets the value of the editor. Date object can be set as value. String can be set and the editor will pass it to the Date object constructor and use the corresponding Date object as the value. MVC date format can be used too. + * Note! This option doesn't use the displayInputFormat to extract the date. + * + */ + igDatePicker(optionLiteral: 'option', optionName: "value"): Object; + + /** + * /Sets the value of the editor. Date object can be set as value. String can be set and the editor will pass it to the Date object constructor and use the corresponding Date object as the value. MVC date format can be used too. + * Note! This option doesn't use the displayInputFormat to extract the date. + * + * + * @optionValue New value to be set. + */ + igDatePicker(optionLiteral: 'option', optionName: "value", optionValue: Object): void; + + /** + * Gets the minimum value which can be entered in editor by user. Date object can be set as value. String value can be passed and the editor will use the javascript Date object constructor to create date object and will use it for the comparison. MVC date format can be used too. + * Note! This option doesn't use the displayInputFormat to extract the date. + * + */ + igDatePicker(optionLiteral: 'option', optionName: "minValue"): Object; + + /** + * The minimum value which can be entered in editor by user. Date object can be set as value. String value can be passed and the editor will use the javascript Date object constructor to create date object and will use it for the comparison. MVC date format can be used too. + * Note! This option doesn't use the displayInputFormat to extract the date. + * + * + * @optionValue New value to be set. + */ + igDatePicker(optionLiteral: 'option', optionName: "minValue", optionValue: Object): void; + + /** + * Gets the maximum value which can be entered in editor by user. Date object can be set as value. String value can be passed and the editor will use the javascript Date object constructor to create date object and will use it for the comparison. MVC date format can be used too. + * Note! This option doesn't use the displayInputFormat to extract the date. + * + */ + igDatePicker(optionLiteral: 'option', optionName: "maxValue"): Object; + + /** + * The maximum value which can be entered in editor by user. Date object can be set as value. String value can be passed and the editor will use the javascript Date object constructor to create date object and will use it for the comparison. MVC date format can be used too. + * Note! This option doesn't use the displayInputFormat to extract the date. + * + * + * @optionValue New value to be set. + */ + igDatePicker(optionLiteral: 'option', optionName: "maxValue", optionValue: Object): void; + + /** + * Gets/Sets format of date while editor has no focus. + * Value of that option can be set to a specific date pattern or to a flag defined by regional settings. + * If value is not set, then the dateInputFormat is used automatically. + * If value is set to explicit date pattern and pattern besides date-flags has explicit characters which match with date-flags or mask-flags, then the "escape" character should be used in front of them. + * List of predefined regional flags: + * "date": the datePattern member of regional option is used + * "dateLong": the dateLongPattern member of regional option is used + * "time": the timePattern member of regional option is used + * "timeLong": the timeLongPattern member of regional option is used + * "dateTime": the dateTimePattern member of regional option is used + * List of explicit characters, which should have escape \\ character in front of them: + * C, &, a, A, ?, L, 9, 0, #, >, <, y, M, d, h, H, m, s, t, f. + * List of date-flags when explicit date pattern is used: + * "y": year field without century and without leading zero + * "yy": year field without century and with leading zero + * "yyyy": year field with leading zeros + * "M": month field as digit without leading zero + * "MM": month field as digit with leading zero + * "MMM": month field as short month name + * "MMMM": month field as long month name + * "d": day of month field without leading zero + * "dd": day of month field with leading zero + * "ddd": day of the week as short name + * "dddd": day of the week as long name + * "t": first character of string which represents AM/PM field + * "tt": 2 characters of string which represents AM/PM field + * "h": hours field in 12-hours format without leading zero + * "hh": hours field in 12-hours format with leading zero + * "H": hours field in 24-hours format without leading zero + * "HH": hours field in 24-hours format with leading zero + * "m": minutes field without leading zero + * "mm": minutes field with leading zero + * "s": seconds field without leading zero + * "ss": seconds field with leading zero + * "f": milliseconds field in hundreds + * "ff": milliseconds field in tenths + * "fff": milliseconds field + * + */ + igDatePicker(optionLiteral: 'option', optionName: "dateDisplayFormat"): string; + + /** + * /Sets format of date while editor has no focus. + * Value of that option can be set to a specific date pattern or to a flag defined by regional settings. + * If value is not set, then the dateInputFormat is used automatically. + * If value is set to explicit date pattern and pattern besides date-flags has explicit characters which match with date-flags or mask-flags, then the "escape" character should be used in front of them. + * List of predefined regional flags: + * "date": the datePattern member of regional option is used + * "dateLong": the dateLongPattern member of regional option is used + * "time": the timePattern member of regional option is used + * "timeLong": the timeLongPattern member of regional option is used + * "dateTime": the dateTimePattern member of regional option is used + * List of explicit characters, which should have escape \\ character in front of them: + * C, &, a, A, ?, L, 9, 0, #, >, <, y, M, d, h, H, m, s, t, f. + * List of date-flags when explicit date pattern is used: + * "y": year field without century and without leading zero + * "yy": year field without century and with leading zero + * "yyyy": year field with leading zeros + * "M": month field as digit without leading zero + * "MM": month field as digit with leading zero + * "MMM": month field as short month name + * "MMMM": month field as long month name + * "d": day of month field without leading zero + * "dd": day of month field with leading zero + * "ddd": day of the week as short name + * "dddd": day of the week as long name + * "t": first character of string which represents AM/PM field + * "tt": 2 characters of string which represents AM/PM field + * "h": hours field in 12-hours format without leading zero + * "hh": hours field in 12-hours format with leading zero + * "H": hours field in 24-hours format without leading zero + * "HH": hours field in 24-hours format with leading zero + * "m": minutes field without leading zero + * "mm": minutes field with leading zero + * "s": seconds field without leading zero + * "ss": seconds field with leading zero + * "f": milliseconds field in hundreds + * "ff": milliseconds field in tenths + * "fff": milliseconds field + * + * + * @optionValue New value to be set. + */ + igDatePicker(optionLiteral: 'option', optionName: "dateDisplayFormat", optionValue: string): void; + + /** + * Gets format of date while editor has focus. + * Value of that option can be set to explicit date pattern or to a flag defined by regional settings. + * If value is set to explicit date pattern and pattern besides date-flags has explicit characters which match with date-flags or mask-flags, then the "escape" character should be used in front of them. + * If option is not set, then the "date" is used automatically. + * List of predefined regional flags: + * "date": the datePattern member of regional option is used + * "dateLong": the dateLongPattern member of regional option is used + * "time": the timePattern member of regional option is used + * "timeLong": the timeLongPattern member of regional option is used + * "dateTime": the dateTimePattern member of regional option is used + * List of explicit characters, which should have escape \\ character in front of them: C, &, a, A, ?, L, 9, 0, #, >, <, y, M, d, h, H, m, s, t, f. + * List of date-flags when explicit date pattern is used: + * "yy": year field without century and with leading zero + * "yyyy": year field with leading zeros + * "MM": month field as digit with leading zero + * "dd": day of month field with leading zero + * "t": first character of string which represents AM/PM field + * "tt": 2 characters of string which represents AM/PM field + * "hh": hours field in 12-hours format with leading zero + * "HH": hours field in 24-hours format with leading zero + * "mm": minutes field with leading zero + * "ss": seconds field with leading zero + * "f": milliseconds field in hundreds + * "ff": milliseconds field in tenths + * "fff": milliseconds field + * Note! This option can not be set runtime. + * + */ + igDatePicker(optionLiteral: 'option', optionName: "dateInputFormat"): string; + + /** + * Format of date while editor has focus. + * Value of that option can be set to explicit date pattern or to a flag defined by regional settings. + * If value is set to explicit date pattern and pattern besides date-flags has explicit characters which match with date-flags or mask-flags, then the "escape" character should be used in front of them. + * If option is not set, then the "date" is used automatically. + * List of predefined regional flags: + * "date": the datePattern member of regional option is used + * "dateLong": the dateLongPattern member of regional option is used + * "time": the timePattern member of regional option is used + * "timeLong": the timeLongPattern member of regional option is used + * "dateTime": the dateTimePattern member of regional option is used + * List of explicit characters, which should have escape \\ character in front of them: C, &, a, A, ?, L, 9, 0, #, >, <, y, M, d, h, H, m, s, t, f. + * List of date-flags when explicit date pattern is used: + * "yy": year field without century and with leading zero + * "yyyy": year field with leading zeros + * "MM": month field as digit with leading zero + * "dd": day of month field with leading zero + * "t": first character of string which represents AM/PM field + * "tt": 2 characters of string which represents AM/PM field + * "hh": hours field in 12-hours format with leading zero + * "HH": hours field in 24-hours format with leading zero + * "mm": minutes field with leading zero + * "ss": seconds field with leading zero + * "f": milliseconds field in hundreds + * "ff": milliseconds field in tenths + * "fff": milliseconds field + * Note! This option can not be set runtime. + * + * + * @optionValue New value to be set. + */ + igDatePicker(optionLiteral: 'option', optionName: "dateInputFormat", optionValue: string): void; + + /** + * Gets/Sets the value type returned by the get of value() method. That also affects functionality of the set value(val) method and the copy/paste operations of browser. + * Note: That is used as default. + * + */ + igDatePicker(optionLiteral: 'option', optionName: "dataMode"): string; + + /** + * /Sets the value type returned by the get of value() method. That also affects functionality of the set value(val) method and the copy/paste operations of browser. + * Note: That is used as default. + * + * + * @optionValue New value to be set. + */ + igDatePicker(optionLiteral: 'option', optionName: "dataMode", optionValue: string): void; + + /** + * Gets/Sets delta-value which is used to increment or decrement value in editor on spin events. If value is set to negative value an exception is thrown. Non integer value is supported only for dataMode double and float. + * + */ + igDatePicker(optionLiteral: 'option', optionName: "spinDelta"): number; + + /** + * /Sets delta-value which is used to increment or decrement value in editor on spin events. If value is set to negative value an exception is thrown. Non integer value is supported only for dataMode double and float. + * + * + * @optionValue New value to be set. + */ + igDatePicker(optionLiteral: 'option', optionName: "spinDelta", optionValue: number): void; + + /** + * Gets/Sets ability to modify only 1 date field on spin events. + * Value false enables changes of other date fields when incremented or decremented date-field reaches its limits. + * Value true modifies only value of one field. + * + */ + igDatePicker(optionLiteral: 'option', optionName: "limitSpinToCurrentField"): boolean; + + /** + * /Sets ability to modify only 1 date field on spin events. + * Value false enables changes of other date fields when incremented or decremented date-field reaches its limits. + * Value true modifies only value of one field. + * + * + * @optionValue New value to be set. + */ + igDatePicker(optionLiteral: 'option', optionName: "limitSpinToCurrentField", optionValue: boolean): void; + + /** + * Gets/Sets formatting of the dates as UTC. + * That option is supported only when dataMode option is 'date' and Date objects are used to get/set value of editor. + * Notes: + * That option affects only functionality of get/set value method and the Date-value, which was set on initialization. + * When application uses the set-value, then internal Date-value and displayed-text is incremented by TimezoneOffset. + * When application uses the get-value, then editor returns internal Date-value decremented by TimezoneOffset. + * When that option is modified after initialization, then displayed text and internal Date-value are not affected. + * It is not recommended to change that option without resetting Date-value. + * + */ + igDatePicker(optionLiteral: 'option', optionName: "enableUTCDates"): boolean; + + /** + * /Sets formatting of the dates as UTC. + * That option is supported only when dataMode option is 'date' and Date objects are used to get/set value of editor. + * Notes: + * That option affects only functionality of get/set value method and the Date-value, which was set on initialization. + * When application uses the set-value, then internal Date-value and displayed-text is incremented by TimezoneOffset. + * When application uses the get-value, then editor returns internal Date-value decremented by TimezoneOffset. + * When that option is modified after initialization, then displayed text and internal Date-value are not affected. + * It is not recommended to change that option without resetting Date-value. + * + * + * @optionValue New value to be set. + */ + igDatePicker(optionLiteral: 'option', optionName: "enableUTCDates", optionValue: boolean): void; + + /** + * Gets/Sets year for auto detection of 20th and 21st centuries. + * That option is used to automatically fill century when the user entered only 1 or 2 digits into the year field or when the date pattern contains only 1 or 2 year positions, e.g. "yy" or "y". + * If user entered value larger than value of this option, then 20th century is used, otherwise the 21st. + * + */ + igDatePicker(optionLiteral: 'option', optionName: "centuryThreshold"): number; + + /** + * /Sets year for auto detection of 20th and 21st centuries. + * That option is used to automatically fill century when the user entered only 1 or 2 digits into the year field or when the date pattern contains only 1 or 2 year positions, e.g. "yy" or "y". + * If user entered value larger than value of this option, then 20th century is used, otherwise the 21st. + * + * + * @optionValue New value to be set. + */ + igDatePicker(optionLiteral: 'option', optionName: "centuryThreshold", optionValue: number): void; + + /** + * Gets/Set value used to increase/decrease year part of the date, in order to set difference between year in Gregorian calendar and displayed year. + * + */ + igDatePicker(optionLiteral: 'option', optionName: "yearShift"): number; + + /** + * /Set value used to increase/decrease year part of the date, in order to set difference between year in Gregorian calendar and displayed year. + * + * + * @optionValue New value to be set. + */ + igDatePicker(optionLiteral: 'option', optionName: "yearShift", optionValue: number): void; + + /** + * Gets/Sets the representation of null value. In case of default the value for the input is set to null, which makes the input to hold an empty string + * + */ + igDatePicker(optionLiteral: 'option', optionName: "nullValue"): string|number; + + /** + * /Sets the representation of null value. In case of default the value for the input is set to null, which makes the input to hold an empty string + * + * + * @optionValue New value to be set. + */ + igDatePicker(optionLiteral: 'option', optionName: "nullValue", optionValue: string|number): void; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + */ + igDatePicker(optionLiteral: 'option', optionName: "dropDownAnimationDuration"): number; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + * + * @optionValue New value to be set. + */ + igDatePicker(optionLiteral: 'option', optionName: "dropDownAnimationDuration", optionValue: number): void; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + */ + igDatePicker(optionLiteral: 'option', optionName: "inputMask"): string; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + * + * @optionValue New value to be set. + */ + igDatePicker(optionLiteral: 'option', optionName: "inputMask", optionValue: string): void; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + */ + igDatePicker(optionLiteral: 'option', optionName: "unfilledCharsPrompt"): string; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + * + * @optionValue New value to be set. + */ + igDatePicker(optionLiteral: 'option', optionName: "unfilledCharsPrompt", optionValue: string): void; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + */ + igDatePicker(optionLiteral: 'option', optionName: "padChar"): string; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + * + * @optionValue New value to be set. + */ + igDatePicker(optionLiteral: 'option', optionName: "padChar", optionValue: string): void; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + */ + igDatePicker(optionLiteral: 'option', optionName: "emptyChar"): string; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + * + * @optionValue New value to be set. + */ + igDatePicker(optionLiteral: 'option', optionName: "emptyChar", optionValue: string): void; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + */ + igDatePicker(optionLiteral: 'option', optionName: "toUpper"): boolean; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + * + * @optionValue New value to be set. + */ + igDatePicker(optionLiteral: 'option', optionName: "toUpper", optionValue: boolean): void; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + */ + igDatePicker(optionLiteral: 'option', optionName: "toLower"): boolean; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + * + * @optionValue New value to be set. + */ + igDatePicker(optionLiteral: 'option', optionName: "toLower", optionValue: boolean): void; + + /** + * Gets ability to enter only specific characters in input-field from keyboard and on paste. + * Notes: + * If "excludeKeys" option contains same characters as this option, then "excludeKeys" has priority. + * Note! This option can not be se runtime. + * + */ + igDatePicker(optionLiteral: 'option', optionName: "includeKeys"): string; + + /** + * Ability to enter only specific characters in input-field from keyboard and on paste. + * Notes: + * If "excludeKeys" option contains same characters as this option, then "excludeKeys" has priority. + * Note! This option can not be se runtime. + * + * + * @optionValue New value to be set. + */ + igDatePicker(optionLiteral: 'option', optionName: "includeKeys", optionValue: string): void; + + /** + * Gets ability to prevent entering specific characters from keyboard or on paste. + * Notes: + * If a character is specified in "includeKeys" option also, then "excludeKeys" has priority. + * Note! This option can not be se runtime. + * + */ + igDatePicker(optionLiteral: 'option', optionName: "excludeKeys"): string; + + /** + * Ability to prevent entering specific characters from keyboard or on paste. + * Notes: + * If a character is specified in "includeKeys" option also, then "excludeKeys" has priority. + * Note! This option can not be se runtime. + * + * + * @optionValue New value to be set. + */ + igDatePicker(optionLiteral: 'option', optionName: "excludeKeys", optionValue: string): void; + + /** + * Gets/Sets the ability of the editor to automatically change the hoverd item into the opened dropdown list to its oposide side. + */ + igDatePicker(optionLiteral: 'option', optionName: "spinWrapAround"): boolean; + + /** + * /Sets the ability of the editor to automatically change the hoverd item into the opened dropdown list to its oposide side. + * + * @optionValue New value to be set. + */ + igDatePicker(optionLiteral: 'option', optionName: "spinWrapAround", optionValue: boolean): void; + + /** + * This option is inherited from a parent widget and it's not applicable for igMaskEditor + */ + igDatePicker(optionLiteral: 'option', optionName: "dropDownOrientation"): string; + + /** + * This option is inherited from a parent widget and it's not applicable for igMaskEditor + * + * @optionValue New value to be set. + */ + igDatePicker(optionLiteral: 'option', optionName: "dropDownOrientation", optionValue: string): void; + + /** + */ + igDatePicker(optionLiteral: 'option', optionName: "textMode"): any; + + /** + */ + igDatePicker(optionLiteral: 'option', optionName: "textMode", optionValue: any): void; + + /** + * Gets/Sets how many items should be shown at once. + * Notes: + * That option is overwritten if the number of list items is less than the value. In that case the height of the dropdown is adjusted to the number of items. + * Note! This option can not be set runtime. + */ + igDatePicker(optionLiteral: 'option', optionName: "visibleItemsCount"): number; + + /** + * /Sets how many items should be shown at once. + * Notes: + * That option is overwritten if the number of list items is less than the value. In that case the height of the dropdown is adjusted to the number of items. + * Note! This option can not be set runtime. + * + * @optionValue New value to be set. + */ + igDatePicker(optionLiteral: 'option', optionName: "visibleItemsCount", optionValue: number): void; + + /** + * This option is inherited from a parent widget and it's not applicable for igMaskEditor + */ + igDatePicker(optionLiteral: 'option', optionName: "maxLength"): any; + + /** + * This option is inherited from a parent widget and it's not applicable for igMaskEditor + * + * @optionValue New value to be set. + */ + igDatePicker(optionLiteral: 'option', optionName: "maxLength", optionValue: any): void; + + /** + * Gets/Sets the horizontal alignment of the text in the editor. + * + */ + igDatePicker(optionLiteral: 'option', optionName: "textAlign"): string; + + /** + * /Sets the horizontal alignment of the text in the editor. + * + * + * @optionValue New value to be set. + */ + igDatePicker(optionLiteral: 'option', optionName: "textAlign", optionValue: string): void; + + /** + * Gets/Sets the text which appears in the editor when it has no focus and the "value" is null or empty string. + * + */ + igDatePicker(optionLiteral: 'option', optionName: "placeHolder"): string; + + /** + * /Sets the text which appears in the editor when it has no focus and the "value" is null or empty string. + * + * + * @optionValue New value to be set. + */ + igDatePicker(optionLiteral: 'option', optionName: "placeHolder", optionValue: string): void; + + /** + * Gets/Sets the action when the editor gets focused. The default value is selectAll. + * + */ + igDatePicker(optionLiteral: 'option', optionName: "selectionOnFocus"): string; + + /** + * /Sets the action when the editor gets focused. The default value is selectAll. + * + * + * @optionValue New value to be set. + */ + igDatePicker(optionLiteral: 'option', optionName: "selectionOnFocus", optionValue: string): void; + + /** + * Gets/Sets if the editor should revert it's value to the previously valid value in case the value on blur, or enter key is not valid. If the opiton is set to false, editor calls clear functionality. + * + */ + igDatePicker(optionLiteral: 'option', optionName: "revertIfNotValid"): boolean; + + /** + * /Sets if the editor should revert it's value to the previously valid value in case the value on blur, or enter key is not valid. If the opiton is set to false, editor calls clear functionality. + * + * + * @optionValue New value to be set. + */ + igDatePicker(optionLiteral: 'option', optionName: "revertIfNotValid", optionValue: boolean): void; + + /** + * Gets/Sets if the editor should prevent form submition when enter key is pressed. + * + */ + igDatePicker(optionLiteral: 'option', optionName: "preventSubmitOnEnter"): boolean; + + /** + * /Sets if the editor should prevent form submition when enter key is pressed. + * + * + * @optionValue New value to be set. + */ + igDatePicker(optionLiteral: 'option', optionName: "preventSubmitOnEnter", optionValue: boolean): void; + + /** + * Gets/Sets the strings used for the localization of the component. This includes button titles, error messages etc. Value of the object should contain pairs or key:value members. Note: any sub-option of locale can appear within the main option of igEditor. In this case those values within main options will have highest priority and override corresponding value in locale. + * + */ + igDatePicker(optionLiteral: 'option', optionName: "locale"): any; + + /** + * /Sets the strings used for the localization of the component. This includes button titles, error messages etc. Value of the object should contain pairs or key:value members. Note: any sub-option of locale can appear within the main option of igEditor. In this case those values within main options will have highest priority and override corresponding value in locale. + * + * + * @optionValue New value to be set. + */ + igDatePicker(optionLiteral: 'option', optionName: "locale", optionValue: any): void; + + /** + * Disables/Enables default notifications for basic validation scenarios built in the editors such as required list selection, value wrapping around or spin limits. + * + */ + igDatePicker(optionLiteral: 'option', optionName: "suppressNotifications"): boolean; + + /** + * Disables/Enables default notifications for basic validation scenarios built in the editors such as required list selection, value wrapping around or spin limits. + * + * + * @optionValue New value to be set. + */ + igDatePicker(optionLiteral: 'option', optionName: "suppressNotifications", optionValue: boolean): void; + + /** + * Gets/Sets the width of the control. + * + */ + igDatePicker(optionLiteral: 'option', optionName: "width"): string|number; + + /** + * /Sets the width of the control. + * + * + * @optionValue New value to be set. + */ + igDatePicker(optionLiteral: 'option', optionName: "width", optionValue: string|number): void; + + /** + * Gets/Sets the height of the control. + * + */ + igDatePicker(optionLiteral: 'option', optionName: "height"): string|number; + + /** + * /Sets the height of the control. + * + * + * @optionValue New value to be set. + */ + igDatePicker(optionLiteral: 'option', optionName: "height", optionValue: string|number): void; + + /** + * Gets/Sets tabIndex attribute for the editor input. + * + */ + igDatePicker(optionLiteral: 'option', optionName: "tabIndex"): number; + + /** + * /Sets tabIndex attribute for the editor input. + * + * + * @optionValue New value to be set. + */ + igDatePicker(optionLiteral: 'option', optionName: "tabIndex", optionValue: number): void; + + /** + * Gets/Sets whether the editor value can become null. + * If that option is false, and editor has no value, then value is set to an empty string. + * + */ + igDatePicker(optionLiteral: 'option', optionName: "allowNullValue"): boolean; + + /** + * /Sets whether the editor value can become null. + * If that option is false, and editor has no value, then value is set to an empty string. + * + * + * @optionValue New value to be set. + */ + igDatePicker(optionLiteral: 'option', optionName: "allowNullValue", optionValue: boolean): void; + + /** + * Gets/Sets the name attribute of the value input. This input is used to sent the value to the server. In case the target element is input and it has name attribute, but the developer has set the inputName option, so this option overwrites the value input and removes the attribute from the element. + * + */ + igDatePicker(optionLiteral: 'option', optionName: "inputName"): string; + + /** + * /Sets the name attribute of the value input. This input is used to sent the value to the server. In case the target element is input and it has name attribute, but the developer has set the inputName option, so this option overwrites the value input and removes the attribute from the element. + * + * + * @optionValue New value to be set. + */ + igDatePicker(optionLiteral: 'option', optionName: "inputName", optionValue: string): void; + + /** + * Gets/Sets the readonly attribute for the input. If set to true the input is readonly, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is submitted. + * + */ + igDatePicker(optionLiteral: 'option', optionName: "readOnly"): boolean; + + /** + * /Sets the readonly attribute for the input. If set to true the input is readonly, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is submitted. + * + * + * @optionValue New value to be set. + */ + igDatePicker(optionLiteral: 'option', optionName: "readOnly", optionValue: boolean): void; + + /** + * Gets/Sets the disabled attribute for the input. If set to true the input is disabled, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is not submitted. + * + */ + igDatePicker(optionLiteral: 'option', optionName: "disabled"): boolean; + + /** + * /Sets the disabled attribute for the input. If set to true the input is disabled, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is not submitted. + * + * + * @optionValue New value to be set. + */ + igDatePicker(optionLiteral: 'option', optionName: "disabled", optionValue: boolean): void; + + /** + * Gets/Sets options supported by the [igValidator](ui.igvalidator#options) widget. + * Note: Validation rules of [igValidator](ui.igvalidator#options), such as min and max value/length are applied separately triggering errors, + * while the corresponding options of the editor prevent values violating the defined rules from being entered. + * + */ + igDatePicker(optionLiteral: 'option', optionName: "validatorOptions"): any; + + /** + * /Sets options supported by the [igValidator](ui.igvalidator#options) widget. + * Note: Validation rules of [igValidator](ui.igvalidator#options), such as min and max value/length are applied separately triggering errors, + * while the corresponding options of the editor prevent values violating the defined rules from being entered. + * + * + * @optionValue New value to be set. + */ + igDatePicker(optionLiteral: 'option', optionName: "validatorOptions", optionValue: any): void; + + /** + * Event which is raised when the drop down is opening. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.editorInput to obtain reference to the editable input + * Use ui.calendar to obtain a reference to jQuery UI date picker widget, used as a calendar from the igDatePicker. + */ + igDatePicker(optionLiteral: 'option', optionName: "dropDownListOpening"): DropDownListOpeningEvent; + + /** + * Event which is raised when the drop down is opening. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.editorInput to obtain reference to the editable input + * Use ui.calendar to obtain a reference to jQuery UI date picker widget, used as a calendar from the igDatePicker. + * + * @optionValue Define event handler function. + */ + igDatePicker(optionLiteral: 'option', optionName: "dropDownListOpening", optionValue: DropDownListOpeningEvent): void; + + /** + * Event which is raised after the drop down is opened. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.editorInput to obtain reference to the editable input + * Use ui.calendar to obtain a reference to jQuery UI date picker widget, used as a calendar from the igDatePicker. + */ + igDatePicker(optionLiteral: 'option', optionName: "dropDownListOpened"): DropDownListOpenedEvent; + + /** + * Event which is raised after the drop down is opened. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.editorInput to obtain reference to the editable input + * Use ui.calendar to obtain a reference to jQuery UI date picker widget, used as a calendar from the igDatePicker. + * + * @optionValue Define event handler function. + */ + igDatePicker(optionLiteral: 'option', optionName: "dropDownListOpened", optionValue: DropDownListOpenedEvent): void; + + /** + * This event is inherited from a parent widget and it's not triggered in igDatePicker + */ + igDatePicker(optionLiteral: 'option', optionName: "dropDownListClosing"): DropDownListClosingEvent; + + /** + * This event is inherited from a parent widget and it's not triggered in igDatePicker + * + * @optionValue New value to be set. + */ + igDatePicker(optionLiteral: 'option', optionName: "dropDownListClosing", optionValue: DropDownListClosingEvent): void; + + /** + * This event is inherited from a parent widget and it's not triggered in igDatePicker + */ + igDatePicker(optionLiteral: 'option', optionName: "dropDownItemSelecting"): DropDownItemSelectingEvent; + + /** + * This event is inherited from a parent widget and it's not triggered in igDatePicker + * + * @optionValue New value to be set. + */ + igDatePicker(optionLiteral: 'option', optionName: "dropDownItemSelecting", optionValue: DropDownItemSelectingEvent): void; + + /** + * Event which is raised after the drop down (calendar) is closed. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.editorInput to obtain reference to the editable input + * Use ui.calendar to obtain a reference to jQuery UI date picker widget, used as a calendar from the igDatePicker. + */ + igDatePicker(optionLiteral: 'option', optionName: "dropDownListClosed"): DropDownListClosedEvent; + + /** + * Event which is raised after the drop down (calendar) is closed. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.editorInput to obtain reference to the editable input + * Use ui.calendar to obtain a reference to jQuery UI date picker widget, used as a calendar from the igDatePicker. + * + * @optionValue Define event handler function. + */ + igDatePicker(optionLiteral: 'option', optionName: "dropDownListClosed", optionValue: DropDownListClosedEvent): void; + + /** + * This event is inherited from a parent widget and it's not triggered in igDatePicker + */ + igDatePicker(optionLiteral: 'option', optionName: "dropDownItemSelected"): DropDownItemSelectedEvent; + + /** + * This event is inherited from a parent widget and it's not triggered in igDatePicker + * + * @optionValue New value to be set. + */ + igDatePicker(optionLiteral: 'option', optionName: "dropDownItemSelected", optionValue: DropDownItemSelectedEvent): void; + + /** + * Event which is raised after a date selection in the calendar. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.dateFromPicker to obtain reference to the date object which is selected. + * Use ui.item to obtain a referece to the selected html element from the calendar. + * Use ui.calendar to obtain a reference to jQuery UI date picker, used as a calendar from the igDatePicker. + */ + igDatePicker(optionLiteral: 'option', optionName: "itemSelected"): ItemSelectedEvent; + + /** + * Event which is raised after a date selection in the calendar. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.dateFromPicker to obtain reference to the date object which is selected. + * Use ui.item to obtain a referece to the selected html element from the calendar. + * Use ui.calendar to obtain a reference to jQuery UI date picker, used as a calendar from the igDatePicker. + * + * @optionValue Define event handler function. + */ + igDatePicker(optionLiteral: 'option', optionName: "itemSelected", optionValue: ItemSelectedEvent): void; + igDatePicker(options: IgDatePicker): JQuery; + igDatePicker(optionLiteral: 'option', optionName: string): any; + igDatePicker(optionLiteral: 'option', options: IgDatePicker): JQuery; + igDatePicker(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igDatePicker(methodName: string, ...methodParams: any[]): any; +} +interface JQuery { + igCheckboxEditor(methodName: "isValid"): boolean; + igCheckboxEditor(methodName: "value", newValue: Object): string; + igCheckboxEditor(methodName: "toggle"): void; + igCheckboxEditor(methodName: "inputName", newValue?: string): string; + igCheckboxEditor(methodName: "field"): string; + igCheckboxEditor(methodName: "editorContainer"): string; + igCheckboxEditor(methodName: "hasFocus"): boolean; + igCheckboxEditor(methodName: "setFocus", delay?: number): void; + igCheckboxEditor(methodName: "hide"): void; + igCheckboxEditor(methodName: "show"): void; + igCheckboxEditor(methodName: "validator"): Object; + igCheckboxEditor(methodName: "validate"): boolean; + igCheckboxEditor(methodName: "destroy"): void; + + /** + * Gets/Sets whether the checkbox is checked. + * + */ + igCheckboxEditor(optionLiteral: 'option', optionName: "checked"): boolean; + + /** + * /Sets whether the checkbox is checked. + * + * + * @optionValue New value to be set. + */ + igCheckboxEditor(optionLiteral: 'option', optionName: "checked", optionValue: boolean): void; + + /** + * Gets/Sets size of the checkbox based on preset styles.For different sizes, define 'width' and 'height' options instead. + * + * + */ + igCheckboxEditor(optionLiteral: 'option', optionName: "size"): string; + + /** + * /Sets size of the checkbox based on preset styles.For different sizes, define 'width' and 'height' options instead. + * + * + * + * @optionValue New value to be set. + */ + igCheckboxEditor(optionLiteral: 'option', optionName: "size", optionValue: string): void; + + /** + * Gets/Sets a custom class on the checkbox. Custom image can be used this way. + * The following jQuery classes can be used in addition http://api.jqueryui.com/theming/icons/ + * + */ + igCheckboxEditor(optionLiteral: 'option', optionName: "iconClass"): string; + + /** + * /Sets a custom class on the checkbox. Custom image can be used this way. + * The following jQuery classes can be used in addition http://api.jqueryui.com/theming/icons/ + * + * + * @optionValue New value to be set. + */ + igCheckboxEditor(optionLiteral: 'option', optionName: "iconClass", optionValue: string): void; + + /** + * Gets/Sets tabIndex attribute for the editor input. + * + */ + igCheckboxEditor(optionLiteral: 'option', optionName: "tabIndex"): number; + + /** + * /Sets tabIndex attribute for the editor input. + * + * + * @optionValue New value to be set. + */ + igCheckboxEditor(optionLiteral: 'option', optionName: "tabIndex", optionValue: number): void; + + /** + * Gets/Sets the readonly attribute. Does not allow editing. Disables changing the checkbox state as an interaction, but it still can be changed programmatically. On submit the current value is sent into the request. + * + */ + igCheckboxEditor(optionLiteral: 'option', optionName: "readOnly"): boolean; + + /** + * /Sets the readonly attribute. Does not allow editing. Disables changing the checkbox state as an interaction, but it still can be changed programmatically. On submit the current value is sent into the request. + * + * + * @optionValue New value to be set. + */ + igCheckboxEditor(optionLiteral: 'option', optionName: "readOnly", optionValue: boolean): void; + + /** + */ + igCheckboxEditor(optionLiteral: 'option', optionName: "allowNullValue"): boolean; + + /** + */ + igCheckboxEditor(optionLiteral: 'option', optionName: "allowNullValue", optionValue: boolean): void; + + /** + */ + igCheckboxEditor(optionLiteral: 'option', optionName: "nullValue"): any; + + /** + */ + igCheckboxEditor(optionLiteral: 'option', optionName: "nullValue", optionValue: any): void; + + /** + * Gets/Sets the width of the control. + * + */ + igCheckboxEditor(optionLiteral: 'option', optionName: "width"): string|number; + + /** + * /Sets the width of the control. + * + * + * @optionValue New value to be set. + */ + igCheckboxEditor(optionLiteral: 'option', optionName: "width", optionValue: string|number): void; + + /** + * Gets/Sets the height of the control. + * + */ + igCheckboxEditor(optionLiteral: 'option', optionName: "height"): string|number; + + /** + * /Sets the height of the control. + * + * + * @optionValue New value to be set. + */ + igCheckboxEditor(optionLiteral: 'option', optionName: "height", optionValue: string|number): void; + + /** + * Gets/Sets value in editor. The effect of setting/getting that option depends on type of editor and on dataMode options for every type of editor. + * + */ + igCheckboxEditor(optionLiteral: 'option', optionName: "value"): any; + + /** + * /Sets value in editor. The effect of setting/getting that option depends on type of editor and on dataMode options for every type of editor. + * + * + * @optionValue New value to be set. + */ + igCheckboxEditor(optionLiteral: 'option', optionName: "value", optionValue: any): void; + + /** + * Gets/Sets the name attribute of the value input. This input is used to sent the value to the server. In case the target element is input and it has name attribute, but the developer has set the inputName option, so this option overwrites the value input and removes the attribute from the element. + * + */ + igCheckboxEditor(optionLiteral: 'option', optionName: "inputName"): string; + + /** + * /Sets the name attribute of the value input. This input is used to sent the value to the server. In case the target element is input and it has name attribute, but the developer has set the inputName option, so this option overwrites the value input and removes the attribute from the element. + * + * + * @optionValue New value to be set. + */ + igCheckboxEditor(optionLiteral: 'option', optionName: "inputName", optionValue: string): void; + + /** + * Gets/Sets the disabled attribute for the input. If set to true the input is disabled, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is not submitted. + * + */ + igCheckboxEditor(optionLiteral: 'option', optionName: "disabled"): boolean; + + /** + * /Sets the disabled attribute for the input. If set to true the input is disabled, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is not submitted. + * + * + * @optionValue New value to be set. + */ + igCheckboxEditor(optionLiteral: 'option', optionName: "disabled", optionValue: boolean): void; + + /** + * Gets/Sets options supported by the [igValidator](ui.igvalidator#options) widget. + * Note: Validation rules of [igValidator](ui.igvalidator#options), such as min and max value/length are applied separately triggering errors, + * while the corresponding options of the editor prevent values violating the defined rules from being entered. + * + */ + igCheckboxEditor(optionLiteral: 'option', optionName: "validatorOptions"): any; + + /** + * /Sets options supported by the [igValidator](ui.igvalidator#options) widget. + * Note: Validation rules of [igValidator](ui.igvalidator#options), such as min and max value/length are applied separately triggering errors, + * while the corresponding options of the editor prevent values violating the defined rules from being entered. + * + * + * @optionValue New value to be set. + */ + igCheckboxEditor(optionLiteral: 'option', optionName: "validatorOptions", optionValue: any): void; + + /** + * Event which is raised before value in editor was changed. + * Return false in order to cancel change. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.newValue to obtain the new value. + * Use ui.newState to obtain the new state. + * Use ui.oldValue to obtain the old value. + * Use ui.oldState to obtain the old state. + * Use ui.element to obtain a reference to the event target. + * Use ui.editorInput obtain reference to the editor element. + */ + igCheckboxEditor(optionLiteral: 'option', optionName: "valueChanging"): ValueChangingEvent; + + /** + * Event which is raised before value in editor was changed. + * Return false in order to cancel change. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.newValue to obtain the new value. + * Use ui.newState to obtain the new state. + * Use ui.oldValue to obtain the old value. + * Use ui.oldState to obtain the old state. + * Use ui.element to obtain a reference to the event target. + * Use ui.editorInput obtain reference to the editor element. + * + * @optionValue Define event handler function. + */ + igCheckboxEditor(optionLiteral: 'option', optionName: "valueChanging", optionValue: ValueChangingEvent): void; + + /** + * Event which is raised after value in editor was changed. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.newValue to obtain the new value. + * Use ui.newState to obtain the new state. + * Use ui.element to obtain a reference to the event target. + * Use ui.editorInput obtain reference to the editor element. + */ + igCheckboxEditor(optionLiteral: 'option', optionName: "valueChanged"): ValueChangedEvent; + + /** + * Event which is raised after value in editor was changed. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.newValue to obtain the new value. + * Use ui.newState to obtain the new state. + * Use ui.element to obtain a reference to the event target. + * Use ui.editorInput obtain reference to the editor element. + * + * @optionValue Define event handler function. + */ + igCheckboxEditor(optionLiteral: 'option', optionName: "valueChanged", optionValue: ValueChangedEvent): void; + + /** + * Event which is raised before rendering of the editor completes. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the editor performing rendering. + * Use ui.element to get a reference to the editor element. + */ + igCheckboxEditor(optionLiteral: 'option', optionName: "rendering"): RenderingEvent; + + /** + * Event which is raised before rendering of the editor completes. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the editor performing rendering. + * Use ui.element to get a reference to the editor element. + * + * @optionValue Define event handler function. + */ + igCheckboxEditor(optionLiteral: 'option', optionName: "rendering", optionValue: RenderingEvent): void; + + /** + * Event which is raised after rendering of the editor completes. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the editor performing rendering. + * Use ui.element to get a reference to the editor element. + */ + igCheckboxEditor(optionLiteral: 'option', optionName: "rendered"): RenderedEvent; + + /** + * Event which is raised after rendering of the editor completes. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the editor performing rendering. + * Use ui.element to get a reference to the editor element. + * + * @optionValue Define event handler function. + */ + igCheckboxEditor(optionLiteral: 'option', optionName: "rendered", optionValue: RenderedEvent): void; + + /** + * Event which is raised on mousedown event. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.element to obtain a reference to the event target. + * Use ui.editorInput to get a reference to the editor field. + */ + igCheckboxEditor(optionLiteral: 'option', optionName: "mousedown"): MousedownEvent; + + /** + * Event which is raised on mousedown event. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.element to obtain a reference to the event target. + * Use ui.editorInput to get a reference to the editor field. + * + * @optionValue Define event handler function. + */ + igCheckboxEditor(optionLiteral: 'option', optionName: "mousedown", optionValue: MousedownEvent): void; + + /** + * Event which is raised on mouseup event. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.element to obtain a reference to the event target. + * Use ui.editorInput to get a reference to the editor field. + */ + igCheckboxEditor(optionLiteral: 'option', optionName: "mouseup"): MouseupEvent; + + /** + * Event which is raised on mouseup event. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.element to obtain a reference to the event target. + * Use ui.editorInput to get a reference to the editor field. + * + * @optionValue Define event handler function. + */ + igCheckboxEditor(optionLiteral: 'option', optionName: "mouseup", optionValue: MouseupEvent): void; + + /** + * Event which is raised on mousemove at any part of editor including drop-down list. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.element to obtain a reference to the event target. + * Use ui.editorInput to get a reference to the editor field. + */ + igCheckboxEditor(optionLiteral: 'option', optionName: "mousemove"): MousemoveEvent; + + /** + * Event which is raised on mousemove at any part of editor including drop-down list. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.element to obtain a reference to the event target. + * Use ui.editorInput to get a reference to the editor field. + * + * @optionValue Define event handler function. + */ + igCheckboxEditor(optionLiteral: 'option', optionName: "mousemove", optionValue: MousemoveEvent): void; + + /** + * Event which is raised on mouseover at any part of editor including drop-down list. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.element to obtain a reference to the event target. + * Use ui.editorInput to get a reference to the editor field. + */ + igCheckboxEditor(optionLiteral: 'option', optionName: "mouseover"): MouseoverEvent; + + /** + * Event which is raised on mouseover at any part of editor including drop-down list. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.element to obtain a reference to the event target. + * Use ui.editorInput to get a reference to the editor field. + * + * @optionValue Define event handler function. + */ + igCheckboxEditor(optionLiteral: 'option', optionName: "mouseover", optionValue: MouseoverEvent): void; + + /** + * Event which is raised on mouseleave at any part of editor including drop-down list. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.element to obtain a reference to the event target. + * Use ui.editorInput to get a reference to the editor field. + */ + igCheckboxEditor(optionLiteral: 'option', optionName: "mouseout"): MouseoutEvent; + + /** + * Event which is raised on mouseleave at any part of editor including drop-down list. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.element to obtain a reference to the event target. + * Use ui.editorInput to get a reference to the editor field. + * + * @optionValue Define event handler function. + */ + igCheckboxEditor(optionLiteral: 'option', optionName: "mouseout", optionValue: MouseoutEvent): void; + + /** + * Event which is raised when input field of editor loses focus. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.element to obtain a reference to the event target. + * Use ui.editorInput to get a reference to the editor field. + */ + igCheckboxEditor(optionLiteral: 'option', optionName: "blur"): BlurEvent; + + /** + * Event which is raised when input field of editor loses focus. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.element to obtain a reference to the event target. + * Use ui.editorInput to get a reference to the editor field. + * + * @optionValue Define event handler function. + */ + igCheckboxEditor(optionLiteral: 'option', optionName: "blur", optionValue: BlurEvent): void; + + /** + * Event which is raised when input field of editor gets focus. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.element to obtain a reference to the event target. + * Use ui.editorInput to get a reference to the editor field. + */ + igCheckboxEditor(optionLiteral: 'option', optionName: "focus"): FocusEvent; + + /** + * Event which is raised when input field of editor gets focus. + * Function takes arguments evt and ui. + * Use ui.owner to obtain reference to igEditor. + * Use ui.element to obtain a reference to the event target. + * Use ui.editorInput to get a reference to the editor field. + * + * @optionValue Define event handler function. + */ + igCheckboxEditor(optionLiteral: 'option', optionName: "focus", optionValue: FocusEvent): void; + + /** + * Event which is raised on keydown event. + * Return false in order to cancel key action. + * Function takes arguments evt and ui. + * Use evt.originalEvent to obtain reference to event of browser. + * Use ui.owner to obtain reference to igEditor. + * Use ui.key to obtain value of keyCode. + */ + igCheckboxEditor(optionLiteral: 'option', optionName: "keydown"): KeydownEvent; + + /** + * Event which is raised on keydown event. + * Return false in order to cancel key action. + * Function takes arguments evt and ui. + * Use evt.originalEvent to obtain reference to event of browser. + * Use ui.owner to obtain reference to igEditor. + * Use ui.key to obtain value of keyCode. + * + * @optionValue Define event handler function. + */ + igCheckboxEditor(optionLiteral: 'option', optionName: "keydown", optionValue: KeydownEvent): void; + + /** + * Event which is raised on keypress event. + * Return false in order to cancel key action. + * Function takes arguments evt and ui. + * Use evt.originalEvent to obtain reference to event of browser. + * Use ui.owner to obtain reference to igEditor. + * Use ui.key to obtain value of keyCode. + */ + igCheckboxEditor(optionLiteral: 'option', optionName: "keypress"): KeypressEvent; + + /** + * Event which is raised on keypress event. + * Return false in order to cancel key action. + * Function takes arguments evt and ui. + * Use evt.originalEvent to obtain reference to event of browser. + * Use ui.owner to obtain reference to igEditor. + * Use ui.key to obtain value of keyCode. + * + * @optionValue Define event handler function. + */ + igCheckboxEditor(optionLiteral: 'option', optionName: "keypress", optionValue: KeypressEvent): void; + + /** + * Event which is raised on keyup event. + * Function takes arguments evt and ui. + * Use evt.originalEvent to obtain reference to event of browser. + * Use ui.owner to obtain reference to igEditor. + * Use ui.key to obtain value of keyCode. + */ + igCheckboxEditor(optionLiteral: 'option', optionName: "keyup"): KeyupEvent; + + /** + * Event which is raised on keyup event. + * Function takes arguments evt and ui. + * Use evt.originalEvent to obtain reference to event of browser. + * Use ui.owner to obtain reference to igEditor. + * Use ui.key to obtain value of keyCode. + * + * @optionValue Define event handler function. + */ + igCheckboxEditor(optionLiteral: 'option', optionName: "keyup", optionValue: KeyupEvent): void; + igCheckboxEditor(options: IgCheckboxEditor): JQuery; + igCheckboxEditor(optionLiteral: 'option', optionName: string): any; + igCheckboxEditor(optionLiteral: 'option', options: IgCheckboxEditor): JQuery; + igCheckboxEditor(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igCheckboxEditor(methodName: string, ...methodParams: any[]): any; +} +interface SliceClickedEvent { + (event: Event, ui: SliceClickedEventUIParam): void; +} + +interface SliceClickedEventUIParam { + /** + * Used to obtain reference to igFunnelChart. + */ + owner?: any; + + /** + * Used to obtain index of clicked slice. + */ + index?: any; + + /** + * Used to obtain reference to clicked slice item. + */ + item?: any; + + /** + * Used to check if slice became selected. + */ + selected?: any; +} + +interface IgFunnelChart { + /** + * Gets or sets values for upper and lower bezier points. That option has effect only when useBezierCurve is enabled. + * Value should provide 4 numeric values in range from 0 to 1 separated by space character. + * The first number defines upper-x position, second: upper-y, third: lower-x, fourth: lower-y. + * The null or invalid value will reset internal default, which is "0.5 0 0.5 1". + * Example: + * bezierPoints: "0.4 0.1 0.6 1" + */ + bezierPoints?: string; + + /** + * Gets or sets the Legend for the chart. + * The value of that option can be a string with the id of existing html element. That element should be empty and it will be used to create igChartLegend widget. + * If element was not found, then new DIV element is created and inserted into parent after chart element. + * Value of that option can be an object with member "element", which contains the id of legend-element. + * In this case, that object also may contain options supported by the igChartLegend widget, such as "width", "height" and events, such as "legendItemMouseLeftButtonDown", "legendItemMouseEnter", etc. + * Examples: + * legend: {} + * legend: "idOfDiv" + * legend: { element: "idOfDiv", width: 300 } + * legend: { legendItemMouseLeftButtonDown: function (evt, ui) { ui.chart.toggleSelection(ui.item); } } + */ + legend?: any; + + /** + * Gets or sets the value member path for the funnel chart. + */ + valueMemberPath?: string; + + /** + * Gets or sets the Brushes property. + * The brushes property defines the palette from which automatically assigned brushes are selected. + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + brushes?: any; + + /** + * Gets or sets the Outlines property. + * The Outlines property defines the palette from which automatically assigned Outlines are selected. + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + outlines?: any; + + /** + * Gets or sets the percentage (from near 0 to 1) of space the bottom edge of the funnel should take. + */ + bottomEdgeWidth?: number; + + /** + * Gets or sets the InnerLabel mapping property for the current series object. + */ + innerLabelMemberPath?: string; + + /** + * Gets or sets the OuterLabel mapping property for the current series object. + */ + outerLabelMemberPath?: string; + + /** + * Gets or sets whether the inner labels are visible. + * + * Valid values: + * "visible" + * "collapsed" + */ + innerLabelVisibility?: string; + + /** + * Gets or sets whether the outer labels are visible. + * + * Valid values: + * "visible" + * "collapsed" + */ + outerLabelVisibility?: string; + + /** + * Gets or sets which side of the chart the outer labels should appear. + * + * Valid values: + * "left" The labels will be displayed to the left of the chart. + * "right" The labels will be displayed to the right of the chart. + */ + outerLabelAlignment?: string; + + /** + * Gets or sets the how the heights of the funnel slices should be configured. + * + * Valid values: + * "uniform" The slice heights should be uniform. + * "weighted" The slice heights should be weighted by value. + */ + funnelSliceDisplay?: string; + + /** + * Gets or sets the formatter function for inner labels. Function should return string and it takes 3 parameters: 1st-value of item to format, 2nd-index of item within data, 3rd-reference to igFunnelChart. + */ + formatInnerLabel?: any; + + /** + * Gets or sets the formatter function for outer labels. Function should return string and it takes 3 parameters: 1st-value of item to format, 2nd-index of item within data, 3rd-reference to igFunnelChart. + */ + formatOuterLabel?: any; + + /** + * Gets or sets how long the animations should take to run. + */ + transitionDuration?: number; + + /** + * Gets or sets if the funnel should be rendered inverted. + */ + isInverted?: boolean; + + /** + * Gets or sets whether to use a Bezier curve to define the funnel. + */ + useBezierCurve?: boolean; + + /** + * Gets or sets whether to allow slices to be selected. + */ + allowSliceSelection?: boolean; + + /** + * Gets or sets whether to use the unselected style on unselected slices. + */ + useUnselectedStyle?: boolean; + + /** + * Gets or sets the style to use for selected slices. + * That can be used to set stroke (outline color), fill (background color) and opacity. + */ + selectedSliceStyle?: any; + + /** + * Gets or sets the style to use for unselected slices. + * That can be used to set stroke (outline color), fill (background color) and opacity. + */ + unselectedSliceStyle?: any; + + /** + * Gets or sets the LegendItemBadgeTemplate to use for the legend items. + * The provided object should have properties called render and optionally measure. + * These are functions which will be called that will be called to handle the user specified custom rendering. + * measure will be passed an object that looks like this: + * { + * context: [either a DOM element or a CanvasContext2D depending on the particular template scenario], + * width: [if value is present, specifies the available width, user may set to desired width for content], + * height: [if value is present, specifies the available height, user may set to desired height for content], + * isConstant: [user should set to true if desired with and height will always be the same for this template], + * data: [if present, represents the contextual data for this template] + * } + * render will be passed an object that looks like this: + * { + * context: [either a DOM element or a CanvasContext2D depending on the particular template scenario], + * xPosition: [if present, specifies the x position at which to render the content], + * yPosition: [if present, specifies the y position at which to render the content], + * availableWidth: [if present, specifies the available width in which to render the content], + * availableHeight: [if present, specifies the available height in which to render the content], + * data: [if present, specifies the data that is in context for this content], + * isHitTestRender: [if true, indicates that this is a special render pass for hit testing, in which case the brushes from the data should be used] + * } + */ + legendItemBadgeTemplate?: any; + + /** + * Gets or sets whether to use the outer labels to identify the legend items. + */ + useOuterLabelsForLegend?: boolean; + + /** + * Gets or sets the text style for inner labels + */ + textStyle?: string; + + /** + * Gets or sets the text style for outer labels + */ + outerLabelTextStyle?: string; + + /** + * Gets or sets the thickness of outline around slices. + */ + outlineThickness?: number; + pixelScalingRatio?: number; + outerLabelTextColor?: any; + textColor?: any; + + /** + * The width of the chart. + */ + width?: number; + + /** + * The height of the chart. + */ + height?: number; + + /** + * Gets sets template for tooltip associated with chart item. + * Example: "Value: $(ValueMemberPathInDataSource)" + */ + tooltipTemplate?: string; + + /** + * Gets sets maximum number of displayed records in chart. + */ + maxRecCount?: number; + + /** + * Gets sets a valid data source. + * That can be instance of array or primitives, array of objects, instance of $.ig.DataSource, or any other data accepted by $.ig.DataSource. + * Note: if it is set to string and "dataSourceType" option is not set, then $.ig.JSONPDataSource is used. + */ + dataSource?: any; + + /** + * Gets sets data source type (such as "json", "xml", etc). Please refer to the documentation of $.ig.DataSource and its type property + */ + dataSourceType?: string; + + /** + * Gets sets url which is used for sending JSON on request for remote data. + */ + dataSourceUrl?: string; + + /** + * See $.ig.DataSource. property in the response specifying the total number of records on the server. + */ + responseTotalRecCountKey?: string; + + /** + * See $.ig.DataSource. This is basically the property in the responses where data records are held, if the response is wrapped. + */ + responseDataKey?: string; + + /** + * Event which is raised when a slice is clicked. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to igFunnelChart. + * Use ui.index to obtain index of clicked slice. + * Use ui.item to obtain reference to clicked slice item. + * Use ui.selected to check if slice became selected. + */ + sliceClicked?: SliceClickedEvent; + + /** + * Event which is raised before data binding. + * Return false in order to cancel data binding. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.dataSource to obtain reference to instance of $.ig.DataSource. + */ + dataBinding?: DataBindingEvent; + + /** + * Event which is raised after data binding. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.data to obtain reference to array actual data which is displayed by chart. + * Use ui.dataSource to obtain reference to instance of $.ig.DataSource. + */ + dataBound?: DataBoundEvent; + + /** + * Event which is raised before tooltip is updated. + * Return false in order to cancel updating and hide tooltip. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.text to obtain html of tooltip. Value of that member can be modified. If modified value is null or empty string, then current content of tooltip keeps old value. + * Use ui.item to obtain reference to item. Value of that member can be modified or replaced by custom item. + * Use ui.x to obtain left position of tooltip in pixels relative to widget. Value of that member can be modified. + * Use ui.y to obtain top position of tooltip in pixels relative to widget. Value of that member can be modified. + * Use ui.element to obtain reference to jquery object which represents tooltip. Value of that member can be replaced by custom element. + */ + updateTooltip?: UpdateTooltipEvent; + + /** + * Event which is raised before tooltip is hidden. + * Return false in order to cancel hiding and keep tooltip visible. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.item to obtain reference to item. + * Use ui.element to obtain reference to jquery object which represents tooltip or value of ui.element from last updateTooltip event. Value of that member can be replaced by custom element. + */ + hideTooltip?: HideTooltipEvent; + + /** + * Option for igFunnelChart + */ + [optionName: string]: any; +} +interface IgFunnelChartMethods { + /** + * Gets array of selected slice items. + * + * @param selection Array or selected slice items. + * @return array|object If parameter is undefined, then array of selected items is returned. Otherwise, it returns reference to igFunnelChart. + */ + selectedSliceItems(selection?: any[]): any[]; + + /** + * Gets sets array of indexes of selected slices. + * + * @param selection Array or selected slice indexes. + * @return array|object If parameter is undefined, then array of selected indexes is returned. Otherwise, it returns reference to igFunnelChart. + */ + selectedSliceIndexes(selection?: any[]): any[]; + + /** + * Checks if slice is selected. + * + * @param slice Index of slice or reference to slice-data-item. + */ + isSelected(slice: Object): boolean; + + /** + * Toggles selected state of slice. + * + * @param slice Index of slice or reference to slice-data-item. + */ + toggleSelection(slice: Object): Object; + exportVisualData(): void; + + /** + * Destroys widget. + */ + destroy(): void; + + /** + * Find index of item within actual data used by chart. + * + * @param item The reference to item. + */ + findIndexOfItem(item: Object): number; + + /** + * Get item within actual data used by chart. That is similar to this.getData()[ index ]. + * + * @param index Index of data item. + */ + getDataItem(index: Object): Object; + + /** + * Get reference of actual data used by chart. + */ + getData(): any[]; + + /** + * Adds a new item to the data source and notifies the chart. + * + * @param item The item that we want to add to the data source. + */ + addItem(item: Object): Object; + + /** + * Inserts a new item to the data source and notifies the chart. + * + * @param item the new item that we want to insert in the data source. + * @param index The index in the data source where the new item will be inserted. + */ + insertItem(item: Object, index: number): Object; + + /** + * Deletes an item from the data source and notifies the chart. + * + * @param index The index in the data source from where the item will be been removed. + */ + removeItem(index: number): Object; + + /** + * Updates an item in the data source and notifies the chart. + * + * @param index The index of the item in the data source that we want to change. + * @param item The new item object that will be set in the data source. + */ + setItem(index: number, item: Object): Object; + + /** + * Notifies the chart that an item has been set in an associated data source. + * + * @param dataSource The data source in which the change happened. + * @param index The index in the items source that has been changed. + * @param newItem the new item that has been set in the collection. + * @param oldItem the old item that has been overwritten in the collection. + */ + notifySetItem(dataSource: Object, index: number, newItem: Object, oldItem: Object): Object; + + /** + * Notifies the chart that the items have been cleared from an associated data source. + * It's not necessary to notify more than one target of a change if they share the same items source. + * + * @param dataSource The data source in which the change happened. + */ + notifyClearItems(dataSource: Object): Object; + + /** + * Notifies the target axis or series that an item has been inserted at the specified index in its data source. + * It's not necessary to notify more than one target of a change if they share the same items source. + * + * @param dataSource The data source in which the change happened. + * @param index The index in the items source where the new item has been inserted. + * @param newItem the new item that has been set in the collection. + */ + notifyInsertItem(dataSource: Object, index: number, newItem: Object): Object; + + /** + * Notifies the target axis or series that an item has been removed from the specified index in its data source. + * It's not necessary to notify more than one target of a change if they share the same items source. + * + * @param dataSource The data source in which the change happened. + * @param index The index in the items source from where the old item has been removed. + * @param oldItem the old item that has been removed from the collection. + */ + notifyRemoveItem(dataSource: Object, index: number, oldItem: Object): Object; + + /** + * Get reference to chart object. + */ + chart(): Object; + + /** + * Binds data to the chart + */ + dataBind(): void; +} +interface JQuery { + data(propertyName: "igFunnelChart"): IgFunnelChartMethods; +} + +interface JQuery { + igFunnelChart(methodName: "selectedSliceItems", selection?: any[]): any[]; + igFunnelChart(methodName: "selectedSliceIndexes", selection?: any[]): any[]; + igFunnelChart(methodName: "isSelected", slice: Object): boolean; + igFunnelChart(methodName: "toggleSelection", slice: Object): Object; + igFunnelChart(methodName: "exportVisualData"): void; + igFunnelChart(methodName: "destroy"): void; + igFunnelChart(methodName: "findIndexOfItem", item: Object): number; + igFunnelChart(methodName: "getDataItem", index: Object): Object; + igFunnelChart(methodName: "getData"): any[]; + igFunnelChart(methodName: "addItem", item: Object): Object; + igFunnelChart(methodName: "insertItem", item: Object, index: number): Object; + igFunnelChart(methodName: "removeItem", index: number): Object; + igFunnelChart(methodName: "setItem", index: number, item: Object): Object; + igFunnelChart(methodName: "notifySetItem", dataSource: Object, index: number, newItem: Object, oldItem: Object): Object; + igFunnelChart(methodName: "notifyClearItems", dataSource: Object): Object; + igFunnelChart(methodName: "notifyInsertItem", dataSource: Object, index: number, newItem: Object): Object; + igFunnelChart(methodName: "notifyRemoveItem", dataSource: Object, index: number, oldItem: Object): Object; + igFunnelChart(methodName: "chart"): Object; + igFunnelChart(methodName: "dataBind"): void; + + /** + * Gets values for upper and lower bezier points. That option has effect only when useBezierCurve is enabled. + * Value should provide 4 numeric values in range from 0 to 1 separated by space character. + * The first number defines upper-x position, second: upper-y, third: lower-x, fourth: lower-y. + * The null or invalid value will reset internal default, which is "0.5 0 0.5 1". + * Example: + * bezierPoints: "0.4 0.1 0.6 1" + */ + igFunnelChart(optionLiteral: 'option', optionName: "bezierPoints"): string; + + /** + * Sets values for upper and lower bezier points. That option has effect only when useBezierCurve is enabled. + * Value should provide 4 numeric values in range from 0 to 1 separated by space character. + * The first number defines upper-x position, second: upper-y, third: lower-x, fourth: lower-y. + * The null or invalid value will reset internal default, which is "0.5 0 0.5 1". + * Example: + * bezierPoints: "0.4 0.1 0.6 1" + * + * @optionValue New value to be set. + */ + igFunnelChart(optionLiteral: 'option', optionName: "bezierPoints", optionValue: string): void; + + /** + * Gets the Legend for the chart. + * The value of that option can be a string with the id of existing html element. That element should be empty and it will be used to create igChartLegend widget. + * If element was not found, then new DIV element is created and inserted into parent after chart element. + * Value of that option can be an object with member "element", which contains the id of legend-element. + * In this case, that object also may contain options supported by the igChartLegend widget, such as "width", "height" and events, such as "legendItemMouseLeftButtonDown", "legendItemMouseEnter", etc. + * Examples: + * legend: {} + * legend: "idOfDiv" + * legend: { element: "idOfDiv", width: 300 } + * legend: { legendItemMouseLeftButtonDown: function (evt, ui) { ui.chart.toggleSelection(ui.item); } } + */ + igFunnelChart(optionLiteral: 'option', optionName: "legend"): any; + + /** + * Sets the Legend for the chart. + * The value of that option can be a string with the id of existing html element. That element should be empty and it will be used to create igChartLegend widget. + * If element was not found, then new DIV element is created and inserted into parent after chart element. + * Value of that option can be an object with member "element", which contains the id of legend-element. + * In this case, that object also may contain options supported by the igChartLegend widget, such as "width", "height" and events, such as "legendItemMouseLeftButtonDown", "legendItemMouseEnter", etc. + * Examples: + * legend: {} + * legend: "idOfDiv" + * legend: { element: "idOfDiv", width: 300 } + * legend: { legendItemMouseLeftButtonDown: function (evt, ui) { ui.chart.toggleSelection(ui.item); } } + * + * @optionValue New value to be set. + */ + igFunnelChart(optionLiteral: 'option', optionName: "legend", optionValue: any): void; + + /** + * Gets the value member path for the funnel chart. + */ + igFunnelChart(optionLiteral: 'option', optionName: "valueMemberPath"): string; + + /** + * Sets the value member path for the funnel chart. + * + * @optionValue New value to be set. + */ + igFunnelChart(optionLiteral: 'option', optionName: "valueMemberPath", optionValue: string): void; + + /** + * Gets the Brushes property. + * The brushes property defines the palette from which automatically assigned brushes are selected. + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + igFunnelChart(optionLiteral: 'option', optionName: "brushes"): any; + + /** + * Sets the Brushes property. + * The brushes property defines the palette from which automatically assigned brushes are selected. + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + * + * @optionValue New value to be set. + */ + igFunnelChart(optionLiteral: 'option', optionName: "brushes", optionValue: any): void; + + /** + * Gets the Outlines property. + * The Outlines property defines the palette from which automatically assigned Outlines are selected. + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + igFunnelChart(optionLiteral: 'option', optionName: "outlines"): any; + + /** + * Sets the Outlines property. + * The Outlines property defines the palette from which automatically assigned Outlines are selected. + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + * + * @optionValue New value to be set. + */ + igFunnelChart(optionLiteral: 'option', optionName: "outlines", optionValue: any): void; + + /** + * Gets the percentage (from near 0 to 1) of space the bottom edge of the funnel should take. + */ + igFunnelChart(optionLiteral: 'option', optionName: "bottomEdgeWidth"): number; + + /** + * Sets the percentage (from near 0 to 1) of space the bottom edge of the funnel should take. + * + * @optionValue New value to be set. + */ + igFunnelChart(optionLiteral: 'option', optionName: "bottomEdgeWidth", optionValue: number): void; + + /** + * Gets the InnerLabel mapping property for the current series object. + */ + igFunnelChart(optionLiteral: 'option', optionName: "innerLabelMemberPath"): string; + + /** + * Sets the InnerLabel mapping property for the current series object. + * + * @optionValue New value to be set. + */ + igFunnelChart(optionLiteral: 'option', optionName: "innerLabelMemberPath", optionValue: string): void; + + /** + * Gets the OuterLabel mapping property for the current series object. + */ + igFunnelChart(optionLiteral: 'option', optionName: "outerLabelMemberPath"): string; + + /** + * Sets the OuterLabel mapping property for the current series object. + * + * @optionValue New value to be set. + */ + igFunnelChart(optionLiteral: 'option', optionName: "outerLabelMemberPath", optionValue: string): void; + + /** + * Gets whether the inner labels are visible. + */ + igFunnelChart(optionLiteral: 'option', optionName: "innerLabelVisibility"): string; + + /** + * Sets whether the inner labels are visible. + * + * @optionValue New value to be set. + */ + igFunnelChart(optionLiteral: 'option', optionName: "innerLabelVisibility", optionValue: string): void; + + /** + * Gets whether the outer labels are visible. + */ + igFunnelChart(optionLiteral: 'option', optionName: "outerLabelVisibility"): string; + + /** + * Sets whether the outer labels are visible. + * + * @optionValue New value to be set. + */ + igFunnelChart(optionLiteral: 'option', optionName: "outerLabelVisibility", optionValue: string): void; + + /** + * Gets which side of the chart the outer labels should appear. + */ + igFunnelChart(optionLiteral: 'option', optionName: "outerLabelAlignment"): string; + + /** + * Sets which side of the chart the outer labels should appear. + * + * @optionValue New value to be set. + */ + igFunnelChart(optionLiteral: 'option', optionName: "outerLabelAlignment", optionValue: string): void; + + /** + * Gets the how the heights of the funnel slices should be configured. + */ + igFunnelChart(optionLiteral: 'option', optionName: "funnelSliceDisplay"): string; + + /** + * Sets the how the heights of the funnel slices should be configured. + * + * @optionValue New value to be set. + */ + igFunnelChart(optionLiteral: 'option', optionName: "funnelSliceDisplay", optionValue: string): void; + + /** + * Gets the formatter function for inner labels. Function should return string and it takes 3 parameters: 1st-value of item to format, 2nd-index of item within data, 3rd-reference to igFunnelChart. + */ + igFunnelChart(optionLiteral: 'option', optionName: "formatInnerLabel"): any; + + /** + * Sets the formatter function for inner labels. Function should return string and it takes 3 parameters: 1st-value of item to format, 2nd-index of item within data, 3rd-reference to igFunnelChart. + * + * @optionValue New value to be set. + */ + igFunnelChart(optionLiteral: 'option', optionName: "formatInnerLabel", optionValue: any): void; + + /** + * Gets the formatter function for outer labels. Function should return string and it takes 3 parameters: 1st-value of item to format, 2nd-index of item within data, 3rd-reference to igFunnelChart. + */ + igFunnelChart(optionLiteral: 'option', optionName: "formatOuterLabel"): any; + + /** + * Sets the formatter function for outer labels. Function should return string and it takes 3 parameters: 1st-value of item to format, 2nd-index of item within data, 3rd-reference to igFunnelChart. + * + * @optionValue New value to be set. + */ + igFunnelChart(optionLiteral: 'option', optionName: "formatOuterLabel", optionValue: any): void; + + /** + * Gets how long the animations should take to run. + */ + igFunnelChart(optionLiteral: 'option', optionName: "transitionDuration"): number; + + /** + * Sets how long the animations should take to run. + * + * @optionValue New value to be set. + */ + igFunnelChart(optionLiteral: 'option', optionName: "transitionDuration", optionValue: number): void; + + /** + * Gets if the funnel should be rendered inverted. + */ + igFunnelChart(optionLiteral: 'option', optionName: "isInverted"): boolean; + + /** + * Sets if the funnel should be rendered inverted. + * + * @optionValue New value to be set. + */ + igFunnelChart(optionLiteral: 'option', optionName: "isInverted", optionValue: boolean): void; + + /** + * Gets whether to use a Bezier curve to define the funnel. + */ + igFunnelChart(optionLiteral: 'option', optionName: "useBezierCurve"): boolean; + + /** + * Sets whether to use a Bezier curve to define the funnel. + * + * @optionValue New value to be set. + */ + igFunnelChart(optionLiteral: 'option', optionName: "useBezierCurve", optionValue: boolean): void; + + /** + * Gets whether to allow slices to be selected. + */ + igFunnelChart(optionLiteral: 'option', optionName: "allowSliceSelection"): boolean; + + /** + * Sets whether to allow slices to be selected. + * + * @optionValue New value to be set. + */ + igFunnelChart(optionLiteral: 'option', optionName: "allowSliceSelection", optionValue: boolean): void; + + /** + * Gets whether to use the unselected style on unselected slices. + */ + igFunnelChart(optionLiteral: 'option', optionName: "useUnselectedStyle"): boolean; + + /** + * Sets whether to use the unselected style on unselected slices. + * + * @optionValue New value to be set. + */ + igFunnelChart(optionLiteral: 'option', optionName: "useUnselectedStyle", optionValue: boolean): void; + + /** + * Gets the style to use for selected slices. + * That can be used to set stroke (outline color), fill (background color) and opacity. + */ + igFunnelChart(optionLiteral: 'option', optionName: "selectedSliceStyle"): any; + + /** + * Sets the style to use for selected slices. + * That can be used to set stroke (outline color), fill (background color) and opacity. + * + * @optionValue New value to be set. + */ + igFunnelChart(optionLiteral: 'option', optionName: "selectedSliceStyle", optionValue: any): void; + + /** + * Gets the style to use for unselected slices. + * That can be used to set stroke (outline color), fill (background color) and opacity. + */ + igFunnelChart(optionLiteral: 'option', optionName: "unselectedSliceStyle"): any; + + /** + * Sets the style to use for unselected slices. + * That can be used to set stroke (outline color), fill (background color) and opacity. + * + * @optionValue New value to be set. + */ + igFunnelChart(optionLiteral: 'option', optionName: "unselectedSliceStyle", optionValue: any): void; + + /** + * Gets the LegendItemBadgeTemplate to use for the legend items. + * The provided object should have properties called render and optionally measure. + * These are functions which will be called that will be called to handle the user specified custom rendering. + * measure will be passed an object that looks like this: + * { + * context: [either a DOM element or a CanvasContext2D depending on the particular template scenario], + * width: [if value is present, specifies the available width, user may set to desired width for content], + * height: [if value is present, specifies the available height, user may set to desired height for content], + * isConstant: [user should set to true if desired with and height will always be the same for this template], + * data: [if present, represents the contextual data for this template] + * } + * render will be passed an object that looks like this: + * { + * context: [either a DOM element or a CanvasContext2D depending on the particular template scenario], + * xPosition: [if present, specifies the x position at which to render the content], + * yPosition: [if present, specifies the y position at which to render the content], + * availableWidth: [if present, specifies the available width in which to render the content], + * availableHeight: [if present, specifies the available height in which to render the content], + * data: [if present, specifies the data that is in context for this content], + * isHitTestRender: [if true, indicates that this is a special render pass for hit testing, in which case the brushes from the data should be used] + * } + */ + igFunnelChart(optionLiteral: 'option', optionName: "legendItemBadgeTemplate"): any; + + /** + * Sets the LegendItemBadgeTemplate to use for the legend items. + * The provided object should have properties called render and optionally measure. + * These are functions which will be called that will be called to handle the user specified custom rendering. + * measure will be passed an object that looks like this: + * { + * context: [either a DOM element or a CanvasContext2D depending on the particular template scenario], + * width: [if value is present, specifies the available width, user may set to desired width for content], + * height: [if value is present, specifies the available height, user may set to desired height for content], + * isConstant: [user should set to true if desired with and height will always be the same for this template], + * data: [if present, represents the contextual data for this template] + * } + * render will be passed an object that looks like this: + * { + * context: [either a DOM element or a CanvasContext2D depending on the particular template scenario], + * xPosition: [if present, specifies the x position at which to render the content], + * yPosition: [if present, specifies the y position at which to render the content], + * availableWidth: [if present, specifies the available width in which to render the content], + * availableHeight: [if present, specifies the available height in which to render the content], + * data: [if present, specifies the data that is in context for this content], + * isHitTestRender: [if true, indicates that this is a special render pass for hit testing, in which case the brushes from the data should be used] + * } + * + * @optionValue New value to be set. + */ + igFunnelChart(optionLiteral: 'option', optionName: "legendItemBadgeTemplate", optionValue: any): void; + + /** + * Gets whether to use the outer labels to identify the legend items. + */ + igFunnelChart(optionLiteral: 'option', optionName: "useOuterLabelsForLegend"): boolean; + + /** + * Sets whether to use the outer labels to identify the legend items. + * + * @optionValue New value to be set. + */ + igFunnelChart(optionLiteral: 'option', optionName: "useOuterLabelsForLegend", optionValue: boolean): void; + + /** + * Gets the text style for inner labels + */ + igFunnelChart(optionLiteral: 'option', optionName: "textStyle"): string; + + /** + * Sets the text style for inner labels + * + * @optionValue New value to be set. + */ + igFunnelChart(optionLiteral: 'option', optionName: "textStyle", optionValue: string): void; + + /** + * Gets the text style for outer labels + */ + igFunnelChart(optionLiteral: 'option', optionName: "outerLabelTextStyle"): string; + + /** + * Sets the text style for outer labels + * + * @optionValue New value to be set. + */ + igFunnelChart(optionLiteral: 'option', optionName: "outerLabelTextStyle", optionValue: string): void; + + /** + * Gets the thickness of outline around slices. + */ + igFunnelChart(optionLiteral: 'option', optionName: "outlineThickness"): number; + + /** + * Sets the thickness of outline around slices. + * + * @optionValue New value to be set. + */ + igFunnelChart(optionLiteral: 'option', optionName: "outlineThickness", optionValue: number): void; + + /** + */ + igFunnelChart(optionLiteral: 'option', optionName: "pixelScalingRatio"): number; + + /** + */ + igFunnelChart(optionLiteral: 'option', optionName: "pixelScalingRatio", optionValue: number): void; + + /** + */ + igFunnelChart(optionLiteral: 'option', optionName: "outerLabelTextColor"): any; + + /** + */ + igFunnelChart(optionLiteral: 'option', optionName: "outerLabelTextColor", optionValue: any): void; + + /** + */ + igFunnelChart(optionLiteral: 'option', optionName: "textColor"): any; + + /** + */ + igFunnelChart(optionLiteral: 'option', optionName: "textColor", optionValue: any): void; + + /** + * The width of the chart. + */ + igFunnelChart(optionLiteral: 'option', optionName: "width"): number; + + /** + * The width of the chart. + * + * @optionValue New value to be set. + */ + igFunnelChart(optionLiteral: 'option', optionName: "width", optionValue: number): void; + + /** + * The height of the chart. + */ + igFunnelChart(optionLiteral: 'option', optionName: "height"): number; + + /** + * The height of the chart. + * + * @optionValue New value to be set. + */ + igFunnelChart(optionLiteral: 'option', optionName: "height", optionValue: number): void; + + /** + * Gets template for tooltip associated with chart item. + * Example: "Value: $(ValueMemberPathInDataSource)" + */ + igFunnelChart(optionLiteral: 'option', optionName: "tooltipTemplate"): string; + + /** + * Sets template for tooltip associated with chart item. + * Example: "Value: $(ValueMemberPathInDataSource)" + * + * @optionValue New value to be set. + */ + igFunnelChart(optionLiteral: 'option', optionName: "tooltipTemplate", optionValue: string): void; + + /** + * Gets maximum number of displayed records in chart. + */ + igFunnelChart(optionLiteral: 'option', optionName: "maxRecCount"): number; + + /** + * Sets maximum number of displayed records in chart. + * + * @optionValue New value to be set. + */ + igFunnelChart(optionLiteral: 'option', optionName: "maxRecCount", optionValue: number): void; + + /** + * Gets a valid data source. + * That can be instance of array or primitives, array of objects, instance of $.ig.DataSource, or any other data accepted by $.ig.DataSource. + * Note: if it is set to string and "dataSourceType" option is not set, then $.ig.JSONPDataSource is used. + */ + igFunnelChart(optionLiteral: 'option', optionName: "dataSource"): any; + + /** + * Sets a valid data source. + * That can be instance of array or primitives, array of objects, instance of $.ig.DataSource, or any other data accepted by $.ig.DataSource. + * Note: if it is set to string and "dataSourceType" option is not set, then $.ig.JSONPDataSource is used. + * + * @optionValue New value to be set. + */ + igFunnelChart(optionLiteral: 'option', optionName: "dataSource", optionValue: any): void; + + /** + * Gets data source type (such as "json", "xml", etc). Please refer to the documentation of $.ig.DataSource and its type property + */ + igFunnelChart(optionLiteral: 'option', optionName: "dataSourceType"): string; + + /** + * Sets data source type (such as "json", "xml", etc). Please refer to the documentation of $.ig.DataSource and its type property + * + * @optionValue New value to be set. + */ + igFunnelChart(optionLiteral: 'option', optionName: "dataSourceType", optionValue: string): void; + + /** + * Gets url which is used for sending JSON on request for remote data. + */ + igFunnelChart(optionLiteral: 'option', optionName: "dataSourceUrl"): string; + + /** + * Sets url which is used for sending JSON on request for remote data. + * + * @optionValue New value to be set. + */ + igFunnelChart(optionLiteral: 'option', optionName: "dataSourceUrl", optionValue: string): void; + + /** + * See $.ig.DataSource. property in the response specifying the total number of records on the server. + */ + igFunnelChart(optionLiteral: 'option', optionName: "responseTotalRecCountKey"): string; + + /** + * See $.ig.DataSource. property in the response specifying the total number of records on the server. + * + * @optionValue New value to be set. + */ + igFunnelChart(optionLiteral: 'option', optionName: "responseTotalRecCountKey", optionValue: string): void; + + /** + * See $.ig.DataSource. This is basically the property in the responses where data records are held, if the response is wrapped. + */ + igFunnelChart(optionLiteral: 'option', optionName: "responseDataKey"): string; + + /** + * See $.ig.DataSource. This is basically the property in the responses where data records are held, if the response is wrapped. + * + * @optionValue New value to be set. + */ + igFunnelChart(optionLiteral: 'option', optionName: "responseDataKey", optionValue: string): void; + + /** + * Event which is raised when a slice is clicked. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to igFunnelChart. + * Use ui.index to obtain index of clicked slice. + * Use ui.item to obtain reference to clicked slice item. + * Use ui.selected to check if slice became selected. + */ + igFunnelChart(optionLiteral: 'option', optionName: "sliceClicked"): SliceClickedEvent; + + /** + * Event which is raised when a slice is clicked. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to igFunnelChart. + * Use ui.index to obtain index of clicked slice. + * Use ui.item to obtain reference to clicked slice item. + * Use ui.selected to check if slice became selected. + * + * @optionValue Define event handler function. + */ + igFunnelChart(optionLiteral: 'option', optionName: "sliceClicked", optionValue: SliceClickedEvent): void; + + /** + * Event which is raised before data binding. + * Return false in order to cancel data binding. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.dataSource to obtain reference to instance of $.ig.DataSource. + */ + igFunnelChart(optionLiteral: 'option', optionName: "dataBinding"): DataBindingEvent; + + /** + * Event which is raised before data binding. + * Return false in order to cancel data binding. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.dataSource to obtain reference to instance of $.ig.DataSource. + * + * @optionValue Define event handler function. + */ + igFunnelChart(optionLiteral: 'option', optionName: "dataBinding", optionValue: DataBindingEvent): void; + + /** + * Event which is raised after data binding. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.data to obtain reference to array actual data which is displayed by chart. + * Use ui.dataSource to obtain reference to instance of $.ig.DataSource. + */ + igFunnelChart(optionLiteral: 'option', optionName: "dataBound"): DataBoundEvent; + + /** + * Event which is raised after data binding. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.data to obtain reference to array actual data which is displayed by chart. + * Use ui.dataSource to obtain reference to instance of $.ig.DataSource. + * + * @optionValue Define event handler function. + */ + igFunnelChart(optionLiteral: 'option', optionName: "dataBound", optionValue: DataBoundEvent): void; + + /** + * Event which is raised before tooltip is updated. + * Return false in order to cancel updating and hide tooltip. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.text to obtain html of tooltip. Value of that member can be modified. If modified value is null or empty string, then current content of tooltip keeps old value. + * Use ui.item to obtain reference to item. Value of that member can be modified or replaced by custom item. + * Use ui.x to obtain left position of tooltip in pixels relative to widget. Value of that member can be modified. + * Use ui.y to obtain top position of tooltip in pixels relative to widget. Value of that member can be modified. + * Use ui.element to obtain reference to jquery object which represents tooltip. Value of that member can be replaced by custom element. + */ + igFunnelChart(optionLiteral: 'option', optionName: "updateTooltip"): UpdateTooltipEvent; + + /** + * Event which is raised before tooltip is updated. + * Return false in order to cancel updating and hide tooltip. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.text to obtain html of tooltip. Value of that member can be modified. If modified value is null or empty string, then current content of tooltip keeps old value. + * Use ui.item to obtain reference to item. Value of that member can be modified or replaced by custom item. + * Use ui.x to obtain left position of tooltip in pixels relative to widget. Value of that member can be modified. + * Use ui.y to obtain top position of tooltip in pixels relative to widget. Value of that member can be modified. + * Use ui.element to obtain reference to jquery object which represents tooltip. Value of that member can be replaced by custom element. + * + * @optionValue Define event handler function. + */ + igFunnelChart(optionLiteral: 'option', optionName: "updateTooltip", optionValue: UpdateTooltipEvent): void; + + /** + * Event which is raised before tooltip is hidden. + * Return false in order to cancel hiding and keep tooltip visible. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.item to obtain reference to item. + * Use ui.element to obtain reference to jquery object which represents tooltip or value of ui.element from last updateTooltip event. Value of that member can be replaced by custom element. + */ + igFunnelChart(optionLiteral: 'option', optionName: "hideTooltip"): HideTooltipEvent; + + /** + * Event which is raised before tooltip is hidden. + * Return false in order to cancel hiding and keep tooltip visible. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.item to obtain reference to item. + * Use ui.element to obtain reference to jquery object which represents tooltip or value of ui.element from last updateTooltip event. Value of that member can be replaced by custom element. + * + * @optionValue Define event handler function. + */ + igFunnelChart(optionLiteral: 'option', optionName: "hideTooltip", optionValue: HideTooltipEvent): void; + igFunnelChart(options: IgFunnelChart): JQuery; + igFunnelChart(optionLiteral: 'option', optionName: string): any; + igFunnelChart(optionLiteral: 'option', options: IgFunnelChart): JQuery; + igFunnelChart(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igFunnelChart(methodName: string, ...methodParams: any[]): any; +} +interface IgPopoverHeaderTemplate { + /** + * Controls whether the popover renders a functional close button + */ + closeButton?: boolean; + + /** + * Sets the content for the popover header + */ + title?: string; + + /** + * Option for IgPopoverHeaderTemplate + */ + [optionName: string]: any; +} + +interface ShowingEvent { + (event: Event, ui: ShowingEventUIParam): void; +} + +interface ShowingEventUIParam { + /** + * Used to get the element the popover will show for. + */ + element?: any; + + /** + * Used to get or set the content to be shown as a string. + */ + content?: any; + + /** + * Used to get the popover element showing. + */ + popover?: any; + + /** + * Used to get reference to the igPopover widget + */ + owner?: any; +} + +interface ShownEvent { + (event: Event, ui: ShownEventUIParam): void; +} + +interface ShownEventUIParam { + /** + * Used to get the element the popover showed for. + */ + element?: any; + + /** + * Used to get the content that was shown as a string. + */ + content?: any; + + /** + * Used to get the popover element shown. + */ + popover?: any; + + /** + * Used to get reference to the igPopover widget + */ + owner?: any; +} + +interface HidingEvent { + (event: Event, ui: HidingEventUIParam): void; +} + +interface HidingEventUIParam { + /** + * Used to get the element the popover will hide for. + */ + element?: any; + + /** + * Used to get the current content displayed in the popover as a string. + */ + content?: any; + + /** + * Used to get the popover element hiding. + */ + popover?: any; + + /** + * Used to get reference to the igPopover widget + */ + owner?: any; +} + +interface HiddenEvent { + (event: Event, ui: HiddenEventUIParam): void; +} + +interface HiddenEventUIParam { + /** + * Used to get the element the popover is hidden for. + */ + element?: any; + + /** + * Used to get the content displayed in the popover as a string. + */ + content?: any; + + /** + * Used to get the popover element hidden. + */ + popover?: any; + + /** + * Used to get reference to the igPopover widget + */ + owner?: any; +} + +interface IgGridFeatureChooserPopover { + gridId?: string; + targetButton?: any; + closeOnBlur?: boolean; + containment?: any; + + /** + * controls the direction in which the control shows relative to the target element + * + * Valid values: + * "auto" lets the control show on the side where enough space is available with the following priority top > bottom > right > left + * "left" shows popover on the left side of the target element + * "right" shows popover on the right side of the target element + * "top" shows popover on the top of the target element + * "bottom" shows popover on the bottom of the target element + */ + direction?: string; + + /** + * controls the position of the popover according to the target element in case the popover is larger than the target on the side we want to position, if the popover is smaller it should always be in the middle of the visible area + * + * Valid values: + * "auto" lets the control choose a position depending on available space with the following priority balanced > end > start + * "balanced" the popover is positioned at the middle of the target element + * "start" the popover is positioned at the beginning of the target element + * "end" the popover is positioned at the end of the target element + */ + position?: string; + + /** + * defines width for the popover. leave null for auto. + */ + width?: number|string; + + /** + * defines height for the popover. leave null for auto + */ + height?: number|string; + + /** + * defines width the popover won't go under the value even if no specific one is set. + */ + minWidth?: number|string; + + /** + * defines width the popover won't exceed even if no specific one is set. + */ + maxWidth?: number|string; + + /** + * defines height the popover won't exceed even if no specific one is set. + */ + maxHeight?: number|string; + + /** + * Sets the time popover fades in and out when showing/hiding + */ + animationDuration?: number; + + /** + * sets the content for the popover container. If left null the content will be get from the target. + * + * Valid values: + * "string" String content of the popover container + * "function" Function which is a callback that should return the content. Use the 'this' value to access the target DOM element. + */ + contentTemplate?: string|Function; + + /** + * Selectors indicating which items should show popovers. The predefined value is [title]. Customize if you're using something other then the title attribute for the popover content, or if you need a different selector for event delegation. When changing this option, you likely need to also change the contentTemplate option + */ + selectors?: string; + + /** + * Sets the content for the popover header + */ + headerTemplate?: IgPopoverHeaderTemplate; + + /** + * sets the event on which the popover will be shown. Predefined values are "mouseenter", "click" and "focus" + * + * Valid values: + * "mouseenter" the popover is shown on mouse enter in the target element + * "click" the popover is shown on click on the target element + * "focus" the popover is shown on focusing the target element + */ + showOn?: string; + + /** + * Controls where the popover DOM should be attached to. + * + * + * Valid values: + * "string" A valid jQuery selector for the element + * "object" A reference to the parent jQuery object + */ + appendTo?: string|Object; + + /** + * Event fired before popover is shown. + * Function takes arguments evt and ui. + * Use ui.element to get the element the popover will show for. + * Use ui.content to get or set the content to be shown as a string. + * Use ui.popover to get the popover element showing. + * Use ui.owner to get reference to the igPopover widget + */ + showing?: ShowingEvent; + + /** + * Event fired after popover is shown. + * Function takes arguments evt and ui. + * Use ui.element to get the element the popover showed for. + * Use ui.content to get the content that was shown as a string. + * Use ui.popover to get the popover element shown. + * Use ui.owner to get reference to the igPopover widget + */ + shown?: ShownEvent; + + /** + * Event fired before popover is hidden. + * Function takes arguments evt and ui. + * Use ui.element to get the element the popover will hide for. + * Use ui.content to get the current content displayed in the popover as a string. + * Use ui.popover to get the popover element hiding. + * Use ui.owner to get reference to the igPopover widget + */ + hiding?: HidingEvent; + + /** + * Event fired after popover is hidden. + * Function takes arguments evt and ui. + * Use ui.element to get the element the popover is hidden for. + * Use ui.content to get the content displayed in the popover as a string. + * Use ui.popover to get the popover element hidden. + * Use ui.owner to get reference to the igPopover widget + */ + hidden?: HiddenEvent; + + /** + * Option for igGridFeatureChooserPopover + */ + [optionName: string]: any; +} +interface IgGridFeatureChooserPopoverMethods { + isShown(): void; + registerElements(elements: Object): void; + destroy(): void; + + /** + * Returns the ID of the element the popover is attached to + */ + id(): string; + + /** + * Returns the container for the popover contents + */ + container(): Object; + + /** + * Shows the popover for the specified target + * + * @param trg The element to show popover for. + * @param content The string to set for the popover to show. + */ + show(trg?: Element, content?: string): void; + + /** + * Hides the popover for the specified target + */ + hide(): void; + + /** + * Gets the currently set content for the popover container + */ + getContent(): string; + + /** + * Sets the content for the popover container + * + * @param newCnt The popover content to set. + */ + setContent(newCnt: string): void; + + /** + * Gets the popover current target + */ + target(): Object; + + /** + * Gets the current coordinates of the popover + */ + getCoordinates(): Object; + + /** + * Sets the popover to specific coordinates. + * + * @param pos The popover coordinates in pixels. + */ + setCoordinates(pos: Object): void; +} +interface JQuery { + data(propertyName: "igGridFeatureChooserPopover"): IgGridFeatureChooserPopoverMethods; +} + +interface FeatureChooserRenderingEvent { + (event: Event, ui: FeatureChooserRenderingEventUIParam): void; +} + +interface FeatureChooserRenderingEventUIParam { +} + +interface FeatureChooserRenderedEvent { + (event: Event, ui: FeatureChooserRenderedEventUIParam): void; +} + +interface FeatureChooserRenderedEventUIParam { +} + +interface FeatureChooserDropDownOpeningEvent { + (event: Event, ui: FeatureChooserDropDownOpeningEventUIParam): void; +} + +interface FeatureChooserDropDownOpeningEventUIParam { +} + +interface FeatureChooserDropDownOpenedEvent { + (event: Event, ui: FeatureChooserDropDownOpenedEventUIParam): void; +} + +interface FeatureChooserDropDownOpenedEventUIParam { +} + +interface MenuTogglingEvent { + (event: Event, ui: MenuTogglingEventUIParam): void; +} + +interface MenuTogglingEventUIParam { +} + +interface FeatureTogglingEvent { + (event: Event, ui: FeatureTogglingEventUIParam): void; +} + +interface FeatureTogglingEventUIParam { +} + +interface FeatureToggledEvent { + (event: Event, ui: FeatureToggledEventUIParam): void; +} + +interface FeatureToggledEventUIParam { +} + +interface IgGridFeatureChooser { + dropDownWidth?: any; + animationDuration?: number; + featureChooserRendering?: FeatureChooserRenderingEvent; + featureChooserRendered?: FeatureChooserRenderedEvent; + featureChooserDropDownOpening?: FeatureChooserDropDownOpeningEvent; + featureChooserDropDownOpened?: FeatureChooserDropDownOpenedEvent; + menuToggling?: MenuTogglingEvent; + featureToggling?: FeatureTogglingEvent; + featureToggled?: FeatureToggledEvent; + + /** + * Option for igGridFeatureChooser + */ + [optionName: string]: any; +} +interface IgGridFeatureChooserMethods { + shouldShowFeatureIcon(key: Object): void; + + /** + * Show feature chooser dialog by the specified column key + * + * @param columnKey Key of the column that should be shown. + */ + showDropDown(columnKey: string): void; + + /** + * Hide feature chooser dialog by column key + * + * @param columnKey Key of the column that should be hidden. + */ + hideDropDown(columnKey: string): void; + + /** + * Get jQuery representation of the div holding dropdown for the specified columnKey + * + * @param columnKey Key of the column + */ + getDropDownByColumnKey(columnKey: string): void; + + /** + * Show/hide feature chooser dialog by column key + * + * @param columnKey Key of the column that should be shown/hidden. + */ + toggleDropDown(columnKey: string): void; + destroy(e: Object, args: Object): void; +} +interface JQuery { + data(propertyName: "igGridFeatureChooser"): IgGridFeatureChooserMethods; +} + +interface JQuery { + igGridFeatureChooserPopover(methodName: "isShown"): void; + igGridFeatureChooserPopover(methodName: "registerElements", elements: Object): void; + igGridFeatureChooserPopover(methodName: "destroy"): void; + igGridFeatureChooserPopover(methodName: "id"): string; + igGridFeatureChooserPopover(methodName: "container"): Object; + igGridFeatureChooserPopover(methodName: "show", trg?: Element, content?: string): void; + igGridFeatureChooserPopover(methodName: "hide"): void; + igGridFeatureChooserPopover(methodName: "getContent"): string; + igGridFeatureChooserPopover(methodName: "setContent", newCnt: string): void; + igGridFeatureChooserPopover(methodName: "target"): Object; + igGridFeatureChooserPopover(methodName: "getCoordinates"): Object; + igGridFeatureChooserPopover(methodName: "setCoordinates", pos: Object): void; + + /** + */ + igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "gridId"): string; + + /** + */ + igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "gridId", optionValue: string): void; + + /** + */ + igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "targetButton"): any; + + /** + */ + igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "targetButton", optionValue: any): void; + + /** + */ + igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "closeOnBlur"): boolean; + + /** + */ + igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "closeOnBlur", optionValue: boolean): void; + + /** + */ + igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "containment"): any; + + /** + */ + igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "containment", optionValue: any): void; + + /** + * Controls the direction in which the control shows relative to the target element + */ + igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "direction"): string; + + /** + * Controls the direction in which the control shows relative to the target element + * + * @optionValue New value to be set. + */ + igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "direction", optionValue: string): void; + + /** + * Controls the position of the popover according to the target element in case the popover is larger than the target on the side we want to position, if the popover is smaller it should always be in the middle of the visible area + */ + igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "position"): string; + + /** + * Controls the position of the popover according to the target element in case the popover is larger than the target on the side we want to position, if the popover is smaller it should always be in the middle of the visible area + * + * @optionValue New value to be set. + */ + igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "position", optionValue: string): void; + + /** + * Defines width for the popover. leave null for auto. + */ + igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "width"): number|string; + + /** + * Defines width for the popover. leave null for auto. + * + * @optionValue New value to be set. + */ + igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "width", optionValue: number|string): void; + + /** + * Defines height for the popover. leave null for auto + */ + igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "height"): number|string; + + /** + * Defines height for the popover. leave null for auto + * + * @optionValue New value to be set. + */ + igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "height", optionValue: number|string): void; + + /** + * Defines width the popover won't go under the value even if no specific one is set. + */ + igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "minWidth"): number|string; + + /** + * Defines width the popover won't go under the value even if no specific one is set. + * + * @optionValue New value to be set. + */ + igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "minWidth", optionValue: number|string): void; + + /** + * Defines width the popover won't exceed even if no specific one is set. + */ + igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "maxWidth"): number|string; + + /** + * Defines width the popover won't exceed even if no specific one is set. + * + * @optionValue New value to be set. + */ + igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "maxWidth", optionValue: number|string): void; + + /** + * Defines height the popover won't exceed even if no specific one is set. + */ + igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "maxHeight"): number|string; + + /** + * Defines height the popover won't exceed even if no specific one is set. + * + * @optionValue New value to be set. + */ + igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "maxHeight", optionValue: number|string): void; + + /** + * The time popover fades in and out when showing/hiding + */ + igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "animationDuration"): number; + + /** + * Sets the time popover fades in and out when showing/hiding + * + * @optionValue New value to be set. + */ + igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "animationDuration", optionValue: number): void; + + /** + * The content for the popover container. If left null the content will be get from the target. + */ + igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "contentTemplate"): string|Function; + + /** + * Sets the content for the popover container. If left null the content will be get from the target. + * + * @optionValue New value to be set. + */ + igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "contentTemplate", optionValue: string|Function): void; + + /** + * Selectors indicating which items should show popovers. The predefined value is [title]. Customize if you're using something other then the title attribute for the popover content, or if you need a different selector for event delegation. When changing this option, you likely need to also change the contentTemplate option + */ + igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "selectors"): string; + + /** + * Selectors indicating which items should show popovers. The predefined value is [title]. Customize if you're using something other then the title attribute for the popover content, or if you need a different selector for event delegation. When changing this option, you likely need to also change the contentTemplate option + * + * @optionValue New value to be set. + */ + igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "selectors", optionValue: string): void; + + /** + * The content for the popover header + */ + igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "headerTemplate"): IgPopoverHeaderTemplate; + + /** + * Sets the content for the popover header + * + * @optionValue New value to be set. + */ + igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "headerTemplate", optionValue: IgPopoverHeaderTemplate): void; + + /** + * The event on which the popover will be shown. Predefined values are "mouseenter", "click" and "focus" + */ + igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "showOn"): string; + + /** + * Sets the event on which the popover will be shown. Predefined values are "mouseenter", "click" and "focus" + * + * @optionValue New value to be set. + */ + igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "showOn", optionValue: string): void; + + /** + * Controls where the popover DOM should be attached to. + * + */ + igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "appendTo"): string|Object; + + /** + * Controls where the popover DOM should be attached to. + * + * + * @optionValue New value to be set. + */ + igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "appendTo", optionValue: string|Object): void; + + /** + * Event fired before popover is shown. + * Function takes arguments evt and ui. + * Use ui.element to get the element the popover will show for. + * Use ui.content to get or set the content to be shown as a string. + * Use ui.popover to get the popover element showing. + * Use ui.owner to get reference to the igPopover widget + */ + igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "showing"): ShowingEvent; + + /** + * Event fired before popover is shown. + * Function takes arguments evt and ui. + * Use ui.element to get the element the popover will show for. + * Use ui.content to get or set the content to be shown as a string. + * Use ui.popover to get the popover element showing. + * Use ui.owner to get reference to the igPopover widget + * + * @optionValue Define event handler function. + */ + igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "showing", optionValue: ShowingEvent): void; + + /** + * Event fired after popover is shown. + * Function takes arguments evt and ui. + * Use ui.element to get the element the popover showed for. + * Use ui.content to get the content that was shown as a string. + * Use ui.popover to get the popover element shown. + * Use ui.owner to get reference to the igPopover widget + */ + igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "shown"): ShownEvent; + + /** + * Event fired after popover is shown. + * Function takes arguments evt and ui. + * Use ui.element to get the element the popover showed for. + * Use ui.content to get the content that was shown as a string. + * Use ui.popover to get the popover element shown. + * Use ui.owner to get reference to the igPopover widget + * + * @optionValue Define event handler function. + */ + igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "shown", optionValue: ShownEvent): void; + + /** + * Event fired before popover is hidden. + * Function takes arguments evt and ui. + * Use ui.element to get the element the popover will hide for. + * Use ui.content to get the current content displayed in the popover as a string. + * Use ui.popover to get the popover element hiding. + * Use ui.owner to get reference to the igPopover widget + */ + igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "hiding"): HidingEvent; + + /** + * Event fired before popover is hidden. + * Function takes arguments evt and ui. + * Use ui.element to get the element the popover will hide for. + * Use ui.content to get the current content displayed in the popover as a string. + * Use ui.popover to get the popover element hiding. + * Use ui.owner to get reference to the igPopover widget + * + * @optionValue Define event handler function. + */ + igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "hiding", optionValue: HidingEvent): void; + + /** + * Event fired after popover is hidden. + * Function takes arguments evt and ui. + * Use ui.element to get the element the popover is hidden for. + * Use ui.content to get the content displayed in the popover as a string. + * Use ui.popover to get the popover element hidden. + * Use ui.owner to get reference to the igPopover widget + */ + igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "hidden"): HiddenEvent; + + /** + * Event fired after popover is hidden. + * Function takes arguments evt and ui. + * Use ui.element to get the element the popover is hidden for. + * Use ui.content to get the content displayed in the popover as a string. + * Use ui.popover to get the popover element hidden. + * Use ui.owner to get reference to the igPopover widget + * + * @optionValue Define event handler function. + */ + igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "hidden", optionValue: HiddenEvent): void; + igGridFeatureChooserPopover(options: IgGridFeatureChooserPopover): JQuery; + igGridFeatureChooserPopover(optionLiteral: 'option', optionName: string): any; + igGridFeatureChooserPopover(optionLiteral: 'option', options: IgGridFeatureChooserPopover): JQuery; + igGridFeatureChooserPopover(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igGridFeatureChooserPopover(methodName: string, ...methodParams: any[]): any; +} +interface JQuery { + igGridFeatureChooser(methodName: "shouldShowFeatureIcon", key: Object): void; + igGridFeatureChooser(methodName: "showDropDown", columnKey: string): void; + igGridFeatureChooser(methodName: "hideDropDown", columnKey: string): void; + igGridFeatureChooser(methodName: "getDropDownByColumnKey", columnKey: string): void; + igGridFeatureChooser(methodName: "toggleDropDown", columnKey: string): void; + igGridFeatureChooser(methodName: "destroy", e: Object, args: Object): void; + + /** + */ + igGridFeatureChooser(optionLiteral: 'option', optionName: "dropDownWidth"): any; + + /** + */ + igGridFeatureChooser(optionLiteral: 'option', optionName: "dropDownWidth", optionValue: any): void; + + /** + */ + igGridFeatureChooser(optionLiteral: 'option', optionName: "animationDuration"): number; + + /** + */ + igGridFeatureChooser(optionLiteral: 'option', optionName: "animationDuration", optionValue: number): void; + + /** + */ + igGridFeatureChooser(optionLiteral: 'option', optionName: "featureChooserRendering"): FeatureChooserRenderingEvent; + + /** + */ + igGridFeatureChooser(optionLiteral: 'option', optionName: "featureChooserRendering", optionValue: FeatureChooserRenderingEvent): void; + + /** + */ + igGridFeatureChooser(optionLiteral: 'option', optionName: "featureChooserRendered"): FeatureChooserRenderedEvent; + + /** + */ + igGridFeatureChooser(optionLiteral: 'option', optionName: "featureChooserRendered", optionValue: FeatureChooserRenderedEvent): void; + + /** + */ + igGridFeatureChooser(optionLiteral: 'option', optionName: "featureChooserDropDownOpening"): FeatureChooserDropDownOpeningEvent; + + /** + */ + igGridFeatureChooser(optionLiteral: 'option', optionName: "featureChooserDropDownOpening", optionValue: FeatureChooserDropDownOpeningEvent): void; + + /** + */ + igGridFeatureChooser(optionLiteral: 'option', optionName: "featureChooserDropDownOpened"): FeatureChooserDropDownOpenedEvent; + + /** + */ + igGridFeatureChooser(optionLiteral: 'option', optionName: "featureChooserDropDownOpened", optionValue: FeatureChooserDropDownOpenedEvent): void; + + /** + */ + igGridFeatureChooser(optionLiteral: 'option', optionName: "menuToggling"): MenuTogglingEvent; + + /** + */ + igGridFeatureChooser(optionLiteral: 'option', optionName: "menuToggling", optionValue: MenuTogglingEvent): void; + + /** + */ + igGridFeatureChooser(optionLiteral: 'option', optionName: "featureToggling"): FeatureTogglingEvent; + + /** + */ + igGridFeatureChooser(optionLiteral: 'option', optionName: "featureToggling", optionValue: FeatureTogglingEvent): void; + + /** + */ + igGridFeatureChooser(optionLiteral: 'option', optionName: "featureToggled"): FeatureToggledEvent; + + /** + */ + igGridFeatureChooser(optionLiteral: 'option', optionName: "featureToggled", optionValue: FeatureToggledEvent): void; + igGridFeatureChooser(options: IgGridFeatureChooser): JQuery; + igGridFeatureChooser(optionLiteral: 'option', optionName: string): any; + igGridFeatureChooser(optionLiteral: 'option', options: IgGridFeatureChooser): JQuery; + igGridFeatureChooser(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igGridFeatureChooser(methodName: string, ...methodParams: any[]): any; +} +interface IgGridGroupByGroupedColumn { + /** + * Key of the column that's grouped + */ + key?: string; + + /** + * sort order - ascending or descending + * + */ + dir?: any; + + /** + * Key of the columnLayout, if the grid is hierarchical + * + */ + layout?: string; + + /** + * [column](ui.iggrid#options:columns) object for the column that is grouped + * + */ + col?: any; + + /** + * Option for IgGridGroupByGroupedColumn + */ + [optionName: string]: any; +} + +interface IgGridGroupBySummarySettings { + /** + * Specifies the delimiter for multiple summaries. + * + */ + multiSummaryDelimiter?: string; + + /** + * Format of the summary value. By default, two digits are shown after the decimal place. Checkout [Formatting Dates, Numbers and Strings](http://www.igniteui.com/help/formatting-dates-numbers-and-strings) for details on the valid formatting specifiers. + * + */ + summaryFormat?: string; + + /** + * Option for IgGridGroupBySummarySettings + */ + [optionName: string]: any; +} + +interface IgGridGroupByColumnSettingsSummaries { + /** + * the summary function key + * + * + * Valid values: + * "avg" average summary function + * "min" minimum summary function + * "max" maximum summary function + * "sum" sum summary function + * "count" count summary function + * "custom" custom summary summary function + */ + summaryFunction?: string; + + /** + * Specifies the summary text that will be shown before the value + * + */ + text?: string; + + /** + * Specifies a custom summary function, which is called for each group, it should return the custom summary result.It takes as argument object with the following signature: {dataRecords: [], array: [], key: "", allGroupData: []} where, + * dataRecords - array of grouped (for the [data view](ig.datasource#methods:dataView)) data records, + * array - array of cell values for the specified column, + * key - key of the grouped column, + * allGroupData - array of data records for the group(for the whole data source - not only for the data view) + * + * + * + * Valid values: + * "string" the name of the function as a string located in the global window object. + * "function" which will be used for calculating the summary value. + */ + customSummary?: string|Function; + + /** + * Option for IgGridGroupByColumnSettingsSummaries + */ + [optionName: string]: any; +} + +interface IgGridGroupByColumnSettings { + /** + * Enables/disables grouping a column from the UI. By default all columns can be grouped. + * + */ + allowGrouping?: boolean; + + /** + * Specifies the initial column grouped state. + * + */ + isGroupBy?: boolean; + + /** + * Reference/name of a function (string or function) used for custom comparison. + * The function accepts the following arguments: + * val1 - the first value to compare + * val2 - the second value to compare + * recordsData - an object having three properties: fieldName - the name of the sorted field; record1 - first record to compare; record2 - second record to compare + * The function returns the following numeric value: + * 0 - indicating that values are equal + * 1 - indicating that val1 > val2 + * -1 - indicating that val1 < val2 + * + * + * Valid values: + * "string" the name of the function as a string located in the global window object. + * "function" function which will be used for custom comparison. + */ + compareFunc?: string|Function; + + /** + * Specifies a custom group by function, which accepts the column setting, the first and the second value to compare and returns bool. This option is deprecated - please use option [compareFunc](ui.iggridgroupby#options:columnSettings.compareFunc) instead. + */ + groupComparerFunction?: Function; + + /** + * Reference/name of a function (string or function) which will be used for formatting the cell values. The function should accept a value from the grouped column and return the new formatted value in the label of the row. + * + * + * Valid values: + * "string" the name of the function as a string located in the global window object. + * "function" which will be used for formatting the cell values. + */ + groupLabelFormatter?: string|Function; + + /** + * Specifies the sort order - ascending or descending when the column is initially grouped ([isGroupBy](ui.iggridgroupby#options:columnSettings.isGroupBy) = true). + * + */ + dir?: any; + + /** + * A list of aggregation functions to calculate on the column values for each group. When not specified the default aggregate function is "count". + * + */ + summaries?: IgGridGroupByColumnSettingsSummaries; + + /** + * Option for IgGridGroupByColumnSettings + */ + [optionName: string]: any; +} + +interface GroupedColumnsChangingEvent { + (event: Event, ui: GroupedColumnsChangingEventUIParam): void; +} + +interface GroupedColumnsChangingEventUIParam { + /** + * Used to access the GroupBy widget object + */ + owner?: any; + + /** + * Used to get a reference to the current groupedColumns. + */ + groupedColumns?: any; + + /** + * Used to get an object of the new grouped columns that should be applied.(it is set ONLY if called from modal dialog) + */ + newGroupedColumns?: any; + + /** + * Used to get a reference to the current column"s key that"s being grouped(not set if called from modal dialog) + */ + key?: any; + + /** + * Used to get a reference to the current layout object, if any(not set if called from modal dialog) + */ + layout?: any; + + /** + * Used to get a reference to the current child grid element, in case it's an hierarchical grid(not set if called from modal dialog) + */ + grid?: any; + + /** + * Used to get which user interaction triggers the event - possible options are dragAndDrop|modalDialog|sortStateChanged|removeButton|regroup + */ + triggeredBy?: any; +} + +interface GroupedColumnsChangedEvent { + (event: Event, ui: GroupedColumnsChangedEventUIParam): void; +} + +interface GroupedColumnsChangedEventUIParam { + /** + * Used to access the GroupBy widget object + */ + owner?: any; + + /** + * Used to get a reference to the current groupedColumns + */ + groupedColumns?: any; + + /** + * Used to get a reference to the current column"s key that"s being grouped + */ + key?: any; + + /** + * Used to get a reference to the current layout object, if any + */ + layout?: any; + + /** + * Used to get a reference to the current child grid element, in case it's an hierarchical grid(not set if called from modal dialog) + */ + grid?: any; + + /** + * Used to get which user interaction triggers the event - possible options are dragAndDrop|modalDialog|sortStateChanged|removeButton|regroup + */ + triggeredBy?: any; +} + +interface ModalDialogMovingEvent { + (event: Event, ui: ModalDialogMovingEventUIParam): void; +} + +interface ModalDialogMovingEventUIParam { + /** + * Used to get the reference to the igGridGroupBy widget. + */ + owner?: any; + + /** + * Used to get a reference to the Column Chooser element. This is a jQuery object. + */ + modalDialogElement?: any; + + /** + * Used to get the original position of the GroupBy Dialog div as { top, left } object, relative to the page. + */ + originalPosition?: any; + + /** + * Used to get the current position of the GroupBy Dialog div as { top, left } object, relative to the page. + */ + position?: any; +} + +interface ModalDialogClosingEvent { + (event: Event, ui: ModalDialogClosingEventUIParam): void; +} + +interface ModalDialogClosingEventUIParam { + /** + * Used to get the reference to the igGridGroupBy widget. + */ + owner?: any; + + /** + * Used to get a reference to the modal dialog element. This is a jQuery object. + */ + modalDialogElement?: any; +} + +interface ModalDialogClosedEvent { + (event: Event, ui: ModalDialogClosedEventUIParam): void; +} + +interface ModalDialogClosedEventUIParam { + /** + * Used to get the reference to the igGridGroupBy widget. + */ + owner?: any; + + /** + * Used to get a reference to the modal dialog element. This is a jQuery object. + */ + modalDialogElement?: any; +} + +interface ModalDialogOpeningEvent { + (event: Event, ui: ModalDialogOpeningEventUIParam): void; +} + +interface ModalDialogOpeningEventUIParam { + /** + * Used to get the reference to the igGridGroupBy widget. + */ + owner?: any; + + /** + * Used to get a reference to the modal dialog element. This is a jQuery object. + */ + modalDialogElement?: any; +} + +interface ModalDialogOpenedEvent { + (event: Event, ui: ModalDialogOpenedEventUIParam): void; +} + +interface ModalDialogOpenedEventUIParam { + /** + * Used to get the reference to the igGridGroupBy widget. + */ + owner?: any; + + /** + * Used to get a reference to the modal dialog element. This is a jQuery object. + */ + modalDialogElement?: any; +} + +interface ModalDialogContentsRenderingEvent { + (event: Event, ui: ModalDialogContentsRenderingEventUIParam): void; +} + +interface ModalDialogContentsRenderingEventUIParam { + /** + * Used to get the reference to the igGridGroupby widget. + */ + owner?: any; + + /** + * Used to get a reference to the modal dialog element. This is a jQuery object. + */ + modalDialogElement?: any; +} + +interface ModalDialogContentsRenderedEvent { + (event: Event, ui: ModalDialogContentsRenderedEventUIParam): void; +} + +interface ModalDialogContentsRenderedEventUIParam { + /** + * Used to get the reference to the igGridGroupBy widget. + */ + owner?: any; + + /** + * Used to get a reference to the modal dialog element. This is a jQuery object. + */ + modalDialogElement?: any; +} + +interface ModalDialogButtonApplyClickEvent { + (event: Event, ui: ModalDialogButtonApplyClickEventUIParam): void; +} + +interface ModalDialogButtonApplyClickEventUIParam { + /** + * Used to get the reference to the igGridGroupby widget. + */ + owner?: any; + + /** + * Used to get a reference to the modal dialog element. This is a jQuery object. + */ + modalDialogElement?: any; + + /** + * Used to get the array of grouped columns + */ + groupedColumns?: any; + + /** + * Used to get array of column layouts + */ + groupedColumnLayouts?: any; + + /** + * Used to get array of sorted columns + */ + sortingExpr?: any; +} + +interface ModalDialogButtonResetClickEvent { + (event: Event, ui: ModalDialogButtonResetClickEventUIParam): void; +} + +interface ModalDialogButtonResetClickEventUIParam { + /** + * Used to get the reference to the igGridGroupby widget. + */ + owner?: any; + + /** + * Used to get a reference to the modal dialog element. This is a jQuery object. + */ + modalDialogElement?: any; +} + +interface ModalDialogGroupingColumnEvent { + (event: Event, ui: ModalDialogGroupingColumnEventUIParam): void; +} + +interface ModalDialogGroupingColumnEventUIParam { + /** + * Used to get the reference to the igGridGroupby widget. + */ + owner?: any; + + /** + * Used to get the key of the column to be grouped. + */ + key?: any; + + /** + * Used to get the layout of the columns + */ + layout?: any; +} + +interface ModalDialogGroupColumnEvent { + (event: Event, ui: ModalDialogGroupColumnEventUIParam): void; +} + +interface ModalDialogGroupColumnEventUIParam { + /** + * Used to get the reference to the igGridGroupby widget. + */ + owner?: any; + + /** + * Used to get the key of the column to be grouped. + */ + key?: any; + + /** + * Used to get a reference to the current groupedColumns + */ + groupedColumns?: any; + + /** + * Used to get the layout of the columns + */ + layout?: any; +} + +interface ModalDialogUngroupingColumnEvent { + (event: Event, ui: ModalDialogUngroupingColumnEventUIParam): void; +} + +interface ModalDialogUngroupingColumnEventUIParam { + /** + * Used to get the reference to the igGridGroupby widget. + */ + owner?: any; + + /** + * Used to get the key of the column to be grouped. + */ + key?: any; + + /** + * Used to get the layout of the columns + */ + layout?: any; +} + +interface ModalDialogUngroupColumnEvent { + (event: Event, ui: ModalDialogUngroupColumnEventUIParam): void; +} + +interface ModalDialogUngroupColumnEventUIParam { + /** + * Used to get the reference to the igGridGroupby widget. + */ + owner?: any; + + /** + * Used to get a reference to the current groupedColumns + */ + groupedColumns?: any; + + /** + * Used to get the key of the column to be grouped. + */ + key?: any; + + /** + * Used to get the layout of the columns + */ + layout?: any; +} + +interface ModalDialogSortGroupedColumnEvent { + (event: Event, ui: ModalDialogSortGroupedColumnEventUIParam): void; +} + +interface ModalDialogSortGroupedColumnEventUIParam { + /** + * Used to get the reference to the igGridGroupby widget. + */ + owner?: any; + + /** + * Used to get the key of the column to be grouped. + */ + key?: any; + + /** + * Used to get the layout of the columns + */ + layout?: any; + + /** + * Used to get whether column should be sorted ascending or descending + */ + isAsc?: any; +} + +interface IgGridGroupBy { + /** + * Sets the place in the grid where the GroupBy area will be + * + * + * Valid values: + * "top" the GroupBy area will be rendered above the grid headers + * "hidden" the GroupBy area will not be rendered + * "bottom" the GroupBy area will be rendered below the grid footer (and above the pager, if any) + */ + groupByAreaVisibility?: string; + + /** + * Specifies if after grouping, the grouped rows will be initially expanded or collapsed. + * + */ + initialExpand?: boolean; + + /** + * Text that will be shown in the GroupBy area when there are no grouped columns + * + */ + emptyGroupByAreaContent?: string; + + /** + * Text of the link that opens the [GroupBy Dialog](http://www.igniteui.com/help/iggrid-group-by-dialog-overview). + * + */ + emptyGroupByAreaContentSelectColumns?: string; + + /** + * Specifies if grouped rows will have an expander image that will allow end users to expand and collapse them. This option can be set only at initialization. + * + */ + expansionIndicatorVisibility?: boolean; + + /** + * By default, the column width for the header is taken. If this is specified it's used for all headers. + * + */ + groupByLabelWidth?: number; + + /** + * Specifies the opacity of the drag markup, while a column header is being dragged. The value must be between 0 and 1. + * + */ + labelDragHelperOpacity?: number; + + /** + * Specifies the indentation for a grouped row. If several columns are grouped, the total indentation will grow + * + */ + indentation?: number; + + /** + * default sort order - ascending or descending + * + * + * Valid values: + * "asc" The group is sorted in ascending order. + * "desc" The group is sorted in descending order. + */ + defaultSortingDirection?: string; + + /** + * Returns the list of currently grouped columns. The option is read-only and cannot be set at initialization or at runtime. + * + */ + groupedColumns?: IgGridGroupByGroupedColumn[]; + + /** + * Specifies a key to get group by data from the remote response. + * + */ + resultResponseKey?: string; + + /** + * Template for the grouped row's text. Variables available for the template are ${key}, ${val} and ${count}. + * + */ + groupedRowTextTemplate?: string; + + /** + * Specifies whether the GroupBy operation takes place locally on client-side or remotely on server-side. + * + * + * Valid values: + * "local" Execute the GroupBy operation locally on client-side. + * "remote" Execute the GroupBy operation by a request to the server. + */ + type?: string; + + /** + * URL param name which specifies a GroupBy [expression](ig.datasource#options:settings.sorting.expressions). When groupByUrlKey, [groupByUrlKeyAscValue](ui.iggridgroupby#options:groupByUrlKeyAscValue) and [groupByUrlKeyDescValue](ui.iggridgroupby#options:groupByUrlKeyDescValue) are set the request looks like: ?()= (Example: ?groupby(col1)=asc). Otherwise the OData conventions for sorting params are used. + * + */ + groupByUrlKey?: string; + + /** + * URL param value denoting ascending grouping. When [groupByUrlKey](ui.iggridgroupby#options:groupByUrlKey), groupByUrlKeyAscValue and [groupByUrlKeyDescValue](ui.iggridgroupby#options:groupByUrlKeyDescValue) are set the request looks like: ?()= (Example: ?groupby(col1)=asc). Otherwise the OData conventions for sorting params are used. + * + */ + groupByUrlKeyAscValue?: string; + + /** + * URL param value denoting descending grouping. When [groupByUrlKey](ui.iggridgroupby#options:groupByUrlKey), [groupByUrlKeyAscValue](ui.iggridgroupby#options:groupByUrlKeyAscValue) and groupByUrlKeyDescValue are set the request looks like: ?()= (Example: ?groupby(col1)=asc). Otherwise the OData conventions for sorting params are used. + * + */ + groupByUrlKeyDescValue?: string; + + /** + * Specifies the settings for GroupBy summaries. + * + */ + summarySettings?: IgGridGroupBySummarySettings; + + /** + * Configures individual column settings. + * + */ + columnSettings?: IgGridGroupByColumnSettings; + + /** + * Specifies the expand indicator tooltip for grouped rows + * + */ + expandTooltip?: string; + + /** + * Specifies the collapse indicator tooltip for grouped rows + * + */ + collapseTooltip?: string; + + /** + * Specifies the tooltip for the remove button + * + */ + removeButtonTooltip?: string; + + /** + * Enables/disables immediate column grouping/ungrouping. When false operation is delayed until after "Apply" button is clicked by the user. + * + */ + modalDialogGroupByOnClick?: boolean; + + /** + * Specifies the text of GroupBy button in the GroupBy Dialog + * + */ + modalDialogGroupByButtonText?: string; + + /** + * Specifies caption for each descending sorted column in GroupBy Dialog + * + */ + modalDialogCaptionButtonDesc?: string; + + /** + * Specifies caption for each ascending sorted column in GroupBy Dialog + * + */ + modalDialogCaptionButtonAsc?: string; + + /** + * Specifies caption button ungroup in GroupBy Dialog + * + */ + modalDialogCaptionButtonUngroup?: string; + + /** + * Specifies caption text for the GroupBy Dialog + * + */ + modalDialogCaptionText?: string; + + /** + * Specifies label for layouts dropdown in the GroupBy Dialog + * + */ + modalDialogDropDownLabel?: string; + + /** + * Specifies name of the root layout which is shown layouts tree dialog + * + */ + modalDialogRootLevelHierarchicalGrid?: string; + + /** + * Specifies caption of layouts dropdown button in the GroupBy Dialog + * + */ + modalDialogDropDownButtonCaption?: string; + + /** + * Specifies label for "Clear all" button in the GroupBy Dialog + * + */ + modalDialogClearAllButtonLabel?: string; + + /** + * Specifies caption for the hyperlink which opens the GroupBy Dialog + * + */ + emptyGroupByAreaContentSelectColumnsCaption?: string; + + /** + * Specifies width of layouts dropdown in the GroupBy Dialog + * + */ + modalDialogDropDownWidth?: number; + + /** + * Specifies width of layouts dropdown in the GroupBy Dialog + * + */ + modalDialogDropDownAreaWidth?: number; + + /** + * Specifies time in milliseconds for animation duration to show/hide modal dialog + * + */ + modalDialogAnimationDuration?: number; + + /** + * Specifies width of the GroupBy Dialog + * + * + * Valid values: + * "string" The dialog width can be set in pixels (px) or percentage (%). Example values: "800px", "800" (defaults to pixels), "100%". + * "number" The dialog width can be set in pixels as a number. Example values: 800, 700. + */ + modalDialogWidth?: string|number; + + /** + * Specifies height of the GroupBy Dialog + * + * + * Valid values: + * "string" The dialog height can be set in pixels (px) or percentage (%). Example values: "800px", "800" (defaults to pixels), "100%". + * "number" The dialog height can be set in pixels as a number. Example values: 800, 700. + */ + modalDialogHeight?: string|number; + + /** + * Specifies text of button which apply changes in modal dialog + * + */ + modalDialogButtonApplyText?: string; + + /** + * Specifies text of button which cancel changes in the GroupBy Dialog + * + */ + modalDialogButtonCancelText?: string; + + /** + * Format grouped column using the formatter set in [igGrid.columns.formatter](ui.iggrid#options:columns.formatter) or [igGrid.columns.format](ui.iggrid#options:columns.format). + * + */ + useGridColumnFormatter?: boolean; + + /** + * Enables / disables GroupBy persistence between states. Checkout the [GroupBy Persistence](http://www.igniteui.com/help/iggrid-groupby-overview#groupBy-persistence) topic for details. + * + */ + persist?: boolean; + + /** + * Controls containment behavior for the GroupBy Dialog. + * + * + * Valid values: + * "owner" The GroupBy Dialog will be draggable only in the grid area + * "window" The GroupBy Dialog will be draggable in the whole window area + */ + groupByDialogContainment?: string; + + /** + * Name of the dialog widget to be used. It should inherit from $.ui.igGridModalDialog. Checkout the [Extending igGrid Modal Dialog](http://www.igniteui.com/help/extending-iggrid-modal-dialog) topic for details. + * + */ + dialogWidget?: string; + + /** + * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. + */ + inherit?: boolean; + + /** + * Event which is fired when the grouped columns collection is about to change. This event is fired even when button OK is clicked from the modal dialog(after event modalDialogButtonApplyClick is fired) + * use args.owner in order to access the GroupBy widget object + * use args.owner.grid to access the grid widget option + * use args.groupedColumns to get a reference to the current groupedColumns. + * use args.newGroupedColumns to get an object of the new grouped columns that should be applied.(it is set ONLY if called from modal dialog) + * use args.key to get a reference to the current column"s key that"s being grouped(not set if called from modal dialog) + * use args.layout to get a reference to the current layout object, if any(not set if called from modal dialog) + * use args.grid to get a reference to the current child grid element, in case it's an hierarchical grid(not set if called from modal dialog) + * use args.triggeredBy to get which user interaction triggers the event - possible options are dragAndDrop|modalDialog|sortStateChanged|removeButton|regroup + */ + groupedColumnsChanging?: GroupedColumnsChangingEvent; + + /** + * Event which is fired when the groupedColumns collection has changed. This event is fired also when group/ungroup from GroupBy modal dialog but key, layout and grid are not set + * use args.owner in order to access the GroupBy widget object + * use args.owner.grid to access the grid widget option + * use args.groupedColumns to get a reference to the current groupedColumns + * use args.key to get a reference to the current column"s key that"s being grouped + * use args.layout to get a reference to the current layout object, if any + * use args.grid to get a reference to the current child grid element, in case it's an hierarchical grid(not set if called from modal dialog) + * use args.triggeredBy to get which user interaction triggers the event - possible options are dragAndDrop|modalDialog|sortStateChanged|removeButton|regroup + */ + groupedColumnsChanged?: GroupedColumnsChangedEvent; + + /** + * Event fired every time the GroupBy Dialog changes its position. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridGroupBy widget. + * Use ui.owner.grid to get the reference to the igGrid widget. + * Use ui.modalDialogElement to get a reference to the Column Chooser element. This is a jQuery object. + * Use ui.originalPosition to get the original position of the GroupBy Dialog div as { top, left } object, relative to the page. + * Use ui.position to get the current position of the GroupBy Dialog div as { top, left } object, relative to the page. + */ + modalDialogMoving?: ModalDialogMovingEvent; + + /** + * Event fired before the modal dialog is closed. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridGroupBy widget. + * Use ui.owner.grid to get the reference to the igGrid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + */ + modalDialogClosing?: ModalDialogClosingEvent; + + /** + * Event fired after the modal dialog has been closed. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridGroupBy widget. + * Use ui.owner.grid to get the reference to the igGrid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + */ + modalDialogClosed?: ModalDialogClosedEvent; + + /** + * Event fired before the modal dialog is opened. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridGroupBy widget. + * Use ui.owner.grid to get the reference to the igGrid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + */ + modalDialogOpening?: ModalDialogOpeningEvent; + + /** + * Event fired after the modal dialog is already opened. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridGroupBy widget. + * Use ui.owner.grid to get the reference to the igGrid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + */ + modalDialogOpened?: ModalDialogOpenedEvent; + + /** + * Event fired before the contents of the modal dialog are rendered. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridGroupby widget. + * Use ui.owner.grid to get the reference to the igGrid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + */ + modalDialogContentsRendering?: ModalDialogContentsRenderingEvent; + + /** + * Event fired after the contents of the modal dialog are rendered. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridGroupBy widget. + * Use ui.owner.grid to get the reference to the igGrid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + */ + modalDialogContentsRendered?: ModalDialogContentsRenderedEvent; + + /** + * Event fired when the button is Apply is clicked. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridGroupby widget. + * Use ui.owner.grid to get the reference to the igGrid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + * Use ui.groupedColumns to get the array of grouped columns + * Use ui.groupedColumnLayouts to get array of column layouts + * Use ui.sortingExpr to get array of sorted columns + */ + modalDialogButtonApplyClick?: ModalDialogButtonApplyClickEvent; + + /** + * Event fired when reset button is clicked. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridGroupby widget. + * Use ui.owner.grid to get the reference to the igGrid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + */ + modalDialogButtonResetClick?: ModalDialogButtonResetClickEvent; + + /** + * Event fired when column in modal dialog is clicked to be grouped. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridGroupby widget. + * Use ui.owner.grid to get the reference to the igGrid widget. + * Use ui.key to get the key of the column to be grouped. + * Use ui.layout to get the layout of the columns + */ + modalDialogGroupingColumn?: ModalDialogGroupingColumnEvent; + + /** + * Event fired when column in modal dialog is clicked to be grouped. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridGroupby widget. + * Use ui.owner.grid to get the reference to the igGrid widget. + * Use ui.key to get the key of the column to be grouped. + * Use args.groupedColumns to get a reference to the current groupedColumns + * Use ui.layout to get the layout of the columns + */ + modalDialogGroupColumn?: ModalDialogGroupColumnEvent; + + /** + * Event fired when column in modal dialog is clicked to be ungrouped. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridGroupby widget. + * Use ui.owner.grid to get the reference to the igGrid widget. + * Use ui.key to get the key of the column to be grouped. + * Use ui.layout to get the layout of the columns + */ + modalDialogUngroupingColumn?: ModalDialogUngroupingColumnEvent; + + /** + * Event fired when column in modal dialog is clicked to be ungrouped. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridGroupby widget. + * Use ui.owner.grid to get the reference to the igGrid widget. + * Use args.groupedColumns to get a reference to the current groupedColumns + * Use ui.key to get the key of the column to be grouped. + * Use ui.layout to get the layout of the columns + */ + modalDialogUngroupColumn?: ModalDialogUngroupColumnEvent; + + /** + * Event fired when column in modal dialog is sorted. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridGroupby widget. + * Use ui.owner.grid to get the reference to the igGrid widget. + * Use ui.key to get the key of the column to be grouped. + * Use ui.layout to get the layout of the columns + * Use ui.isAsc to get whether column should be sorted ascending or descending + */ + modalDialogSortGroupedColumn?: ModalDialogSortGroupedColumnEvent; + + /** + * Option for igGridGroupBy + */ + [optionName: string]: any; +} +interface IgGridGroupByMethods { + /** + * Open groupby modal dialog + */ + openGroupByDialog(): void; + + /** + * Close groupby modal dialog + */ + closeGroupByDialog(): void; + + /** + * Render groupby modal dialog and its content + */ + renderGroupByModalDialog(): void; + + /** + * Open layouts dropdown + */ + openDropDown(): void; + + /** + * Close layouts dropdown + */ + closeDropDown(): void; + + /** + * Check whether column with specified key and layout is grouped + * + * @param key key of the column + * @param layout layout name + */ + checkColumnIsGrouped(key: string, layout: string): void; + + /** + * Get grouped data by value for the specific column. NOTE: Before calling this function the data(that is passed as an argument) should be sorted by colKey. + * + * @param data data (sorted by colKey) that is used to get the records from. + * @param colKey key of the column for which grouping will be applied. + * @param idval value of the column by which grouping will be applied. + */ + getGroupedData(data: any[], colKey: string, idval?: string): any[]; + + /** + * Adds a column to the group by columns list, executes the group by operation and updates the view. + */ + groupByColumns(): Object; + + /** + * Groups by a column + * + * @param key Column Key - group by the column with the specified key + * @param layout layout is an optional parameter. if set it means the grouped column is not in the root level but is a child layout column + * @param sortingDirection if not set it is taken from option defaultSortingDirection + */ + groupByColumn(key: string, layout?: string, sortingDirection?: Object): void; + + /** + * Removes the specified column from the group by columns list, executes the group by operation and updates the view. + * + * @param key Column Key - ungroup by the column with the specified key + * @param layout Layout is an optional parameter. If set it means the grouped column is not in the root level but is a child layout column. + */ + ungroupByColumn(key: string, layout?: string): void; + + /** + * Expand group row with specified id + * + * @param rowId data-id attribute of the group row in the DOM + */ + expand(rowId: string): void; + + /** + * Expand group row with specified id + * + * @param rowId data-id attribute of the group row in the DOM + */ + collapse(rowId: string): void; + + /** + * Clears the group by columns list and updates the view. + */ + ungroupAll(): void; + + /** + * Destroys the group by feature object. + */ + destroy(): void; +} +interface JQuery { + data(propertyName: "igGridGroupBy"): IgGridGroupByMethods; +} + +interface JQuery { + igGridGroupBy(methodName: "openGroupByDialog"): void; + igGridGroupBy(methodName: "closeGroupByDialog"): void; + igGridGroupBy(methodName: "renderGroupByModalDialog"): void; + igGridGroupBy(methodName: "openDropDown"): void; + igGridGroupBy(methodName: "closeDropDown"): void; + igGridGroupBy(methodName: "checkColumnIsGrouped", key: string, layout: string): void; + igGridGroupBy(methodName: "getGroupedData", data: any[], colKey: string, idval?: string): any[]; + igGridGroupBy(methodName: "groupByColumns"): Object; + igGridGroupBy(methodName: "groupByColumn", key: string, layout?: string, sortingDirection?: Object): void; + igGridGroupBy(methodName: "ungroupByColumn", key: string, layout?: string): void; + igGridGroupBy(methodName: "expand", rowId: string): void; + igGridGroupBy(methodName: "collapse", rowId: string): void; + igGridGroupBy(methodName: "ungroupAll"): void; + igGridGroupBy(methodName: "destroy"): void; + + /** + * Sets the place in the grid where the GroupBy area will be + * + */ + igGridGroupBy(optionLiteral: 'option', optionName: "groupByAreaVisibility"): string; + + /** + * Sets the place in the grid where the GroupBy area will be + * + * + * @optionValue New value to be set. + */ + igGridGroupBy(optionLiteral: 'option', optionName: "groupByAreaVisibility", optionValue: string): void; + + /** + * Gets if after grouping, the grouped rows will be initially expanded or collapsed. + * + */ + igGridGroupBy(optionLiteral: 'option', optionName: "initialExpand"): boolean; + + /** + * Sets if after grouping, the grouped rows will be initially expanded or collapsed. + * + * + * @optionValue New value to be set. + */ + igGridGroupBy(optionLiteral: 'option', optionName: "initialExpand", optionValue: boolean): void; + + /** + * Text that will be shown in the GroupBy area when there are no grouped columns + * + */ + igGridGroupBy(optionLiteral: 'option', optionName: "emptyGroupByAreaContent"): string; + + /** + * Text that will be shown in the GroupBy area when there are no grouped columns + * + * + * @optionValue New value to be set. + */ + igGridGroupBy(optionLiteral: 'option', optionName: "emptyGroupByAreaContent", optionValue: string): void; + + /** + * Text of the link that opens the [GroupBy Dialog](http://www.igniteui.com/help/iggrid-group-by-dialog-overview). + * + */ + igGridGroupBy(optionLiteral: 'option', optionName: "emptyGroupByAreaContentSelectColumns"): string; + + /** + * Text of the link that opens the [GroupBy Dialog](http://www.igniteui.com/help/iggrid-group-by-dialog-overview). + * + * + * @optionValue New value to be set. + */ + igGridGroupBy(optionLiteral: 'option', optionName: "emptyGroupByAreaContentSelectColumns", optionValue: string): void; + + /** + * Gets if grouped rows will have an expander image that will allow end users to expand and collapse them. This option can be set only at initialization. + * + */ + igGridGroupBy(optionLiteral: 'option', optionName: "expansionIndicatorVisibility"): boolean; + + /** + * Sets if grouped rows will have an expander image that will allow end users to expand and collapse them. This option can be set only at initialization. + * + * + * @optionValue New value to be set. + */ + igGridGroupBy(optionLiteral: 'option', optionName: "expansionIndicatorVisibility", optionValue: boolean): void; + + /** + * By default, the column width for the header is taken. If this is specified it's used for all headers. + * + */ + igGridGroupBy(optionLiteral: 'option', optionName: "groupByLabelWidth"): number; + + /** + * By default, the column width for the header is taken. If this is specified it's used for all headers. + * + * + * @optionValue New value to be set. + */ + igGridGroupBy(optionLiteral: 'option', optionName: "groupByLabelWidth", optionValue: number): void; + + /** + * Gets the opacity of the drag markup, while a column header is being dragged. The value must be between 0 and 1. + * + */ + igGridGroupBy(optionLiteral: 'option', optionName: "labelDragHelperOpacity"): number; + + /** + * Sets the opacity of the drag markup, while a column header is being dragged. The value must be between 0 and 1. + * + * + * @optionValue New value to be set. + */ + igGridGroupBy(optionLiteral: 'option', optionName: "labelDragHelperOpacity", optionValue: number): void; + + /** + * Specifies the indentation for a grouped row. If several columns are grouped, the total indentation will grow + * + */ + igGridGroupBy(optionLiteral: 'option', optionName: "indentation"): number; + + /** + * Specifies the indentation for a grouped row. If several columns are grouped, the total indentation will grow + * + * + * @optionValue New value to be set. + */ + igGridGroupBy(optionLiteral: 'option', optionName: "indentation", optionValue: number): void; + + /** + * Default sort order - ascending or descending + * + */ + igGridGroupBy(optionLiteral: 'option', optionName: "defaultSortingDirection"): string; + + /** + * Default sort order - ascending or descending + * + * + * @optionValue New value to be set. + */ + igGridGroupBy(optionLiteral: 'option', optionName: "defaultSortingDirection", optionValue: string): void; + + /** + * Returns the list of currently grouped columns. The option is read-only and cannot be set at initialization or at runtime. + * + */ + igGridGroupBy(optionLiteral: 'option', optionName: "groupedColumns"): IgGridGroupByGroupedColumn[]; + + /** + * Returns the list of currently grouped columns. The option is read-only and cannot be set at initialization or at runtime. + * + * + * @optionValue New value to be set. + */ + igGridGroupBy(optionLiteral: 'option', optionName: "groupedColumns", optionValue: IgGridGroupByGroupedColumn[]): void; + + /** + * Gets a key to get group by data from the remote response. + * + */ + igGridGroupBy(optionLiteral: 'option', optionName: "resultResponseKey"): string; + + /** + * Sets a key to get group by data from the remote response. + * + * + * @optionValue New value to be set. + */ + igGridGroupBy(optionLiteral: 'option', optionName: "resultResponseKey", optionValue: string): void; + + /** + * Template for the grouped row's text. Variables available for the template are ${key}, ${val} and ${count}. + * + */ + igGridGroupBy(optionLiteral: 'option', optionName: "groupedRowTextTemplate"): string; + + /** + * Template for the grouped row's text. Variables available for the template are ${key}, ${val} and ${count}. + * + * + * @optionValue New value to be set. + */ + igGridGroupBy(optionLiteral: 'option', optionName: "groupedRowTextTemplate", optionValue: string): void; + + /** + * Gets whether the GroupBy operation takes place locally on client-side or remotely on server-side. + * + */ + igGridGroupBy(optionLiteral: 'option', optionName: "type"): string; + + /** + * Sets whether the GroupBy operation takes place locally on client-side or remotely on server-side. + * + * + * @optionValue New value to be set. + */ + igGridGroupBy(optionLiteral: 'option', optionName: "type", optionValue: string): void; + + /** + * URL param name which specifies a GroupBy [expression](ig.datasource#options:settings.sorting.expressions). When groupByUrlKey, [groupByUrlKeyAscValue](ui.iggridgroupby#options:groupByUrlKeyAscValue) and [groupByUrlKeyDescValue](ui.iggridgroupby#options:groupByUrlKeyDescValue) are set the request looks like: ?()= (Example: ?groupby(col1)=asc). Otherwise the OData conventions for sorting params are used. + * + */ + igGridGroupBy(optionLiteral: 'option', optionName: "groupByUrlKey"): string; + + /** + * URL param name which specifies a GroupBy [expression](ig.datasource#options:settings.sorting.expressions). When groupByUrlKey, [groupByUrlKeyAscValue](ui.iggridgroupby#options:groupByUrlKeyAscValue) and [groupByUrlKeyDescValue](ui.iggridgroupby#options:groupByUrlKeyDescValue) are set the request looks like: ?()= (Example: ?groupby(col1)=asc). Otherwise the OData conventions for sorting params are used. + * + * + * @optionValue New value to be set. + */ + igGridGroupBy(optionLiteral: 'option', optionName: "groupByUrlKey", optionValue: string): void; + + /** + * URL param value denoting ascending grouping. When [groupByUrlKey](ui.iggridgroupby#options:groupByUrlKey), groupByUrlKeyAscValue and [groupByUrlKeyDescValue](ui.iggridgroupby#options:groupByUrlKeyDescValue) are set the request looks like: ?()= (Example: ?groupby(col1)=asc). Otherwise the OData conventions for sorting params are used. + * + */ + igGridGroupBy(optionLiteral: 'option', optionName: "groupByUrlKeyAscValue"): string; + + /** + * URL param value denoting ascending grouping. When [groupByUrlKey](ui.iggridgroupby#options:groupByUrlKey), groupByUrlKeyAscValue and [groupByUrlKeyDescValue](ui.iggridgroupby#options:groupByUrlKeyDescValue) are set the request looks like: ?()= (Example: ?groupby(col1)=asc). Otherwise the OData conventions for sorting params are used. + * + * + * @optionValue New value to be set. + */ + igGridGroupBy(optionLiteral: 'option', optionName: "groupByUrlKeyAscValue", optionValue: string): void; + + /** + * URL param value denoting descending grouping. When [groupByUrlKey](ui.iggridgroupby#options:groupByUrlKey), [groupByUrlKeyAscValue](ui.iggridgroupby#options:groupByUrlKeyAscValue) and groupByUrlKeyDescValue are set the request looks like: ?()= (Example: ?groupby(col1)=asc). Otherwise the OData conventions for sorting params are used. + * + */ + igGridGroupBy(optionLiteral: 'option', optionName: "groupByUrlKeyDescValue"): string; + + /** + * URL param value denoting descending grouping. When [groupByUrlKey](ui.iggridgroupby#options:groupByUrlKey), [groupByUrlKeyAscValue](ui.iggridgroupby#options:groupByUrlKeyAscValue) and groupByUrlKeyDescValue are set the request looks like: ?()= (Example: ?groupby(col1)=asc). Otherwise the OData conventions for sorting params are used. + * + * + * @optionValue New value to be set. + */ + igGridGroupBy(optionLiteral: 'option', optionName: "groupByUrlKeyDescValue", optionValue: string): void; + + /** + * Gets the settings for GroupBy summaries. + * + */ + igGridGroupBy(optionLiteral: 'option', optionName: "summarySettings"): IgGridGroupBySummarySettings; + + /** + * Sets the settings for GroupBy summaries. + * + * + * @optionValue New value to be set. + */ + igGridGroupBy(optionLiteral: 'option', optionName: "summarySettings", optionValue: IgGridGroupBySummarySettings): void; + + /** + * Configures individual column settings. + * + */ + igGridGroupBy(optionLiteral: 'option', optionName: "columnSettings"): IgGridGroupByColumnSettings; + + /** + * Configures individual column settings. + * + * + * @optionValue New value to be set. + */ + igGridGroupBy(optionLiteral: 'option', optionName: "columnSettings", optionValue: IgGridGroupByColumnSettings): void; + + /** + * Specifies the expand indicator tooltip for grouped rows + * + */ + igGridGroupBy(optionLiteral: 'option', optionName: "expandTooltip"): string; + + /** + * Specifies the expand indicator tooltip for grouped rows + * + * + * @optionValue New value to be set. + */ + igGridGroupBy(optionLiteral: 'option', optionName: "expandTooltip", optionValue: string): void; + + /** + * Specifies the collapse indicator tooltip for grouped rows + * + */ + igGridGroupBy(optionLiteral: 'option', optionName: "collapseTooltip"): string; + + /** + * Specifies the collapse indicator tooltip for grouped rows + * + * + * @optionValue New value to be set. + */ + igGridGroupBy(optionLiteral: 'option', optionName: "collapseTooltip", optionValue: string): void; + + /** + * Specifies the tooltip for the remove button + * + */ + igGridGroupBy(optionLiteral: 'option', optionName: "removeButtonTooltip"): string; + + /** + * Specifies the tooltip for the remove button + * + * + * @optionValue New value to be set. + */ + igGridGroupBy(optionLiteral: 'option', optionName: "removeButtonTooltip", optionValue: string): void; + + /** + * Enables/disables immediate column grouping/ungrouping. When false operation is delayed until after "Apply" button is clicked by the user. + * + */ + igGridGroupBy(optionLiteral: 'option', optionName: "modalDialogGroupByOnClick"): boolean; + + /** + * Enables/disables immediate column grouping/ungrouping. When false operation is delayed until after "Apply" button is clicked by the user. + * + * + * @optionValue New value to be set. + */ + igGridGroupBy(optionLiteral: 'option', optionName: "modalDialogGroupByOnClick", optionValue: boolean): void; + + /** + * Specifies the text of GroupBy button in the GroupBy Dialog + * + */ + igGridGroupBy(optionLiteral: 'option', optionName: "modalDialogGroupByButtonText"): string; + + /** + * Specifies the text of GroupBy button in the GroupBy Dialog + * + * + * @optionValue New value to be set. + */ + igGridGroupBy(optionLiteral: 'option', optionName: "modalDialogGroupByButtonText", optionValue: string): void; + + /** + * Gets caption for each descending sorted column in GroupBy Dialog + * + */ + igGridGroupBy(optionLiteral: 'option', optionName: "modalDialogCaptionButtonDesc"): string; + + /** + * Sets caption for each descending sorted column in GroupBy Dialog + * + * + * @optionValue New value to be set. + */ + igGridGroupBy(optionLiteral: 'option', optionName: "modalDialogCaptionButtonDesc", optionValue: string): void; + + /** + * Gets caption for each ascending sorted column in GroupBy Dialog + * + */ + igGridGroupBy(optionLiteral: 'option', optionName: "modalDialogCaptionButtonAsc"): string; + + /** + * Sets caption for each ascending sorted column in GroupBy Dialog + * + * + * @optionValue New value to be set. + */ + igGridGroupBy(optionLiteral: 'option', optionName: "modalDialogCaptionButtonAsc", optionValue: string): void; + + /** + * Gets caption button ungroup in GroupBy Dialog + * + */ + igGridGroupBy(optionLiteral: 'option', optionName: "modalDialogCaptionButtonUngroup"): string; + + /** + * Sets caption button ungroup in GroupBy Dialog + * + * + * @optionValue New value to be set. + */ + igGridGroupBy(optionLiteral: 'option', optionName: "modalDialogCaptionButtonUngroup", optionValue: string): void; + + /** + * Gets caption text for the GroupBy Dialog + * + */ + igGridGroupBy(optionLiteral: 'option', optionName: "modalDialogCaptionText"): string; + + /** + * Sets caption text for the GroupBy Dialog + * + * + * @optionValue New value to be set. + */ + igGridGroupBy(optionLiteral: 'option', optionName: "modalDialogCaptionText", optionValue: string): void; + + /** + * Gets label for layouts dropdown in the GroupBy Dialog + * + */ + igGridGroupBy(optionLiteral: 'option', optionName: "modalDialogDropDownLabel"): string; + + /** + * Sets label for layouts dropdown in the GroupBy Dialog + * + * + * @optionValue New value to be set. + */ + igGridGroupBy(optionLiteral: 'option', optionName: "modalDialogDropDownLabel", optionValue: string): void; + + /** + * Gets name of the root layout which is shown layouts tree dialog + * + */ + igGridGroupBy(optionLiteral: 'option', optionName: "modalDialogRootLevelHierarchicalGrid"): string; + + /** + * Sets name of the root layout which is shown layouts tree dialog + * + * + * @optionValue New value to be set. + */ + igGridGroupBy(optionLiteral: 'option', optionName: "modalDialogRootLevelHierarchicalGrid", optionValue: string): void; + + /** + * Gets caption of layouts dropdown button in the GroupBy Dialog + * + */ + igGridGroupBy(optionLiteral: 'option', optionName: "modalDialogDropDownButtonCaption"): string; + + /** + * Sets caption of layouts dropdown button in the GroupBy Dialog + * + * + * @optionValue New value to be set. + */ + igGridGroupBy(optionLiteral: 'option', optionName: "modalDialogDropDownButtonCaption", optionValue: string): void; + + /** + * Gets label for "Clear all" button in the GroupBy Dialog + * + */ + igGridGroupBy(optionLiteral: 'option', optionName: "modalDialogClearAllButtonLabel"): string; + + /** + * Sets label for "Clear all" button in the GroupBy Dialog + * + * + * @optionValue New value to be set. + */ + igGridGroupBy(optionLiteral: 'option', optionName: "modalDialogClearAllButtonLabel", optionValue: string): void; + + /** + * Gets caption for the hyperlink which opens the GroupBy Dialog + * + */ + igGridGroupBy(optionLiteral: 'option', optionName: "emptyGroupByAreaContentSelectColumnsCaption"): string; + + /** + * Sets caption for the hyperlink which opens the GroupBy Dialog + * + * + * @optionValue New value to be set. + */ + igGridGroupBy(optionLiteral: 'option', optionName: "emptyGroupByAreaContentSelectColumnsCaption", optionValue: string): void; + + /** + * Gets width of layouts dropdown in the GroupBy Dialog + * + */ + igGridGroupBy(optionLiteral: 'option', optionName: "modalDialogDropDownWidth"): number; + + /** + * Sets width of layouts dropdown in the GroupBy Dialog + * + * + * @optionValue New value to be set. + */ + igGridGroupBy(optionLiteral: 'option', optionName: "modalDialogDropDownWidth", optionValue: number): void; + + /** + * Gets width of layouts dropdown in the GroupBy Dialog + * + */ + igGridGroupBy(optionLiteral: 'option', optionName: "modalDialogDropDownAreaWidth"): number; + + /** + * Sets width of layouts dropdown in the GroupBy Dialog + * + * + * @optionValue New value to be set. + */ + igGridGroupBy(optionLiteral: 'option', optionName: "modalDialogDropDownAreaWidth", optionValue: number): void; + + /** + * Gets time in milliseconds for animation duration to show/hide modal dialog + * + */ + igGridGroupBy(optionLiteral: 'option', optionName: "modalDialogAnimationDuration"): number; + + /** + * Sets time in milliseconds for animation duration to show/hide modal dialog + * + * + * @optionValue New value to be set. + */ + igGridGroupBy(optionLiteral: 'option', optionName: "modalDialogAnimationDuration", optionValue: number): void; + + /** + * Gets width of the GroupBy Dialog + * + */ + igGridGroupBy(optionLiteral: 'option', optionName: "modalDialogWidth"): string|number; + + /** + * Sets width of the GroupBy Dialog + * + * + * @optionValue New value to be set. + */ + igGridGroupBy(optionLiteral: 'option', optionName: "modalDialogWidth", optionValue: string|number): void; + + /** + * Gets height of the GroupBy Dialog + * + */ + igGridGroupBy(optionLiteral: 'option', optionName: "modalDialogHeight"): string|number; + + /** + * Sets height of the GroupBy Dialog + * + * + * @optionValue New value to be set. + */ + igGridGroupBy(optionLiteral: 'option', optionName: "modalDialogHeight", optionValue: string|number): void; + + /** + * Gets text of button which apply changes in modal dialog + * + */ + igGridGroupBy(optionLiteral: 'option', optionName: "modalDialogButtonApplyText"): string; + + /** + * Sets text of button which apply changes in modal dialog + * + * + * @optionValue New value to be set. + */ + igGridGroupBy(optionLiteral: 'option', optionName: "modalDialogButtonApplyText", optionValue: string): void; + + /** + * Gets text of button which cancel changes in the GroupBy Dialog + * + */ + igGridGroupBy(optionLiteral: 'option', optionName: "modalDialogButtonCancelText"): string; + + /** + * Sets text of button which cancel changes in the GroupBy Dialog + * + * + * @optionValue New value to be set. + */ + igGridGroupBy(optionLiteral: 'option', optionName: "modalDialogButtonCancelText", optionValue: string): void; + + /** + * Format grouped column using the formatter set in [igGrid.columns.formatter](ui.iggrid#options:columns.formatter) or [igGrid.columns.format](ui.iggrid#options:columns.format). + * + */ + igGridGroupBy(optionLiteral: 'option', optionName: "useGridColumnFormatter"): boolean; + + /** + * Format grouped column using the formatter set in [igGrid.columns.formatter](ui.iggrid#options:columns.formatter) or [igGrid.columns.format](ui.iggrid#options:columns.format). + * + * + * @optionValue New value to be set. + */ + igGridGroupBy(optionLiteral: 'option', optionName: "useGridColumnFormatter", optionValue: boolean): void; + + /** + * Enables / disables GroupBy persistence between states. Checkout the [GroupBy Persistence](http://www.igniteui.com/help/iggrid-groupby-overview#groupBy-persistence) topic for details. + * + */ + igGridGroupBy(optionLiteral: 'option', optionName: "persist"): boolean; + + /** + * Enables / disables GroupBy persistence between states. Checkout the [GroupBy Persistence](http://www.igniteui.com/help/iggrid-groupby-overview#groupBy-persistence) topic for details. + * + * + * @optionValue New value to be set. + */ + igGridGroupBy(optionLiteral: 'option', optionName: "persist", optionValue: boolean): void; + + /** + * Controls containment behavior for the GroupBy Dialog. + * + */ + igGridGroupBy(optionLiteral: 'option', optionName: "groupByDialogContainment"): string; + + /** + * Controls containment behavior for the GroupBy Dialog. + * + * + * @optionValue New value to be set. + */ + igGridGroupBy(optionLiteral: 'option', optionName: "groupByDialogContainment", optionValue: string): void; + + /** + * Name of the dialog widget to be used. It should inherit from $.ui.igGridModalDialog. Checkout the [Extending igGrid Modal Dialog](http://www.igniteui.com/help/extending-iggrid-modal-dialog) topic for details. + * + */ + igGridGroupBy(optionLiteral: 'option', optionName: "dialogWidget"): string; + + /** + * Name of the dialog widget to be used. It should inherit from $.ui.igGridModalDialog. Checkout the [Extending igGrid Modal Dialog](http://www.igniteui.com/help/extending-iggrid-modal-dialog) topic for details. + * + * + * @optionValue New value to be set. + */ + igGridGroupBy(optionLiteral: 'option', optionName: "dialogWidget", optionValue: string): void; + + /** + * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. + */ + igGridGroupBy(optionLiteral: 'option', optionName: "inherit"): boolean; + + /** + * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. + * + * @optionValue New value to be set. + */ + igGridGroupBy(optionLiteral: 'option', optionName: "inherit", optionValue: boolean): void; + + /** + * Event which is fired when the grouped columns collection is about to change. This event is fired even when button OK is clicked from the modal dialog(after event modalDialogButtonApplyClick is fired) + * use args.owner in order to access the GroupBy widget object + * use args.owner.grid to access the grid widget option + * use args.groupedColumns to get a reference to the current groupedColumns. + * use args.newGroupedColumns to get an object of the new grouped columns that should be applied.(it is set ONLY if called from modal dialog) + * use args.key to get a reference to the current column"s key that"s being grouped(not set if called from modal dialog) + * use args.layout to get a reference to the current layout object, if any(not set if called from modal dialog) + * use args.grid to get a reference to the current child grid element, in case it's an hierarchical grid(not set if called from modal dialog) + * use args.triggeredBy to get which user interaction triggers the event - possible options are dragAndDrop|modalDialog|sortStateChanged|removeButton|regroup + */ + igGridGroupBy(optionLiteral: 'option', optionName: "groupedColumnsChanging"): GroupedColumnsChangingEvent; + + /** + * Event which is fired when the grouped columns collection is about to change. This event is fired even when button OK is clicked from the modal dialog(after event modalDialogButtonApplyClick is fired) + * use args.owner in order to access the GroupBy widget object + * use args.owner.grid to access the grid widget option + * use args.groupedColumns to get a reference to the current groupedColumns. + * use args.newGroupedColumns to get an object of the new grouped columns that should be applied.(it is set ONLY if called from modal dialog) + * use args.key to get a reference to the current column"s key that"s being grouped(not set if called from modal dialog) + * use args.layout to get a reference to the current layout object, if any(not set if called from modal dialog) + * use args.grid to get a reference to the current child grid element, in case it's an hierarchical grid(not set if called from modal dialog) + * use args.triggeredBy to get which user interaction triggers the event - possible options are dragAndDrop|modalDialog|sortStateChanged|removeButton|regroup + * + * @optionValue Define event handler function. + */ + igGridGroupBy(optionLiteral: 'option', optionName: "groupedColumnsChanging", optionValue: GroupedColumnsChangingEvent): void; + + /** + * Event which is fired when the groupedColumns collection has changed. This event is fired also when group/ungroup from GroupBy modal dialog but key, layout and grid are not set + * use args.owner in order to access the GroupBy widget object + * use args.owner.grid to access the grid widget option + * use args.groupedColumns to get a reference to the current groupedColumns + * use args.key to get a reference to the current column"s key that"s being grouped + * use args.layout to get a reference to the current layout object, if any + * use args.grid to get a reference to the current child grid element, in case it's an hierarchical grid(not set if called from modal dialog) + * use args.triggeredBy to get which user interaction triggers the event - possible options are dragAndDrop|modalDialog|sortStateChanged|removeButton|regroup + */ + igGridGroupBy(optionLiteral: 'option', optionName: "groupedColumnsChanged"): GroupedColumnsChangedEvent; + + /** + * Event which is fired when the groupedColumns collection has changed. This event is fired also when group/ungroup from GroupBy modal dialog but key, layout and grid are not set + * use args.owner in order to access the GroupBy widget object + * use args.owner.grid to access the grid widget option + * use args.groupedColumns to get a reference to the current groupedColumns + * use args.key to get a reference to the current column"s key that"s being grouped + * use args.layout to get a reference to the current layout object, if any + * use args.grid to get a reference to the current child grid element, in case it's an hierarchical grid(not set if called from modal dialog) + * use args.triggeredBy to get which user interaction triggers the event - possible options are dragAndDrop|modalDialog|sortStateChanged|removeButton|regroup + * + * @optionValue Define event handler function. + */ + igGridGroupBy(optionLiteral: 'option', optionName: "groupedColumnsChanged", optionValue: GroupedColumnsChangedEvent): void; + + /** + * Event fired every time the GroupBy Dialog changes its position. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridGroupBy widget. + * Use ui.owner.grid to get the reference to the igGrid widget. + * Use ui.modalDialogElement to get a reference to the Column Chooser element. This is a jQuery object. + * Use ui.originalPosition to get the original position of the GroupBy Dialog div as { top, left } object, relative to the page. + * Use ui.position to get the current position of the GroupBy Dialog div as { top, left } object, relative to the page. + */ + igGridGroupBy(optionLiteral: 'option', optionName: "modalDialogMoving"): ModalDialogMovingEvent; + + /** + * Event fired every time the GroupBy Dialog changes its position. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridGroupBy widget. + * Use ui.owner.grid to get the reference to the igGrid widget. + * Use ui.modalDialogElement to get a reference to the Column Chooser element. This is a jQuery object. + * Use ui.originalPosition to get the original position of the GroupBy Dialog div as { top, left } object, relative to the page. + * Use ui.position to get the current position of the GroupBy Dialog div as { top, left } object, relative to the page. + * + * @optionValue Define event handler function. + */ + igGridGroupBy(optionLiteral: 'option', optionName: "modalDialogMoving", optionValue: ModalDialogMovingEvent): void; + + /** + * Event fired before the modal dialog is closed. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridGroupBy widget. + * Use ui.owner.grid to get the reference to the igGrid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + */ + igGridGroupBy(optionLiteral: 'option', optionName: "modalDialogClosing"): ModalDialogClosingEvent; + + /** + * Event fired before the modal dialog is closed. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridGroupBy widget. + * Use ui.owner.grid to get the reference to the igGrid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + * + * @optionValue Define event handler function. + */ + igGridGroupBy(optionLiteral: 'option', optionName: "modalDialogClosing", optionValue: ModalDialogClosingEvent): void; + + /** + * Event fired after the modal dialog has been closed. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridGroupBy widget. + * Use ui.owner.grid to get the reference to the igGrid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + */ + igGridGroupBy(optionLiteral: 'option', optionName: "modalDialogClosed"): ModalDialogClosedEvent; + + /** + * Event fired after the modal dialog has been closed. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridGroupBy widget. + * Use ui.owner.grid to get the reference to the igGrid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + * + * @optionValue Define event handler function. + */ + igGridGroupBy(optionLiteral: 'option', optionName: "modalDialogClosed", optionValue: ModalDialogClosedEvent): void; + + /** + * Event fired before the modal dialog is opened. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridGroupBy widget. + * Use ui.owner.grid to get the reference to the igGrid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + */ + igGridGroupBy(optionLiteral: 'option', optionName: "modalDialogOpening"): ModalDialogOpeningEvent; + + /** + * Event fired before the modal dialog is opened. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridGroupBy widget. + * Use ui.owner.grid to get the reference to the igGrid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + * + * @optionValue Define event handler function. + */ + igGridGroupBy(optionLiteral: 'option', optionName: "modalDialogOpening", optionValue: ModalDialogOpeningEvent): void; + + /** + * Event fired after the modal dialog is already opened. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridGroupBy widget. + * Use ui.owner.grid to get the reference to the igGrid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + */ + igGridGroupBy(optionLiteral: 'option', optionName: "modalDialogOpened"): ModalDialogOpenedEvent; + + /** + * Event fired after the modal dialog is already opened. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridGroupBy widget. + * Use ui.owner.grid to get the reference to the igGrid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + * + * @optionValue Define event handler function. + */ + igGridGroupBy(optionLiteral: 'option', optionName: "modalDialogOpened", optionValue: ModalDialogOpenedEvent): void; + + /** + * Event fired before the contents of the modal dialog are rendered. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridGroupby widget. + * Use ui.owner.grid to get the reference to the igGrid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + */ + igGridGroupBy(optionLiteral: 'option', optionName: "modalDialogContentsRendering"): ModalDialogContentsRenderingEvent; + + /** + * Event fired before the contents of the modal dialog are rendered. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridGroupby widget. + * Use ui.owner.grid to get the reference to the igGrid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + * + * @optionValue Define event handler function. + */ + igGridGroupBy(optionLiteral: 'option', optionName: "modalDialogContentsRendering", optionValue: ModalDialogContentsRenderingEvent): void; + + /** + * Event fired after the contents of the modal dialog are rendered. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridGroupBy widget. + * Use ui.owner.grid to get the reference to the igGrid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + */ + igGridGroupBy(optionLiteral: 'option', optionName: "modalDialogContentsRendered"): ModalDialogContentsRenderedEvent; + + /** + * Event fired after the contents of the modal dialog are rendered. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridGroupBy widget. + * Use ui.owner.grid to get the reference to the igGrid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + * + * @optionValue Define event handler function. + */ + igGridGroupBy(optionLiteral: 'option', optionName: "modalDialogContentsRendered", optionValue: ModalDialogContentsRenderedEvent): void; + + /** + * Event fired when the button is Apply is clicked. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridGroupby widget. + * Use ui.owner.grid to get the reference to the igGrid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + * Use ui.groupedColumns to get the array of grouped columns + * Use ui.groupedColumnLayouts to get array of column layouts + * Use ui.sortingExpr to get array of sorted columns + */ + igGridGroupBy(optionLiteral: 'option', optionName: "modalDialogButtonApplyClick"): ModalDialogButtonApplyClickEvent; + + /** + * Event fired when the button is Apply is clicked. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridGroupby widget. + * Use ui.owner.grid to get the reference to the igGrid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + * Use ui.groupedColumns to get the array of grouped columns + * Use ui.groupedColumnLayouts to get array of column layouts + * Use ui.sortingExpr to get array of sorted columns + * + * @optionValue Define event handler function. + */ + igGridGroupBy(optionLiteral: 'option', optionName: "modalDialogButtonApplyClick", optionValue: ModalDialogButtonApplyClickEvent): void; + + /** + * Event fired when reset button is clicked. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridGroupby widget. + * Use ui.owner.grid to get the reference to the igGrid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + */ + igGridGroupBy(optionLiteral: 'option', optionName: "modalDialogButtonResetClick"): ModalDialogButtonResetClickEvent; + + /** + * Event fired when reset button is clicked. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridGroupby widget. + * Use ui.owner.grid to get the reference to the igGrid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + * + * @optionValue Define event handler function. + */ + igGridGroupBy(optionLiteral: 'option', optionName: "modalDialogButtonResetClick", optionValue: ModalDialogButtonResetClickEvent): void; + + /** + * Event fired when column in modal dialog is clicked to be grouped. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridGroupby widget. + * Use ui.owner.grid to get the reference to the igGrid widget. + * Use ui.key to get the key of the column to be grouped. + * Use ui.layout to get the layout of the columns + */ + igGridGroupBy(optionLiteral: 'option', optionName: "modalDialogGroupingColumn"): ModalDialogGroupingColumnEvent; + + /** + * Event fired when column in modal dialog is clicked to be grouped. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridGroupby widget. + * Use ui.owner.grid to get the reference to the igGrid widget. + * Use ui.key to get the key of the column to be grouped. + * Use ui.layout to get the layout of the columns + * + * @optionValue Define event handler function. + */ + igGridGroupBy(optionLiteral: 'option', optionName: "modalDialogGroupingColumn", optionValue: ModalDialogGroupingColumnEvent): void; + + /** + * Event fired when column in modal dialog is clicked to be grouped. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridGroupby widget. + * Use ui.owner.grid to get the reference to the igGrid widget. + * Use ui.key to get the key of the column to be grouped. + * Use args.groupedColumns to get a reference to the current groupedColumns + * Use ui.layout to get the layout of the columns + */ + igGridGroupBy(optionLiteral: 'option', optionName: "modalDialogGroupColumn"): ModalDialogGroupColumnEvent; + + /** + * Event fired when column in modal dialog is clicked to be grouped. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridGroupby widget. + * Use ui.owner.grid to get the reference to the igGrid widget. + * Use ui.key to get the key of the column to be grouped. + * Use args.groupedColumns to get a reference to the current groupedColumns + * Use ui.layout to get the layout of the columns + * + * @optionValue Define event handler function. + */ + igGridGroupBy(optionLiteral: 'option', optionName: "modalDialogGroupColumn", optionValue: ModalDialogGroupColumnEvent): void; + + /** + * Event fired when column in modal dialog is clicked to be ungrouped. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridGroupby widget. + * Use ui.owner.grid to get the reference to the igGrid widget. + * Use ui.key to get the key of the column to be grouped. + * Use ui.layout to get the layout of the columns + */ + igGridGroupBy(optionLiteral: 'option', optionName: "modalDialogUngroupingColumn"): ModalDialogUngroupingColumnEvent; + + /** + * Event fired when column in modal dialog is clicked to be ungrouped. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridGroupby widget. + * Use ui.owner.grid to get the reference to the igGrid widget. + * Use ui.key to get the key of the column to be grouped. + * Use ui.layout to get the layout of the columns + * + * @optionValue Define event handler function. + */ + igGridGroupBy(optionLiteral: 'option', optionName: "modalDialogUngroupingColumn", optionValue: ModalDialogUngroupingColumnEvent): void; + + /** + * Event fired when column in modal dialog is clicked to be ungrouped. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridGroupby widget. + * Use ui.owner.grid to get the reference to the igGrid widget. + * Use args.groupedColumns to get a reference to the current groupedColumns + * Use ui.key to get the key of the column to be grouped. + * Use ui.layout to get the layout of the columns + */ + igGridGroupBy(optionLiteral: 'option', optionName: "modalDialogUngroupColumn"): ModalDialogUngroupColumnEvent; + + /** + * Event fired when column in modal dialog is clicked to be ungrouped. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridGroupby widget. + * Use ui.owner.grid to get the reference to the igGrid widget. + * Use args.groupedColumns to get a reference to the current groupedColumns + * Use ui.key to get the key of the column to be grouped. + * Use ui.layout to get the layout of the columns + * + * @optionValue Define event handler function. + */ + igGridGroupBy(optionLiteral: 'option', optionName: "modalDialogUngroupColumn", optionValue: ModalDialogUngroupColumnEvent): void; + + /** + * Event fired when column in modal dialog is sorted. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridGroupby widget. + * Use ui.owner.grid to get the reference to the igGrid widget. + * Use ui.key to get the key of the column to be grouped. + * Use ui.layout to get the layout of the columns + * Use ui.isAsc to get whether column should be sorted ascending or descending + */ + igGridGroupBy(optionLiteral: 'option', optionName: "modalDialogSortGroupedColumn"): ModalDialogSortGroupedColumnEvent; + + /** + * Event fired when column in modal dialog is sorted. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridGroupby widget. + * Use ui.owner.grid to get the reference to the igGrid widget. + * Use ui.key to get the key of the column to be grouped. + * Use ui.layout to get the layout of the columns + * Use ui.isAsc to get whether column should be sorted ascending or descending + * + * @optionValue Define event handler function. + */ + igGridGroupBy(optionLiteral: 'option', optionName: "modalDialogSortGroupedColumn", optionValue: ModalDialogSortGroupedColumnEvent): void; + igGridGroupBy(options: IgGridGroupBy): JQuery; + igGridGroupBy(optionLiteral: 'option', optionName: string): any; + igGridGroupBy(optionLiteral: 'option', options: IgGridGroupBy): JQuery; + igGridGroupBy(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igGridGroupBy(methodName: string, ...methodParams: any[]): any; +} +interface IgGridHidingColumnSetting { + /** + * Column key. this is a required property in every column setting if columnIndex is not set. + * + */ + columnKey?: string; + + /** + * Column index. Can be used in place of column key. the preferred way of populating a column setting is to always use the column keys as identifiers. + * + */ + columnIndex?: number; + + /** + * Allows the column to be hidden. + * + */ + allowHiding?: boolean; + + /** + * Sets the initial visibility of the column. + * + */ + hidden?: boolean; + + /** + * Option for IgGridHidingColumnSetting + */ + [optionName: string]: any; +} + +interface ColumnHidingEvent { + (event: Event, ui: ColumnHidingEventUIParam): void; +} + +interface ColumnHidingEventUIParam { + /** + * Used to get the reference to the GridHiding widget. + */ + owner?: any; + + /** + * Used to get the hidden column index. Has a value only if the column's key is a number. + */ + columnIndex?: any; + + /** + * Used to get the hidden column key. Has a value only if the column's key is a string. + */ + columnKey?: any; +} + +interface ColumnHidingRefusedEvent { + (event: Event, ui: ColumnHidingRefusedEventUIParam): void; +} + +interface ColumnHidingRefusedEventUIParam { + /** + * Used to get the reference to the GridHiding widget. + */ + owner?: any; + columnKeys?: any; +} + +interface ColumnShowingRefusedEvent { + (event: Event, ui: ColumnShowingRefusedEventUIParam): void; +} + +interface ColumnShowingRefusedEventUIParam { + /** + * Used to get the reference to the GridHiding widget. + */ + owner?: any; + columnKeys?: any; +} + +interface MultiColumnHidingEvent { + (event: Event, ui: MultiColumnHidingEventUIParam): void; +} + +interface MultiColumnHidingEventUIParam { + /** + * Used to get the reference to the GridHiding widget. + */ + owner?: any; + + /** + * Used to get array of the hidden column keys. In case when click on Reset button in column chooser then this is an array of column keys. + */ + columnKeys?: any; +} + +interface ColumnHiddenEvent { + (event: Event, ui: ColumnHiddenEventUIParam): void; +} + +interface ColumnHiddenEventUIParam { + /** + * Used to get the reference to the GridHiding widget. + */ + owner?: any; + + /** + * Used to get the hidden column index. Has a value only if the column's key is a number. + */ + columnIndex?: any; + + /** + * Used to get the hidden column key. Has a value only if the column's key is a string. + */ + columnKey?: any; +} + +interface ColumnShowingEvent { + (event: Event, ui: ColumnShowingEventUIParam): void; +} + +interface ColumnShowingEventUIParam { + /** + * Used to get the reference to the GridHiding widget. + */ + owner?: any; + + /** + * Used to get the shown column index. + */ + columnIndex?: any; + + /** + * Used to get the shown column key. + */ + columnKey?: any; +} + +interface ColumnShownEvent { + (event: Event, ui: ColumnShownEventUIParam): void; +} + +interface ColumnShownEventUIParam { + /** + * Used to get the reference to the GridHiding widget. + */ + owner?: any; + + /** + * Used to get the shown column index. + */ + columnIndex?: any; + + /** + * Used to get the shown column key. + */ + columnKey?: any; +} + +interface ColumnChooserOpeningEvent { + (event: Event, ui: ColumnChooserOpeningEventUIParam): void; +} + +interface ColumnChooserOpeningEventUIParam { + /** + * Used to get the reference to the GridHiding widget. + */ + owner?: any; + + /** + * Used to get a reference to the Column Chooser element. This is a jQuery object. + */ + columnChooserElement?: any; +} + +interface ColumnChooserOpenedEvent { + (event: Event, ui: ColumnChooserOpenedEventUIParam): void; +} + +interface ColumnChooserOpenedEventUIParam { + /** + * Used to get the reference to the GridHiding widget. + */ + owner?: any; + + /** + * Used to get a reference to the Column Chooser element. This is a jQuery object. + */ + columnChooserElement?: any; +} + +interface ColumnChooserMovingEvent { + (event: Event, ui: ColumnChooserMovingEventUIParam): void; +} + +interface ColumnChooserMovingEventUIParam { + /** + * Used to get the reference to the GridHiding widget. + */ + owner?: any; + + /** + * Used to get a reference to the Column Chooser element. This is a jQuery object. + */ + columnChooserElement?: any; + + /** + * Used to get the original position of the column chooser div as { top, left } object, relative to the page. + */ + originalPosition?: any; + + /** + * Used to get the current position of the column chooser div as { top, left } object, relative to the page. + */ + position?: any; +} + +interface ColumnChooserClosingEvent { + (event: Event, ui: ColumnChooserClosingEventUIParam): void; +} + +interface ColumnChooserClosingEventUIParam { + /** + * Used to get the reference to the GridHiding widget. + */ + owner?: any; + + /** + * Used to get a reference to the Column Chooser element. This is a jQuery object. + */ + columnChooserElement?: any; +} + +interface ColumnChooserClosedEvent { + (event: Event, ui: ColumnChooserClosedEventUIParam): void; +} + +interface ColumnChooserClosedEventUIParam { + /** + * Used to get the reference to the GridHiding widget. + */ + owner?: any; + + /** + * Used to get a reference to the Column Chooser element. This is a jQuery object. + */ + columnChooserElement?: any; +} + +interface ColumnChooserContentsRenderingEvent { + (event: Event, ui: ColumnChooserContentsRenderingEventUIParam): void; +} + +interface ColumnChooserContentsRenderingEventUIParam { + /** + * Used to get the reference to the GridHiding widget. + */ + owner?: any; + + /** + * Used to get a reference to the Column Chooser element. This is a jQuery object. + */ + columnChooserElement?: any; +} + +interface ColumnChooserContentsRenderedEvent { + (event: Event, ui: ColumnChooserContentsRenderedEventUIParam): void; +} + +interface ColumnChooserContentsRenderedEventUIParam { + /** + * Used to get the reference to the GridHiding widget. + */ + owner?: any; + + /** + * Used to get a reference to the Column Chooser element. This is a jQuery object. + */ + columnChooserElement?: any; +} + +interface ColumnChooserButtonApplyClickEvent { + (event: Event, ui: ColumnChooserButtonApplyClickEventUIParam): void; +} + +interface ColumnChooserButtonApplyClickEventUIParam { + /** + * Used to get the reference to the GridHiding widget. + */ + owner?: any; + + /** + * Used to get a reference to the Column Chooser element. This is a jQuery object. + */ + columnChooserElement?: any; + + /** + * Used to get array of columns identifiers which should be shown + */ + columnsToShow?: any; + + /** + * Used to get array of columns identifiers which should be hidden + */ + columnsToHide?: any; +} + +interface ColumnChooserButtonResetClickEvent { + (event: Event, ui: ColumnChooserButtonResetClickEventUIParam): void; +} + +interface ColumnChooserButtonResetClickEventUIParam { + /** + * Used to get the reference to the GridHiding widget. + */ + owner?: any; + + /** + * Used to get a reference to the Column Chooser element. This is a jQuery object. + */ + columnChooserElement?: any; +} + +interface IgGridHiding { + /** + * A list of column settings that specifies hiding options on a per column basis. + * + */ + columnSettings?: IgGridHidingColumnSetting[]; + + /** + * The width in pixels of the hidden column indicator in the header. + * + */ + hiddenColumnIndicatorHeaderWidth?: number; + + /** + * Controls containment behavior. + * + * owner The column chooser dialog will be draggable only in the grid area + * window The column chooser dialog will be draggable in the whole window area + */ + columnChooserContainment?: string; + + /** + * The default column chooser width. + * + */ + columnChooserWidth?: string; + + /** + * The default column chooser height. + * + */ + columnChooserHeight?: string; + + /** + * The duration of the dropdown animation in milliseconds. + * + */ + dropDownAnimationDuration?: number; + + /** + * The caption of the column chooser dialog. + * + */ + columnChooserCaptionText?: string; + + /** + * The text used in the drop down tools menu(Feature Chooser) to launch the column chooser dialog. + * + */ + columnChooserDisplayText?: string; + + /** + * The text displayed in the tooltip of the hidden column indicator. + * + */ + hiddenColumnIndicatorTooltipText?: string; + + /** + * The text used in the drop down tools menu(Feature Chooser) to hide a column. + * + */ + columnHideText?: string; + + /** + * The text used in the column chooser to show column + * + */ + columnChooserShowText?: string; + + /** + * The text used in the column chooser to hide column + * + */ + columnChooserHideText?: string; + + /** + * Specifies on click show/hide directly to be shown/hidden columns. If columnChooserHideOnClick is false then Apply and Cancel Buttons are shown on the bottom of modal dialog. Columns are Shown/Hidden after the Apply button is clicked + * + */ + columnChooserHideOnClick?: boolean; + + /** + * Text label for reset button. + * + */ + columnChooserResetButtonLabel?: string; + + /** + * Specifies time of milliseconds for animation duration to show/hide modal dialog + * + */ + columnChooserAnimationDuration?: number; + + /** + * Specifies text of button which apply changes in modal dialog + * + */ + columnChooserButtonApplyText?: string; + + /** + * Specifies text of button which cancel changes in modal dialog + * + */ + columnChooserButtonCancelText?: string; + + /** + * Name of the dialog widget to be used. It should inherit from $.ui.igGridModalDialog. + * + */ + dialogWidget?: string; + + /** + * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. + * + */ + inherit?: boolean; + + /** + * Event fired before a hiding operation is executed. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnIndex to get the hidden column index. Has a value only if the column's key is a number. + * Use ui.columnKey to get the hidden column key. Has a value only if the column's key is a string. + */ + columnHiding?: ColumnHidingEvent; + + /** + * Event fired when trying to hide all columns in fixed or unfixed area. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnKeys array of column keys. Has a value only if the column's key is a string. + */ + columnHidingRefused?: ColumnHidingRefusedEvent; + + /** + * Event fired when trying to show column(s) in fixed area and total width of fixed are will be larger than whole grid width. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnKeys array of column keys. Has a value only if the column's key is a string. + */ + columnShowingRefused?: ColumnShowingRefusedEvent; + + /** + * Event fired before a hiding operation is executed. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnKeys to get array of the hidden column keys. In case when click on Reset button in column chooser then this is an array of column keys. + */ + multiColumnHiding?: MultiColumnHidingEvent; + + /** + * Event fired after the hiding has been executed and results are rendered. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnIndex to get the hidden column index. Has a value only if the column's key is a number. + * Use ui.columnKey to get the hidden column key. Has a value only if the column's key is a string. + */ + columnHidden?: ColumnHiddenEvent; + + /** + * Event fired before a showing operation is executed. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnIndex to get the shown column index. + * Use ui.columnKey to get the shown column key. + */ + columnShowing?: ColumnShowingEvent; + + /** + * Event fired after the showing has been executed and results are rendered. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnIndex to get the shown column index. + * Use ui.columnKey to get the shown column key. + */ + columnShown?: ColumnShownEvent; + + /** + * Event fired before the column chooser is opened. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnChooserElement to get a reference to the Column Chooser element. This is a jQuery object. + */ + columnChooserOpening?: ColumnChooserOpeningEvent; + + /** + * Event fired after the column chooser is already opened. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnChooserElement to get a reference to the Column Chooser element. This is a jQuery object. + */ + columnChooserOpened?: ColumnChooserOpenedEvent; + + /** + * Event fired every time the column chooser changes its position. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnChooserElement to get a reference to the Column Chooser element. This is a jQuery object. + * Use ui.originalPosition to get the original position of the column chooser div as { top, left } object, relative to the page. + * Use ui.position to get the current position of the column chooser div as { top, left } object, relative to the page. + */ + columnChooserMoving?: ColumnChooserMovingEvent; + + /** + * Event fired before the column chooser is closed. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnChooserElement to get a reference to the Column Chooser element. This is a jQuery object. + */ + columnChooserClosing?: ColumnChooserClosingEvent; + + /** + * Event fired after the column chooser has been closed. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnChooserElement to get a reference to the Column Chooser element. This is a jQuery object. + */ + columnChooserClosed?: ColumnChooserClosedEvent; + + /** + * Event fired before the contents of the column chooser are rendered. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnChooserElement to get a reference to the Column Chooser element. This is a jQuery object. + */ + columnChooserContentsRendering?: ColumnChooserContentsRenderingEvent; + + /** + * Event fired after the contents of the column chooser are rendered. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnChooserElement to get a reference to the Column Chooser element. This is a jQuery object. + */ + columnChooserContentsRendered?: ColumnChooserContentsRenderedEvent; + + /** + * Event fired when button Apply in column chooser is clicked + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnChooserElement to get a reference to the Column Chooser element. This is a jQuery object. + * Use ui.columnsToShow to get array of columns identifiers which should be shown + * Use ui.columnsToHide to get array of columns identifiers which should be hidden + */ + columnChooserButtonApplyClick?: ColumnChooserButtonApplyClickEvent; + + /** + * Event fired when button Reset in column chooser is clicked + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnChooserElement to get a reference to the Column Chooser element. This is a jQuery object. + */ + columnChooserButtonResetClick?: ColumnChooserButtonResetClickEvent; + + /** + * Option for igGridHiding + */ + [optionName: string]: any; +} +interface IgGridHidingMethods { + /** + * Destroys the hiding widget + */ + destroy(): void; + + /** + * Shows the Column Chooser dialog. If it is visible the method does nothing. + */ + showColumnChooser(): void; + + /** + * Hides the Column Chooser dialog. If it is not visible the method does nothing. + */ + hideColumnChooser(): void; + + /** + * Shows a hidden column. If the column is not hidden the method does nothing. + * Note: This method is asynchronous which means that it returns immediately and any subsequent code will execute in parallel. This may lead to runtime errors. To avoid them put the subsequent code in the callback parameter provided by the method. + * + * @param column An identifier for the column. If a number is provided it will be used as a column index else if a strings is provided it will be used as a column key. + * @param isMultiColumnHeader If it is true then the column is of type multicolumnheader. An identifier for the column should be of type string. + * @param callback Specifies a custom function to be called when the column(s) is shown(optional) + */ + showColumn(column: Object, isMultiColumnHeader?: boolean, callback?: Function): void; + + /** + * Hides a visible column. If the column is hidden the method does nothing. + * Note: This method is asynchronous which means that it returns immediately and any subsequent code will execute in parallel. This may lead to runtime errors. To avoid them put the subsequent code in the callback parameter provided by the method. + * + * @param column An identifier for the column. If a number is provided it will be used as a column index else if a strings is provided it will be used as a column key. + * @param isMultiColumnHeader If it is true then the column is of type multicolumnheader. An identifier for the column should be of type string. + * @param callback Specifies a custom function to be called when the column is hidden(optional) + */ + hideColumn(column: Object, isMultiColumnHeader?: boolean, callback?: Function): void; + + /** + * Hides visible columns specified by the array. If the column is hidden the method does nothing. + * Note: This method is asynchronous which means that it returns immediately and any subsequent code will execute in parallel. This may lead to runtime errors. To avoid them put the subsequent code in the callback parameter provided by the method. + * + * @param columns An array of identifiers for the columns. If a number is provided it will be used as a column index else if a strings is provided it will be used as a column key. + * @param callback Specifies a custom function to be called when all columns are hidden(optional) + */ + hideMultiColumns(columns: any[], callback?: Function): void; + + /** + * Show visible columns specified by the array. If the column is shown the method does nothing. + * Note: This method is asynchronous which means that it returns immediately and any subsequent code will execute in parallel. This may lead to runtime errors. To avoid them put the subsequent code in the callback parameter provided by the method. + * + * @param columns An array of identifiers for the columns. If a number is provided it will be used as a column index else if a strings is provided it will be used as a column key. + * @param callback Specifies a custom function to be called when all columns are shown(optional) + */ + showMultiColumns(columns: any[], callback?: Function): void; + + /** + * Gets whether the reset button in the column chooser dialog is to be rendered or not. + */ + isToRenderButtonReset(): void; + + /** + * Reset hidden/shown column to initial state of dialog(when it is opened) + */ + resetHidingColumnChooser(): void; + + /** + * Renders the Reset button in the Column Chooser dialog. + */ + renderColumnChooserResetButton(): void; + + /** + * Remove Reset button in column chooser modal dialog + */ + removeColumnChooserResetButton(): void; +} +interface JQuery { + data(propertyName: "igGridHiding"): IgGridHidingMethods; +} + +interface JQuery { + igGridHiding(methodName: "destroy"): void; + igGridHiding(methodName: "showColumnChooser"): void; + igGridHiding(methodName: "hideColumnChooser"): void; + igGridHiding(methodName: "showColumn", column: Object, isMultiColumnHeader?: boolean, callback?: Function): void; + igGridHiding(methodName: "hideColumn", column: Object, isMultiColumnHeader?: boolean, callback?: Function): void; + igGridHiding(methodName: "hideMultiColumns", columns: any[], callback?: Function): void; + igGridHiding(methodName: "showMultiColumns", columns: any[], callback?: Function): void; + igGridHiding(methodName: "isToRenderButtonReset"): void; + igGridHiding(methodName: "resetHidingColumnChooser"): void; + igGridHiding(methodName: "renderColumnChooserResetButton"): void; + igGridHiding(methodName: "removeColumnChooserResetButton"): void; + + /** + * A list of column settings that specifies hiding options on a per column basis. + * + */ + igGridHiding(optionLiteral: 'option', optionName: "columnSettings"): IgGridHidingColumnSetting[]; + + /** + * A list of column settings that specifies hiding options on a per column basis. + * + * + * @optionValue New value to be set. + */ + igGridHiding(optionLiteral: 'option', optionName: "columnSettings", optionValue: IgGridHidingColumnSetting[]): void; + + /** + * The width in pixels of the hidden column indicator in the header. + * + */ + igGridHiding(optionLiteral: 'option', optionName: "hiddenColumnIndicatorHeaderWidth"): number; + + /** + * The width in pixels of the hidden column indicator in the header. + * + * + * @optionValue New value to be set. + */ + igGridHiding(optionLiteral: 'option', optionName: "hiddenColumnIndicatorHeaderWidth", optionValue: number): void; + + /** + * Controls containment behavior. + * + * owner The column chooser dialog will be draggable only in the grid area + * window The column chooser dialog will be draggable in the whole window area + */ + igGridHiding(optionLiteral: 'option', optionName: "columnChooserContainment"): string; + + /** + * Controls containment behavior. + * + * owner The column chooser dialog will be draggable only in the grid area + * window The column chooser dialog will be draggable in the whole window area + * + * @optionValue New value to be set. + */ + igGridHiding(optionLiteral: 'option', optionName: "columnChooserContainment", optionValue: string): void; + + /** + * The default column chooser width. + * + */ + igGridHiding(optionLiteral: 'option', optionName: "columnChooserWidth"): string; + + /** + * The default column chooser width. + * + * + * @optionValue New value to be set. + */ + igGridHiding(optionLiteral: 'option', optionName: "columnChooserWidth", optionValue: string): void; + + /** + * The default column chooser height. + * + */ + igGridHiding(optionLiteral: 'option', optionName: "columnChooserHeight"): string; + + /** + * The default column chooser height. + * + * + * @optionValue New value to be set. + */ + igGridHiding(optionLiteral: 'option', optionName: "columnChooserHeight", optionValue: string): void; + + /** + * The duration of the dropdown animation in milliseconds. + * + */ + igGridHiding(optionLiteral: 'option', optionName: "dropDownAnimationDuration"): number; + + /** + * The duration of the dropdown animation in milliseconds. + * + * + * @optionValue New value to be set. + */ + igGridHiding(optionLiteral: 'option', optionName: "dropDownAnimationDuration", optionValue: number): void; + + /** + * The caption of the column chooser dialog. + * + */ + igGridHiding(optionLiteral: 'option', optionName: "columnChooserCaptionText"): string; + + /** + * The caption of the column chooser dialog. + * + * + * @optionValue New value to be set. + */ + igGridHiding(optionLiteral: 'option', optionName: "columnChooserCaptionText", optionValue: string): void; + + /** + * The text used in the drop down tools menu(Feature Chooser) to launch the column chooser dialog. + * + */ + igGridHiding(optionLiteral: 'option', optionName: "columnChooserDisplayText"): string; + + /** + * The text used in the drop down tools menu(Feature Chooser) to launch the column chooser dialog. + * + * + * @optionValue New value to be set. + */ + igGridHiding(optionLiteral: 'option', optionName: "columnChooserDisplayText", optionValue: string): void; + + /** + * The text displayed in the tooltip of the hidden column indicator. + * + */ + igGridHiding(optionLiteral: 'option', optionName: "hiddenColumnIndicatorTooltipText"): string; + + /** + * The text displayed in the tooltip of the hidden column indicator. + * + * + * @optionValue New value to be set. + */ + igGridHiding(optionLiteral: 'option', optionName: "hiddenColumnIndicatorTooltipText", optionValue: string): void; + + /** + * The text used in the drop down tools menu(Feature Chooser) to hide a column. + * + */ + igGridHiding(optionLiteral: 'option', optionName: "columnHideText"): string; + + /** + * The text used in the drop down tools menu(Feature Chooser) to hide a column. + * + * + * @optionValue New value to be set. + */ + igGridHiding(optionLiteral: 'option', optionName: "columnHideText", optionValue: string): void; + + /** + * The text used in the column chooser to show column + * + */ + igGridHiding(optionLiteral: 'option', optionName: "columnChooserShowText"): string; + + /** + * The text used in the column chooser to show column + * + * + * @optionValue New value to be set. + */ + igGridHiding(optionLiteral: 'option', optionName: "columnChooserShowText", optionValue: string): void; + + /** + * The text used in the column chooser to hide column + * + */ + igGridHiding(optionLiteral: 'option', optionName: "columnChooserHideText"): string; + + /** + * The text used in the column chooser to hide column + * + * + * @optionValue New value to be set. + */ + igGridHiding(optionLiteral: 'option', optionName: "columnChooserHideText", optionValue: string): void; + + /** + * Gets on click show/hide directly to be shown/hidden columns. If columnChooserHideOnClick is false then Apply and Cancel Buttons are shown on the bottom of modal dialog. Columns are Shown/Hidden after the Apply button is clicked + * + */ + igGridHiding(optionLiteral: 'option', optionName: "columnChooserHideOnClick"): boolean; + + /** + * Sets on click show/hide directly to be shown/hidden columns. If columnChooserHideOnClick is false then Apply and Cancel Buttons are shown on the bottom of modal dialog. Columns are Shown/Hidden after the Apply button is clicked + * + * + * @optionValue New value to be set. + */ + igGridHiding(optionLiteral: 'option', optionName: "columnChooserHideOnClick", optionValue: boolean): void; + + /** + * Text label for reset button. + * + */ + igGridHiding(optionLiteral: 'option', optionName: "columnChooserResetButtonLabel"): string; + + /** + * Text label for reset button. + * + * + * @optionValue New value to be set. + */ + igGridHiding(optionLiteral: 'option', optionName: "columnChooserResetButtonLabel", optionValue: string): void; + + /** + * Gets time of milliseconds for animation duration to show/hide modal dialog + * + */ + igGridHiding(optionLiteral: 'option', optionName: "columnChooserAnimationDuration"): number; + + /** + * Sets time of milliseconds for animation duration to show/hide modal dialog + * + * + * @optionValue New value to be set. + */ + igGridHiding(optionLiteral: 'option', optionName: "columnChooserAnimationDuration", optionValue: number): void; + + /** + * Gets text of button which apply changes in modal dialog + * + */ + igGridHiding(optionLiteral: 'option', optionName: "columnChooserButtonApplyText"): string; + + /** + * Sets text of button which apply changes in modal dialog + * + * + * @optionValue New value to be set. + */ + igGridHiding(optionLiteral: 'option', optionName: "columnChooserButtonApplyText", optionValue: string): void; + + /** + * Gets text of button which cancel changes in modal dialog + * + */ + igGridHiding(optionLiteral: 'option', optionName: "columnChooserButtonCancelText"): string; + + /** + * Sets text of button which cancel changes in modal dialog + * + * + * @optionValue New value to be set. + */ + igGridHiding(optionLiteral: 'option', optionName: "columnChooserButtonCancelText", optionValue: string): void; + + /** + * Name of the dialog widget to be used. It should inherit from $.ui.igGridModalDialog. + * + */ + igGridHiding(optionLiteral: 'option', optionName: "dialogWidget"): string; + + /** + * Name of the dialog widget to be used. It should inherit from $.ui.igGridModalDialog. + * + * + * @optionValue New value to be set. + */ + igGridHiding(optionLiteral: 'option', optionName: "dialogWidget", optionValue: string): void; + + /** + * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. + * + */ + igGridHiding(optionLiteral: 'option', optionName: "inherit"): boolean; + + /** + * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. + * + * + * @optionValue New value to be set. + */ + igGridHiding(optionLiteral: 'option', optionName: "inherit", optionValue: boolean): void; + + /** + * Event fired before a hiding operation is executed. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnIndex to get the hidden column index. Has a value only if the column's key is a number. + * Use ui.columnKey to get the hidden column key. Has a value only if the column's key is a string. + */ + igGridHiding(optionLiteral: 'option', optionName: "columnHiding"): ColumnHidingEvent; + + /** + * Event fired before a hiding operation is executed. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnIndex to get the hidden column index. Has a value only if the column's key is a number. + * Use ui.columnKey to get the hidden column key. Has a value only if the column's key is a string. + * + * @optionValue Define event handler function. + */ + igGridHiding(optionLiteral: 'option', optionName: "columnHiding", optionValue: ColumnHidingEvent): void; + + /** + * Event fired when trying to hide all columns in fixed or unfixed area. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnKeys array of column keys. Has a value only if the column's key is a string. + */ + igGridHiding(optionLiteral: 'option', optionName: "columnHidingRefused"): ColumnHidingRefusedEvent; + + /** + * Event fired when trying to hide all columns in fixed or unfixed area. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnKeys array of column keys. Has a value only if the column's key is a string. + * + * @optionValue Define event handler function. + */ + igGridHiding(optionLiteral: 'option', optionName: "columnHidingRefused", optionValue: ColumnHidingRefusedEvent): void; + + /** + * Event fired when trying to show column(s) in fixed area and total width of fixed are will be larger than whole grid width. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnKeys array of column keys. Has a value only if the column's key is a string. + */ + igGridHiding(optionLiteral: 'option', optionName: "columnShowingRefused"): ColumnShowingRefusedEvent; + + /** + * Event fired when trying to show column(s) in fixed area and total width of fixed are will be larger than whole grid width. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnKeys array of column keys. Has a value only if the column's key is a string. + * + * @optionValue Define event handler function. + */ + igGridHiding(optionLiteral: 'option', optionName: "columnShowingRefused", optionValue: ColumnShowingRefusedEvent): void; + + /** + * Event fired before a hiding operation is executed. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnKeys to get array of the hidden column keys. In case when click on Reset button in column chooser then this is an array of column keys. + */ + igGridHiding(optionLiteral: 'option', optionName: "multiColumnHiding"): MultiColumnHidingEvent; + + /** + * Event fired before a hiding operation is executed. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnKeys to get array of the hidden column keys. In case when click on Reset button in column chooser then this is an array of column keys. + * + * @optionValue Define event handler function. + */ + igGridHiding(optionLiteral: 'option', optionName: "multiColumnHiding", optionValue: MultiColumnHidingEvent): void; + + /** + * Event fired after the hiding has been executed and results are rendered. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnIndex to get the hidden column index. Has a value only if the column's key is a number. + * Use ui.columnKey to get the hidden column key. Has a value only if the column's key is a string. + */ + igGridHiding(optionLiteral: 'option', optionName: "columnHidden"): ColumnHiddenEvent; + + /** + * Event fired after the hiding has been executed and results are rendered. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnIndex to get the hidden column index. Has a value only if the column's key is a number. + * Use ui.columnKey to get the hidden column key. Has a value only if the column's key is a string. + * + * @optionValue Define event handler function. + */ + igGridHiding(optionLiteral: 'option', optionName: "columnHidden", optionValue: ColumnHiddenEvent): void; + + /** + * Event fired before a showing operation is executed. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnIndex to get the shown column index. + * Use ui.columnKey to get the shown column key. + */ + igGridHiding(optionLiteral: 'option', optionName: "columnShowing"): ColumnShowingEvent; + + /** + * Event fired before a showing operation is executed. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnIndex to get the shown column index. + * Use ui.columnKey to get the shown column key. + * + * @optionValue Define event handler function. + */ + igGridHiding(optionLiteral: 'option', optionName: "columnShowing", optionValue: ColumnShowingEvent): void; + + /** + * Event fired after the showing has been executed and results are rendered. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnIndex to get the shown column index. + * Use ui.columnKey to get the shown column key. + */ + igGridHiding(optionLiteral: 'option', optionName: "columnShown"): ColumnShownEvent; + + /** + * Event fired after the showing has been executed and results are rendered. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnIndex to get the shown column index. + * Use ui.columnKey to get the shown column key. + * + * @optionValue Define event handler function. + */ + igGridHiding(optionLiteral: 'option', optionName: "columnShown", optionValue: ColumnShownEvent): void; + + /** + * Event fired before the column chooser is opened. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnChooserElement to get a reference to the Column Chooser element. This is a jQuery object. + */ + igGridHiding(optionLiteral: 'option', optionName: "columnChooserOpening"): ColumnChooserOpeningEvent; + + /** + * Event fired before the column chooser is opened. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnChooserElement to get a reference to the Column Chooser element. This is a jQuery object. + * + * @optionValue Define event handler function. + */ + igGridHiding(optionLiteral: 'option', optionName: "columnChooserOpening", optionValue: ColumnChooserOpeningEvent): void; + + /** + * Event fired after the column chooser is already opened. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnChooserElement to get a reference to the Column Chooser element. This is a jQuery object. + */ + igGridHiding(optionLiteral: 'option', optionName: "columnChooserOpened"): ColumnChooserOpenedEvent; + + /** + * Event fired after the column chooser is already opened. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnChooserElement to get a reference to the Column Chooser element. This is a jQuery object. + * + * @optionValue Define event handler function. + */ + igGridHiding(optionLiteral: 'option', optionName: "columnChooserOpened", optionValue: ColumnChooserOpenedEvent): void; + + /** + * Event fired every time the column chooser changes its position. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnChooserElement to get a reference to the Column Chooser element. This is a jQuery object. + * Use ui.originalPosition to get the original position of the column chooser div as { top, left } object, relative to the page. + * Use ui.position to get the current position of the column chooser div as { top, left } object, relative to the page. + */ + igGridHiding(optionLiteral: 'option', optionName: "columnChooserMoving"): ColumnChooserMovingEvent; + + /** + * Event fired every time the column chooser changes its position. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnChooserElement to get a reference to the Column Chooser element. This is a jQuery object. + * Use ui.originalPosition to get the original position of the column chooser div as { top, left } object, relative to the page. + * Use ui.position to get the current position of the column chooser div as { top, left } object, relative to the page. + * + * @optionValue Define event handler function. + */ + igGridHiding(optionLiteral: 'option', optionName: "columnChooserMoving", optionValue: ColumnChooserMovingEvent): void; + + /** + * Event fired before the column chooser is closed. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnChooserElement to get a reference to the Column Chooser element. This is a jQuery object. + */ + igGridHiding(optionLiteral: 'option', optionName: "columnChooserClosing"): ColumnChooserClosingEvent; + + /** + * Event fired before the column chooser is closed. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnChooserElement to get a reference to the Column Chooser element. This is a jQuery object. + * + * @optionValue Define event handler function. + */ + igGridHiding(optionLiteral: 'option', optionName: "columnChooserClosing", optionValue: ColumnChooserClosingEvent): void; + + /** + * Event fired after the column chooser has been closed. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnChooserElement to get a reference to the Column Chooser element. This is a jQuery object. + */ + igGridHiding(optionLiteral: 'option', optionName: "columnChooserClosed"): ColumnChooserClosedEvent; + + /** + * Event fired after the column chooser has been closed. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnChooserElement to get a reference to the Column Chooser element. This is a jQuery object. + * + * @optionValue Define event handler function. + */ + igGridHiding(optionLiteral: 'option', optionName: "columnChooserClosed", optionValue: ColumnChooserClosedEvent): void; + + /** + * Event fired before the contents of the column chooser are rendered. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnChooserElement to get a reference to the Column Chooser element. This is a jQuery object. + */ + igGridHiding(optionLiteral: 'option', optionName: "columnChooserContentsRendering"): ColumnChooserContentsRenderingEvent; + + /** + * Event fired before the contents of the column chooser are rendered. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnChooserElement to get a reference to the Column Chooser element. This is a jQuery object. + * + * @optionValue Define event handler function. + */ + igGridHiding(optionLiteral: 'option', optionName: "columnChooserContentsRendering", optionValue: ColumnChooserContentsRenderingEvent): void; + + /** + * Event fired after the contents of the column chooser are rendered. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnChooserElement to get a reference to the Column Chooser element. This is a jQuery object. + */ + igGridHiding(optionLiteral: 'option', optionName: "columnChooserContentsRendered"): ColumnChooserContentsRenderedEvent; + + /** + * Event fired after the contents of the column chooser are rendered. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnChooserElement to get a reference to the Column Chooser element. This is a jQuery object. + * + * @optionValue Define event handler function. + */ + igGridHiding(optionLiteral: 'option', optionName: "columnChooserContentsRendered", optionValue: ColumnChooserContentsRenderedEvent): void; + + /** + * Event fired when button Apply in column chooser is clicked + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnChooserElement to get a reference to the Column Chooser element. This is a jQuery object. + * Use ui.columnsToShow to get array of columns identifiers which should be shown + * Use ui.columnsToHide to get array of columns identifiers which should be hidden + */ + igGridHiding(optionLiteral: 'option', optionName: "columnChooserButtonApplyClick"): ColumnChooserButtonApplyClickEvent; + + /** + * Event fired when button Apply in column chooser is clicked + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnChooserElement to get a reference to the Column Chooser element. This is a jQuery object. + * Use ui.columnsToShow to get array of columns identifiers which should be shown + * Use ui.columnsToHide to get array of columns identifiers which should be hidden + * + * @optionValue Define event handler function. + */ + igGridHiding(optionLiteral: 'option', optionName: "columnChooserButtonApplyClick", optionValue: ColumnChooserButtonApplyClickEvent): void; + + /** + * Event fired when button Reset in column chooser is clicked + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnChooserElement to get a reference to the Column Chooser element. This is a jQuery object. + */ + igGridHiding(optionLiteral: 'option', optionName: "columnChooserButtonResetClick"): ColumnChooserButtonResetClickEvent; + + /** + * Event fired when button Reset in column chooser is clicked + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnChooserElement to get a reference to the Column Chooser element. This is a jQuery object. + * + * @optionValue Define event handler function. + */ + igGridHiding(optionLiteral: 'option', optionName: "columnChooserButtonResetClick", optionValue: ColumnChooserButtonResetClickEvent): void; + igGridHiding(options: IgGridHiding): JQuery; + igGridHiding(optionLiteral: 'option', optionName: string): any; + igGridHiding(optionLiteral: 'option', options: IgGridHiding): JQuery; + igGridHiding(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igGridHiding(methodName: string, ...methodParams: any[]): any; +} +interface IgHierarchicalGridColumnLayout { + /** + * Specifies the columnLayout key. This is the property that holds the data records for the current column layout. + */ + key?: string; + + /** + * Specifies the primaryKey of the columnLayout. This also serves as the column key for the current column layout. + */ + primaryKey?: string; + + /** + * Specifies the foreignKey of the columnLayout. This is also the column key of the parent grid. + */ + foreignKey?: string; + + /** + * Option for IgHierarchicalGridColumnLayout + */ + [optionName: string]: any; +} + +interface RowExpandingEvent { + (event: Event, ui: RowExpandingEventUIParam): void; +} + +interface RowExpandingEventUIParam { + /** + * Used to access the hierarchical grid object + */ + owner?: any; + + /** + * Used to access the row element for the row that's about to be expanded + */ + parentrow?: any; +} + +interface RowExpandedEvent { + (event: Event, ui: RowExpandedEventUIParam): void; +} + +interface RowExpandedEventUIParam { + /** + * Used to access the hierarchical grid object + */ + owner?: any; + + /** + * Used to access the row element for the row that was expanded + */ + parentrow?: any; +} + +interface RowCollapsingEvent { + (event: Event, ui: RowCollapsingEventUIParam): void; +} + +interface RowCollapsingEventUIParam { + /** + * Used to access the hierarchical grid object + */ + owner?: any; + + /** + * Used to access the row element for the row that's about to be collapsed + */ + parentrow?: any; +} + +interface RowCollapsedEvent { + (event: Event, ui: RowCollapsedEventUIParam): void; +} + +interface RowCollapsedEventUIParam { + /** + * Used to access the hierarchical grid object + */ + owner?: any; + + /** + * Used to access the row element for the row that was collapsd + */ + parentrow?: any; +} + +interface ChildrenPopulatingEvent { + (event: Event, ui: ChildrenPopulatingEventUIParam): void; +} + +interface ChildrenPopulatingEventUIParam { + /** + * Used to access the hierarchical grid object + */ + owner?: any; + + /** + * Used to access the row element for the row that's about to be populated + */ + parentrow?: any; + + /** + * Used to get the data ID of the row + */ + id?: any; +} + +interface ChildrenPopulatedEvent { + (event: Event, ui: ChildrenPopulatedEventUIParam): void; +} + +interface ChildrenPopulatedEventUIParam { + /** + * Used to access the hierarchical grid object + */ + owner?: any; + + /** + * Used to access the row element for the row that was populated + */ + parentrow?: any; + + /** + * Used to get the data ID of the row + */ + id?: any; +} + +interface ChildGridRenderedEvent { + (event: Event, ui: ChildGridRenderedEventUIParam): void; +} + +interface ChildGridRenderedEventUIParam { + /** + * Used to access the hierarchical grid object + */ + owner?: any; + + /** + * Used to access the row element for the row that's about to be populated + */ + parentrow?: any; + + /** + * Used to get reference to the child grid + */ + childgrid?: any; +} + +interface ChildGridCreatingEvent { + (event: Event, ui: ChildGridCreatingEventUIParam): void; +} + +interface ChildGridCreatingEventUIParam { +} + +interface ChildGridCreatedEvent { + (event: Event, ui: ChildGridCreatedEventUIParam): void; +} + +interface ChildGridCreatedEventUIParam { +} + +interface IgHierarchicalGrid { + /** + * Only the first level will be data-bound initially. Also serves as "render" depth, meaning that depending on this prop, the grid will + */ + initialDataBindDepth?: number; + + /** + * No levels will be automatically expanded when the widget is instantiated for the first time + */ + initialExpandDepth?: number; + + /** + * If true, encodes all requests using OData conventions and the $expand syntax + */ + odata?: boolean; + + /** + * If true, load on demand will be achieved using REST compliant resource access with appropriate url-s for + * the ajax GET calls. + */ + rest?: boolean; + + /** + * Specifies the limit on the number of levels to bind to + */ + maxDataBindDepth?: number; + + /** + * Specifies the default property in the response where children will be located + */ + defaultChildrenDataProperty?: string; + + /** + * If true, will autogenerate all layouts assuming default values for "childrenDataProperty" + * When autoGenerateLayouts is enabled, it will automatically generate all columns recursively. (all columns on all levels) + */ + autoGenerateLayouts?: boolean; + + /** + * Applies a linear animation - either expanding or collapsing depending on the parent row state + */ + expandCollapseAnimations?: boolean; + + /** + * Specifies the expand column width + */ + expandColWidth?: number; + + /** + * Specifies the delimiter for constructing paths , for hierarchical lookup of data + */ + pathSeparator?: string; + + /** + * The row expanding/collapsing animation duration in ms. + */ + animationDuration?: number; + + /** + * Specifies the default tooltip applied to an expand column cell, that is currently collapsed + */ + expandTooltip?: string; + + /** + * Specifies the default tooltip applied to an expand column cell, that is currently expanded + */ + collapseTooltip?: string; + + /** + * An array of column objects + */ + columns?: any[]; + + /** + * List of columnLayout objects that specify the structure of the child grids. All options that are applicable to a flat grid are also applicable here + */ + columnLayouts?: IgHierarchicalGridColumnLayout[]; + + /** + * Event which is fired when a hierarchical row is about to be expanded + * use args.owner to access the hierarchical grid object + * use args.parentrow to access the row element for the row that's about to be expanded + */ + rowExpanding?: RowExpandingEvent; + + /** + * Event which is fired after a hierarchical row has been expanded + * use args.owner to access the hierarchical grid object + * use args.parentrow to access the row element for the row that was expanded + */ + rowExpanded?: RowExpandedEvent; + + /** + * Event which is fired when a hierarchical row is about to be collapsed + * use args.owner to access the hierarchical grid object + * use args.parentrow to access the row element for the row that's about to be collapsed + */ + rowCollapsing?: RowCollapsingEvent; + + /** + * Event which is fired when a hierarchical row has been collapsed + * use args.owner to access the hierarchical grid object + * use args.parentrow to access the row element for the row that was collapsd + */ + rowCollapsed?: RowCollapsedEvent; + + /** + * Event which is fired when children are about to be populated (Load on demand) + * use args.owner to access the hierarchical grid object + * use args.parentrow to access the row element for the row that's about to be populated + * use args.id to get the data ID of the row + */ + childrenPopulating?: ChildrenPopulatingEvent; + + /** + * Event which is fired when children have been populated (Load on demand) + * use args.owner to access the hierarchical grid object + * use args.parentrow to access the row element for the row that was populated + * use args.id to get the data ID of the row + */ + childrenPopulated?: ChildrenPopulatedEvent; + + /** + * Event fired when child grid is rendered + * use args.owner to access the hierarchical grid object + * use args.parentrow to access the row element for the row that's about to be populated + * use args.childgrid to get reference to the child grid + */ + childGridRendered?: ChildGridRenderedEvent; + + /** + * Event fired before a child grid is going to be created, allows the developer to override the child grid creation + */ + childGridCreating?: ChildGridCreatingEvent; + + /** + * Event fired after a child grid is created + */ + childGridCreated?: ChildGridCreatedEvent; + + /** + * Option for igHierarchicalGrid + */ + [optionName: string]: any; +} +interface IgHierarchicalGridMethods { + /** + * Data binds the hierarchical grid. No child grids will be created or rendered by default, unless there is initialExpandDepth >= 0 set. + */ + dataBind(): void; + + /** + * Returns the element of the root grid (igGrid) + */ + root(): Object; + + /** + * Returns the widget object of the root grid (igGrid) + */ + rootWidget(): Object; + + /** + * Returns a flat list of all child grid widgets (not elements) - recursive + */ + allChildrenWidgets(): Object; + + /** + * Returns a flat list of all child grid elements (recursive) + */ + allChildren(): Object; + + /** + * Expands or collapses (toggles) a parent row + * Note: This method is asynchronous which means that it returns immediately and any subsequent code will execute in parallel. This may lead to runtime errors. To avoid them put the subsequent code in the callback parameter provided by the method. + * + * @param element accepts a dom element, or a jquery wrapped dom element that should be a TR and should specify a parent row + * @param callback Specifies a custom function to be called when parent row is toggled(optional). Takes 2 arguments - first is hierarchical grid object, second is the row element that was toggled + */ + toggle(element: Element, callback?: Function): void; + + /** + * Expands (toggles) a parent row + * Note: This method is asynchronous which means that it returns immediately and any subsequent code will execute in parallel. This may lead to runtime errors. To avoid them put the subsequent code in the callback parameter provided by the method. + * + * @param id accepts a dom element, or a jquery wrapped dom element that should be a TR and should specify a parent row + * @param callback Specifies a custom function to be called when parent row is expanded(optional). Takes 2 arguments first is hierarchical grid object, second is the row element that was expanded + */ + expand(id: Element, callback?: Function): void; + + /** + * Checks if a parent row is expanded or not + * + * @param element accepts a dom element, or a jquery wrapped dom element that should be a TR and should specify a parent row + */ + expanded(element: Element): boolean; + + /** + * Collapses a parent row + * Note: This method is asynchronous which means that it returns immediately and any subsequent code will execute in parallel. This may lead to runtime errors. To avoid them put the subsequent code in the callback parameter provided by the method. + * + * @param id accepts a dom element, or a jquery wrapped dom element that should be a TR and should specify a parent row + * @param callback Specifies a custom function to be called when parent row is expanded(optional). Takes 2 arguments - first is hierarchical grid object, second is the row element that was collapsed + */ + collapse(id: Element, callback?: Function): void; + + /** + * Checks if a parent row is currently collapsed + * + * @param element accepts a dom element, or a jquery wrapped dom element that should be a TR and should specify a parent row + */ + collapsed(element: Element): boolean; + + /** + * Checks if a parent row is populated with data + * + * @param element accepts a dom element, or a jquery wrapped dom element that should be a TR and should specify a parent row + */ + populated(element: Element): boolean; + + /** + * Commits pending transactions to the client data source for main and all child grids. + */ + commit(): void; + + /** + * Clears the transaction log (delegates to igDataSource). Note that this does not update the UI. In case the UI must be updated, set the second parameter "updateUI" to true, which will trigger a call to dataBind() to re-render the contents. + * + * @param rebind Whether to perform a rebind. + */ + rollback(rebind?: boolean): void; + + /** + * Posts to the settings.updateUrl using $.ajax, by serializing the changes as url params + * + * @param success Specifies a custom function to be called when AJAX request to the updateUrl option succeeds(optional) + * @param error Specifies a custom function to be called when AJAX request to the updateUrl option fails(optional) + */ + saveChanges(success: Function, error: Function): void; + + /** + * Destroys the hierarchical grid by recursively destroying all child grids + */ + destroy(): void; +} +interface JQuery { + data(propertyName: "igHierarchicalGrid"): IgHierarchicalGridMethods; +} + +interface JQuery { + igHierarchicalGrid(methodName: "dataBind"): void; + igHierarchicalGrid(methodName: "root"): Object; + igHierarchicalGrid(methodName: "rootWidget"): Object; + igHierarchicalGrid(methodName: "allChildrenWidgets"): Object; + igHierarchicalGrid(methodName: "allChildren"): Object; + igHierarchicalGrid(methodName: "toggle", element: Element, callback?: Function): void; + igHierarchicalGrid(methodName: "expand", id: Element, callback?: Function): void; + igHierarchicalGrid(methodName: "expanded", element: Element): boolean; + igHierarchicalGrid(methodName: "collapse", id: Element, callback?: Function): void; + igHierarchicalGrid(methodName: "collapsed", element: Element): boolean; + igHierarchicalGrid(methodName: "populated", element: Element): boolean; + igHierarchicalGrid(methodName: "commit"): void; + igHierarchicalGrid(methodName: "rollback", rebind?: boolean): void; + igHierarchicalGrid(methodName: "saveChanges", success: Function, error: Function): void; + igHierarchicalGrid(methodName: "destroy"): void; + + /** + * Only the first level will be data-bound initially. Also serves as "render" depth, meaning that depending on this prop, the grid will + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "initialDataBindDepth"): number; + + /** + * Only the first level will be data-bound initially. Also serves as "render" depth, meaning that depending on this prop, the grid will + * + * @optionValue New value to be set. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "initialDataBindDepth", optionValue: number): void; + + /** + * No levels will be automatically expanded when the widget is instantiated for the first time + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "initialExpandDepth"): number; + + /** + * No levels will be automatically expanded when the widget is instantiated for the first time + * + * @optionValue New value to be set. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "initialExpandDepth", optionValue: number): void; + + /** + * If true, encodes all requests using OData conventions and the $expand syntax + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "odata"): boolean; + + /** + * If true, encodes all requests using OData conventions and the $expand syntax + * + * @optionValue New value to be set. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "odata", optionValue: boolean): void; + + /** + * If true, load on demand will be achieved using REST compliant resource access with appropriate url-s for + * the ajax GET calls. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "rest"): boolean; + + /** + * If true, load on demand will be achieved using REST compliant resource access with appropriate url-s for + * the ajax GET calls. + * + * @optionValue New value to be set. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "rest", optionValue: boolean): void; + + /** + * Gets the limit on the number of levels to bind to + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "maxDataBindDepth"): number; + + /** + * Sets the limit on the number of levels to bind to + * + * @optionValue New value to be set. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "maxDataBindDepth", optionValue: number): void; + + /** + * Gets the default property in the response where children will be located + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "defaultChildrenDataProperty"): string; + + /** + * Sets the default property in the response where children will be located + * + * @optionValue New value to be set. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "defaultChildrenDataProperty", optionValue: string): void; + + /** + * If true, will autogenerate all layouts assuming default values for "childrenDataProperty" + * When autoGenerateLayouts is enabled, it will automatically generate all columns recursively. (all columns on all levels) + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "autoGenerateLayouts"): boolean; + + /** + * If true, will autogenerate all layouts assuming default values for "childrenDataProperty" + * When autoGenerateLayouts is enabled, it will automatically generate all columns recursively. (all columns on all levels) + * + * @optionValue New value to be set. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "autoGenerateLayouts", optionValue: boolean): void; + + /** + * Applies a linear animation - either expanding or collapsing depending on the parent row state + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "expandCollapseAnimations"): boolean; + + /** + * Applies a linear animation - either expanding or collapsing depending on the parent row state + * + * @optionValue New value to be set. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "expandCollapseAnimations", optionValue: boolean): void; + + /** + * Gets the expand column width + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "expandColWidth"): number; + + /** + * Sets the expand column width + * + * @optionValue New value to be set. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "expandColWidth", optionValue: number): void; + + /** + * Gets the delimiter for constructing paths , for hierarchical lookup of data + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "pathSeparator"): string; + + /** + * Sets the delimiter for constructing paths , for hierarchical lookup of data + * + * @optionValue New value to be set. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "pathSeparator", optionValue: string): void; + + /** + * The row expanding/collapsing animation duration in ms. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "animationDuration"): number; + + /** + * The row expanding/collapsing animation duration in ms. + * + * @optionValue New value to be set. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "animationDuration", optionValue: number): void; + + /** + * Gets the default tooltip applied to an expand column cell, that is currently collapsed + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "expandTooltip"): string; + + /** + * Sets the default tooltip applied to an expand column cell, that is currently collapsed + * + * @optionValue New value to be set. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "expandTooltip", optionValue: string): void; + + /** + * Gets the default tooltip applied to an expand column cell, that is currently expanded + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "collapseTooltip"): string; + + /** + * Sets the default tooltip applied to an expand column cell, that is currently expanded + * + * @optionValue New value to be set. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "collapseTooltip", optionValue: string): void; + + /** + * An array of column objects + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "columns"): any[]; + + /** + * An array of column objects + * + * @optionValue New value to be set. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "columns", optionValue: any[]): void; + + /** + * List of columnLayout objects that specify the structure of the child grids. All options that are applicable to a flat grid are also applicable here + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "columnLayouts"): IgHierarchicalGridColumnLayout[]; + + /** + * List of columnLayout objects that specify the structure of the child grids. All options that are applicable to a flat grid are also applicable here + * + * @optionValue New value to be set. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "columnLayouts", optionValue: IgHierarchicalGridColumnLayout[]): void; + + /** + * Event which is fired when a hierarchical row is about to be expanded + * use args.owner to access the hierarchical grid object + * use args.parentrow to access the row element for the row that's about to be expanded + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "rowExpanding"): RowExpandingEvent; + + /** + * Event which is fired when a hierarchical row is about to be expanded + * use args.owner to access the hierarchical grid object + * use args.parentrow to access the row element for the row that's about to be expanded + * + * @optionValue Define event handler function. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "rowExpanding", optionValue: RowExpandingEvent): void; + + /** + * Event which is fired after a hierarchical row has been expanded + * use args.owner to access the hierarchical grid object + * use args.parentrow to access the row element for the row that was expanded + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "rowExpanded"): RowExpandedEvent; + + /** + * Event which is fired after a hierarchical row has been expanded + * use args.owner to access the hierarchical grid object + * use args.parentrow to access the row element for the row that was expanded + * + * @optionValue Define event handler function. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "rowExpanded", optionValue: RowExpandedEvent): void; + + /** + * Event which is fired when a hierarchical row is about to be collapsed + * use args.owner to access the hierarchical grid object + * use args.parentrow to access the row element for the row that's about to be collapsed + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "rowCollapsing"): RowCollapsingEvent; + + /** + * Event which is fired when a hierarchical row is about to be collapsed + * use args.owner to access the hierarchical grid object + * use args.parentrow to access the row element for the row that's about to be collapsed + * + * @optionValue Define event handler function. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "rowCollapsing", optionValue: RowCollapsingEvent): void; + + /** + * Event which is fired when a hierarchical row has been collapsed + * use args.owner to access the hierarchical grid object + * use args.parentrow to access the row element for the row that was collapsd + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "rowCollapsed"): RowCollapsedEvent; + + /** + * Event which is fired when a hierarchical row has been collapsed + * use args.owner to access the hierarchical grid object + * use args.parentrow to access the row element for the row that was collapsd + * + * @optionValue Define event handler function. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "rowCollapsed", optionValue: RowCollapsedEvent): void; + + /** + * Event which is fired when children are about to be populated (Load on demand) + * use args.owner to access the hierarchical grid object + * use args.parentrow to access the row element for the row that's about to be populated + * use args.id to get the data ID of the row + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "childrenPopulating"): ChildrenPopulatingEvent; + + /** + * Event which is fired when children are about to be populated (Load on demand) + * use args.owner to access the hierarchical grid object + * use args.parentrow to access the row element for the row that's about to be populated + * use args.id to get the data ID of the row + * + * @optionValue Define event handler function. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "childrenPopulating", optionValue: ChildrenPopulatingEvent): void; + + /** + * Event which is fired when children have been populated (Load on demand) + * use args.owner to access the hierarchical grid object + * use args.parentrow to access the row element for the row that was populated + * use args.id to get the data ID of the row + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "childrenPopulated"): ChildrenPopulatedEvent; + + /** + * Event which is fired when children have been populated (Load on demand) + * use args.owner to access the hierarchical grid object + * use args.parentrow to access the row element for the row that was populated + * use args.id to get the data ID of the row + * + * @optionValue Define event handler function. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "childrenPopulated", optionValue: ChildrenPopulatedEvent): void; + + /** + * Event fired when child grid is rendered + * use args.owner to access the hierarchical grid object + * use args.parentrow to access the row element for the row that's about to be populated + * use args.childgrid to get reference to the child grid + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "childGridRendered"): ChildGridRenderedEvent; + + /** + * Event fired when child grid is rendered + * use args.owner to access the hierarchical grid object + * use args.parentrow to access the row element for the row that's about to be populated + * use args.childgrid to get reference to the child grid + * + * @optionValue Define event handler function. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "childGridRendered", optionValue: ChildGridRenderedEvent): void; + + /** + * Event fired before a child grid is going to be created, allows the developer to override the child grid creation + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "childGridCreating"): ChildGridCreatingEvent; + + /** + * Event fired before a child grid is going to be created, allows the developer to override the child grid creation + * + * @optionValue Define event handler function. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "childGridCreating", optionValue: ChildGridCreatingEvent): void; + + /** + * Event fired after a child grid is created + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "childGridCreated"): ChildGridCreatedEvent; + + /** + * Event fired after a child grid is created + * + * @optionValue Define event handler function. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "childGridCreated", optionValue: ChildGridCreatedEvent): void; + igHierarchicalGrid(options: IgHierarchicalGrid): JQuery; + igHierarchicalGrid(optionLiteral: 'option', optionName: string): any; + igHierarchicalGrid(optionLiteral: 'option', options: IgHierarchicalGrid): JQuery; + igHierarchicalGrid(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igHierarchicalGrid(methodName: string, ...methodParams: any[]): any; +} +interface GroupCollapsingEvent { + (event: Event, ui: GroupCollapsingEventUIParam): void; +} + +interface GroupCollapsingEventUIParam { + /** + * Used to get the reference to the GridMultiColumnHeaders widget. + */ + owner?: any; + + /** + * Used to get the column object for the current group that is collapsing. + */ + column?: any; + + /** + * Used to get a reference to the jQuery object for the column being collapsing (th). + */ + element?: any; +} + +interface GroupCollapsedEvent { + (event: Event, ui: GroupCollapsedEventUIParam): void; +} + +interface GroupCollapsedEventUIParam { + /** + * Used to get the reference to the GridMultiColumnHeaders widget. + */ + owner?: any; + + /** + * Used to get the column object for the current group that is collapsed. + */ + column?: any; + + /** + * Used to get a reference to the jQuery object for the column being collapsed (th). + */ + element?: any; +} + +interface GroupExpandingEvent { + (event: Event, ui: GroupExpandingEventUIParam): void; +} + +interface GroupExpandingEventUIParam { + /** + * Used to get the reference to the GridMultiColumnHeaders widget. + */ + owner?: any; + + /** + * Used to get the column object for the current group that is expanding. + */ + column?: any; + + /** + * Used to get a reference to the jQuery object for the column being expanded (th). + */ + element?: any; +} + +interface GroupExpandedEvent { + (event: Event, ui: GroupExpandedEventUIParam): void; +} + +interface GroupExpandedEventUIParam { + /** + * Used to get the reference to the GridMultiColumnHeaders widget. + */ + owner?: any; + + /** + * Used to get the column object for the current group that is expanded. + */ + column?: any; + + /** + * Used to get a reference to the jQuery object for the column being expanded (th). + */ + element?: any; +} + +interface IgGridMultiColumnHeaders { + /** + * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. + */ + inherit?: boolean; + + /** + * Event fired before a group collapsing operation is executed. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridMultiColumnHeaders widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.column to get the column object for the current group that is collapsing. + * Use ui.element to get a reference to the jQuery object for the column being collapsing (th). + */ + groupCollapsing?: GroupCollapsingEvent; + + /** + * Event fired after the group collapsing has been executed and results are rendered. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridMultiColumnHeaders widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.column to get the column object for the current group that is collapsed. + * Use ui.element to get a reference to the jQuery object for the column being collapsed (th). + */ + groupCollapsed?: GroupCollapsedEvent; + + /** + * Event fired before a group expanding operation is executed. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridMultiColumnHeaders widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.column to get the column object for the current group that is expanding. + * Use ui.element to get a reference to the jQuery object for the column being expanded (th). + */ + groupExpanding?: GroupExpandingEvent; + + /** + * Event fired after the group expanding has been executed and results are rendered. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridMultiColumnHeaders widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.column to get the column object for the current group that is expanded. + * Use ui.element to get a reference to the jQuery object for the column being expanded (th). + */ + groupExpanded?: GroupExpandedEvent; + + /** + * Option for igGridMultiColumnHeaders + */ + [optionName: string]: any; +} +interface IgGridMultiColumnHeadersMethods { + /** + * Expands a collapsed group. If the group is expanded, the method does nothing. + * Note: This method is asynchronous which means that it returns immediately and any subsequent code will execute in parallel. This may lead to runtime errors. To avoid them put the subsequent code in the callback parameter provided by the method. + * + * @param groupKey Group key. + * @param callback Specifies a custom function to be called when the group is expanded. + */ + expandGroup(groupKey: string, callback?: Function): void; + + /** + * Collapses an expanded group. If the group is collapsed, the method does nothing. + * Note: This method is asynchronous which means that it returns immediately and any subsequent code will execute in parallel. This may lead to runtime errors. To avoid them put the subsequent code in the callback parameter provided by the method. + * + * @param groupKey Group key. + * @param callback Specifies a custom function to be called when the group is collapsed. + */ + collapseGroup(groupKey: string, callback?: Function): void; + + /** + * Toggles a collapsible group. + * Note: This method is asynchronous which means that it returns immediately and any subsequent code will execute in parallel. This may lead to runtime errors. To avoid them put the subsequent code in the callback parameter provided by the method. + * + * @param groupKey Group key. + * @param callback Specifies a custom function to be called when the group is toggled. + */ + toggleGroup(groupKey: string, callback?: Function): void; + + /** + * Returns multicolumn headers array. if there aren"t multicolumn headers returns undefined + */ + getMultiColumnHeaders(): any[]; + + /** + * Destroys the multicolumn widget + */ + destroy(): void; +} +interface JQuery { + data(propertyName: "igGridMultiColumnHeaders"): IgGridMultiColumnHeadersMethods; +} + +interface JQuery { + igGridMultiColumnHeaders(methodName: "expandGroup", groupKey: string, callback?: Function): void; + igGridMultiColumnHeaders(methodName: "collapseGroup", groupKey: string, callback?: Function): void; + igGridMultiColumnHeaders(methodName: "toggleGroup", groupKey: string, callback?: Function): void; + igGridMultiColumnHeaders(methodName: "getMultiColumnHeaders"): any[]; + igGridMultiColumnHeaders(methodName: "destroy"): void; + + /** + * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. + */ + igGridMultiColumnHeaders(optionLiteral: 'option', optionName: "inherit"): boolean; + + /** + * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. + * + * @optionValue New value to be set. + */ + igGridMultiColumnHeaders(optionLiteral: 'option', optionName: "inherit", optionValue: boolean): void; + + /** + * Event fired before a group collapsing operation is executed. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridMultiColumnHeaders widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.column to get the column object for the current group that is collapsing. + * Use ui.element to get a reference to the jQuery object for the column being collapsing (th). + */ + igGridMultiColumnHeaders(optionLiteral: 'option', optionName: "groupCollapsing"): GroupCollapsingEvent; + + /** + * Event fired before a group collapsing operation is executed. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridMultiColumnHeaders widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.column to get the column object for the current group that is collapsing. + * Use ui.element to get a reference to the jQuery object for the column being collapsing (th). + * + * @optionValue Define event handler function. + */ + igGridMultiColumnHeaders(optionLiteral: 'option', optionName: "groupCollapsing", optionValue: GroupCollapsingEvent): void; + + /** + * Event fired after the group collapsing has been executed and results are rendered. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridMultiColumnHeaders widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.column to get the column object for the current group that is collapsed. + * Use ui.element to get a reference to the jQuery object for the column being collapsed (th). + */ + igGridMultiColumnHeaders(optionLiteral: 'option', optionName: "groupCollapsed"): GroupCollapsedEvent; + + /** + * Event fired after the group collapsing has been executed and results are rendered. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridMultiColumnHeaders widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.column to get the column object for the current group that is collapsed. + * Use ui.element to get a reference to the jQuery object for the column being collapsed (th). + * + * @optionValue Define event handler function. + */ + igGridMultiColumnHeaders(optionLiteral: 'option', optionName: "groupCollapsed", optionValue: GroupCollapsedEvent): void; + + /** + * Event fired before a group expanding operation is executed. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridMultiColumnHeaders widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.column to get the column object for the current group that is expanding. + * Use ui.element to get a reference to the jQuery object for the column being expanded (th). + */ + igGridMultiColumnHeaders(optionLiteral: 'option', optionName: "groupExpanding"): GroupExpandingEvent; + + /** + * Event fired before a group expanding operation is executed. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridMultiColumnHeaders widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.column to get the column object for the current group that is expanding. + * Use ui.element to get a reference to the jQuery object for the column being expanded (th). + * + * @optionValue Define event handler function. + */ + igGridMultiColumnHeaders(optionLiteral: 'option', optionName: "groupExpanding", optionValue: GroupExpandingEvent): void; + + /** + * Event fired after the group expanding has been executed and results are rendered. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridMultiColumnHeaders widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.column to get the column object for the current group that is expanded. + * Use ui.element to get a reference to the jQuery object for the column being expanded (th). + */ + igGridMultiColumnHeaders(optionLiteral: 'option', optionName: "groupExpanded"): GroupExpandedEvent; + + /** + * Event fired after the group expanding has been executed and results are rendered. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridMultiColumnHeaders widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.column to get the column object for the current group that is expanded. + * Use ui.element to get a reference to the jQuery object for the column being expanded (th). + * + * @optionValue Define event handler function. + */ + igGridMultiColumnHeaders(optionLiteral: 'option', optionName: "groupExpanded", optionValue: GroupExpandedEvent): void; + igGridMultiColumnHeaders(options: IgGridMultiColumnHeaders): JQuery; + igGridMultiColumnHeaders(optionLiteral: 'option', optionName: string): any; + igGridMultiColumnHeaders(optionLiteral: 'option', options: IgGridMultiColumnHeaders): JQuery; + igGridMultiColumnHeaders(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igGridMultiColumnHeaders(methodName: string, ...methodParams: any[]): any; +} +interface PageIndexChangingEvent { + (event: Event, ui: PageIndexChangingEventUIParam): void; +} + +interface PageIndexChangingEventUIParam { + /** + * Used to get reference to GridPaging. + */ + owner?: any; + + /** + * Used to get current page index. + */ + currentPageIndex?: any; + + /** + * Used to get new page index. + */ + newPageIndex?: any; +} + +interface PageIndexChangedEvent { + (event: Event, ui: PageIndexChangedEventUIParam): void; +} + +interface PageIndexChangedEventUIParam { + /** + * Used to get reference to GridPaging. + */ + owner?: any; + + /** + * Used to get current page index. + */ + pageIndex?: any; +} + +interface PageSizeChangingEvent { + (event: Event, ui: PageSizeChangingEventUIParam): void; +} + +interface PageSizeChangingEventUIParam { + /** + * Used to get reference to GridPaging. + */ + owner?: any; + + /** + * Used to get current page size. + */ + currentPageSize?: any; + + /** + * Used to get new page size. + */ + newPageSize?: any; +} + +interface PageSizeChangedEvent { + (event: Event, ui: PageSizeChangedEventUIParam): void; +} + +interface PageSizeChangedEventUIParam { + /** + * Used to get reference to GridPaging. + */ + owner?: any; + + /** + * Used to get current page size. + */ + pageSize?: any; +} + +interface PagerRenderingEvent { + (event: Event, ui: PagerRenderingEventUIParam): void; +} + +interface PagerRenderingEventUIParam { + /** + * Used to get reference to GridPaging. + */ + owner?: any; + + /** + * Used to get reference to grid's data source. + */ + dataSource?: any; +} + +interface PagerRenderedEvent { + (event: Event, ui: PagerRenderedEventUIParam): void; +} + +interface PagerRenderedEventUIParam { + /** + * Used to get reference to GridPaging. + */ + owner?: any; + + /** + * Used to get reference to grid's data source. + */ + dataSource?: any; +} + +interface IgGridPaging { + /** + * Number of records loaded and displayed per page. + * + */ + pageSize?: number; + + /** + * The property in the response data, when using remote data source, that will hold the total number of records in the data source. + * + */ + recordCountKey?: string; + + /** + * Denotes the name of the encoded URL parameter that will state what is the currently requested page size. + * + */ + pageSizeUrlKey?: string; + + /** + * Denotes the name of the encoded URL parameter that will state what is the currently requested page index. + * + */ + pageIndexUrlKey?: string; + + /** + * Current page index that's bound in the data source and rendered in the UI. + * + */ + currentPageIndex?: number; + + /** + * Type of paging. Delegates all paging functionality to the [$.ig.DataSource](ig.datasource). + * + * + * Valid values: + * "remote" Paging is performed by a remote end-point. + * "local" Paging is performed locally by the [$.ig.DataSource](ig.datasource). + */ + type?: string; + + /** + * If false, a dropdown allowing to change the page size will not be rendered in the UI. + * + */ + showPageSizeDropDown?: boolean; + + /** + * Text rendered in front of the page size dropdown, when [showPageSizeDropDown](ui.iggridpaging#options:showPageSizeDropDown) is set to true. + * + */ + pageSizeDropDownLabel?: string; + + /** + * Trailing text for the page size dropdown, when [showPageSizeDropDown](ui.iggridpaging#options:showPageSizeDropDown) is set to true. + * + */ + pageSizeDropDownTrailingLabel?: string; + + /** + * Page size dropdown location, when [showPageSizeDropDown](ui.iggridpaging#options:showPageSizeDropDown) is set to true. Can be rendered above the grid header or inside the pager, next to the page links. + * + * + * Valid values: + * "above" The page size drop down will be rendered above the grid header. + * "inpager" The page size drop down will be rendered next to page links. + */ + pageSizeDropDownLocation?: string; + + /** + * Option specifying whether to show summary label for the currently rendered records or not. + * + */ + showPagerRecordsLabel?: boolean; + + /** + * Custom pager records label template - in [igTemplating](http://www.igniteui.com/help/igtemplating-overview) style and syntax. + * + */ + pagerRecordsLabelTemplate?: string; + + /** + * Text for the next page label. + * + */ + nextPageLabelText?: string; + + /** + * Text for the previous page label. + * + */ + prevPageLabelText?: string; + + /** + * Text for the first page label. + * + */ + firstPageLabelText?: string; + + /** + * Text for the last page label. + * + */ + lastPageLabelText?: string; + + /** + * Option specifying whether to render the first and last page navigation buttons. + * + */ + showFirstLastPages?: boolean; + + /** + * Option specifying whether to render the previous and next page navigation buttons. + * + */ + showPrevNextPages?: boolean; + + /** + * Leading label text for the drop down from where the page index can be switched. + * + */ + currentPageDropDownLeadingLabel?: string; + + /** + * Trailing label text for the drop down from where the page index can be switched. + * + */ + currentPageDropDownTrailingLabel?: string; + + /** + * Tooltip text for the page index drop down. + * + */ + currentPageDropDownTooltip?: string; + + /** + * Tooltip text for the page size drop down. + * + */ + pageSizeDropDownTooltip?: string; + + /** + * Tooltip text for the pager records label. + * + */ + pagerRecordsLabelTooltip?: string; + + /** + * Tooltip text for the previous page button. + * + */ + prevPageTooltip?: string; + + /** + * Tooltip text for the next page button. + * + */ + nextPageTooltip?: string; + + /** + * Tooltip text for the first page button. + * + */ + firstPageTooltip?: string; + + /** + * Tooltip text for the last page button. + * + */ + lastPageTooltip?: string; + + /** + * Tooltip text templates of buttons that navigate to a particular page. The format string follows the [igTemplating](http://www.igniteui.com/help/igtemplating-overview) style and syntax. See also the [pageCountLimit](ui.iggridpaging#options:pageCountLimit) option. + * + */ + pageTooltipFormat?: string; + + /** + * Predefined page sizes that are available to the end user to switch their grid paging to, through a drop down in the grid header. + * + */ + pageSizeList?: any; + + /** + * Sets/Gets the number of pages which if exceeded a drop down list of page indices is displayed. If the number of pages is less than or equal to this option then buttons for each page are displayed. + * + */ + pageCountLimit?: number; + + /** + * Number of page buttons, adjacent to and including the [active page](ui.iggridpaging#options:currentPageIndex), that are constantly visible. For the invisible pages, previous and next buttons are used. + * + */ + visiblePageCount?: number; + + /** + * Drop down width for the page size and page index drop downs. + * + */ + defaultDropDownWidth?: number; + + /** + * Time in milliseconds for which page drop down will wait for keystrokes before changing the page. + * + */ + delayOnPageChanged?: number; + + /** + * Enables/disables paging persistence between states. + * + */ + persist?: boolean; + + /** + * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. + * + */ + inherit?: boolean; + + /** + * Event fired before the page index is changed. + * Return false in order to cancel page index changing. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridPaging. + * Use ui.owner.grid to get reference to the grid. + * Use ui.currentPageIndex to get current page index. + * Use ui.newPageIndex to get new page index. + */ + pageIndexChanging?: PageIndexChangingEvent; + + /** + * Event fired after the page index is changed , but before grid data rebinds + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridPaging. + * Use ui.owner.grid to get reference to the grid. + * Use ui.pageIndex to get current page index. + */ + pageIndexChanged?: PageIndexChangedEvent; + + /** + * Event fired when the page size is about to be changed from the page size dropdown. + * Return false in order to cancel page size changing. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridPaging. + * Use ui.owner.grid to get reference to the grid. + * Use ui.currentPageSize to get current page size. + * Use ui.newPageSize to get new page size. + */ + pageSizeChanging?: PageSizeChangingEvent; + + /** + * Event fired after the page size is changed from the page size dropdown. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridPaging. + * Use ui.owner.grid to get reference to the grid. + * Use ui.pageSize to get current page size. + */ + pageSizeChanged?: PageSizeChangedEvent; + + /** + * Event fired before the pager footer is rendered (the whole area below the grid records). + * Return false in order to cancel pager footer rendering. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridPaging. + * Use ui.owner.grid to get reference to the grid. + * Use ui.dataSource to get reference to grid's data source. + */ + pagerRendering?: PagerRenderingEvent; + + /** + * Event fired after the pager footer is rendered + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridPaging. + * Use ui.owner.grid to get reference to the grid. + * Use ui.dataSource to get reference to grid's data source. + */ + pagerRendered?: PagerRenderedEvent; + + /** + * Option for igGridPaging + */ + [optionName: string]: any; +} +interface IgGridPagingMethods { + /** + * Gets/Sets the current page index, delegates data binding and paging to [$.ig.DataSource](ig.datasource). + * + * @param index The page index to go to. + */ + pageIndex(index?: number): number; + + /** + * Gets/Sets the page size. If no parameter is specified, just returns the current page size. + * + * @param size The new page size. + */ + pageSize(size?: number): number; + + /** + * Destroys the igGridPaging feature by removing all elements in the pager area, unbinding events, and resetting data to discard data filtering on paging. + */ + destroy(): void; +} +interface JQuery { + data(propertyName: "igGridPaging"): IgGridPagingMethods; +} + +interface JQuery { + igGridPaging(methodName: "pageIndex", index?: number): number; + igGridPaging(methodName: "pageSize", size?: number): number; + igGridPaging(methodName: "destroy"): void; + + /** + * Number of records loaded and displayed per page. + * + */ + igGridPaging(optionLiteral: 'option', optionName: "pageSize"): number; + + /** + * Number of records loaded and displayed per page. + * + * + * @optionValue New value to be set. + */ + igGridPaging(optionLiteral: 'option', optionName: "pageSize", optionValue: number): void; + + /** + * The property in the response data, when using remote data source, that will hold the total number of records in the data source. + * + */ + igGridPaging(optionLiteral: 'option', optionName: "recordCountKey"): string; + + /** + * The property in the response data, when using remote data source, that will hold the total number of records in the data source. + * + * + * @optionValue New value to be set. + */ + igGridPaging(optionLiteral: 'option', optionName: "recordCountKey", optionValue: string): void; + + /** + * Denotes the name of the encoded URL parameter that will state what is the currently requested page size. + * + */ + igGridPaging(optionLiteral: 'option', optionName: "pageSizeUrlKey"): string; + + /** + * Denotes the name of the encoded URL parameter that will state what is the currently requested page size. + * + * + * @optionValue New value to be set. + */ + igGridPaging(optionLiteral: 'option', optionName: "pageSizeUrlKey", optionValue: string): void; + + /** + * Denotes the name of the encoded URL parameter that will state what is the currently requested page index. + * + */ + igGridPaging(optionLiteral: 'option', optionName: "pageIndexUrlKey"): string; + + /** + * Denotes the name of the encoded URL parameter that will state what is the currently requested page index. + * + * + * @optionValue New value to be set. + */ + igGridPaging(optionLiteral: 'option', optionName: "pageIndexUrlKey", optionValue: string): void; + + /** + * Current page index that's bound in the data source and rendered in the UI. + * + */ + igGridPaging(optionLiteral: 'option', optionName: "currentPageIndex"): number; + + /** + * Current page index that's bound in the data source and rendered in the UI. + * + * + * @optionValue New value to be set. + */ + igGridPaging(optionLiteral: 'option', optionName: "currentPageIndex", optionValue: number): void; + + /** + * Type of paging. Delegates all paging functionality to the [$.ig.DataSource](ig.datasource). + * + */ + igGridPaging(optionLiteral: 'option', optionName: "type"): string; + + /** + * Type of paging. Delegates all paging functionality to the [$.ig.DataSource](ig.datasource). + * + * + * @optionValue New value to be set. + */ + igGridPaging(optionLiteral: 'option', optionName: "type", optionValue: string): void; + + /** + * If false, a dropdown allowing to change the page size will not be rendered in the UI. + * + */ + igGridPaging(optionLiteral: 'option', optionName: "showPageSizeDropDown"): boolean; + + /** + * If false, a dropdown allowing to change the page size will not be rendered in the UI. + * + * + * @optionValue New value to be set. + */ + igGridPaging(optionLiteral: 'option', optionName: "showPageSizeDropDown", optionValue: boolean): void; + + /** + * Text rendered in front of the page size dropdown, when [showPageSizeDropDown](ui.iggridpaging#options:showPageSizeDropDown) is set to true. + * + */ + igGridPaging(optionLiteral: 'option', optionName: "pageSizeDropDownLabel"): string; + + /** + * Text rendered in front of the page size dropdown, when [showPageSizeDropDown](ui.iggridpaging#options:showPageSizeDropDown) is set to true. + * + * + * @optionValue New value to be set. + */ + igGridPaging(optionLiteral: 'option', optionName: "pageSizeDropDownLabel", optionValue: string): void; + + /** + * Trailing text for the page size dropdown, when [showPageSizeDropDown](ui.iggridpaging#options:showPageSizeDropDown) is set to true. + * + */ + igGridPaging(optionLiteral: 'option', optionName: "pageSizeDropDownTrailingLabel"): string; + + /** + * Trailing text for the page size dropdown, when [showPageSizeDropDown](ui.iggridpaging#options:showPageSizeDropDown) is set to true. + * + * + * @optionValue New value to be set. + */ + igGridPaging(optionLiteral: 'option', optionName: "pageSizeDropDownTrailingLabel", optionValue: string): void; + + /** + * Page size dropdown location, when [showPageSizeDropDown](ui.iggridpaging#options:showPageSizeDropDown) is set to true. Can be rendered above the grid header or inside the pager, next to the page links. + * + */ + igGridPaging(optionLiteral: 'option', optionName: "pageSizeDropDownLocation"): string; + + /** + * Page size dropdown location, when [showPageSizeDropDown](ui.iggridpaging#options:showPageSizeDropDown) is set to true. Can be rendered above the grid header or inside the pager, next to the page links. + * + * + * @optionValue New value to be set. + */ + igGridPaging(optionLiteral: 'option', optionName: "pageSizeDropDownLocation", optionValue: string): void; + + /** + * Option specifying whether to show summary label for the currently rendered records or not. + * + */ + igGridPaging(optionLiteral: 'option', optionName: "showPagerRecordsLabel"): boolean; + + /** + * Option specifying whether to show summary label for the currently rendered records or not. + * + * + * @optionValue New value to be set. + */ + igGridPaging(optionLiteral: 'option', optionName: "showPagerRecordsLabel", optionValue: boolean): void; + + /** + * Custom pager records label template - in [igTemplating](http://www.igniteui.com/help/igtemplating-overview) style and syntax. + * + */ + igGridPaging(optionLiteral: 'option', optionName: "pagerRecordsLabelTemplate"): string; + + /** + * Custom pager records label template - in [igTemplating](http://www.igniteui.com/help/igtemplating-overview) style and syntax. + * + * + * @optionValue New value to be set. + */ + igGridPaging(optionLiteral: 'option', optionName: "pagerRecordsLabelTemplate", optionValue: string): void; + + /** + * Text for the next page label. + * + */ + igGridPaging(optionLiteral: 'option', optionName: "nextPageLabelText"): string; + + /** + * Text for the next page label. + * + * + * @optionValue New value to be set. + */ + igGridPaging(optionLiteral: 'option', optionName: "nextPageLabelText", optionValue: string): void; + + /** + * Text for the previous page label. + * + */ + igGridPaging(optionLiteral: 'option', optionName: "prevPageLabelText"): string; + + /** + * Text for the previous page label. + * + * + * @optionValue New value to be set. + */ + igGridPaging(optionLiteral: 'option', optionName: "prevPageLabelText", optionValue: string): void; + + /** + * Text for the first page label. + * + */ + igGridPaging(optionLiteral: 'option', optionName: "firstPageLabelText"): string; + + /** + * Text for the first page label. + * + * + * @optionValue New value to be set. + */ + igGridPaging(optionLiteral: 'option', optionName: "firstPageLabelText", optionValue: string): void; + + /** + * Text for the last page label. + * + */ + igGridPaging(optionLiteral: 'option', optionName: "lastPageLabelText"): string; + + /** + * Text for the last page label. + * + * + * @optionValue New value to be set. + */ + igGridPaging(optionLiteral: 'option', optionName: "lastPageLabelText", optionValue: string): void; + + /** + * Option specifying whether to render the first and last page navigation buttons. + * + */ + igGridPaging(optionLiteral: 'option', optionName: "showFirstLastPages"): boolean; + + /** + * Option specifying whether to render the first and last page navigation buttons. + * + * + * @optionValue New value to be set. + */ + igGridPaging(optionLiteral: 'option', optionName: "showFirstLastPages", optionValue: boolean): void; + + /** + * Option specifying whether to render the previous and next page navigation buttons. + * + */ + igGridPaging(optionLiteral: 'option', optionName: "showPrevNextPages"): boolean; + + /** + * Option specifying whether to render the previous and next page navigation buttons. + * + * + * @optionValue New value to be set. + */ + igGridPaging(optionLiteral: 'option', optionName: "showPrevNextPages", optionValue: boolean): void; + + /** + * Leading label text for the drop down from where the page index can be switched. + * + */ + igGridPaging(optionLiteral: 'option', optionName: "currentPageDropDownLeadingLabel"): string; + + /** + * Leading label text for the drop down from where the page index can be switched. + * + * + * @optionValue New value to be set. + */ + igGridPaging(optionLiteral: 'option', optionName: "currentPageDropDownLeadingLabel", optionValue: string): void; + + /** + * Trailing label text for the drop down from where the page index can be switched. + * + */ + igGridPaging(optionLiteral: 'option', optionName: "currentPageDropDownTrailingLabel"): string; + + /** + * Trailing label text for the drop down from where the page index can be switched. + * + * + * @optionValue New value to be set. + */ + igGridPaging(optionLiteral: 'option', optionName: "currentPageDropDownTrailingLabel", optionValue: string): void; + + /** + * Tooltip text for the page index drop down. + * + */ + igGridPaging(optionLiteral: 'option', optionName: "currentPageDropDownTooltip"): string; + + /** + * Tooltip text for the page index drop down. + * + * + * @optionValue New value to be set. + */ + igGridPaging(optionLiteral: 'option', optionName: "currentPageDropDownTooltip", optionValue: string): void; + + /** + * Tooltip text for the page size drop down. + * + */ + igGridPaging(optionLiteral: 'option', optionName: "pageSizeDropDownTooltip"): string; + + /** + * Tooltip text for the page size drop down. + * + * + * @optionValue New value to be set. + */ + igGridPaging(optionLiteral: 'option', optionName: "pageSizeDropDownTooltip", optionValue: string): void; + + /** + * Tooltip text for the pager records label. + * + */ + igGridPaging(optionLiteral: 'option', optionName: "pagerRecordsLabelTooltip"): string; + + /** + * Tooltip text for the pager records label. + * + * + * @optionValue New value to be set. + */ + igGridPaging(optionLiteral: 'option', optionName: "pagerRecordsLabelTooltip", optionValue: string): void; + + /** + * Tooltip text for the previous page button. + * + */ + igGridPaging(optionLiteral: 'option', optionName: "prevPageTooltip"): string; + + /** + * Tooltip text for the previous page button. + * + * + * @optionValue New value to be set. + */ + igGridPaging(optionLiteral: 'option', optionName: "prevPageTooltip", optionValue: string): void; + + /** + * Tooltip text for the next page button. + * + */ + igGridPaging(optionLiteral: 'option', optionName: "nextPageTooltip"): string; + + /** + * Tooltip text for the next page button. + * + * + * @optionValue New value to be set. + */ + igGridPaging(optionLiteral: 'option', optionName: "nextPageTooltip", optionValue: string): void; + + /** + * Tooltip text for the first page button. + * + */ + igGridPaging(optionLiteral: 'option', optionName: "firstPageTooltip"): string; + + /** + * Tooltip text for the first page button. + * + * + * @optionValue New value to be set. + */ + igGridPaging(optionLiteral: 'option', optionName: "firstPageTooltip", optionValue: string): void; + + /** + * Tooltip text for the last page button. + * + */ + igGridPaging(optionLiteral: 'option', optionName: "lastPageTooltip"): string; + + /** + * Tooltip text for the last page button. + * + * + * @optionValue New value to be set. + */ + igGridPaging(optionLiteral: 'option', optionName: "lastPageTooltip", optionValue: string): void; + + /** + * Tooltip text templates of buttons that navigate to a particular page. The format string follows the [igTemplating](http://www.igniteui.com/help/igtemplating-overview) style and syntax. See also the [pageCountLimit](ui.iggridpaging#options:pageCountLimit) option. + * + */ + igGridPaging(optionLiteral: 'option', optionName: "pageTooltipFormat"): string; + + /** + * Tooltip text templates of buttons that navigate to a particular page. The format string follows the [igTemplating](http://www.igniteui.com/help/igtemplating-overview) style and syntax. See also the [pageCountLimit](ui.iggridpaging#options:pageCountLimit) option. + * + * + * @optionValue New value to be set. + */ + igGridPaging(optionLiteral: 'option', optionName: "pageTooltipFormat", optionValue: string): void; + + /** + * Predefined page sizes that are available to the end user to switch their grid paging to, through a drop down in the grid header. + * + */ + igGridPaging(optionLiteral: 'option', optionName: "pageSizeList"): any; + + /** + * Predefined page sizes that are available to the end user to switch their grid paging to, through a drop down in the grid header. + * + * + * @optionValue New value to be set. + */ + igGridPaging(optionLiteral: 'option', optionName: "pageSizeList", optionValue: any): void; + + /** + * Sets/Gets the number of pages which if exceeded a drop down list of page indices is displayed. If the number of pages is less than or equal to this option then buttons for each page are displayed. + * + */ + igGridPaging(optionLiteral: 'option', optionName: "pageCountLimit"): number; + + /** + * Sets/ the number of pages which if exceeded a drop down list of page indices is displayed. If the number of pages is less than or equal to this option then buttons for each page are displayed. + * + * + * @optionValue New value to be set. + */ + igGridPaging(optionLiteral: 'option', optionName: "pageCountLimit", optionValue: number): void; + + /** + * Number of page buttons, adjacent to and including the [active page](ui.iggridpaging#options:currentPageIndex), that are constantly visible. For the invisible pages, previous and next buttons are used. + * + */ + igGridPaging(optionLiteral: 'option', optionName: "visiblePageCount"): number; + + /** + * Number of page buttons, adjacent to and including the [active page](ui.iggridpaging#options:currentPageIndex), that are constantly visible. For the invisible pages, previous and next buttons are used. + * + * + * @optionValue New value to be set. + */ + igGridPaging(optionLiteral: 'option', optionName: "visiblePageCount", optionValue: number): void; + + /** + * Drop down width for the page size and page index drop downs. + * + */ + igGridPaging(optionLiteral: 'option', optionName: "defaultDropDownWidth"): number; + + /** + * Drop down width for the page size and page index drop downs. + * + * + * @optionValue New value to be set. + */ + igGridPaging(optionLiteral: 'option', optionName: "defaultDropDownWidth", optionValue: number): void; + + /** + * Time in milliseconds for which page drop down will wait for keystrokes before changing the page. + * + */ + igGridPaging(optionLiteral: 'option', optionName: "delayOnPageChanged"): number; + + /** + * Time in milliseconds for which page drop down will wait for keystrokes before changing the page. + * + * + * @optionValue New value to be set. + */ + igGridPaging(optionLiteral: 'option', optionName: "delayOnPageChanged", optionValue: number): void; + + /** + * Enables/disables paging persistence between states. + * + */ + igGridPaging(optionLiteral: 'option', optionName: "persist"): boolean; + + /** + * Enables/disables paging persistence between states. + * + * + * @optionValue New value to be set. + */ + igGridPaging(optionLiteral: 'option', optionName: "persist", optionValue: boolean): void; + + /** + * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. + * + */ + igGridPaging(optionLiteral: 'option', optionName: "inherit"): boolean; + + /** + * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. + * + * + * @optionValue New value to be set. + */ + igGridPaging(optionLiteral: 'option', optionName: "inherit", optionValue: boolean): void; + + /** + * Event fired before the page index is changed. + * Return false in order to cancel page index changing. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridPaging. + * Use ui.owner.grid to get reference to the grid. + * Use ui.currentPageIndex to get current page index. + * Use ui.newPageIndex to get new page index. + */ + igGridPaging(optionLiteral: 'option', optionName: "pageIndexChanging"): PageIndexChangingEvent; + + /** + * Event fired before the page index is changed. + * Return false in order to cancel page index changing. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridPaging. + * Use ui.owner.grid to get reference to the grid. + * Use ui.currentPageIndex to get current page index. + * Use ui.newPageIndex to get new page index. + * + * @optionValue Define event handler function. + */ + igGridPaging(optionLiteral: 'option', optionName: "pageIndexChanging", optionValue: PageIndexChangingEvent): void; + + /** + * Event fired after the page index is changed , but before grid data rebinds + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridPaging. + * Use ui.owner.grid to get reference to the grid. + * Use ui.pageIndex to get current page index. + */ + igGridPaging(optionLiteral: 'option', optionName: "pageIndexChanged"): PageIndexChangedEvent; + + /** + * Event fired after the page index is changed , but before grid data rebinds + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridPaging. + * Use ui.owner.grid to get reference to the grid. + * Use ui.pageIndex to get current page index. + * + * @optionValue Define event handler function. + */ + igGridPaging(optionLiteral: 'option', optionName: "pageIndexChanged", optionValue: PageIndexChangedEvent): void; + + /** + * Event fired when the page size is about to be changed from the page size dropdown. + * Return false in order to cancel page size changing. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridPaging. + * Use ui.owner.grid to get reference to the grid. + * Use ui.currentPageSize to get current page size. + * Use ui.newPageSize to get new page size. + */ + igGridPaging(optionLiteral: 'option', optionName: "pageSizeChanging"): PageSizeChangingEvent; + + /** + * Event fired when the page size is about to be changed from the page size dropdown. + * Return false in order to cancel page size changing. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridPaging. + * Use ui.owner.grid to get reference to the grid. + * Use ui.currentPageSize to get current page size. + * Use ui.newPageSize to get new page size. + * + * @optionValue Define event handler function. + */ + igGridPaging(optionLiteral: 'option', optionName: "pageSizeChanging", optionValue: PageSizeChangingEvent): void; + + /** + * Event fired after the page size is changed from the page size dropdown. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridPaging. + * Use ui.owner.grid to get reference to the grid. + * Use ui.pageSize to get current page size. + */ + igGridPaging(optionLiteral: 'option', optionName: "pageSizeChanged"): PageSizeChangedEvent; + + /** + * Event fired after the page size is changed from the page size dropdown. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridPaging. + * Use ui.owner.grid to get reference to the grid. + * Use ui.pageSize to get current page size. + * + * @optionValue Define event handler function. + */ + igGridPaging(optionLiteral: 'option', optionName: "pageSizeChanged", optionValue: PageSizeChangedEvent): void; + + /** + * Event fired before the pager footer is rendered (the whole area below the grid records). + * Return false in order to cancel pager footer rendering. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridPaging. + * Use ui.owner.grid to get reference to the grid. + * Use ui.dataSource to get reference to grid's data source. + */ + igGridPaging(optionLiteral: 'option', optionName: "pagerRendering"): PagerRenderingEvent; + + /** + * Event fired before the pager footer is rendered (the whole area below the grid records). + * Return false in order to cancel pager footer rendering. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridPaging. + * Use ui.owner.grid to get reference to the grid. + * Use ui.dataSource to get reference to grid's data source. + * + * @optionValue Define event handler function. + */ + igGridPaging(optionLiteral: 'option', optionName: "pagerRendering", optionValue: PagerRenderingEvent): void; + + /** + * Event fired after the pager footer is rendered + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridPaging. + * Use ui.owner.grid to get reference to the grid. + * Use ui.dataSource to get reference to grid's data source. + */ + igGridPaging(optionLiteral: 'option', optionName: "pagerRendered"): PagerRenderedEvent; + + /** + * Event fired after the pager footer is rendered + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridPaging. + * Use ui.owner.grid to get reference to the grid. + * Use ui.dataSource to get reference to grid's data source. + * + * @optionValue Define event handler function. + */ + igGridPaging(optionLiteral: 'option', optionName: "pagerRendered", optionValue: PagerRenderedEvent): void; + igGridPaging(options: IgGridPaging): JQuery; + igGridPaging(optionLiteral: 'option', optionName: string): any; + igGridPaging(optionLiteral: 'option', options: IgGridPaging): JQuery; + igGridPaging(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igGridPaging(methodName: string, ...methodParams: any[]): any; +} +interface IgGridResizingColumnSetting { + /** + * Column key. this is a required property in every column setting if columnIndex is not set. + * + */ + columnKey?: string; + + /** + * Column index. Can be used in place of column key. the preferred way of populating a column setting is to always use the column keys as identifiers. + * + */ + columnIndex?: number; + + /** + * Enables disables resizing for the column. + * + */ + allowResizing?: boolean; + + /** + * Minimum column width in pixels or percents. + * + */ + minimumWidth?: string|number; + + /** + * Maximum column width in pixels or percents. + * + */ + maximumWidth?: string|number; + + /** + * Option for IgGridResizingColumnSetting + */ + [optionName: string]: any; +} + +interface ColumnResizingEvent { + (event: Event, ui: ColumnResizingEventUIParam): void; +} + +interface ColumnResizingEventUIParam { + /** + * Used to get the reference to the GridResizing widget. + */ + owner?: any; + + /** + * Used to get the resized column index. + */ + columnIndex?: any; + + /** + * Used to get the resized column key. + */ + columnKey?: any; + + /** + * Used to get the desired width(before min/max coercion) for the resized column. + */ + desiredWidth?: any; +} + +interface ColumnResizingRefusedEvent { + (event: Event, ui: ColumnResizingRefusedEventUIParam): void; +} + +interface ColumnResizingRefusedEventUIParam { + /** + * Used to get the reference to the GridResizing widget. + */ + owner?: any; + + /** + * Used to get the resized column index. + */ + columnIndex?: any; + + /** + * Used to get the resized column key. + */ + columnKey?: any; + + /** + * Used to get the desired width(before min/max coercion) for the resized column. + */ + desiredWidth?: any; +} + +interface ColumnResizedEvent { + (event: Event, ui: ColumnResizedEventUIParam): void; +} + +interface ColumnResizedEventUIParam { + /** + * Used to get the reference to the GridResizing widget. + */ + owner?: any; + + /** + * Used to get the resized column index. + */ + columnIndex?: any; + + /** + * Used to get the resized column key. + */ + columnKey?: any; + + /** + * Used to get the original column width. + */ + originalWidth?: any; + + /** + * Used to get the final column width after resizing. + */ + newWidth?: any; +} + +interface IgGridResizing { + /** + * Resize the column to the size of the longest currently visible cell value. + * + */ + allowDoubleClickToResize?: boolean; + + /** + * Specifies whether the resizing should be deferred until the user finishes resizing or applied immediately. + * + */ + deferredResizing?: boolean; + + /** + * A list of column settings that specifies resizing options on a per column basis. + * + */ + columnSettings?: IgGridResizingColumnSetting[]; + + /** + * The width in pixels of the resizing handle which is position at the right side of each resizeable column header. + * + */ + handleThreshold?: number; + + /** + * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. + */ + inherit?: boolean; + + /** + * Event fired before a resizing operation is executed. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridResizing widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnIndex to get the resized column index. + * Use ui.columnKey to get the resized column key. + * Use ui.desiredWidth to get the desired width(before min/max coercion) for the resized column. + */ + columnResizing?: ColumnResizingEvent; + + /** + * Event fired(only when columnFixing is enabled) when trying to resize column in fixed area so total width of unfixed area to be less than minimalVisibleAreaWidth(option defined in columnFixing) + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridResizing widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnIndex to get the resized column index. + * Use ui.columnKey to get the resized column key. + * Use ui.desiredWidth to get the desired width(before min/max coercion) for the resized column. + */ + columnResizingRefused?: ColumnResizingRefusedEvent; + + /** + * Event fired after the resizing has been executed and results are rendered + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridResizing widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnIndex to get the resized column index. + * Use ui.columnKey to get the resized column key. + * Use ui.originalWidth to get the original column width. + * Use ui.newWidth to get the final column width after resizing. + */ + columnResized?: ColumnResizedEvent; + + /** + * Option for igGridResizing + */ + [optionName: string]: any; +} +interface IgGridResizingMethods { + /** + * Destroys the resizing widget + */ + destroy(): void; + + /** + * Resizes a column to a specified width in pixels, percents or auto if no width is specified. + * + * @param column An identifier for the column. If a number is provided it will be used as a columnIndex else if a strings is provided it will be used as a columnKey. + * @param width Width of the column in pixels or percents. If no width or "*" is specified the column will be auto-sized to the width of the data in it (including header and footer cells). + */ + resize(column: Object, width?: Object): void; +} +interface JQuery { + data(propertyName: "igGridResizing"): IgGridResizingMethods; +} + +interface JQuery { + igGridResizing(methodName: "destroy"): void; + igGridResizing(methodName: "resize", column: Object, width?: Object): void; + + /** + * Resize the column to the size of the longest currently visible cell value. + * + */ + igGridResizing(optionLiteral: 'option', optionName: "allowDoubleClickToResize"): boolean; + + /** + * Resize the column to the size of the longest currently visible cell value. + * + * + * @optionValue New value to be set. + */ + igGridResizing(optionLiteral: 'option', optionName: "allowDoubleClickToResize", optionValue: boolean): void; + + /** + * Gets whether the resizing should be deferred until the user finishes resizing or applied immediately. + * + */ + igGridResizing(optionLiteral: 'option', optionName: "deferredResizing"): boolean; + + /** + * Sets whether the resizing should be deferred until the user finishes resizing or applied immediately. + * + * + * @optionValue New value to be set. + */ + igGridResizing(optionLiteral: 'option', optionName: "deferredResizing", optionValue: boolean): void; + + /** + * A list of column settings that specifies resizing options on a per column basis. + * + */ + igGridResizing(optionLiteral: 'option', optionName: "columnSettings"): IgGridResizingColumnSetting[]; + + /** + * A list of column settings that specifies resizing options on a per column basis. + * + * + * @optionValue New value to be set. + */ + igGridResizing(optionLiteral: 'option', optionName: "columnSettings", optionValue: IgGridResizingColumnSetting[]): void; + + /** + * The width in pixels of the resizing handle which is position at the right side of each resizeable column header. + * + */ + igGridResizing(optionLiteral: 'option', optionName: "handleThreshold"): number; + + /** + * The width in pixels of the resizing handle which is position at the right side of each resizeable column header. + * + * + * @optionValue New value to be set. + */ + igGridResizing(optionLiteral: 'option', optionName: "handleThreshold", optionValue: number): void; + + /** + * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. + */ + igGridResizing(optionLiteral: 'option', optionName: "inherit"): boolean; + + /** + * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. + * + * @optionValue New value to be set. + */ + igGridResizing(optionLiteral: 'option', optionName: "inherit", optionValue: boolean): void; + + /** + * Event fired before a resizing operation is executed. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridResizing widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnIndex to get the resized column index. + * Use ui.columnKey to get the resized column key. + * Use ui.desiredWidth to get the desired width(before min/max coercion) for the resized column. + */ + igGridResizing(optionLiteral: 'option', optionName: "columnResizing"): ColumnResizingEvent; + + /** + * Event fired before a resizing operation is executed. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridResizing widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnIndex to get the resized column index. + * Use ui.columnKey to get the resized column key. + * Use ui.desiredWidth to get the desired width(before min/max coercion) for the resized column. + * + * @optionValue Define event handler function. + */ + igGridResizing(optionLiteral: 'option', optionName: "columnResizing", optionValue: ColumnResizingEvent): void; + + /** + * Event fired(only when columnFixing is enabled) when trying to resize column in fixed area so total width of unfixed area to be less than minimalVisibleAreaWidth(option defined in columnFixing) + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridResizing widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnIndex to get the resized column index. + * Use ui.columnKey to get the resized column key. + * Use ui.desiredWidth to get the desired width(before min/max coercion) for the resized column. + */ + igGridResizing(optionLiteral: 'option', optionName: "columnResizingRefused"): ColumnResizingRefusedEvent; + + /** + * Event fired(only when columnFixing is enabled) when trying to resize column in fixed area so total width of unfixed area to be less than minimalVisibleAreaWidth(option defined in columnFixing) + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridResizing widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnIndex to get the resized column index. + * Use ui.columnKey to get the resized column key. + * Use ui.desiredWidth to get the desired width(before min/max coercion) for the resized column. + * + * @optionValue Define event handler function. + */ + igGridResizing(optionLiteral: 'option', optionName: "columnResizingRefused", optionValue: ColumnResizingRefusedEvent): void; + + /** + * Event fired after the resizing has been executed and results are rendered + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridResizing widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnIndex to get the resized column index. + * Use ui.columnKey to get the resized column key. + * Use ui.originalWidth to get the original column width. + * Use ui.newWidth to get the final column width after resizing. + */ + igGridResizing(optionLiteral: 'option', optionName: "columnResized"): ColumnResizedEvent; + + /** + * Event fired after the resizing has been executed and results are rendered + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridResizing widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnIndex to get the resized column index. + * Use ui.columnKey to get the resized column key. + * Use ui.originalWidth to get the original column width. + * Use ui.newWidth to get the final column width after resizing. + * + * @optionValue Define event handler function. + */ + igGridResizing(optionLiteral: 'option', optionName: "columnResized", optionValue: ColumnResizedEvent): void; + igGridResizing(options: IgGridResizing): JQuery; + igGridResizing(optionLiteral: 'option', optionName: string): any; + igGridResizing(optionLiteral: 'option', options: IgGridResizing): JQuery; + igGridResizing(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igGridResizing(methodName: string, ...methodParams: any[]): any; +} +interface IgGridResponsiveColumnSetting { + /** + * Column key. This is a required property in every column setting if columnIndex is not set. + * + */ + columnKey?: string; + + /** + * Column index. Can be used in place of column key. The preferred way of populating a column setting is to always use the column keys as identifiers. + * + */ + columnIndex?: number; + + /** + * A list of predefined classes to decide element's visibility on. + * + */ + classes?: string; + + /** + * A configuration object to use for the responsive functionality. Uses the keys defined in the widget's responsiveModes object. The classes property is not used if this one is set. + * + */ + configuration?: any; + + /** + * Option for IgGridResponsiveColumnSetting + */ + [optionName: string]: any; +} + +interface IgGridResponsiveAllowedColumnWidthPerType { + /** + * Minimal width in pixels string columns can take before forcing vertical rendering + * + */ + string?: number; + + /** + * Minimal width in pixels number columns can take before forcing vertical rendering + * + */ + number?: number; + + /** + * Minimal width in pixels bool columns can take before forcing vertical rendering + * + */ + bool?: number; + + /** + * Minimal width in pixels date columns can take before forcing vertical rendering + * + */ + date?: number; + + /** + * Minimal width in pixels object columns can take before forcing vertical rendering + * + */ + object?: number; + + /** + * Option for IgGridResponsiveAllowedColumnWidthPerType + */ + [optionName: string]: any; +} + +interface ResponsiveColumnHidingEvent { + (event: Event, ui: ResponsiveColumnHidingEventUIParam): void; +} + +interface ResponsiveColumnHidingEventUIParam { + /** + * Used to get the reference to the igGridResponsive widget. + */ + owner?: any; + + /** + * Used to get the hidden column index. Has a value only if the column's key is a number. + */ + columnIndex?: any; + + /** + * Used to get the hidden column key. Has a value only if the column's key is a string. + */ + columnKey?: any; +} + +interface ResponsiveColumnHiddenEvent { + (event: Event, ui: ResponsiveColumnHiddenEventUIParam): void; +} + +interface ResponsiveColumnHiddenEventUIParam { + /** + * Used to get the reference to the igGridResponsive widget. + */ + owner?: any; + + /** + * Used to get the hidden column index. Has a value only if the column's key is a number. + */ + columnIndex?: any; + + /** + * Used to get the hidden column key. Has a value only if the column's key is a string. + */ + columnKey?: any; +} + +interface ResponsiveColumnShowingEvent { + (event: Event, ui: ResponsiveColumnShowingEventUIParam): void; +} + +interface ResponsiveColumnShowingEventUIParam { + /** + * Used to get the reference to the igGridResponsive widget. + */ + owner?: any; + + /** + * Used to get the shown column index. Has a value only if the column's key is a number. + */ + columnIndex?: any; + + /** + * Used to get the shown column key. Has a value only if the column's key is a string. + */ + columnKey?: any; +} + +interface ResponsiveColumnShownEvent { + (event: Event, ui: ResponsiveColumnShownEventUIParam): void; +} + +interface ResponsiveColumnShownEventUIParam { + /** + * Used to get the reference to the igGridResponsive widget. + */ + owner?: any; + + /** + * Used to get the shown column index. Has a value only if the column's key is a number. + */ + columnIndex?: any; + + /** + * Used to get the shown column key. Has a value only if the column's key is a string. + */ + columnKey?: any; +} + +interface ResponsiveModeChangedEvent { + (event: Event, ui: ResponsiveModeChangedEventUIParam): void; +} + +interface ResponsiveModeChangedEventUIParam { + /** + * Used to get the reference to the igGridResponsive widget. + */ + owner?: any; + + /** + * Used to get the previously assumed mode. + */ + previousMode?: any; + + /** + * Used to get the newly assumed mode. + */ + mode?: any; +} + +interface IgGridResponsive { + /** + * A list of column settings that specifies how columns will react based on the environment the grid is run on. + * + */ + columnSettings?: IgGridResponsiveColumnSetting[]; + + /** + * If this option is set to true an igResponsiveContainer widget will be attached to the igGrid control which will notify the feature when changes in the width of the container occur. + * + */ + reactOnContainerWidthChanges?: boolean; + + /** + * If this option is set to true the widget will ensure the grid's width is always set to 100%. + * + */ + forceResponsiveGridWidth?: boolean; + + /** + * The amount of pixels the window needs to resize with for the grid to respond. + * + */ + responsiveSensitivity?: number; + + /** + * The recognized types of environments and their configuration. + * + */ + responsiveModes?: any; + + /** + * Enable or disable the responsive vertical rendering for the grid. + * + */ + enableVerticalRendering?: boolean; + + /** + * The window's width under which the grid will render its contents vertically. + * + * + * Valid values: + * "string" The width in a (px) string + * "number" The width as a number + * "null" The grid will determine when to render this mode automatically. + */ + windowWidthToRenderVertically?: string|number; + + /** + * The width of the properties column when vertical rendering is enabled + * + * + * Valid values: + * "string" The width in a (%) string + * "number" The width as a number in percents + */ + propertiesColumnWidth?: string|number; + + /** + * The width of the values column when vertical rendering is enabled + * + * + * Valid values: + * "string" The width in a (%) string + * "number" The width as a number in percents + */ + valuesColumnWidth?: string|number; + + /** + * When windowWidthToRenderVertically is null, determine minimal widths columns can take before + * forcing vertical rendering for the grid + * + */ + allowedColumnWidthPerType?: IgGridResponsiveAllowedColumnWidthPerType; + + /** + * Specifies a template to render a record with in a list-view style layout per mode. + * + */ + singleColumnTemplate?: any; + + /** + * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. + */ + inherit?: boolean; + + /** + * Event fired before a hiding operation is executed on a collection of columns. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridResponsive widget. + * Use ui.owner.grid to get the reference to the igGrid widget. + * Use ui.columnIndex to get the hidden column index. Has a value only if the column's key is a number. + * Use ui.columnKey to get the hidden column key. Has a value only if the column's key is a string. + */ + responsiveColumnHiding?: ResponsiveColumnHidingEvent; + + /** + * Event fired after a hiding operation is executed on the collection of columns. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridResponsive widget. + * Use ui.owner.grid to get the reference to the igGrid widget. + * Use ui.columnIndex to get the hidden column index. Has a value only if the column's key is a number. + * Use ui.columnKey to get the hidden column key. Has a value only if the column's key is a string. + */ + responsiveColumnHidden?: ResponsiveColumnHiddenEvent; + + /** + * Event fired before a showing operation is executed on a collection of columns. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridResponsive widget. + * Use ui.owner.grid to get the reference to the igGrid widget. + * Use ui.columnIndex to get the shown column index. Has a value only if the column's key is a number. + * Use ui.columnKey to get the shown column key. Has a value only if the column's key is a string. + */ + responsiveColumnShowing?: ResponsiveColumnShowingEvent; + + /** + * Event fired after a showing operation is executed on the collection of columns. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridResponsive widget. + * Use ui.owner.grid to get the reference to the igGrid widget. + * Use ui.columnIndex to get the shown column index. Has a value only if the column's key is a number. + * Use ui.columnKey to get the shown column key. Has a value only if the column's key is a string. + */ + responsiveColumnShown?: ResponsiveColumnShownEvent; + + /** + * Event which is fired when the widget detects an environment change. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridResponsive widget. + * Use ui.owner.grid to get the reference to the igGrid widget. + * Use ui.previousMode to get the previously assumed mode. + * Use ui.mode to get the newly assumed mode. + */ + responsiveModeChanged?: ResponsiveModeChangedEvent; + + /** + * Option for igGridResponsive + */ + [optionName: string]: any; +} +interface IgGridResponsiveMethods { + /** + * Destroys the responsive widget. + */ + destroy(): void; + + /** + * Returns the currently active responsive mode. + */ + getCurrentResponsiveMode(): void; +} +interface JQuery { + data(propertyName: "igGridResponsive"): IgGridResponsiveMethods; +} + +interface ResponsiveModeSettings { + minWidth?: number; + maxWidth?: any; + minHeight?: number; + maxHeight?: any; + + /** + * Option for ResponsiveModeSettings + */ + [optionName: string]: any; +} + +declare namespace Infragistics { + class ResponsiveMode { + constructor(settings: ResponsiveModeSettings); + isActive(): void; + } +} +interface IgniteUIStatic { +ResponsiveMode: typeof Infragistics.ResponsiveMode; +} + +interface InfragisticsModeSettings { + key?: string; + visibilityTester?: any; + + /** + * Option for InfragisticsModeSettings + */ + [optionName: string]: any; +} + +declare namespace Infragistics { + class InfragisticsMode { + constructor(settings: InfragisticsModeSettings); + isActive(): void; + } +} +interface IgniteUIStatic { +InfragisticsMode: typeof Infragistics.InfragisticsMode; +} + +interface BootstrapModeSettings { + key?: string; + visibilityTester?: any; + + /** + * Option for BootstrapModeSettings + */ + [optionName: string]: any; +} + +declare namespace Infragistics { + class BootstrapMode { + constructor(settings: BootstrapModeSettings); + isActive(): void; + } +} +interface IgniteUIStatic { +BootstrapMode: typeof Infragistics.BootstrapMode; +} + +interface JQuery { + igGridResponsive(methodName: "destroy"): void; + igGridResponsive(methodName: "getCurrentResponsiveMode"): void; + + /** + * A list of column settings that specifies how columns will react based on the environment the grid is run on. + * + */ + igGridResponsive(optionLiteral: 'option', optionName: "columnSettings"): IgGridResponsiveColumnSetting[]; + + /** + * A list of column settings that specifies how columns will react based on the environment the grid is run on. + * + * + * @optionValue New value to be set. + */ + igGridResponsive(optionLiteral: 'option', optionName: "columnSettings", optionValue: IgGridResponsiveColumnSetting[]): void; + + /** + * If this option is set to true an igResponsiveContainer widget will be attached to the igGrid control which will notify the feature when changes in the width of the container occur. + * + */ + igGridResponsive(optionLiteral: 'option', optionName: "reactOnContainerWidthChanges"): boolean; + + /** + * If this option is set to true an igResponsiveContainer widget will be attached to the igGrid control which will notify the feature when changes in the width of the container occur. + * + * + * @optionValue New value to be set. + */ + igGridResponsive(optionLiteral: 'option', optionName: "reactOnContainerWidthChanges", optionValue: boolean): void; + + /** + * If this option is set to true the widget will ensure the grid's width is always set to 100%. + * + */ + igGridResponsive(optionLiteral: 'option', optionName: "forceResponsiveGridWidth"): boolean; + + /** + * If this option is set to true the widget will ensure the grid's width is always set to 100%. + * + * + * @optionValue New value to be set. + */ + igGridResponsive(optionLiteral: 'option', optionName: "forceResponsiveGridWidth", optionValue: boolean): void; + + /** + * The amount of pixels the window needs to resize with for the grid to respond. + * + */ + igGridResponsive(optionLiteral: 'option', optionName: "responsiveSensitivity"): number; + + /** + * The amount of pixels the window needs to resize with for the grid to respond. + * + * + * @optionValue New value to be set. + */ + igGridResponsive(optionLiteral: 'option', optionName: "responsiveSensitivity", optionValue: number): void; + + /** + * The recognized types of environments and their configuration. + * + */ + igGridResponsive(optionLiteral: 'option', optionName: "responsiveModes"): any; + + /** + * The recognized types of environments and their configuration. + * + * + * @optionValue New value to be set. + */ + igGridResponsive(optionLiteral: 'option', optionName: "responsiveModes", optionValue: any): void; + + /** + * Enable or disable the responsive vertical rendering for the grid. + * + */ + igGridResponsive(optionLiteral: 'option', optionName: "enableVerticalRendering"): boolean; + + /** + * Enable or disable the responsive vertical rendering for the grid. + * + * + * @optionValue New value to be set. + */ + igGridResponsive(optionLiteral: 'option', optionName: "enableVerticalRendering", optionValue: boolean): void; + + /** + * The window's width under which the grid will render its contents vertically. + * + */ + igGridResponsive(optionLiteral: 'option', optionName: "windowWidthToRenderVertically"): string|number; + + /** + * The window's width under which the grid will render its contents vertically. + * + * + * @optionValue New value to be set. + */ + igGridResponsive(optionLiteral: 'option', optionName: "windowWidthToRenderVertically", optionValue: string|number): void; + + /** + * The width of the properties column when vertical rendering is enabled + * + */ + igGridResponsive(optionLiteral: 'option', optionName: "propertiesColumnWidth"): string|number; + + /** + * The width of the properties column when vertical rendering is enabled + * + * + * @optionValue New value to be set. + */ + igGridResponsive(optionLiteral: 'option', optionName: "propertiesColumnWidth", optionValue: string|number): void; + + /** + * The width of the values column when vertical rendering is enabled + * + */ + igGridResponsive(optionLiteral: 'option', optionName: "valuesColumnWidth"): string|number; + + /** + * The width of the values column when vertical rendering is enabled + * + * + * @optionValue New value to be set. + */ + igGridResponsive(optionLiteral: 'option', optionName: "valuesColumnWidth", optionValue: string|number): void; + + /** + * When windowWidthToRenderVertically is null, determine minimal widths columns can take before + * forcing vertical rendering for the grid + * + */ + igGridResponsive(optionLiteral: 'option', optionName: "allowedColumnWidthPerType"): IgGridResponsiveAllowedColumnWidthPerType; + + /** + * When windowWidthToRenderVertically is null, determine minimal widths columns can take before + * forcing vertical rendering for the grid + * + * + * @optionValue New value to be set. + */ + igGridResponsive(optionLiteral: 'option', optionName: "allowedColumnWidthPerType", optionValue: IgGridResponsiveAllowedColumnWidthPerType): void; + + /** + * Gets a template to render a record with in a list-view style layout per mode. + * + */ + igGridResponsive(optionLiteral: 'option', optionName: "singleColumnTemplate"): any; + + /** + * Sets a template to render a record with in a list-view style layout per mode. + * + * + * @optionValue New value to be set. + */ + igGridResponsive(optionLiteral: 'option', optionName: "singleColumnTemplate", optionValue: any): void; + + /** + * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. + */ + igGridResponsive(optionLiteral: 'option', optionName: "inherit"): boolean; + + /** + * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. + * + * @optionValue New value to be set. + */ + igGridResponsive(optionLiteral: 'option', optionName: "inherit", optionValue: boolean): void; + + /** + * Event fired before a hiding operation is executed on a collection of columns. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridResponsive widget. + * Use ui.owner.grid to get the reference to the igGrid widget. + * Use ui.columnIndex to get the hidden column index. Has a value only if the column's key is a number. + * Use ui.columnKey to get the hidden column key. Has a value only if the column's key is a string. + */ + igGridResponsive(optionLiteral: 'option', optionName: "responsiveColumnHiding"): ResponsiveColumnHidingEvent; + + /** + * Event fired before a hiding operation is executed on a collection of columns. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridResponsive widget. + * Use ui.owner.grid to get the reference to the igGrid widget. + * Use ui.columnIndex to get the hidden column index. Has a value only if the column's key is a number. + * Use ui.columnKey to get the hidden column key. Has a value only if the column's key is a string. + * + * @optionValue Define event handler function. + */ + igGridResponsive(optionLiteral: 'option', optionName: "responsiveColumnHiding", optionValue: ResponsiveColumnHidingEvent): void; + + /** + * Event fired after a hiding operation is executed on the collection of columns. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridResponsive widget. + * Use ui.owner.grid to get the reference to the igGrid widget. + * Use ui.columnIndex to get the hidden column index. Has a value only if the column's key is a number. + * Use ui.columnKey to get the hidden column key. Has a value only if the column's key is a string. + */ + igGridResponsive(optionLiteral: 'option', optionName: "responsiveColumnHidden"): ResponsiveColumnHiddenEvent; + + /** + * Event fired after a hiding operation is executed on the collection of columns. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridResponsive widget. + * Use ui.owner.grid to get the reference to the igGrid widget. + * Use ui.columnIndex to get the hidden column index. Has a value only if the column's key is a number. + * Use ui.columnKey to get the hidden column key. Has a value only if the column's key is a string. + * + * @optionValue Define event handler function. + */ + igGridResponsive(optionLiteral: 'option', optionName: "responsiveColumnHidden", optionValue: ResponsiveColumnHiddenEvent): void; + + /** + * Event fired before a showing operation is executed on a collection of columns. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridResponsive widget. + * Use ui.owner.grid to get the reference to the igGrid widget. + * Use ui.columnIndex to get the shown column index. Has a value only if the column's key is a number. + * Use ui.columnKey to get the shown column key. Has a value only if the column's key is a string. + */ + igGridResponsive(optionLiteral: 'option', optionName: "responsiveColumnShowing"): ResponsiveColumnShowingEvent; + + /** + * Event fired before a showing operation is executed on a collection of columns. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridResponsive widget. + * Use ui.owner.grid to get the reference to the igGrid widget. + * Use ui.columnIndex to get the shown column index. Has a value only if the column's key is a number. + * Use ui.columnKey to get the shown column key. Has a value only if the column's key is a string. + * + * @optionValue Define event handler function. + */ + igGridResponsive(optionLiteral: 'option', optionName: "responsiveColumnShowing", optionValue: ResponsiveColumnShowingEvent): void; + + /** + * Event fired after a showing operation is executed on the collection of columns. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridResponsive widget. + * Use ui.owner.grid to get the reference to the igGrid widget. + * Use ui.columnIndex to get the shown column index. Has a value only if the column's key is a number. + * Use ui.columnKey to get the shown column key. Has a value only if the column's key is a string. + */ + igGridResponsive(optionLiteral: 'option', optionName: "responsiveColumnShown"): ResponsiveColumnShownEvent; + + /** + * Event fired after a showing operation is executed on the collection of columns. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridResponsive widget. + * Use ui.owner.grid to get the reference to the igGrid widget. + * Use ui.columnIndex to get the shown column index. Has a value only if the column's key is a number. + * Use ui.columnKey to get the shown column key. Has a value only if the column's key is a string. + * + * @optionValue Define event handler function. + */ + igGridResponsive(optionLiteral: 'option', optionName: "responsiveColumnShown", optionValue: ResponsiveColumnShownEvent): void; + + /** + * Event which is fired when the widget detects an environment change. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridResponsive widget. + * Use ui.owner.grid to get the reference to the igGrid widget. + * Use ui.previousMode to get the previously assumed mode. + * Use ui.mode to get the newly assumed mode. + */ + igGridResponsive(optionLiteral: 'option', optionName: "responsiveModeChanged"): ResponsiveModeChangedEvent; + + /** + * Event which is fired when the widget detects an environment change. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridResponsive widget. + * Use ui.owner.grid to get the reference to the igGrid widget. + * Use ui.previousMode to get the previously assumed mode. + * Use ui.mode to get the newly assumed mode. + * + * @optionValue Define event handler function. + */ + igGridResponsive(optionLiteral: 'option', optionName: "responsiveModeChanged", optionValue: ResponsiveModeChangedEvent): void; + igGridResponsive(options: IgGridResponsive): JQuery; + igGridResponsive(optionLiteral: 'option', optionName: string): any; + igGridResponsive(optionLiteral: 'option', options: IgGridResponsive): JQuery; + igGridResponsive(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igGridResponsive(methodName: string, ...methodParams: any[]): any; +} +interface RowSelectorClickedEvent { + (event: Event, ui: RowSelectorClickedEventUIParam): void; +} + +interface RowSelectorClickedEventUIParam { + /** + * Used to get reference to the row the clicked row selector resides in. + */ + row?: any; + + /** + * Used to get reference to the fixed row the clicked row selector resides in(if there are fixed columns). + */ + fixedRow?: any; + + /** + * Used to get the index of the row the clicked row selector resides in. + */ + rowIndex?: any; + + /** + * Used to get the key of the row the clicked row selector resides in. + */ + rowKey?: any; + + /** + * Used tor to get reference to the row selector cell. + */ + rowSelector?: any; + + /** + * Used to get reference to RowSelectors. + */ + owner?: any; + + /** + * Used to get reference to the grid the RowSelectors are initialized for. + */ + grid?: any; +} + +interface CheckBoxStateChangingEvent { + (event: Event, ui: CheckBoxStateChangingEventUIParam): void; +} + +interface CheckBoxStateChangingEventUIParam { + /** + * Used to get reference to the row the clicked row selector resides in. + */ + row?: any; + + /** + * Used to get the index of the row the clicked row selector resides in. + */ + rowIndex?: any; + + /** + * Used to get the key of the row the clicked row selector resides in. + */ + rowKey?: any; + + /** + * Used tor to get reference to the row selector cell. + */ + rowSelector?: any; + + /** + * Used to get reference to igRowSelectors. + */ + owner?: any; + + /** + * Used to get reference to the grid the RowSelectors are initialized for. + */ + grid?: any; + + /** + * Used to get the current state of the checkbox ("on","off"). + */ + currentState?: any; + + /** + * Used to get the new state of the checkbox ("on","off"). + */ + newState?: any; + + /** + * Used to check if the header check box is the one being clicked. In this case no row related args are passed. + */ + isHeader?: any; +} + +interface CheckBoxStateChangedEvent { + (event: Event, ui: CheckBoxStateChangedEventUIParam): void; +} + +interface CheckBoxStateChangedEventUIParam { + /** + * Used to get reference to the row the clicked row selector resides in. + */ + row?: any; + + /** + * Used to get the index of the row the clicked row selector resides in. + */ + rowIndex?: any; + + /** + * Used to get the key of the row the clicked row selector resides in. + */ + rowKey?: any; + + /** + * Used tor to get reference to the row selector cell. + */ + rowSelector?: any; + + /** + * Used to get reference to igRowSelectors. + */ + owner?: any; + + /** + * Used to get reference to the grid the RowSelectors are initialized for. + */ + grid?: any; + + /** + * Used to get the state of the checkbox ("on","off"). + */ + state?: any; + + /** + * Used to check if the header check box is the one being clicked. In this case no row related args are passed. + */ + isHeader?: any; +} + +interface IgGridRowSelectors { + /** + * Determines whether the row selectors column should contain row numbering + * + */ + enableRowNumbering?: boolean; + + /** + * Determines whether the row selectors column should contain checkboxes + * + */ + enableCheckBoxes?: boolean; + + /** + * The seed to be added to the default numbering + * + */ + rowNumberingSeed?: number; + + /** + * + * + * Valid values: + * "string" The row selector column width can be set in pixels (px) and percentage (%) + * "number" The row selector width can be set as a number + * "null" will let the feature decide the best width depending on enabled contents + */ + rowSelectorColumnWidth?: string|number; + + /** + * Determines whether the selection feature is required for the row selectors. If set to "false" + * the widget will not check for Selection availability. If set to "true" an exception will be thrown if Selection is + * not available. + * + */ + requireSelection?: boolean; + + /** + * Determines whether checkboxes will be shown only if row selectors are on focus/selected. + * + */ + showCheckBoxesOnFocus?: boolean; + + /** + * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. + */ + inherit?: boolean; + + /** + * Enables/disables showing an overlay after clicking on the header checkbox, which allows selecting all records from all pages. + * + */ + enableSelectAllForPaging?: boolean; + + /** + * Custom template for "select all" overlay with paging + * Element with attribute data-rs-select-all is used for sellecting all the records + * Element with attribute data-rs-close-all is used for closing the overlay + * The default template is "
You have selected ${checked} records. Select all ${totalRecordsCount} records
" + * There is also ${allCheckedRecords} parameter which is not used in the default template, but it represents the checked records from all pages. + * + */ + selectAllForPagingTemplate?: string; + + /** + * Custom template for "deselect all" overlay with paging + * Element with attribute data-rs-deselect-all is used for sellecting all the records + * Element with attribute data-rs-close-all is used for closing the overlay + * The default template is "
You have deselected ${unchecked} records. Deselect all ${totalRecordsCount} records
" + * There is also ${allCheckedRecords} parameter which is not used in the default template, but it represents the checked records from all pages. + * + */ + deselectAllForPagingTemplate?: string; + + /** + * Event fired after a row selector is clicked. + * Function takes arguments evt and ui. + * Use ui.row to get reference to the row the clicked row selector resides in. + * Use ui.fixedRow to get reference to the fixed row the clicked row selector resides in(if there are fixed columns). + * Use ui.rowIndex to get the index of the row the clicked row selector resides in. + * Use ui.rowKey to get the key of the row the clicked row selector resides in. + * Use ui.rowSelector to get reference to the row selector cell. + * Use ui.owner to get reference to RowSelectors. + * Use ui.grid to get reference to the grid the RowSelectors are initialized for. + */ + rowSelectorClicked?: RowSelectorClickedEvent; + + /** + * Event fired when a row selector checkbox is changing. + * Function takes arguments evt and ui. + * Use ui.row to get reference to the row the clicked row selector resides in. + * Use ui.rowIndex to get the index of the row the clicked row selector resides in. + * Use ui.rowKey to get the key of the row the clicked row selector resides in. + * Use ui.rowSelector to get reference to the row selector cell. + * Use ui.owner to get reference to igRowSelectors. + * Use ui.grid to get reference to the grid the RowSelectors are initialized for. + * Use ui.currentState to get the current state of the checkbox ("on","off"). + * Use ui.newState to get the new state of the checkbox ("on","off"). + * Use ui.isHeader to check if the header check box is the one being clicked. In this case no row related args are passed. + */ + checkBoxStateChanging?: CheckBoxStateChangingEvent; + + /** + * Event fired after a row selector checkbox had changed state. + * Function takes arguments evt and ui. + * Use ui.row to get reference to the row the clicked row selector resides in. + * Use ui.rowIndex to get the index of the row the clicked row selector resides in. + * Use ui.rowKey to get the key of the row the clicked row selector resides in. + * Use ui.rowSelector to get reference to the row selector cell. + * Use ui.owner to get reference to igRowSelectors. + * Use ui.grid to get reference to the grid the RowSelectors are initialized for. + * Use ui.state to get the state of the checkbox ("on","off"). + * Use ui.isHeader to check if the header check box is the one being clicked. In this case no row related args are passed. + */ + checkBoxStateChanged?: CheckBoxStateChangedEvent; + + /** + * Option for igGridRowSelectors + */ + [optionName: string]: any; +} +interface IgGridRowSelectorsMethods { + destroy(): void; +} +interface JQuery { + data(propertyName: "igGridRowSelectors"): IgGridRowSelectorsMethods; +} + +interface JQuery { + igGridRowSelectors(methodName: "destroy"): void; + + /** + * Determines whether the row selectors column should contain row numbering + * + */ + igGridRowSelectors(optionLiteral: 'option', optionName: "enableRowNumbering"): boolean; + + /** + * Determines whether the row selectors column should contain row numbering + * + * + * @optionValue New value to be set. + */ + igGridRowSelectors(optionLiteral: 'option', optionName: "enableRowNumbering", optionValue: boolean): void; + + /** + * Determines whether the row selectors column should contain checkboxes + * + */ + igGridRowSelectors(optionLiteral: 'option', optionName: "enableCheckBoxes"): boolean; + + /** + * Determines whether the row selectors column should contain checkboxes + * + * + * @optionValue New value to be set. + */ + igGridRowSelectors(optionLiteral: 'option', optionName: "enableCheckBoxes", optionValue: boolean): void; + + /** + * The seed to be added to the default numbering + * + */ + igGridRowSelectors(optionLiteral: 'option', optionName: "rowNumberingSeed"): number; + + /** + * The seed to be added to the default numbering + * + * + * @optionValue New value to be set. + */ + igGridRowSelectors(optionLiteral: 'option', optionName: "rowNumberingSeed", optionValue: number): void; + + /** + * * + */ + igGridRowSelectors(optionLiteral: 'option', optionName: "rowSelectorColumnWidth"): string|number; + + /** + * * + * + * @optionValue New value to be set. + */ + igGridRowSelectors(optionLiteral: 'option', optionName: "rowSelectorColumnWidth", optionValue: string|number): void; + + /** + * Determines whether the selection feature is required for the row selectors. If set to "false" + * the widget will not check for Selection availability. If set to "true" an exception will be thrown if Selection is + * not available. + * + */ + igGridRowSelectors(optionLiteral: 'option', optionName: "requireSelection"): boolean; + + /** + * Determines whether the selection feature is required for the row selectors. If set to "false" + * the widget will not check for Selection availability. If set to "true" an exception will be thrown if Selection is + * not available. + * + * + * @optionValue New value to be set. + */ + igGridRowSelectors(optionLiteral: 'option', optionName: "requireSelection", optionValue: boolean): void; + + /** + * Determines whether checkboxes will be shown only if row selectors are on focus/selected. + * + */ + igGridRowSelectors(optionLiteral: 'option', optionName: "showCheckBoxesOnFocus"): boolean; + + /** + * Determines whether checkboxes will be shown only if row selectors are on focus/selected. + * + * + * @optionValue New value to be set. + */ + igGridRowSelectors(optionLiteral: 'option', optionName: "showCheckBoxesOnFocus", optionValue: boolean): void; + + /** + * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. + */ + igGridRowSelectors(optionLiteral: 'option', optionName: "inherit"): boolean; + + /** + * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. + * + * @optionValue New value to be set. + */ + igGridRowSelectors(optionLiteral: 'option', optionName: "inherit", optionValue: boolean): void; + + /** + * Enables/disables showing an overlay after clicking on the header checkbox, which allows selecting all records from all pages. + * + */ + igGridRowSelectors(optionLiteral: 'option', optionName: "enableSelectAllForPaging"): boolean; + + /** + * Enables/disables showing an overlay after clicking on the header checkbox, which allows selecting all records from all pages. + * + * + * @optionValue New value to be set. + */ + igGridRowSelectors(optionLiteral: 'option', optionName: "enableSelectAllForPaging", optionValue: boolean): void; + + /** + * Custom template for "select all" overlay with paging + * Element with attribute data-rs-select-all is used for sellecting all the records + * Element with attribute data-rs-close-all is used for closing the overlay + * The default template is "
You have selected ${checked} records. Select all ${totalRecordsCount} records
" + * There is also ${allCheckedRecords} parameter which is not used in the default template, but it represents the checked records from all pages. + * + */ + igGridRowSelectors(optionLiteral: 'option', optionName: "selectAllForPagingTemplate"): string; + + /** + * Custom template for "select all" overlay with paging + * Element with attribute data-rs-select-all is used for sellecting all the records + * Element with attribute data-rs-close-all is used for closing the overlay + * The default template is "
You have selected ${checked} records. Select all ${totalRecordsCount} records
" + * There is also ${allCheckedRecords} parameter which is not used in the default template, but it represents the checked records from all pages. + * + * + * @optionValue New value to be set. + */ + igGridRowSelectors(optionLiteral: 'option', optionName: "selectAllForPagingTemplate", optionValue: string): void; + + /** + * Custom template for "deselect all" overlay with paging + * Element with attribute data-rs-deselect-all is used for sellecting all the records + * Element with attribute data-rs-close-all is used for closing the overlay + * The default template is "
You have deselected ${unchecked} records. Deselect all ${totalRecordsCount} records
" + * There is also ${allCheckedRecords} parameter which is not used in the default template, but it represents the checked records from all pages. + * + */ + igGridRowSelectors(optionLiteral: 'option', optionName: "deselectAllForPagingTemplate"): string; + + /** + * Custom template for "deselect all" overlay with paging + * Element with attribute data-rs-deselect-all is used for sellecting all the records + * Element with attribute data-rs-close-all is used for closing the overlay + * The default template is "
You have deselected ${unchecked} records. Deselect all ${totalRecordsCount} records
" + * There is also ${allCheckedRecords} parameter which is not used in the default template, but it represents the checked records from all pages. + * + * + * @optionValue New value to be set. + */ + igGridRowSelectors(optionLiteral: 'option', optionName: "deselectAllForPagingTemplate", optionValue: string): void; + + /** + * Event fired after a row selector is clicked. + * Function takes arguments evt and ui. + * Use ui.row to get reference to the row the clicked row selector resides in. + * Use ui.fixedRow to get reference to the fixed row the clicked row selector resides in(if there are fixed columns). + * Use ui.rowIndex to get the index of the row the clicked row selector resides in. + * Use ui.rowKey to get the key of the row the clicked row selector resides in. + * Use ui.rowSelector to get reference to the row selector cell. + * Use ui.owner to get reference to RowSelectors. + * Use ui.grid to get reference to the grid the RowSelectors are initialized for. + */ + igGridRowSelectors(optionLiteral: 'option', optionName: "rowSelectorClicked"): RowSelectorClickedEvent; + + /** + * Event fired after a row selector is clicked. + * Function takes arguments evt and ui. + * Use ui.row to get reference to the row the clicked row selector resides in. + * Use ui.fixedRow to get reference to the fixed row the clicked row selector resides in(if there are fixed columns). + * Use ui.rowIndex to get the index of the row the clicked row selector resides in. + * Use ui.rowKey to get the key of the row the clicked row selector resides in. + * Use ui.rowSelector to get reference to the row selector cell. + * Use ui.owner to get reference to RowSelectors. + * Use ui.grid to get reference to the grid the RowSelectors are initialized for. + * + * @optionValue Define event handler function. + */ + igGridRowSelectors(optionLiteral: 'option', optionName: "rowSelectorClicked", optionValue: RowSelectorClickedEvent): void; + + /** + * Event fired when a row selector checkbox is changing. + * Function takes arguments evt and ui. + * Use ui.row to get reference to the row the clicked row selector resides in. + * Use ui.rowIndex to get the index of the row the clicked row selector resides in. + * Use ui.rowKey to get the key of the row the clicked row selector resides in. + * Use ui.rowSelector to get reference to the row selector cell. + * Use ui.owner to get reference to igRowSelectors. + * Use ui.grid to get reference to the grid the RowSelectors are initialized for. + * Use ui.currentState to get the current state of the checkbox ("on","off"). + * Use ui.newState to get the new state of the checkbox ("on","off"). + * Use ui.isHeader to check if the header check box is the one being clicked. In this case no row related args are passed. + */ + igGridRowSelectors(optionLiteral: 'option', optionName: "checkBoxStateChanging"): CheckBoxStateChangingEvent; + + /** + * Event fired when a row selector checkbox is changing. + * Function takes arguments evt and ui. + * Use ui.row to get reference to the row the clicked row selector resides in. + * Use ui.rowIndex to get the index of the row the clicked row selector resides in. + * Use ui.rowKey to get the key of the row the clicked row selector resides in. + * Use ui.rowSelector to get reference to the row selector cell. + * Use ui.owner to get reference to igRowSelectors. + * Use ui.grid to get reference to the grid the RowSelectors are initialized for. + * Use ui.currentState to get the current state of the checkbox ("on","off"). + * Use ui.newState to get the new state of the checkbox ("on","off"). + * Use ui.isHeader to check if the header check box is the one being clicked. In this case no row related args are passed. + * + * @optionValue Define event handler function. + */ + igGridRowSelectors(optionLiteral: 'option', optionName: "checkBoxStateChanging", optionValue: CheckBoxStateChangingEvent): void; + + /** + * Event fired after a row selector checkbox had changed state. + * Function takes arguments evt and ui. + * Use ui.row to get reference to the row the clicked row selector resides in. + * Use ui.rowIndex to get the index of the row the clicked row selector resides in. + * Use ui.rowKey to get the key of the row the clicked row selector resides in. + * Use ui.rowSelector to get reference to the row selector cell. + * Use ui.owner to get reference to igRowSelectors. + * Use ui.grid to get reference to the grid the RowSelectors are initialized for. + * Use ui.state to get the state of the checkbox ("on","off"). + * Use ui.isHeader to check if the header check box is the one being clicked. In this case no row related args are passed. + */ + igGridRowSelectors(optionLiteral: 'option', optionName: "checkBoxStateChanged"): CheckBoxStateChangedEvent; + + /** + * Event fired after a row selector checkbox had changed state. + * Function takes arguments evt and ui. + * Use ui.row to get reference to the row the clicked row selector resides in. + * Use ui.rowIndex to get the index of the row the clicked row selector resides in. + * Use ui.rowKey to get the key of the row the clicked row selector resides in. + * Use ui.rowSelector to get reference to the row selector cell. + * Use ui.owner to get reference to igRowSelectors. + * Use ui.grid to get reference to the grid the RowSelectors are initialized for. + * Use ui.state to get the state of the checkbox ("on","off"). + * Use ui.isHeader to check if the header check box is the one being clicked. In this case no row related args are passed. + * + * @optionValue Define event handler function. + */ + igGridRowSelectors(optionLiteral: 'option', optionName: "checkBoxStateChanged", optionValue: CheckBoxStateChangedEvent): void; + igGridRowSelectors(options: IgGridRowSelectors): JQuery; + igGridRowSelectors(optionLiteral: 'option', optionName: string): any; + igGridRowSelectors(optionLiteral: 'option', options: IgGridRowSelectors): JQuery; + igGridRowSelectors(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igGridRowSelectors(methodName: string, ...methodParams: any[]): any; +} +interface RowSelectionChangingEvent { + (event: Event, ui: RowSelectionChangingEventUIParam): void; +} + +interface RowSelectionChangingEventUIParam { + /** + * Used to get reference to GridSelection. + */ + owner?: any; + + /** + * Used to get reference to row object. + */ + row?: any; + + /** + * Used to get reference to rows object array. + */ + selectedRows?: any; + + /** + * Used to get the start index for a range row selection. + */ + startIndex?: any; + + /** + * Used to get the end index for a range row selection. + */ + endIndex?: any; +} + +interface RowSelectionChangedEvent { + (event: Event, ui: RowSelectionChangedEventUIParam): void; +} + +interface RowSelectionChangedEventUIParam { + /** + * Used to get reference to GridSelection. + */ + owner?: any; + + /** + * Used to get reference to row object. + */ + row?: any; + + /** + * Used to get reference to rows object array. + */ + selectedRows?: any; +} + +interface CellSelectionChangingEvent { + (event: Event, ui: CellSelectionChangingEventUIParam): void; +} + +interface CellSelectionChangingEventUIParam { + /** + * Used to get reference to GridSelection. + */ + owner?: any; + + /** + * Used to get reference to cell object. + */ + cell?: any; + + /** + * Used to get reference to selected cells object array. + */ + selectedCells?: any; + + /** + * Used to get the column index for the first cell in a range selection. + */ + firstColumnIndex?: any; + + /** + * Used to get the row index for the first cell in a range selection. + */ + firstRowIndex?: any; + + /** + * Used to get the column index for the last cell in a range selection. + */ + lastColumnIndex?: any; + + /** + * Used to get the row index for the last cell in a range selection. + */ + lastRowIndex?: any; +} + +interface CellSelectionChangedEvent { + (event: Event, ui: CellSelectionChangedEventUIParam): void; +} + +interface CellSelectionChangedEventUIParam { + /** + * Used to get reference to GridSelection. + */ + owner?: any; + + /** + * Used to get reference to cell object. + */ + cell?: any; + + /** + * Used to get reference to selected cells object array. + */ + selectedCells?: any; +} + +interface ActiveCellChangingEvent { + (event: Event, ui: ActiveCellChangingEventUIParam): void; +} + +interface ActiveCellChangingEventUIParam { + /** + * Used to get reference to GridSelection. + */ + owner?: any; + + /** + * Used to get reference to cell object. + */ + cell?: any; +} + +interface ActiveCellChangedEvent { + (event: Event, ui: ActiveCellChangedEventUIParam): void; +} + +interface ActiveCellChangedEventUIParam { + /** + * Used to get reference to GridSelection. + */ + owner?: any; + + /** + * Used to get reference to cell object. + */ + cell?: any; +} + +interface ActiveRowChangingEvent { + (event: Event, ui: ActiveRowChangingEventUIParam): void; +} + +interface ActiveRowChangingEventUIParam { + /** + * Used to get reference to GridSelection. + */ + owner?: any; + + /** + * Used to get reference to row object. + */ + row?: any; +} + +interface ActiveRowChangedEvent { + (event: Event, ui: ActiveRowChangedEventUIParam): void; +} + +interface ActiveRowChangedEventUIParam { + /** + * Used to get reference to GridSelection. + */ + owner?: any; + + /** + * Used to get reference to row object. + */ + row?: any; +} + +interface IgGridSelection { + /** + * Enables / Disables multiple selection of cells and rows - depending on the mode + * + */ + multipleSelection?: boolean; + + /** + * Enables / disables selection via dragging with the mouse - only applicable for cell selection + * + */ + mouseDragSelect?: boolean; + + /** + * Defines type of the selection. + * + * + * Valid values: + * "row" Defines row selection mode. + * "cell" Defines cell selection mode. + */ + mode?: string; + + /** + * Enables / disables activation of rows and cells. Activation implies ability to perform navigating through cells and rows via the keyboard, and selecting rows and cells using CTRL / SHIFT - in the way cells/rows are selected in Ms Excel + * + */ + activation?: boolean; + + /** + * If wrapAround is enabled and selection is on the first or last row or cell, then when the end user tries to go beyond that, the first/last row or cell will be selected + * + */ + wrapAround?: boolean; + + /** + * If true will basically skip going into child grids with down / up / right / left arrow keys, when in the context of hierarchical grid + * + */ + skipChildren?: boolean; + + /** + * If true multiple selection of cells is done as if CTRL is being held. the option is disregarded if mode is set to row. this option is useful for enabling multiple discountinued selection on touch environments. + * + */ + multipleCellSelectOnClick?: boolean; + + /** + * Enables / disables selection via continuous touch event - only applicable for cell selection and touch-supported environments + * + */ + touchDragSelect?: boolean; + + /** + * Enables / disables selection persistance between states. + * + */ + persist?: boolean; + + /** + * Enables / disables the ability to ctrl drag multiple selection windows when selection mode is 'cell' + * + */ + allowMultipleRangeSelection?: boolean; + + /** + * Event fired before row(s) are about to be selected (cancellable). + * Return false in order to cancel selection changing. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridSelection. + * Use ui.owner.grid to get reference to the grid. + * Use ui.row to get reference to row object. + * Use ui.row.element to get reference to row DOM element. + * Use ui.row.index to get row index. + * Use ui.row.id to get the row id if primary key is defined or persistence is enabled. + * Use ui.selectedRows to get reference to rows object array. + * Use ui.startIndex to get the start index for a range row selection. + * Use ui.endIndex to get the end index for a range row selection. + */ + rowSelectionChanging?: RowSelectionChangingEvent; + + /** + * Event fired after row(s) are selected. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridSelection. + * Use ui.owner.grid to get reference to the grid. + * Use ui.row to get reference to row object. + * Use ui.row.element to get reference to row DOM element. + * Use ui.row.index to get row index. + * Use ui.row.id to get the row id if primary key is defined or persistence is enabled. + * Use ui.selectedRows to get reference to rows object array. + */ + rowSelectionChanged?: RowSelectionChangedEvent; + + /** + * Event fired before cell(s) are about to be selected (cancellable). + * Return false in order to cancel cell selection changing. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridSelection. + * Use ui.owner.grid to get reference to the grid. + * Use ui.cell to get reference to cell object. + * Use ui.cell.element to get reference to cell DOM element. + * Use ui.cell.columnKey to get reference to column key. + * Use ui.cell.rowId to get the row id if primary key is defined or persistence is enabled. + * Use ui.cell.index to get column index. + * Use ui.cell.row to get reference to row DOM element. + * Use ui.cell.rowIndex to get row index. + * Use ui.selectedCells to get reference to selected cells object array. + * Use ui.firstColumnIndex to get the column index for the first cell in a range selection. + * Use ui.firstRowIndex to get the row index for the first cell in a range selection. + * Use ui.lastColumnIndex to get the column index for the last cell in a range selection. + * Use ui.lastRowIndex to get the row index for the last cell in a range selection. + */ + cellSelectionChanging?: CellSelectionChangingEvent; + + /** + * Event fired after cell(s) are selected. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridSelection. + * Use ui.owner.grid to get reference to the grid. + * Use ui.cell to get reference to cell object. + * Use ui.cell.element to get reference to cell DOM element. + * Use ui.cell.columnKey to get reference to column key. + * Use ui.cell.rowId to get the row id if primary key is defined or persistence is enabled. + * Use ui.cell.index to get column index. + * Use ui.cell.row to get reference to row DOM element. + * Use ui.cell.rowIndex to get row index. + * Use ui.selectedCells to get reference to selected cells object array. + */ + cellSelectionChanged?: CellSelectionChangedEvent; + + /** + * Event fired before a cell becomes active (focus style applied) (cancellable). + * Return false in order to cancel active cell changing. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridSelection. + * Use ui.owner.grid to get reference to the grid. + * Use ui.cell to get reference to cell object. + * Use ui.cell.element to get reference to cell DOM element. + * Use ui.cell.columnKey to get column key. + * Use ui.cell.rowId to get the row id if primary key is defined or persistence is enabled. + * Use ui.cell.index to get column index. + * Use ui.cell.row to get reference to row DOM element. + * Use ui.cell.rowIndex to get row index. + */ + activeCellChanging?: ActiveCellChangingEvent; + + /** + * Event fired after a cell becomes active (focus style applied). + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridSelection. + * Use ui.owner.grid to get reference to the grid. + * Use ui.cell to get reference to cell object. + * Use ui.cell.element to get reference to cell DOM element. + * Use ui.cell.columnKey to get column key. + * Use ui.cell.rowId to get the row id if primary key is defined or persistence is enabled. + * Use ui.cell.index to get column index. + * Use ui.cell.row to get reference to row DOM element. + * Use ui.cell.rowIndex to get row index. + */ + activeCellChanged?: ActiveCellChangedEvent; + + /** + * Event fired before a row becomes active (focus style applied) (cancellable). + * Return false in order to cancel active row changing. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridSelection. + * Use ui.owner.grid to get reference to the grid. + * Use ui.row to get reference to row object. + * Use ui.row.element to get reference to active row DOM element. + * Use ui.row.index to get active row index. + * Use ui.row.id to get the active row id if primary key is defined or persistence is enabled. + */ + activeRowChanging?: ActiveRowChangingEvent; + + /** + * Event fired after a row becomes active (focus style applied). + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridSelection. + * Use ui.owner.grid to get reference to the grid. + * Use ui.row to get reference to row object. + * Use ui.row.element to get reference to active row DOM element. + * Use ui.row.index to get active row index. + * Use ui.row.id to get the active row id if primary key is defined or persistence is enabled. + */ + activeRowChanged?: ActiveRowChangedEvent; + + /** + * Option for igGridSelection + */ + [optionName: string]: any; +} +interface IgGridSelectionMethods { + /** + * Destroys the selection widget. + */ + destroy(): void; + + /** + * Clears all selected cells, selected rows, active cell and active row. Also updates the UI accordingly + */ + clearSelection(): void; + + /** + * Selects a cell by row/col + * + * @param row Row index + * @param col Column index + * @param isFixed If the cell is part of the fixed or unfixed area of the grid. + */ + selectCell(row: number, col: number, isFixed?: boolean): void; + + /** + * Selects a cell by row id/column key + * + * @param id Row Id + * @param colKey Column key + */ + selectCellById(id: Object, colKey: string): void; + + /** + * Deselects a cell by row/col + * + * @param row Row index + * @param col Column index + * @param isFixed If the cell is part of the fixed or unfixed area of the grid. + */ + deselectCell(row: number, col: number, isFixed?: boolean): void; + + /** + * Deselects a cell by row id/column key + * + * @param id Row Id + * @param colKey Column key + */ + deselectCellById(id: Object, colKey: string): void; + + /** + * Selects a row by index + * + * @param index Row index + */ + selectRow(index: number): void; + + /** + * Selects a row by row id + * + * @param id Row Id + */ + selectRowById(id: Object): void; + + /** + * Deselects a row by index + * + * @param index Row index + */ + deselectRow(index: number): void; + + /** + * Deselects a row by row id + * + * @param id Row Id + */ + deselectRowById(id: Object): void; + + /** + * Returns an array of selected cells in arbitrary order where every objects has the format { element: , row: , index: , rowIndex: , columnKey: } . + * + * If multiple selection is disabled the function will return null. + */ + selectedCells(): any[]; + + /** + * Returns an array of selected rows in arbitrary order where every object has the format { element: , index: } . + * + * If multiple selection is disabled the function will return null. + */ + selectedRows(): any[]; + + /** + * Returns the currently selected cell that has the format { element: , row: , index: , rowIndex: , columnKey: }, if any. + * + * If multiple selection is enabled the function will return null. + */ + selectedCell(): Object; + + /** + * Returns the currently selected row that has the format { element: , index: }, if any. + * + * If multiple selection is enabled the function will return null. + */ + selectedRow(): Object; + + /** + * Returns the currently active (focused) cell that has the format { element: , row: , index: , rowIndex: , columnKey: }, if any. + */ + activeCell(): Object; + + /** + * Returns the currently active (focused) row that has the format { element: , index: }, if any. + */ + activeRow(): Object; +} +interface JQuery { + data(propertyName: "igGridSelection"): IgGridSelectionMethods; +} + +interface SelectionCollectionSettingsSubscribers { + /** + * Option for SelectionCollectionSettingsSubscribers + */ + [optionName: string]: any; +} + +interface SelectionCollectionSettings { + multipleSelection?: boolean; + subscribers?: SelectionCollectionSettingsSubscribers; + owner?: any; + + /** + * Option for SelectionCollectionSettings + */ + [optionName: string]: any; +} + +declare namespace Infragistics { + class SelectionCollection { + constructor(settings: SelectionCollectionSettings); + addSubscriber(subscriber: Object, owner: Object): void; + removeSubscriber(subscriberId: Object, owner: Object): void; + changeOwner(newOwner: Object): void; + isSelected(identifier: Object, forOwner: Object): void; + isActive(identifier: Object, forOwner: Object): void; + elementFromIdentifier(identifier: Object): void; + toggle(element: Object): void; + activate(identifier: Object, element: Object, suppress: Object): void; + deactivate(suppress: Object): void; + select(identifier: Object, add: Object, info: Object, suppress: Object): void; + rangeSelect(range: Object, add: Object, prevRange: Object, info: Object, suppress: Object): void; + rangeDeselect(range: Object, info: Object, suppress: Object): void; + deselect(identifier: Object, info: Object, suppress: Object): void; + deselectAll(suppress: Object): void; + clearSelection(forOwner: Object): void; + cleanAll(forOwner: Object): void; + onlyOneSelected(): void; + selectedCells(): void; + selectedRows(): void; + selectionLength(): void; + } +} +interface IgniteUIStatic { +SelectionCollection: typeof Infragistics.SelectionCollection; +} + +declare namespace Infragistics { + class SelectedRowsCollection { + constructor(settings: SelectionCollectionSettings); + isSelected(identifier: Object, forOwner: Object): void; + isActive(identifier: Object, forOwner: Object): void; + selectedDataRows(): void; + selectedRows(): void; + activeRow(): void; + elementFromIdentifier(identifier: Object): void; + elementPosition(identifier: Object, element: Object): void; + onlyOneSelected(): void; + addSubscriber(subscriber: Object, owner: Object): void; + removeSubscriber(subscriberId: Object, owner: Object): void; + changeOwner(newOwner: Object): void; + toggle(element: Object): void; + activate(identifier: Object, element: Object, suppress: Object): void; + deactivate(suppress: Object): void; + select(identifier: Object, add: Object, info: Object, suppress: Object): void; + rangeSelect(range: Object, add: Object, prevRange: Object, info: Object, suppress: Object): void; + rangeDeselect(range: Object, info: Object, suppress: Object): void; + deselect(identifier: Object, info: Object, suppress: Object): void; + deselectAll(suppress: Object): void; + clearSelection(forOwner: Object): void; + cleanAll(forOwner: Object): void; + selectedCells(): void; + selectionLength(): void; + } +} +interface IgniteUIStatic { +SelectedRowsCollection: typeof Infragistics.SelectedRowsCollection; +} + +declare namespace Infragistics { + class SelectedCellsCollection { + constructor(settings: SelectionCollectionSettings); + isSelected(identifier: Object, forOwner: Object): void; + atLeastOneSelected(rowId: Object, forOwner: Object): void; + isActive(identifier: Object, forOwner: Object): void; + selectedCells(): void; + activeCell(): void; + elementFromIdentifier(identifier: Object): void; + elementPosition(identifier: Object, element: Object): void; + onlyOneSelected(): void; + addSubscriber(subscriber: Object, owner: Object): void; + removeSubscriber(subscriberId: Object, owner: Object): void; + changeOwner(newOwner: Object): void; + toggle(element: Object): void; + activate(identifier: Object, element: Object, suppress: Object): void; + deactivate(suppress: Object): void; + select(identifier: Object, add: Object, info: Object, suppress: Object): void; + rangeSelect(range: Object, add: Object, prevRange: Object, info: Object, suppress: Object): void; + rangeDeselect(range: Object, info: Object, suppress: Object): void; + deselect(identifier: Object, info: Object, suppress: Object): void; + deselectAll(suppress: Object): void; + clearSelection(forOwner: Object): void; + cleanAll(forOwner: Object): void; + selectedRows(): void; + selectionLength(): void; + } +} +interface IgniteUIStatic { +SelectedCellsCollection: typeof Infragistics.SelectedCellsCollection; +} + +interface JQuery { + igGridSelection(methodName: "destroy"): void; + igGridSelection(methodName: "clearSelection"): void; + igGridSelection(methodName: "selectCell", row: number, col: number, isFixed?: boolean): void; + igGridSelection(methodName: "selectCellById", id: Object, colKey: string): void; + igGridSelection(methodName: "deselectCell", row: number, col: number, isFixed?: boolean): void; + igGridSelection(methodName: "deselectCellById", id: Object, colKey: string): void; + igGridSelection(methodName: "selectRow", index: number): void; + igGridSelection(methodName: "selectRowById", id: Object): void; + igGridSelection(methodName: "deselectRow", index: number): void; + igGridSelection(methodName: "deselectRowById", id: Object): void; + igGridSelection(methodName: "selectedCells"): any[]; + igGridSelection(methodName: "selectedRows"): any[]; + igGridSelection(methodName: "selectedCell"): Object; + igGridSelection(methodName: "selectedRow"): Object; + igGridSelection(methodName: "activeCell"): Object; + igGridSelection(methodName: "activeRow"): Object; + + /** + * Enables / Disables multiple selection of cells and rows - depending on the mode + * + */ + igGridSelection(optionLiteral: 'option', optionName: "multipleSelection"): boolean; + + /** + * Enables / Disables multiple selection of cells and rows - depending on the mode + * + * + * @optionValue New value to be set. + */ + igGridSelection(optionLiteral: 'option', optionName: "multipleSelection", optionValue: boolean): void; + + /** + * Enables / disables selection via dragging with the mouse - only applicable for cell selection + * + */ + igGridSelection(optionLiteral: 'option', optionName: "mouseDragSelect"): boolean; + + /** + * Enables / disables selection via dragging with the mouse - only applicable for cell selection + * + * + * @optionValue New value to be set. + */ + igGridSelection(optionLiteral: 'option', optionName: "mouseDragSelect", optionValue: boolean): void; + + /** + * Defines type of the selection. + * + */ + igGridSelection(optionLiteral: 'option', optionName: "mode"): string; + + /** + * Defines type of the selection. + * + * + * @optionValue New value to be set. + */ + igGridSelection(optionLiteral: 'option', optionName: "mode", optionValue: string): void; + + /** + * Enables / disables activation of rows and cells. Activation implies ability to perform navigating through cells and rows via the keyboard, and selecting rows and cells using CTRL / SHIFT - in the way cells/rows are selected in Ms Excel + * + */ + igGridSelection(optionLiteral: 'option', optionName: "activation"): boolean; + + /** + * Enables / disables activation of rows and cells. Activation implies ability to perform navigating through cells and rows via the keyboard, and selecting rows and cells using CTRL / SHIFT - in the way cells/rows are selected in Ms Excel + * + * + * @optionValue New value to be set. + */ + igGridSelection(optionLiteral: 'option', optionName: "activation", optionValue: boolean): void; + + /** + * If wrapAround is enabled and selection is on the first or last row or cell, then when the end user tries to go beyond that, the first/last row or cell will be selected + * + */ + igGridSelection(optionLiteral: 'option', optionName: "wrapAround"): boolean; + + /** + * If wrapAround is enabled and selection is on the first or last row or cell, then when the end user tries to go beyond that, the first/last row or cell will be selected + * + * + * @optionValue New value to be set. + */ + igGridSelection(optionLiteral: 'option', optionName: "wrapAround", optionValue: boolean): void; + + /** + * If true will basically skip going into child grids with down / up / right / left arrow keys, when in the context of hierarchical grid + * + */ + igGridSelection(optionLiteral: 'option', optionName: "skipChildren"): boolean; + + /** + * If true will basically skip going into child grids with down / up / right / left arrow keys, when in the context of hierarchical grid + * + * + * @optionValue New value to be set. + */ + igGridSelection(optionLiteral: 'option', optionName: "skipChildren", optionValue: boolean): void; + + /** + * If true multiple selection of cells is done as if CTRL is being held. the option is disregarded if mode is set to row. this option is useful for enabling multiple discountinued selection on touch environments. + * + */ + igGridSelection(optionLiteral: 'option', optionName: "multipleCellSelectOnClick"): boolean; + + /** + * If true multiple selection of cells is done as if CTRL is being held. the option is disregarded if mode is set to row. this option is useful for enabling multiple discountinued selection on touch environments. + * + * + * @optionValue New value to be set. + */ + igGridSelection(optionLiteral: 'option', optionName: "multipleCellSelectOnClick", optionValue: boolean): void; + + /** + * Enables / disables selection via continuous touch event - only applicable for cell selection and touch-supported environments + * + */ + igGridSelection(optionLiteral: 'option', optionName: "touchDragSelect"): boolean; + + /** + * Enables / disables selection via continuous touch event - only applicable for cell selection and touch-supported environments + * + * + * @optionValue New value to be set. + */ + igGridSelection(optionLiteral: 'option', optionName: "touchDragSelect", optionValue: boolean): void; + + /** + * Enables / disables selection persistance between states. + * + */ + igGridSelection(optionLiteral: 'option', optionName: "persist"): boolean; + + /** + * Enables / disables selection persistance between states. + * + * + * @optionValue New value to be set. + */ + igGridSelection(optionLiteral: 'option', optionName: "persist", optionValue: boolean): void; + + /** + * Enables / disables the ability to ctrl drag multiple selection windows when selection mode is 'cell' + * + */ + igGridSelection(optionLiteral: 'option', optionName: "allowMultipleRangeSelection"): boolean; + + /** + * Enables / disables the ability to ctrl drag multiple selection windows when selection mode is 'cell' + * + * + * @optionValue New value to be set. + */ + igGridSelection(optionLiteral: 'option', optionName: "allowMultipleRangeSelection", optionValue: boolean): void; + + /** + * Event fired before row(s) are about to be selected (cancellable). + * Return false in order to cancel selection changing. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridSelection. + * Use ui.owner.grid to get reference to the grid. + * Use ui.row to get reference to row object. + * Use ui.row.element to get reference to row DOM element. + * Use ui.row.index to get row index. + * Use ui.row.id to get the row id if primary key is defined or persistence is enabled. + * Use ui.selectedRows to get reference to rows object array. + * Use ui.startIndex to get the start index for a range row selection. + * Use ui.endIndex to get the end index for a range row selection. + */ + igGridSelection(optionLiteral: 'option', optionName: "rowSelectionChanging"): RowSelectionChangingEvent; + + /** + * Event fired before row(s) are about to be selected (cancellable). + * Return false in order to cancel selection changing. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridSelection. + * Use ui.owner.grid to get reference to the grid. + * Use ui.row to get reference to row object. + * Use ui.row.element to get reference to row DOM element. + * Use ui.row.index to get row index. + * Use ui.row.id to get the row id if primary key is defined or persistence is enabled. + * Use ui.selectedRows to get reference to rows object array. + * Use ui.startIndex to get the start index for a range row selection. + * Use ui.endIndex to get the end index for a range row selection. + * + * @optionValue Define event handler function. + */ + igGridSelection(optionLiteral: 'option', optionName: "rowSelectionChanging", optionValue: RowSelectionChangingEvent): void; + + /** + * Event fired after row(s) are selected. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridSelection. + * Use ui.owner.grid to get reference to the grid. + * Use ui.row to get reference to row object. + * Use ui.row.element to get reference to row DOM element. + * Use ui.row.index to get row index. + * Use ui.row.id to get the row id if primary key is defined or persistence is enabled. + * Use ui.selectedRows to get reference to rows object array. + */ + igGridSelection(optionLiteral: 'option', optionName: "rowSelectionChanged"): RowSelectionChangedEvent; + + /** + * Event fired after row(s) are selected. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridSelection. + * Use ui.owner.grid to get reference to the grid. + * Use ui.row to get reference to row object. + * Use ui.row.element to get reference to row DOM element. + * Use ui.row.index to get row index. + * Use ui.row.id to get the row id if primary key is defined or persistence is enabled. + * Use ui.selectedRows to get reference to rows object array. + * + * @optionValue Define event handler function. + */ + igGridSelection(optionLiteral: 'option', optionName: "rowSelectionChanged", optionValue: RowSelectionChangedEvent): void; + + /** + * Event fired before cell(s) are about to be selected (cancellable). + * Return false in order to cancel cell selection changing. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridSelection. + * Use ui.owner.grid to get reference to the grid. + * Use ui.cell to get reference to cell object. + * Use ui.cell.element to get reference to cell DOM element. + * Use ui.cell.columnKey to get reference to column key. + * Use ui.cell.rowId to get the row id if primary key is defined or persistence is enabled. + * Use ui.cell.index to get column index. + * Use ui.cell.row to get reference to row DOM element. + * Use ui.cell.rowIndex to get row index. + * Use ui.selectedCells to get reference to selected cells object array. + * Use ui.firstColumnIndex to get the column index for the first cell in a range selection. + * Use ui.firstRowIndex to get the row index for the first cell in a range selection. + * Use ui.lastColumnIndex to get the column index for the last cell in a range selection. + * Use ui.lastRowIndex to get the row index for the last cell in a range selection. + */ + igGridSelection(optionLiteral: 'option', optionName: "cellSelectionChanging"): CellSelectionChangingEvent; + + /** + * Event fired before cell(s) are about to be selected (cancellable). + * Return false in order to cancel cell selection changing. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridSelection. + * Use ui.owner.grid to get reference to the grid. + * Use ui.cell to get reference to cell object. + * Use ui.cell.element to get reference to cell DOM element. + * Use ui.cell.columnKey to get reference to column key. + * Use ui.cell.rowId to get the row id if primary key is defined or persistence is enabled. + * Use ui.cell.index to get column index. + * Use ui.cell.row to get reference to row DOM element. + * Use ui.cell.rowIndex to get row index. + * Use ui.selectedCells to get reference to selected cells object array. + * Use ui.firstColumnIndex to get the column index for the first cell in a range selection. + * Use ui.firstRowIndex to get the row index for the first cell in a range selection. + * Use ui.lastColumnIndex to get the column index for the last cell in a range selection. + * Use ui.lastRowIndex to get the row index for the last cell in a range selection. + * + * @optionValue Define event handler function. + */ + igGridSelection(optionLiteral: 'option', optionName: "cellSelectionChanging", optionValue: CellSelectionChangingEvent): void; + + /** + * Event fired after cell(s) are selected. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridSelection. + * Use ui.owner.grid to get reference to the grid. + * Use ui.cell to get reference to cell object. + * Use ui.cell.element to get reference to cell DOM element. + * Use ui.cell.columnKey to get reference to column key. + * Use ui.cell.rowId to get the row id if primary key is defined or persistence is enabled. + * Use ui.cell.index to get column index. + * Use ui.cell.row to get reference to row DOM element. + * Use ui.cell.rowIndex to get row index. + * Use ui.selectedCells to get reference to selected cells object array. + */ + igGridSelection(optionLiteral: 'option', optionName: "cellSelectionChanged"): CellSelectionChangedEvent; + + /** + * Event fired after cell(s) are selected. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridSelection. + * Use ui.owner.grid to get reference to the grid. + * Use ui.cell to get reference to cell object. + * Use ui.cell.element to get reference to cell DOM element. + * Use ui.cell.columnKey to get reference to column key. + * Use ui.cell.rowId to get the row id if primary key is defined or persistence is enabled. + * Use ui.cell.index to get column index. + * Use ui.cell.row to get reference to row DOM element. + * Use ui.cell.rowIndex to get row index. + * Use ui.selectedCells to get reference to selected cells object array. + * + * @optionValue Define event handler function. + */ + igGridSelection(optionLiteral: 'option', optionName: "cellSelectionChanged", optionValue: CellSelectionChangedEvent): void; + + /** + * Event fired before a cell becomes active (focus style applied) (cancellable). + * Return false in order to cancel active cell changing. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridSelection. + * Use ui.owner.grid to get reference to the grid. + * Use ui.cell to get reference to cell object. + * Use ui.cell.element to get reference to cell DOM element. + * Use ui.cell.columnKey to get column key. + * Use ui.cell.rowId to get the row id if primary key is defined or persistence is enabled. + * Use ui.cell.index to get column index. + * Use ui.cell.row to get reference to row DOM element. + * Use ui.cell.rowIndex to get row index. + */ + igGridSelection(optionLiteral: 'option', optionName: "activeCellChanging"): ActiveCellChangingEvent; + + /** + * Event fired before a cell becomes active (focus style applied) (cancellable). + * Return false in order to cancel active cell changing. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridSelection. + * Use ui.owner.grid to get reference to the grid. + * Use ui.cell to get reference to cell object. + * Use ui.cell.element to get reference to cell DOM element. + * Use ui.cell.columnKey to get column key. + * Use ui.cell.rowId to get the row id if primary key is defined or persistence is enabled. + * Use ui.cell.index to get column index. + * Use ui.cell.row to get reference to row DOM element. + * Use ui.cell.rowIndex to get row index. + * + * @optionValue Define event handler function. + */ + igGridSelection(optionLiteral: 'option', optionName: "activeCellChanging", optionValue: ActiveCellChangingEvent): void; + + /** + * Event fired after a cell becomes active (focus style applied). + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridSelection. + * Use ui.owner.grid to get reference to the grid. + * Use ui.cell to get reference to cell object. + * Use ui.cell.element to get reference to cell DOM element. + * Use ui.cell.columnKey to get column key. + * Use ui.cell.rowId to get the row id if primary key is defined or persistence is enabled. + * Use ui.cell.index to get column index. + * Use ui.cell.row to get reference to row DOM element. + * Use ui.cell.rowIndex to get row index. + */ + igGridSelection(optionLiteral: 'option', optionName: "activeCellChanged"): ActiveCellChangedEvent; + + /** + * Event fired after a cell becomes active (focus style applied). + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridSelection. + * Use ui.owner.grid to get reference to the grid. + * Use ui.cell to get reference to cell object. + * Use ui.cell.element to get reference to cell DOM element. + * Use ui.cell.columnKey to get column key. + * Use ui.cell.rowId to get the row id if primary key is defined or persistence is enabled. + * Use ui.cell.index to get column index. + * Use ui.cell.row to get reference to row DOM element. + * Use ui.cell.rowIndex to get row index. + * + * @optionValue Define event handler function. + */ + igGridSelection(optionLiteral: 'option', optionName: "activeCellChanged", optionValue: ActiveCellChangedEvent): void; + + /** + * Event fired before a row becomes active (focus style applied) (cancellable). + * Return false in order to cancel active row changing. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridSelection. + * Use ui.owner.grid to get reference to the grid. + * Use ui.row to get reference to row object. + * Use ui.row.element to get reference to active row DOM element. + * Use ui.row.index to get active row index. + * Use ui.row.id to get the active row id if primary key is defined or persistence is enabled. + */ + igGridSelection(optionLiteral: 'option', optionName: "activeRowChanging"): ActiveRowChangingEvent; + + /** + * Event fired before a row becomes active (focus style applied) (cancellable). + * Return false in order to cancel active row changing. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridSelection. + * Use ui.owner.grid to get reference to the grid. + * Use ui.row to get reference to row object. + * Use ui.row.element to get reference to active row DOM element. + * Use ui.row.index to get active row index. + * Use ui.row.id to get the active row id if primary key is defined or persistence is enabled. + * + * @optionValue Define event handler function. + */ + igGridSelection(optionLiteral: 'option', optionName: "activeRowChanging", optionValue: ActiveRowChangingEvent): void; + + /** + * Event fired after a row becomes active (focus style applied). + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridSelection. + * Use ui.owner.grid to get reference to the grid. + * Use ui.row to get reference to row object. + * Use ui.row.element to get reference to active row DOM element. + * Use ui.row.index to get active row index. + * Use ui.row.id to get the active row id if primary key is defined or persistence is enabled. + */ + igGridSelection(optionLiteral: 'option', optionName: "activeRowChanged"): ActiveRowChangedEvent; + + /** + * Event fired after a row becomes active (focus style applied). + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridSelection. + * Use ui.owner.grid to get reference to the grid. + * Use ui.row to get reference to row object. + * Use ui.row.element to get reference to active row DOM element. + * Use ui.row.index to get active row index. + * Use ui.row.id to get the active row id if primary key is defined or persistence is enabled. + * + * @optionValue Define event handler function. + */ + igGridSelection(optionLiteral: 'option', optionName: "activeRowChanged", optionValue: ActiveRowChangedEvent): void; + igGridSelection(options: IgGridSelection): JQuery; + igGridSelection(optionLiteral: 'option', optionName: string): any; + igGridSelection(optionLiteral: 'option', options: IgGridSelection): JQuery; + igGridSelection(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igGridSelection(methodName: string, ...methodParams: any[]): any; +} +interface ButtonOKClickEvent { + (event: Event, ui: ButtonOKClickEventUIParam): void; +} + +interface ButtonOKClickEventUIParam { + /** + * Used to get the reference to the igGridModalDialog widget. + */ + owner?: any; + + /** + * Used to get the reference to the igGridModalDialog element + */ + modalDialog?: any; +} + +interface ButtonCancelClickEvent { + (event: Event, ui: ButtonCancelClickEventUIParam): void; +} + +interface ButtonCancelClickEventUIParam { + /** + * Used to get the reference to the igGridModalDialog widget. + */ + owner?: any; + + /** + * Used to get the reference to the igGridModalDialog element + */ + modalDialog?: any; +} + +interface IgGridModalDialog { + buttonApplyText?: string; + buttonCancelText?: string; + buttonApplyTitle?: any; + buttonCancelTitle?: any; + modalDialogCaptionText?: string; + + /** + * The default modal dialog width in pixels. + */ + modalDialogWidth?: number; + + /** + * The default modal dialog height in pixels. + */ + modalDialogHeight?: number; + renderFooterButtons?: boolean; + animationDuration?: number; + buttonApplyDisabled?: boolean; + + /** + * If true and Enter is pressed - close modal dialog(NOTE: buttonApplyDisabled should be set to false - otherwise this options is ignored) + */ + closeModalDialogOnEnter?: boolean; + + /** + * Tab index to assign to containers and buttons inside the dialog + */ + tabIndex?: number; + + /** + * Event fired before the modal dialog is opened. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridModalDialog widget. + * Use ui.owner.grid to get the reference to the igGrid widget. + */ + modalDialogOpening?: ModalDialogOpeningEvent; + + /** + * Event fired after the modal dialog is already opened. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridModalDialog widget. + * Use ui.modalDialog to get the reference to the igGridModalDialog element + */ + modalDialogOpened?: ModalDialogOpenedEvent; + + /** + * Event fired every time the modal dialog changes its position. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridModalDialog widget. + * Use ui.modalDialog to get the reference to the igGridModalDialog element + * Use ui.originalPosition to get the original position of the modal dialog div as { top, left } object, relative to the page. + * Use ui.position to get the current position of the modal dialog div as { top, left } object, relative to the page. + */ + modalDialogMoving?: ModalDialogMovingEvent; + + /** + * Event fired before the modal dialog is closed. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridModalDialog widget. + * Use ui.modalDialog to get the reference to the igGridModalDialog element + */ + modalDialogClosing?: ModalDialogClosingEvent; + + /** + * Event fired after the modal dialog has been closed. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridModalDialog widget. + * Use ui.modalDialog to get the reference to the igGridModalDialog element + */ + modalDialogClosed?: ModalDialogClosedEvent; + + /** + * Event fired before the contents of the modal dialog are rendered. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridModalDialog widget. + * Use ui.modalDialog to get the reference to the igGridModalDialog element + */ + modalDialogContentsRendering?: ModalDialogContentsRenderingEvent; + + /** + * Event fired after the contents of the modal dialog are rendered. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridModalDialog widget. + * Use ui.modalDialog to get the reference to the igGridModalDialog element + */ + modalDialogContentsRendered?: ModalDialogContentsRenderedEvent; + + /** + * Event fired when the button OK/Apply is clicked + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridModalDialog widget. + * Use ui.modalDialog to get the reference to the igGridModalDialog element + */ + buttonOKClick?: ButtonOKClickEvent; + + /** + * Event fired when the button Cancel is clicked + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridModalDialog widget. + * Use ui.modalDialog to get the reference to the igGridModalDialog element + */ + buttonCancelClick?: ButtonCancelClickEvent; + + /** + * Option for igGridModalDialog + */ + [optionName: string]: any; +} +interface IgGridModalDialogMethods { + openModalDialog(): void; + closeModalDialog(accepted: Object, fromUI: Object): void; + getCaptionButtonContainer(): void; + getFooter(): void; + getContent(): void; + destroy(): void; +} +interface JQuery { + data(propertyName: "igGridModalDialog"): IgGridModalDialogMethods; +} + +interface IgEditorFilter { + /** + * Option for igEditorFilter + */ + [optionName: string]: any; +} +interface IgEditorFilterMethods { + setFocus(delay: Object, toggle: Object): void; + remove(): void; + exitEditMode(): void; + validator(): void; + hasInvalidMessage(): void; + destroy(): void; +} +interface JQuery { + data(propertyName: "igEditorFilter"): IgEditorFilterMethods; +} + +declare namespace Infragistics { + class EditorProvider { + /** + * Create handlers cache + * + * @param callbacks + * @param key + * @param editorOptions + * @param tabIndex + * @param format + * @param element + */ + createEditor(callbacks: Object, key: Object, editorOptions: Object, tabIndex: Object, format: Object, element: Object): void; + keyDown(evt: Object, ui: Object): void; + attachErrorEvents(errorShowing: Object, errorShown: Object, errorHidden: Object): void; + getEditor(): void; + refreshValue(): void; + getValue(): void; + setValue(val: Object): void; + setFocus(toggle: Object): void; + setSize(width: Object, height: Object): void; + removeFromParent(): void; + destroy(): void; + validator(): void; + validate(): void; + requestValidate(evt: Object): void; + isValid(): void; + } +} + +declare namespace Infragistics { + class EditorProviderBase { + /** + * Call parent createEditor + * + * @param callbacks + * @param key + * @param editorOptions + * @param tabIndex + * @param format + * @param element + */ + createEditor(callbacks: Object, key: Object, editorOptions: Object, tabIndex: Object, format: Object, element: Object): void; + textChanged(evt: Object, ui: Object): void; + setSize(width: Object, height: Object): void; + setFocus(): void; + removeFromParent(): void; + destroy(): void; + refreshValue(): void; + validator(): void; + isValid(): void; + keyDown(evt: Object, ui: Object): void; + attachErrorEvents(errorShowing: Object, errorShown: Object, errorHidden: Object): void; + getEditor(): void; + getValue(): void; + setValue(val: Object): void; + validate(): void; + requestValidate(evt: Object): void; + } +} + +declare namespace Infragistics { + class EditorProviderText { + createEditor(callbacks: Object, key: Object, editorOptions: Object, tabIndex: Object, format: Object, element: Object): void; + keyDown(evt: Object, ui: Object): void; + textChanged(evt: Object, ui: Object): void; + setSize(width: Object, height: Object): void; + setFocus(): void; + removeFromParent(): void; + destroy(): void; + refreshValue(): void; + validator(): void; + isValid(): void; + } +} + +declare namespace Infragistics { + class EditorProviderNumeric { + createEditor(callbacks: Object, key: Object, editorOptions: Object, tabIndex: Object, format: Object, element: Object): void; + getValue(): void; + textChanged(evt: Object, ui: Object): void; + setSize(width: Object, height: Object): void; + setFocus(): void; + removeFromParent(): void; + destroy(): void; + refreshValue(): void; + validator(): void; + isValid(): void; + } +} + +declare namespace Infragistics { + class EditorProviderCurrency { + createEditor(callbacks: Object, key: Object, editorOptions: Object, tabIndex: Object, format: Object, element: Object): void; + textChanged(evt: Object, ui: Object): void; + setSize(width: Object, height: Object): void; + setFocus(): void; + removeFromParent(): void; + destroy(): void; + refreshValue(): void; + validator(): void; + isValid(): void; + } +} + +declare namespace Infragistics { + class EditorProviderPercent { + createEditor(callbacks: Object, key: Object, editorOptions: Object, tabIndex: Object, format: Object, element: Object): void; + textChanged(evt: Object, ui: Object): void; + setSize(width: Object, height: Object): void; + setFocus(): void; + removeFromParent(): void; + destroy(): void; + refreshValue(): void; + validator(): void; + isValid(): void; + } +} + +declare namespace Infragistics { + class EditorProviderMask { + createEditor(callbacks: Object, key: Object, editorOptions: Object, tabIndex: Object, format: Object, element: Object): void; + textChanged(evt: Object, ui: Object): void; + setSize(width: Object, height: Object): void; + setFocus(): void; + removeFromParent(): void; + destroy(): void; + refreshValue(): void; + validator(): void; + isValid(): void; + } +} + +declare namespace Infragistics { + class EditorProviderDate { + createEditor(callbacks: Object, key: Object, editorOptions: Object, tabIndex: Object, format: Object, element: Object): void; + textChanged(evt: Object, ui: Object): void; + setSize(width: Object, height: Object): void; + setFocus(): void; + removeFromParent(): void; + destroy(): void; + refreshValue(): void; + validator(): void; + isValid(): void; + } +} + +declare namespace Infragistics { + class EditorProviderDatePicker { + createEditor(callbacks: Object, key: Object, editorOptions: Object, tabIndex: Object, format: Object, element: Object): void; + removeFromParent(): void; + textChanged(evt: Object, ui: Object): void; + setSize(width: Object, height: Object): void; + setFocus(): void; + destroy(): void; + refreshValue(): void; + validator(): void; + isValid(): void; + } +} + +declare namespace Infragistics { + class EditorProviderBoolean { + createEditor(callbacks: Object, key: Object, editorOptions: Object, tabIndex: Object, format: Object, element: Object): void; + valueChanged(evt: Object, ui: Object): void; + refreshValue(): void; + getValue(): void; + setValue(val: Object): void; + setSize(width: Object, height: Object): void; + removeFromParent(): void; + destroy(): void; + textChanged(evt: Object, ui: Object): void; + setFocus(): void; + validator(): void; + isValid(): void; + } +} + +declare namespace Infragistics { + class EditorProviderCombo { + createEditor(callbacks: Object, key: Object, editorOptions: Object, tabIndex: Object, format: Object, element: Object): void; + keyDown(evt: Object, ui: Object): void; + internalSelectionChanged(evt: Object, ui: Object): void; + selectionChanged(evt: Object, ui: Object): void; + refreshValue(): void; + getValue(): void; + setValue(val: Object, fire: Object): void; + setSize(width: Object, height: Object): void; + setFocus(): void; + removeFromParent(): void; + validator(): void; + destroy(): void; + isValid(): void; + attachErrorEvents(errorShowing: Object, errorShown: Object, errorHidden: Object): void; + getEditor(): void; + validate(): void; + requestValidate(evt: Object): void; + } +} + +declare namespace Infragistics { + class EditorProviderObjectCombo { + getValue(): void; + setValue(val: Object, fire: Object): void; + createEditor(callbacks: Object, key: Object, editorOptions: Object, tabIndex: Object, format: Object, element: Object): void; + keyDown(evt: Object, ui: Object): void; + internalSelectionChanged(evt: Object, ui: Object): void; + selectionChanged(evt: Object, ui: Object): void; + refreshValue(): void; + setSize(width: Object, height: Object): void; + setFocus(): void; + removeFromParent(): void; + validator(): void; + destroy(): void; + isValid(): void; + } +} + +declare namespace Infragistics { + class EditorProviderRating { + createEditor(callbacks: Object, key: Object, editorOptions: Object, tabIndex: Object, format: Object, element: Object): void; + internalValueChange(evt: Object, ui: Object): void; + valueChange(evt: Object, ui: Object): void; + setValue(val: Object): void; + setSize(width: Object, height: Object): void; + setFocus(): void; + validator(): void; + destroy(): void; + isValid(): void; + keyDown(evt: Object, ui: Object): void; + attachErrorEvents(errorShowing: Object, errorShown: Object, errorHidden: Object): void; + getEditor(): void; + refreshValue(): void; + getValue(): void; + removeFromParent(): void; + validate(): void; + requestValidate(evt: Object): void; + } +} + +declare namespace Infragistics { + class SortingExpressionsManager { + setGridInstance(grid: Object): void; + + /** + * Insert expr at the first position of the se (sorting expressions) if there are not any other expressions with flag group by + * otherwise if there are such expressions inserts after the last + * + * @param se + * @param expr + * @param feature + */ + addSortingExpression(se: Object, expr: Object, feature: Object): void; + setFormattersForSortingExprs(exprs: Object, grid: Object): void; + } +} + +interface JQuery { + igGridModalDialog(methodName: "openModalDialog"): void; + igGridModalDialog(methodName: "closeModalDialog", accepted: Object, fromUI: Object): void; + igGridModalDialog(methodName: "getCaptionButtonContainer"): void; + igGridModalDialog(methodName: "getFooter"): void; + igGridModalDialog(methodName: "getContent"): void; + igGridModalDialog(methodName: "destroy"): void; + + /** + */ + igGridModalDialog(optionLiteral: 'option', optionName: "buttonApplyText"): string; + + /** + */ + igGridModalDialog(optionLiteral: 'option', optionName: "buttonApplyText", optionValue: string): void; + + /** + */ + igGridModalDialog(optionLiteral: 'option', optionName: "buttonCancelText"): string; + + /** + */ + igGridModalDialog(optionLiteral: 'option', optionName: "buttonCancelText", optionValue: string): void; + + /** + */ + igGridModalDialog(optionLiteral: 'option', optionName: "buttonApplyTitle"): any; + + /** + */ + igGridModalDialog(optionLiteral: 'option', optionName: "buttonApplyTitle", optionValue: any): void; + + /** + */ + igGridModalDialog(optionLiteral: 'option', optionName: "buttonCancelTitle"): any; + + /** + */ + igGridModalDialog(optionLiteral: 'option', optionName: "buttonCancelTitle", optionValue: any): void; + + /** + */ + igGridModalDialog(optionLiteral: 'option', optionName: "modalDialogCaptionText"): string; + + /** + */ + igGridModalDialog(optionLiteral: 'option', optionName: "modalDialogCaptionText", optionValue: string): void; + + /** + * The default modal dialog width in pixels. + */ + igGridModalDialog(optionLiteral: 'option', optionName: "modalDialogWidth"): number; + + /** + * The default modal dialog width in pixels. + * + * @optionValue New value to be set. + */ + igGridModalDialog(optionLiteral: 'option', optionName: "modalDialogWidth", optionValue: number): void; + + /** + * The default modal dialog height in pixels. + */ + igGridModalDialog(optionLiteral: 'option', optionName: "modalDialogHeight"): number; + + /** + * The default modal dialog height in pixels. + * + * @optionValue New value to be set. + */ + igGridModalDialog(optionLiteral: 'option', optionName: "modalDialogHeight", optionValue: number): void; + + /** + */ + igGridModalDialog(optionLiteral: 'option', optionName: "renderFooterButtons"): boolean; + + /** + */ + igGridModalDialog(optionLiteral: 'option', optionName: "renderFooterButtons", optionValue: boolean): void; + + /** + */ + igGridModalDialog(optionLiteral: 'option', optionName: "animationDuration"): number; + + /** + */ + igGridModalDialog(optionLiteral: 'option', optionName: "animationDuration", optionValue: number): void; + + /** + */ + igGridModalDialog(optionLiteral: 'option', optionName: "buttonApplyDisabled"): boolean; + + /** + */ + igGridModalDialog(optionLiteral: 'option', optionName: "buttonApplyDisabled", optionValue: boolean): void; + + /** + * If true and Enter is pressed - close modal dialog(NOTE: buttonApplyDisabled should be set to false - otherwise this options is ignored) + */ + igGridModalDialog(optionLiteral: 'option', optionName: "closeModalDialogOnEnter"): boolean; + + /** + * If true and Enter is pressed - close modal dialog(NOTE: buttonApplyDisabled should be set to false - otherwise this options is ignored) + * + * @optionValue New value to be set. + */ + igGridModalDialog(optionLiteral: 'option', optionName: "closeModalDialogOnEnter", optionValue: boolean): void; + + /** + * Tab index to assign to containers and buttons inside the dialog + */ + igGridModalDialog(optionLiteral: 'option', optionName: "tabIndex"): number; + + /** + * Tab index to assign to containers and buttons inside the dialog + * + * @optionValue New value to be set. + */ + igGridModalDialog(optionLiteral: 'option', optionName: "tabIndex", optionValue: number): void; + + /** + * Event fired before the modal dialog is opened. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridModalDialog widget. + * Use ui.owner.grid to get the reference to the igGrid widget. + */ + igGridModalDialog(optionLiteral: 'option', optionName: "modalDialogOpening"): ModalDialogOpeningEvent; + + /** + * Event fired before the modal dialog is opened. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridModalDialog widget. + * Use ui.owner.grid to get the reference to the igGrid widget. + * + * @optionValue Define event handler function. + */ + igGridModalDialog(optionLiteral: 'option', optionName: "modalDialogOpening", optionValue: ModalDialogOpeningEvent): void; + + /** + * Event fired after the modal dialog is already opened. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridModalDialog widget. + * Use ui.modalDialog to get the reference to the igGridModalDialog element + */ + igGridModalDialog(optionLiteral: 'option', optionName: "modalDialogOpened"): ModalDialogOpenedEvent; + + /** + * Event fired after the modal dialog is already opened. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridModalDialog widget. + * Use ui.modalDialog to get the reference to the igGridModalDialog element + * + * @optionValue Define event handler function. + */ + igGridModalDialog(optionLiteral: 'option', optionName: "modalDialogOpened", optionValue: ModalDialogOpenedEvent): void; + + /** + * Event fired every time the modal dialog changes its position. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridModalDialog widget. + * Use ui.modalDialog to get the reference to the igGridModalDialog element + * Use ui.originalPosition to get the original position of the modal dialog div as { top, left } object, relative to the page. + * Use ui.position to get the current position of the modal dialog div as { top, left } object, relative to the page. + */ + igGridModalDialog(optionLiteral: 'option', optionName: "modalDialogMoving"): ModalDialogMovingEvent; + + /** + * Event fired every time the modal dialog changes its position. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridModalDialog widget. + * Use ui.modalDialog to get the reference to the igGridModalDialog element + * Use ui.originalPosition to get the original position of the modal dialog div as { top, left } object, relative to the page. + * Use ui.position to get the current position of the modal dialog div as { top, left } object, relative to the page. + * + * @optionValue Define event handler function. + */ + igGridModalDialog(optionLiteral: 'option', optionName: "modalDialogMoving", optionValue: ModalDialogMovingEvent): void; + + /** + * Event fired before the modal dialog is closed. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridModalDialog widget. + * Use ui.modalDialog to get the reference to the igGridModalDialog element + */ + igGridModalDialog(optionLiteral: 'option', optionName: "modalDialogClosing"): ModalDialogClosingEvent; + + /** + * Event fired before the modal dialog is closed. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridModalDialog widget. + * Use ui.modalDialog to get the reference to the igGridModalDialog element + * + * @optionValue Define event handler function. + */ + igGridModalDialog(optionLiteral: 'option', optionName: "modalDialogClosing", optionValue: ModalDialogClosingEvent): void; + + /** + * Event fired after the modal dialog has been closed. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridModalDialog widget. + * Use ui.modalDialog to get the reference to the igGridModalDialog element + */ + igGridModalDialog(optionLiteral: 'option', optionName: "modalDialogClosed"): ModalDialogClosedEvent; + + /** + * Event fired after the modal dialog has been closed. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridModalDialog widget. + * Use ui.modalDialog to get the reference to the igGridModalDialog element + * + * @optionValue Define event handler function. + */ + igGridModalDialog(optionLiteral: 'option', optionName: "modalDialogClosed", optionValue: ModalDialogClosedEvent): void; + + /** + * Event fired before the contents of the modal dialog are rendered. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridModalDialog widget. + * Use ui.modalDialog to get the reference to the igGridModalDialog element + */ + igGridModalDialog(optionLiteral: 'option', optionName: "modalDialogContentsRendering"): ModalDialogContentsRenderingEvent; + + /** + * Event fired before the contents of the modal dialog are rendered. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridModalDialog widget. + * Use ui.modalDialog to get the reference to the igGridModalDialog element + * + * @optionValue Define event handler function. + */ + igGridModalDialog(optionLiteral: 'option', optionName: "modalDialogContentsRendering", optionValue: ModalDialogContentsRenderingEvent): void; + + /** + * Event fired after the contents of the modal dialog are rendered. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridModalDialog widget. + * Use ui.modalDialog to get the reference to the igGridModalDialog element + */ + igGridModalDialog(optionLiteral: 'option', optionName: "modalDialogContentsRendered"): ModalDialogContentsRenderedEvent; + + /** + * Event fired after the contents of the modal dialog are rendered. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridModalDialog widget. + * Use ui.modalDialog to get the reference to the igGridModalDialog element + * + * @optionValue Define event handler function. + */ + igGridModalDialog(optionLiteral: 'option', optionName: "modalDialogContentsRendered", optionValue: ModalDialogContentsRenderedEvent): void; + + /** + * Event fired when the button OK/Apply is clicked + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridModalDialog widget. + * Use ui.modalDialog to get the reference to the igGridModalDialog element + */ + igGridModalDialog(optionLiteral: 'option', optionName: "buttonOKClick"): ButtonOKClickEvent; + + /** + * Event fired when the button OK/Apply is clicked + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridModalDialog widget. + * Use ui.modalDialog to get the reference to the igGridModalDialog element + * + * @optionValue Define event handler function. + */ + igGridModalDialog(optionLiteral: 'option', optionName: "buttonOKClick", optionValue: ButtonOKClickEvent): void; + + /** + * Event fired when the button Cancel is clicked + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridModalDialog widget. + * Use ui.modalDialog to get the reference to the igGridModalDialog element + */ + igGridModalDialog(optionLiteral: 'option', optionName: "buttonCancelClick"): ButtonCancelClickEvent; + + /** + * Event fired when the button Cancel is clicked + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the igGridModalDialog widget. + * Use ui.modalDialog to get the reference to the igGridModalDialog element + * + * @optionValue Define event handler function. + */ + igGridModalDialog(optionLiteral: 'option', optionName: "buttonCancelClick", optionValue: ButtonCancelClickEvent): void; + igGridModalDialog(options: IgGridModalDialog): JQuery; + igGridModalDialog(optionLiteral: 'option', optionName: string): any; + igGridModalDialog(optionLiteral: 'option', options: IgGridModalDialog): JQuery; + igGridModalDialog(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igGridModalDialog(methodName: string, ...methodParams: any[]): any; +} +interface JQuery { + igEditorFilter(methodName: "setFocus", delay: Object, toggle: Object): void; + igEditorFilter(methodName: "remove"): void; + igEditorFilter(methodName: "exitEditMode"): void; + igEditorFilter(methodName: "validator"): void; + igEditorFilter(methodName: "hasInvalidMessage"): void; + igEditorFilter(methodName: "destroy"): void; + igEditorFilter(options: IgEditorFilter): JQuery; + igEditorFilter(optionLiteral: 'option', optionName: string): any; + igEditorFilter(optionLiteral: 'option', options: IgEditorFilter): JQuery; + igEditorFilter(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igEditorFilter(methodName: string, ...methodParams: any[]): any; +} +interface IgGridSortingColumnSetting { + /** + * Identifies the grid column by key. Either key or index must be set in every column setting. + * + */ + columnKey?: string; + + /** + * Identifies the grid column by index. Either key or index must be set in every column setting. + * + */ + columnIndex?: number; + + /** + * This will be the first sort direction when the column hasn't been sorted before. + * + * + * Valid values: + * "asc" The first sort of the column data will be in ascending order. + * "desc" The first sort of the column data will be in descending order. + */ + firstSortDirection?: string; + + /** + * The current (or default) sort direction. If this setting is specified, the column will be rendered sorted according to this option. + * + * + * Valid values: + * "asc" The initial sort of the column data will be in ascending order. + * "desc" The initial sort of the column data will be in descending order. + */ + currentSortDirection?: string; + + /** + * Enables/disables sorting on the specified column. By default all columns are sortable. + * + */ + allowSorting?: boolean; + + /** + * Reference to a function (string or function) used for custom comparison. + * The function accepts the following arguments: + * val1 - the first value to compare, + * val2 - the second value to compare, + * recordsData (optional) - an object having three properties: fieldName - the name of the sorted field; record1 - first record to compare; record2 - second record to compare. + * The function returns the following numeric value: + * 0 - indicating that values are equal, + * 1 - indicating that val1 > val2, + * -1 - indicating that val1 < val2. + * + * + * Valid values: + * "string" The name of the function as a string located in the global window object. + * "function" Function which will be used for custom comparison. + */ + compareFunc?: string|Function; + + /** + * Option for IgGridSortingColumnSetting + */ + [optionName: string]: any; +} + +interface ColumnSortingEvent { + (event: Event, ui: ColumnSortingEventUIParam): void; +} + +interface ColumnSortingEventUIParam { + /** + * Used to get reference to GridSorting. + */ + owner?: any; + + /** + * Used to get column key. + */ + columnKey?: any; + + /** + * Used to get sorting direction. + */ + direction?: any; + + /** + * Used to get sorting expressions. + */ + newExpressions?: any; +} + +interface ColumnSortedEvent { + (event: Event, ui: ColumnSortedEventUIParam): void; +} + +interface ColumnSortedEventUIParam { + /** + * Used to get reference to GridSorting. + */ + owner?: any; + + /** + * Used to get column key. + */ + columnKey?: any; + + /** + * Used to get sorting direction. + */ + direction?: any; + + /** + * Used to get sorted expressions. + */ + expressions?: any; +} + +interface ModalDialogSortingChangedEvent { + (event: Event, ui: ModalDialogSortingChangedEventUIParam): void; +} + +interface ModalDialogSortingChangedEventUIParam { + /** + * Used to get the reference to the GridSorting widget. + */ + owner?: any; + + /** + * Used to get a reference to the modal dialog element. This is a jQuery object. + */ + modalDialogElement?: any; + + /** + * Used to get the column key + */ + columnKey?: any; + + /** + * Used to get whether column should be ascending or not. If true it should be ascending + */ + isAsc?: any; +} + +interface ModalDialogButtonUnsortClickEvent { + (event: Event, ui: ModalDialogButtonUnsortClickEventUIParam): void; +} + +interface ModalDialogButtonUnsortClickEventUIParam { + /** + * Used to get the reference to the GridSorting widget. + */ + owner?: any; + + /** + * Used to get a reference to the modal dialog element. This is a jQuery object. + */ + modalDialogElement?: any; + + /** + * Used to get the column key + */ + columnKey?: any; +} + +interface ModalDialogSortClickEvent { + (event: Event, ui: ModalDialogSortClickEventUIParam): void; +} + +interface ModalDialogSortClickEventUIParam { + /** + * Used to get the reference to the GridSorting widget. + */ + owner?: any; + + /** + * Used to get a reference to the modal dialog element. This is a jQuery object. + */ + modalDialogElement?: any; + + /** + * Used to get the column key + */ + columnKey?: any; +} + +interface IgGridSorting { + /** + * Defines local or remote sorting operations. + * + * + * Valid values: + * "remote" Sorting is performed remotely as a server-side operation. + * "local" Sorting is performed locally by the [$.ig.DataSource](ig.datasource) component. + */ + type?: string; + + /** + * Enables or disables the case sensitivity of the sorting. Works only for [local](ui.iggridsorting#options:type) sorting. + * + */ + caseSensitive?: boolean; + + /** + * Enables/disables special styling for sorted columns. If false, sorted column cells will not have any special sort-related styling. + * + */ + applySortedColumnCss?: boolean; + + /** + * URL param name which specifies how sorting expressions will be encoded in the URL. Uses OData conventions. ex: ?sort(col1)=asc + * + */ + sortUrlKey?: string; + + /** + * URL param value for ascending type of sorting. Uses OData conventions. Example: ?sort(col1)=asc + * + */ + sortUrlKeyAscValue?: string; + + /** + * URL param value for descending type of sorting. Uses OData conventions. Example: ?sort(col1)=desc + * + */ + sortUrlKeyDescValue?: string; + + /** + * Defines single column sorting or multiple column sorting. + * + * + * Valid values: + * "single" Only a single column can be sorted. Previously sorted columns will not preserve their sorting upon sorting a new column. + * "multi" If enabled, previous sorted state for columns won't be cleared + */ + mode?: string; + + /** + * Custom sort function(or name of the function as a string) accepting three parameters - the data to be sorted, an array of data source field definitions, and the direction to sort with (optional). The function should return the sorted data array. + * + */ + customSortFunction?: Function; + + /** + * Specifies which direction to use on the first click / keydown, if the column is sorted for the first time. + * + * + * Valid values: + * "ascending" The first sort of the column data will be in ascending order. + * "descending" The first sort of the column data will be in descending order. + */ + firstSortDirection?: string; + + /** + * Custom sorted column tooltip in [igTemplating](http://www.igniteui.com/help/igtemplating-overview) format + */ + sortedColumnTooltip?: string; + + /** + * Specifies whether sorting to be applied immediately when click sort/unsort columns when using the multiple sorting dialog. When it is false Apply button shows and sorting is applied when the button is clicked. + * + */ + modalDialogSortOnClick?: boolean; + + /** + * Specifies sortby button text for each unsorted column in multiple sorting dialog. + * + */ + modalDialogSortByButtonText?: string; + + /** + * Specifies sortby button label for each unsorted column in multiple sorting dialog. + * + */ + modalDialogResetButtonLabel?: string; + + /** + * Specifies caption for each descending sorted column in multiple sorting dialog. + * + */ + modalDialogCaptionButtonDesc?: string; + + /** + * Specifies caption for each ascending sorted column in multiple sorting dialog. + * + */ + modalDialogCaptionButtonAsc?: string; + + /** + * Specifies caption for unsort button in multiple sorting dialog. + * + */ + modalDialogCaptionButtonUnsort?: string; + + /** + * Specifies width of multiple sorting dialog. + * + * + * Valid values: + * "string" Specifies the width in pixels as a string ("300px"). + * "number" Specifies the width in pixels as a number (300) + */ + modalDialogWidth?: string|number; + + /** + * Specifies height of multiple sorting dialog. + * + * + * Valid values: + * "string" The widget height can be set in pixels (px) and percentage (%). + * "number" The widget height can be set in pixels as a number. + */ + modalDialogHeight?: string|number; + + /** + * Specifies time of milliseconds for animation duration to show/hide modal dialog. + * + */ + modalDialogAnimationDuration?: number; + + /** + * Specifies the text of the feature chooser sorting button. + * + */ + featureChooserText?: string; + + /** + * Custom unsorted column tooltip in [igTemplating](http://www.igniteui.com/help/igtemplating-overview) format. + * + */ + unsortedColumnTooltip?: string; + + /** + * A list of custom column settings that specify custom sorting settings for a specific column (whether sorting is enabled / disabled, default sort direction, first sort direction, etc.). + * + */ + columnSettings?: IgGridSortingColumnSetting[]; + + /** + * Specifies caption text for multiple sorting dialog. + * + */ + modalDialogCaptionText?: string; + + /** + * Specifies text of button which apply changes in modal dialog. + * + */ + modalDialogButtonApplyText?: string; + + /** + * Specifies text of button which cancels the changes in the advanced sorting modal dialog. + * + */ + modalDialogButtonCancelText?: string; + + /** + * Specifies the text shown in the feature chooser item for sorting in ascending order (displayed only on touch environment). + * + */ + featureChooserSortAsc?: string; + + /** + * Specifies the text shown in the feature chooser item for sorting in descending order (displayed only on touch environment). + * + */ + featureChooserSortDesc?: string; + + /** + * Enables/disables sorting persistence when the grid is rebound. + * + */ + persist?: boolean; + + /** + * Controls containment behavior of multiple sorting dialog. + * + * owner The multi sorting dialog will be draggable only in the grid area + * window The multi sorting dialog will be draggable in the whole window area + */ + sortingDialogContainment?: string; + + /** + * Name of the dialog widget to be used. It should inherit from $.ui.igGridModalDialog. + * + */ + dialogWidget?: string; + + /** + * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. + * + */ + inherit?: boolean; + + /** + * Event fired before sorting is invoked for a certain column. + * Return false in order to cancel column sorting. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridSorting. + * Use ui.owner.grid to get reference to grid. + * Use ui.columnKey to get column key. + * Use ui.direction to get sorting direction. + * Use ui.newExpressions to get sorting expressions. + */ + columnSorting?: ColumnSortingEvent; + + /** + * Event fired after the column has already been sorted and data - re-rendered. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridSorting. + * Use ui.owner.grid to get reference to grid. + * Use ui.columnKey to get column key. + * Use ui.direction to get sorting direction. + * Use ui.expressions to get sorted expressions. + */ + columnSorted?: ColumnSortedEvent; + + /** + * Event fired before the modal dialog is opened. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridSorting widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnChooserElement to get a reference to the modal dialog element. This is a jQuery object. + */ + modalDialogOpening?: ModalDialogOpeningEvent; + + /** + * Event fired after the modal dialog is already opened. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridSorting widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + */ + modalDialogOpened?: ModalDialogOpenedEvent; + + /** + * Event fired every time the modal dialog changes its position. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridSorting widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + * Use ui.originalPosition to get the original position of the modal dialog div as { top, left } object, relative to the page. + * Use ui.position to get the current position of the modal dialog div as { top, left } object, relative to the page. + */ + modalDialogMoving?: ModalDialogMovingEvent; + + /** + * Event fired before the modal dialog is closed. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridSorting widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + */ + modalDialogClosing?: ModalDialogClosingEvent; + + /** + * Event fired after the modal dialog has been closed. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridSorting widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + */ + modalDialogClosed?: ModalDialogClosedEvent; + + /** + * Event fired before the contents of the modal dialog are rendered. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridSorting widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + */ + modalDialogContentsRendering?: ModalDialogContentsRenderingEvent; + + /** + * Event fired after the contents of the modal dialog are rendered. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridSorting widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + */ + modalDialogContentsRendered?: ModalDialogContentsRenderedEvent; + + /** + * Event fired when sorting of column is changed in modal dialog. Column should be sorted + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridSorting widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + * Use ui.columnKey to get the column key + * Use ui.isAsc to get whether column should be ascending or not. If true it should be ascending + */ + modalDialogSortingChanged?: ModalDialogSortingChangedEvent; + + /** + * Event fired when button to unsort column is clicked in modal dialog + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridSorting widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + * Use ui.columnKey to get the column key + */ + modalDialogButtonUnsortClick?: ModalDialogButtonUnsortClickEvent; + + /** + * Event fired when column(which is not sorted) is clicked to be sorted in modal dialog + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridSorting widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + * Use ui.columnKey to get the column key + */ + modalDialogSortClick?: ModalDialogSortClickEvent; + + /** + * Event fired when button Apply in modal dialog is clicked + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridSorting widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + * Use ui.columnsToSort to get array of columns which should be sorted - array of objects of sort order - Asc/Desc and columnIdentifier + */ + modalDialogButtonApplyClick?: ModalDialogButtonApplyClickEvent; + + /** + * Event fired when the button to reset sorting is clicked. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridSorting widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + */ + modalDialogButtonResetClick?: ModalDialogButtonResetClickEvent; + + /** + * Option for igGridSorting + */ + [optionName: string]: any; +} +interface IgGridSortingMethods { + /** + * Sorts the data in a grid column and updates the UI. + * + * @param index Column key (string) or index (number) - for multi-row grid only column key can be used. Specifies the column which we want to sort. If the mode is multiple, previous sorting states are not cleared. + * @param direction Specifies sorting direction (ascending or descending) + * @param header + */ + sortColumn(index: Object, direction: Object, header: Object): void; + + /** + * Sorts the data in grid columns and updates the UI.\ + */ + sortMultiple(): void; + + /** + * Removes current sorting(for all sorted columns) and updates the UI. + */ + clearSorting(): void; + + /** + * Removes sorting for the grid column with the specified columnKey/columnIndex and updates the UI. + * + * @param index Column key (string) or index (number) - for multi-row grid only column key can be used. Specifies the column for which we want to remove sorting. If the mode is multiple, previous sorting states are not cleared. + * @param header - if specified client events should be fired + */ + unsortColumn(index: Object, header: Object): void; + + /** + * Destroys the sorting feature. Unbinds events, removes added sorting elements, etc. + */ + destroy(): void; + + /** + * Opens the multiple sorting dialog. + */ + openMultipleSortingDialog(): void; + + /** + * Closes the multiple sorting dialog. + */ + closeMultipleSortingDialog(): void; + + /** + * Renders content of multiple sorting dialog - sorted and unsorted columns. + * + * @param isToCallEvents + */ + renderMultipleSortingDialogContent(isToCallEvents: Object): void; + + /** + * Remove clear button for multiple sorting dialog + */ + removeDialogClearButton(): void; +} +interface JQuery { + data(propertyName: "igGridSorting"): IgGridSortingMethods; +} + +interface JQuery { + igGridSorting(methodName: "sortColumn", index: Object, direction: Object, header: Object): void; + igGridSorting(methodName: "sortMultiple"): void; + igGridSorting(methodName: "clearSorting"): void; + igGridSorting(methodName: "unsortColumn", index: Object, header: Object): void; + igGridSorting(methodName: "destroy"): void; + igGridSorting(methodName: "openMultipleSortingDialog"): void; + igGridSorting(methodName: "closeMultipleSortingDialog"): void; + igGridSorting(methodName: "renderMultipleSortingDialogContent", isToCallEvents: Object): void; + igGridSorting(methodName: "removeDialogClearButton"): void; + + /** + * Defines local or remote sorting operations. + * + */ + igGridSorting(optionLiteral: 'option', optionName: "type"): string; + + /** + * Defines local or remote sorting operations. + * + * + * @optionValue New value to be set. + */ + igGridSorting(optionLiteral: 'option', optionName: "type", optionValue: string): void; + + /** + * Enables or disables the case sensitivity of the sorting. Works only for [local](ui.iggridsorting#options:type) sorting. + * + */ + igGridSorting(optionLiteral: 'option', optionName: "caseSensitive"): boolean; + + /** + * Enables or disables the case sensitivity of the sorting. Works only for [local](ui.iggridsorting#options:type) sorting. + * + * + * @optionValue New value to be set. + */ + igGridSorting(optionLiteral: 'option', optionName: "caseSensitive", optionValue: boolean): void; + + /** + * Enables/disables special styling for sorted columns. If false, sorted column cells will not have any special sort-related styling. + * + */ + igGridSorting(optionLiteral: 'option', optionName: "applySortedColumnCss"): boolean; + + /** + * Enables/disables special styling for sorted columns. If false, sorted column cells will not have any special sort-related styling. + * + * + * @optionValue New value to be set. + */ + igGridSorting(optionLiteral: 'option', optionName: "applySortedColumnCss", optionValue: boolean): void; + + /** + * URL param name which specifies how sorting expressions will be encoded in the URL. Uses OData conventions. ex: ?sort(col1)=asc + * + */ + igGridSorting(optionLiteral: 'option', optionName: "sortUrlKey"): string; + + /** + * URL param name which specifies how sorting expressions will be encoded in the URL. Uses OData conventions. ex: ?sort(col1)=asc + * + * + * @optionValue New value to be set. + */ + igGridSorting(optionLiteral: 'option', optionName: "sortUrlKey", optionValue: string): void; + + /** + * URL param value for ascending type of sorting. Uses OData conventions. Example: ?sort(col1)=asc + * + */ + igGridSorting(optionLiteral: 'option', optionName: "sortUrlKeyAscValue"): string; + + /** + * URL param value for ascending type of sorting. Uses OData conventions. Example: ?sort(col1)=asc + * + * + * @optionValue New value to be set. + */ + igGridSorting(optionLiteral: 'option', optionName: "sortUrlKeyAscValue", optionValue: string): void; + + /** + * URL param value for descending type of sorting. Uses OData conventions. Example: ?sort(col1)=desc + * + */ + igGridSorting(optionLiteral: 'option', optionName: "sortUrlKeyDescValue"): string; + + /** + * URL param value for descending type of sorting. Uses OData conventions. Example: ?sort(col1)=desc + * + * + * @optionValue New value to be set. + */ + igGridSorting(optionLiteral: 'option', optionName: "sortUrlKeyDescValue", optionValue: string): void; + + /** + * Defines single column sorting or multiple column sorting. + * + */ + igGridSorting(optionLiteral: 'option', optionName: "mode"): string; + + /** + * Defines single column sorting or multiple column sorting. + * + * + * @optionValue New value to be set. + */ + igGridSorting(optionLiteral: 'option', optionName: "mode", optionValue: string): void; + + /** + * Custom sort function(or name of the function as a string) accepting three parameters - the data to be sorted, an array of data source field definitions, and the direction to sort with (optional). The function should return the sorted data array. + * + */ + igGridSorting(optionLiteral: 'option', optionName: "customSortFunction"): Function; + + /** + * Custom sort function(or name of the function as a string) accepting three parameters - the data to be sorted, an array of data source field definitions, and the direction to sort with (optional). The function should return the sorted data array. + * + * + * @optionValue New value to be set. + */ + igGridSorting(optionLiteral: 'option', optionName: "customSortFunction", optionValue: Function): void; + + /** + * Gets which direction to use on the first click / keydown, if the column is sorted for the first time. + * + */ + igGridSorting(optionLiteral: 'option', optionName: "firstSortDirection"): string; + + /** + * Sets which direction to use on the first click / keydown, if the column is sorted for the first time. + * + * + * @optionValue New value to be set. + */ + igGridSorting(optionLiteral: 'option', optionName: "firstSortDirection", optionValue: string): void; + + /** + * Custom sorted column tooltip in [igTemplating](http://www.igniteui.com/help/igtemplating-overview) format + */ + igGridSorting(optionLiteral: 'option', optionName: "sortedColumnTooltip"): string; + + /** + * Custom sorted column tooltip in [igTemplating](http://www.igniteui.com/help/igtemplating-overview) format + * + * @optionValue New value to be set. + */ + igGridSorting(optionLiteral: 'option', optionName: "sortedColumnTooltip", optionValue: string): void; + + /** + * Gets whether sorting to be applied immediately when click sort/unsort columns when using the multiple sorting dialog. When it is false Apply button shows and sorting is applied when the button is clicked. + * + */ + igGridSorting(optionLiteral: 'option', optionName: "modalDialogSortOnClick"): boolean; + + /** + * Sets whether sorting to be applied immediately when click sort/unsort columns when using the multiple sorting dialog. When it is false Apply button shows and sorting is applied when the button is clicked. + * + * + * @optionValue New value to be set. + */ + igGridSorting(optionLiteral: 'option', optionName: "modalDialogSortOnClick", optionValue: boolean): void; + + /** + * Gets sortby button text for each unsorted column in multiple sorting dialog. + * + */ + igGridSorting(optionLiteral: 'option', optionName: "modalDialogSortByButtonText"): string; + + /** + * Sets sortby button text for each unsorted column in multiple sorting dialog. + * + * + * @optionValue New value to be set. + */ + igGridSorting(optionLiteral: 'option', optionName: "modalDialogSortByButtonText", optionValue: string): void; + + /** + * Gets sortby button label for each unsorted column in multiple sorting dialog. + * + */ + igGridSorting(optionLiteral: 'option', optionName: "modalDialogResetButtonLabel"): string; + + /** + * Sets sortby button label for each unsorted column in multiple sorting dialog. + * + * + * @optionValue New value to be set. + */ + igGridSorting(optionLiteral: 'option', optionName: "modalDialogResetButtonLabel", optionValue: string): void; + + /** + * Gets caption for each descending sorted column in multiple sorting dialog. + * + */ + igGridSorting(optionLiteral: 'option', optionName: "modalDialogCaptionButtonDesc"): string; + + /** + * Sets caption for each descending sorted column in multiple sorting dialog. + * + * + * @optionValue New value to be set. + */ + igGridSorting(optionLiteral: 'option', optionName: "modalDialogCaptionButtonDesc", optionValue: string): void; + + /** + * Gets caption for each ascending sorted column in multiple sorting dialog. + * + */ + igGridSorting(optionLiteral: 'option', optionName: "modalDialogCaptionButtonAsc"): string; + + /** + * Sets caption for each ascending sorted column in multiple sorting dialog. + * + * + * @optionValue New value to be set. + */ + igGridSorting(optionLiteral: 'option', optionName: "modalDialogCaptionButtonAsc", optionValue: string): void; + + /** + * Gets caption for unsort button in multiple sorting dialog. + * + */ + igGridSorting(optionLiteral: 'option', optionName: "modalDialogCaptionButtonUnsort"): string; + + /** + * Sets caption for unsort button in multiple sorting dialog. + * + * + * @optionValue New value to be set. + */ + igGridSorting(optionLiteral: 'option', optionName: "modalDialogCaptionButtonUnsort", optionValue: string): void; + + /** + * Gets width of multiple sorting dialog. + * + */ + igGridSorting(optionLiteral: 'option', optionName: "modalDialogWidth"): string|number; + + /** + * Sets width of multiple sorting dialog. + * + * + * @optionValue New value to be set. + */ + igGridSorting(optionLiteral: 'option', optionName: "modalDialogWidth", optionValue: string|number): void; + + /** + * Gets height of multiple sorting dialog. + * + */ + igGridSorting(optionLiteral: 'option', optionName: "modalDialogHeight"): string|number; + + /** + * Sets height of multiple sorting dialog. + * + * + * @optionValue New value to be set. + */ + igGridSorting(optionLiteral: 'option', optionName: "modalDialogHeight", optionValue: string|number): void; + + /** + * Gets time of milliseconds for animation duration to show/hide modal dialog. + * + */ + igGridSorting(optionLiteral: 'option', optionName: "modalDialogAnimationDuration"): number; + + /** + * Sets time of milliseconds for animation duration to show/hide modal dialog. + * + * + * @optionValue New value to be set. + */ + igGridSorting(optionLiteral: 'option', optionName: "modalDialogAnimationDuration", optionValue: number): void; + + /** + * Gets the text of the feature chooser sorting button. + * + */ + igGridSorting(optionLiteral: 'option', optionName: "featureChooserText"): string; + + /** + * Sets the text of the feature chooser sorting button. + * + * + * @optionValue New value to be set. + */ + igGridSorting(optionLiteral: 'option', optionName: "featureChooserText", optionValue: string): void; + + /** + * Custom unsorted column tooltip in [igTemplating](http://www.igniteui.com/help/igtemplating-overview) format. + * + */ + igGridSorting(optionLiteral: 'option', optionName: "unsortedColumnTooltip"): string; + + /** + * Custom unsorted column tooltip in [igTemplating](http://www.igniteui.com/help/igtemplating-overview) format. + * + * + * @optionValue New value to be set. + */ + igGridSorting(optionLiteral: 'option', optionName: "unsortedColumnTooltip", optionValue: string): void; + + /** + * A list of custom column settings that specify custom sorting settings for a specific column (whether sorting is enabled / disabled, default sort direction, first sort direction, etc.). + * + */ + igGridSorting(optionLiteral: 'option', optionName: "columnSettings"): IgGridSortingColumnSetting[]; + + /** + * A list of custom column settings that specify custom sorting settings for a specific column (whether sorting is enabled / disabled, default sort direction, first sort direction, etc.). + * + * + * @optionValue New value to be set. + */ + igGridSorting(optionLiteral: 'option', optionName: "columnSettings", optionValue: IgGridSortingColumnSetting[]): void; + + /** + * Gets caption text for multiple sorting dialog. + * + */ + igGridSorting(optionLiteral: 'option', optionName: "modalDialogCaptionText"): string; + + /** + * Sets caption text for multiple sorting dialog. + * + * + * @optionValue New value to be set. + */ + igGridSorting(optionLiteral: 'option', optionName: "modalDialogCaptionText", optionValue: string): void; + + /** + * Gets text of button which apply changes in modal dialog. + * + */ + igGridSorting(optionLiteral: 'option', optionName: "modalDialogButtonApplyText"): string; + + /** + * Sets text of button which apply changes in modal dialog. + * + * + * @optionValue New value to be set. + */ + igGridSorting(optionLiteral: 'option', optionName: "modalDialogButtonApplyText", optionValue: string): void; + + /** + * Gets text of button which cancels the changes in the advanced sorting modal dialog. + * + */ + igGridSorting(optionLiteral: 'option', optionName: "modalDialogButtonCancelText"): string; + + /** + * Sets text of button which cancels the changes in the advanced sorting modal dialog. + * + * + * @optionValue New value to be set. + */ + igGridSorting(optionLiteral: 'option', optionName: "modalDialogButtonCancelText", optionValue: string): void; + + /** + * Gets the text shown in the feature chooser item for sorting in ascending order (displayed only on touch environment). + * + */ + igGridSorting(optionLiteral: 'option', optionName: "featureChooserSortAsc"): string; + + /** + * Sets the text shown in the feature chooser item for sorting in ascending order (displayed only on touch environment). + * + * + * @optionValue New value to be set. + */ + igGridSorting(optionLiteral: 'option', optionName: "featureChooserSortAsc", optionValue: string): void; + + /** + * Gets the text shown in the feature chooser item for sorting in descending order (displayed only on touch environment). + * + */ + igGridSorting(optionLiteral: 'option', optionName: "featureChooserSortDesc"): string; + + /** + * Sets the text shown in the feature chooser item for sorting in descending order (displayed only on touch environment). + * + * + * @optionValue New value to be set. + */ + igGridSorting(optionLiteral: 'option', optionName: "featureChooserSortDesc", optionValue: string): void; + + /** + * Enables/disables sorting persistence when the grid is rebound. + * + */ + igGridSorting(optionLiteral: 'option', optionName: "persist"): boolean; + + /** + * Enables/disables sorting persistence when the grid is rebound. + * + * + * @optionValue New value to be set. + */ + igGridSorting(optionLiteral: 'option', optionName: "persist", optionValue: boolean): void; + + /** + * Controls containment behavior of multiple sorting dialog. + * + * owner The multi sorting dialog will be draggable only in the grid area + * window The multi sorting dialog will be draggable in the whole window area + */ + igGridSorting(optionLiteral: 'option', optionName: "sortingDialogContainment"): string; + + /** + * Controls containment behavior of multiple sorting dialog. + * + * owner The multi sorting dialog will be draggable only in the grid area + * window The multi sorting dialog will be draggable in the whole window area + * + * @optionValue New value to be set. + */ + igGridSorting(optionLiteral: 'option', optionName: "sortingDialogContainment", optionValue: string): void; + + /** + * Name of the dialog widget to be used. It should inherit from $.ui.igGridModalDialog. + * + */ + igGridSorting(optionLiteral: 'option', optionName: "dialogWidget"): string; + + /** + * Name of the dialog widget to be used. It should inherit from $.ui.igGridModalDialog. + * + * + * @optionValue New value to be set. + */ + igGridSorting(optionLiteral: 'option', optionName: "dialogWidget", optionValue: string): void; + + /** + * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. + * + */ + igGridSorting(optionLiteral: 'option', optionName: "inherit"): boolean; + + /** + * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. + * + * + * @optionValue New value to be set. + */ + igGridSorting(optionLiteral: 'option', optionName: "inherit", optionValue: boolean): void; + + /** + * Event fired before sorting is invoked for a certain column. + * Return false in order to cancel column sorting. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridSorting. + * Use ui.owner.grid to get reference to grid. + * Use ui.columnKey to get column key. + * Use ui.direction to get sorting direction. + * Use ui.newExpressions to get sorting expressions. + */ + igGridSorting(optionLiteral: 'option', optionName: "columnSorting"): ColumnSortingEvent; + + /** + * Event fired before sorting is invoked for a certain column. + * Return false in order to cancel column sorting. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridSorting. + * Use ui.owner.grid to get reference to grid. + * Use ui.columnKey to get column key. + * Use ui.direction to get sorting direction. + * Use ui.newExpressions to get sorting expressions. + * + * @optionValue Define event handler function. + */ + igGridSorting(optionLiteral: 'option', optionName: "columnSorting", optionValue: ColumnSortingEvent): void; + + /** + * Event fired after the column has already been sorted and data - re-rendered. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridSorting. + * Use ui.owner.grid to get reference to grid. + * Use ui.columnKey to get column key. + * Use ui.direction to get sorting direction. + * Use ui.expressions to get sorted expressions. + */ + igGridSorting(optionLiteral: 'option', optionName: "columnSorted"): ColumnSortedEvent; + + /** + * Event fired after the column has already been sorted and data - re-rendered. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridSorting. + * Use ui.owner.grid to get reference to grid. + * Use ui.columnKey to get column key. + * Use ui.direction to get sorting direction. + * Use ui.expressions to get sorted expressions. + * + * @optionValue Define event handler function. + */ + igGridSorting(optionLiteral: 'option', optionName: "columnSorted", optionValue: ColumnSortedEvent): void; + + /** + * Event fired before the modal dialog is opened. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridSorting widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnChooserElement to get a reference to the modal dialog element. This is a jQuery object. + */ + igGridSorting(optionLiteral: 'option', optionName: "modalDialogOpening"): ModalDialogOpeningEvent; + + /** + * Event fired before the modal dialog is opened. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridSorting widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnChooserElement to get a reference to the modal dialog element. This is a jQuery object. + * + * @optionValue Define event handler function. + */ + igGridSorting(optionLiteral: 'option', optionName: "modalDialogOpening", optionValue: ModalDialogOpeningEvent): void; + + /** + * Event fired after the modal dialog is already opened. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridSorting widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + */ + igGridSorting(optionLiteral: 'option', optionName: "modalDialogOpened"): ModalDialogOpenedEvent; + + /** + * Event fired after the modal dialog is already opened. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridSorting widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + * + * @optionValue Define event handler function. + */ + igGridSorting(optionLiteral: 'option', optionName: "modalDialogOpened", optionValue: ModalDialogOpenedEvent): void; + + /** + * Event fired every time the modal dialog changes its position. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridSorting widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + * Use ui.originalPosition to get the original position of the modal dialog div as { top, left } object, relative to the page. + * Use ui.position to get the current position of the modal dialog div as { top, left } object, relative to the page. + */ + igGridSorting(optionLiteral: 'option', optionName: "modalDialogMoving"): ModalDialogMovingEvent; + + /** + * Event fired every time the modal dialog changes its position. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridSorting widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + * Use ui.originalPosition to get the original position of the modal dialog div as { top, left } object, relative to the page. + * Use ui.position to get the current position of the modal dialog div as { top, left } object, relative to the page. + * + * @optionValue Define event handler function. + */ + igGridSorting(optionLiteral: 'option', optionName: "modalDialogMoving", optionValue: ModalDialogMovingEvent): void; + + /** + * Event fired before the modal dialog is closed. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridSorting widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + */ + igGridSorting(optionLiteral: 'option', optionName: "modalDialogClosing"): ModalDialogClosingEvent; + + /** + * Event fired before the modal dialog is closed. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridSorting widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + * + * @optionValue Define event handler function. + */ + igGridSorting(optionLiteral: 'option', optionName: "modalDialogClosing", optionValue: ModalDialogClosingEvent): void; + + /** + * Event fired after the modal dialog has been closed. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridSorting widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + */ + igGridSorting(optionLiteral: 'option', optionName: "modalDialogClosed"): ModalDialogClosedEvent; + + /** + * Event fired after the modal dialog has been closed. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridSorting widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + * + * @optionValue Define event handler function. + */ + igGridSorting(optionLiteral: 'option', optionName: "modalDialogClosed", optionValue: ModalDialogClosedEvent): void; + + /** + * Event fired before the contents of the modal dialog are rendered. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridSorting widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + */ + igGridSorting(optionLiteral: 'option', optionName: "modalDialogContentsRendering"): ModalDialogContentsRenderingEvent; + + /** + * Event fired before the contents of the modal dialog are rendered. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridSorting widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + * + * @optionValue Define event handler function. + */ + igGridSorting(optionLiteral: 'option', optionName: "modalDialogContentsRendering", optionValue: ModalDialogContentsRenderingEvent): void; + + /** + * Event fired after the contents of the modal dialog are rendered. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridSorting widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + */ + igGridSorting(optionLiteral: 'option', optionName: "modalDialogContentsRendered"): ModalDialogContentsRenderedEvent; + + /** + * Event fired after the contents of the modal dialog are rendered. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridSorting widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + * + * @optionValue Define event handler function. + */ + igGridSorting(optionLiteral: 'option', optionName: "modalDialogContentsRendered", optionValue: ModalDialogContentsRenderedEvent): void; + + /** + * Event fired when sorting of column is changed in modal dialog. Column should be sorted + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridSorting widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + * Use ui.columnKey to get the column key + * Use ui.isAsc to get whether column should be ascending or not. If true it should be ascending + */ + igGridSorting(optionLiteral: 'option', optionName: "modalDialogSortingChanged"): ModalDialogSortingChangedEvent; + + /** + * Event fired when sorting of column is changed in modal dialog. Column should be sorted + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridSorting widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + * Use ui.columnKey to get the column key + * Use ui.isAsc to get whether column should be ascending or not. If true it should be ascending + * + * @optionValue Define event handler function. + */ + igGridSorting(optionLiteral: 'option', optionName: "modalDialogSortingChanged", optionValue: ModalDialogSortingChangedEvent): void; + + /** + * Event fired when button to unsort column is clicked in modal dialog + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridSorting widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + * Use ui.columnKey to get the column key + */ + igGridSorting(optionLiteral: 'option', optionName: "modalDialogButtonUnsortClick"): ModalDialogButtonUnsortClickEvent; + + /** + * Event fired when button to unsort column is clicked in modal dialog + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridSorting widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + * Use ui.columnKey to get the column key + * + * @optionValue Define event handler function. + */ + igGridSorting(optionLiteral: 'option', optionName: "modalDialogButtonUnsortClick", optionValue: ModalDialogButtonUnsortClickEvent): void; + + /** + * Event fired when column(which is not sorted) is clicked to be sorted in modal dialog + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridSorting widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + * Use ui.columnKey to get the column key + */ + igGridSorting(optionLiteral: 'option', optionName: "modalDialogSortClick"): ModalDialogSortClickEvent; + + /** + * Event fired when column(which is not sorted) is clicked to be sorted in modal dialog + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridSorting widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + * Use ui.columnKey to get the column key + * + * @optionValue Define event handler function. + */ + igGridSorting(optionLiteral: 'option', optionName: "modalDialogSortClick", optionValue: ModalDialogSortClickEvent): void; + + /** + * Event fired when button Apply in modal dialog is clicked + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridSorting widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + * Use ui.columnsToSort to get array of columns which should be sorted - array of objects of sort order - Asc/Desc and columnIdentifier + */ + igGridSorting(optionLiteral: 'option', optionName: "modalDialogButtonApplyClick"): ModalDialogButtonApplyClickEvent; + + /** + * Event fired when button Apply in modal dialog is clicked + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridSorting widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + * Use ui.columnsToSort to get array of columns which should be sorted - array of objects of sort order - Asc/Desc and columnIdentifier + * + * @optionValue Define event handler function. + */ + igGridSorting(optionLiteral: 'option', optionName: "modalDialogButtonApplyClick", optionValue: ModalDialogButtonApplyClickEvent): void; + + /** + * Event fired when the button to reset sorting is clicked. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridSorting widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + */ + igGridSorting(optionLiteral: 'option', optionName: "modalDialogButtonResetClick"): ModalDialogButtonResetClickEvent; + + /** + * Event fired when the button to reset sorting is clicked. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridSorting widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + * + * @optionValue Define event handler function. + */ + igGridSorting(optionLiteral: 'option', optionName: "modalDialogButtonResetClick", optionValue: ModalDialogButtonResetClickEvent): void; + igGridSorting(options: IgGridSorting): JQuery; + igGridSorting(optionLiteral: 'option', optionName: string): any; + igGridSorting(optionLiteral: 'option', options: IgGridSorting): JQuery; + igGridSorting(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igGridSorting(methodName: string, ...methodParams: any[]): any; +} +interface IgGridSummariesColumnSettingSummaryOperand { + /** + * Text of the summary method which is shown in summary cell + * + */ + rowDisplayLabel?: string; + + /** + * Set type of summary operand + * + * + * Valid values: + * "count" calculate count of result rows for the specified column + * "min" calculate min of result rows for the specified column + * "max" calculate max of result rows for the specified column + * "sum" calculate sum of result rows for the specified column + * "avg" calculate average of result rows for the specified column + * "custom" calculate custom function (specified by summaryCalculator property) of result rows for the specified column + */ + type?: string; + + /** + * If it is false the summary operand will be shown in dropdown but it will not be made calculation + * + */ + active?: boolean; + + /** + * Name of the custom summary function which should be executed when type is custom + * + */ + summaryCalculator?: string; + + /** + * Specifies the order of elements in dropdown. It is recommended to set order of custom operands and to be greater or equal to 5 + * + */ + order?: number; + + /** + * Specifies the number of digits after the decimal point for result of the current summary operand. This property will be ignored when isGridFormatter is true + * + */ + decimalDisplay?: number; + + /** + * Specifies whether to be used grid formatter for result for the current summary operand. + * + */ + isGridFormatter?: boolean; + + /** + * Option for IgGridSummariesColumnSettingSummaryOperand + */ + [optionName: string]: any; +} + +interface IgGridSummariesColumnSetting { + /** + * Enables disables summaries for the column + * + */ + allowSummaries?: boolean; + + /** + * Column key. This is a required property in every column setting if columnIndex is not set + * + */ + columnKey?: string; + + /** + * Column index. Can be used in place of column key. The preferred way of populating a column setting is to always use the column keys as identifiers + * + */ + columnIndex?: number; + + /** + * Check defaultSummaryOperands + * + */ + summaryOperands?: IgGridSummariesColumnSettingSummaryOperand[]; + + /** + * Option for IgGridSummariesColumnSetting + */ + [optionName: string]: any; +} + +interface SummariesCalculatingEvent { + (event: Event, ui: SummariesCalculatingEventUIParam): void; +} + +interface SummariesCalculatingEventUIParam { + /** + * Used to access the igGridSummaries widget object. + */ + owner?: any; +} + +interface SummariesCalculatedEvent { + (event: Event, ui: SummariesCalculatedEventUIParam): void; +} + +interface SummariesCalculatedEventUIParam { + /** + * Used to get data for calculated summaries + */ + data?: any; + + /** + * Used to access the igGridSummaries widget object. + */ + owner?: any; +} + +interface SummariesMethodSelectionChangedEvent { + (event: Event, ui: SummariesMethodSelectionChangedEventUIParam): void; +} + +interface SummariesMethodSelectionChangedEventUIParam { + /** + * Used to get column key of the column where it is changed selection of summary method + */ + columnKey?: any; + + /** + * Used to get whether method is selected or not + */ + isSelected?: any; + + /** + * Used to get summary method name + */ + methodName?: any; + + /** + * Used to access the igGridSummaries widget object. + */ + owner?: any; +} + +interface SummariesTogglingEvent { + (event: Event, ui: SummariesTogglingEventUIParam): void; +} + +interface SummariesTogglingEventUIParam { + /** + * Used to get whether summaries are shown or not. + */ + isToShow?: any; + + /** + * Used to access the igGridSummaries widget object. + */ + owner?: any; +} + +interface SummariesToggledEvent { + (event: Event, ui: SummariesToggledEventUIParam): void; +} + +interface SummariesToggledEventUIParam { + /** + * Used to get whether summaries are shown or not. + */ + isToShow?: any; + + /** + * Used to access the igGridSummaries widget object. + */ + owner?: any; +} + +interface DropDownOKClickedEvent { + (event: Event, ui: DropDownOKClickedEventUIParam): void; +} + +interface DropDownOKClickedEventUIParam { + /** + * Used to get column key for which OK button is clicked. + */ + columnKey?: any; + + /** + * Used to get data about which summary methods are(not) selected. Format of event data is {type: "min", active: false}; + */ + eventData?: any; + + /** + * Used to access the igGridSummaries widget object. + */ + owner?: any; +} + +interface DropDownCancelClickedEvent { + (event: Event, ui: DropDownCancelClickedEventUIParam): void; +} + +interface DropDownCancelClickedEventUIParam { + /** + * Used to get column key for which Cancel button is clicked. + */ + columnKey?: any; + + /** + * Used to access the igGridSummaries widget object. + */ + owner?: any; +} + +interface IgGridSummaries { + /** + * type of summaries calculating. + * + * + * Valid values: + * "remote" when it is remote summaries calculations are made on the server + * "local" When it is local calculations are made on the client + */ + type?: string; + + /** + * Text of the button OK in the summaries dropdown + * + */ + dialogButtonOKText?: string; + + /** + * Text of the button Cancel in the summaries dropdown + * + */ + dialogButtonCancelText?: string; + + /** + * Specifies when calculations are made. + * + * + * Valid values: + * "onselect" summaries are updated when checkbox is checked/unchecked + * "okcancelbuttons" summaries are updated only when OK button is clicked + */ + calculateRenderMode?: string; + + /** + * Get or set text that is shown in the feature chooser dropdown when summaries are hidden + * + */ + featureChooserText?: string; + + /** + * Get or set text that is shown in the feauture chooser dropdown when summaries are shown + * + */ + featureChooserTextHide?: string; + + /** + * Specifies how compact the summaries are rendered. + * When true indicates that the summaries may be rendered compactly, even mixing different summaries on the same line. + * False ensures that each summary type is occupying a separate line. + * Auto will use True if the maximum number of visible summaries is one or less and False otherwise. + * + */ + compactRenderingMode?: any; + + /** + * The number of digits after the decimal point. If gridFormatter is True then this option is ignored. + * + */ + defaultDecimalDisplay?: number; + + /** + * Show header button icon in the header cell. On click - shows/hides summaries. If false then summary icon should not be shown in the feature chooser(if shown). + * + */ + showSummariesButton?: boolean; + + /** + * Result key by which we get data from the result returned by remote data source. + * + */ + summariesResponseKey?: string; + + /** + * Set key in GET Request for summaries - used only when type is remote + * + */ + summaryExprUrlKey?: string; + + /** + * Function reference - it is called when data is retrieved from the data source + * + */ + callee?: Function; + + /** + * Height of the dropdown in pixels + * + */ + dropDownHeight?: number; + + /** + * Width of the dropdown in pixels + * + */ + dropDownWidth?: number; + + /** + * Show/hide footer button(on click show/hide dropdown) + * + */ + showDropDownButton?: boolean; + + /** + * Determines when the summary values are calculated when type is local + * + * + * Valid values: + * "priortofilteringandpaging" summaries are calculated prior to filtering and paging + * "afterfilteringbeforepaging" summaries are calculated after filtering and before paging + * "afterfilteringandpaging" summaries are calculated after filtering and paging + */ + summaryExecution?: string; + + /** + * Dropdown animation duration + * + */ + dropDownDialogAnimationDuration?: number; + + /** + * Empty text template to be shown for empty cells + * + */ + emptyCellText?: string; + + /** + * Tooltip text for header cell button + * + */ + summariesHeaderButtonTooltip?: string; + + /** + * Result template for summary result(shown in table cell) + * + */ + resultTemplate?: string; + + /** + * If this property is enabled and in summaryOperand isGridFormatter is undefined then use grid formatting for cells + * + */ + isGridFormatter?: boolean; + + /** + * a reference or name of a javascript function - renders summary cell in grid footer.(if not set it is used default render function) It takes 3 parameters - methodName(summary method), columnKey, data(summary data which should be rendered) + * + */ + renderSummaryCellFunc?: string|Object; + + /** + * A list of column settings that specifies custom summaries options per column basis + * + */ + columnSettings?: IgGridSummariesColumnSetting[]; + + /** + * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. + */ + inherit?: boolean; + + /** + * Event fired before drop down is opened for a specific column summary + * Return false in order to cancel opening the drop down. + * Function takes arguments evt and ui. + * Use ui.columnKey to get column key of the column where drop down is opening. + * Use ui.owner in order to access the igGridSummaries widget object. + */ + dropDownOpening?: DropDownOpeningEvent; + + /** + * Event fired after the summaries dropdown is opened for a specific column + * Function takes arguments evt and ui. + * Use ui.columnKey to get column key of the column where drop down is shown. + * Use ui.owner in order to access the igGridSummaries widget object. + */ + dropDownOpened?: DropDownOpenedEvent; + + /** + * Event fired before the dropdown for a summary column starts closing + * Return false in order to cancel closing the drop down. + * Function takes arguments evt and ui. + * Use ui.columnKey to get column key of the column where drop down is closing. + * Use ui.owner in order to access the igGridSummaries widget object. + */ + dropDownClosing?: DropDownClosingEvent; + + /** + * Event fired after the dropdown for a summary column is closed + * Function takes arguments evt and ui. + * Use ui.columnKey to get column key of the column where drop down is closing. + * Use ui.owner in order to access the igGridSummaries widget object. + */ + dropDownClosed?: DropDownClosedEvent; + + /** + * Event fired before summaries calculations are made + * Return false in order to cancel calculation of summaries. + * Function takes arguments evt and ui. + * Use ui.owner in order to access the igGridSummaries widget object. + */ + summariesCalculating?: SummariesCalculatingEvent; + + /** + * Event fired after summaries calculation are completely made + * Function takes arguments evt and ui. + * Use ui.data to get data for calculated summaries + * Use ui.owner in order to access the igGridSummaries widget object. + */ + summariesCalculated?: SummariesCalculatedEvent; + + /** + * Event fired when user selects/deselects summary method from checkbox + * Function takes arguments evt and ui. + * Use ui.columnKey to get column key of the column where it is changed selection of summary method + * Use ui.isSelected to get whether method is selected or not + * Use ui.methodName to get summary method name + * Use ui.owner in order to access the igGridSummaries widget object. + */ + summariesMethodSelectionChanged?: SummariesMethodSelectionChangedEvent; + + /** + * Event is fired bofore summary rows start toggling + * Return false in order to cancel showing/hiding of summaries. + * Function takes arguments evt and ui. + * Use ui.isToShow to get whether summaries are shown or not. + * Use ui.owner in order to access the igGridSummaries widget object. + */ + summariesToggling?: SummariesTogglingEvent; + + /** + * Event is fired after summary rows are toggled + * Function takes arguments evt and ui. + * Use ui.isToShow to get whether summaries are shown or not. + * Use ui.owner in order to access the igGridSummaries widget object. + */ + summariesToggled?: SummariesToggledEvent; + + /** + * Event is fired when OK button is clicked in drop down + * Function takes arguments evt and ui. + * Use ui.columnKey to get column key for which OK button is clicked. + * Use ui.eventData to get data about which summary methods are(not) selected. Format of event data is {type: "min", active: false}; + * Use ui.owner in order to access the igGridSummaries widget object. + */ + dropDownOKClicked?: DropDownOKClickedEvent; + + /** + * Event is fired when Cancel button is clicked in drop down. + * Function takes arguments evt and ui. + * Use ui.columnKey to get column key for which Cancel button is clicked. + * Use ui.owner in order to access the igGridSummaries widget object. + */ + dropDownCancelClicked?: DropDownCancelClickedEvent; + + /** + * Option for igGridSummaries + */ + [optionName: string]: any; +} +interface IgGridSummariesMethods { + destroy(): void; + + /** + * Returns whether summaries rows are hidden + */ + isSummariesRowsHidden(): void; + + /** + * Calculate summaries + */ + calculateSummaries(): void; + + /** + * Remove all summaries dropdown buttons. + */ + clearAllFooterIcons(): void; + + /** + * Toggle drop down + * + * @param columnKey toggle drop down for the column with the specified key + * @param event event object. Its data should contain current columnKey, isAnimating, buttonId + */ + toggleDropDown(columnKey: string, event: Object): void; + + /** + * Show/Hide dialog + * + * @param $dialog jQuery object representation of dropdown div element + */ + showHideDialog($dialog: Object): void; + + /** + * Toggle summaries rows + * + * @param isToShow Specifies whether to show or not summaries + * @param isInternalCall Optional parameter.Specifies whether this function is called internally by the widget. + */ + toggleSummariesRows(isToShow: boolean, isInternalCall: boolean): void; + + /** + * Toggles the checkstate of a checkbox if checkboxMode is not set to off, otherwise does nothing. + * + * @param $checkbox Specifies the jQuery object of the checkbox. + */ + toggleCheckstate($checkbox: Object): void; + + /** + * Select/Unselect specified checkbox + * + * @param $checkbox Specifies the jQuery object for checkbox + * @param isToSelect Specify whether to select or not checkbox + */ + selectCheckBox($checkbox: Object, isToSelect: boolean): void; + + /** + * Summary calculate the whole data for the specified column key, columnMethods and dataType (used when datasource is remote and dataType is date) + * + * @param ck ColumnKey + * @param columnMethods Array of column methods objects + * @param data Object which represents result + represents dataType for the current column + * @param dataType + */ + calculateSummaryColumn(ck: string, columnMethods: any[], data: Object, dataType: Object): void; + + /** + * Return a JQUERY object which holds all summaries for all columns + */ + summaryCollection(): void; + + /** + * Return a JQUERY object which holds all summaries for column with the specified column key + * + * @param columnKey + */ + summariesFor(columnKey: Object): void; +} +interface JQuery { + data(propertyName: "igGridSummaries"): IgGridSummariesMethods; +} + +interface JQuery { + igGridSummaries(methodName: "destroy"): void; + igGridSummaries(methodName: "isSummariesRowsHidden"): void; + igGridSummaries(methodName: "calculateSummaries"): void; + igGridSummaries(methodName: "clearAllFooterIcons"): void; + igGridSummaries(methodName: "toggleDropDown", columnKey: string, event: Object): void; + igGridSummaries(methodName: "showHideDialog", $dialog: Object): void; + igGridSummaries(methodName: "toggleSummariesRows", isToShow: boolean, isInternalCall: boolean): void; + igGridSummaries(methodName: "toggleCheckstate", $checkbox: Object): void; + igGridSummaries(methodName: "selectCheckBox", $checkbox: Object, isToSelect: boolean): void; + igGridSummaries(methodName: "calculateSummaryColumn", ck: string, columnMethods: any[], data: Object, dataType: Object): void; + igGridSummaries(methodName: "summaryCollection"): void; + igGridSummaries(methodName: "summariesFor", columnKey: Object): void; + + /** + * Type of summaries calculating. + * + */ + igGridSummaries(optionLiteral: 'option', optionName: "type"): string; + + /** + * Type of summaries calculating. + * + * + * @optionValue New value to be set. + */ + igGridSummaries(optionLiteral: 'option', optionName: "type", optionValue: string): void; + + /** + * Text of the button OK in the summaries dropdown + * + */ + igGridSummaries(optionLiteral: 'option', optionName: "dialogButtonOKText"): string; + + /** + * Text of the button OK in the summaries dropdown + * + * + * @optionValue New value to be set. + */ + igGridSummaries(optionLiteral: 'option', optionName: "dialogButtonOKText", optionValue: string): void; + + /** + * Text of the button Cancel in the summaries dropdown + * + */ + igGridSummaries(optionLiteral: 'option', optionName: "dialogButtonCancelText"): string; + + /** + * Text of the button Cancel in the summaries dropdown + * + * + * @optionValue New value to be set. + */ + igGridSummaries(optionLiteral: 'option', optionName: "dialogButtonCancelText", optionValue: string): void; + + /** + * Gets when calculations are made. + * + */ + igGridSummaries(optionLiteral: 'option', optionName: "calculateRenderMode"): string; + + /** + * Sets when calculations are made. + * + * + * @optionValue New value to be set. + */ + igGridSummaries(optionLiteral: 'option', optionName: "calculateRenderMode", optionValue: string): void; + + /** + * Get or set text that is shown in the feature chooser dropdown when summaries are hidden + * + */ + igGridSummaries(optionLiteral: 'option', optionName: "featureChooserText"): string; + + /** + * Get or set text that is shown in the feature chooser dropdown when summaries are hidden + * + * + * @optionValue New value to be set. + */ + igGridSummaries(optionLiteral: 'option', optionName: "featureChooserText", optionValue: string): void; + + /** + * Get or set text that is shown in the feauture chooser dropdown when summaries are shown + * + */ + igGridSummaries(optionLiteral: 'option', optionName: "featureChooserTextHide"): string; + + /** + * Get or set text that is shown in the feauture chooser dropdown when summaries are shown + * + * + * @optionValue New value to be set. + */ + igGridSummaries(optionLiteral: 'option', optionName: "featureChooserTextHide", optionValue: string): void; + + /** + * Gets how compact the summaries are rendered. + * When true indicates that the summaries may be rendered compactly, even mixing different summaries on the same line. + * False ensures that each summary type is occupying a separate line. + * Auto will use True if the maximum number of visible summaries is one or less and False otherwise. + * + */ + igGridSummaries(optionLiteral: 'option', optionName: "compactRenderingMode"): any; + + /** + * Sets how compact the summaries are rendered. + * When true indicates that the summaries may be rendered compactly, even mixing different summaries on the same line. + * False ensures that each summary type is occupying a separate line. + * Auto will use True if the maximum number of visible summaries is one or less and False otherwise. + * + * + * @optionValue New value to be set. + */ + igGridSummaries(optionLiteral: 'option', optionName: "compactRenderingMode", optionValue: any): void; + + /** + * The number of digits after the decimal point. If gridFormatter is True then this option is ignored. + * + */ + igGridSummaries(optionLiteral: 'option', optionName: "defaultDecimalDisplay"): number; + + /** + * The number of digits after the decimal point. If gridFormatter is True then this option is ignored. + * + * + * @optionValue New value to be set. + */ + igGridSummaries(optionLiteral: 'option', optionName: "defaultDecimalDisplay", optionValue: number): void; + + /** + * Show header button icon in the header cell. On click - shows/hides summaries. If false then summary icon should not be shown in the feature chooser(if shown). + * + */ + igGridSummaries(optionLiteral: 'option', optionName: "showSummariesButton"): boolean; + + /** + * Show header button icon in the header cell. On click - shows/hides summaries. If false then summary icon should not be shown in the feature chooser(if shown). + * + * + * @optionValue New value to be set. + */ + igGridSummaries(optionLiteral: 'option', optionName: "showSummariesButton", optionValue: boolean): void; + + /** + * Result key by which we get data from the result returned by remote data source. + * + */ + igGridSummaries(optionLiteral: 'option', optionName: "summariesResponseKey"): string; + + /** + * Result key by which we get data from the result returned by remote data source. + * + * + * @optionValue New value to be set. + */ + igGridSummaries(optionLiteral: 'option', optionName: "summariesResponseKey", optionValue: string): void; + + /** + * Set key in GET Request for summaries - used only when type is remote + * + */ + igGridSummaries(optionLiteral: 'option', optionName: "summaryExprUrlKey"): string; + + /** + * Set key in GET Request for summaries - used only when type is remote + * + * + * @optionValue New value to be set. + */ + igGridSummaries(optionLiteral: 'option', optionName: "summaryExprUrlKey", optionValue: string): void; + + /** + * Function reference - it is called when data is retrieved from the data source + * + */ + igGridSummaries(optionLiteral: 'option', optionName: "callee"): Function; + + /** + * Function reference - it is called when data is retrieved from the data source + * + * + * @optionValue New value to be set. + */ + igGridSummaries(optionLiteral: 'option', optionName: "callee", optionValue: Function): void; + + /** + * Height of the dropdown in pixels + * + */ + igGridSummaries(optionLiteral: 'option', optionName: "dropDownHeight"): number; + + /** + * Height of the dropdown in pixels + * + * + * @optionValue New value to be set. + */ + igGridSummaries(optionLiteral: 'option', optionName: "dropDownHeight", optionValue: number): void; + + /** + * Width of the dropdown in pixels + * + */ + igGridSummaries(optionLiteral: 'option', optionName: "dropDownWidth"): number; + + /** + * Width of the dropdown in pixels + * + * + * @optionValue New value to be set. + */ + igGridSummaries(optionLiteral: 'option', optionName: "dropDownWidth", optionValue: number): void; + + /** + * Show/hide footer button(on click show/hide dropdown) + * + */ + igGridSummaries(optionLiteral: 'option', optionName: "showDropDownButton"): boolean; + + /** + * Show/hide footer button(on click show/hide dropdown) + * + * + * @optionValue New value to be set. + */ + igGridSummaries(optionLiteral: 'option', optionName: "showDropDownButton", optionValue: boolean): void; + + /** + * Determines when the summary values are calculated when type is local + * + */ + igGridSummaries(optionLiteral: 'option', optionName: "summaryExecution"): string; + + /** + * Determines when the summary values are calculated when type is local + * + * + * @optionValue New value to be set. + */ + igGridSummaries(optionLiteral: 'option', optionName: "summaryExecution", optionValue: string): void; + + /** + * Dropdown animation duration + * + */ + igGridSummaries(optionLiteral: 'option', optionName: "dropDownDialogAnimationDuration"): number; + + /** + * Dropdown animation duration + * + * + * @optionValue New value to be set. + */ + igGridSummaries(optionLiteral: 'option', optionName: "dropDownDialogAnimationDuration", optionValue: number): void; + + /** + * Empty text template to be shown for empty cells + * + */ + igGridSummaries(optionLiteral: 'option', optionName: "emptyCellText"): string; + + /** + * Empty text template to be shown for empty cells + * + * + * @optionValue New value to be set. + */ + igGridSummaries(optionLiteral: 'option', optionName: "emptyCellText", optionValue: string): void; + + /** + * Tooltip text for header cell button + * + */ + igGridSummaries(optionLiteral: 'option', optionName: "summariesHeaderButtonTooltip"): string; + + /** + * Tooltip text for header cell button + * + * + * @optionValue New value to be set. + */ + igGridSummaries(optionLiteral: 'option', optionName: "summariesHeaderButtonTooltip", optionValue: string): void; + + /** + * Result template for summary result(shown in table cell) + * + */ + igGridSummaries(optionLiteral: 'option', optionName: "resultTemplate"): string; + + /** + * Result template for summary result(shown in table cell) + * + * + * @optionValue New value to be set. + */ + igGridSummaries(optionLiteral: 'option', optionName: "resultTemplate", optionValue: string): void; + + /** + * If this property is enabled and in summaryOperand isGridFormatter is undefined then use grid formatting for cells + * + */ + igGridSummaries(optionLiteral: 'option', optionName: "isGridFormatter"): boolean; + + /** + * If this property is enabled and in summaryOperand isGridFormatter is undefined then use grid formatting for cells + * + * + * @optionValue New value to be set. + */ + igGridSummaries(optionLiteral: 'option', optionName: "isGridFormatter", optionValue: boolean): void; + + /** + * A reference or name of a javascript function - renders summary cell in grid footer.(if not set it is used default render function) It takes 3 parameters - methodName(summary method), columnKey, data(summary data which should be rendered) + * + */ + igGridSummaries(optionLiteral: 'option', optionName: "renderSummaryCellFunc"): string|Object; + + /** + * A reference or name of a javascript function - renders summary cell in grid footer.(if not set it is used default render function) It takes 3 parameters - methodName(summary method), columnKey, data(summary data which should be rendered) + * + * + * @optionValue New value to be set. + */ + igGridSummaries(optionLiteral: 'option', optionName: "renderSummaryCellFunc", optionValue: string|Object): void; + + /** + * A list of column settings that specifies custom summaries options per column basis + * + */ + igGridSummaries(optionLiteral: 'option', optionName: "columnSettings"): IgGridSummariesColumnSetting[]; + + /** + * A list of column settings that specifies custom summaries options per column basis + * + * + * @optionValue New value to be set. + */ + igGridSummaries(optionLiteral: 'option', optionName: "columnSettings", optionValue: IgGridSummariesColumnSetting[]): void; + + /** + * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. + */ + igGridSummaries(optionLiteral: 'option', optionName: "inherit"): boolean; + + /** + * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. + * + * @optionValue New value to be set. + */ + igGridSummaries(optionLiteral: 'option', optionName: "inherit", optionValue: boolean): void; + + /** + * Event fired before drop down is opened for a specific column summary + * Return false in order to cancel opening the drop down. + * Function takes arguments evt and ui. + * Use ui.columnKey to get column key of the column where drop down is opening. + * Use ui.owner in order to access the igGridSummaries widget object. + */ + igGridSummaries(optionLiteral: 'option', optionName: "dropDownOpening"): DropDownOpeningEvent; + + /** + * Event fired before drop down is opened for a specific column summary + * Return false in order to cancel opening the drop down. + * Function takes arguments evt and ui. + * Use ui.columnKey to get column key of the column where drop down is opening. + * Use ui.owner in order to access the igGridSummaries widget object. + * + * @optionValue Define event handler function. + */ + igGridSummaries(optionLiteral: 'option', optionName: "dropDownOpening", optionValue: DropDownOpeningEvent): void; + + /** + * Event fired after the summaries dropdown is opened for a specific column + * Function takes arguments evt and ui. + * Use ui.columnKey to get column key of the column where drop down is shown. + * Use ui.owner in order to access the igGridSummaries widget object. + */ + igGridSummaries(optionLiteral: 'option', optionName: "dropDownOpened"): DropDownOpenedEvent; + + /** + * Event fired after the summaries dropdown is opened for a specific column + * Function takes arguments evt and ui. + * Use ui.columnKey to get column key of the column where drop down is shown. + * Use ui.owner in order to access the igGridSummaries widget object. + * + * @optionValue Define event handler function. + */ + igGridSummaries(optionLiteral: 'option', optionName: "dropDownOpened", optionValue: DropDownOpenedEvent): void; + + /** + * Event fired before the dropdown for a summary column starts closing + * Return false in order to cancel closing the drop down. + * Function takes arguments evt and ui. + * Use ui.columnKey to get column key of the column where drop down is closing. + * Use ui.owner in order to access the igGridSummaries widget object. + */ + igGridSummaries(optionLiteral: 'option', optionName: "dropDownClosing"): DropDownClosingEvent; + + /** + * Event fired before the dropdown for a summary column starts closing + * Return false in order to cancel closing the drop down. + * Function takes arguments evt and ui. + * Use ui.columnKey to get column key of the column where drop down is closing. + * Use ui.owner in order to access the igGridSummaries widget object. + * + * @optionValue Define event handler function. + */ + igGridSummaries(optionLiteral: 'option', optionName: "dropDownClosing", optionValue: DropDownClosingEvent): void; + + /** + * Event fired after the dropdown for a summary column is closed + * Function takes arguments evt and ui. + * Use ui.columnKey to get column key of the column where drop down is closing. + * Use ui.owner in order to access the igGridSummaries widget object. + */ + igGridSummaries(optionLiteral: 'option', optionName: "dropDownClosed"): DropDownClosedEvent; + + /** + * Event fired after the dropdown for a summary column is closed + * Function takes arguments evt and ui. + * Use ui.columnKey to get column key of the column where drop down is closing. + * Use ui.owner in order to access the igGridSummaries widget object. + * + * @optionValue Define event handler function. + */ + igGridSummaries(optionLiteral: 'option', optionName: "dropDownClosed", optionValue: DropDownClosedEvent): void; + + /** + * Event fired before summaries calculations are made + * Return false in order to cancel calculation of summaries. + * Function takes arguments evt and ui. + * Use ui.owner in order to access the igGridSummaries widget object. + */ + igGridSummaries(optionLiteral: 'option', optionName: "summariesCalculating"): SummariesCalculatingEvent; + + /** + * Event fired before summaries calculations are made + * Return false in order to cancel calculation of summaries. + * Function takes arguments evt and ui. + * Use ui.owner in order to access the igGridSummaries widget object. + * + * @optionValue Define event handler function. + */ + igGridSummaries(optionLiteral: 'option', optionName: "summariesCalculating", optionValue: SummariesCalculatingEvent): void; + + /** + * Event fired after summaries calculation are completely made + * Function takes arguments evt and ui. + * Use ui.data to get data for calculated summaries + * Use ui.owner in order to access the igGridSummaries widget object. + */ + igGridSummaries(optionLiteral: 'option', optionName: "summariesCalculated"): SummariesCalculatedEvent; + + /** + * Event fired after summaries calculation are completely made + * Function takes arguments evt and ui. + * Use ui.data to get data for calculated summaries + * Use ui.owner in order to access the igGridSummaries widget object. + * + * @optionValue Define event handler function. + */ + igGridSummaries(optionLiteral: 'option', optionName: "summariesCalculated", optionValue: SummariesCalculatedEvent): void; + + /** + * Event fired when user selects/deselects summary method from checkbox + * Function takes arguments evt and ui. + * Use ui.columnKey to get column key of the column where it is changed selection of summary method + * Use ui.isSelected to get whether method is selected or not + * Use ui.methodName to get summary method name + * Use ui.owner in order to access the igGridSummaries widget object. + */ + igGridSummaries(optionLiteral: 'option', optionName: "summariesMethodSelectionChanged"): SummariesMethodSelectionChangedEvent; + + /** + * Event fired when user selects/deselects summary method from checkbox + * Function takes arguments evt and ui. + * Use ui.columnKey to get column key of the column where it is changed selection of summary method + * Use ui.isSelected to get whether method is selected or not + * Use ui.methodName to get summary method name + * Use ui.owner in order to access the igGridSummaries widget object. + * + * @optionValue Define event handler function. + */ + igGridSummaries(optionLiteral: 'option', optionName: "summariesMethodSelectionChanged", optionValue: SummariesMethodSelectionChangedEvent): void; + + /** + * Event is fired bofore summary rows start toggling + * Return false in order to cancel showing/hiding of summaries. + * Function takes arguments evt and ui. + * Use ui.isToShow to get whether summaries are shown or not. + * Use ui.owner in order to access the igGridSummaries widget object. + */ + igGridSummaries(optionLiteral: 'option', optionName: "summariesToggling"): SummariesTogglingEvent; + + /** + * Event is fired bofore summary rows start toggling + * Return false in order to cancel showing/hiding of summaries. + * Function takes arguments evt and ui. + * Use ui.isToShow to get whether summaries are shown or not. + * Use ui.owner in order to access the igGridSummaries widget object. + * + * @optionValue Define event handler function. + */ + igGridSummaries(optionLiteral: 'option', optionName: "summariesToggling", optionValue: SummariesTogglingEvent): void; + + /** + * Event is fired after summary rows are toggled + * Function takes arguments evt and ui. + * Use ui.isToShow to get whether summaries are shown or not. + * Use ui.owner in order to access the igGridSummaries widget object. + */ + igGridSummaries(optionLiteral: 'option', optionName: "summariesToggled"): SummariesToggledEvent; + + /** + * Event is fired after summary rows are toggled + * Function takes arguments evt and ui. + * Use ui.isToShow to get whether summaries are shown or not. + * Use ui.owner in order to access the igGridSummaries widget object. + * + * @optionValue Define event handler function. + */ + igGridSummaries(optionLiteral: 'option', optionName: "summariesToggled", optionValue: SummariesToggledEvent): void; + + /** + * Event is fired when OK button is clicked in drop down + * Function takes arguments evt and ui. + * Use ui.columnKey to get column key for which OK button is clicked. + * Use ui.eventData to get data about which summary methods are(not) selected. Format of event data is {type: "min", active: false}; + * Use ui.owner in order to access the igGridSummaries widget object. + */ + igGridSummaries(optionLiteral: 'option', optionName: "dropDownOKClicked"): DropDownOKClickedEvent; + + /** + * Event is fired when OK button is clicked in drop down + * Function takes arguments evt and ui. + * Use ui.columnKey to get column key for which OK button is clicked. + * Use ui.eventData to get data about which summary methods are(not) selected. Format of event data is {type: "min", active: false}; + * Use ui.owner in order to access the igGridSummaries widget object. + * + * @optionValue Define event handler function. + */ + igGridSummaries(optionLiteral: 'option', optionName: "dropDownOKClicked", optionValue: DropDownOKClickedEvent): void; + + /** + * Event is fired when Cancel button is clicked in drop down. + * Function takes arguments evt and ui. + * Use ui.columnKey to get column key for which Cancel button is clicked. + * Use ui.owner in order to access the igGridSummaries widget object. + */ + igGridSummaries(optionLiteral: 'option', optionName: "dropDownCancelClicked"): DropDownCancelClickedEvent; + + /** + * Event is fired when Cancel button is clicked in drop down. + * Function takes arguments evt and ui. + * Use ui.columnKey to get column key for which Cancel button is clicked. + * Use ui.owner in order to access the igGridSummaries widget object. + * + * @optionValue Define event handler function. + */ + igGridSummaries(optionLiteral: 'option', optionName: "dropDownCancelClicked", optionValue: DropDownCancelClickedEvent): void; + igGridSummaries(options: IgGridSummaries): JQuery; + igGridSummaries(optionLiteral: 'option', optionName: string): any; + igGridSummaries(optionLiteral: 'option', options: IgGridSummaries): JQuery; + igGridSummaries(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igGridSummaries(methodName: string, ...methodParams: any[]): any; +} +interface IgGridTooltipsColumnSettings { + /** + * Either key or index must be set in every column setting. + * + */ + columnKey?: string; + + /** + * Either key or index must be set in every column setting. + * + */ + columnIndex?: number; + + /** + * Enables / disables tooltips on the specified column. By default tooltips are displayed for each column. Note: This option is mandatory. + * + */ + allowTooltips?: boolean; + + /** + * Specifies the maximum width (in pixels) of the tooltip when shown for the specified column. If unset the width of the column will be used instead. + * + */ + maxWidth?: number; + + /** + * Option for IgGridTooltipsColumnSettings + */ + [optionName: string]: any; +} + +interface IgGridTooltips { + /** + * determines the tooltip visibility option + * + * + * Valid values: + * "always" tooltips always show for hovered elements + * "never" tooltips do not show automatically + * "overflow" tooltips show only when the underlying data overflows its container + */ + visibility?: string; + + /** + * controls the tooltip's style + * + * + * Valid values: + * "tooltip" The tooltip will be positioned according to the mouse cursor. Will render the tooltip content as plain text. + * "popover" The tooltip will be positioned according to the target element with an arrow pointing the element. This style is more suitable for touch-supported environments. Will render the tooltip content as HTML. + */ + style?: string; + + /** + * The time in milliseconds after which tooltip will show when + * mouse cursor is hovered over a cell. + * + */ + showDelay?: number; + + /** + * Type="integer" The time in milliseconds after which tooltip hides when mouse + * cursor gets outside of the cell. + * + */ + hideDelay?: number; + + /** + * A list of custom column settings that specify custom tooltip settings for a specific column (whether tooltips are enabled / disabled) + * + */ + columnSettings?: IgGridTooltipsColumnSettings; + + /** + * Sets the time tooltip fades in and out when showing/hiding + * + */ + fadeTimespan?: number; + + /** + * Sets the left position of the tooltip relative to the mouse cursor + * + */ + cursorLeftOffset?: number; + + /** + * Sets the top position of the tooltip relative to the mouse cursor + * + */ + cursorTopOffset?: number; + + /** + * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. + */ + inherit?: boolean; + + /** + * Event fired when the mouse has hovered on an element long enough to display a tooltip + * use args.owner to get a reference to the widget + * use args.tooltip to get or set the string to be displayed + * use args.value to get the value of the cell the tooltip is displayed for + * use args.element to get a reference to the cell the tooltip is displayed for + * use args.index to get the row index of the cell the tooltip is displayed for + * use args.columnKey to get the column key of the cell the tooltip is displayed for + * use args.columnIndex to get the column index of the cell the tooltip is displayed for + */ + tooltipShowing?: TooltipShowingEvent; + + /** + * Event fired after a tooltip is shown + * use args.owner to get a reference to the widget + * use args.tooltip to get the string displayed in the tooltip + * use args.value to get the value of the cell the tooltip is displayed for + * use args.element to get a reference to the cell the tooltip is displayed for + * use args.index to get the row index of the cell the tooltip is displayed for + * use args.columnKey to get the column key of the cell the tooltip is displayed for + * use args.columnIndex to get the column index of the cell the tooltip is displayed for + */ + tooltipShown?: TooltipShownEvent; + + /** + * Event fired when the mouse has left an element and the tooltip is about to hide + * use args.owner to get a reference to the widget + * use args.tooltip to get the string displayed in the tooltip + * use args.value to get the value of the cell the tooltip is displayed for + * use args.element to get a reference to the cell the tooltip is displayed for + * use args.index to get the row index of the cell the tooltip is displayed for + * use args.columnKey to get the column key of the cell the tooltip is displayed for + * use args.columnIndex to get the column index of the cell the tooltip is displayed for + */ + tooltipHiding?: TooltipHidingEvent; + + /** + * Event fired after a tooltip is hidden + * use args.owner to get a reference to the widget + * use args.tooltip to get the string displayed in the tooltip + * use args.value to get the value of the cell the tooltip was displayed for + * use args.element to get a reference to the cell the tooltip was displayed for + * use args.index to get the row index of the cell the tooltip was displayed for + * use args.columnKey to get the column key of the cell the tooltip was displayed for + * use args.columnIndex to get the column index of the cell the tooltip was displayed for + */ + tooltipHidden?: TooltipHiddenEvent; + + /** + * Option for igGridTooltips + */ + [optionName: string]: any; +} +interface IgGridTooltipsMethods { + /** + * Destroys the tooltip widget. + */ + destroy(): void; + + /** + * Returns the ID of the parent div element bounding the ruler and the tooltip container + */ + id(): string; +} +interface JQuery { + data(propertyName: "igGridTooltips"): IgGridTooltipsMethods; +} + +interface JQuery { + igGridTooltips(methodName: "destroy"): void; + igGridTooltips(methodName: "id"): string; + + /** + * Determines the tooltip visibility option + * + */ + igGridTooltips(optionLiteral: 'option', optionName: "visibility"): string; + + /** + * Determines the tooltip visibility option + * + * + * @optionValue New value to be set. + */ + igGridTooltips(optionLiteral: 'option', optionName: "visibility", optionValue: string): void; + + /** + * Controls the tooltip's style + * + */ + igGridTooltips(optionLiteral: 'option', optionName: "style"): string; + + /** + * Controls the tooltip's style + * + * + * @optionValue New value to be set. + */ + igGridTooltips(optionLiteral: 'option', optionName: "style", optionValue: string): void; + + /** + * The time in milliseconds after which tooltip will show when + * mouse cursor is hovered over a cell. + * + */ + igGridTooltips(optionLiteral: 'option', optionName: "showDelay"): number; + + /** + * The time in milliseconds after which tooltip will show when + * mouse cursor is hovered over a cell. + * + * + * @optionValue New value to be set. + */ + igGridTooltips(optionLiteral: 'option', optionName: "showDelay", optionValue: number): void; + + /** + * Type="integer" The time in milliseconds after which tooltip hides when mouse + * cursor gets outside of the cell. + * + */ + igGridTooltips(optionLiteral: 'option', optionName: "hideDelay"): number; + + /** + * Type="integer" The time in milliseconds after which tooltip hides when mouse + * cursor gets outside of the cell. + * + * + * @optionValue New value to be set. + */ + igGridTooltips(optionLiteral: 'option', optionName: "hideDelay", optionValue: number): void; + + /** + * A list of custom column settings that specify custom tooltip settings for a specific column (whether tooltips are enabled / disabled) + * + */ + igGridTooltips(optionLiteral: 'option', optionName: "columnSettings"): IgGridTooltipsColumnSettings; + + /** + * A list of custom column settings that specify custom tooltip settings for a specific column (whether tooltips are enabled / disabled) + * + * + * @optionValue New value to be set. + */ + igGridTooltips(optionLiteral: 'option', optionName: "columnSettings", optionValue: IgGridTooltipsColumnSettings): void; + + /** + * The time tooltip fades in and out when showing/hiding + * + */ + igGridTooltips(optionLiteral: 'option', optionName: "fadeTimespan"): number; + + /** + * Sets the time tooltip fades in and out when showing/hiding + * + * + * @optionValue New value to be set. + */ + igGridTooltips(optionLiteral: 'option', optionName: "fadeTimespan", optionValue: number): void; + + /** + * The left position of the tooltip relative to the mouse cursor + * + */ + igGridTooltips(optionLiteral: 'option', optionName: "cursorLeftOffset"): number; + + /** + * Sets the left position of the tooltip relative to the mouse cursor + * + * + * @optionValue New value to be set. + */ + igGridTooltips(optionLiteral: 'option', optionName: "cursorLeftOffset", optionValue: number): void; + + /** + * The top position of the tooltip relative to the mouse cursor + * + */ + igGridTooltips(optionLiteral: 'option', optionName: "cursorTopOffset"): number; + + /** + * Sets the top position of the tooltip relative to the mouse cursor + * + * + * @optionValue New value to be set. + */ + igGridTooltips(optionLiteral: 'option', optionName: "cursorTopOffset", optionValue: number): void; + + /** + * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. + */ + igGridTooltips(optionLiteral: 'option', optionName: "inherit"): boolean; + + /** + * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. + * + * @optionValue New value to be set. + */ + igGridTooltips(optionLiteral: 'option', optionName: "inherit", optionValue: boolean): void; + + /** + * Event fired when the mouse has hovered on an element long enough to display a tooltip + * use args.owner to get a reference to the widget + * use args.tooltip to get or set the string to be displayed + * use args.value to get the value of the cell the tooltip is displayed for + * use args.element to get a reference to the cell the tooltip is displayed for + * use args.index to get the row index of the cell the tooltip is displayed for + * use args.columnKey to get the column key of the cell the tooltip is displayed for + * use args.columnIndex to get the column index of the cell the tooltip is displayed for + */ + igGridTooltips(optionLiteral: 'option', optionName: "tooltipShowing"): TooltipShowingEvent; + + /** + * Event fired when the mouse has hovered on an element long enough to display a tooltip + * use args.owner to get a reference to the widget + * use args.tooltip to get or set the string to be displayed + * use args.value to get the value of the cell the tooltip is displayed for + * use args.element to get a reference to the cell the tooltip is displayed for + * use args.index to get the row index of the cell the tooltip is displayed for + * use args.columnKey to get the column key of the cell the tooltip is displayed for + * use args.columnIndex to get the column index of the cell the tooltip is displayed for + * + * @optionValue Define event handler function. + */ + igGridTooltips(optionLiteral: 'option', optionName: "tooltipShowing", optionValue: TooltipShowingEvent): void; + + /** + * Event fired after a tooltip is shown + * use args.owner to get a reference to the widget + * use args.tooltip to get the string displayed in the tooltip + * use args.value to get the value of the cell the tooltip is displayed for + * use args.element to get a reference to the cell the tooltip is displayed for + * use args.index to get the row index of the cell the tooltip is displayed for + * use args.columnKey to get the column key of the cell the tooltip is displayed for + * use args.columnIndex to get the column index of the cell the tooltip is displayed for + */ + igGridTooltips(optionLiteral: 'option', optionName: "tooltipShown"): TooltipShownEvent; + + /** + * Event fired after a tooltip is shown + * use args.owner to get a reference to the widget + * use args.tooltip to get the string displayed in the tooltip + * use args.value to get the value of the cell the tooltip is displayed for + * use args.element to get a reference to the cell the tooltip is displayed for + * use args.index to get the row index of the cell the tooltip is displayed for + * use args.columnKey to get the column key of the cell the tooltip is displayed for + * use args.columnIndex to get the column index of the cell the tooltip is displayed for + * + * @optionValue Define event handler function. + */ + igGridTooltips(optionLiteral: 'option', optionName: "tooltipShown", optionValue: TooltipShownEvent): void; + + /** + * Event fired when the mouse has left an element and the tooltip is about to hide + * use args.owner to get a reference to the widget + * use args.tooltip to get the string displayed in the tooltip + * use args.value to get the value of the cell the tooltip is displayed for + * use args.element to get a reference to the cell the tooltip is displayed for + * use args.index to get the row index of the cell the tooltip is displayed for + * use args.columnKey to get the column key of the cell the tooltip is displayed for + * use args.columnIndex to get the column index of the cell the tooltip is displayed for + */ + igGridTooltips(optionLiteral: 'option', optionName: "tooltipHiding"): TooltipHidingEvent; + + /** + * Event fired when the mouse has left an element and the tooltip is about to hide + * use args.owner to get a reference to the widget + * use args.tooltip to get the string displayed in the tooltip + * use args.value to get the value of the cell the tooltip is displayed for + * use args.element to get a reference to the cell the tooltip is displayed for + * use args.index to get the row index of the cell the tooltip is displayed for + * use args.columnKey to get the column key of the cell the tooltip is displayed for + * use args.columnIndex to get the column index of the cell the tooltip is displayed for + * + * @optionValue Define event handler function. + */ + igGridTooltips(optionLiteral: 'option', optionName: "tooltipHiding", optionValue: TooltipHidingEvent): void; + + /** + * Event fired after a tooltip is hidden + * use args.owner to get a reference to the widget + * use args.tooltip to get the string displayed in the tooltip + * use args.value to get the value of the cell the tooltip was displayed for + * use args.element to get a reference to the cell the tooltip was displayed for + * use args.index to get the row index of the cell the tooltip was displayed for + * use args.columnKey to get the column key of the cell the tooltip was displayed for + * use args.columnIndex to get the column index of the cell the tooltip was displayed for + */ + igGridTooltips(optionLiteral: 'option', optionName: "tooltipHidden"): TooltipHiddenEvent; + + /** + * Event fired after a tooltip is hidden + * use args.owner to get a reference to the widget + * use args.tooltip to get the string displayed in the tooltip + * use args.value to get the value of the cell the tooltip was displayed for + * use args.element to get a reference to the cell the tooltip was displayed for + * use args.index to get the row index of the cell the tooltip was displayed for + * use args.columnKey to get the column key of the cell the tooltip was displayed for + * use args.columnIndex to get the column index of the cell the tooltip was displayed for + * + * @optionValue Define event handler function. + */ + igGridTooltips(optionLiteral: 'option', optionName: "tooltipHidden", optionValue: TooltipHiddenEvent): void; + igGridTooltips(options: IgGridTooltips): JQuery; + igGridTooltips(optionLiteral: 'option', optionName: string): any; + igGridTooltips(optionLiteral: 'option', options: IgGridTooltips): JQuery; + igGridTooltips(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igGridTooltips(methodName: string, ...methodParams: any[]): any; +} +interface IgGridUpdatingColumnSetting { + /** + * Identifies the grid column by key. + * + */ + columnKey?: string; + + /** + * Specifies the type of editor to use for the column. + * + * + * Valid values: + * "text" An igTextEditor will be created + * "mask" An igMaskEditor will be created + * "date" An igDateEditor will be created + * "datepicker" An igDatePicker will be created + * "numeric" An igNumericEditor will be created + * "checkbox" An igCheckboxEditor will be created + * "currency" An igCurrencyEditor will be created + * "percent" An igPercentEditor will be created + * "combo" An igCombo editor is created. Both the JS and CSS files used by ui.igCombo should be available. + * "rating" An igRating editor is created. Both the JS and CSS files used by ui.igRating should be available. + */ + editorType?: string; + + /** + * Specifies а custom editor provider instance. More information about editor providers can be found [here](http://www.igniteui.com/help/implementing-custom-editor-provider) and [here](http://www.igniteui.com/help/working-with-combo-editor-provider). + * It should either extend $.ig.EditorProvider or have definitions for the following methods: + * $.ig.EditorProvider = $.ig.EditorProvider|| $.ig.EditorProvider.extend({ + * createEditor: function (callbacks, key, editorOptions, tabIndex, format, element) {}, + * attachErrorEvents: function (errorShowing, errorShown, errorHidden) {}, + * getEditor: function () {}, + * refreshValue: function () {}, + * getValue: function () {}, + * setValue: function (val) {}, + * setSize: function (width, height) {}, + * setFocus: function () {}, + * removeFromParent: function () {}, + * destroy: function () {}, + * validator: function () {}, + * validate: function (noLabel) {}, + * isValid: function () {} + * }); + * + */ + editorProvider?: any; + + /** + * Specifies options to initialize the corresponding editor with. + * + */ + editorOptions?: any; + + /** + * Specifies if the end-user will be allowed to leave the editor's value empty during edit mode or not. + * + */ + required?: boolean; + + /** + * Specifies if the column is read-only. In 'cell' and 'row' [editMode](ui.iggridupdating#options:editMode) no editor will be created for read-only columns. In 'dialog' mode enabling [showReadonlyEditors](ui.iggridupdating#options:rowEditDialogOptions.showReadonlyEditors) will display disabled editors for such columns. + * + */ + readOnly?: boolean; + + /** + * Specifies if the column's value should be validated or not. The validation is done based on the rules of the corresponding editor. + * + */ + validation?: boolean; + + /** + * Specifies the default value for the column when adding new rows. When in edit mode for adding a row the value will be pre-filled in the column's editor (if the column is not read-only). The value should be of the type specified for the column in the grid's [columns](ui.iggrid#options:columns) collection. + * + */ + defaultValue?: any; + + /** + * Option for IgGridUpdatingColumnSetting + */ + [optionName: string]: any; +} + +interface IgGridUpdatingRowEditDialogOptions { + /** + * Specifies the caption of the dialog. If not set, $.ig.GridUpdating.locale.rowEditDialogCaptionLabel is used. + * + */ + captionLabel?: string; + + /** + * Controls the containment of the dialog's drag operation. + * + * + * Valid values: + * "owner" The row edit dialog will be draggable only in the grid area. + * "window" The row edit dialog will be draggable in the whole window area. + */ + containment?: string; + + /** + * Controls the default row edit dialog width. + * + * + * Valid values: + * "string" The dialog window width in pixels (400px). + * "number" The dialog window width as a number (400). + */ + width?: string|number; + + /** + * Controls the default row edit dialog height. + * + * + * Valid values: + * "string" The dialog window height in pixels (350px). + * "number" The dialog window height as a number (350). + */ + height?: string|number; + + /** + * Specifies the animation duration for the opening and closing operations. + * + */ + animationDuration?: number; + + /** + * Controls if editors should be rendered for read-only columns. If rendered, these editors will be disabled. + * + */ + showReadonlyEditors?: boolean; + + /** + * Controls if editors should be rendered for hidden columns. + * + */ + showEditorsForHiddenColumns?: boolean; + + /** + * Controls the width of the column containing the column names in the default row edit dialog. + * + * + * Valid values: + * "string" The width of the column in pixels (100px) or percents (20%). + * "number" The width of the column as a number (100) in pixels. + * "null" The width of the column will be left empty for the browser to size automatically. + */ + namesColumnWidth?: string|number; + + /** + * Controls the width of the column containing the editors in the default row edit dialog. + * + * + * Valid values: + * "string" The width of the column in pixels (100px) or percents (20%). + * "number" The width of the column as a number (100) in pixels. + * "null" The width of the column will be left empty for the browser to size automatically. + */ + editorsColumnWidth?: string|number; + + /** + * Controls the visibility of the done and cancel buttons for the dialog. + * If disabled the end-user will be able to stop editing only with the Enter and Esc keys. + * + */ + showDoneCancelButtons?: boolean; + + /** + * Specifies a template to be rendered against the currently edited record (or up-to-date key-value pairs in the case of not yet created records). It may contain an element decorated with the 'data-render-tmpl' attribute to specify where the control should render the editors template specified in the [editorsTemplate](ui.iggridupdating#options:rowEditDialogOptions.editorsTemplate) option. For custom dialogs, the elements can be decorated with 'data-editor-for-' attributes where columnKey is the key of the column that editor or input will be used to edit. If both dialogTemplate and [dialogTemplateSelector](ui.iggridupdating#options:rowEditDialogOptions.dialogTemplateSelector) are specified, dialogTemplateSelector will be used.The default template is '
'. + * + * + */ + dialogTemplate?: string; + + /** + * Specifies a selector to a template rendered against the currently edited record (or up-to-date key-value pairs in the case of not yet created records). It may contain an element decorated with the 'data-render-tmpl' attribute to specify where the control should render the editors template specified in the [editorsTemplate](ui.iggridupdating#options:rowEditDialogOptions.editorsTemplate) option. For custom dialogs, the elements can be decorated with 'data-editor-for-' attributes where columnKey is the key of the column that editor or input will be used to edit. If both [dialogTemplate](ui.iggridupdating#options:rowEditDialogOptions.dialogTemplate) and dialogTemplateSelector are specified, dialogTemplateSelector will be used.The default template is '
'. + * + * + */ + dialogTemplateSelector?: string; + + /** + * Specifies a template to be executed for each column in the grid's column collection (or just the read-write columns if [showReadonlyEditors](ui.iggridupdating#options:rowEditDialogOptions.showReadonlyEditors) is false). Decorate the element to be used as an editor with 'data-editor-for-${key}'. The ${key} template tag should be replaced with the chosen templating engine's syntax for rendering values. If any editors for columns are specified in the dialog markup they will be exluded from the data the template will be rendered for. This property is ignored if [dialogTemplate](ui.iggridupdating#options:rowEditDialogOptions.dialogTemplate) does not include an element with the 'data-render-tmpl' attribute. If both editorsTemplate and [editorsTemplateSelector](ui.iggridupdating#options:rowEditDialogOptions.editorsTemplateSelector) are specified, editorsTemplateSelector will be used. + * The default template is '${headerText}' + * + */ + editorsTemplate?: string; + + /** + * Specifies a selector to a template to be executed for each column in the grid's column collection (or just the read-write columns if [showReadonlyEditors](ui.iggridupdating#options:rowEditDialogOptions.showReadonlyEditors) is false). Decorate the element to be used as an editor with 'data-editor-for-${key}'. The ${key} template tag should be replaced with the chosen templating engine's syntax for rendering values. If any editors for columns are specified in the dialog markup they will be exluded from the data the template will be rendered for. This property is ignored if [dialogTemplate](ui.iggridupdating#options:rowEditDialogOptions.dialogTemplate) does not include an element with the 'data-render-tmpl' attribute. If both [editorsTemplate](ui.iggridupdating#options:rowEditDialogOptions.editorsTemplate) and editorsTemplateSelector are specified, editorsTemplateSelector will be used. + * The default template is '${headerText}' + * + */ + editorsTemplateSelector?: string; + + /** + * Option for IgGridUpdatingRowEditDialogOptions + */ + [optionName: string]: any; +} + +interface EditRowStartingEvent { + (event: Event, ui: EditRowStartingEventUIParam): void; +} + +interface EditRowStartingEventUIParam { + /** + * Used to get a reference to GridUpdating. + */ + owner?: any; + + /** + * Used to get the row's PK value. + */ + rowID?: any; + + /** + * Used to check if the edit mode is for adding a new row. + */ + rowAdding?: any; +} + +interface EditRowStartedEvent { + (event: Event, ui: EditRowStartedEventUIParam): void; +} + +interface EditRowStartedEventUIParam { + /** + * Used to get a reference to GridUpdating. + */ + owner?: any; + + /** + * Used to get the row's PK value. + */ + rowID?: any; + + /** + * Used to check if the edit mode is for adding a new row. + */ + rowAdding?: any; +} + +interface EditRowEndingEvent { + (event: Event, ui: EditRowEndingEventUIParam): void; +} + +interface EditRowEndingEventUIParam { + /** + * Used to get a reference to GridUpdating. + */ + owner?: any; + + /** + * Used to get the row's PK value. + */ + rowID?: any; + + /** + * Used to check if any of the values is changed which will cause update in the data source. Can be manually set to false to prevent this update. + */ + update?: any; + + /** + * Used to check if the edit mode is for adding a new row. + */ + rowAdding?: any; + + /** + * Used to get or set the new value for the column with the specified key. + */ + values?: any; + + /** + * Used to get the old value for the column with the specified key. + */ + oldValues?: any; +} + +interface EditRowEndedEvent { + (event: Event, ui: EditRowEndedEventUIParam): void; +} + +interface EditRowEndedEventUIParam { + /** + * Used to get a reference to GridUpdating. + */ + owner?: any; + + /** + * Used to get the row's PK value. + */ + rowID?: any; + + /** + * Used to check if any of the values is changed which will cause update in the data source. + */ + update?: any; + + /** + * Used to check if the edit mode is for adding a new row. + */ + rowAdding?: any; + + /** + * Used to get the new value for the column with the specified key. + */ + values?: any; + + /** + * Used to get the old value for the column with the specified key. + */ + oldValues?: any; +} + +interface EditCellStartingEvent { + (event: Event, ui: EditCellStartingEventUIParam): void; +} + +interface EditCellStartingEventUIParam { + /** + * Used to get a reference to GridUpdating. + */ + owner?: any; + + /** + * Used to get the row's PK value. + */ + rowID?: any; + + /** + * Used to get the index of the column. + */ + columnIndex?: any; + + /** + * Used to get the key of the column. + */ + columnKey?: any; + + /** + * Used tor to get a reference to the editor used for editing the column. + */ + editor?: any; + + /** + * Used to get or set the value of the editor. + */ + value?: any; + + /** + * Used to check if the edit mode is for adding a new row. + */ + rowAdding?: any; +} + +interface EditCellStartedEvent { + (event: Event, ui: EditCellStartedEventUIParam): void; +} + +interface EditCellStartedEventUIParam { + /** + * Used to get a reference to GridUpdating. + */ + owner?: any; + + /** + * Used to get the row's PK value. + */ + rowID?: any; + + /** + * Used to get the index of the column. + */ + columnIndex?: any; + + /** + * Used to get the key of the column. + */ + columnKey?: any; + + /** + * Used tor to get a reference to the editor used for editing the column. + */ + editor?: any; + + /** + * Used to get the value of the editor. + */ + value?: any; + + /** + * Used to check if the edit mode is for adding a new row. + */ + rowAdding?: any; +} + +interface EditCellEndingEvent { + (event: Event, ui: EditCellEndingEventUIParam): void; +} + +interface EditCellEndingEventUIParam { + /** + * Used to get a reference to GridUpdating. + */ + owner?: any; + + /** + * Used to get the row's PK value. + */ + rowID?: any; + + /** + * Used to get the index of the column. + */ + columnIndex?: any; + + /** + * Used to get the key of the column. + */ + columnKey?: any; + + /** + * Used tor to get a reference to the editor used for editing the column. + */ + editor?: any; + + /** + * Used to get or set the value to be used when updating the data source. + */ + value?: any; + + /** + * Used to get the old value. + */ + oldValue?: any; + + /** + * Used to check if the value is changed which will cause update in the data source. Can be manually set to false to prevent this update. + */ + update?: any; + + /** + * Used to check if the edit mode is for adding a new row. + */ + rowAdding?: any; +} + +interface EditCellEndedEvent { + (event: Event, ui: EditCellEndedEventUIParam): void; +} + +interface EditCellEndedEventUIParam { + /** + * Used to get a reference to GridUpdating. + */ + owner?: any; + + /** + * Used to get the row's PK value. + */ + rowID?: any; + + /** + * Used to get the index of the column. + */ + columnIndex?: any; + + /** + * Used to get the key of the column. + */ + columnKey?: any; + + /** + * Used tor to get a reference to the editor used for editing the column. + */ + editor?: any; + + /** + * Used to get the new value. + */ + value?: any; + + /** + * Used to get the old value. + */ + oldValue?: any; + + /** + * Used to check if the value is changed which will cause update in the data source. + */ + update?: any; + + /** + * Used to check if the edit mode is for adding a new row. + */ + rowAdding?: any; +} + +interface RowAddingEvent { + (event: Event, ui: RowAddingEventUIParam): void; +} + +interface RowAddingEventUIParam { + /** + * Used to get a reference to GridUpdating. + */ + owner?: any; + + /** + * Used to get the value for the column with the specified key. + */ + values?: any; + + /** + * Used to get the default value (before editing) for the column with the specified key. + */ + oldValues?: any; +} + +interface RowAddedEvent { + (event: Event, ui: RowAddedEventUIParam): void; +} + +interface RowAddedEventUIParam { + /** + * Used to get a reference to GridUpdating. + */ + owner?: any; + + /** + * Used to get the value for the column with the specified key. + */ + values?: any; + + /** + * Used to get the default value (before editing) for the column with the specified key. + */ + oldValues?: any; +} + +interface RowDeletingEvent { + (event: Event, ui: RowDeletingEventUIParam): void; +} + +interface RowDeletingEventUIParam { + /** + * Used to get a reference to GridUpdating. + */ + owner?: any; + + /** + * Used to get a jQuery object containing the TR element of the row to delete. + */ + element?: any; + + /** + * Used to get the row's PK value. + */ + rowID?: any; +} + +interface RowDeletedEvent { + (event: Event, ui: RowDeletedEventUIParam): void; +} + +interface RowDeletedEventUIParam { + /** + * Used to get a reference to GridUpdating. + */ + owner?: any; + + /** + * Used to get a jQuery object containing the TR element of the deleted row. + */ + element?: any; + + /** + * Used to get the row's PK value. + */ + rowID?: any; +} + +interface DataDirtyEvent { + (event: Event, ui: DataDirtyEventUIParam): void; +} + +interface DataDirtyEventUIParam { + /** + * Used to get a reference to GridUpdating. + */ + owner?: any; +} + +interface GeneratePrimaryKeyValueEvent { + (event: Event, ui: GeneratePrimaryKeyValueEventUIParam): void; +} + +interface GeneratePrimaryKeyValueEventUIParam { + /** + * Used to get a reference to GridUpdating. + */ + owner?: any; + + /** + * Used to get the auto-generated primary key (the number of records in the data source + 1) or set a custom unique primary key for the new row. + */ + value?: any; +} + +interface RowEditDialogBeforeOpenEvent { + (event: Event, ui: RowEditDialogBeforeOpenEventUIParam): void; +} + +interface RowEditDialogBeforeOpenEventUIParam { + /** + * Used to get a reference to GridUpdating. + */ + owner?: any; + + /** + * Used to get reference to row edit dialog DOM element. + */ + dialogElement?: any; +} + +interface RowEditDialogAfterOpenEvent { + (event: Event, ui: RowEditDialogAfterOpenEventUIParam): void; +} + +interface RowEditDialogAfterOpenEventUIParam { + /** + * Used to get a reference to GridUpdating. + */ + owner?: any; + + /** + * Used to get reference to row edit dialog DOM element. + */ + dialogElement?: any; +} + +interface RowEditDialogBeforeCloseEvent { + (event: Event, ui: RowEditDialogBeforeCloseEventUIParam): void; +} + +interface RowEditDialogBeforeCloseEventUIParam { + /** + * Used to get a reference to GridUpdating. + */ + owner?: any; + + /** + * Used to get reference to row edit dialog DOM element. + */ + dialogElement?: any; +} + +interface RowEditDialogAfterCloseEvent { + (event: Event, ui: RowEditDialogAfterCloseEventUIParam): void; +} + +interface RowEditDialogAfterCloseEventUIParam { + /** + * Used to get a reference to GridUpdating. + */ + owner?: any; + + /** + * Used to get reference to row edit dialog DOM element. + */ + dialogElement?: any; +} + +interface RowEditDialogContentsRenderedEvent { + (event: Event, ui: RowEditDialogContentsRenderedEventUIParam): void; +} + +interface RowEditDialogContentsRenderedEventUIParam { + /** + * Used to get a reference to GridUpdating. + */ + owner?: any; + + /** + * Used to get reference to row edit dialog DOM element. + */ + dialogElement?: any; +} + +interface IgGridUpdating { + /** + * A list of custom column options that specify editing and validation settings for a specific column. + * + */ + columnSettings?: IgGridUpdatingColumnSetting[]; + + /** + * Specifies the edit mode. + * + * + * Valid values: + * "row" Editors are shown for all columns that are not read-only. The editor of the clicked cell receives initial focus. Done and Cancel buttons may be displayed based on the [showDoneCancelButtons](ui.iggridupdating#options:showDoneCancelButtons) property. + * "cell" An editor is shown for the cell entering edit mode. The Done and Cancel buttons are not supported for this mode. + * "dialog" A popup dialog is used with seperate settings available through the [rowEditDialogOptions](ui.iggridupdating#options:rowEditDialogOptions) property. + * "none" Editing through the UI is disabled. + */ + editMode?: string; + + /** + * Specifies if deleting rows through the UI is enabled. + * + */ + enableDeleteRow?: boolean; + + /** + * Specifies if adding rows through the UI is enabled. When enabled an additional row is rendered at the bottom of the grid's header that works as a button. When the end-user clicks on it edit mode is initiated either through a dialog (when [editMode](ui.iggridupdating#options:editMode) is 'dialog') or mimicking the look and feel of 'row' [editMode](ui.iggridupdating#options:editMode) (when [editMode](ui.iggridupdating#options:editMode) is 'row' or 'cell'). + * + */ + enableAddRow?: boolean; + + /** + * Specifies if the value of each editable column in the grid should be validated. The validation is done based on the rules of their corresponding editors. + * + */ + validation?: boolean; + + /** + * Specifies the label for the Done editing button (only applicable when the [showDoneCancelButtons](ui.iggridupdating#options:showDoneCancelButtons) option is enabled). If not set, $.ig.GridUpdating.locale.doneLabel is used. + * + */ + doneLabel?: string; + + /** + * Specifies the title for the Done editing button (only applicable when the [showDoneCancelButtons](ui.iggridupdating#options:showDoneCancelButtons) option is enabled). If not set, $.ig.GridUpdating.locale.doneTooltip is used. + * + */ + doneTooltip?: string; + + /** + * Specifies the label for the Cancel editing button (only applicable when the [showDoneCancelButtons](ui.iggridupdating#options:showDoneCancelButtons) option is enabled). If not set, $.ig.GridUpdating.locale.cancelLabel is used. + * + */ + cancelLabel?: string; + + /** + * Specifies the title for the Cancel editing button (only applicable when the [showDoneCancelButtons](ui.iggridupdating#options:showDoneCancelButtons) option is enabled). If not set, $.ig.GridUpdating.locale.cancelTooltip is used. + * + */ + cancelTooltip?: string; + + /** + * Specifies the label for the button starting edit mode for row adding. If not set, $.ig.GridUpdating.locale.addRowLabel is used. + * + */ + addRowLabel?: string; + + /** + * Specifies the title for the button starting edit mode for row adding. If not set, $.ig.GridUpdating.locale.addRowTooltip is used. + * + */ + addRowTooltip?: string; + + /** + * Specifies the label for the delete button. If not set, $.ig.GridUpdating.locale.deleteRowLabel is used. + * + */ + deleteRowLabel?: string; + + /** + * Specifies the title for the delete button. If not set, $.ig.GridUpdating.locale.deleteRowTooltip is used. + * + */ + deleteRowTooltip?: string; + + /** + * Determines if the Done and Cancel buttons will be available as means to end edit mode for [editMode](ui.iggridupdating#options:editMode) 'row' and when adding a new row. + * + */ + showDoneCancelButtons?: boolean; + + /** + * Specifies if an exception should be thrown when the grid's data view changes while there are pending transactions in the data source. The data view changes when the data source performs a sorting, filtering, groupby or paging operation and the exception thrown will prevent the operation from succeeding. All pending transactions must be committed before a data view operation is able to complete. Committing transactions can be done manually through the grid's [commit](ui.iggrid#methods:commit) function or automatically by setting [autoCommit](ui.iggrid#options:autoCommit) to 'true'. + * + */ + enableDataDirtyException?: boolean; + + /** + * Specifies how end-users are able to start edit mode. Possible values: "click", "dblclick", "F2", "enter" and their combinations separated by comma or in array. The keyboard triggers have effect only if the grid cells can receive focus (the grid's [tabIndex](ui.iggrid#options:tabIndex) property should not have a negative value) or Selection is enabled. If "dblclick" is included, then "click" has no effect. + * + */ + startEditTriggers?: string|Array; + + /** + * Determines if pressing Enter to navigate away from the currently edited cell should move the focus horizontally or vertically (default). + * + */ + horizontalMoveOnEnter?: boolean; + + /** + * Enables excel navigation style. When turned on, the arrow keys can be used for changing the currently edited cell similar to how Tab and Enter behave. When disabled, the arrow keys control the cursor inside editors. + * + */ + excelNavigationMode?: boolean; + + /** + * Sets a custom function to be called when the AJAX request to the URL specified by the [updateUrl](ui.iggrid#options:updateUrl) property succeeds. The function will be called with arguments representing the data returned by the server. + * + */ + saveChangesSuccessHandler?: Function|string; + + /** + * Sets a custom function to be called when the AJAX request to the URL specified by the [updateUrl](ui.iggrid#options:updateUrl) property fails. The function will be called with arguments representing the data returned by the server. + * + */ + saveChangesErrorHandler?: Function|string; + + /** + * On touch-enabled devices specifies the swipe distance for the delete button to appear. + * + */ + swipeDistance?: string|number; + + /** + * Controls if navigation will wrap around the grid. The feature will never wrap around virtual grids. + * + */ + wrapAround?: boolean; + + /** + * A list of options controlling the rendering behavior of the row edit dialog. If [editMode](ui.iggridupdating#options:editMode) is not 'dialog' these have no effect. + * + */ + rowEditDialogOptions?: IgGridUpdatingRowEditDialogOptions; + + /** + * Name of the dialog widget to be used. It should inherit from $.ui.igGridModalDialog. For more information on how to utilize this property, please refer to the [Extending igGrid Modal Dialog](http://www.igniteui.com/help/extending-iggrid-modal-dialog) topic. + * + */ + dialogWidget?: string; + + /** + * Enables/disables feature inheritance for the child layouts in igHierarchicalGrid. + */ + inherit?: boolean; + + /** + * Event fired before row editing begins. + * Return false in order to cancel editing. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.rowID to get the row's PK value. + * Use ui.rowAdding to check if the edit mode is for adding a new row. + */ + editRowStarting?: EditRowStartingEvent; + + /** + * Event fired after row editing begins. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.rowID to get the row's PK value. + * Use ui.rowAdding to check if the edit mode is for adding a new row. + */ + editRowStarted?: EditRowStartedEvent; + + /** + * Event fired before row editing ends. + * Return false in order to prevent the grid from exiting edit mode. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.rowID to get the row's PK value. + * Use ui.update to check if any of the values is changed which will cause update in the data source. Can be manually set to false to prevent this update. + * Use ui.rowAdding to check if the edit mode is for adding a new row. + * Use ui.values[key] to get or set the new value for the column with the specified key. + * Use ui.oldValues[key] to get the old value for the column with the specified key. + */ + editRowEnding?: EditRowEndingEvent; + + /** + * Event fired after row editing ends. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.rowID to get the row's PK value. + * Use ui.update to check if any of the values is changed which will cause update in the data source. + * Use ui.rowAdding to check if the edit mode is for adding a new row. + * Use ui.values[key] to get the new value for the column with the specified key. + * Use ui.oldValues[key] to get the old value for the column with the specified key. + */ + editRowEnded?: EditRowEndedEvent; + + /** + * Event fired before cell editing begins (including when row editing opens editing for a cell). + * Return false in order to cancel editing. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.rowID to get the row's PK value. + * Use ui.columnIndex to get the index of the column. + * Use ui.columnKey to get the key of the column. + * Use ui.editor to get a reference to the editor used for editing the column. + * Use ui.value to get or set the value of the editor. + * Use ui.rowAdding to check if the edit mode is for adding a new row. + */ + editCellStarting?: EditCellStartingEvent; + + /** + * Event fired after cell editing begins (including when row editing opens editing for a cell). + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.rowID to get the row's PK value. + * Use ui.columnIndex to get the index of the column. + * Use ui.columnKey to get the key of the column. + * Use ui.editor to get a reference to the editor used for editing the column. + * Use ui.value to get the value of the editor. + * Use ui.rowAdding to check if the edit mode is for adding a new row. + */ + editCellStarted?: EditCellStartedEvent; + + /** + * Event fired before cell editing ends (including when row editing closes editing for a cell). + * Return false in order to prevent the grid from exiting edit mode (only functions if [editMode](ui.iggridupdating#options:editMode) is 'cell'). + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.rowID to get the row's PK value. + * Use ui.columnIndex to get the index of the column. + * Use ui.columnKey to get the key of the column. + * Use ui.editor to get a reference to the editor used for editing the column. + * Use ui.value to get or set the value to be used when updating the data source. + * Use ui.oldValue to get the old value. + * Use ui.update to check if the value is changed which will cause update in the data source. Can be manually set to false to prevent this update. + * Use ui.rowAdding to check if the edit mode is for adding a new row. + */ + editCellEnding?: EditCellEndingEvent; + + /** + * Event fired after cell editing ends (including when row editing closes editing for a cell). + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.rowID to get the row's PK value. + * Use ui.columnIndex to get the index of the column. + * Use ui.columnKey to get the key of the column. + * Use ui.editor to get a reference to the editor used for editing the column. + * Use ui.value to get the new value. + * Use ui.oldValue to get the old value. + * Use ui.update to check if the value is changed which will cause update in the data source. + * Use ui.rowAdding to check if the edit mode is for adding a new row. + */ + editCellEnded?: EditCellEndedEvent; + + /** + * Event fired before adding a new row. + * Return false in order to cancel the adding of the new row to the data source. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.values[key] to get the value for the column with the specified key. + * Use ui.oldValues[key] to get the default value (before editing) for the column with the specified key. + */ + rowAdding?: RowAddingEvent; + + /** + * Event fired after adding a new row. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.values[key] to get the value for the column with the specified key. + * Use ui.oldValues[key] to get the default value (before editing) for the column with the specified key. + */ + rowAdded?: RowAddedEvent; + + /** + * Event fired before deleting a row. + * Return false in order to cancel the row's deletion. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.element to get a jQuery object containing the TR element of the row to delete. + * Use ui.rowID to get the row's PK value. + */ + rowDeleting?: RowDeletingEvent; + + /** + * Event fired after a row is deleted. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.element to get a jQuery object containing the TR element of the deleted row. + * Use ui.rowID to get the row's PK value. + */ + rowDeleted?: RowDeletedEvent; + + /** + * Event fired before the dataDirtyException is thrown. This can be controlled by the [enableDataDirtyException](ui.iggridupdating#options:enableDataDirtyException) property. Any pending changes may be committed in the handler of this event in order to prevent dataDirtyException from being thrown. + * Return false in order to prevent the exception. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + */ + dataDirty?: DataDirtyEvent; + + /** + * Event fired before editing starts for adding a new row, when Updating generates an automatic primary key for it. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.value to get the auto-generated primary key (the number of records in the data source + 1) or set a custom unique primary key for the new row. + */ + generatePrimaryKeyValue?: GeneratePrimaryKeyValueEvent; + + /** + * Event fired before the row edit dialog is opened. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.dialogElement to get reference to row edit dialog DOM element. + */ + rowEditDialogBeforeOpen?: RowEditDialogBeforeOpenEvent; + + /** + * Event fired after the row edit dialog is opened. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.dialogElement to get reference to row edit dialog DOM element. + */ + rowEditDialogAfterOpen?: RowEditDialogAfterOpenEvent; + + /** + * Event fired before the row edit dialog is closed. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.dialogElement to get reference to row edit dialog DOM element. + */ + rowEditDialogBeforeClose?: RowEditDialogBeforeCloseEvent; + + /** + * Event fired after the row edit dialog is closed. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.dialogElement to get reference to row edit dialog DOM element. + */ + rowEditDialogAfterClose?: RowEditDialogAfterCloseEvent; + + /** + * Event fired after the row edit dialog is rendered. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.dialogElement to get reference to row edit dialog DOM element. + */ + rowEditDialogContentsRendered?: RowEditDialogContentsRenderedEvent; + + /** + * Option for igGridUpdating + */ + [optionName: string]: any; +} +interface IgGridUpdatingMethods { + /** + * Sets a cell value for the specified cell. It also creates a transaction and updates the UI. + * If the specified cell is currently in edit mode, the function will set the desired value in the cell's editor instead. + * + * @param rowId The primary key of the row the cell is a child of. + * @param colKey The column key of the cell. + * @param value The new value for the cell. + */ + setCellValue(rowId: Object, colKey: string, value: Object): void; + + /** + * Sets values for specified cells in a row. It also creates a transaction and updates the UI. + * If the specified row is currently in edit mode, the function will set the desired values in the row's editors instead. + * + * @param rowId The primary key of the row to update. + * @param values Pairs of values in the format { column1Key: value1, column2Key: value2, ... } . + */ + updateRow(rowId: Object, values: Object): void; + + /** + * Adds a new row to the grid. It also creates a transaction and updates the UI. + * + * @param values Pairs of values in the format { column1Key: value1, column2Key: value2, ... } . + */ + addRow(values: Object): void; + + /** + * Deletes a row from the grid. It also creates a transaction and updates the UI. + * + * @param rowId The primary key of the row to delete. + */ + deleteRow(rowId: Object): void; + + /** + * Starts editing for the row or cell specified (depending on the [editMode](ui.iggridupdating#options:editMode)). + * + * @param rowId The row id. + * @param column The column key or index. + * @param raiseEvents Specifies whether or not updating events should be raised for this operation. + */ + startEdit(rowId: Object, column: Object, raiseEvents?: boolean): boolean; + + /** + * Starts editing for adding a new row. + * + * @param raiseEvents Specifies whether or not updating events should be raised for this operation. + */ + startAddRowEdit(raiseEvents?: boolean): boolean; + + /** + * Ends the currently active edit mode. + * + * @param update Specifies if the edit process should accept the current changes. Default is 'false'. + * @param raiseEvents Specifies whether or not updating events should be raised for this operation. + */ + endEdit(update?: boolean, raiseEvents?: boolean): boolean; + + /** + * Finds and returns the key of the first column the editor for which has invalid value. + */ + findInvalid(): string; + + /** + * Checks if the grid is in edit mode. + */ + isEditing(): boolean; + + /** + * Gets the editor for a column by the column key. That method can be used only after the editor has been created. + * + * @param key The key of the column. + */ + editorForKey(key: string): Object; + + /** + * Gets the editor for a column by the cell it resides in. If allowed the function can create the editor if it has not been created yet. + * + * @param cell Reference to the jQuery-wrapped TD object of the grid that the editor belongs to. + * @param create Requests to create the editor if it has not been created yet. + */ + editorForCell(cell: string, create?: boolean): Object; + + /** + * Destroys igGridUpdating. + */ + destroy(): Object; + + /** + * Shows the delete button for specific row. + * + * @param row A jQuery object of the targeted row. + */ + showDeleteButtonFor(row: Object): void; + + /** + * Hides the delete button. + */ + hideDeleteButton(): void; +} +interface JQuery { + data(propertyName: "igGridUpdating"): IgGridUpdatingMethods; +} + +interface JQuery { + igGridUpdating(methodName: "setCellValue", rowId: Object, colKey: string, value: Object): void; + igGridUpdating(methodName: "updateRow", rowId: Object, values: Object): void; + igGridUpdating(methodName: "addRow", values: Object): void; + igGridUpdating(methodName: "deleteRow", rowId: Object): void; + igGridUpdating(methodName: "startEdit", rowId: Object, column: Object, raiseEvents?: boolean): boolean; + igGridUpdating(methodName: "startAddRowEdit", raiseEvents?: boolean): boolean; + igGridUpdating(methodName: "endEdit", update?: boolean, raiseEvents?: boolean): boolean; + igGridUpdating(methodName: "findInvalid"): string; + igGridUpdating(methodName: "isEditing"): boolean; + igGridUpdating(methodName: "editorForKey", key: string): Object; + igGridUpdating(methodName: "editorForCell", cell: string, create?: boolean): Object; + igGridUpdating(methodName: "destroy"): Object; + igGridUpdating(methodName: "showDeleteButtonFor", row: Object): void; + igGridUpdating(methodName: "hideDeleteButton"): void; + + /** + * A list of custom column options that specify editing and validation settings for a specific column. + * + */ + igGridUpdating(optionLiteral: 'option', optionName: "columnSettings"): IgGridUpdatingColumnSetting[]; + + /** + * A list of custom column options that specify editing and validation settings for a specific column. + * + * + * @optionValue New value to be set. + */ + igGridUpdating(optionLiteral: 'option', optionName: "columnSettings", optionValue: IgGridUpdatingColumnSetting[]): void; + + /** + * Gets the edit mode. + * + */ + igGridUpdating(optionLiteral: 'option', optionName: "editMode"): string; + + /** + * Sets the edit mode. + * + * + * @optionValue New value to be set. + */ + igGridUpdating(optionLiteral: 'option', optionName: "editMode", optionValue: string): void; + + /** + * Gets if deleting rows through the UI is enabled. + * + */ + igGridUpdating(optionLiteral: 'option', optionName: "enableDeleteRow"): boolean; + + /** + * Sets if deleting rows through the UI is enabled. + * + * + * @optionValue New value to be set. + */ + igGridUpdating(optionLiteral: 'option', optionName: "enableDeleteRow", optionValue: boolean): void; + + /** + * Gets if adding rows through the UI is enabled. When enabled an additional row is rendered at the bottom of the grid's header that works as a button. When the end-user clicks on it edit mode is initiated either through a dialog (when [editMode](ui.iggridupdating#options:editMode) is 'dialog') or mimicking the look and feel of 'row' [editMode](ui.iggridupdating#options:editMode) (when [editMode](ui.iggridupdating#options:editMode) is 'row' or 'cell'). + * + */ + igGridUpdating(optionLiteral: 'option', optionName: "enableAddRow"): boolean; + + /** + * Sets if adding rows through the UI is enabled. When enabled an additional row is rendered at the bottom of the grid's header that works as a button. When the end-user clicks on it edit mode is initiated either through a dialog (when [editMode](ui.iggridupdating#options:editMode) is 'dialog') or mimicking the look and feel of 'row' [editMode](ui.iggridupdating#options:editMode) (when [editMode](ui.iggridupdating#options:editMode) is 'row' or 'cell'). + * + * + * @optionValue New value to be set. + */ + igGridUpdating(optionLiteral: 'option', optionName: "enableAddRow", optionValue: boolean): void; + + /** + * Gets if the value of each editable column in the grid should be validated. The validation is done based on the rules of their corresponding editors. + * + */ + igGridUpdating(optionLiteral: 'option', optionName: "validation"): boolean; + + /** + * Sets if the value of each editable column in the grid should be validated. The validation is done based on the rules of their corresponding editors. + * + * + * @optionValue New value to be set. + */ + igGridUpdating(optionLiteral: 'option', optionName: "validation", optionValue: boolean): void; + + /** + * Gets the label for the Done editing button (only applicable when the [showDoneCancelButtons](ui.iggridupdating#options:showDoneCancelButtons) option is enabled). If not set, $.ig.GridUpdating.locale.doneLabel is used. + * + */ + igGridUpdating(optionLiteral: 'option', optionName: "doneLabel"): string; + + /** + * Sets the label for the Done editing button (only applicable when the [showDoneCancelButtons](ui.iggridupdating#options:showDoneCancelButtons) option is enabled). If not set, $.ig.GridUpdating.locale.doneLabel is used. + * + * + * @optionValue New value to be set. + */ + igGridUpdating(optionLiteral: 'option', optionName: "doneLabel", optionValue: string): void; + + /** + * Gets the title for the Done editing button (only applicable when the [showDoneCancelButtons](ui.iggridupdating#options:showDoneCancelButtons) option is enabled). If not set, $.ig.GridUpdating.locale.doneTooltip is used. + * + */ + igGridUpdating(optionLiteral: 'option', optionName: "doneTooltip"): string; + + /** + * Sets the title for the Done editing button (only applicable when the [showDoneCancelButtons](ui.iggridupdating#options:showDoneCancelButtons) option is enabled). If not set, $.ig.GridUpdating.locale.doneTooltip is used. + * + * + * @optionValue New value to be set. + */ + igGridUpdating(optionLiteral: 'option', optionName: "doneTooltip", optionValue: string): void; + + /** + * Gets the label for the Cancel editing button (only applicable when the [showDoneCancelButtons](ui.iggridupdating#options:showDoneCancelButtons) option is enabled). If not set, $.ig.GridUpdating.locale.cancelLabel is used. + * + */ + igGridUpdating(optionLiteral: 'option', optionName: "cancelLabel"): string; + + /** + * Sets the label for the Cancel editing button (only applicable when the [showDoneCancelButtons](ui.iggridupdating#options:showDoneCancelButtons) option is enabled). If not set, $.ig.GridUpdating.locale.cancelLabel is used. + * + * + * @optionValue New value to be set. + */ + igGridUpdating(optionLiteral: 'option', optionName: "cancelLabel", optionValue: string): void; + + /** + * Gets the title for the Cancel editing button (only applicable when the [showDoneCancelButtons](ui.iggridupdating#options:showDoneCancelButtons) option is enabled). If not set, $.ig.GridUpdating.locale.cancelTooltip is used. + * + */ + igGridUpdating(optionLiteral: 'option', optionName: "cancelTooltip"): string; + + /** + * Sets the title for the Cancel editing button (only applicable when the [showDoneCancelButtons](ui.iggridupdating#options:showDoneCancelButtons) option is enabled). If not set, $.ig.GridUpdating.locale.cancelTooltip is used. + * + * + * @optionValue New value to be set. + */ + igGridUpdating(optionLiteral: 'option', optionName: "cancelTooltip", optionValue: string): void; + + /** + * Gets the label for the button starting edit mode for row adding. If not set, $.ig.GridUpdating.locale.addRowLabel is used. + * + */ + igGridUpdating(optionLiteral: 'option', optionName: "addRowLabel"): string; + + /** + * Sets the label for the button starting edit mode for row adding. If not set, $.ig.GridUpdating.locale.addRowLabel is used. + * + * + * @optionValue New value to be set. + */ + igGridUpdating(optionLiteral: 'option', optionName: "addRowLabel", optionValue: string): void; + + /** + * Gets the title for the button starting edit mode for row adding. If not set, $.ig.GridUpdating.locale.addRowTooltip is used. + * + */ + igGridUpdating(optionLiteral: 'option', optionName: "addRowTooltip"): string; + + /** + * Sets the title for the button starting edit mode for row adding. If not set, $.ig.GridUpdating.locale.addRowTooltip is used. + * + * + * @optionValue New value to be set. + */ + igGridUpdating(optionLiteral: 'option', optionName: "addRowTooltip", optionValue: string): void; + + /** + * Gets the label for the delete button. If not set, $.ig.GridUpdating.locale.deleteRowLabel is used. + * + */ + igGridUpdating(optionLiteral: 'option', optionName: "deleteRowLabel"): string; + + /** + * Sets the label for the delete button. If not set, $.ig.GridUpdating.locale.deleteRowLabel is used. + * + * + * @optionValue New value to be set. + */ + igGridUpdating(optionLiteral: 'option', optionName: "deleteRowLabel", optionValue: string): void; + + /** + * Gets the title for the delete button. If not set, $.ig.GridUpdating.locale.deleteRowTooltip is used. + * + */ + igGridUpdating(optionLiteral: 'option', optionName: "deleteRowTooltip"): string; + + /** + * Sets the title for the delete button. If not set, $.ig.GridUpdating.locale.deleteRowTooltip is used. + * + * + * @optionValue New value to be set. + */ + igGridUpdating(optionLiteral: 'option', optionName: "deleteRowTooltip", optionValue: string): void; + + /** + * Determines if the Done and Cancel buttons will be available as means to end edit mode for [editMode](ui.iggridupdating#options:editMode) 'row' and when adding a new row. + * + */ + igGridUpdating(optionLiteral: 'option', optionName: "showDoneCancelButtons"): boolean; + + /** + * Determines if the Done and Cancel buttons will be available as means to end edit mode for [editMode](ui.iggridupdating#options:editMode) 'row' and when adding a new row. + * + * + * @optionValue New value to be set. + */ + igGridUpdating(optionLiteral: 'option', optionName: "showDoneCancelButtons", optionValue: boolean): void; + + /** + * Gets if an exception should be thrown when the grid's data view changes while there are pending transactions in the data source. The data view changes when the data source performs a sorting, filtering, groupby or paging operation and the exception thrown will prevent the operation from succeeding. All pending transactions must be committed before a data view operation is able to complete. Committing transactions can be done manually through the grid's [commit](ui.iggrid#methods:commit) function or automatically by setting [autoCommit](ui.iggrid#options:autoCommit) to 'true'. + * + */ + igGridUpdating(optionLiteral: 'option', optionName: "enableDataDirtyException"): boolean; + + /** + * Sets if an exception should be thrown when the grid's data view changes while there are pending transactions in the data source. The data view changes when the data source performs a sorting, filtering, groupby or paging operation and the exception thrown will prevent the operation from succeeding. All pending transactions must be committed before a data view operation is able to complete. Committing transactions can be done manually through the grid's [commit](ui.iggrid#methods:commit) function or automatically by setting [autoCommit](ui.iggrid#options:autoCommit) to 'true'. + * + * + * @optionValue New value to be set. + */ + igGridUpdating(optionLiteral: 'option', optionName: "enableDataDirtyException", optionValue: boolean): void; + + /** + * Gets how end-users are able to start edit mode. Possible values: "click", "dblclick", "F2", "enter" and their combinations separated by comma or in array. The keyboard triggers have effect only if the grid cells can receive focus (the grid's [tabIndex](ui.iggrid#options:tabIndex) property should not have a negative value) or Selection is enabled. If "dblclick" is included, then "click" has no effect. + * + */ + igGridUpdating(optionLiteral: 'option', optionName: "startEditTriggers"): string|Array; + + /** + * Sets how end-users are able to start edit mode. Possible values: "click", "dblclick", "F2", "enter" and their combinations separated by comma or in array. The keyboard triggers have effect only if the grid cells can receive focus (the grid's [tabIndex](ui.iggrid#options:tabIndex) property should not have a negative value) or Selection is enabled. If "dblclick" is included, then "click" has no effect. + * + * + * @optionValue New value to be set. + */ + igGridUpdating(optionLiteral: 'option', optionName: "startEditTriggers", optionValue: string|Array): void; + + /** + * Determines if pressing Enter to navigate away from the currently edited cell should move the focus horizontally or vertically (default). + * + */ + igGridUpdating(optionLiteral: 'option', optionName: "horizontalMoveOnEnter"): boolean; + + /** + * Determines if pressing Enter to navigate away from the currently edited cell should move the focus horizontally or vertically (default). + * + * + * @optionValue New value to be set. + */ + igGridUpdating(optionLiteral: 'option', optionName: "horizontalMoveOnEnter", optionValue: boolean): void; + + /** + * Enables excel navigation style. When turned on, the arrow keys can be used for changing the currently edited cell similar to how Tab and Enter behave. When disabled, the arrow keys control the cursor inside editors. + * + */ + igGridUpdating(optionLiteral: 'option', optionName: "excelNavigationMode"): boolean; + + /** + * Enables excel navigation style. When turned on, the arrow keys can be used for changing the currently edited cell similar to how Tab and Enter behave. When disabled, the arrow keys control the cursor inside editors. + * + * + * @optionValue New value to be set. + */ + igGridUpdating(optionLiteral: 'option', optionName: "excelNavigationMode", optionValue: boolean): void; + + /** + * Sets a custom function to be called when the AJAX request to the URL specified by the [updateUrl](ui.iggrid#options:updateUrl) property succeeds. The function will be called with arguments representing the data returned by the server. + * + */ + igGridUpdating(optionLiteral: 'option', optionName: "saveChangesSuccessHandler"): Function|string; + + /** + * Sets a custom function to be called when the AJAX request to the URL specified by the [updateUrl](ui.iggrid#options:updateUrl) property succeeds. The function will be called with arguments representing the data returned by the server. + * + * + * @optionValue New value to be set. + */ + igGridUpdating(optionLiteral: 'option', optionName: "saveChangesSuccessHandler", optionValue: Function|string): void; + + /** + * Sets a custom function to be called when the AJAX request to the URL specified by the [updateUrl](ui.iggrid#options:updateUrl) property fails. The function will be called with arguments representing the data returned by the server. + * + */ + igGridUpdating(optionLiteral: 'option', optionName: "saveChangesErrorHandler"): Function|string; + + /** + * Sets a custom function to be called when the AJAX request to the URL specified by the [updateUrl](ui.iggrid#options:updateUrl) property fails. The function will be called with arguments representing the data returned by the server. + * + * + * @optionValue New value to be set. + */ + igGridUpdating(optionLiteral: 'option', optionName: "saveChangesErrorHandler", optionValue: Function|string): void; + + /** + * On touch-enabled devices specifies the swipe distance for the delete button to appear. + * + */ + igGridUpdating(optionLiteral: 'option', optionName: "swipeDistance"): string|number; + + /** + * On touch-enabled devices specifies the swipe distance for the delete button to appear. + * + * + * @optionValue New value to be set. + */ + igGridUpdating(optionLiteral: 'option', optionName: "swipeDistance", optionValue: string|number): void; + + /** + * Controls if navigation will wrap around the grid. The feature will never wrap around virtual grids. + * + */ + igGridUpdating(optionLiteral: 'option', optionName: "wrapAround"): boolean; + + /** + * Controls if navigation will wrap around the grid. The feature will never wrap around virtual grids. + * + * + * @optionValue New value to be set. + */ + igGridUpdating(optionLiteral: 'option', optionName: "wrapAround", optionValue: boolean): void; + + /** + * A list of options controlling the rendering behavior of the row edit dialog. If [editMode](ui.iggridupdating#options:editMode) is not 'dialog' these have no effect. + * + */ + igGridUpdating(optionLiteral: 'option', optionName: "rowEditDialogOptions"): IgGridUpdatingRowEditDialogOptions; + + /** + * A list of options controlling the rendering behavior of the row edit dialog. If [editMode](ui.iggridupdating#options:editMode) is not 'dialog' these have no effect. + * + * + * @optionValue New value to be set. + */ + igGridUpdating(optionLiteral: 'option', optionName: "rowEditDialogOptions", optionValue: IgGridUpdatingRowEditDialogOptions): void; + + /** + * Name of the dialog widget to be used. It should inherit from $.ui.igGridModalDialog. For more information on how to utilize this property, please refer to the [Extending igGrid Modal Dialog](http://www.igniteui.com/help/extending-iggrid-modal-dialog) topic. + * + */ + igGridUpdating(optionLiteral: 'option', optionName: "dialogWidget"): string; + + /** + * Name of the dialog widget to be used. It should inherit from $.ui.igGridModalDialog. For more information on how to utilize this property, please refer to the [Extending igGrid Modal Dialog](http://www.igniteui.com/help/extending-iggrid-modal-dialog) topic. + * + * + * @optionValue New value to be set. + */ + igGridUpdating(optionLiteral: 'option', optionName: "dialogWidget", optionValue: string): void; + + /** + * Enables/disables feature inheritance for the child layouts in igHierarchicalGrid. + */ + igGridUpdating(optionLiteral: 'option', optionName: "inherit"): boolean; + + /** + * Enables/disables feature inheritance for the child layouts in igHierarchicalGrid. + * + * @optionValue New value to be set. + */ + igGridUpdating(optionLiteral: 'option', optionName: "inherit", optionValue: boolean): void; + + /** + * Event fired before row editing begins. + * Return false in order to cancel editing. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.rowID to get the row's PK value. + * Use ui.rowAdding to check if the edit mode is for adding a new row. + */ + igGridUpdating(optionLiteral: 'option', optionName: "editRowStarting"): EditRowStartingEvent; + + /** + * Event fired before row editing begins. + * Return false in order to cancel editing. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.rowID to get the row's PK value. + * Use ui.rowAdding to check if the edit mode is for adding a new row. + * + * @optionValue Define event handler function. + */ + igGridUpdating(optionLiteral: 'option', optionName: "editRowStarting", optionValue: EditRowStartingEvent): void; + + /** + * Event fired after row editing begins. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.rowID to get the row's PK value. + * Use ui.rowAdding to check if the edit mode is for adding a new row. + */ + igGridUpdating(optionLiteral: 'option', optionName: "editRowStarted"): EditRowStartedEvent; + + /** + * Event fired after row editing begins. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.rowID to get the row's PK value. + * Use ui.rowAdding to check if the edit mode is for adding a new row. + * + * @optionValue Define event handler function. + */ + igGridUpdating(optionLiteral: 'option', optionName: "editRowStarted", optionValue: EditRowStartedEvent): void; + + /** + * Event fired before row editing ends. + * Return false in order to prevent the grid from exiting edit mode. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.rowID to get the row's PK value. + * Use ui.update to check if any of the values is changed which will cause update in the data source. Can be manually set to false to prevent this update. + * Use ui.rowAdding to check if the edit mode is for adding a new row. + * Use ui.values[key] to get or set the new value for the column with the specified key. + * Use ui.oldValues[key] to get the old value for the column with the specified key. + */ + igGridUpdating(optionLiteral: 'option', optionName: "editRowEnding"): EditRowEndingEvent; + + /** + * Event fired before row editing ends. + * Return false in order to prevent the grid from exiting edit mode. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.rowID to get the row's PK value. + * Use ui.update to check if any of the values is changed which will cause update in the data source. Can be manually set to false to prevent this update. + * Use ui.rowAdding to check if the edit mode is for adding a new row. + * Use ui.values[key] to get or set the new value for the column with the specified key. + * Use ui.oldValues[key] to get the old value for the column with the specified key. + * + * @optionValue Define event handler function. + */ + igGridUpdating(optionLiteral: 'option', optionName: "editRowEnding", optionValue: EditRowEndingEvent): void; + + /** + * Event fired after row editing ends. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.rowID to get the row's PK value. + * Use ui.update to check if any of the values is changed which will cause update in the data source. + * Use ui.rowAdding to check if the edit mode is for adding a new row. + * Use ui.values[key] to get the new value for the column with the specified key. + * Use ui.oldValues[key] to get the old value for the column with the specified key. + */ + igGridUpdating(optionLiteral: 'option', optionName: "editRowEnded"): EditRowEndedEvent; + + /** + * Event fired after row editing ends. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.rowID to get the row's PK value. + * Use ui.update to check if any of the values is changed which will cause update in the data source. + * Use ui.rowAdding to check if the edit mode is for adding a new row. + * Use ui.values[key] to get the new value for the column with the specified key. + * Use ui.oldValues[key] to get the old value for the column with the specified key. + * + * @optionValue Define event handler function. + */ + igGridUpdating(optionLiteral: 'option', optionName: "editRowEnded", optionValue: EditRowEndedEvent): void; + + /** + * Event fired before cell editing begins (including when row editing opens editing for a cell). + * Return false in order to cancel editing. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.rowID to get the row's PK value. + * Use ui.columnIndex to get the index of the column. + * Use ui.columnKey to get the key of the column. + * Use ui.editor to get a reference to the editor used for editing the column. + * Use ui.value to get or set the value of the editor. + * Use ui.rowAdding to check if the edit mode is for adding a new row. + */ + igGridUpdating(optionLiteral: 'option', optionName: "editCellStarting"): EditCellStartingEvent; + + /** + * Event fired before cell editing begins (including when row editing opens editing for a cell). + * Return false in order to cancel editing. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.rowID to get the row's PK value. + * Use ui.columnIndex to get the index of the column. + * Use ui.columnKey to get the key of the column. + * Use ui.editor to get a reference to the editor used for editing the column. + * Use ui.value to get or set the value of the editor. + * Use ui.rowAdding to check if the edit mode is for adding a new row. + * + * @optionValue Define event handler function. + */ + igGridUpdating(optionLiteral: 'option', optionName: "editCellStarting", optionValue: EditCellStartingEvent): void; + + /** + * Event fired after cell editing begins (including when row editing opens editing for a cell). + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.rowID to get the row's PK value. + * Use ui.columnIndex to get the index of the column. + * Use ui.columnKey to get the key of the column. + * Use ui.editor to get a reference to the editor used for editing the column. + * Use ui.value to get the value of the editor. + * Use ui.rowAdding to check if the edit mode is for adding a new row. + */ + igGridUpdating(optionLiteral: 'option', optionName: "editCellStarted"): EditCellStartedEvent; + + /** + * Event fired after cell editing begins (including when row editing opens editing for a cell). + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.rowID to get the row's PK value. + * Use ui.columnIndex to get the index of the column. + * Use ui.columnKey to get the key of the column. + * Use ui.editor to get a reference to the editor used for editing the column. + * Use ui.value to get the value of the editor. + * Use ui.rowAdding to check if the edit mode is for adding a new row. + * + * @optionValue Define event handler function. + */ + igGridUpdating(optionLiteral: 'option', optionName: "editCellStarted", optionValue: EditCellStartedEvent): void; + + /** + * Event fired before cell editing ends (including when row editing closes editing for a cell). + * Return false in order to prevent the grid from exiting edit mode (only functions if [editMode](ui.iggridupdating#options:editMode) is 'cell'). + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.rowID to get the row's PK value. + * Use ui.columnIndex to get the index of the column. + * Use ui.columnKey to get the key of the column. + * Use ui.editor to get a reference to the editor used for editing the column. + * Use ui.value to get or set the value to be used when updating the data source. + * Use ui.oldValue to get the old value. + * Use ui.update to check if the value is changed which will cause update in the data source. Can be manually set to false to prevent this update. + * Use ui.rowAdding to check if the edit mode is for adding a new row. + */ + igGridUpdating(optionLiteral: 'option', optionName: "editCellEnding"): EditCellEndingEvent; + + /** + * Event fired before cell editing ends (including when row editing closes editing for a cell). + * Return false in order to prevent the grid from exiting edit mode (only functions if [editMode](ui.iggridupdating#options:editMode) is 'cell'). + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.rowID to get the row's PK value. + * Use ui.columnIndex to get the index of the column. + * Use ui.columnKey to get the key of the column. + * Use ui.editor to get a reference to the editor used for editing the column. + * Use ui.value to get or set the value to be used when updating the data source. + * Use ui.oldValue to get the old value. + * Use ui.update to check if the value is changed which will cause update in the data source. Can be manually set to false to prevent this update. + * Use ui.rowAdding to check if the edit mode is for adding a new row. + * + * @optionValue Define event handler function. + */ + igGridUpdating(optionLiteral: 'option', optionName: "editCellEnding", optionValue: EditCellEndingEvent): void; + + /** + * Event fired after cell editing ends (including when row editing closes editing for a cell). + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.rowID to get the row's PK value. + * Use ui.columnIndex to get the index of the column. + * Use ui.columnKey to get the key of the column. + * Use ui.editor to get a reference to the editor used for editing the column. + * Use ui.value to get the new value. + * Use ui.oldValue to get the old value. + * Use ui.update to check if the value is changed which will cause update in the data source. + * Use ui.rowAdding to check if the edit mode is for adding a new row. + */ + igGridUpdating(optionLiteral: 'option', optionName: "editCellEnded"): EditCellEndedEvent; + + /** + * Event fired after cell editing ends (including when row editing closes editing for a cell). + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.rowID to get the row's PK value. + * Use ui.columnIndex to get the index of the column. + * Use ui.columnKey to get the key of the column. + * Use ui.editor to get a reference to the editor used for editing the column. + * Use ui.value to get the new value. + * Use ui.oldValue to get the old value. + * Use ui.update to check if the value is changed which will cause update in the data source. + * Use ui.rowAdding to check if the edit mode is for adding a new row. + * + * @optionValue Define event handler function. + */ + igGridUpdating(optionLiteral: 'option', optionName: "editCellEnded", optionValue: EditCellEndedEvent): void; + + /** + * Event fired before adding a new row. + * Return false in order to cancel the adding of the new row to the data source. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.values[key] to get the value for the column with the specified key. + * Use ui.oldValues[key] to get the default value (before editing) for the column with the specified key. + */ + igGridUpdating(optionLiteral: 'option', optionName: "rowAdding"): RowAddingEvent; + + /** + * Event fired before adding a new row. + * Return false in order to cancel the adding of the new row to the data source. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.values[key] to get the value for the column with the specified key. + * Use ui.oldValues[key] to get the default value (before editing) for the column with the specified key. + * + * @optionValue Define event handler function. + */ + igGridUpdating(optionLiteral: 'option', optionName: "rowAdding", optionValue: RowAddingEvent): void; + + /** + * Event fired after adding a new row. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.values[key] to get the value for the column with the specified key. + * Use ui.oldValues[key] to get the default value (before editing) for the column with the specified key. + */ + igGridUpdating(optionLiteral: 'option', optionName: "rowAdded"): RowAddedEvent; + + /** + * Event fired after adding a new row. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.values[key] to get the value for the column with the specified key. + * Use ui.oldValues[key] to get the default value (before editing) for the column with the specified key. + * + * @optionValue Define event handler function. + */ + igGridUpdating(optionLiteral: 'option', optionName: "rowAdded", optionValue: RowAddedEvent): void; + + /** + * Event fired before deleting a row. + * Return false in order to cancel the row's deletion. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.element to get a jQuery object containing the TR element of the row to delete. + * Use ui.rowID to get the row's PK value. + */ + igGridUpdating(optionLiteral: 'option', optionName: "rowDeleting"): RowDeletingEvent; + + /** + * Event fired before deleting a row. + * Return false in order to cancel the row's deletion. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.element to get a jQuery object containing the TR element of the row to delete. + * Use ui.rowID to get the row's PK value. + * + * @optionValue Define event handler function. + */ + igGridUpdating(optionLiteral: 'option', optionName: "rowDeleting", optionValue: RowDeletingEvent): void; + + /** + * Event fired after a row is deleted. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.element to get a jQuery object containing the TR element of the deleted row. + * Use ui.rowID to get the row's PK value. + */ + igGridUpdating(optionLiteral: 'option', optionName: "rowDeleted"): RowDeletedEvent; + + /** + * Event fired after a row is deleted. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.element to get a jQuery object containing the TR element of the deleted row. + * Use ui.rowID to get the row's PK value. + * + * @optionValue Define event handler function. + */ + igGridUpdating(optionLiteral: 'option', optionName: "rowDeleted", optionValue: RowDeletedEvent): void; + + /** + * Event fired before the dataDirtyException is thrown. This can be controlled by the [enableDataDirtyException](ui.iggridupdating#options:enableDataDirtyException) property. Any pending changes may be committed in the handler of this event in order to prevent dataDirtyException from being thrown. + * Return false in order to prevent the exception. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + */ + igGridUpdating(optionLiteral: 'option', optionName: "dataDirty"): DataDirtyEvent; + + /** + * Event fired before the dataDirtyException is thrown. This can be controlled by the [enableDataDirtyException](ui.iggridupdating#options:enableDataDirtyException) property. Any pending changes may be committed in the handler of this event in order to prevent dataDirtyException from being thrown. + * Return false in order to prevent the exception. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * + * @optionValue Define event handler function. + */ + igGridUpdating(optionLiteral: 'option', optionName: "dataDirty", optionValue: DataDirtyEvent): void; + + /** + * Event fired before editing starts for adding a new row, when Updating generates an automatic primary key for it. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.value to get the auto-generated primary key (the number of records in the data source + 1) or set a custom unique primary key for the new row. + */ + igGridUpdating(optionLiteral: 'option', optionName: "generatePrimaryKeyValue"): GeneratePrimaryKeyValueEvent; + + /** + * Event fired before editing starts for adding a new row, when Updating generates an automatic primary key for it. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.value to get the auto-generated primary key (the number of records in the data source + 1) or set a custom unique primary key for the new row. + * + * @optionValue Define event handler function. + */ + igGridUpdating(optionLiteral: 'option', optionName: "generatePrimaryKeyValue", optionValue: GeneratePrimaryKeyValueEvent): void; + + /** + * Event fired before the row edit dialog is opened. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.dialogElement to get reference to row edit dialog DOM element. + */ + igGridUpdating(optionLiteral: 'option', optionName: "rowEditDialogBeforeOpen"): RowEditDialogBeforeOpenEvent; + + /** + * Event fired before the row edit dialog is opened. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.dialogElement to get reference to row edit dialog DOM element. + * + * @optionValue Define event handler function. + */ + igGridUpdating(optionLiteral: 'option', optionName: "rowEditDialogBeforeOpen", optionValue: RowEditDialogBeforeOpenEvent): void; + + /** + * Event fired after the row edit dialog is opened. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.dialogElement to get reference to row edit dialog DOM element. + */ + igGridUpdating(optionLiteral: 'option', optionName: "rowEditDialogAfterOpen"): RowEditDialogAfterOpenEvent; + + /** + * Event fired after the row edit dialog is opened. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.dialogElement to get reference to row edit dialog DOM element. + * + * @optionValue Define event handler function. + */ + igGridUpdating(optionLiteral: 'option', optionName: "rowEditDialogAfterOpen", optionValue: RowEditDialogAfterOpenEvent): void; + + /** + * Event fired before the row edit dialog is closed. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.dialogElement to get reference to row edit dialog DOM element. + */ + igGridUpdating(optionLiteral: 'option', optionName: "rowEditDialogBeforeClose"): RowEditDialogBeforeCloseEvent; + + /** + * Event fired before the row edit dialog is closed. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.dialogElement to get reference to row edit dialog DOM element. + * + * @optionValue Define event handler function. + */ + igGridUpdating(optionLiteral: 'option', optionName: "rowEditDialogBeforeClose", optionValue: RowEditDialogBeforeCloseEvent): void; + + /** + * Event fired after the row edit dialog is closed. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.dialogElement to get reference to row edit dialog DOM element. + */ + igGridUpdating(optionLiteral: 'option', optionName: "rowEditDialogAfterClose"): RowEditDialogAfterCloseEvent; + + /** + * Event fired after the row edit dialog is closed. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.dialogElement to get reference to row edit dialog DOM element. + * + * @optionValue Define event handler function. + */ + igGridUpdating(optionLiteral: 'option', optionName: "rowEditDialogAfterClose", optionValue: RowEditDialogAfterCloseEvent): void; + + /** + * Event fired after the row edit dialog is rendered. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.dialogElement to get reference to row edit dialog DOM element. + */ + igGridUpdating(optionLiteral: 'option', optionName: "rowEditDialogContentsRendered"): RowEditDialogContentsRenderedEvent; + + /** + * Event fired after the row edit dialog is rendered. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.dialogElement to get reference to row edit dialog DOM element. + * + * @optionValue Define event handler function. + */ + igGridUpdating(optionLiteral: 'option', optionName: "rowEditDialogContentsRendered", optionValue: RowEditDialogContentsRenderedEvent): void; + igGridUpdating(options: IgGridUpdating): JQuery; + igGridUpdating(optionLiteral: 'option', optionName: string): any; + igGridUpdating(optionLiteral: 'option', options: IgGridUpdating): JQuery; + igGridUpdating(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igGridUpdating(methodName: string, ...methodParams: any[]): any; +} +interface ActionExecutingEvent { + (event: Event, ui: ActionExecutingEventUIParam): void; +} + +interface ActionExecutingEventUIParam { +} + +interface ActionExecutedEvent { + (event: Event, ui: ActionExecutedEventUIParam): void; +} + +interface ActionExecutedEventUIParam { +} + +interface ToolbarCollapsingEvent { + (event: Event, ui: ToolbarCollapsingEventUIParam): void; +} + +interface ToolbarCollapsingEventUIParam { +} + +interface ToolbarCollapsedEvent { + (event: Event, ui: ToolbarCollapsedEventUIParam): void; +} + +interface ToolbarCollapsedEventUIParam { +} + +interface ToolbarExpandingEvent { + (event: Event, ui: ToolbarExpandingEventUIParam): void; +} + +interface ToolbarExpandingEventUIParam { +} + +interface ToolbarExpandedEvent { + (event: Event, ui: ToolbarExpandedEventUIParam): void; +} + +interface ToolbarExpandedEventUIParam { +} + +interface CutEvent { + (event: Event, ui: CutEventUIParam): void; +} + +interface CutEventUIParam { +} + +interface CopyEvent { + (event: Event, ui: CopyEventUIParam): void; +} + +interface CopyEventUIParam { +} + +interface PasteEvent { + (event: Event, ui: PasteEventUIParam): void; +} + +interface PasteEventUIParam { +} + +interface UndoEvent { + (event: Event, ui: UndoEventUIParam): void; +} + +interface UndoEventUIParam { +} + +interface RedoEvent { + (event: Event, ui: RedoEventUIParam): void; +} + +interface RedoEventUIParam { +} + +interface WorkspaceResizedEvent { + (event: Event, ui: WorkspaceResizedEventUIParam): void; +} + +interface WorkspaceResizedEventUIParam { +} + +interface IgHtmlEditor { + /** + * Shows/hides the "Formatting" toolbar. + * + */ + showFormattingToolbar?: boolean; + + /** + * Shows/hides the "Text" toolbar. + * + */ + showTextToolbar?: boolean; + + /** + * Shows/hides the "Insert Object" toolbar. + * + */ + showInsertObjectToolbar?: boolean; + + /** + * Shows/hides the "Copy Paste" toolbar. + * + */ + showCopyPasteToolbar?: boolean; + + /** + * The width of the html editor. It can be set as a number in pixels, string (px) or percentage (%). + * + */ + width?: string|number; + + /** + * The height of the html editor. It can be set as a number in pixels, string (px) or percentage (%). + * + */ + height?: string|number; + + /** + * The html editor toolbars list. + * + */ + toolbarSettings?: any[]; + + /** + * The html editor custom toolbars list. + * + */ + customToolbars?: any[]; + + /** + * The name attribute of the html editor source view. + * + */ + inputName?: string; + + /** + * Used to render inside the html editor as initial content + * + */ + value?: string; + + /** + * Event fired after the html editor widget has been rendered. + */ + rendered?: RenderedEvent; + + /** + * Event fired before the html editor widget is rendered. + */ + rendering?: RenderingEvent; + + /** + * Event fired before a toolbar item is clicked. + */ + actionExecuting?: ActionExecutingEvent; + + /** + * Event fired after a toolbar item is clicked. + */ + actionExecuted?: ActionExecutedEvent; + + /** + * Event fired before a toolbar is collapsed. + */ + toolbarCollapsing?: ToolbarCollapsingEvent; + + /** + * Event fired after a toolbar is collapsed. + */ + toolbarCollapsed?: ToolbarCollapsedEvent; + + /** + * Event fired before a toolbar is expanded. + */ + toolbarExpanding?: ToolbarExpandingEvent; + + /** + * Event fired after a toolbar is expanded. + */ + toolbarExpanded?: ToolbarExpandedEvent; + + /** + * Event is fired on keyboard cut action. + */ + cut?: CutEvent; + + /** + * Event is fired on keyboard copy action. + */ + copy?: CopyEvent; + + /** + * Event is fired on keyboard paste action. + */ + paste?: PasteEvent; + + /** + * Event is fired on keyboard undo action. + */ + undo?: UndoEvent; + + /** + * Event is fired on keyboard redo action. + */ + redo?: RedoEvent; + + /** + * Event is fired after the workspace has been resized + */ + workspaceResized?: WorkspaceResizedEvent; + + /** + * Option for igHtmlEditor + */ + [optionName: string]: any; +} +interface IgHtmlEditorMethods { + /** + * Returns the element on which the widget was instantiated + */ + widget(): void; + + /** + * Resizes the height of the workspace + */ + resizeWorkspace(): void; + + /** + * Gets the content of the html editor. + * + * @param format Returns the content as html or plain text. Values can be "text" or "html". + */ + getContent(format: string): string; + + /** + * Sets the content of the html editor. + * + * @param content The content which will be set. + * @param format The content type: "text" or "html". + */ + setContent(content: string, format: string): void; + + /** + * Destroys the widget. + */ + destroy(): void; + + /** + * Executes htmleditor commands. + * + * @param actionName The command name. + * @param args Additional parameter for the command. + */ + executeAction(actionName: string, args?: Object): void; + + /** + * Returns true/false if the editor contents were modified or not. + */ + isDirty(): Object; + + /** + * Returns the window object associated with the Html Editor's content editable area + */ + contentWindow(): Object; + + /** + * Returns the document object associated with the Html Editor's content editable area + */ + contentDocument(): Object; + + /** + * Returns the content editable associated with this Html Editor + */ + contentEditable(): Object; + + /** + * Returns Selection object that represent the current selection in the content editable + */ + selection(): Object; + + /** + * Returns Range object that represent the current range in the content editable + */ + range(): Object; + + /** + * Inserts the provided content at the position of the caret. + * + * @param element Accepts html string, DOM element or a jQuery object. + */ + insertAtCaret(element: Object): void; +} +interface JQuery { + data(propertyName: "igHtmlEditor"): IgHtmlEditorMethods; +} + +interface IgPathFinder { + items?: any; + + /** + * Option for igPathFinder + */ + [optionName: string]: any; +} + +interface ApplyEvent { + (event: Event, ui: ApplyEventUIParam): void; +} + +interface ApplyEventUIParam { +} + +interface CancelEvent { + (event: Event, ui: CancelEventUIParam): void; +} + +interface CancelEventUIParam { +} + +interface ShowEvent { + (event: Event, ui: ShowEventUIParam): void; +} + +interface ShowEventUIParam { +} + +interface HideEvent { + (event: Event, ui: HideEventUIParam): void; +} + +interface HideEventUIParam { +} + +interface IgHtmlEditorPopover { + item?: any; + target?: any; + isHidden?: boolean; + apply?: ApplyEvent; + cancel?: CancelEvent; + show?: ShowEvent; + hide?: HideEvent; + + /** + * Option for igHtmlEditorPopover + */ + [optionName: string]: any; +} +interface IgHtmlEditorPopoverMethods { + show(item: Object): void; + hide(): void; +} +interface JQuery { + data(propertyName: "igHtmlEditorPopover"): IgHtmlEditorPopoverMethods; +} + +interface IgLinkPropertiesDialog { + item?: any; + target?: any; + isHidden?: boolean; + apply?: ApplyEvent; + cancel?: CancelEvent; + show?: ShowEvent; + hide?: HideEvent; + + /** + * Option for igLinkPropertiesDialog + */ + [optionName: string]: any; +} +interface IgLinkPropertiesDialogMethods { + show(item: Object): void; + hide(): void; +} +interface JQuery { + data(propertyName: "igLinkPropertiesDialog"): IgLinkPropertiesDialogMethods; +} + +interface IgTablePropertiesDialog { + item?: any; + target?: any; + isHidden?: boolean; + apply?: ApplyEvent; + cancel?: CancelEvent; + show?: ShowEvent; + hide?: HideEvent; + + /** + * Option for igTablePropertiesDialog + */ + [optionName: string]: any; +} +interface IgTablePropertiesDialogMethods { + show(item: Object): void; + hide(): void; +} +interface JQuery { + data(propertyName: "igTablePropertiesDialog"): IgTablePropertiesDialogMethods; +} + +interface IgImagePropertiesDialog { + item?: any; + target?: any; + isHidden?: boolean; + apply?: ApplyEvent; + cancel?: CancelEvent; + show?: ShowEvent; + hide?: HideEvent; + + /** + * Option for igImagePropertiesDialog + */ + [optionName: string]: any; +} +interface IgImagePropertiesDialogMethods { + show(item: Object): void; + hide(): void; +} +interface JQuery { + data(propertyName: "igImagePropertiesDialog"): IgImagePropertiesDialogMethods; +} + +declare namespace Infragistics { + class SelectionWrapper { + constructor(NODE: any); + getSelectedItem(): void; + getSelectionAsText(): void; + select(element: Object): void; + insertElement(element: Object): void; + execCommand(name: Object, args: Object): void; + replaceNode(newNode: Object): void; + insertTable(table: Object): void; + focus(): void; + } +} +interface IgniteUIStatic { + SelectionWrapper: typeof Infragistics.SelectionWrapper; +} + +declare namespace Infragistics { + class ToolbarHelper { + analyse(el: Object): void; + } +} + +interface JQuery { + igHtmlEditor(methodName: "widget"): void; + igHtmlEditor(methodName: "resizeWorkspace"): void; + igHtmlEditor(methodName: "getContent", format: string): string; + igHtmlEditor(methodName: "setContent", content: string, format: string): void; + igHtmlEditor(methodName: "destroy"): void; + igHtmlEditor(methodName: "executeAction", actionName: string, args?: Object): void; + igHtmlEditor(methodName: "isDirty"): Object; + igHtmlEditor(methodName: "contentWindow"): Object; + igHtmlEditor(methodName: "contentDocument"): Object; + igHtmlEditor(methodName: "contentEditable"): Object; + igHtmlEditor(methodName: "selection"): Object; + igHtmlEditor(methodName: "range"): Object; + igHtmlEditor(methodName: "insertAtCaret", element: Object): void; + + /** + * Shows/hides the "Formatting" toolbar. + * + */ + igHtmlEditor(optionLiteral: 'option', optionName: "showFormattingToolbar"): boolean; + + /** + * Shows/hides the "Formatting" toolbar. + * + * + * @optionValue New value to be set. + */ + igHtmlEditor(optionLiteral: 'option', optionName: "showFormattingToolbar", optionValue: boolean): void; + + /** + * Shows/hides the "Text" toolbar. + * + */ + igHtmlEditor(optionLiteral: 'option', optionName: "showTextToolbar"): boolean; + + /** + * Shows/hides the "Text" toolbar. + * + * + * @optionValue New value to be set. + */ + igHtmlEditor(optionLiteral: 'option', optionName: "showTextToolbar", optionValue: boolean): void; + + /** + * Shows/hides the "Insert Object" toolbar. + * + */ + igHtmlEditor(optionLiteral: 'option', optionName: "showInsertObjectToolbar"): boolean; + + /** + * Shows/hides the "Insert Object" toolbar. + * + * + * @optionValue New value to be set. + */ + igHtmlEditor(optionLiteral: 'option', optionName: "showInsertObjectToolbar", optionValue: boolean): void; + + /** + * Shows/hides the "Copy Paste" toolbar. + * + */ + igHtmlEditor(optionLiteral: 'option', optionName: "showCopyPasteToolbar"): boolean; + + /** + * Shows/hides the "Copy Paste" toolbar. + * + * + * @optionValue New value to be set. + */ + igHtmlEditor(optionLiteral: 'option', optionName: "showCopyPasteToolbar", optionValue: boolean): void; + + /** + * The width of the html editor. It can be set as a number in pixels, string (px) or percentage (%). + * + */ + igHtmlEditor(optionLiteral: 'option', optionName: "width"): string|number; + + /** + * The width of the html editor. It can be set as a number in pixels, string (px) or percentage (%). + * + * + * @optionValue New value to be set. + */ + igHtmlEditor(optionLiteral: 'option', optionName: "width", optionValue: string|number): void; + + /** + * The height of the html editor. It can be set as a number in pixels, string (px) or percentage (%). + * + */ + igHtmlEditor(optionLiteral: 'option', optionName: "height"): string|number; + + /** + * The height of the html editor. It can be set as a number in pixels, string (px) or percentage (%). + * + * + * @optionValue New value to be set. + */ + igHtmlEditor(optionLiteral: 'option', optionName: "height", optionValue: string|number): void; + + /** + * The html editor toolbars list. + * + */ + igHtmlEditor(optionLiteral: 'option', optionName: "toolbarSettings"): any[]; + + /** + * The html editor toolbars list. + * + * + * @optionValue New value to be set. + */ + igHtmlEditor(optionLiteral: 'option', optionName: "toolbarSettings", optionValue: any[]): void; + + /** + * The html editor custom toolbars list. + * + */ + igHtmlEditor(optionLiteral: 'option', optionName: "customToolbars"): any[]; + + /** + * The html editor custom toolbars list. + * + * + * @optionValue New value to be set. + */ + igHtmlEditor(optionLiteral: 'option', optionName: "customToolbars", optionValue: any[]): void; + + /** + * The name attribute of the html editor source view. + * + */ + igHtmlEditor(optionLiteral: 'option', optionName: "inputName"): string; + + /** + * The name attribute of the html editor source view. + * + * + * @optionValue New value to be set. + */ + igHtmlEditor(optionLiteral: 'option', optionName: "inputName", optionValue: string): void; + + /** + * Used to render inside the html editor as initial content + * + */ + igHtmlEditor(optionLiteral: 'option', optionName: "value"): string; + + /** + * Used to render inside the html editor as initial content + * + * + * @optionValue New value to be set. + */ + igHtmlEditor(optionLiteral: 'option', optionName: "value", optionValue: string): void; + + /** + * Event fired after the html editor widget has been rendered. + */ + igHtmlEditor(optionLiteral: 'option', optionName: "rendered"): RenderedEvent; + + /** + * Event fired after the html editor widget has been rendered. + * + * @optionValue Define event handler function. + */ + igHtmlEditor(optionLiteral: 'option', optionName: "rendered", optionValue: RenderedEvent): void; + + /** + * Event fired before the html editor widget is rendered. + */ + igHtmlEditor(optionLiteral: 'option', optionName: "rendering"): RenderingEvent; + + /** + * Event fired before the html editor widget is rendered. + * + * @optionValue Define event handler function. + */ + igHtmlEditor(optionLiteral: 'option', optionName: "rendering", optionValue: RenderingEvent): void; + + /** + * Event fired before a toolbar item is clicked. + */ + igHtmlEditor(optionLiteral: 'option', optionName: "actionExecuting"): ActionExecutingEvent; + + /** + * Event fired before a toolbar item is clicked. + * + * @optionValue Define event handler function. + */ + igHtmlEditor(optionLiteral: 'option', optionName: "actionExecuting", optionValue: ActionExecutingEvent): void; + + /** + * Event fired after a toolbar item is clicked. + */ + igHtmlEditor(optionLiteral: 'option', optionName: "actionExecuted"): ActionExecutedEvent; + + /** + * Event fired after a toolbar item is clicked. + * + * @optionValue Define event handler function. + */ + igHtmlEditor(optionLiteral: 'option', optionName: "actionExecuted", optionValue: ActionExecutedEvent): void; + + /** + * Event fired before a toolbar is collapsed. + */ + igHtmlEditor(optionLiteral: 'option', optionName: "toolbarCollapsing"): ToolbarCollapsingEvent; + + /** + * Event fired before a toolbar is collapsed. + * + * @optionValue Define event handler function. + */ + igHtmlEditor(optionLiteral: 'option', optionName: "toolbarCollapsing", optionValue: ToolbarCollapsingEvent): void; + + /** + * Event fired after a toolbar is collapsed. + */ + igHtmlEditor(optionLiteral: 'option', optionName: "toolbarCollapsed"): ToolbarCollapsedEvent; + + /** + * Event fired after a toolbar is collapsed. + * + * @optionValue Define event handler function. + */ + igHtmlEditor(optionLiteral: 'option', optionName: "toolbarCollapsed", optionValue: ToolbarCollapsedEvent): void; + + /** + * Event fired before a toolbar is expanded. + */ + igHtmlEditor(optionLiteral: 'option', optionName: "toolbarExpanding"): ToolbarExpandingEvent; + + /** + * Event fired before a toolbar is expanded. + * + * @optionValue Define event handler function. + */ + igHtmlEditor(optionLiteral: 'option', optionName: "toolbarExpanding", optionValue: ToolbarExpandingEvent): void; + + /** + * Event fired after a toolbar is expanded. + */ + igHtmlEditor(optionLiteral: 'option', optionName: "toolbarExpanded"): ToolbarExpandedEvent; + + /** + * Event fired after a toolbar is expanded. + * + * @optionValue Define event handler function. + */ + igHtmlEditor(optionLiteral: 'option', optionName: "toolbarExpanded", optionValue: ToolbarExpandedEvent): void; + + /** + * Event is fired on keyboard cut action. + */ + igHtmlEditor(optionLiteral: 'option', optionName: "cut"): CutEvent; + + /** + * Event is fired on keyboard cut action. + * + * @optionValue Define event handler function. + */ + igHtmlEditor(optionLiteral: 'option', optionName: "cut", optionValue: CutEvent): void; + + /** + * Event is fired on keyboard copy action. + */ + igHtmlEditor(optionLiteral: 'option', optionName: "copy"): CopyEvent; + + /** + * Event is fired on keyboard copy action. + * + * @optionValue Define event handler function. + */ + igHtmlEditor(optionLiteral: 'option', optionName: "copy", optionValue: CopyEvent): void; + + /** + * Event is fired on keyboard paste action. + */ + igHtmlEditor(optionLiteral: 'option', optionName: "paste"): PasteEvent; + + /** + * Event is fired on keyboard paste action. + * + * @optionValue Define event handler function. + */ + igHtmlEditor(optionLiteral: 'option', optionName: "paste", optionValue: PasteEvent): void; + + /** + * Event is fired on keyboard undo action. + */ + igHtmlEditor(optionLiteral: 'option', optionName: "undo"): UndoEvent; + + /** + * Event is fired on keyboard undo action. + * + * @optionValue Define event handler function. + */ + igHtmlEditor(optionLiteral: 'option', optionName: "undo", optionValue: UndoEvent): void; + + /** + * Event is fired on keyboard redo action. + */ + igHtmlEditor(optionLiteral: 'option', optionName: "redo"): RedoEvent; + + /** + * Event is fired on keyboard redo action. + * + * @optionValue Define event handler function. + */ + igHtmlEditor(optionLiteral: 'option', optionName: "redo", optionValue: RedoEvent): void; + + /** + * Event is fired after the workspace has been resized + */ + igHtmlEditor(optionLiteral: 'option', optionName: "workspaceResized"): WorkspaceResizedEvent; + + /** + * Event is fired after the workspace has been resized + * + * @optionValue Define event handler function. + */ + igHtmlEditor(optionLiteral: 'option', optionName: "workspaceResized", optionValue: WorkspaceResizedEvent): void; + igHtmlEditor(options: IgHtmlEditor): JQuery; + igHtmlEditor(optionLiteral: 'option', optionName: string): any; + igHtmlEditor(optionLiteral: 'option', options: IgHtmlEditor): JQuery; + igHtmlEditor(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igHtmlEditor(methodName: string, ...methodParams: any[]): any; +} +interface JQuery { + /** + */ + igPathFinder(optionLiteral: 'option', optionName: "items"): any; + + /** + */ + igPathFinder(optionLiteral: 'option', optionName: "items", optionValue: any): void; + igPathFinder(options: IgPathFinder): JQuery; + igPathFinder(optionLiteral: 'option', optionName: string): any; + igPathFinder(optionLiteral: 'option', options: IgPathFinder): JQuery; + igPathFinder(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igPathFinder(methodName: string, ...methodParams: any[]): any; +} +interface JQuery { + igHtmlEditorPopover(methodName: "show", item: Object): void; + igHtmlEditorPopover(methodName: "hide"): void; + + /** + */ + igHtmlEditorPopover(optionLiteral: 'option', optionName: "item"): any; + + /** + */ + igHtmlEditorPopover(optionLiteral: 'option', optionName: "item", optionValue: any): void; + + /** + */ + igHtmlEditorPopover(optionLiteral: 'option', optionName: "target"): any; + + /** + */ + igHtmlEditorPopover(optionLiteral: 'option', optionName: "target", optionValue: any): void; + + /** + */ + igHtmlEditorPopover(optionLiteral: 'option', optionName: "isHidden"): boolean; + + /** + */ + igHtmlEditorPopover(optionLiteral: 'option', optionName: "isHidden", optionValue: boolean): void; + + /** + */ + igHtmlEditorPopover(optionLiteral: 'option', optionName: "apply"): ApplyEvent; + + /** + */ + igHtmlEditorPopover(optionLiteral: 'option', optionName: "apply", optionValue: ApplyEvent): void; + + /** + */ + igHtmlEditorPopover(optionLiteral: 'option', optionName: "cancel"): CancelEvent; + + /** + */ + igHtmlEditorPopover(optionLiteral: 'option', optionName: "cancel", optionValue: CancelEvent): void; + + /** + */ + igHtmlEditorPopover(optionLiteral: 'option', optionName: "show"): ShowEvent; + + /** + */ + igHtmlEditorPopover(optionLiteral: 'option', optionName: "show", optionValue: ShowEvent): void; + + /** + */ + igHtmlEditorPopover(optionLiteral: 'option', optionName: "hide"): HideEvent; + + /** + */ + igHtmlEditorPopover(optionLiteral: 'option', optionName: "hide", optionValue: HideEvent): void; + igHtmlEditorPopover(options: IgHtmlEditorPopover): JQuery; + igHtmlEditorPopover(optionLiteral: 'option', optionName: string): any; + igHtmlEditorPopover(optionLiteral: 'option', options: IgHtmlEditorPopover): JQuery; + igHtmlEditorPopover(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igHtmlEditorPopover(methodName: string, ...methodParams: any[]): any; +} +interface JQuery { + igLinkPropertiesDialog(methodName: "show", item: Object): void; + igLinkPropertiesDialog(methodName: "hide"): void; + + /** + */ + igLinkPropertiesDialog(optionLiteral: 'option', optionName: "item"): any; + + /** + */ + igLinkPropertiesDialog(optionLiteral: 'option', optionName: "item", optionValue: any): void; + + /** + */ + igLinkPropertiesDialog(optionLiteral: 'option', optionName: "target"): any; + + /** + */ + igLinkPropertiesDialog(optionLiteral: 'option', optionName: "target", optionValue: any): void; + + /** + */ + igLinkPropertiesDialog(optionLiteral: 'option', optionName: "isHidden"): boolean; + + /** + */ + igLinkPropertiesDialog(optionLiteral: 'option', optionName: "isHidden", optionValue: boolean): void; + + /** + */ + igLinkPropertiesDialog(optionLiteral: 'option', optionName: "apply"): ApplyEvent; + + /** + */ + igLinkPropertiesDialog(optionLiteral: 'option', optionName: "apply", optionValue: ApplyEvent): void; + + /** + */ + igLinkPropertiesDialog(optionLiteral: 'option', optionName: "cancel"): CancelEvent; + + /** + */ + igLinkPropertiesDialog(optionLiteral: 'option', optionName: "cancel", optionValue: CancelEvent): void; + + /** + */ + igLinkPropertiesDialog(optionLiteral: 'option', optionName: "show"): ShowEvent; + + /** + */ + igLinkPropertiesDialog(optionLiteral: 'option', optionName: "show", optionValue: ShowEvent): void; + + /** + */ + igLinkPropertiesDialog(optionLiteral: 'option', optionName: "hide"): HideEvent; + + /** + */ + igLinkPropertiesDialog(optionLiteral: 'option', optionName: "hide", optionValue: HideEvent): void; + igLinkPropertiesDialog(options: IgLinkPropertiesDialog): JQuery; + igLinkPropertiesDialog(optionLiteral: 'option', optionName: string): any; + igLinkPropertiesDialog(optionLiteral: 'option', options: IgLinkPropertiesDialog): JQuery; + igLinkPropertiesDialog(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igLinkPropertiesDialog(methodName: string, ...methodParams: any[]): any; +} +interface JQuery { + igTablePropertiesDialog(methodName: "show", item: Object): void; + igTablePropertiesDialog(methodName: "hide"): void; + + /** + */ + igTablePropertiesDialog(optionLiteral: 'option', optionName: "item"): any; + + /** + */ + igTablePropertiesDialog(optionLiteral: 'option', optionName: "item", optionValue: any): void; + + /** + */ + igTablePropertiesDialog(optionLiteral: 'option', optionName: "target"): any; + + /** + */ + igTablePropertiesDialog(optionLiteral: 'option', optionName: "target", optionValue: any): void; + + /** + */ + igTablePropertiesDialog(optionLiteral: 'option', optionName: "isHidden"): boolean; + + /** + */ + igTablePropertiesDialog(optionLiteral: 'option', optionName: "isHidden", optionValue: boolean): void; + + /** + */ + igTablePropertiesDialog(optionLiteral: 'option', optionName: "apply"): ApplyEvent; + + /** + */ + igTablePropertiesDialog(optionLiteral: 'option', optionName: "apply", optionValue: ApplyEvent): void; + + /** + */ + igTablePropertiesDialog(optionLiteral: 'option', optionName: "cancel"): CancelEvent; + + /** + */ + igTablePropertiesDialog(optionLiteral: 'option', optionName: "cancel", optionValue: CancelEvent): void; + + /** + */ + igTablePropertiesDialog(optionLiteral: 'option', optionName: "show"): ShowEvent; + + /** + */ + igTablePropertiesDialog(optionLiteral: 'option', optionName: "show", optionValue: ShowEvent): void; + + /** + */ + igTablePropertiesDialog(optionLiteral: 'option', optionName: "hide"): HideEvent; + + /** + */ + igTablePropertiesDialog(optionLiteral: 'option', optionName: "hide", optionValue: HideEvent): void; + igTablePropertiesDialog(options: IgTablePropertiesDialog): JQuery; + igTablePropertiesDialog(optionLiteral: 'option', optionName: string): any; + igTablePropertiesDialog(optionLiteral: 'option', options: IgTablePropertiesDialog): JQuery; + igTablePropertiesDialog(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igTablePropertiesDialog(methodName: string, ...methodParams: any[]): any; +} +interface JQuery { + igImagePropertiesDialog(methodName: "show", item: Object): void; + igImagePropertiesDialog(methodName: "hide"): void; + + /** + */ + igImagePropertiesDialog(optionLiteral: 'option', optionName: "item"): any; + + /** + */ + igImagePropertiesDialog(optionLiteral: 'option', optionName: "item", optionValue: any): void; + + /** + */ + igImagePropertiesDialog(optionLiteral: 'option', optionName: "target"): any; + + /** + */ + igImagePropertiesDialog(optionLiteral: 'option', optionName: "target", optionValue: any): void; + + /** + */ + igImagePropertiesDialog(optionLiteral: 'option', optionName: "isHidden"): boolean; + + /** + */ + igImagePropertiesDialog(optionLiteral: 'option', optionName: "isHidden", optionValue: boolean): void; + + /** + */ + igImagePropertiesDialog(optionLiteral: 'option', optionName: "apply"): ApplyEvent; + + /** + */ + igImagePropertiesDialog(optionLiteral: 'option', optionName: "apply", optionValue: ApplyEvent): void; + + /** + */ + igImagePropertiesDialog(optionLiteral: 'option', optionName: "cancel"): CancelEvent; + + /** + */ + igImagePropertiesDialog(optionLiteral: 'option', optionName: "cancel", optionValue: CancelEvent): void; + + /** + */ + igImagePropertiesDialog(optionLiteral: 'option', optionName: "show"): ShowEvent; + + /** + */ + igImagePropertiesDialog(optionLiteral: 'option', optionName: "show", optionValue: ShowEvent): void; + + /** + */ + igImagePropertiesDialog(optionLiteral: 'option', optionName: "hide"): HideEvent; + + /** + */ + igImagePropertiesDialog(optionLiteral: 'option', optionName: "hide", optionValue: HideEvent): void; + igImagePropertiesDialog(options: IgImagePropertiesDialog): JQuery; + igImagePropertiesDialog(optionLiteral: 'option', optionName: string): any; + igImagePropertiesDialog(optionLiteral: 'option', options: IgImagePropertiesDialog): JQuery; + igImagePropertiesDialog(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igImagePropertiesDialog(methodName: string, ...methodParams: any[]): any; +} +interface IgLayoutManagerBorderLayout { + /** + * Option specifying the width of the left region, either in px or percentages + * + */ + leftWidth?: string; + + /** + * Option specifying the width of the right region, either in px or percentages + * + */ + rightWidth?: string; + + /** + * Option specifying whether the footer region in the border layout will be hidden or shown + * + */ + showFooter?: boolean; + + /** + * Option specifying whether the header region in the border layout will be hidden or shown + * + */ + showHeader?: boolean; + + /** + * Option specifying whether the left region in the border layout will be hidden or shown + * + */ + showLeft?: boolean; + + /** + * Option specifying whether the right region in the border layout will be hidden or shown + * + */ + showRight?: boolean; + + /** + * Option for IgLayoutManagerBorderLayout + */ + [optionName: string]: any; +} + +interface IgLayoutManagerGridLayout { + /** + * Specifies the duration of the animations in the layout manager"s grid layout + * + */ + animationDuration?: number; + + /** + * Number of columns in the grid + * + */ + cols?: number; + + /** + * Accepts number or string with height in px or percents + * + */ + columnHeight?: string|number; + + /** + * Accepts number or string with width in px or percents + * + */ + columnWidth?: string|number; + + /** + * Specifies the margin left css property for items + * + */ + marginLeft?: number; + + /** + * Specifies the margin top css property for items + * + */ + marginTop?: number; + + /** + * Specifies whether the previous set options should be overriden when setting options + * + */ + overrideConfigOnSetOption?: boolean; + + /** + * Specified whether the items should rearrange to fit in the container when it is resized. + * Have effect only when fixed columnWidth option is set. + * + */ + rearrangeItems?: boolean; + + /** + * Number of rows in the grid + * + */ + rows?: number; + + /** + * Option for IgLayoutManagerGridLayout + */ + [optionName: string]: any; +} + +interface IgLayoutManagerItem { + /** + * Column index of the item in the grid + * + */ + colIndex?: number; + + /** + * ColSpan of the item + * + */ + colSpan?: number; + + /** + * Gets/Sets individual item height, either in px or percentage + * string The default height can be set in pixels (px), %, em and other units. + * + */ + height?: string; + + /** + * Row index of the item in the grid + * + */ + rowIndex?: number; + + /** + * RowSpan of the item + * + */ + rowSpan?: number; + + /** + * Gets/Sets individual item width, either in px or percentage + * string The default width can be set in pixels (px), %, em and other units. + * + */ + width?: number; + + /** + * Option for IgLayoutManagerItem + */ + [optionName: string]: any; +} + +interface InternalResizedEvent { + (event: Event, ui: InternalResizedEventUIParam): void; +} + +interface InternalResizedEventUIParam { + /** + * Used to get a reference to the layout manager performing resizing. + */ + owner?: any; +} + +interface InternalResizingEvent { + (event: Event, ui: InternalResizingEventUIParam): void; +} + +interface InternalResizingEventUIParam { + /** + * Used to get a reference to the layout manager performing resizing. + */ + owner?: any; +} + +interface ItemRenderedEvent { + (event: Event, ui: ItemRenderedEventUIParam): void; +} + +interface ItemRenderedEventUIParam { + /** + * Used to get reference to the igLayoutManager. + */ + owner?: any; + + /** + * Used to get a reference of item's settings, such as colspan ,rowspan, etc. + */ + itemData?: any; + + /** + * Used to get a reference of the item's index, if the layout is flow or vertical + */ + index?: any; + + /** + * Used to get a reference to the rendered item + */ + item?: any; +} + +interface ItemRenderingEvent { + (event: Event, ui: ItemRenderingEventUIParam): void; +} + +interface ItemRenderingEventUIParam { + /** + * Used to get reference to the igLayoutManager. + */ + owner?: any; + + /** + * Used to get a reference of item's settings, such as colspan ,rowspan, etc. + */ + itemData?: any; + + /** + * Used to get a reference of the item's index, if the layout is flow or vertical + */ + index?: any; + + /** + * Used to get a reference to the rendered item + */ + item?: any; +} + +interface IgLayoutManager { + /** + * Options specific to a border layout + * + */ + borderLayout?: IgLayoutManagerBorderLayout; + + /** + * Options specific to grid layout mode + * + */ + gridLayout?: IgLayoutManagerGridLayout; + + /** + * Gets/Sets height of the layout container. + * + */ + height?: string|number; + + /** + * Number of items to render, this is only applicable to layouts: vertical and flow + * + */ + itemCount?: number; + + /** + * An array of item descriptions + * this assumes the container is empty, and every item + * is described by rowspan, colspan, etc. - otherwise values of + * 1 are assumed + * items can have various properties some of which may not be applicable + * depending on the layoutMode. + * for example rowSpan/colSpan/colIndex/rowIndex are only applicable to gridlayout + * + */ + items?: IgLayoutManagerItem[]; + + /** + * Defines the layout type + * grid Column type can be set with grid layout + * border Column type can be set with border layout + * flow Column type can be set with flow layout + * column Column type can be set with column layout + * vertical Column type can be set with vertical layout + * + * + * Valid values: + * "grid" + * "border" + * "flow" + * "column" + * "vertical" + */ + layoutMode?: any; + + /** + * Gets/Sets width of the layout container. + * + */ + width?: string|number; + + /** + * Event fired after items are resized. + * Use ui.owner to get a reference to the layout manager performing resizing. + */ + internalResized?: InternalResizedEvent; + + /** + * Event fired before items are resized. + * Use ui.owner to get a reference to the layout manager performing resizing. + */ + internalResizing?: InternalResizingEvent; + + /** + * Event fired after an item has been rendered in the container. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to the igLayoutManager. + * Use ui.itemData to get a reference of item's settings, such as colspan ,rowspan, etc. + * Use ui.index to get a reference of the item's index, if the layout is flow or vertical + * Use ui.item to get a reference to the rendered item + */ + itemRendered?: ItemRenderedEvent; + + /** + * Event fired before an item is rendered in the container. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to the igLayoutManager. + * Use ui.itemData to get a reference of item's settings, such as colspan ,rowspan, etc. + * Use ui.index to get a reference of the item's index, if the layout is flow or vertical + * Use ui.item to get a reference to the rendered item + */ + itemRendering?: ItemRenderingEvent; + + /** + * Event fired after all items are rendered. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to the igLayoutManager. + */ + rendered?: RenderedEvent; + + /** + * Option for igLayoutManager + */ + [optionName: string]: any; +} +interface IgLayoutManagerMethods { + /** + * Triggers recalculation of the layout dimensions. Layouts may not need to be reflowed manually, if their sizes are in percentages (i.e. they are responsive by default) + * this can be particularly useful with a grid layout, when the container has percentage sizes, but items are calculated in pixels and positioned absolutely in the container. + * + * @param forceReflow Indicates whether the reflow should be forced. Useful in cases where the items size and position was changed manually. + * @param animationDuration The animation duration to be used for this reflow only. Supported only for Grid Layout mode. + * @param event Indicates the browser even which triggered this action (not API). + */ + reflow(forceReflow?: boolean, animationDuration?: number, event?: Object): void; + + /** + * Destroy is part of the jQuery UI widget API and does the following: + * 1. Remove custom CSS classes that were added. + * 2. Remove any elements that were added at widget's initialization and after that, which didn't below to the original markup + * 3. Unbind all events that were bound. + */ + destroy(): void; +} +interface JQuery { + data(propertyName: "igLayoutManager"): IgLayoutManagerMethods; +} + +interface JQuery { + igLayoutManager(methodName: "reflow", forceReflow?: boolean, animationDuration?: number, event?: Object): void; + igLayoutManager(methodName: "destroy"): void; + + /** + * Options specific to a border layout + * + */ + igLayoutManager(optionLiteral: 'option', optionName: "borderLayout"): IgLayoutManagerBorderLayout; + + /** + * Options specific to a border layout + * + * + * @optionValue New value to be set. + */ + igLayoutManager(optionLiteral: 'option', optionName: "borderLayout", optionValue: IgLayoutManagerBorderLayout): void; + + /** + * Options specific to grid layout mode + * + */ + igLayoutManager(optionLiteral: 'option', optionName: "gridLayout"): IgLayoutManagerGridLayout; + + /** + * Options specific to grid layout mode + * + * + * @optionValue New value to be set. + */ + igLayoutManager(optionLiteral: 'option', optionName: "gridLayout", optionValue: IgLayoutManagerGridLayout): void; + + /** + * Gets/Sets height of the layout container. + * + */ + igLayoutManager(optionLiteral: 'option', optionName: "height"): string|number; + + /** + * /Sets height of the layout container. + * + * + * @optionValue New value to be set. + */ + igLayoutManager(optionLiteral: 'option', optionName: "height", optionValue: string|number): void; + + /** + * Number of items to render, this is only applicable to layouts: vertical and flow + * + */ + igLayoutManager(optionLiteral: 'option', optionName: "itemCount"): number; + + /** + * Number of items to render, this is only applicable to layouts: vertical and flow + * + * + * @optionValue New value to be set. + */ + igLayoutManager(optionLiteral: 'option', optionName: "itemCount", optionValue: number): void; + + /** + * An array of item descriptions + * this assumes the container is empty, and every item + * is described by rowspan, colspan, etc. - otherwise values of + * 1 are assumed + * items can have various properties some of which may not be applicable + * depending on the layoutMode. + * for example rowSpan/colSpan/colIndex/rowIndex are only applicable to gridlayout + * + */ + igLayoutManager(optionLiteral: 'option', optionName: "items"): IgLayoutManagerItem[]; + + /** + * An array of item descriptions + * this assumes the container is empty, and every item + * is described by rowspan, colspan, etc. - otherwise values of + * 1 are assumed + * items can have various properties some of which may not be applicable + * depending on the layoutMode. + * for example rowSpan/colSpan/colIndex/rowIndex are only applicable to gridlayout + * + * + * @optionValue New value to be set. + */ + igLayoutManager(optionLiteral: 'option', optionName: "items", optionValue: IgLayoutManagerItem[]): void; + + /** + * Defines the layout type + * grid Column type can be set with grid layout + * border Column type can be set with border layout + * flow Column type can be set with flow layout + * column Column type can be set with column layout + * vertical Column type can be set with vertical layout + * + */ + igLayoutManager(optionLiteral: 'option', optionName: "layoutMode"): any; + + /** + * Defines the layout type + * grid Column type can be set with grid layout + * border Column type can be set with border layout + * flow Column type can be set with flow layout + * column Column type can be set with column layout + * vertical Column type can be set with vertical layout + * + * + * @optionValue New value to be set. + */ + igLayoutManager(optionLiteral: 'option', optionName: "layoutMode", optionValue: any): void; + + /** + * Gets/Sets width of the layout container. + * + */ + igLayoutManager(optionLiteral: 'option', optionName: "width"): string|number; + + /** + * /Sets width of the layout container. + * + * + * @optionValue New value to be set. + */ + igLayoutManager(optionLiteral: 'option', optionName: "width", optionValue: string|number): void; + + /** + * Event fired after items are resized. + * Use ui.owner to get a reference to the layout manager performing resizing. + */ + igLayoutManager(optionLiteral: 'option', optionName: "internalResized"): InternalResizedEvent; + + /** + * Event fired after items are resized. + * Use ui.owner to get a reference to the layout manager performing resizing. + * + * @optionValue Define event handler function. + */ + igLayoutManager(optionLiteral: 'option', optionName: "internalResized", optionValue: InternalResizedEvent): void; + + /** + * Event fired before items are resized. + * Use ui.owner to get a reference to the layout manager performing resizing. + */ + igLayoutManager(optionLiteral: 'option', optionName: "internalResizing"): InternalResizingEvent; + + /** + * Event fired before items are resized. + * Use ui.owner to get a reference to the layout manager performing resizing. + * + * @optionValue Define event handler function. + */ + igLayoutManager(optionLiteral: 'option', optionName: "internalResizing", optionValue: InternalResizingEvent): void; + + /** + * Event fired after an item has been rendered in the container. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to the igLayoutManager. + * Use ui.itemData to get a reference of item's settings, such as colspan ,rowspan, etc. + * Use ui.index to get a reference of the item's index, if the layout is flow or vertical + * Use ui.item to get a reference to the rendered item + */ + igLayoutManager(optionLiteral: 'option', optionName: "itemRendered"): ItemRenderedEvent; + + /** + * Event fired after an item has been rendered in the container. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to the igLayoutManager. + * Use ui.itemData to get a reference of item's settings, such as colspan ,rowspan, etc. + * Use ui.index to get a reference of the item's index, if the layout is flow or vertical + * Use ui.item to get a reference to the rendered item + * + * @optionValue Define event handler function. + */ + igLayoutManager(optionLiteral: 'option', optionName: "itemRendered", optionValue: ItemRenderedEvent): void; + + /** + * Event fired before an item is rendered in the container. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to the igLayoutManager. + * Use ui.itemData to get a reference of item's settings, such as colspan ,rowspan, etc. + * Use ui.index to get a reference of the item's index, if the layout is flow or vertical + * Use ui.item to get a reference to the rendered item + */ + igLayoutManager(optionLiteral: 'option', optionName: "itemRendering"): ItemRenderingEvent; + + /** + * Event fired before an item is rendered in the container. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to the igLayoutManager. + * Use ui.itemData to get a reference of item's settings, such as colspan ,rowspan, etc. + * Use ui.index to get a reference of the item's index, if the layout is flow or vertical + * Use ui.item to get a reference to the rendered item + * + * @optionValue Define event handler function. + */ + igLayoutManager(optionLiteral: 'option', optionName: "itemRendering", optionValue: ItemRenderingEvent): void; + + /** + * Event fired after all items are rendered. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to the igLayoutManager. + */ + igLayoutManager(optionLiteral: 'option', optionName: "rendered"): RenderedEvent; + + /** + * Event fired after all items are rendered. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to the igLayoutManager. + * + * @optionValue Define event handler function. + */ + igLayoutManager(optionLiteral: 'option', optionName: "rendered", optionValue: RenderedEvent): void; + igLayoutManager(options: IgLayoutManager): JQuery; + igLayoutManager(optionLiteral: 'option', optionName: string): any; + igLayoutManager(optionLiteral: 'option', options: IgLayoutManager): JQuery; + igLayoutManager(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igLayoutManager(methodName: string, ...methodParams: any[]): any; +} +interface IgLinearGaugeRange { + /** + * Gets or sets the name of the range. + */ + name?: string; + + /** + * Gets or sets the brush to use to fill the range. + */ + brush?: string; + + /** + * Gets or sets the outline to use when rendering the range. + */ + outline?: string; + + /** + * Gets or sets the value at which the range starts along the scale. + */ + startValue?: number; + + /** + * Gets or sets the value at which the range ends along the scale. + */ + endValue?: number; + + /** + * Gets or sets the distance measured from the front/bottom of the bullet graph (from 0 to 1) at which to start rendering the inner edge of the range. + * Values further from zero than 1 can be used to make this extend further than the normal width/height of the bullet graph. + */ + innerStartExtent?: number; + + /** + * Gets or sets the distance measured from the front/bottom of the bullet graph (from 0 to 1) at which to end rendering the inner edge of the range. + * Values further from zero than 1 can be used to make this extend further than the normal width/height of the bullet graph. + */ + innerEndExtent?: number; + + /** + * Gets or sets the distance measured from the front/bottom of the bullet graph (from 0 to 1) at which to start rendering the outer edge of the range. + * Values further from zero than 1 can be used to make this extend further than the normal width/height of the bullet graph. + */ + outerStartExtent?: number; + + /** + * Gets or sets the distance measured from the front/bottom of the bullet graph (from 0 to 1) at which to end rendering the outer edge of the range. + * Values further from zero than 1 can be used to make this extend further than the normal width/height of the bullet graph. + */ + outerEndExtent?: number; + + /** + * Gets or sets the stroke thickness to use when rendering this range's outline. + */ + strokeThickness?: number; + + /** + * Option for IgLinearGaugeRange + */ + [optionName: string]: any; +} + +interface IgLinearGauge { + /** + * The width of the gauge. It can be set as a number in pixels, string (px) or percentage (%). + */ + width?: string|number; + + /** + * The height of the gauge. It can be set as a number in pixels, string (px) or percentage (%). + */ + height?: string|number; + + /** + * Gets or sets the scale ranges to render on the linear gauge. + */ + ranges?: IgLinearGaugeRange[]; + + /** + * Gets or sets the ranges' tooltip template. + */ + rangeToolTipTemplate?: string; + + /** + * Gets or sets the needle's tooltip template. + */ + needleToolTipTemplate?: string; + + /** + * Gets or sets the orientation of the scale. + * + * Valid values: + * "horizontal" + * "vertical" + */ + orientation?: string; + + /** + * Gets or sets a collection of brushes to be used as the palette for linear gauge ranges. + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + rangeBrushes?: any; + + /** + * Gets or sets a collection of brushes to be used as the palette for linear gauge outlines. + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + rangeOutlines?: any; + + /** + * Gets or sets the minimum value of the scale. + */ + minimumValue?: number; + + /** + * Gets or sets the maximum value of the scale. + */ + maximumValue?: number; + + /** + * Gets or sets the value at which the needle is positioned. + */ + value?: number; + + /** + * Gets or sets the shape to use when rendering the needle from a number of options. + * + * Valid values: + * "custom" + * "rectangle" + * "triangle" + * "needle" + * "trapezoid" + */ + needleShape?: string; + + /** + * Gets or sets the name used for needle. + */ + needleName?: string; + + /** + * Gets or sets the position at which to start rendering the ranges, measured from the front/bottom of the control as a value from 0 to 1. + * Values further from zero than 1 can be used to make this extend further than the normal size of the linear gauge. + */ + rangeInnerExtent?: number; + + /** + * Gets or sets the position at which to start rendering the scale, measured from the bottom/front (when orientation is horizontal/vertical) of the control as a value from 0 to 1. + * Values further from zero than 1 can be used to make this extend further than the normal size of the linear gauge. + */ + scaleInnerExtent?: number; + + /** + * Gets or sets the position at which to stop rendering the range as a value from 0 to 1 measured from the front/bottom of the linear gauge. + * Values further from zero than 1 can be used to make this extend further than the normal size of the linear gauge. + */ + rangeOuterExtent?: number; + + /** + * Gets or sets the position at which to stop rendering the scale as a value from 0 to 1 measured from the bottom/front (when orientation is horizontal/vertical) of the linear gauge. + * Values further from zero than 1 can be used to make this extend further than the normal size of the linear gauge. + */ + scaleOuterExtent?: number; + + /** + * Gets or sets the position at which to start rendering the needle geometry, measured from the front/bottom of the linear gauge as a value from 0 to 1. + * Values further from zero than 1 can be used to make this extend further than the normal size of the linear gauge. + */ + needleInnerExtent?: number; + + /** + * Gets or sets the position at which to stop rendering the needle geometry as a value from 0 to 1 measured from the front/bottom of the linear gauge. + * Values further from zero than 1 can be used to make this extend further than the normal size of the linear gauge. + */ + needleOuterExtent?: number; + + /** + * Gets or sets the width of the needle's inner base. + */ + needleInnerBaseWidth?: number; + + /** + * Gets or sets the width of the needle's outer base. + */ + needleOuterBaseWidth?: number; + + /** + * Gets or sets the width of the needle's inner point. + */ + needleInnerPointWidth?: number; + + /** + * Gets or sets the width of the needle's outer point. + */ + needleOuterPointWidth?: number; + + /** + * Gets or sets the extent of the needle's inner point. + */ + needleInnerPointExtent?: number; + + /** + * Gets or sets the extent of the needle's outer point. + */ + needleOuterPointExtent?: number; + + /** + * Gets or sets the interval to use for the scale. + */ + interval?: number; + + /** + * A value to start adding tickmarks, added to the scale's MinimumValue. + */ + ticksPostInitial?: number; + + /** + * A value to stop adding tickmarks, subtracted from the scale's MaximumValue. + */ + ticksPreTerminal?: number; + + /** + * Gets or sets the interval to use for rendering labels. This defaults to be the same interval as the tickmarks on the scale. + */ + labelInterval?: number; + + /** + * Gets or sets the position at which to put the labels as a value from 0 to 1, measured from the bottom of the scale. + * Values further from zero than 1 can be used to hide the labels of the linear gauge. + */ + labelExtent?: number; + + /** + * A value to start adding labels, added to the scale's MinimumValue. + */ + labelsPostInitial?: number; + + /** + * A value to stop adding labels, subtracted from the scale's MaximumValue. + */ + labelsPreTerminal?: number; + + /** + * Gets or sets the number of minor tickmarks to place between major tickmarks. + */ + minorTickCount?: number; + + /** + * Gets or sets the position at which to start rendering the major tickmarks as a value from 0 to 1, measured from the front/bottom of the linear gauge. + * Values further from zero than 1 can be used to make this extend further than the normal size of the linear gauge. + */ + tickStartExtent?: number; + + /** + * Gets or sets the position at which to stop rendering the major tickmarks as a value from 0 to 1, measured from the front/bottom of the linear gauge. + * Values further from zero than 1 can be used to make this extend further than the normal size of the linear gauge. + */ + tickEndExtent?: number; + + /** + * Gets or sets the stroke thickness to use when rendering ticks. + */ + tickStrokeThickness?: number; + + /** + * Gets or sets the brush to use for the major tickmarks. + */ + tickBrush?: string; + + /** + * Gets or sets the brush to use for the label font. + */ + fontBrush?: string; + + /** + * Gets or sets the needle breadth. + */ + needleBreadth?: number; + + /** + * Gets or sets the brush to use for needle element. + */ + needleBrush?: string; + + /** + * Gets or sets the brush to use for the outline of needle element. + */ + needleOutline?: string; + + /** + * Gets or sets the stroke thickness to use when rendering single actual value element. + */ + needleStrokeThickness?: number; + + /** + * Gets or sets the position at which to start rendering the minor tickmarks as a value from 0 to 1, measured from the front/bottom of the linear gauge. + * Values further from zero than 1 can be used to make this extend further than the normal size of the linear gauge. + */ + minorTickStartExtent?: number; + + /** + * Gets or sets the position at which to stop rendering the minor tickmarks as a value from 0 to 1, measured from the front/bottom of the linear gauge. + * Values further from zero than 1 can be used to make this extend further than the normal size of the linear gauge. + */ + minorTickEndExtent?: number; + + /** + * Gets or sets the stroke thickness to use when rendering minor ticks. + */ + minorTickStrokeThickness?: number; + + /** + * Gets or sets the brush to use for the minor tickmarks. + */ + minorTickBrush?: string; + + /** + * Gets or sets a value indicating whether the scale is inverted. + * When the scale is inverted the direction in which the scale values increase is right to left. + */ + isScaleInverted?: boolean; + + /** + * Gets or sets the brush to use to fill the backing of the linear gauge. + */ + backingBrush?: string; + + /** + * Gets or sets the brush to use for the outline of the backing. + */ + backingOutline?: string; + + /** + * Gets or sets the stroke thickness of the backing outline. + */ + backingStrokeThickness?: number; + + /** + * Gets or sets the inner extent of the linear gauge backing. + */ + backingInnerExtent?: number; + + /** + * Gets or sets the outer extent of the linear gauge backing. + */ + backingOuterExtent?: number; + + /** + * Gets or sets the position at which to start rendering the scale, measured from the front/bottom of the linear gauge as a value from 0 to 1. + * Values further from zero than 1 can be used to make this extend further than the normal size of the linear gauge. + */ + scaleStartExtent?: number; + + /** + * Gets or sets the position at which to stop rendering the scale as a value from 0 to 1, measured from the front/bottom of the linear gauge. + * Values further from zero than 1 can be used to make this extend further than the normal size of the linear gauge. + */ + scaleEndExtent?: number; + + /** + * Gets or sets the brush to use to fill the scale of the linear gauge. + */ + scaleBrush?: string; + + /** + * Gets or sets the brush to use for the outline of the scale. + */ + scaleOutline?: string; + + /** + * Gets or sets the stroke thickness of the scale outline. + */ + scaleStrokeThickness?: number; + + /** + * Gets or sets whether needle dragging is enabled or not. + */ + isNeedleDraggingEnabled?: boolean; + + /** + * Gets or sets the number of milliseconds over which changes to the linear gauge should be animated. + */ + transitionDuration?: number; + + /** + * Gets or sets the time in milliseconds that tooltip appearance is delayed with. + */ + showToolTipTimeout?: number; + + /** + * Gets or sets a value indicating whether tooltips are enabled. + */ + showToolTip?: boolean; + + /** + * Gets or sets the font. + */ + font?: string; + + /** + * Gets or sets the pixel scaling ratio for the gauge. + */ + pixelScalingRatio?: number; + formatLabel?: FormatLabelEvent; + alignLabel?: AlignLabelEvent; + + /** + * Occurs when the Value property changes. + */ + valueChanged?: ValueChangedEvent; + + /** + * Option for igLinearGauge + */ + [optionName: string]: any; +} +interface IgLinearGaugeMethods { + /** + * Returns a string containing the names of all the ranges delimited with a \n symbol. + */ + getRangeNames(): string; + + /** + * Adds a new range to the linear gauge. + * + * @param value The range object to be added. + */ + addRange(value: Object): void; + + /** + * Removes a range from the linear gauge. + * + * @param value A JS object with properties set as follows: name: nameOfTheRangeToRemove, remove: true + */ + removeRange(value: Object): void; + + /** + * Updates the specified range of the linear gauge. + * + * @param value The range object to be updated. + */ + updateRange(value: Object): void; + + /** + * Gets the value for the main scale of the gauge for a given point within the bounds of the gauge. + * + * @param x + * @param y + */ + getValueForPoint(x: Object, y: Object): number; + + /** + * Returns true if the main gauge needle bounding box contains the point provided, otherwise false. + * + * @param x The x coordinate of the point. + * @param y The y coordinate of the point. + */ + needleContainsPoint(x: number, y: number): void; + + /** + * Returns information about how the linear gauge is rendered. + */ + exportVisualData(): Object; + + /** + * Causes all pending changes of the linear gauge e.g. by changed property values to be rendered immediately. + */ + flush(): void; + + /** + * Destroys widget. + */ + destroy(): void; + + /** + * Re-polls the css styles for the widget. Use this method when the css styles have been modified. + */ + styleUpdated(): void; +} +interface JQuery { + data(propertyName: "igLinearGauge"): IgLinearGaugeMethods; +} + +interface JQuery { + igLinearGauge(methodName: "getRangeNames"): string; + igLinearGauge(methodName: "addRange", value: Object): void; + igLinearGauge(methodName: "removeRange", value: Object): void; + igLinearGauge(methodName: "updateRange", value: Object): void; + igLinearGauge(methodName: "getValueForPoint", x: Object, y: Object): number; + igLinearGauge(methodName: "needleContainsPoint", x: number, y: number): void; + igLinearGauge(methodName: "exportVisualData"): Object; + igLinearGauge(methodName: "flush"): void; + igLinearGauge(methodName: "destroy"): void; + igLinearGauge(methodName: "styleUpdated"): void; + + /** + * The width of the gauge. It can be set as a number in pixels, string (px) or percentage (%). + */ + igLinearGauge(optionLiteral: 'option', optionName: "width"): string|number; + + /** + * The width of the gauge. It can be set as a number in pixels, string (px) or percentage (%). + * + * @optionValue New value to be set. + */ + igLinearGauge(optionLiteral: 'option', optionName: "width", optionValue: string|number): void; + + /** + * The height of the gauge. It can be set as a number in pixels, string (px) or percentage (%). + */ + igLinearGauge(optionLiteral: 'option', optionName: "height"): string|number; + + /** + * The height of the gauge. It can be set as a number in pixels, string (px) or percentage (%). + * + * @optionValue New value to be set. + */ + igLinearGauge(optionLiteral: 'option', optionName: "height", optionValue: string|number): void; + + /** + * Gets the scale ranges to render on the linear gauge. + */ + igLinearGauge(optionLiteral: 'option', optionName: "ranges"): IgLinearGaugeRange[]; + + /** + * Sets the scale ranges to render on the linear gauge. + * + * @optionValue New value to be set. + */ + igLinearGauge(optionLiteral: 'option', optionName: "ranges", optionValue: IgLinearGaugeRange[]): void; + + /** + * Gets the ranges' tooltip template. + */ + igLinearGauge(optionLiteral: 'option', optionName: "rangeToolTipTemplate"): string; + + /** + * Sets the ranges' tooltip template. + * + * @optionValue New value to be set. + */ + igLinearGauge(optionLiteral: 'option', optionName: "rangeToolTipTemplate", optionValue: string): void; + + /** + * Gets the needle's tooltip template. + */ + igLinearGauge(optionLiteral: 'option', optionName: "needleToolTipTemplate"): string; + + /** + * Sets the needle's tooltip template. + * + * @optionValue New value to be set. + */ + igLinearGauge(optionLiteral: 'option', optionName: "needleToolTipTemplate", optionValue: string): void; + + /** + * Gets the orientation of the scale. + */ + igLinearGauge(optionLiteral: 'option', optionName: "orientation"): string; + + /** + * Sets the orientation of the scale. + * + * @optionValue New value to be set. + */ + igLinearGauge(optionLiteral: 'option', optionName: "orientation", optionValue: string): void; + + /** + * Gets a collection of brushes to be used as the palette for linear gauge ranges. + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + igLinearGauge(optionLiteral: 'option', optionName: "rangeBrushes"): any; + + /** + * Sets a collection of brushes to be used as the palette for linear gauge ranges. + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + * + * @optionValue New value to be set. + */ + igLinearGauge(optionLiteral: 'option', optionName: "rangeBrushes", optionValue: any): void; + + /** + * Gets a collection of brushes to be used as the palette for linear gauge outlines. + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + igLinearGauge(optionLiteral: 'option', optionName: "rangeOutlines"): any; + + /** + * Sets a collection of brushes to be used as the palette for linear gauge outlines. + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + * + * @optionValue New value to be set. + */ + igLinearGauge(optionLiteral: 'option', optionName: "rangeOutlines", optionValue: any): void; + + /** + * Gets the minimum value of the scale. + */ + igLinearGauge(optionLiteral: 'option', optionName: "minimumValue"): number; + + /** + * Sets the minimum value of the scale. + * + * @optionValue New value to be set. + */ + igLinearGauge(optionLiteral: 'option', optionName: "minimumValue", optionValue: number): void; + + /** + * Gets the maximum value of the scale. + */ + igLinearGauge(optionLiteral: 'option', optionName: "maximumValue"): number; + + /** + * Sets the maximum value of the scale. + * + * @optionValue New value to be set. + */ + igLinearGauge(optionLiteral: 'option', optionName: "maximumValue", optionValue: number): void; + + /** + * Gets the value at which the needle is positioned. + */ + igLinearGauge(optionLiteral: 'option', optionName: "value"): number; + + /** + * Sets the value at which the needle is positioned. + * + * @optionValue New value to be set. + */ + igLinearGauge(optionLiteral: 'option', optionName: "value", optionValue: number): void; + + /** + * Gets the shape to use when rendering the needle from a number of options. + */ + igLinearGauge(optionLiteral: 'option', optionName: "needleShape"): string; + + /** + * Sets the shape to use when rendering the needle from a number of options. + * + * @optionValue New value to be set. + */ + igLinearGauge(optionLiteral: 'option', optionName: "needleShape", optionValue: string): void; + + /** + * Gets the name used for needle. + */ + igLinearGauge(optionLiteral: 'option', optionName: "needleName"): string; + + /** + * Sets the name used for needle. + * + * @optionValue New value to be set. + */ + igLinearGauge(optionLiteral: 'option', optionName: "needleName", optionValue: string): void; + + /** + * Gets the position at which to start rendering the ranges, measured from the front/bottom of the control as a value from 0 to 1. + * Values further from zero than 1 can be used to make this extend further than the normal size of the linear gauge. + */ + igLinearGauge(optionLiteral: 'option', optionName: "rangeInnerExtent"): number; + + /** + * Sets the position at which to start rendering the ranges, measured from the front/bottom of the control as a value from 0 to 1. + * Values further from zero than 1 can be used to make this extend further than the normal size of the linear gauge. + * + * @optionValue New value to be set. + */ + igLinearGauge(optionLiteral: 'option', optionName: "rangeInnerExtent", optionValue: number): void; + + /** + * Gets the position at which to start rendering the scale, measured from the bottom/front (when orientation is horizontal/vertical) of the control as a value from 0 to 1. + * Values further from zero than 1 can be used to make this extend further than the normal size of the linear gauge. + */ + igLinearGauge(optionLiteral: 'option', optionName: "scaleInnerExtent"): number; + + /** + * Sets the position at which to start rendering the scale, measured from the bottom/front (when orientation is horizontal/vertical) of the control as a value from 0 to 1. + * Values further from zero than 1 can be used to make this extend further than the normal size of the linear gauge. + * + * @optionValue New value to be set. + */ + igLinearGauge(optionLiteral: 'option', optionName: "scaleInnerExtent", optionValue: number): void; + + /** + * Gets the position at which to stop rendering the range as a value from 0 to 1 measured from the front/bottom of the linear gauge. + * Values further from zero than 1 can be used to make this extend further than the normal size of the linear gauge. + */ + igLinearGauge(optionLiteral: 'option', optionName: "rangeOuterExtent"): number; + + /** + * Sets the position at which to stop rendering the range as a value from 0 to 1 measured from the front/bottom of the linear gauge. + * Values further from zero than 1 can be used to make this extend further than the normal size of the linear gauge. + * + * @optionValue New value to be set. + */ + igLinearGauge(optionLiteral: 'option', optionName: "rangeOuterExtent", optionValue: number): void; + + /** + * Gets the position at which to stop rendering the scale as a value from 0 to 1 measured from the bottom/front (when orientation is horizontal/vertical) of the linear gauge. + * Values further from zero than 1 can be used to make this extend further than the normal size of the linear gauge. + */ + igLinearGauge(optionLiteral: 'option', optionName: "scaleOuterExtent"): number; + + /** + * Sets the position at which to stop rendering the scale as a value from 0 to 1 measured from the bottom/front (when orientation is horizontal/vertical) of the linear gauge. + * Values further from zero than 1 can be used to make this extend further than the normal size of the linear gauge. + * + * @optionValue New value to be set. + */ + igLinearGauge(optionLiteral: 'option', optionName: "scaleOuterExtent", optionValue: number): void; + + /** + * Gets the position at which to start rendering the needle geometry, measured from the front/bottom of the linear gauge as a value from 0 to 1. + * Values further from zero than 1 can be used to make this extend further than the normal size of the linear gauge. + */ + igLinearGauge(optionLiteral: 'option', optionName: "needleInnerExtent"): number; + + /** + * Sets the position at which to start rendering the needle geometry, measured from the front/bottom of the linear gauge as a value from 0 to 1. + * Values further from zero than 1 can be used to make this extend further than the normal size of the linear gauge. + * + * @optionValue New value to be set. + */ + igLinearGauge(optionLiteral: 'option', optionName: "needleInnerExtent", optionValue: number): void; + + /** + * Gets the position at which to stop rendering the needle geometry as a value from 0 to 1 measured from the front/bottom of the linear gauge. + * Values further from zero than 1 can be used to make this extend further than the normal size of the linear gauge. + */ + igLinearGauge(optionLiteral: 'option', optionName: "needleOuterExtent"): number; + + /** + * Sets the position at which to stop rendering the needle geometry as a value from 0 to 1 measured from the front/bottom of the linear gauge. + * Values further from zero than 1 can be used to make this extend further than the normal size of the linear gauge. + * + * @optionValue New value to be set. + */ + igLinearGauge(optionLiteral: 'option', optionName: "needleOuterExtent", optionValue: number): void; + + /** + * Gets the width of the needle's inner base. + */ + igLinearGauge(optionLiteral: 'option', optionName: "needleInnerBaseWidth"): number; + + /** + * Sets the width of the needle's inner base. + * + * @optionValue New value to be set. + */ + igLinearGauge(optionLiteral: 'option', optionName: "needleInnerBaseWidth", optionValue: number): void; + + /** + * Gets the width of the needle's outer base. + */ + igLinearGauge(optionLiteral: 'option', optionName: "needleOuterBaseWidth"): number; + + /** + * Sets the width of the needle's outer base. + * + * @optionValue New value to be set. + */ + igLinearGauge(optionLiteral: 'option', optionName: "needleOuterBaseWidth", optionValue: number): void; + + /** + * Gets the width of the needle's inner point. + */ + igLinearGauge(optionLiteral: 'option', optionName: "needleInnerPointWidth"): number; + + /** + * Sets the width of the needle's inner point. + * + * @optionValue New value to be set. + */ + igLinearGauge(optionLiteral: 'option', optionName: "needleInnerPointWidth", optionValue: number): void; + + /** + * Gets the width of the needle's outer point. + */ + igLinearGauge(optionLiteral: 'option', optionName: "needleOuterPointWidth"): number; + + /** + * Sets the width of the needle's outer point. + * + * @optionValue New value to be set. + */ + igLinearGauge(optionLiteral: 'option', optionName: "needleOuterPointWidth", optionValue: number): void; + + /** + * Gets the extent of the needle's inner point. + */ + igLinearGauge(optionLiteral: 'option', optionName: "needleInnerPointExtent"): number; + + /** + * Sets the extent of the needle's inner point. + * + * @optionValue New value to be set. + */ + igLinearGauge(optionLiteral: 'option', optionName: "needleInnerPointExtent", optionValue: number): void; + + /** + * Gets the extent of the needle's outer point. + */ + igLinearGauge(optionLiteral: 'option', optionName: "needleOuterPointExtent"): number; + + /** + * Sets the extent of the needle's outer point. + * + * @optionValue New value to be set. + */ + igLinearGauge(optionLiteral: 'option', optionName: "needleOuterPointExtent", optionValue: number): void; + + /** + * Gets the interval to use for the scale. + */ + igLinearGauge(optionLiteral: 'option', optionName: "interval"): number; + + /** + * Sets the interval to use for the scale. + * + * @optionValue New value to be set. + */ + igLinearGauge(optionLiteral: 'option', optionName: "interval", optionValue: number): void; + + /** + * A value to start adding tickmarks, added to the scale's MinimumValue. + */ + igLinearGauge(optionLiteral: 'option', optionName: "ticksPostInitial"): number; + + /** + * A value to start adding tickmarks, added to the scale's MinimumValue. + * + * @optionValue New value to be set. + */ + igLinearGauge(optionLiteral: 'option', optionName: "ticksPostInitial", optionValue: number): void; + + /** + * A value to stop adding tickmarks, subtracted from the scale's MaximumValue. + */ + igLinearGauge(optionLiteral: 'option', optionName: "ticksPreTerminal"): number; + + /** + * A value to stop adding tickmarks, subtracted from the scale's MaximumValue. + * + * @optionValue New value to be set. + */ + igLinearGauge(optionLiteral: 'option', optionName: "ticksPreTerminal", optionValue: number): void; + + /** + * Gets the interval to use for rendering labels. This defaults to be the same interval as the tickmarks on the scale. + */ + igLinearGauge(optionLiteral: 'option', optionName: "labelInterval"): number; + + /** + * Sets the interval to use for rendering labels. This defaults to be the same interval as the tickmarks on the scale. + * + * @optionValue New value to be set. + */ + igLinearGauge(optionLiteral: 'option', optionName: "labelInterval", optionValue: number): void; + + /** + * Gets the position at which to put the labels as a value from 0 to 1, measured from the bottom of the scale. + * Values further from zero than 1 can be used to hide the labels of the linear gauge. + */ + igLinearGauge(optionLiteral: 'option', optionName: "labelExtent"): number; + + /** + * Sets the position at which to put the labels as a value from 0 to 1, measured from the bottom of the scale. + * Values further from zero than 1 can be used to hide the labels of the linear gauge. + * + * @optionValue New value to be set. + */ + igLinearGauge(optionLiteral: 'option', optionName: "labelExtent", optionValue: number): void; + + /** + * A value to start adding labels, added to the scale's MinimumValue. + */ + igLinearGauge(optionLiteral: 'option', optionName: "labelsPostInitial"): number; + + /** + * A value to start adding labels, added to the scale's MinimumValue. + * + * @optionValue New value to be set. + */ + igLinearGauge(optionLiteral: 'option', optionName: "labelsPostInitial", optionValue: number): void; + + /** + * A value to stop adding labels, subtracted from the scale's MaximumValue. + */ + igLinearGauge(optionLiteral: 'option', optionName: "labelsPreTerminal"): number; + + /** + * A value to stop adding labels, subtracted from the scale's MaximumValue. + * + * @optionValue New value to be set. + */ + igLinearGauge(optionLiteral: 'option', optionName: "labelsPreTerminal", optionValue: number): void; + + /** + * Gets the number of minor tickmarks to place between major tickmarks. + */ + igLinearGauge(optionLiteral: 'option', optionName: "minorTickCount"): number; + + /** + * Sets the number of minor tickmarks to place between major tickmarks. + * + * @optionValue New value to be set. + */ + igLinearGauge(optionLiteral: 'option', optionName: "minorTickCount", optionValue: number): void; + + /** + * Gets the position at which to start rendering the major tickmarks as a value from 0 to 1, measured from the front/bottom of the linear gauge. + * Values further from zero than 1 can be used to make this extend further than the normal size of the linear gauge. + */ + igLinearGauge(optionLiteral: 'option', optionName: "tickStartExtent"): number; + + /** + * Sets the position at which to start rendering the major tickmarks as a value from 0 to 1, measured from the front/bottom of the linear gauge. + * Values further from zero than 1 can be used to make this extend further than the normal size of the linear gauge. + * + * @optionValue New value to be set. + */ + igLinearGauge(optionLiteral: 'option', optionName: "tickStartExtent", optionValue: number): void; + + /** + * Gets the position at which to stop rendering the major tickmarks as a value from 0 to 1, measured from the front/bottom of the linear gauge. + * Values further from zero than 1 can be used to make this extend further than the normal size of the linear gauge. + */ + igLinearGauge(optionLiteral: 'option', optionName: "tickEndExtent"): number; + + /** + * Sets the position at which to stop rendering the major tickmarks as a value from 0 to 1, measured from the front/bottom of the linear gauge. + * Values further from zero than 1 can be used to make this extend further than the normal size of the linear gauge. + * + * @optionValue New value to be set. + */ + igLinearGauge(optionLiteral: 'option', optionName: "tickEndExtent", optionValue: number): void; + + /** + * Gets the stroke thickness to use when rendering ticks. + */ + igLinearGauge(optionLiteral: 'option', optionName: "tickStrokeThickness"): number; + + /** + * Sets the stroke thickness to use when rendering ticks. + * + * @optionValue New value to be set. + */ + igLinearGauge(optionLiteral: 'option', optionName: "tickStrokeThickness", optionValue: number): void; + + /** + * Gets the brush to use for the major tickmarks. + */ + igLinearGauge(optionLiteral: 'option', optionName: "tickBrush"): string; + + /** + * Sets the brush to use for the major tickmarks. + * + * @optionValue New value to be set. + */ + igLinearGauge(optionLiteral: 'option', optionName: "tickBrush", optionValue: string): void; + + /** + * Gets the brush to use for the label font. + */ + igLinearGauge(optionLiteral: 'option', optionName: "fontBrush"): string; + + /** + * Sets the brush to use for the label font. + * + * @optionValue New value to be set. + */ + igLinearGauge(optionLiteral: 'option', optionName: "fontBrush", optionValue: string): void; + + /** + * Gets the needle breadth. + */ + igLinearGauge(optionLiteral: 'option', optionName: "needleBreadth"): number; + + /** + * Sets the needle breadth. + * + * @optionValue New value to be set. + */ + igLinearGauge(optionLiteral: 'option', optionName: "needleBreadth", optionValue: number): void; + + /** + * Gets the brush to use for needle element. + */ + igLinearGauge(optionLiteral: 'option', optionName: "needleBrush"): string; + + /** + * Sets the brush to use for needle element. + * + * @optionValue New value to be set. + */ + igLinearGauge(optionLiteral: 'option', optionName: "needleBrush", optionValue: string): void; + + /** + * Gets the brush to use for the outline of needle element. + */ + igLinearGauge(optionLiteral: 'option', optionName: "needleOutline"): string; + + /** + * Sets the brush to use for the outline of needle element. + * + * @optionValue New value to be set. + */ + igLinearGauge(optionLiteral: 'option', optionName: "needleOutline", optionValue: string): void; + + /** + * Gets the stroke thickness to use when rendering single actual value element. + */ + igLinearGauge(optionLiteral: 'option', optionName: "needleStrokeThickness"): number; + + /** + * Sets the stroke thickness to use when rendering single actual value element. + * + * @optionValue New value to be set. + */ + igLinearGauge(optionLiteral: 'option', optionName: "needleStrokeThickness", optionValue: number): void; + + /** + * Gets the position at which to start rendering the minor tickmarks as a value from 0 to 1, measured from the front/bottom of the linear gauge. + * Values further from zero than 1 can be used to make this extend further than the normal size of the linear gauge. + */ + igLinearGauge(optionLiteral: 'option', optionName: "minorTickStartExtent"): number; + + /** + * Sets the position at which to start rendering the minor tickmarks as a value from 0 to 1, measured from the front/bottom of the linear gauge. + * Values further from zero than 1 can be used to make this extend further than the normal size of the linear gauge. + * + * @optionValue New value to be set. + */ + igLinearGauge(optionLiteral: 'option', optionName: "minorTickStartExtent", optionValue: number): void; + + /** + * Gets the position at which to stop rendering the minor tickmarks as a value from 0 to 1, measured from the front/bottom of the linear gauge. + * Values further from zero than 1 can be used to make this extend further than the normal size of the linear gauge. + */ + igLinearGauge(optionLiteral: 'option', optionName: "minorTickEndExtent"): number; + + /** + * Sets the position at which to stop rendering the minor tickmarks as a value from 0 to 1, measured from the front/bottom of the linear gauge. + * Values further from zero than 1 can be used to make this extend further than the normal size of the linear gauge. + * + * @optionValue New value to be set. + */ + igLinearGauge(optionLiteral: 'option', optionName: "minorTickEndExtent", optionValue: number): void; + + /** + * Gets the stroke thickness to use when rendering minor ticks. + */ + igLinearGauge(optionLiteral: 'option', optionName: "minorTickStrokeThickness"): number; + + /** + * Sets the stroke thickness to use when rendering minor ticks. + * + * @optionValue New value to be set. + */ + igLinearGauge(optionLiteral: 'option', optionName: "minorTickStrokeThickness", optionValue: number): void; + + /** + * Gets the brush to use for the minor tickmarks. + */ + igLinearGauge(optionLiteral: 'option', optionName: "minorTickBrush"): string; + + /** + * Sets the brush to use for the minor tickmarks. + * + * @optionValue New value to be set. + */ + igLinearGauge(optionLiteral: 'option', optionName: "minorTickBrush", optionValue: string): void; + + /** + * Gets a value indicating whether the scale is inverted. + * When the scale is inverted the direction in which the scale values increase is right to left. + */ + igLinearGauge(optionLiteral: 'option', optionName: "isScaleInverted"): boolean; + + /** + * Sets a value indicating whether the scale is inverted. + * When the scale is inverted the direction in which the scale values increase is right to left. + * + * @optionValue New value to be set. + */ + igLinearGauge(optionLiteral: 'option', optionName: "isScaleInverted", optionValue: boolean): void; + + /** + * Gets the brush to use to fill the backing of the linear gauge. + */ + igLinearGauge(optionLiteral: 'option', optionName: "backingBrush"): string; + + /** + * Sets the brush to use to fill the backing of the linear gauge. + * + * @optionValue New value to be set. + */ + igLinearGauge(optionLiteral: 'option', optionName: "backingBrush", optionValue: string): void; + + /** + * Gets the brush to use for the outline of the backing. + */ + igLinearGauge(optionLiteral: 'option', optionName: "backingOutline"): string; + + /** + * Sets the brush to use for the outline of the backing. + * + * @optionValue New value to be set. + */ + igLinearGauge(optionLiteral: 'option', optionName: "backingOutline", optionValue: string): void; + + /** + * Gets the stroke thickness of the backing outline. + */ + igLinearGauge(optionLiteral: 'option', optionName: "backingStrokeThickness"): number; + + /** + * Sets the stroke thickness of the backing outline. + * + * @optionValue New value to be set. + */ + igLinearGauge(optionLiteral: 'option', optionName: "backingStrokeThickness", optionValue: number): void; + + /** + * Gets the inner extent of the linear gauge backing. + */ + igLinearGauge(optionLiteral: 'option', optionName: "backingInnerExtent"): number; + + /** + * Sets the inner extent of the linear gauge backing. + * + * @optionValue New value to be set. + */ + igLinearGauge(optionLiteral: 'option', optionName: "backingInnerExtent", optionValue: number): void; + + /** + * Gets the outer extent of the linear gauge backing. + */ + igLinearGauge(optionLiteral: 'option', optionName: "backingOuterExtent"): number; + + /** + * Sets the outer extent of the linear gauge backing. + * + * @optionValue New value to be set. + */ + igLinearGauge(optionLiteral: 'option', optionName: "backingOuterExtent", optionValue: number): void; + + /** + * Gets the position at which to start rendering the scale, measured from the front/bottom of the linear gauge as a value from 0 to 1. + * Values further from zero than 1 can be used to make this extend further than the normal size of the linear gauge. + */ + igLinearGauge(optionLiteral: 'option', optionName: "scaleStartExtent"): number; + + /** + * Sets the position at which to start rendering the scale, measured from the front/bottom of the linear gauge as a value from 0 to 1. + * Values further from zero than 1 can be used to make this extend further than the normal size of the linear gauge. + * + * @optionValue New value to be set. + */ + igLinearGauge(optionLiteral: 'option', optionName: "scaleStartExtent", optionValue: number): void; + + /** + * Gets the position at which to stop rendering the scale as a value from 0 to 1, measured from the front/bottom of the linear gauge. + * Values further from zero than 1 can be used to make this extend further than the normal size of the linear gauge. + */ + igLinearGauge(optionLiteral: 'option', optionName: "scaleEndExtent"): number; + + /** + * Sets the position at which to stop rendering the scale as a value from 0 to 1, measured from the front/bottom of the linear gauge. + * Values further from zero than 1 can be used to make this extend further than the normal size of the linear gauge. + * + * @optionValue New value to be set. + */ + igLinearGauge(optionLiteral: 'option', optionName: "scaleEndExtent", optionValue: number): void; + + /** + * Gets the brush to use to fill the scale of the linear gauge. + */ + igLinearGauge(optionLiteral: 'option', optionName: "scaleBrush"): string; + + /** + * Sets the brush to use to fill the scale of the linear gauge. + * + * @optionValue New value to be set. + */ + igLinearGauge(optionLiteral: 'option', optionName: "scaleBrush", optionValue: string): void; + + /** + * Gets the brush to use for the outline of the scale. + */ + igLinearGauge(optionLiteral: 'option', optionName: "scaleOutline"): string; + + /** + * Sets the brush to use for the outline of the scale. + * + * @optionValue New value to be set. + */ + igLinearGauge(optionLiteral: 'option', optionName: "scaleOutline", optionValue: string): void; + + /** + * Gets the stroke thickness of the scale outline. + */ + igLinearGauge(optionLiteral: 'option', optionName: "scaleStrokeThickness"): number; + + /** + * Sets the stroke thickness of the scale outline. + * + * @optionValue New value to be set. + */ + igLinearGauge(optionLiteral: 'option', optionName: "scaleStrokeThickness", optionValue: number): void; + + /** + * Gets whether needle dragging is enabled or not. + */ + igLinearGauge(optionLiteral: 'option', optionName: "isNeedleDraggingEnabled"): boolean; + + /** + * Sets whether needle dragging is enabled or not. + * + * @optionValue New value to be set. + */ + igLinearGauge(optionLiteral: 'option', optionName: "isNeedleDraggingEnabled", optionValue: boolean): void; + + /** + * Gets the number of milliseconds over which changes to the linear gauge should be animated. + */ + igLinearGauge(optionLiteral: 'option', optionName: "transitionDuration"): number; + + /** + * Sets the number of milliseconds over which changes to the linear gauge should be animated. + * + * @optionValue New value to be set. + */ + igLinearGauge(optionLiteral: 'option', optionName: "transitionDuration", optionValue: number): void; + + /** + * Gets the time in milliseconds that tooltip appearance is delayed with. + */ + igLinearGauge(optionLiteral: 'option', optionName: "showToolTipTimeout"): number; + + /** + * Sets the time in milliseconds that tooltip appearance is delayed with. + * + * @optionValue New value to be set. + */ + igLinearGauge(optionLiteral: 'option', optionName: "showToolTipTimeout", optionValue: number): void; + + /** + * Gets a value indicating whether tooltips are enabled. + */ + igLinearGauge(optionLiteral: 'option', optionName: "showToolTip"): boolean; + + /** + * Sets a value indicating whether tooltips are enabled. + * + * @optionValue New value to be set. + */ + igLinearGauge(optionLiteral: 'option', optionName: "showToolTip", optionValue: boolean): void; + + /** + * Gets the font. + */ + igLinearGauge(optionLiteral: 'option', optionName: "font"): string; + + /** + * Sets the font. + * + * @optionValue New value to be set. + */ + igLinearGauge(optionLiteral: 'option', optionName: "font", optionValue: string): void; + + /** + * Gets the pixel scaling ratio for the gauge. + */ + igLinearGauge(optionLiteral: 'option', optionName: "pixelScalingRatio"): number; + + /** + * Sets the pixel scaling ratio for the gauge. + * + * @optionValue New value to be set. + */ + igLinearGauge(optionLiteral: 'option', optionName: "pixelScalingRatio", optionValue: number): void; + + /** + */ + igLinearGauge(optionLiteral: 'option', optionName: "formatLabel"): FormatLabelEvent; + + /** + */ + igLinearGauge(optionLiteral: 'option', optionName: "formatLabel", optionValue: FormatLabelEvent): void; + + /** + */ + igLinearGauge(optionLiteral: 'option', optionName: "alignLabel"): AlignLabelEvent; + + /** + */ + igLinearGauge(optionLiteral: 'option', optionName: "alignLabel", optionValue: AlignLabelEvent): void; + + /** + * Occurs when the Value property changes. + */ + igLinearGauge(optionLiteral: 'option', optionName: "valueChanged"): ValueChangedEvent; + + /** + * Occurs when the Value property changes. + * + * @optionValue New value to be set. + */ + igLinearGauge(optionLiteral: 'option', optionName: "valueChanged", optionValue: ValueChangedEvent): void; + igLinearGauge(options: IgLinearGauge): JQuery; + igLinearGauge(optionLiteral: 'option', optionName: string): any; + igLinearGauge(optionLiteral: 'option', options: IgLinearGauge): JQuery; + igLinearGauge(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igLinearGauge(methodName: string, ...methodParams: any[]): any; +} +interface IgMapCrosshairPoint { + /** + * The x coordinate. + */ + x?: number; + + /** + * The y coordinate. + */ + y?: number; + + /** + * Option for IgMapCrosshairPoint + */ + [optionName: string]: any; +} + +interface IgMapBackgroundContent { + /** + * Type of the background content for the map. + * + * Valid values: + * "openStreet" Specify the background content to display OpenStreetMap geographic data. Set as default. + * "cloudMade" Specify the background content to display CloudMade geographic data. + * "bing" Specify the background content to BingMaps geographic data. + */ + type?: string; + + /** + * Gets or sets the key. + */ + key?: string; + + /** + * Gets or sets the parameter. + */ + parameter?: string; + + /** + * Gets or sets the map tile image uri. This is a bing maps specific option + */ + tilePath?: string; + + /** + * Gets or sets the type of the imagery. + */ + imagerySet?: string; + + /** + * Gets or sets the bing maps url + */ + bingUrl?: string; + + /** + * Option for IgMapBackgroundContent + */ + [optionName: string]: any; +} + +interface IgMapSeries { + /** + * Type of the series. + * + * Valid values: + * "geographicSymbolSeries" Specify the series as geographic Symbol Series series. + * "geographicPolyLine" Specify the series as geographic Polyline series. + * "geographicScatterArea" Specify the series as geographic Scatter Area series. + * "geographicShape" Specify the series as geographic Shape series. + * "geographicContourLine" Specify the series as geographic Contour Line series. + * "geographicHighDensityScatter" Specify the series as geographic High Density Scatter series. + * "geographicProportionalSymbol" Specify the series as geographic Proportional Symbol series. + */ + type?: string; + + /** + * The unique identifier of the series. + */ + name?: string; + + /** + * Can be any valid data source accepted by $.ig.DataSource, or an instance of an $.ig.DataSource itself + */ + dataSource?: any; + + /** + * Specifies a remote URL accepted by $.ig.DataSource in order to request data from it + */ + dataSourceUrl?: string; + + /** + * Explicitly set data source type (such as "json"). Please refer to the documentation of $.ig.DataSource and its type property. + */ + dataSourceType?: string; + + /** + * See $.ig.DataSource. Specifies the name of the property in which data records are held if the response is wrapped. + */ + responseDataKey?: string; + + /** + * Set to true in order to have an existing series removed from the map, by name + */ + remove?: boolean; + + /** + * Whether the map should render a tooltip. + */ + showTooltip?: boolean; + + /** + * The triangulated file source URI or an instance of $.ig.ShapeDataSource. + */ + shapeDataSource?: string; + + /** + * String The database source URI. + */ + databaseSource?: string; + + /** + * The triangulated file source URI or an instance of $.ig.TriangulationDataSource. + */ + triangulationDataSource?: string; + + /** + * Gets or sets the LegendItemBadgeTemplate property. + * The legend item badge is created according to the LegendItemBadgeTemplate on-demand by + * the series object itself. + * The provided object should have properties called render and optionally measure. + * These are functions which will be called that will be called to handle the user specified custom rendering. + * measure will be passed an object that looks like this: + * { + * context: [either a DOM element or a CanvasContext2D depending on the particular template scenario], + * width: [if value is present, specifies the available width, user may set to desired width for content], + * height: [if value is present, specifies the available height, user may set to desired height for content], + * isConstant: [user should set to true if desired with and height will always be the same for this template], + * data: [if present, represents the contextual data for this template] + * } + * render will be passed an object that looks like this: + * { + * context: [either a DOM element or a CanvasContext2D depending on the particular template scenario], + * xPosition: [if present, specifies the x position at which to render the content], + * yPosition: [if present, specifies the y position at which to render the content], + * availableWidth: [if present, specifies the available width in which to render the content], + * availableHeight: [if present, specifies the available height in which to render the content], + * data: [if present, specifies the data that is in context for this content], + * isHitTestRender: [if true, indicates that this is a special render pass for hit testing, in which case the brushes from the data should be used] + * } + */ + legendItemBadgeTemplate?: any; + + /** + * Gets or sets the LegendItemTemplate property. + * The legend item control content is created according to the LegendItemTemplate on-demand by + * the series object itself. + * The provided object should have properties called render and optionally measure. See definition for option: legendItemBadgeTemplate + */ + legendItemTemplate?: any; + + /** + * Gets or sets the DiscreteLegendItemTemplate property. + * The legend item control content is created according to the DiscreteLegendItemTemplate on-demand by + * the series object itself. + * The provided object should have properties called render and optionally measure. See definition for option: legendItemBadgeTemplate + */ + discreteLegendItemTemplate?: any; + + /** + * Gets or sets the duration of the current series's morph. + */ + transitionDuration?: number; + + /** + * Gets or sets the current series object's rendering resolution. + */ + resolution?: number; + + /** + * Gets or sets the Title property. + * The legend item control is created according to the Title on-demand by + * the series object itself. + */ + title?: string; + + /** + * Gets or sets the brush to use for the series. + */ + brush?: string; + + /** + * Gets or sets the brush to use for the outline of the series. + * Some series types, such as LineSeries, do not display outlines. + */ + outline?: string; + + /** + * Gets or sets the width of the current series object's line thickness. + */ + thickness?: number; + + /** + * The source of triangulation data. + * This property is optional. If it is left as null, the triangulation will be created based on the items in the data source. Triangulation is a demanding operation, so the runtime performance will be better when specifying a TriangulationSource, especially when a large number of data items are present. + */ + trianglesSource?: any; + + /** + * The name of the property of the TrianglesSource items which, for each triangle, contains the index of the first vertex point in the data source. + */ + triangleVertexMemberPath1?: string; + + /** + * The name of the property of the TrianglesSource items which, for each triangle, contains the index of the second vertex point in the data source. + */ + triangleVertexMemberPath2?: string; + + /** + * The name of the property of the TrianglesSource items which, for each triangle, contains the index of the third vertex point in the data source. + */ + triangleVertexMemberPath3?: string; + + /** + * The ColorScale used to resolve the color values of points in the series. + */ + colorScale?: any; + + /** + * The name of the property on each data item containing a numeric value which can be converted to a color by the ColorScale. + */ + colorMemberPath?: string; + + /** + * The minimum scale at which this series becomes visible. + * The default value for this property is 1.0, which means the series will always be visible. At a VisibleFromScale setting of 0.0, the series will never be visible. At a VisibleFromScale setting of 0.5, the series will be visible as long as the map is zoomed in to at least 200%. + */ + visibleFromScale?: number; + + /** + * The name of the property of data source items which contains the longitude coordinate of the symbol. + */ + longitudeMemberPath?: string; + + /** + * The name of the property of data source items which contains the latitude coordinate of the symbol. + */ + latitudeMemberPath?: string; + + /** + * Gets or sets the marker type for the current series object.If the MarkerTemplate property is set, the setting of the MarkerType property will be ignored. + * + * + * Valid values: + * "unset" + * "none" + * "automatic" + * "circle" + * "triangle" + * "pyramid" + * "square" + * "diamond" + * "pentagon" + * "hexagon" + * "tetragram" + * "pentagram" + * "hexagram" + */ + markerType?: string; + + /** + * Gets or sets the MarkerTemplate for the current series object. + * The provided object should have properties called render and optionally measure. + * These are functions which will be called that will be called to handle the user specified custom rendering. + * measure will be passed an object that looks like this: + * { + * context: [either a DOM element or a CanvasContext2D depending on the particular template scenario], + * width: [if value is present, specifies the available width, user may set to desired width for content], + * height: [if value is present, specifies the available height, user may set to desired height for content], + * isConstant: [user should set to true if desired with and height will always be the same for this template], + * data: [if present, represents the contextual data for this template] + * } + * render will be passed an object that looks like this: + * { + * context: [either a DOM element or a CanvasContext2D depending on the particular template scenario], + * xPosition: [if present, specifies the x position at which to render the content], + * yPosition: [if present, specifies the y position at which to render the content], + * availableWidth: [if present, specifies the available width in which to render the content], + * availableHeight: [if present, specifies the available height in which to render the content], + * data: [if present, specifies the data that is in context for this content], + * isHitTestRender: [if true, indicates that this is a special render pass for hit testing, in which case the brushes from the data should be used] + * } + */ + markerTemplate?: any; + + /** + * The name of the property on data source items which, for each shape, contains a list of points to be converted to a polygon. + * To be consistent with the Shapefile technical description, it is expected that each list of points is defined as an IEnumerable of IEnumerable of Point, or in other words, a list of lists of points. + */ + shapeMemberPath?: string; + + /** + * The StyleSelector which is used to select a style for each Shape. + */ + shapeStyleSelector?: any; + + /** + * The default style to apply to all Shapes in the series. + */ + shapeStyle?: any; + + /** + * Gets or sets the brush that specifies how the current series object's marker interiors are painted. + */ + markerBrush?: string; + + /** + * Gets or sets the brush that specifies how the current series object's marker outlines are painted. + */ + markerOutline?: string; + + /** + * Gets or sets the MarkerCollisionAvoidance + * + * Valid values: + * "none" No collision avoidance is attempted. + * "omit" Markers that collide will be omitted. + * "fade" Markers that collide will be faded in opacity. + * "omitAndShift" Markers that collide may be shifted or omitted. + */ + markerCollisionAvoidance?: string; + + /** + * The ValueBrushScale to use when determining Brushes for each Shape, based on the values found in FillMemberPath. + */ + fillScale?: any; + + /** + * The name of the property on data source items which contains a numeric value to convert to a Brush using the FillScale. + */ + fillMemberPath?: string; + + /** + * Gets or sets the trend type for the current scatter series. + * + * Valid values: + * "none" No trendline should display. + * "linearFit" Linear fit. + * "quadraticFit" Quadratic polynomial fit. + * "cubicFit" Cubic polynomial fit. + * "quarticFit" Quartic polynomial fit. + * "quinticFit" Quintic polynomial fit. + * "logarithmicFit" Logarithmic fit. + * "exponentialFit" Exponential fit. + * "powerLawFit" Powerlaw fit. + * "simpleAverage" Simple moving average. + * "exponentialAverage" Exponential moving average. + * "modifiedAverage" Modified moving average. + * "cumulativeAverage" Cumulative moving average. + * "weightedAverage" Weighted moving average. + */ + trendLineType?: string; + + /** + * Gets or sets the brush to use to draw the trend line. + */ + trendLineBrush?: string; + + /** + * Gets or sets the thickness of the current scatter series object's trend line. + */ + trendLineThickness?: number; + + /** + * Gets or sets the moving average period for the current scatter series object. + * The typical, and initial, value for trend line period is 7. + */ + trendLinePeriod?: number; + + /** + * Gets or sets the Z-Index of the trend line. Values greater than 1000 will result in the trend line being rendered in front of the series data. + */ + trendLineZIndex?: number; + + /** + * Gets or sets the maximum number of markerItems displayed by the current series. + * If more than the specified number of markerItems are visible, the series will automatically + * choose a representative set. + */ + maximumMarkers?: number; + + /** + * Gets or sets the radius mapping property for the current series object. + */ + radiusMemberPath?: string; + + /** + * Gets or sets the radius size scale for the bubbles. + */ + radiusScale?: any; + + /** + * Gets or sets the Label mapping property for the current series object. + */ + labelMemberPath?: string; + + /** + * Gets or sets whether to clip the series to the bounds. + * Setting this to true can affect performance. + */ + clipSeriesToBounds?: boolean; + + /** + * Gets or sets the item path that provides the values for the current series. + */ + valueMemberPath?: string; + + /** + * Determines how unknown values will be plotted on the map. Null and Double.NaN are two examples of unknown values. + * + * Valid values: + * "linearInterpolate" Plot the unknown value as the midpoint between surrounding known values using linear interpolation. + * "dontPlot" Do not plot the unknown value on the map. + */ + unknownValuePlotting?: string; + + /** + * Gets or sets the x-radius of the ellipse that is used to round the corners of the column. + */ + angleMemberPath?: number; + + /** + * Gets or sets whether Cartesian Interpolation should be used rather than Archimedian + * spiral based interpolation. + */ + useCartesianInterpolation?: boolean; + + /** + * Gets or sets the Stiffness property. + */ + stiffness?: number; + + /** + * Gets or sets the brush to use for negative portions of the series. + */ + negativeBrush?: string; + + /** + * Gets or sets the type of spline to be rendered. + * + * Valid values: + * "natural" Calculates the spline using a natural spline calculation formula. + * "clamped" Calculated the spline using a clamped spline calculation formula. + */ + splineType?: string; + + /** + * Gets or sets the value mapping property for the current series object. + */ + lowMemberPath?: string; + + /** + * Gets or sets the value mapping property for the current series object. + */ + highMemberPath?: string; + + /** + * Gets or sets the value mapping property for the current series object. + */ + openMemberPath?: string; + + /** + * Gets or sets the close mapping property for the current series object. + */ + closeMemberPath?: string; + + /** + * Gets or sets the volume mapping property for the current series object. + */ + volumeMemberPath?: string; + + /** + * Gets or sets the number of values to hide at the beginning of the indicator. + */ + ignoreFirst?: number; + + /** + * Gets or sets the moving average period for the current AverageDirectionalIndexIndicator object. + * The typical, and initial, value for AverageDirectionalIndexIndicator periods is 14. + */ + period?: number; + + /** + * Gets or sets the short moving average period for the current AbsoluteVolumeOscillatorIndicator object. + * The typical, and initial, value for short AVO periods is 10. + */ + shortPeriod?: number; + + /** + * Gets or sets the short moving average period for the current AbsoluteVolumeOscillatorIndicator object. + * The typical, and initial, value for long AVO periods is 30. + */ + longPeriod?: number; + + /** + * Gets or sets the ContourValueResolver used to determine the numeric values of contours. + */ + valueResolver?: any; + + /** + * Gets or sets the resolution at which to filter out shapes in the series. + * For example, if the shapeFilterResolution is set to 3, then elements with a bounding rectangle smaller than 3 X 3 pixels will be filtered out. + */ + shapeFilterResolution?: number; + + /** + * Gets or sets the whether to use use brute force mode. + */ + useBruteForce?: boolean; + + /** + * Gets or sets the whether to progressively load the data into the map. + */ + progressiveLoad?: boolean; + + /** + * Gets or sets the whether the map reacts to mouse move events. + */ + mouseOverEnabled?: boolean; + + /** + * Gets or sets the whether to use squares when halting a render traversal rather than the shape of the coalesced area. + */ + useSquareCutoffStyle?: boolean; + + /** + * Gets or sets the density value that maps to the minimum heat color. + */ + heatMinimum?: number; + + /** + * Gets or sets the value that maps to the maximum heat color. + */ + heatMaximum?: number; + + /** + * Option for IgMapSeries + */ + [optionName: string]: any; +} + +interface TriangulationStatusChangedEvent { + (event: Event, ui: TriangulationStatusChangedEventUIParam): void; +} + +interface TriangulationStatusChangedEventUIParam { + /** + * Used to get reference to map object. + */ + map?: any; + + /** + * Used to get reference to current series object. + */ + series?: any; + + /** + * Used to get current status. + */ + currentStatus?: any; +} + +interface IgMap { + /** + * The width of the map. It can be set as a number in pixels, string (px) or percentage (%). + */ + width?: string|number; + + /** + * The height of the map. It can be set as a number in pixels, string (px) or percentage (%). + */ + height?: string|number; + + /** + * Can be any valid data source accepted by $.ig.DataSource, or an instance of an $.ig.DataSource itself + */ + dataSource?: any; + + /** + * Specifies a remote URL accepted by $.ig.DataSource in order to request data from it + */ + dataSourceUrl?: string; + + /** + * Explicitly set data source type (such as "json"). Please refer to the documentation of $.ig.DataSource and its type property. + */ + dataSourceType?: string; + + /** + * See $.ig.DataSource. Specifies the name of the property in which data records are held if the response is wrapped. + */ + responseDataKey?: string; + + /** + * Sets or gets the automatic width to add when automatically adding margins to the map. + */ + autoMarginWidth?: number; + + /** + * Sets or gets the automatic height to add when automatically adding margins to the map. + */ + autoMarginHeight?: number; + + /** + * Gets or sets the current Map's crosshair visibility override. + * + * Valid values: + * "visible" Crosshair should be visible. + * "collapsed" Crosshair should not be visible. + */ + crosshairVisibility?: string; + + /** + * Gets or sets the cross hair point (in world coordinates) + * Either or both of the crosshair point's X and Y may be set to double.NaN, in which + * case the relevant crosshair line is hidden. + */ + crosshairPoint?: IgMapCrosshairPoint; + + /** + * Gets or sets the brush used as the background for the current Map object's plot area. + */ + plotAreaBackground?: string; + + /** + * Gets or sets the DefaultInteraction property. The default interaction state defines the map's response to mouse events. + * + * Valid values: + * "none" User gesture will not change the state of the map. + * "dragZoom" User gesture will start a drag rectangle to zoom the map. + * "dragPan" User gesture will start a pan action to move the map's window. + */ + defaultInteraction?: string; + + /** + * Gets or sets the current Map's DragModifier property. + * + * Valid values: + * "none" No modifier key is set. + * "alt" The modifier is set to alt key. + * "control" The modifier is set to control key. + * "shift" The modifier is set to shift key. + */ + dragModifier?: string; + + /** + * Gets or sets the current Map's PanModifier property. + * + * Valid values: + * "none" No modifier key is set. + * "alt" The modifier is set to alt key. + * "control" The modifier is set to control key. + * "shift" The modifier is set to shift key. + */ + panModifier?: string; + + /** + * Gets or sets the preview rectangle. + * The preview rectangle may be set to Rect.Empty, in which case the visible preview + * strokePath is hidden. + * The provided object should have numeric properties called left, top, width and height. + */ + previewRect?: any; + + /** + * A rectangle representing the portion of the map currently in view. + * A rectangle at X=0, Y=0 with a Height and Width of 1 implies the entire plotting area is in view. A Height and Width of .5 would imply that the view is halfway zoomed in. + * The provided object should have numeric properties called left, top, width and height. + */ + windowRect?: any; + + /** + * Gets or sets the current Map's zoomability. + */ + zoomable?: boolean; + + /** + * Gets or sets the current Map's zoom scale. + */ + windowScale?: number; + + /** + * The response to user panning and zooming: whether to update the view immediately while the user action is happening, or to defer the update to after the user action is complete. The user action will be an action such as a mouse drag which causes panning and/or zooming to occur. + * + * + * Valid values: + * "deferred" Defer the view update until after the user action is complete. + * "immediate" Update the view immediately while the user action is happening. + */ + windowResponse?: string; + + /** + * Sets or gets the minimum width that the window rect is allowed to reach before being clamped. + * Decrease this value if you want to allow for further zooming into the viewer. + * If this value is lowered too much it can cause graphical corruption due to floating point arithmetic inaccuracy. + */ + windowRectMinWidth?: number; + + /** + * A number between 0 and 1 determining the position of the horizontal scroll. + * This property is effectively a shortcut to the X position of the WindowRect property. + */ + windowPositionHorizontal?: number; + + /** + * A number between 0 and 1 determining the position of the vertical scroll. + * This property is effectively a shortcut to the Y position of the WindowRect property. + */ + windowPositionVertical?: number; + + /** + * Gets or sets the template to use for circle markers on the map. + * Defines the marker template used for + * series with a marker type of circle. + * The provided object should have properties called render and optionally measure. See definition for option: legendItemBadgeTemplate + */ + circleMarkerTemplate?: any; + + /** + * Gets or sets the template to use for triangle markers on the map. + * Defines the marker template used for + * series with a marker type of triangle. + * The provided object should have properties called render and optionally measure. See definition for option: legendItemBadgeTemplate + */ + triangleMarkerTemplate?: any; + + /** + * Gets or sets the template to use for pyramid markers on the map. + * Defines the marker template used for + * series with a marker type of pyramid. + * The provided object should have properties called render and optionally measure. See definition for option: legendItemBadgeTemplate + */ + pyramidMarkerTemplate?: any; + + /** + * Gets or sets the template to use for square markers on the map. + * Defines the marker template used for + * series with a marker type of square. + * The provided object should have properties called render and optionally measure. See definition for option: legendItemBadgeTemplate + */ + squareMarkerTemplate?: any; + + /** + * Gets or sets the template to use for diamond markers on the map. + * Defines the marker template used for + * series with a marker type of diamond. + * The provided object should have properties called render and optionally measure. See definition for option: legendItemBadgeTemplate + */ + diamondMarkerTemplate?: any; + + /** + * Gets or sets the template to use for pentagon markers on the map. + * Defines the marker template used for + * series with a marker type of pentagon. + * The provided object should have properties called render and optionally measure. See definition for option: legendItemBadgeTemplate + */ + pentagonMarkerTemplate?: any; + + /** + * Gets or sets the template to use for hexagon markers on the map. + * Defines the marker template used for + * series with a marker type of hexagon. + * The provided object should have properties called render and optionally measure. See definition for option: legendItemBadgeTemplate + */ + hexagonMarkerTemplate?: any; + + /** + * Gets or sets the template to use for tetragram markers on the map. + * Defines the marker template used for + * series with a marker type of tetragram. + * The provided object should have properties called render and optionally measure. See definition for option: legendItemBadgeTemplate + */ + tetragramMarkerTemplate?: any; + + /** + * Gets or sets the template to use for pentragram markers on the map. + * Defines the marker template used for + * series with a marker type of pentagram. + * The provided object should have properties called render and optionally measure. See definition for option: legendItemBadgeTemplate + */ + pentagramMarkerTemplate?: any; + + /** + * Gets or sets the template to use for hexagram markers on the map. + * Defines the marker template used for + * series with a marker type of hexagram. + * The provided object should have properties called render and optionally measure. See definition for option: legendItemBadgeTemplate + */ + hexagramMarkerTemplate?: any; + + /** + * The background image uri use in the overview detail pane. + */ + overviewPlusDetailPaneBackgroundImageUri?: string; + + /** + * Sets whether the series viewer should use cached tiles during zooms rather than the default live content. + */ + useTiledZooming?: boolean; + + /** + * Sets whether the series viewer should prefer selecting higher resolution tiles over lower resolution tiles when performing tile zooming. Setting this to true will lower performance but increase quality. + */ + preferHigherResolutionTiles?: boolean; + + /** + * Sets the maximum number of zoom tiles that the series viewer should cache while in tiled zooming mode. + */ + zoomTileCacheSize?: number; + + /** + * Background content object + */ + backgroundContent?: IgMapBackgroundContent; + + /** + * An array of series objects + */ + series?: IgMapSeries[]; + + /** + * The swatch used to style this widget + */ + theme?: string; + + /** + * Event fired when the mouse has hovered on a series and the tooltip is about to show + * Function takes arguments evt and ui. + * Use ui.element to get reference to tooltip DOM element. + * Use ui.item to get reference to current series item object. + * Use ui.map to get reference to map object. + * Use ui.series to get reference to current series object. + * Use ui.actualItemBrush to get item brush. + * Use ui.actualSeriesBrush to get series brush. + */ + tooltipShowing?: TooltipShowingEvent; + + /** + * Event fired after a tooltip is shown + * Function takes arguments evt and ui. + * Use ui.element to get reference to tooltip DOM element. + * Use ui.item to get reference to current series item object. + * Use ui.map to get reference to map object. + * Use ui.series to get reference to current series object. + * Use ui.actualItemBrush to get item brush. + * Use ui.actualSeriesBrush to get series brush. + */ + tooltipShown?: TooltipShownEvent; + + /** + * Event fired when the mouse has left a series and the tooltip is about to hide + * Function takes arguments evt and ui. + * Use ui.element to get reference to tooltip DOM element. + * Use ui.item to get reference to current series item object. + * Use ui.map to get reference to map object. + * Use ui.series to get reference to current series object. + * Use ui.actualItemBrush to get item brush. + * Use ui.actualSeriesBrush to get series brush. + */ + tooltipHiding?: TooltipHidingEvent; + + /** + * Event fired after a tooltip is hidden + * Function takes arguments evt and ui. + * Use ui.element to get reference to tooltip DOM element. + * Use ui.item to get reference to current series item object. + * Use ui.map to get reference to map object. + * Use ui.series to get reference to current series object. + * Use ui.actualItemBrush to get item brush. + * Use ui.actualSeriesBrush to get series brush. + */ + tooltipHidden?: TooltipHiddenEvent; + + /** + * Event fired when the control is displayed on a non HTML5 compliant browser + */ + browserNotSupported?: BrowserNotSupportedEvent; + + /** + * Occurs when the cursors are moved over a series in this map. + * Function takes arguments evt and ui. + * Use ui.item to get reference to current series item object. + * Use ui.map to get reference to map object. + * Use ui.series to get reference to current series object. + * Use ui.actualItemBrush to get item brush. + * Use ui.actualSeriesBrush to get series brush. + * Use ui.positionX to get mouse X position. + * Use ui.positionY to get mouse Y position. + */ + seriesCursorMouseMove?: SeriesCursorMouseMoveEvent; + + /** + * Occurs when the left mouse button is pressed while the mouse pointer is over an element of this map. + * Function takes arguments evt and ui. + * Use ui.item to get reference to current series item object. + * Use ui.map to get reference to map object. + * Use ui.series to get reference to current series object. + * Use ui.actualItemBrush to get item brush. + * Use ui.actualSeriesBrush to get series brush. + * Use ui.positionX to get mouse X position. + * Use ui.positionY to get mouse Y position. + */ + seriesMouseLeftButtonDown?: SeriesMouseLeftButtonDownEvent; + + /** + * Occurs when the left mouse button is released while the mouse pointer is over an element of this map. + * Function takes arguments evt and ui. + * Use ui.item to get reference to current series item object. + * Use ui.map to get reference to map object. + * Use ui.series to get reference to current series object. + * Use ui.actualItemBrush to get item brush. + * Use ui.actualSeriesBrush to get series brush. + * Use ui.positionX to get mouse X position. + * Use ui.positionY to get mouse Y position. + */ + seriesMouseLeftButtonUp?: SeriesMouseLeftButtonUpEvent; + + /** + * Occurs when the left mouse pointer moves while over an element of this map. + * Function takes arguments evt and ui. + * Use ui.item to get reference to current series item object. + * Use ui.map to get reference to map object. + * Use ui.series to get reference to current series object. + * Use ui.actualItemBrush to get item brush. + * Use ui.actualSeriesBrush to get series brush. + * Use ui.positionX to get mouse X position. + * Use ui.positionY to get mouse Y position. + */ + seriesMouseMove?: SeriesMouseMoveEvent; + + /** + * Occurs when the left mouse pointer enters an element of this map. + * Function takes arguments evt and ui. + * Use ui.item to get reference to current series item object. + * Use ui.map to get reference to map object. + * Use ui.series to get reference to current series object. + * Use ui.actualItemBrush to get item brush. + * Use ui.actualSeriesBrush to get series brush. + * Use ui.positionX to get mouse X position. + * Use ui.positionY to get mouse Y position. + */ + seriesMouseEnter?: SeriesMouseEnterEvent; + + /** + * Occurs when the left mouse pointer leaves an element of this map. + * Function takes arguments evt and ui. + * Use ui.item to get reference to current series item object. + * Use ui.map to get reference to map object. + * Use ui.series to get reference to current series object. + * Use ui.actualItemBrush to get item brush. + * Use ui.actualSeriesBrush to get series brush. + * Use ui.positionX to get mouse X position. + * Use ui.positionY to get mouse Y position. + */ + seriesMouseLeave?: SeriesMouseLeaveEvent; + + /** + * Occurs just after the current Map's window rectangle is changed. + * Function takes arguments evt and ui. + * Use ui.map to get reference to map object. + * Use ui.newHeight to get new height value. + * Use ui.newLeft to get new left value. + * Use ui.newTop to get new top value. + * Use ui.newWidth to get new top value. + * Use ui.oldHeight to get old height value. + * Use ui.oldLeft to get old left value. + * Use ui.oldTop to get old top value. + * Use ui.oldWidth to get old top value. + */ + windowRectChanged?: WindowRectChangedEvent; + + /** + * Occurs just after the current Map's grid area rectangle is changed. + * The grid area may change as the result of the Map being resized. + * Function takes arguments evt and ui. + * Use ui.map to get reference to map object. + * Use ui.newHeight to get new height value. + * Use ui.newLeft to get new left value. + * Use ui.newTop to get new top value. + * Use ui.newWidth to get new top value. + * Use ui.oldHeight to get old height value. + * Use ui.oldLeft to get old left value. + * Use ui.oldTop to get old top value. + * Use ui.oldWidth to get old top value. + */ + gridAreaRectChanged?: GridAreaRectChangedEvent; + + /** + * Raised when the map's processing for an update has completed. + * Function takes arguments evt and ui. + * Use ui.map to get reference to map object. + */ + refreshCompleted?: RefreshCompletedEvent; + + /** + * Event fired when the status of an ongoing Triangulation has changed. + * Function takes arguments evt and ui. + * Use ui.map to get reference to map object. + * Use ui.series to get reference to current series object. + * Use ui.currentStatus to get current status. + */ + triangulationStatusChanged?: TriangulationStatusChangedEvent; + + /** + * Option for igMap + */ + [optionName: string]: any; +} +interface IgMapMethods { + option(): void; + + /** + * Destroys the widget. + */ + destroy(): void; + + /** + * Returns the ID of parent element holding the map. + */ + id(): string; + + /** + * Exports the map to a PNG image. + * + * @param width The width of the image. + * @param height The height of the image. + */ + exportImage(width?: Object, height?: Object): Object; + + /** + * Notify the map that styles it draws colors from may have been updated. + */ + styleUpdated(): Object; + + /** + * Resets the zoom level of the map to default. + */ + resetZoom(): Object; + + /** + * Adds a new item to the data source and notifies the map. + * + * @param item The item that we want to add to the data source. + * @param targetName The name of the series bound to the data source. + */ + addItem(item: Object, targetName: string): void; + + /** + * Inserts a new item to the data source and notifies the map. + * + * @param item the new item that we want to insert in the data source. + * @param index The index in the data source where the new item will be inserted. + * @param targetName The name of the series bound to the data source. + */ + insertItem(item: Object, index: number, targetName: string): void; + + /** + * Deletes an item from the data source and notifies the map. + * + * @param index The index in the data source from where the item will be been removed. + * @param targetName The name of the series bound to the data source. + */ + removeItem(index: number, targetName: string): void; + + /** + * Updates an item in the data source and notifies the map. + * + * @param index The index of the item in the data source that we want to change. + * @param item The new item object that will be set in the data source. + * @param targetName The name of the series bound to the data source. + */ + setItem(index: number, item: Object, targetName: string): void; + + /** + * Notifies the the map that an item has been set in an associated data source. + * + * @param dataSource The data source in which the change happened. + * @param index The index in the items source that has been changed. + * @param newItem the new item that has been set in the collection. + * @param oldItem the old item that has been overwritten in the collection. + */ + notifySetItem(dataSource: Object, index: number, newItem: Object, oldItem: Object): Object; + + /** + * Notifies the the map that the items have been cleared from an associated data source. + * It's not necessary to notify more than one target of a change if they share the same items source. + * + * @param dataSource The data source in which the change happened. + */ + notifyClearItems(dataSource: Object): Object; + + /** + * Notifies the the target series that an item has been inserted at the specified index in its data source. + * It's not necessary to notify more than one target of a change if they share the same items source. + * + * @param dataSource The data source in which the change happened. + * @param index The index in the items source where the new item has been inserted. + * @param newItem the new item that has been set in the collection. + */ + notifyInsertItem(dataSource: Object, index: number, newItem: Object): Object; + + /** + * Notifies the the target series that an item has been removed from the specified index in its data source. + * It's not necessary to notify more than one target of a change if they share the same items source. + * + * @param dataSource The data source in which the change happened. + * @param index The index in the items source from where the old item has been removed. + * @param oldItem the old item that has been removed from the collection. + */ + notifyRemoveItem(dataSource: Object, index: number, oldItem: Object): Object; + + /** + * Notifies the target series or axis that it should scroll the requested data item into view. + * + * @param targetName The name of the series or axis notify. + * @param item The data item to bring into view, if possible. + */ + scrollIntoView(targetName: string, item: Object): Object; + + /** + * Either xAxis or yAxis (longitude or latitude) that it should scale the requested value into map space from axis space. + * For example you can use this method if you want to find where longitude 50 stands scaled to map's width. + * + * @param targetName Either xAxis or yAxis to notify. + * @param unscaledValue The value in axis space to translate into map space. + */ + scaleValue(targetName: string, unscaledValue: number): number; + + /** + * Either xAxis or yAxis (longitude or latitude) that it should unscale the requested value into axis space from map space. + * For example you can use this method if you want to find what is the longitude unscaled from 0 width of the map. + * + * @param targetName Either xAxis or yAxis to notify. + * @param scaledValue The value in map space to translate into axis space. + */ + unscaleValue(targetName: string, scaledValue: number): number; + + /** + * Manually starts a tiled zoom if one isn't already running. + */ + startTiledZoomingIfNecessary(): void; + + /** + * Manually ends a tiled zoom if one is running. + */ + endTiledZoomingIfRunning(): void; + + /** + * Clears the tile zoom tile cache so that new tiles will be generated. Only applies if the viewer is using a tile based zoom.. + */ + clearTileZoomCache(): void; + + /** + * Forces any pending deferred work to render on the map before continuing + */ + flush(): void; + + /** + * Exports visual data from the map to aid in unit testing + */ + exportVisualData(): void; + + /** + * Gets the actual minimum value of the target xAxis or yAxis + * + * @param targetName + */ + getActualMinimumValue(targetName: Object): void; + + /** + * Gets the actual maximum value of the target xAxis or yAxis + * + * @param targetName + */ + getActualMaximumValue(targetName: Object): void; + + /** + * Notifies the map that the container was resized + */ + notifyContainerResized(): void; + + /** + * Zoom in to the geographic region specified, when possible (may need to wait fior map to be initialized). + * + * @param rect The geographic area rectangle. + */ + zoomToGeographic(rect: Object): Object; + + /** + * Given the current plot area of the control and a geographic region, get the WindowRect that would encompass that geographic region. + * + * @param rect The geographic area rectangle. + */ + getGeographicFromZoom(rect: Object): Object; + + /** + * Given the current plot area of the control and a geographic region, get the WindowRect that would encompass that geographic region. + * + * @param rect The geographic area rectangle. + */ + getZoomFromGeographic(rect: Object): Object; + + /** + * Creates a print preview page with the map, hiding all other elements on the page. + */ + print(): void; + + /** + * Indicates that a series should render, even though no option has been modified that would normally cause it to refresh. + * + * @param targetName The name of the series to render. + * @param animate Whether the change should be animated, if possible. + */ + renderSeries(targetName: string, animate: boolean): void; +} +interface JQuery { + data(propertyName: "igMap"): IgMapMethods; +} + +interface ShapeDataSourceSettings { + /** + * The unique identifier. + */ + id?: string; + + /** + * The Uri of the .shp portion of the Shapefile. + */ + shapefileSource?: string; + + /** + * The Uri of the .dbf portion of the Shapefile. + */ + databaseSource?: string; + + /** + * Callback function to call when data binding is complete. + */ + callback?: Function; + + /** + * Object on which to invoke the callback function. + */ + callee?: any; + + /** + * Callback function to call to allow shape records to be transformed. + * paramType="object" the shape record to be transformed. + */ + transformRecord?: Function; + + /** + * Callback function to call to allow points in the shape records to be transformed. + * paramType="object" the point to be transformed in place. The object will look like { x: value, y: value2 } + */ + transformPoint?: Function; + + /** + * Callback function to call to allow the bounds of the shape data source to be transformed. + * paramType="object" the bounds of the shape datasource to be transformed in place. The object will look like { top: value, left: value, width: value, height: value } + */ + transformBounds?: Function; + + /** + * Callback function to call when the import process has been completed + * paramType="object" the ShapeDataSource instance + */ + importCompleted?: Function; + + /** + * Option for ShapeDataSourceSettings + */ + [optionName: string]: any; +} + +declare namespace Infragistics { + class ShapeDataSource { + constructor(settings: ShapeDataSourceSettings); + + /** + * Loads to the current data source + */ + dataBind(): void; + + /** + * Returns true if data is loaded + */ + isBound(): boolean; + + /** + * Returns the current converter instance + */ + converter(): Object; + } +} +interface IgniteUIStatic { + ShapeDataSource: typeof Infragistics.ShapeDataSource; +} + +interface TriangulationDataSourceSettings { + /** + * The unique identifier. + */ + id?: string; + + /** + * A Uri specifying the location of the Itf file. + */ + source?: string; + + /** + * The TriangulationSource which is typically created after importing the Itf from the Source Uri. + */ + triangulationSource?: string; + + /** + * Callback function to call when data binding is complete + */ + callback?: Function; + + /** + * Object on which to invoke the callback function + */ + callee?: any; + + /** + * Option for TriangulationDataSourceSettings + */ + [optionName: string]: any; +} + +declare namespace Infragistics { + class TriangulationDataSource { + constructor(settings: TriangulationDataSourceSettings); + + /** + * Loads to the current data source + */ + dataBind(): void; + + /** + * Returns true if data is loaded + */ + isBound(): boolean; + + /** + * Returns the current converter instance + */ + converter(): Object; + } +} +interface IgniteUIStatic { + TriangulationDataSource: typeof Infragistics.TriangulationDataSource; +} + +interface JQuery { + igMap(methodName: "option"): void; + igMap(methodName: "destroy"): void; + igMap(methodName: "id"): string; + igMap(methodName: "exportImage", width?: Object, height?: Object): Object; + igMap(methodName: "styleUpdated"): Object; + igMap(methodName: "resetZoom"): Object; + igMap(methodName: "addItem", item: Object, targetName: string): void; + igMap(methodName: "insertItem", item: Object, index: number, targetName: string): void; + igMap(methodName: "removeItem", index: number, targetName: string): void; + igMap(methodName: "setItem", index: number, item: Object, targetName: string): void; + igMap(methodName: "notifySetItem", dataSource: Object, index: number, newItem: Object, oldItem: Object): Object; + igMap(methodName: "notifyClearItems", dataSource: Object): Object; + igMap(methodName: "notifyInsertItem", dataSource: Object, index: number, newItem: Object): Object; + igMap(methodName: "notifyRemoveItem", dataSource: Object, index: number, oldItem: Object): Object; + igMap(methodName: "scrollIntoView", targetName: string, item: Object): Object; + igMap(methodName: "scaleValue", targetName: string, unscaledValue: number): number; + igMap(methodName: "unscaleValue", targetName: string, scaledValue: number): number; + igMap(methodName: "startTiledZoomingIfNecessary"): void; + igMap(methodName: "endTiledZoomingIfRunning"): void; + igMap(methodName: "clearTileZoomCache"): void; + igMap(methodName: "flush"): void; + igMap(methodName: "exportVisualData"): void; + igMap(methodName: "getActualMinimumValue", targetName: Object): void; + igMap(methodName: "getActualMaximumValue", targetName: Object): void; + igMap(methodName: "notifyContainerResized"): void; + igMap(methodName: "zoomToGeographic", rect: Object): Object; + igMap(methodName: "getGeographicFromZoom", rect: Object): Object; + igMap(methodName: "getZoomFromGeographic", rect: Object): Object; + igMap(methodName: "print"): void; + igMap(methodName: "renderSeries", targetName: string, animate: boolean): void; + + /** + * The width of the map. It can be set as a number in pixels, string (px) or percentage (%). + */ + igMap(optionLiteral: 'option', optionName: "width"): string|number; + + /** + * The width of the map. It can be set as a number in pixels, string (px) or percentage (%). + * + * @optionValue New value to be set. + */ + igMap(optionLiteral: 'option', optionName: "width", optionValue: string|number): void; + + /** + * The height of the map. It can be set as a number in pixels, string (px) or percentage (%). + */ + igMap(optionLiteral: 'option', optionName: "height"): string|number; + + /** + * The height of the map. It can be set as a number in pixels, string (px) or percentage (%). + * + * @optionValue New value to be set. + */ + igMap(optionLiteral: 'option', optionName: "height", optionValue: string|number): void; + + /** + * Can be any valid data source accepted by $.ig.DataSource, or an instance of an $.ig.DataSource itself + */ + igMap(optionLiteral: 'option', optionName: "dataSource"): any; + + /** + * Can be any valid data source accepted by $.ig.DataSource, or an instance of an $.ig.DataSource itself + * + * @optionValue New value to be set. + */ + igMap(optionLiteral: 'option', optionName: "dataSource", optionValue: any): void; + + /** + * Gets a remote URL accepted by $.ig.DataSource in order to request data from it + */ + igMap(optionLiteral: 'option', optionName: "dataSourceUrl"): string; + + /** + * Sets a remote URL accepted by $.ig.DataSource in order to request data from it + * + * @optionValue New value to be set. + */ + igMap(optionLiteral: 'option', optionName: "dataSourceUrl", optionValue: string): void; + + /** + * Explicitly set data source type (such as "json"). Please refer to the documentation of $.ig.DataSource and its type property. + */ + igMap(optionLiteral: 'option', optionName: "dataSourceType"): string; + + /** + * Explicitly set data source type (such as "json"). Please refer to the documentation of $.ig.DataSource and its type property. + * + * @optionValue New value to be set. + */ + igMap(optionLiteral: 'option', optionName: "dataSourceType", optionValue: string): void; + + /** + * See $.ig.DataSource. Gets the name of the property in which data records are held if the response is wrapped. + */ + igMap(optionLiteral: 'option', optionName: "responseDataKey"): string; + + /** + * See $.ig.DataSource. Sets the name of the property in which data records are held if the response is wrapped. + * + * @optionValue New value to be set. + */ + igMap(optionLiteral: 'option', optionName: "responseDataKey", optionValue: string): void; + + /** + * Sets or gets the automatic width to add when automatically adding margins to the map. + */ + igMap(optionLiteral: 'option', optionName: "autoMarginWidth"): number; + + /** + * Sets or gets the automatic width to add when automatically adding margins to the map. + * + * @optionValue New value to be set. + */ + igMap(optionLiteral: 'option', optionName: "autoMarginWidth", optionValue: number): void; + + /** + * Sets or gets the automatic height to add when automatically adding margins to the map. + */ + igMap(optionLiteral: 'option', optionName: "autoMarginHeight"): number; + + /** + * Sets or gets the automatic height to add when automatically adding margins to the map. + * + * @optionValue New value to be set. + */ + igMap(optionLiteral: 'option', optionName: "autoMarginHeight", optionValue: number): void; + + /** + * Gets the current Map's crosshair visibility override. + */ + igMap(optionLiteral: 'option', optionName: "crosshairVisibility"): string; + + /** + * Sets the current Map's crosshair visibility override. + * + * @optionValue New value to be set. + */ + igMap(optionLiteral: 'option', optionName: "crosshairVisibility", optionValue: string): void; + + /** + * Gets the cross hair point (in world coordinates) + * Either or both of the crosshair point's X and Y may be set to double.NaN, in which + * case the relevant crosshair line is hidden. + */ + igMap(optionLiteral: 'option', optionName: "crosshairPoint"): IgMapCrosshairPoint; + + /** + * Sets the cross hair point (in world coordinates) + * Either or both of the crosshair point's X and Y may be set to double.NaN, in which + * case the relevant crosshair line is hidden. + * + * @optionValue New value to be set. + */ + igMap(optionLiteral: 'option', optionName: "crosshairPoint", optionValue: IgMapCrosshairPoint): void; + + /** + * Gets the brush used as the background for the current Map object's plot area. + */ + igMap(optionLiteral: 'option', optionName: "plotAreaBackground"): string; + + /** + * Sets the brush used as the background for the current Map object's plot area. + * + * @optionValue New value to be set. + */ + igMap(optionLiteral: 'option', optionName: "plotAreaBackground", optionValue: string): void; + + /** + * Gets the DefaultInteraction property. The default interaction state defines the map's response to mouse events. + */ + igMap(optionLiteral: 'option', optionName: "defaultInteraction"): string; + + /** + * Sets the DefaultInteraction property. The default interaction state defines the map's response to mouse events. + * + * @optionValue New value to be set. + */ + igMap(optionLiteral: 'option', optionName: "defaultInteraction", optionValue: string): void; + + /** + * Gets the current Map's DragModifier property. + */ + igMap(optionLiteral: 'option', optionName: "dragModifier"): string; + + /** + * Sets the current Map's DragModifier property. + * + * @optionValue New value to be set. + */ + igMap(optionLiteral: 'option', optionName: "dragModifier", optionValue: string): void; + + /** + * Gets the current Map's PanModifier property. + */ + igMap(optionLiteral: 'option', optionName: "panModifier"): string; + + /** + * Sets the current Map's PanModifier property. + * + * @optionValue New value to be set. + */ + igMap(optionLiteral: 'option', optionName: "panModifier", optionValue: string): void; + + /** + * Gets the preview rectangle. + * The preview rectangle may be set to Rect.Empty, in which case the visible preview + * strokePath is hidden. + * The provided object should have numeric properties called left, top, width and height. + */ + igMap(optionLiteral: 'option', optionName: "previewRect"): any; + + /** + * Sets the preview rectangle. + * The preview rectangle may be set to Rect.Empty, in which case the visible preview + * strokePath is hidden. + * The provided object should have numeric properties called left, top, width and height. + * + * @optionValue New value to be set. + */ + igMap(optionLiteral: 'option', optionName: "previewRect", optionValue: any): void; + + /** + * A rectangle representing the portion of the map currently in view. + * A rectangle at X=0, Y=0 with a Height and Width of 1 implies the entire plotting area is in view. A Height and Width of .5 would imply that the view is halfway zoomed in. + * The provided object should have numeric properties called left, top, width and height. + */ + igMap(optionLiteral: 'option', optionName: "windowRect"): any; + + /** + * A rectangle representing the portion of the map currently in view. + * A rectangle at X=0, Y=0 with a Height and Width of 1 implies the entire plotting area is in view. A Height and Width of .5 would imply that the view is halfway zoomed in. + * The provided object should have numeric properties called left, top, width and height. + * + * @optionValue New value to be set. + */ + igMap(optionLiteral: 'option', optionName: "windowRect", optionValue: any): void; + + /** + * Gets the current Map's zoomability. + */ + igMap(optionLiteral: 'option', optionName: "zoomable"): boolean; + + /** + * Sets the current Map's zoomability. + * + * @optionValue New value to be set. + */ + igMap(optionLiteral: 'option', optionName: "zoomable", optionValue: boolean): void; + + /** + * Gets the current Map's zoom scale. + */ + igMap(optionLiteral: 'option', optionName: "windowScale"): number; + + /** + * Sets the current Map's zoom scale. + * + * @optionValue New value to be set. + */ + igMap(optionLiteral: 'option', optionName: "windowScale", optionValue: number): void; + + /** + * The response to user panning and zooming: whether to update the view immediately while the user action is happening, or to defer the update to after the user action is complete. The user action will be an action such as a mouse drag which causes panning and/or zooming to occur. + * + */ + igMap(optionLiteral: 'option', optionName: "windowResponse"): string; + + /** + * The response to user panning and zooming: whether to update the view immediately while the user action is happening, or to defer the update to after the user action is complete. The user action will be an action such as a mouse drag which causes panning and/or zooming to occur. + * + * + * @optionValue New value to be set. + */ + igMap(optionLiteral: 'option', optionName: "windowResponse", optionValue: string): void; + + /** + * Sets or gets the minimum width that the window rect is allowed to reach before being clamped. + * Decrease this value if you want to allow for further zooming into the viewer. + * If this value is lowered too much it can cause graphical corruption due to floating point arithmetic inaccuracy. + */ + igMap(optionLiteral: 'option', optionName: "windowRectMinWidth"): number; + + /** + * Sets or gets the minimum width that the window rect is allowed to reach before being clamped. + * Decrease this value if you want to allow for further zooming into the viewer. + * If this value is lowered too much it can cause graphical corruption due to floating point arithmetic inaccuracy. + * + * @optionValue New value to be set. + */ + igMap(optionLiteral: 'option', optionName: "windowRectMinWidth", optionValue: number): void; + + /** + * A number between 0 and 1 determining the position of the horizontal scroll. + * This property is effectively a shortcut to the X position of the WindowRect property. + */ + igMap(optionLiteral: 'option', optionName: "windowPositionHorizontal"): number; + + /** + * A number between 0 and 1 determining the position of the horizontal scroll. + * This property is effectively a shortcut to the X position of the WindowRect property. + * + * @optionValue New value to be set. + */ + igMap(optionLiteral: 'option', optionName: "windowPositionHorizontal", optionValue: number): void; + + /** + * A number between 0 and 1 determining the position of the vertical scroll. + * This property is effectively a shortcut to the Y position of the WindowRect property. + */ + igMap(optionLiteral: 'option', optionName: "windowPositionVertical"): number; + + /** + * A number between 0 and 1 determining the position of the vertical scroll. + * This property is effectively a shortcut to the Y position of the WindowRect property. + * + * @optionValue New value to be set. + */ + igMap(optionLiteral: 'option', optionName: "windowPositionVertical", optionValue: number): void; + + /** + * Gets the template to use for circle markers on the map. + * Defines the marker template used for + * series with a marker type of circle. + * The provided object should have properties called render and optionally measure. See definition for option: legendItemBadgeTemplate + */ + igMap(optionLiteral: 'option', optionName: "circleMarkerTemplate"): any; + + /** + * Sets the template to use for circle markers on the map. + * Defines the marker template used for + * series with a marker type of circle. + * The provided object should have properties called render and optionally measure. See definition for option: legendItemBadgeTemplate + * + * @optionValue New value to be set. + */ + igMap(optionLiteral: 'option', optionName: "circleMarkerTemplate", optionValue: any): void; + + /** + * Gets the template to use for triangle markers on the map. + * Defines the marker template used for + * series with a marker type of triangle. + * The provided object should have properties called render and optionally measure. See definition for option: legendItemBadgeTemplate + */ + igMap(optionLiteral: 'option', optionName: "triangleMarkerTemplate"): any; + + /** + * Sets the template to use for triangle markers on the map. + * Defines the marker template used for + * series with a marker type of triangle. + * The provided object should have properties called render and optionally measure. See definition for option: legendItemBadgeTemplate + * + * @optionValue New value to be set. + */ + igMap(optionLiteral: 'option', optionName: "triangleMarkerTemplate", optionValue: any): void; + + /** + * Gets the template to use for pyramid markers on the map. + * Defines the marker template used for + * series with a marker type of pyramid. + * The provided object should have properties called render and optionally measure. See definition for option: legendItemBadgeTemplate + */ + igMap(optionLiteral: 'option', optionName: "pyramidMarkerTemplate"): any; + + /** + * Sets the template to use for pyramid markers on the map. + * Defines the marker template used for + * series with a marker type of pyramid. + * The provided object should have properties called render and optionally measure. See definition for option: legendItemBadgeTemplate + * + * @optionValue New value to be set. + */ + igMap(optionLiteral: 'option', optionName: "pyramidMarkerTemplate", optionValue: any): void; + + /** + * Gets the template to use for square markers on the map. + * Defines the marker template used for + * series with a marker type of square. + * The provided object should have properties called render and optionally measure. See definition for option: legendItemBadgeTemplate + */ + igMap(optionLiteral: 'option', optionName: "squareMarkerTemplate"): any; + + /** + * Sets the template to use for square markers on the map. + * Defines the marker template used for + * series with a marker type of square. + * The provided object should have properties called render and optionally measure. See definition for option: legendItemBadgeTemplate + * + * @optionValue New value to be set. + */ + igMap(optionLiteral: 'option', optionName: "squareMarkerTemplate", optionValue: any): void; + + /** + * Gets the template to use for diamond markers on the map. + * Defines the marker template used for + * series with a marker type of diamond. + * The provided object should have properties called render and optionally measure. See definition for option: legendItemBadgeTemplate + */ + igMap(optionLiteral: 'option', optionName: "diamondMarkerTemplate"): any; + + /** + * Sets the template to use for diamond markers on the map. + * Defines the marker template used for + * series with a marker type of diamond. + * The provided object should have properties called render and optionally measure. See definition for option: legendItemBadgeTemplate + * + * @optionValue New value to be set. + */ + igMap(optionLiteral: 'option', optionName: "diamondMarkerTemplate", optionValue: any): void; + + /** + * Gets the template to use for pentagon markers on the map. + * Defines the marker template used for + * series with a marker type of pentagon. + * The provided object should have properties called render and optionally measure. See definition for option: legendItemBadgeTemplate + */ + igMap(optionLiteral: 'option', optionName: "pentagonMarkerTemplate"): any; + + /** + * Sets the template to use for pentagon markers on the map. + * Defines the marker template used for + * series with a marker type of pentagon. + * The provided object should have properties called render and optionally measure. See definition for option: legendItemBadgeTemplate + * + * @optionValue New value to be set. + */ + igMap(optionLiteral: 'option', optionName: "pentagonMarkerTemplate", optionValue: any): void; + + /** + * Gets the template to use for hexagon markers on the map. + * Defines the marker template used for + * series with a marker type of hexagon. + * The provided object should have properties called render and optionally measure. See definition for option: legendItemBadgeTemplate + */ + igMap(optionLiteral: 'option', optionName: "hexagonMarkerTemplate"): any; + + /** + * Sets the template to use for hexagon markers on the map. + * Defines the marker template used for + * series with a marker type of hexagon. + * The provided object should have properties called render and optionally measure. See definition for option: legendItemBadgeTemplate + * + * @optionValue New value to be set. + */ + igMap(optionLiteral: 'option', optionName: "hexagonMarkerTemplate", optionValue: any): void; + + /** + * Gets the template to use for tetragram markers on the map. + * Defines the marker template used for + * series with a marker type of tetragram. + * The provided object should have properties called render and optionally measure. See definition for option: legendItemBadgeTemplate + */ + igMap(optionLiteral: 'option', optionName: "tetragramMarkerTemplate"): any; + + /** + * Sets the template to use for tetragram markers on the map. + * Defines the marker template used for + * series with a marker type of tetragram. + * The provided object should have properties called render and optionally measure. See definition for option: legendItemBadgeTemplate + * + * @optionValue New value to be set. + */ + igMap(optionLiteral: 'option', optionName: "tetragramMarkerTemplate", optionValue: any): void; + + /** + * Gets the template to use for pentragram markers on the map. + * Defines the marker template used for + * series with a marker type of pentagram. + * The provided object should have properties called render and optionally measure. See definition for option: legendItemBadgeTemplate + */ + igMap(optionLiteral: 'option', optionName: "pentagramMarkerTemplate"): any; + + /** + * Sets the template to use for pentragram markers on the map. + * Defines the marker template used for + * series with a marker type of pentagram. + * The provided object should have properties called render and optionally measure. See definition for option: legendItemBadgeTemplate + * + * @optionValue New value to be set. + */ + igMap(optionLiteral: 'option', optionName: "pentagramMarkerTemplate", optionValue: any): void; + + /** + * Gets the template to use for hexagram markers on the map. + * Defines the marker template used for + * series with a marker type of hexagram. + * The provided object should have properties called render and optionally measure. See definition for option: legendItemBadgeTemplate + */ + igMap(optionLiteral: 'option', optionName: "hexagramMarkerTemplate"): any; + + /** + * Sets the template to use for hexagram markers on the map. + * Defines the marker template used for + * series with a marker type of hexagram. + * The provided object should have properties called render and optionally measure. See definition for option: legendItemBadgeTemplate + * + * @optionValue New value to be set. + */ + igMap(optionLiteral: 'option', optionName: "hexagramMarkerTemplate", optionValue: any): void; + + /** + * The background image uri use in the overview detail pane. + */ + igMap(optionLiteral: 'option', optionName: "overviewPlusDetailPaneBackgroundImageUri"): string; + + /** + * The background image uri use in the overview detail pane. + * + * @optionValue New value to be set. + */ + igMap(optionLiteral: 'option', optionName: "overviewPlusDetailPaneBackgroundImageUri", optionValue: string): void; + + /** + * Whether the series viewer should use cached tiles during zooms rather than the default live content. + */ + igMap(optionLiteral: 'option', optionName: "useTiledZooming"): boolean; + + /** + * Sets whether the series viewer should use cached tiles during zooms rather than the default live content. + * + * @optionValue New value to be set. + */ + igMap(optionLiteral: 'option', optionName: "useTiledZooming", optionValue: boolean): void; + + /** + * Whether the series viewer should prefer selecting higher resolution tiles over lower resolution tiles when performing tile zooming. Setting this to true will lower performance but increase quality. + */ + igMap(optionLiteral: 'option', optionName: "preferHigherResolutionTiles"): boolean; + + /** + * Sets whether the series viewer should prefer selecting higher resolution tiles over lower resolution tiles when performing tile zooming. Setting this to true will lower performance but increase quality. + * + * @optionValue New value to be set. + */ + igMap(optionLiteral: 'option', optionName: "preferHigherResolutionTiles", optionValue: boolean): void; + + /** + * The maximum number of zoom tiles that the series viewer should cache while in tiled zooming mode. + */ + igMap(optionLiteral: 'option', optionName: "zoomTileCacheSize"): number; + + /** + * Sets the maximum number of zoom tiles that the series viewer should cache while in tiled zooming mode. + * + * @optionValue New value to be set. + */ + igMap(optionLiteral: 'option', optionName: "zoomTileCacheSize", optionValue: number): void; + + /** + * Background content object + */ + igMap(optionLiteral: 'option', optionName: "backgroundContent"): IgMapBackgroundContent; + + /** + * Background content object + * + * @optionValue New value to be set. + */ + igMap(optionLiteral: 'option', optionName: "backgroundContent", optionValue: IgMapBackgroundContent): void; + + /** + * An array of series objects + */ + igMap(optionLiteral: 'option', optionName: "series"): IgMapSeries[]; + + /** + * An array of series objects + * + * @optionValue New value to be set. + */ + igMap(optionLiteral: 'option', optionName: "series", optionValue: IgMapSeries[]): void; + + /** + * The swatch used to style this widget + */ + igMap(optionLiteral: 'option', optionName: "theme"): string; + + /** + * The swatch used to style this widget + * + * @optionValue New value to be set. + */ + igMap(optionLiteral: 'option', optionName: "theme", optionValue: string): void; + + /** + * Event fired when the mouse has hovered on a series and the tooltip is about to show + * Function takes arguments evt and ui. + * Use ui.element to get reference to tooltip DOM element. + * Use ui.item to get reference to current series item object. + * Use ui.map to get reference to map object. + * Use ui.series to get reference to current series object. + * Use ui.actualItemBrush to get item brush. + * Use ui.actualSeriesBrush to get series brush. + */ + igMap(optionLiteral: 'option', optionName: "tooltipShowing"): TooltipShowingEvent; + + /** + * Event fired when the mouse has hovered on a series and the tooltip is about to show + * Function takes arguments evt and ui. + * Use ui.element to get reference to tooltip DOM element. + * Use ui.item to get reference to current series item object. + * Use ui.map to get reference to map object. + * Use ui.series to get reference to current series object. + * Use ui.actualItemBrush to get item brush. + * Use ui.actualSeriesBrush to get series brush. + * + * @optionValue Define event handler function. + */ + igMap(optionLiteral: 'option', optionName: "tooltipShowing", optionValue: TooltipShowingEvent): void; + + /** + * Event fired after a tooltip is shown + * Function takes arguments evt and ui. + * Use ui.element to get reference to tooltip DOM element. + * Use ui.item to get reference to current series item object. + * Use ui.map to get reference to map object. + * Use ui.series to get reference to current series object. + * Use ui.actualItemBrush to get item brush. + * Use ui.actualSeriesBrush to get series brush. + */ + igMap(optionLiteral: 'option', optionName: "tooltipShown"): TooltipShownEvent; + + /** + * Event fired after a tooltip is shown + * Function takes arguments evt and ui. + * Use ui.element to get reference to tooltip DOM element. + * Use ui.item to get reference to current series item object. + * Use ui.map to get reference to map object. + * Use ui.series to get reference to current series object. + * Use ui.actualItemBrush to get item brush. + * Use ui.actualSeriesBrush to get series brush. + * + * @optionValue Define event handler function. + */ + igMap(optionLiteral: 'option', optionName: "tooltipShown", optionValue: TooltipShownEvent): void; + + /** + * Event fired when the mouse has left a series and the tooltip is about to hide + * Function takes arguments evt and ui. + * Use ui.element to get reference to tooltip DOM element. + * Use ui.item to get reference to current series item object. + * Use ui.map to get reference to map object. + * Use ui.series to get reference to current series object. + * Use ui.actualItemBrush to get item brush. + * Use ui.actualSeriesBrush to get series brush. + */ + igMap(optionLiteral: 'option', optionName: "tooltipHiding"): TooltipHidingEvent; + + /** + * Event fired when the mouse has left a series and the tooltip is about to hide + * Function takes arguments evt and ui. + * Use ui.element to get reference to tooltip DOM element. + * Use ui.item to get reference to current series item object. + * Use ui.map to get reference to map object. + * Use ui.series to get reference to current series object. + * Use ui.actualItemBrush to get item brush. + * Use ui.actualSeriesBrush to get series brush. + * + * @optionValue Define event handler function. + */ + igMap(optionLiteral: 'option', optionName: "tooltipHiding", optionValue: TooltipHidingEvent): void; + + /** + * Event fired after a tooltip is hidden + * Function takes arguments evt and ui. + * Use ui.element to get reference to tooltip DOM element. + * Use ui.item to get reference to current series item object. + * Use ui.map to get reference to map object. + * Use ui.series to get reference to current series object. + * Use ui.actualItemBrush to get item brush. + * Use ui.actualSeriesBrush to get series brush. + */ + igMap(optionLiteral: 'option', optionName: "tooltipHidden"): TooltipHiddenEvent; + + /** + * Event fired after a tooltip is hidden + * Function takes arguments evt and ui. + * Use ui.element to get reference to tooltip DOM element. + * Use ui.item to get reference to current series item object. + * Use ui.map to get reference to map object. + * Use ui.series to get reference to current series object. + * Use ui.actualItemBrush to get item brush. + * Use ui.actualSeriesBrush to get series brush. + * + * @optionValue Define event handler function. + */ + igMap(optionLiteral: 'option', optionName: "tooltipHidden", optionValue: TooltipHiddenEvent): void; + + /** + * Event fired when the control is displayed on a non HTML5 compliant browser + */ + igMap(optionLiteral: 'option', optionName: "browserNotSupported"): BrowserNotSupportedEvent; + + /** + * Event fired when the control is displayed on a non HTML5 compliant browser + * + * @optionValue Define event handler function. + */ + igMap(optionLiteral: 'option', optionName: "browserNotSupported", optionValue: BrowserNotSupportedEvent): void; + + /** + * Occurs when the cursors are moved over a series in this map. + * Function takes arguments evt and ui. + * Use ui.item to get reference to current series item object. + * Use ui.map to get reference to map object. + * Use ui.series to get reference to current series object. + * Use ui.actualItemBrush to get item brush. + * Use ui.actualSeriesBrush to get series brush. + * Use ui.positionX to get mouse X position. + * Use ui.positionY to get mouse Y position. + */ + igMap(optionLiteral: 'option', optionName: "seriesCursorMouseMove"): SeriesCursorMouseMoveEvent; + + /** + * Occurs when the cursors are moved over a series in this map. + * Function takes arguments evt and ui. + * Use ui.item to get reference to current series item object. + * Use ui.map to get reference to map object. + * Use ui.series to get reference to current series object. + * Use ui.actualItemBrush to get item brush. + * Use ui.actualSeriesBrush to get series brush. + * Use ui.positionX to get mouse X position. + * Use ui.positionY to get mouse Y position. + * + * @optionValue New value to be set. + */ + igMap(optionLiteral: 'option', optionName: "seriesCursorMouseMove", optionValue: SeriesCursorMouseMoveEvent): void; + + /** + * Occurs when the left mouse button is pressed while the mouse pointer is over an element of this map. + * Function takes arguments evt and ui. + * Use ui.item to get reference to current series item object. + * Use ui.map to get reference to map object. + * Use ui.series to get reference to current series object. + * Use ui.actualItemBrush to get item brush. + * Use ui.actualSeriesBrush to get series brush. + * Use ui.positionX to get mouse X position. + * Use ui.positionY to get mouse Y position. + */ + igMap(optionLiteral: 'option', optionName: "seriesMouseLeftButtonDown"): SeriesMouseLeftButtonDownEvent; + + /** + * Occurs when the left mouse button is pressed while the mouse pointer is over an element of this map. + * Function takes arguments evt and ui. + * Use ui.item to get reference to current series item object. + * Use ui.map to get reference to map object. + * Use ui.series to get reference to current series object. + * Use ui.actualItemBrush to get item brush. + * Use ui.actualSeriesBrush to get series brush. + * Use ui.positionX to get mouse X position. + * Use ui.positionY to get mouse Y position. + * + * @optionValue New value to be set. + */ + igMap(optionLiteral: 'option', optionName: "seriesMouseLeftButtonDown", optionValue: SeriesMouseLeftButtonDownEvent): void; + + /** + * Occurs when the left mouse button is released while the mouse pointer is over an element of this map. + * Function takes arguments evt and ui. + * Use ui.item to get reference to current series item object. + * Use ui.map to get reference to map object. + * Use ui.series to get reference to current series object. + * Use ui.actualItemBrush to get item brush. + * Use ui.actualSeriesBrush to get series brush. + * Use ui.positionX to get mouse X position. + * Use ui.positionY to get mouse Y position. + */ + igMap(optionLiteral: 'option', optionName: "seriesMouseLeftButtonUp"): SeriesMouseLeftButtonUpEvent; + + /** + * Occurs when the left mouse button is released while the mouse pointer is over an element of this map. + * Function takes arguments evt and ui. + * Use ui.item to get reference to current series item object. + * Use ui.map to get reference to map object. + * Use ui.series to get reference to current series object. + * Use ui.actualItemBrush to get item brush. + * Use ui.actualSeriesBrush to get series brush. + * Use ui.positionX to get mouse X position. + * Use ui.positionY to get mouse Y position. + * + * @optionValue New value to be set. + */ + igMap(optionLiteral: 'option', optionName: "seriesMouseLeftButtonUp", optionValue: SeriesMouseLeftButtonUpEvent): void; + + /** + * Occurs when the left mouse pointer moves while over an element of this map. + * Function takes arguments evt and ui. + * Use ui.item to get reference to current series item object. + * Use ui.map to get reference to map object. + * Use ui.series to get reference to current series object. + * Use ui.actualItemBrush to get item brush. + * Use ui.actualSeriesBrush to get series brush. + * Use ui.positionX to get mouse X position. + * Use ui.positionY to get mouse Y position. + */ + igMap(optionLiteral: 'option', optionName: "seriesMouseMove"): SeriesMouseMoveEvent; + + /** + * Occurs when the left mouse pointer moves while over an element of this map. + * Function takes arguments evt and ui. + * Use ui.item to get reference to current series item object. + * Use ui.map to get reference to map object. + * Use ui.series to get reference to current series object. + * Use ui.actualItemBrush to get item brush. + * Use ui.actualSeriesBrush to get series brush. + * Use ui.positionX to get mouse X position. + * Use ui.positionY to get mouse Y position. + * + * @optionValue New value to be set. + */ + igMap(optionLiteral: 'option', optionName: "seriesMouseMove", optionValue: SeriesMouseMoveEvent): void; + + /** + * Occurs when the left mouse pointer enters an element of this map. + * Function takes arguments evt and ui. + * Use ui.item to get reference to current series item object. + * Use ui.map to get reference to map object. + * Use ui.series to get reference to current series object. + * Use ui.actualItemBrush to get item brush. + * Use ui.actualSeriesBrush to get series brush. + * Use ui.positionX to get mouse X position. + * Use ui.positionY to get mouse Y position. + */ + igMap(optionLiteral: 'option', optionName: "seriesMouseEnter"): SeriesMouseEnterEvent; + + /** + * Occurs when the left mouse pointer enters an element of this map. + * Function takes arguments evt and ui. + * Use ui.item to get reference to current series item object. + * Use ui.map to get reference to map object. + * Use ui.series to get reference to current series object. + * Use ui.actualItemBrush to get item brush. + * Use ui.actualSeriesBrush to get series brush. + * Use ui.positionX to get mouse X position. + * Use ui.positionY to get mouse Y position. + * + * @optionValue New value to be set. + */ + igMap(optionLiteral: 'option', optionName: "seriesMouseEnter", optionValue: SeriesMouseEnterEvent): void; + + /** + * Occurs when the left mouse pointer leaves an element of this map. + * Function takes arguments evt and ui. + * Use ui.item to get reference to current series item object. + * Use ui.map to get reference to map object. + * Use ui.series to get reference to current series object. + * Use ui.actualItemBrush to get item brush. + * Use ui.actualSeriesBrush to get series brush. + * Use ui.positionX to get mouse X position. + * Use ui.positionY to get mouse Y position. + */ + igMap(optionLiteral: 'option', optionName: "seriesMouseLeave"): SeriesMouseLeaveEvent; + + /** + * Occurs when the left mouse pointer leaves an element of this map. + * Function takes arguments evt and ui. + * Use ui.item to get reference to current series item object. + * Use ui.map to get reference to map object. + * Use ui.series to get reference to current series object. + * Use ui.actualItemBrush to get item brush. + * Use ui.actualSeriesBrush to get series brush. + * Use ui.positionX to get mouse X position. + * Use ui.positionY to get mouse Y position. + * + * @optionValue New value to be set. + */ + igMap(optionLiteral: 'option', optionName: "seriesMouseLeave", optionValue: SeriesMouseLeaveEvent): void; + + /** + * Occurs just after the current Map's window rectangle is changed. + * Function takes arguments evt and ui. + * Use ui.map to get reference to map object. + * Use ui.newHeight to get new height value. + * Use ui.newLeft to get new left value. + * Use ui.newTop to get new top value. + * Use ui.newWidth to get new top value. + * Use ui.oldHeight to get old height value. + * Use ui.oldLeft to get old left value. + * Use ui.oldTop to get old top value. + * Use ui.oldWidth to get old top value. + */ + igMap(optionLiteral: 'option', optionName: "windowRectChanged"): WindowRectChangedEvent; + + /** + * Occurs just after the current Map's window rectangle is changed. + * Function takes arguments evt and ui. + * Use ui.map to get reference to map object. + * Use ui.newHeight to get new height value. + * Use ui.newLeft to get new left value. + * Use ui.newTop to get new top value. + * Use ui.newWidth to get new top value. + * Use ui.oldHeight to get old height value. + * Use ui.oldLeft to get old left value. + * Use ui.oldTop to get old top value. + * Use ui.oldWidth to get old top value. + * + * @optionValue New value to be set. + */ + igMap(optionLiteral: 'option', optionName: "windowRectChanged", optionValue: WindowRectChangedEvent): void; + + /** + * Occurs just after the current Map's grid area rectangle is changed. + * The grid area may change as the result of the Map being resized. + * Function takes arguments evt and ui. + * Use ui.map to get reference to map object. + * Use ui.newHeight to get new height value. + * Use ui.newLeft to get new left value. + * Use ui.newTop to get new top value. + * Use ui.newWidth to get new top value. + * Use ui.oldHeight to get old height value. + * Use ui.oldLeft to get old left value. + * Use ui.oldTop to get old top value. + * Use ui.oldWidth to get old top value. + */ + igMap(optionLiteral: 'option', optionName: "gridAreaRectChanged"): GridAreaRectChangedEvent; + + /** + * Occurs just after the current Map's grid area rectangle is changed. + * The grid area may change as the result of the Map being resized. + * Function takes arguments evt and ui. + * Use ui.map to get reference to map object. + * Use ui.newHeight to get new height value. + * Use ui.newLeft to get new left value. + * Use ui.newTop to get new top value. + * Use ui.newWidth to get new top value. + * Use ui.oldHeight to get old height value. + * Use ui.oldLeft to get old left value. + * Use ui.oldTop to get old top value. + * Use ui.oldWidth to get old top value. + * + * @optionValue New value to be set. + */ + igMap(optionLiteral: 'option', optionName: "gridAreaRectChanged", optionValue: GridAreaRectChangedEvent): void; + + /** + * Raised when the map's processing for an update has completed. + * Function takes arguments evt and ui. + * Use ui.map to get reference to map object. + */ + igMap(optionLiteral: 'option', optionName: "refreshCompleted"): RefreshCompletedEvent; + + /** + * Raised when the map's processing for an update has completed. + * Function takes arguments evt and ui. + * Use ui.map to get reference to map object. + * + * @optionValue New value to be set. + */ + igMap(optionLiteral: 'option', optionName: "refreshCompleted", optionValue: RefreshCompletedEvent): void; + + /** + * Event fired when the status of an ongoing Triangulation has changed. + * Function takes arguments evt and ui. + * Use ui.map to get reference to map object. + * Use ui.series to get reference to current series object. + * Use ui.currentStatus to get current status. + */ + igMap(optionLiteral: 'option', optionName: "triangulationStatusChanged"): TriangulationStatusChangedEvent; + + /** + * Event fired when the status of an ongoing Triangulation has changed. + * Function takes arguments evt and ui. + * Use ui.map to get reference to map object. + * Use ui.series to get reference to current series object. + * Use ui.currentStatus to get current status. + * + * @optionValue Define event handler function. + */ + igMap(optionLiteral: 'option', optionName: "triangulationStatusChanged", optionValue: TriangulationStatusChangedEvent): void; + igMap(options: IgMap): JQuery; + igMap(optionLiteral: 'option', optionName: string): any; + igMap(optionLiteral: 'option', options: IgMap): JQuery; + igMap(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igMap(methodName: string, ...methodParams: any[]): any; +} +interface IgNotifierMessages { + success?: string; + info?: string; + warning?: string; + error?: string; + + /** + * Option for IgNotifierMessages + */ + [optionName: string]: any; +} + +interface IgNotifierHeaderTemplate { + /** + * Controls whether the popover renders a functional close button + * + */ + closeButton?: boolean; + + /** + * Sets the content for the popover header. + * + */ + title?: string; + + /** + * Option for IgNotifierHeaderTemplate + */ + [optionName: string]: any; +} + +interface IgNotifier { + /** + * Gets/Sets the current state of the igNotifier messages. State controls what CSS classes are applied to the messages and target and has interactions with other options as well. + * + * + * Valid values: + * "success" Messages and target CSS have success styles applied. + * "info" Messages have info applied. Target is unaffected. + * "warning" Messages and target CSS have warning styles applied. + * "error" Messages and target CSS have error styles applied. + */ + state?: string; + + /** + * Controls the level of notifications shown by automatic and manual messages using the [notify](ui.ignotifier#methods:notify) method. Use [show](ui.ignotifier#methods:show) to ignore the level. + * + * + * Valid values: + * "success" Show all types of messages + * "info" Show everything from info level messages up + * "warning" Show everything from warning level messages up + * "error" Show only error messages + */ + notifyLevel?: string; + + /** + * Controls where the popover DOM should be attached to (only applies to popovers). + * + * + * Valid values: + * "string" A valid jQuery selector for the element + * "object" A reference to the parent jQuery object + */ + appendTo?: string|Object; + + /** + * Controls the positioning mode of messages. Setting a mode will override the default behavior which is auto.Note: Inline element uses a block container as is always placed after the target. + * + * + * + * Valid values: + * "auto" Uses popover for info and warning messages and inline for errors and success. + * "popover" Displays messages in a configurable popover. + * "inline" Displays messages in a simplified notification text under the target. + */ + mode?: string; + + /** + * Allows setting the respective state CSS on the target element (used to apply border color by default) + * + */ + allowCSSOnTarget?: boolean; + + /** + * A set of default messages for each state + * + */ + messages?: IgNotifierMessages; + + /** + * Allows rendering a span with the respective state CSS to display jQuery UI framework icons + * + */ + showIcon?: boolean; + + /** + * Gets/Sets the content for the popover container. Templated with parameters by default: {0} - icon container class, {1} - the icon class and {2} - message text. + * + * + * Valid values: + * "string" String content of the popover container + * "function" Function which is a callback that should return the content. Use the 'this' value to access the target DOM element and passed argument for state value. Result can also include the same template parametes. + */ + contentTemplate?: string|Function; + + /** + * Sets the content for the popover header + * + */ + headerTemplate?: IgNotifierHeaderTemplate; + + /** + * Sets the event on which the notification will be shown. Predefined values are "mouseenter", "click" and "focus" + * + * + * Valid values: + * "mouseenter" The popover is shown on mouse enter in the target element + * "click" The popover is shown on click on the target element + * "focus" The popover is shown on focusing the target element + * "manual" The popover is shown manually + */ + showOn?: string; + + /** + * Controls whether the popover will close on blur or not. This option has effect only when the corresponding [showOn](ui.ignotifier#options:showOn) is set (manual by default) + * + */ + closeOnBlur?: boolean; + + /** + * Gets/Sets the time in milliseconds the notification fades in and out when showing/hiding + * + */ + animationDuration?: number; + + /** + * Gets/Sets the distance in pixels a notification popover slides outwards as it's shown. + * + */ + animationSlideDistance?: number; + + /** + * Selectors indicating which items should show popovers. + */ + selectors?: string; + + /** + * controls the direction in which the control shows relative to the target element + * + * Valid values: + * "auto" lets the control show on the side where enough space is available with the following priority top > bottom > right > left + * "left" shows popover on the left side of the target element + * "right" shows popover on the right side of the target element + * "top" shows popover on the top of the target element + * "bottom" shows popover on the bottom of the target element + */ + direction?: string; + + /** + * controls the position of the popover according to the target element in case the popover is larger than the target on the side we want to position, if the popover is smaller it should always be in the middle of the visible area + * + * Valid values: + * "auto" lets the control choose a position depending on available space with the following priority balanced > end > start + * "balanced" the popover is positioned at the middle of the target element + * "start" the popover is positioned at the beginning of the target element + * "end" the popover is positioned at the end of the target element + */ + position?: string; + + /** + * defines width for the popover. leave null for auto. + */ + width?: number|string; + + /** + * defines height for the popover. leave null for auto + */ + height?: number|string; + + /** + * defines width the popover won't go under the value even if no specific one is set. + */ + minWidth?: number|string; + + /** + * defines width the popover won't exceed even if no specific one is set. + */ + maxWidth?: number|string; + + /** + * defines height the popover won't exceed even if no specific one is set. + */ + maxHeight?: number|string; + + /** + * Sets the containment for the popover. Accepts a jQuery object + */ + containment?: any; + + /** + * Event fired before popover is shown. + * Function takes arguments evt and ui. + * Use ui.element to get the element the popover will show for. + * Use ui.content to get or set the content to be shown as a string. + * Use ui.popover to get the popover element showing. + * Use ui.owner to get reference to the igPopover widget + */ + showing?: ShowingEvent; + + /** + * Event fired after popover is shown. + * Function takes arguments evt and ui. + * Use ui.element to get the element the popover showed for. + * Use ui.content to get the content that was shown as a string. + * Use ui.popover to get the popover element shown. + * Use ui.owner to get reference to the igPopover widget + */ + shown?: ShownEvent; + + /** + * Event fired before popover is hidden. + * Function takes arguments evt and ui. + * Use ui.element to get the element the popover will hide for. + * Use ui.content to get the current content displayed in the popover as a string. + * Use ui.popover to get the popover element hiding. + * Use ui.owner to get reference to the igPopover widget + */ + hiding?: HidingEvent; + + /** + * Event fired after popover is hidden. + * Function takes arguments evt and ui. + * Use ui.element to get the element the popover is hidden for. + * Use ui.content to get the content displayed in the popover as a string. + * Use ui.popover to get the popover element hidden. + * Use ui.owner to get reference to the igPopover widget + */ + hidden?: HiddenEvent; + + /** + * Option for igNotifier + */ + [optionName: string]: any; +} +interface IgNotifierMethods { + /** + * Triggers a notification with a certain state and optional message. The [notifyLevel](ui.ignotifier#options:notifyLevel) option determines if the notification will be displayed. + * + * @param state The state to show notification for. + * @param message Optional message to show, overrides defaults. + */ + notify(state: Object, message?: string): void; + + /** + * Returns true if the notification is currently visible + */ + isVisible(): void; + + /** + * Destroys the widget. + */ + destroy(): void; + + /** + * Returns the ID of the element the popover is attached to + */ + id(): string; + + /** + * Returns the container for the popover contents + */ + container(): Object; + + /** + * Shows the popover for the specified target + * + * @param trg The element to show popover for. + * @param content The string to set for the popover to show. + */ + show(trg?: Element, content?: string): void; + + /** + * Hides the popover for the specified target + */ + hide(): void; + + /** + * Gets the currently set content for the popover container + */ + getContent(): string; + + /** + * Sets the content for the popover container + * + * @param newCnt The popover content to set. + */ + setContent(newCnt: string): void; + + /** + * Gets the popover current target + */ + target(): Object; + + /** + * Gets the current coordinates of the popover + */ + getCoordinates(): Object; + + /** + * Sets the popover to specific coordinates. + * + * @param pos The popover coordinates in pixels. + */ + setCoordinates(pos: Object): void; +} +interface JQuery { + data(propertyName: "igNotifier"): IgNotifierMethods; +} + +interface JQuery { + igNotifier(methodName: "notify", state: Object, message?: string): void; + igNotifier(methodName: "isVisible"): void; + igNotifier(methodName: "destroy"): void; + igNotifier(methodName: "id"): string; + igNotifier(methodName: "container"): Object; + igNotifier(methodName: "show", trg?: Element, content?: string): void; + igNotifier(methodName: "hide"): void; + igNotifier(methodName: "getContent"): string; + igNotifier(methodName: "setContent", newCnt: string): void; + igNotifier(methodName: "target"): Object; + igNotifier(methodName: "getCoordinates"): Object; + igNotifier(methodName: "setCoordinates", pos: Object): void; + + /** + * Gets/Sets the current state of the igNotifier messages. State controls what CSS classes are applied to the messages and target and has interactions with other options as well. + * + */ + igNotifier(optionLiteral: 'option', optionName: "state"): string; + + /** + * /Sets the current state of the igNotifier messages. State controls what CSS classes are applied to the messages and target and has interactions with other options as well. + * + * + * @optionValue New value to be set. + */ + igNotifier(optionLiteral: 'option', optionName: "state", optionValue: string): void; + + /** + * Controls the level of notifications shown by automatic and manual messages using the [notify](ui.ignotifier#methods:notify) method. Use [show](ui.ignotifier#methods:show) to ignore the level. + * + */ + igNotifier(optionLiteral: 'option', optionName: "notifyLevel"): string; + + /** + * Controls the level of notifications shown by automatic and manual messages using the [notify](ui.ignotifier#methods:notify) method. Use [show](ui.ignotifier#methods:show) to ignore the level. + * + * + * @optionValue New value to be set. + */ + igNotifier(optionLiteral: 'option', optionName: "notifyLevel", optionValue: string): void; + + /** + * Controls where the popover DOM should be attached to (only applies to popovers). + * + */ + igNotifier(optionLiteral: 'option', optionName: "appendTo"): string|Object; + + /** + * Controls where the popover DOM should be attached to (only applies to popovers). + * + * + * @optionValue New value to be set. + */ + igNotifier(optionLiteral: 'option', optionName: "appendTo", optionValue: string|Object): void; + + /** + * Controls the positioning mode of messages. Setting a mode will override the default behavior which is auto.Note: Inline element uses a block container as is always placed after the target. + * + * + */ + igNotifier(optionLiteral: 'option', optionName: "mode"): string; + + /** + * Controls the positioning mode of messages. Setting a mode will override the default behavior which is auto.Note: Inline element uses a block container as is always placed after the target. + * + * + * + * @optionValue New value to be set. + */ + igNotifier(optionLiteral: 'option', optionName: "mode", optionValue: string): void; + + /** + * Allows setting the respective state CSS on the target element (used to apply border color by default) + * + */ + igNotifier(optionLiteral: 'option', optionName: "allowCSSOnTarget"): boolean; + + /** + * Allows setting the respective state CSS on the target element (used to apply border color by default) + * + * + * @optionValue New value to be set. + */ + igNotifier(optionLiteral: 'option', optionName: "allowCSSOnTarget", optionValue: boolean): void; + + /** + * A set of default messages for each state + * + */ + igNotifier(optionLiteral: 'option', optionName: "messages"): IgNotifierMessages; + + /** + * A set of default messages for each state + * + * + * @optionValue New value to be set. + */ + igNotifier(optionLiteral: 'option', optionName: "messages", optionValue: IgNotifierMessages): void; + + /** + * Allows rendering a span with the respective state CSS to display jQuery UI framework icons + * + */ + igNotifier(optionLiteral: 'option', optionName: "showIcon"): boolean; + + /** + * Allows rendering a span with the respective state CSS to display jQuery UI framework icons + * + * + * @optionValue New value to be set. + */ + igNotifier(optionLiteral: 'option', optionName: "showIcon", optionValue: boolean): void; + + /** + * Gets/Sets the content for the popover container. Templated with parameters by default: {0} - icon container class, {1} - the icon class and {2} - message text. + * + */ + igNotifier(optionLiteral: 'option', optionName: "contentTemplate"): string|Function; + + /** + * /Sets the content for the popover container. Templated with parameters by default: {0} - icon container class, {1} - the icon class and {2} - message text. + * + * + * @optionValue New value to be set. + */ + igNotifier(optionLiteral: 'option', optionName: "contentTemplate", optionValue: string|Function): void; + + /** + * The content for the popover header + * + */ + igNotifier(optionLiteral: 'option', optionName: "headerTemplate"): IgNotifierHeaderTemplate; + + /** + * Sets the content for the popover header + * + * + * @optionValue New value to be set. + */ + igNotifier(optionLiteral: 'option', optionName: "headerTemplate", optionValue: IgNotifierHeaderTemplate): void; + + /** + * Sets the event on which the notification will be shown. Predefined values are "mouseenter", "click" and "focus" + * + */ + igNotifier(optionLiteral: 'option', optionName: "showOn"): string; + + /** + * Sets the event on which the notification will be shown. Predefined values are "mouseenter", "click" and "focus" + * + * + * @optionValue New value to be set. + */ + igNotifier(optionLiteral: 'option', optionName: "showOn", optionValue: string): void; + + /** + * Controls whether the popover will close on blur or not. This option has effect only when the corresponding [showOn](ui.ignotifier#options:showOn) is set (manual by default) + * + */ + igNotifier(optionLiteral: 'option', optionName: "closeOnBlur"): boolean; + + /** + * Controls whether the popover will close on blur or not. This option has effect only when the corresponding [showOn](ui.ignotifier#options:showOn) is set (manual by default) + * + * + * @optionValue New value to be set. + */ + igNotifier(optionLiteral: 'option', optionName: "closeOnBlur", optionValue: boolean): void; + + /** + * Gets/Sets the time in milliseconds the notification fades in and out when showing/hiding + * + */ + igNotifier(optionLiteral: 'option', optionName: "animationDuration"): number; + + /** + * /Sets the time in milliseconds the notification fades in and out when showing/hiding + * + * + * @optionValue New value to be set. + */ + igNotifier(optionLiteral: 'option', optionName: "animationDuration", optionValue: number): void; + + /** + * Gets/Sets the distance in pixels a notification popover slides outwards as it's shown. + * + */ + igNotifier(optionLiteral: 'option', optionName: "animationSlideDistance"): number; + + /** + * /Sets the distance in pixels a notification popover slides outwards as it's shown. + * + * + * @optionValue New value to be set. + */ + igNotifier(optionLiteral: 'option', optionName: "animationSlideDistance", optionValue: number): void; + + /** + * Selectors indicating which items should show popovers. + */ + igNotifier(optionLiteral: 'option', optionName: "selectors"): string; + + /** + * Selectors indicating which items should show popovers. + * + * @optionValue New value to be set. + */ + igNotifier(optionLiteral: 'option', optionName: "selectors", optionValue: string): void; + + /** + * Controls the direction in which the control shows relative to the target element + */ + igNotifier(optionLiteral: 'option', optionName: "direction"): string; + + /** + * Controls the direction in which the control shows relative to the target element + * + * @optionValue New value to be set. + */ + igNotifier(optionLiteral: 'option', optionName: "direction", optionValue: string): void; + + /** + * Controls the position of the popover according to the target element in case the popover is larger than the target on the side we want to position, if the popover is smaller it should always be in the middle of the visible area + */ + igNotifier(optionLiteral: 'option', optionName: "position"): string; + + /** + * Controls the position of the popover according to the target element in case the popover is larger than the target on the side we want to position, if the popover is smaller it should always be in the middle of the visible area + * + * @optionValue New value to be set. + */ + igNotifier(optionLiteral: 'option', optionName: "position", optionValue: string): void; + + /** + * Defines width for the popover. leave null for auto. + */ + igNotifier(optionLiteral: 'option', optionName: "width"): number|string; + + /** + * Defines width for the popover. leave null for auto. + * + * @optionValue New value to be set. + */ + igNotifier(optionLiteral: 'option', optionName: "width", optionValue: number|string): void; + + /** + * Defines height for the popover. leave null for auto + */ + igNotifier(optionLiteral: 'option', optionName: "height"): number|string; + + /** + * Defines height for the popover. leave null for auto + * + * @optionValue New value to be set. + */ + igNotifier(optionLiteral: 'option', optionName: "height", optionValue: number|string): void; + + /** + * Defines width the popover won't go under the value even if no specific one is set. + */ + igNotifier(optionLiteral: 'option', optionName: "minWidth"): number|string; + + /** + * Defines width the popover won't go under the value even if no specific one is set. + * + * @optionValue New value to be set. + */ + igNotifier(optionLiteral: 'option', optionName: "minWidth", optionValue: number|string): void; + + /** + * Defines width the popover won't exceed even if no specific one is set. + */ + igNotifier(optionLiteral: 'option', optionName: "maxWidth"): number|string; + + /** + * Defines width the popover won't exceed even if no specific one is set. + * + * @optionValue New value to be set. + */ + igNotifier(optionLiteral: 'option', optionName: "maxWidth", optionValue: number|string): void; + + /** + * Defines height the popover won't exceed even if no specific one is set. + */ + igNotifier(optionLiteral: 'option', optionName: "maxHeight"): number|string; + + /** + * Defines height the popover won't exceed even if no specific one is set. + * + * @optionValue New value to be set. + */ + igNotifier(optionLiteral: 'option', optionName: "maxHeight", optionValue: number|string): void; + + /** + * The containment for the popover. Accepts a jQuery object + */ + igNotifier(optionLiteral: 'option', optionName: "containment"): any; + + /** + * Sets the containment for the popover. Accepts a jQuery object + * + * @optionValue New value to be set. + */ + igNotifier(optionLiteral: 'option', optionName: "containment", optionValue: any): void; + + /** + * Event fired before popover is shown. + * Function takes arguments evt and ui. + * Use ui.element to get the element the popover will show for. + * Use ui.content to get or set the content to be shown as a string. + * Use ui.popover to get the popover element showing. + * Use ui.owner to get reference to the igPopover widget + */ + igNotifier(optionLiteral: 'option', optionName: "showing"): ShowingEvent; + + /** + * Event fired before popover is shown. + * Function takes arguments evt and ui. + * Use ui.element to get the element the popover will show for. + * Use ui.content to get or set the content to be shown as a string. + * Use ui.popover to get the popover element showing. + * Use ui.owner to get reference to the igPopover widget + * + * @optionValue Define event handler function. + */ + igNotifier(optionLiteral: 'option', optionName: "showing", optionValue: ShowingEvent): void; + + /** + * Event fired after popover is shown. + * Function takes arguments evt and ui. + * Use ui.element to get the element the popover showed for. + * Use ui.content to get the content that was shown as a string. + * Use ui.popover to get the popover element shown. + * Use ui.owner to get reference to the igPopover widget + */ + igNotifier(optionLiteral: 'option', optionName: "shown"): ShownEvent; + + /** + * Event fired after popover is shown. + * Function takes arguments evt and ui. + * Use ui.element to get the element the popover showed for. + * Use ui.content to get the content that was shown as a string. + * Use ui.popover to get the popover element shown. + * Use ui.owner to get reference to the igPopover widget + * + * @optionValue Define event handler function. + */ + igNotifier(optionLiteral: 'option', optionName: "shown", optionValue: ShownEvent): void; + + /** + * Event fired before popover is hidden. + * Function takes arguments evt and ui. + * Use ui.element to get the element the popover will hide for. + * Use ui.content to get the current content displayed in the popover as a string. + * Use ui.popover to get the popover element hiding. + * Use ui.owner to get reference to the igPopover widget + */ + igNotifier(optionLiteral: 'option', optionName: "hiding"): HidingEvent; + + /** + * Event fired before popover is hidden. + * Function takes arguments evt and ui. + * Use ui.element to get the element the popover will hide for. + * Use ui.content to get the current content displayed in the popover as a string. + * Use ui.popover to get the popover element hiding. + * Use ui.owner to get reference to the igPopover widget + * + * @optionValue Define event handler function. + */ + igNotifier(optionLiteral: 'option', optionName: "hiding", optionValue: HidingEvent): void; + + /** + * Event fired after popover is hidden. + * Function takes arguments evt and ui. + * Use ui.element to get the element the popover is hidden for. + * Use ui.content to get the content displayed in the popover as a string. + * Use ui.popover to get the popover element hidden. + * Use ui.owner to get reference to the igPopover widget + */ + igNotifier(optionLiteral: 'option', optionName: "hidden"): HiddenEvent; + + /** + * Event fired after popover is hidden. + * Function takes arguments evt and ui. + * Use ui.element to get the element the popover is hidden for. + * Use ui.content to get the content displayed in the popover as a string. + * Use ui.popover to get the popover element hidden. + * Use ui.owner to get reference to the igPopover widget + * + * @optionValue Define event handler function. + */ + igNotifier(optionLiteral: 'option', optionName: "hidden", optionValue: HiddenEvent): void; + igNotifier(options: IgNotifier): JQuery; + igNotifier(optionLiteral: 'option', optionName: string): any; + igNotifier(optionLiteral: 'option', options: IgNotifier): JQuery; + igNotifier(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igNotifier(methodName: string, ...methodParams: any[]): any; +} +interface IgPivotDataSelectorDataSourceOptionsXmlaOptionsRequestOptions { + /** + * The value is applied to XmlHttpRequest.withCredentials if supported by the user agent. + * Setting this property to true will allow IE8/IE9 to make authenticated cross-origin requests to tusted domains through XmlHttpRequest instead of XDomainRequest + * and will prompt the user for credentials. + */ + withCredentials?: boolean; + + /** + * A callback to be invoked right before the request is send to the server. Extends beforeSend callback of jQuery.ajax’s options object. + */ + beforeSend?: Function; + + /** + * Option for IgPivotDataSelectorDataSourceOptionsXmlaOptionsRequestOptions + */ + [optionName: string]: any; +} + +interface IgPivotDataSelectorDataSourceOptionsXmlaOptionsMdxSettings { + /** + * Optional="true" a value indicating whether a NON EMPTY clause is present on ROWS axis. Default value is true + */ + nonEmptyOnRows?: boolean; + + /** + * Optional="true" a value indicating whether a NON EMPTY clause is present on COLUMNS axis. Default value is true + */ + nonEmptyOnColumns?: boolean; + + /** + * Optional="true" a value indicating whether a members' set expressions on ROWS axis should be wrapped with AddCalculatedMembers MDX method. Default value is true + */ + addCalculatedMembersOnRows?: boolean; + + /** + * Optional="true" a value indicating whether a members' set expressions on COLUMNS axis should be wrapped with AddCalculatedMembers MDX method. Default value is true + */ + addCalculatedMembersOnColumns?: boolean; + + /** + * Optional="true" a string array with the names of intrinsic non-context sensitive member properties applied on ROWS axis. By defult CHILDREN_CARDINALITY and PARENT_UNIQUE_NAME properties are always added to DIMENSION PROPERTIES + */ + dimensionPropertiesOnRows?: any[]; + + /** + * Optional="true" a string array with the names of intrinsic non-context sensitive member properties applied on COLUMNS axis. By defult CHILDREN_CARDINALITY and PARENT_UNIQUE_NAME properties are always added to DIMENSION PROPERTIES + */ + dimensionPropertiesOnColumns?: any[]; + + /** + * Option for IgPivotDataSelectorDataSourceOptionsXmlaOptionsMdxSettings + */ + [optionName: string]: any; +} + +interface IgPivotDataSelectorDataSourceOptionsXmlaOptions { + /** + * Optional="false" The URL of the XMLA server. + */ + serverUrl?: string; + + /** + * The catalog name. + */ + catalog?: string; + + /** + * The name of the cube in the data source. + */ + cube?: string; + + /** + * The name of the measure group in the data source. + */ + measureGroup?: string; + + /** + * An object containing information about how the request to the XMLA server should be processed. + */ + requestOptions?: IgPivotDataSelectorDataSourceOptionsXmlaOptionsRequestOptions; + + /** + * Enables/disables caching of the XMLA result object. + */ + enableResultCache?: boolean; + + /** + * Additional properties sent with every discover request. + * The object is treated as a key/value store where each property name is used as the key and the property value as the value. + */ + discoverProperties?: any; + + /** + * Additional properties sent with every execute request. + * The object is treated as a key/value store where each property name is used as the key and the property value as the value. + */ + executeProperties?: any; + + /** + * Optional="true" a javascript object containing information about how the request to the xmla server should be processed + */ + mdxSettings?: IgPivotDataSelectorDataSourceOptionsXmlaOptionsMdxSettings; + + /** + * Option for IgPivotDataSelectorDataSourceOptionsXmlaOptions + */ + [optionName: string]: any; +} + +interface IgPivotDataSelectorDataSourceOptionsFlatDataOptionsMetadataCubeMeasuresDimensionMeasure { + /** + * Optional="false" A unique name for the measure. + */ + name?: string; + + /** + * A caption for the measure. + */ + caption?: string; + + /** + * Optional="false" An aggregator function called when each cell is evaluated. + * Returns a value for the cell. If the returned value is null, no cell will be created in for the data source result. + */ + aggregator?: Function; + + /** + * The path used when displaying the measure in the user interface. Nested folders are indicated by a backslash (\). + */ + displayFolder?: string; + + /** + * Option for IgPivotDataSelectorDataSourceOptionsFlatDataOptionsMetadataCubeMeasuresDimensionMeasure + */ + [optionName: string]: any; +} + +interface IgPivotDataSelectorDataSourceOptionsFlatDataOptionsMetadataCubeMeasuresDimension { + /** + * A unique name for the measures dimension. + * The default value is "Measures". This name is used to create the names of dimensions using the following pattern: + * [].[] + */ + name?: string; + + /** + * A caption for the measures dimension. + * The default value is "Measures". + */ + caption?: string; + + /** + * An array of measure metadata objects. + */ + measures?: IgPivotDataSelectorDataSourceOptionsFlatDataOptionsMetadataCubeMeasuresDimensionMeasure[]; + + /** + * Option for IgPivotDataSelectorDataSourceOptionsFlatDataOptionsMetadataCubeMeasuresDimension + */ + [optionName: string]: any; +} + +interface IgPivotDataSelectorDataSourceOptionsFlatDataOptionsMetadataCubeDimensionHierarchieLevel { + /** + * Optional="false" A name for the level. + * The unique name of the level is formed using the following pattern: + * {}.[] + */ + name?: string; + + /** + * A caption for the level. + */ + caption?: string; + + /** + * A function called for each item of the data source array when level members are created. + * Based on the item parameter the function should return a value that will form the $.ig.Member’s name and caption. + */ + memberProvider?: Function; + + /** + * Option for IgPivotDataSelectorDataSourceOptionsFlatDataOptionsMetadataCubeDimensionHierarchieLevel + */ + [optionName: string]: any; +} + +interface IgPivotDataSelectorDataSourceOptionsFlatDataOptionsMetadataCubeDimensionHierarchie { + /** + * Optional="false" A name for the hierarchy. + * The unique name of the hierarchy is formed using the following pattern: + * [].[] + */ + name?: string; + + /** + * A caption for the hierarchy. + */ + caption?: string; + + /** + * The path to be used when displaying the hierarchy in the user interface. + * Nested folders are indicated by a backslash (\). + * The folder hierarchy will appear under parent dimension node. + */ + displayFolder?: string; + + /** + * An array of level metadata objects. + */ + levels?: IgPivotDataSelectorDataSourceOptionsFlatDataOptionsMetadataCubeDimensionHierarchieLevel[]; + + /** + * Option for IgPivotDataSelectorDataSourceOptionsFlatDataOptionsMetadataCubeDimensionHierarchie + */ + [optionName: string]: any; +} + +interface IgPivotDataSelectorDataSourceOptionsFlatDataOptionsMetadataCubeDimension { + /** + * Optional="false" A unique name for the dimension. + */ + name?: string; + + /** + * A caption for the dimension. + */ + caption?: string; + + /** + * An array of hierarchy metadata objects. + */ + hierarchies?: IgPivotDataSelectorDataSourceOptionsFlatDataOptionsMetadataCubeDimensionHierarchie[]; + + /** + * Option for IgPivotDataSelectorDataSourceOptionsFlatDataOptionsMetadataCubeDimension + */ + [optionName: string]: any; +} + +interface IgPivotDataSelectorDataSourceOptionsFlatDataOptionsMetadataCube { + /** + * Optional="false" A unique name for the cube. + */ + name?: string; + + /** + * A caption for the cube. + */ + caption?: string; + + /** + * An object providing information about the measures' root node. + */ + measuresDimension?: IgPivotDataSelectorDataSourceOptionsFlatDataOptionsMetadataCubeMeasuresDimension; + + /** + * An array of dimension metadata objects. + */ + dimensions?: IgPivotDataSelectorDataSourceOptionsFlatDataOptionsMetadataCubeDimension[]; + + /** + * Option for IgPivotDataSelectorDataSourceOptionsFlatDataOptionsMetadataCube + */ + [optionName: string]: any; +} + +interface IgPivotDataSelectorDataSourceOptionsFlatDataOptionsMetadata { + /** + * Optional="false" Metadata used for the creation of the cube. + */ + cube?: IgPivotDataSelectorDataSourceOptionsFlatDataOptionsMetadataCube; + + /** + * Option for IgPivotDataSelectorDataSourceOptionsFlatDataOptionsMetadata + */ + [optionName: string]: any; +} + +interface IgPivotDataSelectorDataSourceOptionsFlatDataOptions { + /** + * Specifies any valid data source accepted by $.ig.DataSource, or an instance of an $.ig.DataSource itself. + */ + dataSource?: any; + + /** + * Specifies a remote URL accepted by $.ig.DataSource in order to request data from it. + */ + dataSourceUrl?: string; + + /** + * Explicitly set data source type (such as "json"). Please refer to the documentation of $.ig.DataSource and its type property. + */ + dataSourceType?: string; + + /** + * See $.ig.DataSource. + * string Specifies the name of the property in which data records are held if the response is wrapped. + * null Option is ignored. + */ + responseDataKey?: string; + + /** + * String Explicitly set data source type (such as "json"). Please refer to the documentation of $.ig.DataSource and its type property. + * null Option is ignored. + */ + responseDataType?: string; + + /** + * Optional="false" An object containing processing instructions for the $.ig.DataSource data. + */ + metadata?: IgPivotDataSelectorDataSourceOptionsFlatDataOptionsMetadata; + + /** + * Option for IgPivotDataSelectorDataSourceOptionsFlatDataOptions + */ + [optionName: string]: any; +} + +interface IgPivotDataSelectorDataSourceOptions { + /** + * Settings for creating an instance of $.ig.OlapXmlaDataSource. + */ + xmlaOptions?: IgPivotDataSelectorDataSourceOptionsXmlaOptions; + + /** + * Settings for creating an instance of $.ig.OlapFlatDataSource. + */ + flatDataOptions?: IgPivotDataSelectorDataSourceOptionsFlatDataOptions; + + /** + * A list of measure names separated by comma (,). These will be the measures of the data source. + */ + measures?: string; + + /** + * A list of hierarchy names separated by comma (,). These will be hierarchies in the filters of the data source. + */ + filters?: string; + + /** + * A list of hierarchy names separated by comma (,). These will be the hierarchies in the rows of the data source. + */ + rows?: string; + + /** + * A list of hierarchy names separated by comma (,). These will be the hierarchies in the columns of the data source. + */ + columns?: string; + + /** + * Option for IgPivotDataSelectorDataSourceOptions + */ + [optionName: string]: any; +} + +interface IgPivotDataSelectorDragAndDropSettings { + /** + * Which element the draggable helper should be appended to while dragging. + */ + appendTo?: any; + + /** + * Specifies the containment for the drag helper. The area inside of which the helper is contained would be scrollable while dragging. + * + */ + containment?: boolean|string|Array; + + /** + * Specifies z-index that would be set for the drag helper. + */ + zIndex?: number; + + /** + * Option for IgPivotDataSelectorDragAndDropSettings + */ + [optionName: string]: any; +} + +interface DataSelectorRenderedEvent { + (event: Event, ui: DataSelectorRenderedEventUIParam): void; +} + +interface DataSelectorRenderedEventUIParam { + /** + * Used to get a reference to the data selector. + */ + owner?: any; +} + +interface DataSourceInitializedEvent { + (event: Event, ui: DataSourceInitializedEventUIParam): void; +} + +interface DataSourceInitializedEventUIParam { + /** + * Used to get a reference to the data selector. + */ + owner?: any; + + /** + * Used to get a reference to the data source. + */ + dataSource?: any; + + /** + * Used to see if an error has occured during initialization. + */ + error?: any; + + /** + * Used to get a reference to the root of the data source metatadata root item. + */ + metadataTreeRoot?: any; +} + +interface DataSourceUpdatedEvent { + (event: Event, ui: DataSourceUpdatedEventUIParam): void; +} + +interface DataSourceUpdatedEventUIParam { + /** + * Used to get a reference to the data selector. + */ + owner?: any; + + /** + * Used to get a reference to the data source. + */ + dataSource?: any; + + /** + * Used to see if an error has occured during update. + */ + error?: any; + + /** + * Used to get the result of the update operation. + */ + result?: any; +} + +interface DeferUpdateChangedEvent { + (event: Event, ui: DeferUpdateChangedEventUIParam): void; +} + +interface DeferUpdateChangedEventUIParam { + /** + * Used to get a reference to the data selector. + */ + owner?: any; + + /** + * Used to get the defer update value. + */ + deferUpdate?: any; +} + +interface DragStartEvent { + (event: Event, ui: DragStartEventUIParam): void; +} + +interface DragStartEventUIParam { + /** + * Used to get a reference to the data. + */ + metadata?: any; + + /** + * Used to get a reference to the helper. + */ + helper?: any; + + /** + * Used to get a reference to the offset. + */ + offset?: any; + + /** + * Used to get a reference to the original position of the draggable element. + */ + originalPosition?: any; + + /** + * Used to get a reference to the current position of the draggable element. + */ + position?: any; +} + +interface DragEvent { + (event: Event, ui: DragEventUIParam): void; +} + +interface DragEventUIParam { + /** + * Used to get a reference to the data. + */ + metadata?: any; + + /** + * Used to get a reference to the helper. + */ + helper?: any; + + /** + * Used to get a reference to the offset. + */ + offset?: any; + + /** + * Used to get a reference to the original position of the draggable element. + */ + originalPosition?: any; + + /** + * Used to get a reference to the current position of the draggable element. + */ + position?: any; +} + +interface DragStopEvent { + (event: Event, ui: DragStopEventUIParam): void; +} + +interface DragStopEventUIParam { + /** + * Used to get a reference to the helper. + */ + helper?: any; + + /** + * Used to get a reference to the offset. + */ + offset?: any; + + /** + * Used to get a reference to the original position of the draggable element. + */ + originalPosition?: any; + + /** + * Used to get a reference to the current position of the draggable element. + */ + position?: any; +} + +interface MetadataDroppingEvent { + (event: Event, ui: MetadataDroppingEventUIParam): void; +} + +interface MetadataDroppingEventUIParam { + /** + * Used to the drop target. + */ + targetElement?: any; + + /** + * Used to the dragged element. + */ + draggedElement?: any; + + /** + * Used to get a reference to the data. + */ + metadata?: any; + + /** + * Used to get the index at which the metadata will be inserted. + */ + metadataIndex?: any; + + /** + * Used to get a reference to the helper. + */ + helper?: any; + + /** + * Used to get a reference to the offset. + */ + offset?: any; + + /** + * Used to get a reference to the current position of the draggable element. + */ + position?: any; +} + +interface MetadataDroppedEvent { + (event: Event, ui: MetadataDroppedEventUIParam): void; +} + +interface MetadataDroppedEventUIParam { + /** + * Used to the drop target. + */ + targetElement?: any; + + /** + * Used to the dragged element. + */ + draggedElement?: any; + + /** + * Used to get a reference to the data. + */ + metadata?: any; + + /** + * Used to get the index at which the metadata is inserted. + */ + metadataIndex?: any; + + /** + * Used to get a reference to the helper. + */ + helper?: any; + + /** + * Used to get a reference to the offset. + */ + offset?: any; + + /** + * Used to get a reference to the current position of the draggable element. + */ + position?: any; +} + +interface MetadataRemovingEvent { + (event: Event, ui: MetadataRemovingEventUIParam): void; +} + +interface MetadataRemovingEventUIParam { + /** + * Used to the dragged element. + */ + targetElement?: any; + + /** + * Used to get a reference to the data. + */ + metadata?: any; +} + +interface MetadataRemovedEvent { + (event: Event, ui: MetadataRemovedEventUIParam): void; +} + +interface MetadataRemovedEventUIParam { + /** + * Used to get a reference to the data. + */ + metadata?: any; +} + +interface FilterDropDownOpeningEvent { + (event: Event, ui: FilterDropDownOpeningEventUIParam): void; +} + +interface FilterDropDownOpeningEventUIParam { + /** + * Used to the hierarchy. + */ + hierarchy?: any; +} + +interface FilterDropDownOpenedEvent { + (event: Event, ui: FilterDropDownOpenedEventUIParam): void; +} + +interface FilterDropDownOpenedEventUIParam { + /** + * Used to the hierarchy. + */ + hierarchy?: any; + + /** + * Used to the drop down. + */ + dropDownElement?: any; +} + +interface FilterMembersLoadedEvent { + (event: Event, ui: FilterMembersLoadedEventUIParam): void; +} + +interface FilterMembersLoadedEventUIParam { + /** + * Used to get the parent node or the igTree instance in the initial load. + */ + parent?: any; + rootFilterMembers?: any; + filterMembers?: any; +} + +interface FilterDropDownOkEvent { + (event: Event, ui: FilterDropDownOkEventUIParam): void; +} + +interface FilterDropDownOkEventUIParam { + /** + * Used to the hierarchy. + */ + hierarchy?: any; + filterMembers?: any; + + /** + * Used to the drop down. + */ + dropDownElement?: any; +} + +interface FilterDropDownClosingEvent { + (event: Event, ui: FilterDropDownClosingEventUIParam): void; +} + +interface FilterDropDownClosingEventUIParam { + /** + * Used to the hierarchy. + */ + hierarchy?: any; + + /** + * Used to the drop down. + */ + dropDownElement?: any; +} + +interface FilterDropDownClosedEvent { + (event: Event, ui: FilterDropDownClosedEventUIParam): void; +} + +interface FilterDropDownClosedEventUIParam { + /** + * Used to the hierarchy. + */ + hierarchy?: any; +} + +interface IgPivotDataSelector { + width?: string|number; + + /** + * This is the total height of the grid, including all UI elements - scroll container with data rows, header, footer, filter row - (if any), etc. + * + * Valid values: + * "string" The widget height can be set in pixels (px) and percentage (%). + * "number" The widget height can be set as a number. + * "null" will stretch vertically to fit data, if no other heights are defined. + */ + height?: string|number; + + /** + * An instance of $.ig.OlapXmlaDataSource or $.ig.OlapFlatDataSource. + */ + dataSource?: any; + + /** + * An object that will be used to create an instance of $.ig.OlapXmlaDataSource or $.ig.OlapFlatDataSource. + * The provided value must contain an object with settings for one of the data source types - xmlaOptions or flatDataOptions. + */ + dataSourceOptions?: IgPivotDataSelectorDataSourceOptions; + + /** + * Setting deferUpdate to true will not apply changes to the data source until the update method is called or the update layout button is clicked. + */ + deferUpdate?: boolean; + + /** + * Settings for the drag and drop functionality of the igPivotDataSelector. + */ + dragAndDropSettings?: IgPivotDataSelectorDragAndDropSettings; + + /** + * Specifies the parent for the drop downs. + */ + dropDownParent?: any; + + /** + * Disable the drag and drop for the rows drop area and the ability to use filtering and remove items from it. + */ + disableRowsDropArea?: boolean; + + /** + * Disable the drag and drop for the columns drop area and the ability to use filtering and remove items from it. + */ + disableColumnsDropArea?: boolean; + + /** + * Disable the drag and drop for the measures drop area and the ability to use filtering and remove items from it. + */ + disableMeasuresDropArea?: boolean; + + /** + * Disable the drag and drop for the filters drop area and the ability to use filtering and remove items from it. + */ + disableFiltersDropArea?: boolean; + + /** + * A function that will be called to determine if an item can be moved in or dropped on an area of the data selector. + * paramType="string" The location where the item will be moved - igPivotGrid, igPivotDataSelector, filters, rows, columns or measures. + * paramType="string" The type of the item - Hierarchy, Measure or MeasureList. + * paramType="string" The unique name of the item. + * returnType="bool" The function must return true if the item should be accepted. + */ + customMoveValidation?: Function; + + /** + * Fired after the data selector is rendered. Changing the data source instance will re-render the data selector. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the data selector. + */ + dataSelectorRendered?: DataSelectorRenderedEvent; + + /** + * Fired after the data source has initialized. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the data selector. + * Use ui.dataSource to get a reference to the data source. + * Use ui.error to see if an error has occured during initialization. + * Use ui.metadataTreeRoot to get a reference to the root of the data source metatadata root item. + */ + dataSourceInitialized?: DataSourceInitializedEvent; + + /** + * Fired after the data source has updated. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the data selector. + * Use ui.dataSource to get a reference to the data source. + * Use ui.error to see if an error has occured during update. + * Use ui.result to get the result of the update operation. + */ + dataSourceUpdated?: DataSourceUpdatedEvent; + + /** + * Fired when the defer update checkbox changes. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the data selector. + * Use ui.deferUpdate to get the defer update value. + */ + deferUpdateChanged?: DeferUpdateChangedEvent; + + /** + * Fired on drag start. Return false to cancel the drag. + * Use ui.metadatato get a reference to the data. + * Use ui.helper to get a reference to the helper. + * Use ui.offset to get a reference to the offset. + * Use ui.originalPosition to get a reference to the original position of the draggable element. + * Use ui.position to get a reference to the current position of the draggable element. + */ + dragStart?: DragStartEvent; + + /** + * Fired on drag. Return false to cancel the dragging. + * Use ui.metadatato get a reference to the data. + * Use ui.helper to get a reference to the helper. + * Use ui.offset to get a reference to the offset. + * Use ui.originalPosition to get a reference to the original position of the draggable element. + * Use ui.position to get a reference to the current position of the draggable element. + */ + drag?: DragEvent; + + /** + * Fired on drag stop. + * Use ui.helper to get a reference to the helper. + * Use ui.offset to get a reference to the offset. + * Use ui.originalPosition to get a reference to the original position of the draggable element. + * Use ui.position to get a reference to the current position of the draggable element. + */ + dragStop?: DragStopEvent; + + /** + * Fired before a metadata item drop. Return false to cancel the drop. + * Use ui.targetElement for a reference to the drop target. + * Use ui.draggedElement for a reference to the dragged element. + * Use ui.metadatato get a reference to the data. + * Use ui.metadataIndex to get the index at which the metadata will be inserted. + * Use ui.helper to get a reference to the helper. + * Use ui.offset to get a reference to the offset. + * Use ui.position to get a reference to the current position of the draggable element. + */ + metadataDropping?: MetadataDroppingEvent; + + /** + * Fired after a metadata item drop. + * Use ui.targetElement for a reference to the drop target. + * Use ui.draggedElement for a reference to the dragged element. + * Use ui.metadatato get a reference to the data. + * Use ui.metadataIndex to get the index at which the metadata is inserted. + * Use ui.helper to get a reference to the helper. + * Use ui.offset to get a reference to the offset. + * Use ui.position to get a reference to the current position of the draggable element. + */ + metadataDropped?: MetadataDroppedEvent; + + /** + * Fired before a metadata item is removed when the user clicks the close icon. Return false to cancel the removing. + * Use ui.targetElement for a reference to the dragged element. + * Use ui.metadatato get a reference to the data. + */ + metadataRemoving?: MetadataRemovingEvent; + + /** + * Fired after a metadata item is removed when the user clicks the close icon. + * Use ui.metadatato get a reference to the data. + */ + metadataRemoved?: MetadataRemovedEvent; + + /** + * Fired before the filter members drop down opens. Return false to cancel the opening. + * Use ui.hierarchy for a reference to the hierarchy. + */ + filterDropDownOpening?: FilterDropDownOpeningEvent; + + /** + * Fired after the filter members drop down opens. + * Use ui.hierarchy for a reference to the hierarchy. + * Use ui.dropDownElement for a reference to the drop down. + */ + filterDropDownOpened?: FilterDropDownOpenedEvent; + + /** + * Fired after the filter members are loaded. + * Use ui.parent to get the parent node or the igTree instance in the initial load. + * Use ui.rootFilterMembers for a collection with the root filter members . + * Use ui.filterMembers for a collection with the newly loaded filter members. + */ + filterMembersLoaded?: FilterMembersLoadedEvent; + + /** + * Fired after the OK button in the filter members drop down is clicked. Return false to cancel the applying of the filters. + * Use ui.hierarchy for a reference to the hierarchy. + * Use ui.filterMembers for a collection with the selected filter members. If all filter members are selected the collection will be empty. + * Use ui.dropDownElement for a reference to the drop down. + */ + filterDropDownOk?: FilterDropDownOkEvent; + + /** + * Fired before the filter members drop down closes. Return false to cancel the closing. + * Use ui.hierarchy for a reference to the hierarchy. + * Use ui.dropDownElement for a reference to the drop down. + */ + filterDropDownClosing?: FilterDropDownClosingEvent; + + /** + * Fired after the filter members drop down closes. + * Use ui.hierarchy for a reference to the hierarchy. + */ + filterDropDownClosed?: FilterDropDownClosedEvent; + + /** + * Option for igPivotDataSelector + */ + [optionName: string]: any; +} +interface IgPivotDataSelectorMethods { + /** + * Updates the data source. + */ + update(): void; + + /** + * Destroy is part of the jQuery UI widget API and does the following: + * 1. Remove custom CSS classes that were added. + * 2. Unwrap any wrapping elements such as scrolling divs and other containers. + * 3. Unbind all events that were bound. + */ + destroy(): void; +} +interface JQuery { + data(propertyName: "igPivotDataSelector"): IgPivotDataSelectorMethods; +} + +interface JQuery { + igPivotDataSelector(methodName: "update"): void; + igPivotDataSelector(methodName: "destroy"): void; + + /** + */ + igPivotDataSelector(optionLiteral: 'option', optionName: "width"): string|number; + + /** + */ + igPivotDataSelector(optionLiteral: 'option', optionName: "width", optionValue: string|number): void; + + /** + * This is the total height of the grid, including all UI elements - scroll container with data rows, header, footer, filter row - (if any), etc. + */ + igPivotDataSelector(optionLiteral: 'option', optionName: "height"): string|number; + + /** + * This is the total height of the grid, including all UI elements - scroll container with data rows, header, footer, filter row - (if any), etc. + * + * @optionValue New value to be set. + */ + igPivotDataSelector(optionLiteral: 'option', optionName: "height", optionValue: string|number): void; + + /** + * An instance of $.ig.OlapXmlaDataSource or $.ig.OlapFlatDataSource. + */ + igPivotDataSelector(optionLiteral: 'option', optionName: "dataSource"): any; + + /** + * An instance of $.ig.OlapXmlaDataSource or $.ig.OlapFlatDataSource. + * + * @optionValue New value to be set. + */ + igPivotDataSelector(optionLiteral: 'option', optionName: "dataSource", optionValue: any): void; + + /** + * An object that will be used to create an instance of $.ig.OlapXmlaDataSource or $.ig.OlapFlatDataSource. + * The provided value must contain an object with settings for one of the data source types - xmlaOptions or flatDataOptions. + */ + igPivotDataSelector(optionLiteral: 'option', optionName: "dataSourceOptions"): IgPivotDataSelectorDataSourceOptions; + + /** + * An object that will be used to create an instance of $.ig.OlapXmlaDataSource or $.ig.OlapFlatDataSource. + * The provided value must contain an object with settings for one of the data source types - xmlaOptions or flatDataOptions. + * + * @optionValue New value to be set. + */ + igPivotDataSelector(optionLiteral: 'option', optionName: "dataSourceOptions", optionValue: IgPivotDataSelectorDataSourceOptions): void; + + /** + * Setting deferUpdate to true will not apply changes to the data source until the update method is called or the update layout button is clicked. + */ + igPivotDataSelector(optionLiteral: 'option', optionName: "deferUpdate"): boolean; + + /** + * Setting deferUpdate to true will not apply changes to the data source until the update method is called or the update layout button is clicked. + * + * @optionValue New value to be set. + */ + igPivotDataSelector(optionLiteral: 'option', optionName: "deferUpdate", optionValue: boolean): void; + + /** + * Settings for the drag and drop functionality of the igPivotDataSelector. + */ + igPivotDataSelector(optionLiteral: 'option', optionName: "dragAndDropSettings"): IgPivotDataSelectorDragAndDropSettings; + + /** + * Settings for the drag and drop functionality of the igPivotDataSelector. + * + * @optionValue New value to be set. + */ + igPivotDataSelector(optionLiteral: 'option', optionName: "dragAndDropSettings", optionValue: IgPivotDataSelectorDragAndDropSettings): void; + + /** + * Gets the parent for the drop downs. + */ + igPivotDataSelector(optionLiteral: 'option', optionName: "dropDownParent"): any; + + /** + * Sets the parent for the drop downs. + * + * @optionValue New value to be set. + */ + igPivotDataSelector(optionLiteral: 'option', optionName: "dropDownParent", optionValue: any): void; + + /** + * Disable the drag and drop for the rows drop area and the ability to use filtering and remove items from it. + */ + igPivotDataSelector(optionLiteral: 'option', optionName: "disableRowsDropArea"): boolean; + + /** + * Disable the drag and drop for the rows drop area and the ability to use filtering and remove items from it. + * + * @optionValue New value to be set. + */ + igPivotDataSelector(optionLiteral: 'option', optionName: "disableRowsDropArea", optionValue: boolean): void; + + /** + * Disable the drag and drop for the columns drop area and the ability to use filtering and remove items from it. + */ + igPivotDataSelector(optionLiteral: 'option', optionName: "disableColumnsDropArea"): boolean; + + /** + * Disable the drag and drop for the columns drop area and the ability to use filtering and remove items from it. + * + * @optionValue New value to be set. + */ + igPivotDataSelector(optionLiteral: 'option', optionName: "disableColumnsDropArea", optionValue: boolean): void; + + /** + * Disable the drag and drop for the measures drop area and the ability to use filtering and remove items from it. + */ + igPivotDataSelector(optionLiteral: 'option', optionName: "disableMeasuresDropArea"): boolean; + + /** + * Disable the drag and drop for the measures drop area and the ability to use filtering and remove items from it. + * + * @optionValue New value to be set. + */ + igPivotDataSelector(optionLiteral: 'option', optionName: "disableMeasuresDropArea", optionValue: boolean): void; + + /** + * Disable the drag and drop for the filters drop area and the ability to use filtering and remove items from it. + */ + igPivotDataSelector(optionLiteral: 'option', optionName: "disableFiltersDropArea"): boolean; + + /** + * Disable the drag and drop for the filters drop area and the ability to use filtering and remove items from it. + * + * @optionValue New value to be set. + */ + igPivotDataSelector(optionLiteral: 'option', optionName: "disableFiltersDropArea", optionValue: boolean): void; + + /** + * A function that will be called to determine if an item can be moved in or dropped on an area of the data selector. + * paramType="string" The location where the item will be moved - igPivotGrid, igPivotDataSelector, filters, rows, columns or measures. + * paramType="string" The type of the item - Hierarchy, Measure or MeasureList. + * paramType="string" The unique name of the item. + * returnType="bool" The function must return true if the item should be accepted. + */ + igPivotDataSelector(optionLiteral: 'option', optionName: "customMoveValidation"): Function; + + /** + * A function that will be called to determine if an item can be moved in or dropped on an area of the data selector. + * paramType="string" The location where the item will be moved - igPivotGrid, igPivotDataSelector, filters, rows, columns or measures. + * paramType="string" The type of the item - Hierarchy, Measure or MeasureList. + * paramType="string" The unique name of the item. + * returnType="bool" The function must return true if the item should be accepted. + * + * @optionValue New value to be set. + */ + igPivotDataSelector(optionLiteral: 'option', optionName: "customMoveValidation", optionValue: Function): void; + + /** + * Fired after the data selector is rendered. Changing the data source instance will re-render the data selector. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the data selector. + */ + igPivotDataSelector(optionLiteral: 'option', optionName: "dataSelectorRendered"): DataSelectorRenderedEvent; + + /** + * Fired after the data selector is rendered. Changing the data source instance will re-render the data selector. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the data selector. + * + * @optionValue New value to be set. + */ + igPivotDataSelector(optionLiteral: 'option', optionName: "dataSelectorRendered", optionValue: DataSelectorRenderedEvent): void; + + /** + * Fired after the data source has initialized. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the data selector. + * Use ui.dataSource to get a reference to the data source. + * Use ui.error to see if an error has occured during initialization. + * Use ui.metadataTreeRoot to get a reference to the root of the data source metatadata root item. + */ + igPivotDataSelector(optionLiteral: 'option', optionName: "dataSourceInitialized"): DataSourceInitializedEvent; + + /** + * Fired after the data source has initialized. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the data selector. + * Use ui.dataSource to get a reference to the data source. + * Use ui.error to see if an error has occured during initialization. + * Use ui.metadataTreeRoot to get a reference to the root of the data source metatadata root item. + * + * @optionValue New value to be set. + */ + igPivotDataSelector(optionLiteral: 'option', optionName: "dataSourceInitialized", optionValue: DataSourceInitializedEvent): void; + + /** + * Fired after the data source has updated. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the data selector. + * Use ui.dataSource to get a reference to the data source. + * Use ui.error to see if an error has occured during update. + * Use ui.result to get the result of the update operation. + */ + igPivotDataSelector(optionLiteral: 'option', optionName: "dataSourceUpdated"): DataSourceUpdatedEvent; + + /** + * Fired after the data source has updated. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the data selector. + * Use ui.dataSource to get a reference to the data source. + * Use ui.error to see if an error has occured during update. + * Use ui.result to get the result of the update operation. + * + * @optionValue New value to be set. + */ + igPivotDataSelector(optionLiteral: 'option', optionName: "dataSourceUpdated", optionValue: DataSourceUpdatedEvent): void; + + /** + * Fired when the defer update checkbox changes. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the data selector. + * Use ui.deferUpdate to get the defer update value. + */ + igPivotDataSelector(optionLiteral: 'option', optionName: "deferUpdateChanged"): DeferUpdateChangedEvent; + + /** + * Fired when the defer update checkbox changes. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the data selector. + * Use ui.deferUpdate to get the defer update value. + * + * @optionValue New value to be set. + */ + igPivotDataSelector(optionLiteral: 'option', optionName: "deferUpdateChanged", optionValue: DeferUpdateChangedEvent): void; + + /** + * Fired on drag start. Return false to cancel the drag. + * Use ui.metadatato get a reference to the data. + * Use ui.helper to get a reference to the helper. + * Use ui.offset to get a reference to the offset. + * Use ui.originalPosition to get a reference to the original position of the draggable element. + * Use ui.position to get a reference to the current position of the draggable element. + */ + igPivotDataSelector(optionLiteral: 'option', optionName: "dragStart"): DragStartEvent; + + /** + * Fired on drag start. Return false to cancel the drag. + * Use ui.metadatato get a reference to the data. + * Use ui.helper to get a reference to the helper. + * Use ui.offset to get a reference to the offset. + * Use ui.originalPosition to get a reference to the original position of the draggable element. + * Use ui.position to get a reference to the current position of the draggable element. + * + * @optionValue New value to be set. + */ + igPivotDataSelector(optionLiteral: 'option', optionName: "dragStart", optionValue: DragStartEvent): void; + + /** + * Fired on drag. Return false to cancel the dragging. + * Use ui.metadatato get a reference to the data. + * Use ui.helper to get a reference to the helper. + * Use ui.offset to get a reference to the offset. + * Use ui.originalPosition to get a reference to the original position of the draggable element. + * Use ui.position to get a reference to the current position of the draggable element. + */ + igPivotDataSelector(optionLiteral: 'option', optionName: "drag"): DragEvent; + + /** + * Fired on drag. Return false to cancel the dragging. + * Use ui.metadatato get a reference to the data. + * Use ui.helper to get a reference to the helper. + * Use ui.offset to get a reference to the offset. + * Use ui.originalPosition to get a reference to the original position of the draggable element. + * Use ui.position to get a reference to the current position of the draggable element. + * + * @optionValue New value to be set. + */ + igPivotDataSelector(optionLiteral: 'option', optionName: "drag", optionValue: DragEvent): void; + + /** + * Fired on drag stop. + * Use ui.helper to get a reference to the helper. + * Use ui.offset to get a reference to the offset. + * Use ui.originalPosition to get a reference to the original position of the draggable element. + * Use ui.position to get a reference to the current position of the draggable element. + */ + igPivotDataSelector(optionLiteral: 'option', optionName: "dragStop"): DragStopEvent; + + /** + * Fired on drag stop. + * Use ui.helper to get a reference to the helper. + * Use ui.offset to get a reference to the offset. + * Use ui.originalPosition to get a reference to the original position of the draggable element. + * Use ui.position to get a reference to the current position of the draggable element. + * + * @optionValue New value to be set. + */ + igPivotDataSelector(optionLiteral: 'option', optionName: "dragStop", optionValue: DragStopEvent): void; + + /** + * Fired before a metadata item drop. Return false to cancel the drop. + * Use ui.targetElement for a reference to the drop target. + * Use ui.draggedElement for a reference to the dragged element. + * Use ui.metadatato get a reference to the data. + * Use ui.metadataIndex to get the index at which the metadata will be inserted. + * Use ui.helper to get a reference to the helper. + * Use ui.offset to get a reference to the offset. + * Use ui.position to get a reference to the current position of the draggable element. + */ + igPivotDataSelector(optionLiteral: 'option', optionName: "metadataDropping"): MetadataDroppingEvent; + + /** + * Fired before a metadata item drop. Return false to cancel the drop. + * Use ui.targetElement for a reference to the drop target. + * Use ui.draggedElement for a reference to the dragged element. + * Use ui.metadatato get a reference to the data. + * Use ui.metadataIndex to get the index at which the metadata will be inserted. + * Use ui.helper to get a reference to the helper. + * Use ui.offset to get a reference to the offset. + * Use ui.position to get a reference to the current position of the draggable element. + * + * @optionValue New value to be set. + */ + igPivotDataSelector(optionLiteral: 'option', optionName: "metadataDropping", optionValue: MetadataDroppingEvent): void; + + /** + * Fired after a metadata item drop. + * Use ui.targetElement for a reference to the drop target. + * Use ui.draggedElement for a reference to the dragged element. + * Use ui.metadatato get a reference to the data. + * Use ui.metadataIndex to get the index at which the metadata is inserted. + * Use ui.helper to get a reference to the helper. + * Use ui.offset to get a reference to the offset. + * Use ui.position to get a reference to the current position of the draggable element. + */ + igPivotDataSelector(optionLiteral: 'option', optionName: "metadataDropped"): MetadataDroppedEvent; + + /** + * Fired after a metadata item drop. + * Use ui.targetElement for a reference to the drop target. + * Use ui.draggedElement for a reference to the dragged element. + * Use ui.metadatato get a reference to the data. + * Use ui.metadataIndex to get the index at which the metadata is inserted. + * Use ui.helper to get a reference to the helper. + * Use ui.offset to get a reference to the offset. + * Use ui.position to get a reference to the current position of the draggable element. + * + * @optionValue New value to be set. + */ + igPivotDataSelector(optionLiteral: 'option', optionName: "metadataDropped", optionValue: MetadataDroppedEvent): void; + + /** + * Fired before a metadata item is removed when the user clicks the close icon. Return false to cancel the removing. + * Use ui.targetElement for a reference to the dragged element. + * Use ui.metadatato get a reference to the data. + */ + igPivotDataSelector(optionLiteral: 'option', optionName: "metadataRemoving"): MetadataRemovingEvent; + + /** + * Fired before a metadata item is removed when the user clicks the close icon. Return false to cancel the removing. + * Use ui.targetElement for a reference to the dragged element. + * Use ui.metadatato get a reference to the data. + * + * @optionValue New value to be set. + */ + igPivotDataSelector(optionLiteral: 'option', optionName: "metadataRemoving", optionValue: MetadataRemovingEvent): void; + + /** + * Fired after a metadata item is removed when the user clicks the close icon. + * Use ui.metadatato get a reference to the data. + */ + igPivotDataSelector(optionLiteral: 'option', optionName: "metadataRemoved"): MetadataRemovedEvent; + + /** + * Fired after a metadata item is removed when the user clicks the close icon. + * Use ui.metadatato get a reference to the data. + * + * @optionValue New value to be set. + */ + igPivotDataSelector(optionLiteral: 'option', optionName: "metadataRemoved", optionValue: MetadataRemovedEvent): void; + + /** + * Fired before the filter members drop down opens. Return false to cancel the opening. + * Use ui.hierarchy for a reference to the hierarchy. + */ + igPivotDataSelector(optionLiteral: 'option', optionName: "filterDropDownOpening"): FilterDropDownOpeningEvent; + + /** + * Fired before the filter members drop down opens. Return false to cancel the opening. + * Use ui.hierarchy for a reference to the hierarchy. + * + * @optionValue New value to be set. + */ + igPivotDataSelector(optionLiteral: 'option', optionName: "filterDropDownOpening", optionValue: FilterDropDownOpeningEvent): void; + + /** + * Fired after the filter members drop down opens. + * Use ui.hierarchy for a reference to the hierarchy. + * Use ui.dropDownElement for a reference to the drop down. + */ + igPivotDataSelector(optionLiteral: 'option', optionName: "filterDropDownOpened"): FilterDropDownOpenedEvent; + + /** + * Fired after the filter members drop down opens. + * Use ui.hierarchy for a reference to the hierarchy. + * Use ui.dropDownElement for a reference to the drop down. + * + * @optionValue New value to be set. + */ + igPivotDataSelector(optionLiteral: 'option', optionName: "filterDropDownOpened", optionValue: FilterDropDownOpenedEvent): void; + + /** + * Fired after the filter members are loaded. + * Use ui.parent to get the parent node or the igTree instance in the initial load. + * Use ui.rootFilterMembers for a collection with the root filter members . + * Use ui.filterMembers for a collection with the newly loaded filter members. + */ + igPivotDataSelector(optionLiteral: 'option', optionName: "filterMembersLoaded"): FilterMembersLoadedEvent; + + /** + * Fired after the filter members are loaded. + * Use ui.parent to get the parent node or the igTree instance in the initial load. + * Use ui.rootFilterMembers for a collection with the root filter members . + * Use ui.filterMembers for a collection with the newly loaded filter members. + * + * @optionValue New value to be set. + */ + igPivotDataSelector(optionLiteral: 'option', optionName: "filterMembersLoaded", optionValue: FilterMembersLoadedEvent): void; + + /** + * Fired after the OK button in the filter members drop down is clicked. Return false to cancel the applying of the filters. + * Use ui.hierarchy for a reference to the hierarchy. + * Use ui.filterMembers for a collection with the selected filter members. If all filter members are selected the collection will be empty. + * Use ui.dropDownElement for a reference to the drop down. + */ + igPivotDataSelector(optionLiteral: 'option', optionName: "filterDropDownOk"): FilterDropDownOkEvent; + + /** + * Fired after the OK button in the filter members drop down is clicked. Return false to cancel the applying of the filters. + * Use ui.hierarchy for a reference to the hierarchy. + * Use ui.filterMembers for a collection with the selected filter members. If all filter members are selected the collection will be empty. + * Use ui.dropDownElement for a reference to the drop down. + * + * @optionValue New value to be set. + */ + igPivotDataSelector(optionLiteral: 'option', optionName: "filterDropDownOk", optionValue: FilterDropDownOkEvent): void; + + /** + * Fired before the filter members drop down closes. Return false to cancel the closing. + * Use ui.hierarchy for a reference to the hierarchy. + * Use ui.dropDownElement for a reference to the drop down. + */ + igPivotDataSelector(optionLiteral: 'option', optionName: "filterDropDownClosing"): FilterDropDownClosingEvent; + + /** + * Fired before the filter members drop down closes. Return false to cancel the closing. + * Use ui.hierarchy for a reference to the hierarchy. + * Use ui.dropDownElement for a reference to the drop down. + * + * @optionValue New value to be set. + */ + igPivotDataSelector(optionLiteral: 'option', optionName: "filterDropDownClosing", optionValue: FilterDropDownClosingEvent): void; + + /** + * Fired after the filter members drop down closes. + * Use ui.hierarchy for a reference to the hierarchy. + */ + igPivotDataSelector(optionLiteral: 'option', optionName: "filterDropDownClosed"): FilterDropDownClosedEvent; + + /** + * Fired after the filter members drop down closes. + * Use ui.hierarchy for a reference to the hierarchy. + * + * @optionValue New value to be set. + */ + igPivotDataSelector(optionLiteral: 'option', optionName: "filterDropDownClosed", optionValue: FilterDropDownClosedEvent): void; + igPivotDataSelector(options: IgPivotDataSelector): JQuery; + igPivotDataSelector(optionLiteral: 'option', optionName: string): any; + igPivotDataSelector(optionLiteral: 'option', options: IgPivotDataSelector): JQuery; + igPivotDataSelector(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igPivotDataSelector(methodName: string, ...methodParams: any[]): any; +} +interface IgPivotGridDataSourceOptionsXmlaOptionsRequestOptions { + /** + * The value is applied to XmlHttpRequest.withCredentials if supported by the user agent. + * Setting this property to true will allow IE8/IE9 to make authenticated cross-origin requests to tusted domains through XmlHttpRequest instead of XDomainRequest + * and will prompt the user for credentials. + */ + withCredentials?: boolean; + + /** + * A callback to be invoked right before the request is send to the server. Extends beforeSend callback of jQuery.ajax's options object. + */ + beforeSend?: Function; + + /** + * Option for IgPivotGridDataSourceOptionsXmlaOptionsRequestOptions + */ + [optionName: string]: any; +} + +interface IgPivotGridDataSourceOptionsXmlaOptionsMdxSettings { + /** + * Optional="true" a value indicating whether a NON EMPTY clause is present on ROWS axis. Default value is true + */ + nonEmptyOnRows?: boolean; + + /** + * Optional="true" a value indicating whether a NON EMPTY clause is present on COLUMNS axis. Default value is true + */ + nonEmptyOnColumns?: boolean; + + /** + * Optional="true" a value indicating whether a members' set expressions on ROWS axis should be wrapped with AddCalculatedMembers MDX method. Default value is true + */ + addCalculatedMembersOnRows?: boolean; + + /** + * Optional="true" a value indicating whether a members' set expressions on COLUMNS axis should be wrapped with AddCalculatedMembers MDX method. Default value is true + */ + addCalculatedMembersOnColumns?: boolean; + + /** + * Optional="true" a string array with the names of intrinsic non-context sensitive member properties applied on ROWS axis. By defult CHILDREN_CARDINALITY and PARENT_UNIQUE_NAME properties are always added to DIMENSION PROPERTIES + */ + dimensionPropertiesOnRows?: any[]; + + /** + * Optional="true" a string array with the names of intrinsic non-context sensitive member properties applied on COLUMNS axis. By defult CHILDREN_CARDINALITY and PARENT_UNIQUE_NAME properties are always added to DIMENSION PROPERTIES + */ + dimensionPropertiesOnColumns?: any[]; + + /** + * Option for IgPivotGridDataSourceOptionsXmlaOptionsMdxSettings + */ + [optionName: string]: any; +} + +interface IgPivotGridDataSourceOptionsXmlaOptions { + /** + * Optional="false" The URL of the XMLA server. + */ + serverUrl?: string; + + /** + * The catalog name. + */ + catalog?: string; + + /** + * The name of the cube in the data source. + */ + cube?: string; + + /** + * The name of the measure group in the data source. + */ + measureGroup?: string; + + /** + * An object containing information about how the request to the XMLA server should be processed. + */ + requestOptions?: IgPivotGridDataSourceOptionsXmlaOptionsRequestOptions; + + /** + * Enables/disables caching of the XMLA result object. + */ + enableResultCache?: boolean; + + /** + * Additional properties sent with every discover request. + * The object is treated as a key/value store where each property name is used as the key and the property value as the value. + */ + discoverProperties?: any; + + /** + * Additional properties sent with every execute request. + * The object is treated as a key/value store where each property name is used as the key and the property value as the value. + */ + executeProperties?: any; + + /** + * Optional="true" a javascript object containing information about how the request to the xmla server should be processed + */ + mdxSettings?: IgPivotGridDataSourceOptionsXmlaOptionsMdxSettings; + + /** + * Option for IgPivotGridDataSourceOptionsXmlaOptions + */ + [optionName: string]: any; +} + +interface IgPivotGridDataSourceOptionsFlatDataOptionsMetadataCubeMeasuresDimensionMeasure { + /** + * Optional="false" A unique name for the measure. + */ + name?: string; + + /** + * A caption for the measure. + */ + caption?: string; + + /** + * Optional="false" An aggregator function called when each cell is evaluated. + * Returns a value for the cell. If the returned value is null, no cell will be created in for the data source result. + */ + aggregator?: Function; + + /** + * The path used when displaying the measure in the user interface. Nested folders are indicated by a backslash (\). + */ + displayFolder?: string; + + /** + * Option for IgPivotGridDataSourceOptionsFlatDataOptionsMetadataCubeMeasuresDimensionMeasure + */ + [optionName: string]: any; +} + +interface IgPivotGridDataSourceOptionsFlatDataOptionsMetadataCubeMeasuresDimension { + /** + * A unique name for the measures dimension. + * The default value is "Measures". This name is used to create the names of dimensions using the following pattern: + * [].[] + */ + name?: string; + + /** + * A caption for the measures dimension. + * The default value is "Measures". + */ + caption?: string; + + /** + * An array of measure metadata objects. + */ + measures?: IgPivotGridDataSourceOptionsFlatDataOptionsMetadataCubeMeasuresDimensionMeasure[]; + + /** + * Option for IgPivotGridDataSourceOptionsFlatDataOptionsMetadataCubeMeasuresDimension + */ + [optionName: string]: any; +} + +interface IgPivotGridDataSourceOptionsFlatDataOptionsMetadataCubeDimensionHierarchieLevel { + /** + * Optional="false" A name for the level. + * The unique name of the level is formed using the following pattern: + * {}.[] + */ + name?: string; + + /** + * A caption for the level. + */ + caption?: string; + + /** + * A function called for each item of the data source array when level members are created. + * Based on the item parameter the function should return a value that will form the $.ig.Member's name and caption. + */ + memberProvider?: Function; + + /** + * Option for IgPivotGridDataSourceOptionsFlatDataOptionsMetadataCubeDimensionHierarchieLevel + */ + [optionName: string]: any; +} + +interface IgPivotGridDataSourceOptionsFlatDataOptionsMetadataCubeDimensionHierarchie { + /** + * Optional="false" A name for the hierarchy. + * The unique name of the hierarchy is formed using the following pattern: + * [].[] + */ + name?: string; + + /** + * A caption for the hierarchy. + */ + caption?: string; + + /** + * The path to be used when displaying the hierarchy in the user interface. + * Nested folders are indicated by a backslash (\). + * The folder hierarchy will appear under parent dimension node. + */ + displayFolder?: string; + + /** + * An array of level metadata objects. + */ + levels?: IgPivotGridDataSourceOptionsFlatDataOptionsMetadataCubeDimensionHierarchieLevel[]; + + /** + * Option for IgPivotGridDataSourceOptionsFlatDataOptionsMetadataCubeDimensionHierarchie + */ + [optionName: string]: any; +} + +interface IgPivotGridDataSourceOptionsFlatDataOptionsMetadataCubeDimension { + /** + * Optional="false" A unique name for the dimension. + */ + name?: string; + + /** + * A caption for the dimension. + */ + caption?: string; + + /** + * An array of hierarchy metadata objects. + */ + hierarchies?: IgPivotGridDataSourceOptionsFlatDataOptionsMetadataCubeDimensionHierarchie[]; + + /** + * Option for IgPivotGridDataSourceOptionsFlatDataOptionsMetadataCubeDimension + */ + [optionName: string]: any; +} + +interface IgPivotGridDataSourceOptionsFlatDataOptionsMetadataCube { + /** + * Optional="false" A unique name for the cube. + */ + name?: string; + + /** + * A caption for the cube. + */ + caption?: string; + + /** + * An object providing information about the measures' root node. + */ + measuresDimension?: IgPivotGridDataSourceOptionsFlatDataOptionsMetadataCubeMeasuresDimension; + + /** + * An array of dimension metadata objects. + */ + dimensions?: IgPivotGridDataSourceOptionsFlatDataOptionsMetadataCubeDimension[]; + + /** + * Option for IgPivotGridDataSourceOptionsFlatDataOptionsMetadataCube + */ + [optionName: string]: any; +} + +interface IgPivotGridDataSourceOptionsFlatDataOptionsMetadata { + /** + * Optional="false" Metadata used for the creation of the cube. + */ + cube?: IgPivotGridDataSourceOptionsFlatDataOptionsMetadataCube; + + /** + * Option for IgPivotGridDataSourceOptionsFlatDataOptionsMetadata + */ + [optionName: string]: any; +} + +interface IgPivotGridDataSourceOptionsFlatDataOptions { + /** + * Specifies any valid data source accepted by $.ig.DataSource, or an instance of an $.ig.DataSource itself. + */ + dataSource?: any; + + /** + * Specifies a remote URL accepted by $.ig.DataSource in order to request data from it. + */ + dataSourceUrl?: string; + + /** + * Explicitly set data source type (such as "json"). Please refer to the documentation of $.ig.DataSource and its type property. + */ + dataSourceType?: string; + + /** + * See $.ig.DataSource. + * string Specifies the name of the property in which data records are held if the response is wrapped. + * null Option is ignored. + */ + responseDataKey?: string; + + /** + * String Explicitly set data source type (such as "json"). Please refer to the documentation of $.ig.DataSource and its type property. + * null Option is ignored. + */ + responseDataType?: string; + + /** + * Optional="false" An object containing processing instructions for the $.ig.DataSource data. + */ + metadata?: IgPivotGridDataSourceOptionsFlatDataOptionsMetadata; + + /** + * Option for IgPivotGridDataSourceOptionsFlatDataOptions + */ + [optionName: string]: any; +} + +interface IgPivotGridDataSourceOptions { + /** + * Settings for creating an instance of $.ig.OlapXmlaDataSource. + */ + xmlaOptions?: IgPivotGridDataSourceOptionsXmlaOptions; + + /** + * Settings for creating an instance of $.ig.OlapFlatDataSource. + */ + flatDataOptions?: IgPivotGridDataSourceOptionsFlatDataOptions; + + /** + * A list of measure names separated by comma (,). These will be the measures of the data source. + */ + measures?: string; + + /** + * A list of hierarchy names separated by comma (,). These will be hierarchies in the filters of the data source. + */ + filters?: string; + + /** + * A list of hierarchy names separated by comma (,). These will be the hierarchies in the rows of the data source. + */ + rows?: string; + + /** + * A list of hierarchy names separated by comma (,). These will be the hierarchies in the columns of the data source. + */ + columns?: string; + + /** + * Option for IgPivotGridDataSourceOptions + */ + [optionName: string]: any; +} + +interface IgPivotGridLevelSortDirection { + /** + * Specifies the unique name of the level, which will be sorted. + */ + levelUniqueName?: string; + + /** + * optional="true" Specifies the sort direction. If no direction is specified, the level is going to be sorted in the direction specified by the firstLevelSortDirection option. + */ + sortDirection?: any; + + /** + * optional="true" Specifies what type of sorting will be applied to the header cells. If no behavior is specified, the level is going to be sorted with the behavior specified in the defaultLevelSortBehavior option. + * + * Valid values: + * "system" Sorts the headers by a specified sort key. + * "alphabetical" Sorts alphabetically the header captions. + */ + sortBehavior?: string; + + /** + * Option for IgPivotGridLevelSortDirection + */ + [optionName: string]: any; +} + +interface IgPivotGridGridOptionsFeatures { + /** + * Option for IgPivotGridGridOptionsFeatures + */ + [optionName: string]: any; +} + +interface IgPivotGridGridOptions { + /** + * Default column width that will be set for all columns. + */ + defaultColumnWidth?: string|number; + + /** + * Headers will be fixed if this option is set to true, and only the grid data will be scrollable. + */ + fixedHeaders?: boolean; + + /** + * Caption text that will be shown above the pivot grid header. + */ + caption?: string; + + /** + * A list of grid features definitions. The supported features are Resizing and Tooltips. Each feature goes with its separate options that are documented for the feature accordingly. + */ + features?: IgPivotGridGridOptionsFeatures; + + /** + * Initial tabIndex attribute that will be set on the container element. + */ + tabIndex?: number; + + /** + * Enables/disables rendering of alternating row styles (odd and even rows receive different styling). Note that if a custom jQuery template is set, this has no effect and CSS for the row should be adjusted manually in the template contents. + */ + alternateRowStyles?: boolean; + + /** + * Enables/disables rendering of ui-state-hover classes when the mouse is over a record. This can be useful in templating scenarios, for example, where we don't want to apply hover styling to templated content. + */ + enableHoverStyles?: boolean; + + /** + * Option for IgPivotGridGridOptions + */ + [optionName: string]: any; +} + +interface IgPivotGridDragAndDropSettings { + /** + * Which element the draggable helper should be appended to while dragging. + */ + appendTo?: any; + + /** + * Specifies the containment for the drag helper. The area inside of which the helper is contained would be scrollable while dragging. + * + */ + containment?: boolean|string|Array; + + /** + * Specifies z-index that would be set for the drag helper. + */ + zIndex?: number; + + /** + * Option for IgPivotGridDragAndDropSettings + */ + [optionName: string]: any; +} + +interface PivotGridHeadersRenderedEvent { + (event: Event, ui: PivotGridHeadersRenderedEventUIParam): void; +} + +interface PivotGridHeadersRenderedEventUIParam { + /** + * Used to get a reference to the pivot grid. + */ + owner?: any; + + /** + * Used to get a reference to the igGrid widget, which holds the headers. + */ + grid?: any; + + /** + * Used to get a reference to the headers table DOM element. + */ + table?: any; +} + +interface PivotGridRenderedEvent { + (event: Event, ui: PivotGridRenderedEventUIParam): void; +} + +interface PivotGridRenderedEventUIParam { + /** + * Used to get a reference to the pivot grid. + */ + owner?: any; + + /** + * Used to get reference to the igGrid widget, which represents the data. + */ + grid?: any; +} + +interface TupleMemberExpandingEvent { + (event: Event, ui: TupleMemberExpandingEventUIParam): void; +} + +interface TupleMemberExpandingEventUIParam { + /** + * Used to get a reference to the pivot grid. + */ + owner?: any; + + /** + * Used to get a reference to the data source. + */ + dataSource?: any; + + /** + * Used to get the name of axis, which holds the member and the tuple. + */ + axisName?: any; + + /** + * Used to get the index of the tuple in the axis. + */ + tupleIndex?: any; + + /** + * Used to get the index of the member in the tuple. + */ + memberIndex?: any; +} + +interface TupleMemberExpandedEvent { + (event: Event, ui: TupleMemberExpandedEventUIParam): void; +} + +interface TupleMemberExpandedEventUIParam { + /** + * Used to get a reference to the pivot grid. + */ + owner?: any; + + /** + * Used to get a reference to the data source. + */ + dataSource?: any; + + /** + * Used to get the name of axis, which holds the member and the tuple. + */ + axisName?: any; + + /** + * Used to get the index of the tuple in the axis. + */ + tupleIndex?: any; + + /** + * Used to get the index of the member in the tuple. + */ + memberIndex?: any; +} + +interface TupleMemberCollapsingEvent { + (event: Event, ui: TupleMemberCollapsingEventUIParam): void; +} + +interface TupleMemberCollapsingEventUIParam { + /** + * Used to get a reference to the pivot grid. + */ + owner?: any; + + /** + * Used to get a reference to the data source. + */ + dataSource?: any; + + /** + * Used to get the name of axis, which holds the member and the tuple. + */ + axisName?: any; + + /** + * Used to get the index of the tuple in the axis. + */ + tupleIndex?: any; + + /** + * Used to get the index of the member in the tuple. + */ + memberIndex?: any; +} + +interface TupleMemberCollapsedEvent { + (event: Event, ui: TupleMemberCollapsedEventUIParam): void; +} + +interface TupleMemberCollapsedEventUIParam { + /** + * Used to get a reference to the pivot grid. + */ + owner?: any; + + /** + * Used to get a reference to the data source. + */ + dataSource?: any; + + /** + * Used to get the name of axis, which holds the member and the tuple. + */ + axisName?: any; + + /** + * Used to get the index of the tuple in the axis. + */ + tupleIndex?: any; + + /** + * Used to get the index of the member in the tuple. + */ + memberIndex?: any; +} + +interface SortingEvent { + (event: Event, ui: SortingEventUIParam): void; +} + +interface SortingEventUIParam { + /** + * Used to get a reference to the pivot grid. + */ + owner?: any; + + /** + * Used to get an array of the tuple indices and sort directions that will be used. + */ + sortDirections?: any; +} + +interface SortedEvent { + (event: Event, ui: SortedEventUIParam): void; +} + +interface SortedEventUIParam { + /** + * Used to get a reference to the pivot grid. + */ + owner?: any; + + /** + * Used to get an array of the tuple indices and sort directions that were passed to the table view. + */ + sortDirections?: any; + + /** + * Used to get an array of the tuple indices and sort directions that were actually applied to the table view. + */ + appliedSortDirections?: any; +} + +interface HeadersSortingEvent { + (event: Event, ui: HeadersSortingEventUIParam): void; +} + +interface HeadersSortingEventUIParam { + /** + * Used to get a reference to the pivot grid. + */ + owner?: any; + + /** + * Used to get an array of the level names and sort directions that will be used. + */ + levelSortDirections?: any; +} + +interface HeadersSortedEvent { + (event: Event, ui: HeadersSortedEventUIParam): void; +} + +interface HeadersSortedEventUIParam { + /** + * Used to get a reference to the pivot grid. + */ + owner?: any; + + /** + * Used to get an array of the level names and sort directions that were used. + */ + levelSortDirections?: any; + + /** + * Used to get an array of the level names and sort directions that were actually applied to the table view. + */ + appliedLevelSortDirections?: any; +} + +interface IgPivotGrid { + width?: string|number; + + /** + * This is the total height of the grid. + * + * Valid values: + * "null" Will stretch vertically to fit data, if no other heights are defined + */ + height?: string|number; + + /** + * An instance of $.ig.OlapXmlaDataSource or $.ig.OlapFlatDataSource. + */ + dataSource?: any; + + /** + * An object that will be used to create an instance of $.ig.OlapXmlaDataSource or $.ig.OlapFlatDataSource. + * The provided value must contain an object with settings for one of the data source types - xmlaOptions or flatDataOptions. + */ + dataSourceOptions?: IgPivotGridDataSourceOptions; + + /** + * Setting deferUpdate to true will not apply changes to the data source until the updateGrid method is called. + */ + deferUpdate?: boolean; + + /** + * A boolean value indicating whether a parent in the columns is in front of its children. + * If set to true, the query set sorts members in a level in their natural order - child members immediately follow their parent members. + * If set to false the query set sorts the members in a level using a post-natural order. In other words, child members precede their parents. + */ + isParentInFrontForColumns?: boolean; + + /** + * A boolean value indicating whether a parent in the rows is in front of its children. + * If set to true, the query set sorts members in a level in their natural order - child members immediately follow their parent members. + * If set to false the query set sorts the members in a level using a post-natural order. In other words, child members precede their parents. + */ + isParentInFrontForRows?: boolean; + + /** + * A boolean value indicating whether the column headers should be arranged for compact header layout i.e. each hierarchy is in a single row. + */ + compactColumnHeaders?: boolean; + + /** + * A boolean value indicating whether the row headers should be arranged for compact header layout i.e. each hierarchy is in a single column. + */ + compactRowHeaders?: boolean; + + /** + * A value indicating whether the layout that row headers should be arranged. standard Each hierarchy in the rows is displayed in a separate column. The child members of a member in the rows are displayed on its right. + * superCompact Each hierarchy in the rows is displayed in a separate column. The child members of a member in the rows are displayed on above or below it (Depending on the isParentInFrontForRows setting). + * tree All hierarchies in the rows are displayed in a tree-like structure in a single column (The column's width is dependent on the defaultRowHEaderWidth, which can be set to "null" to enable the built-in auto-sizing functionality). + * + * + * Valid values: + * "standard" + * "superCompact" + * "tree" + */ + rowHeadersLayout?: any; + + /** + * The indentation for every level column when the compactColumnHeaders is set to true. + */ + compactColumnHeaderIndentation?: number; + + /** + * The indentation for every level row when the rowHeadersLayout is set to 'superCompact'. + */ + compactRowHeaderIndentation?: number; + + /** + * Use it when you set rowHeadersLayout to "tree". This property will set a margin between the level's caption and the next level's (underlined text) caption. + */ + rowHeaderLinkGroupIndentation?: number; + + /** + * The indentation for the neighboring hierarchy's level row when the rowHeaderLayout is set to 'tree'. + */ + treeRowHeaderIndentation?: number; + + /** + * Specifies the width of the row headers. + */ + defaultRowHeaderWidth?: number; + + /** + * Enables sorting of the value cells in columns. + */ + allowSorting?: boolean; + + /** + * Specifies the default sort direction for the rows. + */ + firstSortDirection?: any; + + /** + * Enables sorting of the header cells in rows. + */ + allowHeaderRowsSorting?: boolean; + + /** + * Enables sorting of the header cells in columns. + */ + allowHeaderColumnsSorting?: boolean; + + /** + * An array of level sort direction items, which predefine the sorted header cells. + */ + levelSortDirections?: IgPivotGridLevelSortDirection[]; + + /** + * Specifies the default sort behavior for the levels if no sort behavior is specified in an item from the levelSortDirections option. + * + * Valid values: + * "system" Sorts the headers by a specified sort key. + * "alphabetical" Sorts alphabetically the header captions. + */ + defaultLevelSortBehavior?: string; + + /** + * Specifies the default sort direction for the levels if no sort direction is specified in an item from the levelSortDirections option. + */ + firstLevelSortDirection?: any; + + /** + * Options specific to the igGrid that will render the pivot grid view. + */ + gridOptions?: IgPivotGridGridOptions; + + /** + * Settings for the drag and drop functionality of the igPivotGrid. + */ + dragAndDropSettings?: IgPivotGridDragAndDropSettings; + + /** + * Specifies the parent for the drop downs. + */ + dropDownParent?: any; + + /** + * Disable the drag and drop for the rows drop area and the ability to use filtering and remove items from it. + */ + disableRowsDropArea?: boolean; + + /** + * Disable the drag and drop for the columns drop area and the ability to use filtering and remove items from it. + */ + disableColumnsDropArea?: boolean; + + /** + * Disable the drag and drop for the measures drop area and the ability to use filtering and remove items from it. + */ + disableMeasuresDropArea?: boolean; + + /** + * Disable the drag and drop for the filters drop area and the ability to use filtering and remove items from it. + */ + disableFiltersDropArea?: boolean; + + /** + * Hide the rows drop area. + */ + hideRowsDropArea?: boolean; + + /** + * Hide the columns drop area. + */ + hideColumnsDropArea?: boolean; + + /** + * Hide the measures drop area. + */ + hideMeasuresDropArea?: boolean; + + /** + * Hide the filters drop area. + */ + hideFiltersDropArea?: boolean; + + /** + * A function that will be called to determine if an item can be moved in or dropped on an area of the pivot grid. + * paramType="string" The location where the item will be moved - igPivotGrid, igPivotDataSelector, filters, rows, columns or measures. + * paramType="string" The type of the item - Hierarchy, Measure or MeasureList. + * paramType="string" The unique name of the item. + * returnType="bool" The function must return true if the item should be accepted. + */ + customMoveValidation?: Function; + + /** + * Fired after the data source has initialized. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the pivot grid. + * Use ui.dataSource to get a reference to the data source. + * Use ui.error to see if an error has occured during initialization. + * Use ui.metadataTreeRoot to get a reference to the root of the data source metatadata root item. + */ + dataSourceInitialized?: DataSourceInitializedEvent; + + /** + * Fired after the data source has updated. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the pivot grid. + * Use ui.dataSource to get a reference to the data source. + * Use ui.error to see if an error has occured during update. + * Use ui.result to get the result of the update operation. + */ + dataSourceUpdated?: DataSourceUpdatedEvent; + + /** + * Event fired after the headers have been rendered. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the pivot grid. + * Use ui.grid to get a reference to the igGrid widget, which holds the headers. + * Use ui.table to get a reference to the headers table DOM element. + */ + pivotGridHeadersRendered?: PivotGridHeadersRenderedEvent; + + /** + * Event fired after the whole grid widget has been rendered (including headers, footers, etc.). + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the pivot grid. + * Use ui.grid to get reference to the igGrid widget, which represents the data. + */ + pivotGridRendered?: PivotGridRenderedEvent; + + /** + * Fired before the expand of the tuple member. + * Function takes arguments evt and ui. Return false to cancel the expanding. + * Use ui.owner to get a reference to the pivot grid. + * Use ui.dataSource to get a reference to the data source. + * Use ui.axisName to get the name of axis, which holds the member and the tuple. + * Use ui.tupleIndex to get the index of the tuple in the axis. + * Use ui.memberIndex to get the index of the member in the tuple. + */ + tupleMemberExpanding?: TupleMemberExpandingEvent; + + /** + * Fired after the expand of the tuple member. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the pivot grid. + * Use ui.dataSource to get a reference to the data source. + * Use ui.axisName to get the name of axis, which holds the member and the tuple. + * Use ui.tupleIndex to get the index of the tuple in the axis. + * Use ui.memberIndex to get the index of the member in the tuple. + */ + tupleMemberExpanded?: TupleMemberExpandedEvent; + + /** + * Fired before the collapse of the tuple member. + * Function takes arguments evt and ui. Return false to cancel the collapsing. + * Use ui.owner to get a reference to the pivot grid. + * Use ui.dataSource to get a reference to the data source. + * Use ui.axisName to get the name of axis, which holds the member and the tuple. + * Use ui.tupleIndex to get the index of the tuple in the axis. + * Use ui.memberIndex to get the index of the member in the tuple. + */ + tupleMemberCollapsing?: TupleMemberCollapsingEvent; + + /** + * Fired after the collapse of the tuple member. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the pivot grid. + * Use ui.dataSource to get a reference to the data source. + * Use ui.axisName to get the name of axis, which holds the member and the tuple. + * Use ui.tupleIndex to get the index of the tuple in the axis. + * Use ui.memberIndex to get the index of the member in the tuple. + */ + tupleMemberCollapsed?: TupleMemberCollapsedEvent; + + /** + * Fired before the sorting of the columns. + * Function takes arguments evt and ui. Return false to cancel the sorting. + * Use ui.owner to get a reference to the pivot grid. + * Use ui.sortDirections to get an array of the tuple indices and sort directions that will be used. + */ + sorting?: SortingEvent; + + /** + * Fired after the sorting of the columns. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the pivot grid. + * Use ui.sortDirections to get an array of the tuple indices and sort directions that were passed to the table view. + * Use ui.appliedSortDirections to get an array of the tuple indices and sort directions that were actually applied to the table view. + */ + sorted?: SortedEvent; + + /** + * Fired before the sorting of the headers. + * Function takes arguments evt and ui. Return false to cancel the sorting. + * Use ui.owner to get a reference to the pivot grid. + * Use ui.levelSortDirections to get an array of the level names and sort directions that will be used. + */ + headersSorting?: HeadersSortingEvent; + + /** + * Fired after the sorting of the headers. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the pivot grid. + * Use ui.levelSortDirections to get an array of the level names and sort directions that were used. + * Use ui.appliedLevelSortDirections to get an array of the level names and sort directions that were actually applied to the table view. + */ + headersSorted?: HeadersSortedEvent; + + /** + * Fired on drag start. Return false to cancel the dragging. + * Use ui.metadatato get a reference to the data. + * Use ui.helper to get a reference to the helper. + * Use ui.offset to get a reference to the offset. + * Use ui.originalPosition to get a reference to the original position of the draggable element. + * Use ui.position to get a reference to the current position of the draggable element. + */ + dragStart?: DragStartEvent; + + /** + * Fired on drag. Return false to cancel the drag. + * Use ui.metadatato get a reference to the data. + * Use ui.helper to get a reference to the helper. + * Use ui.offset to get a reference to the offset. + * Use ui.originalPosition to get a reference to the original position of the draggable element. + * Use ui.position to get a reference to the current position of the draggable element. + */ + drag?: DragEvent; + + /** + * Fired on drag stop. + * Use ui.helper to get a reference to the helper. + * Use ui.offset to get a reference to the offset. + * Use ui.originalPosition to get a reference to the original position of the draggable element. + * Use ui.position to get a reference to the current position of the draggable element. + */ + dragStop?: DragStopEvent; + + /** + * Fired before a metadata item drop. Return false to cancel the drop. + * Use ui.targetElement for a reference to the drop target. + * Use ui.draggedElement for a reference to the metadata item element. + * Use ui.metadatato get a reference to the data. + * Use ui.metadataIndex to get the index at which the metadata will be inserted. + * Use ui.helper to get a reference to the helper. + * Use ui.offset to get a reference to the offset. + * Use ui.position to get a reference to the current position of the draggable element. + */ + metadataDropping?: MetadataDroppingEvent; + + /** + * Fired after a metadata item drop. + * Use ui.targetElement for a reference to the drop target. + * Use ui.draggedElement for a reference to the dragged element. + * Use ui.metadatato get a reference to the data. + * Use ui.metadataIndex to get the index at which the metadata is inserted. + * Use ui.helper to get a reference to the helper. + * Use ui.offset to get a reference to the offset. + * Use ui.position to get a reference to the current position of the draggable element. + */ + metadataDropped?: MetadataDroppedEvent; + + /** + * Fired before a metadata item is removed when the user clicks the close icon. Return false to cancel the removing. + * Use ui.targetElement for a reference to the dragged element. + * Use ui.metadatato get a reference to the data. + */ + metadataRemoving?: MetadataRemovingEvent; + + /** + * Fired after a metadata item is removed when the user clicks the close icon. + * Use ui.metadatato get a reference to the data. + */ + metadataRemoved?: MetadataRemovedEvent; + + /** + * Fired before the filter members drop down opens. Return false to cancel the opening. + * Use ui.hierarchy for a reference to the hierarchy. + */ + filterDropDownOpening?: FilterDropDownOpeningEvent; + + /** + * Fired after the filter members drop down opens. + * Use ui.hierarchy for a reference to the hierarchy. + * Use ui.dropDownElement for a reference to the drop down. + */ + filterDropDownOpened?: FilterDropDownOpenedEvent; + + /** + * Fired after the filter members are loaded. + * Use ui.parent to get the parent node or the igTree instance in the initial load. + * Use ui.rootFilterMembers for a collection with the root filter members . + * Use ui.filterMembers for a collection with the newly loaded filter members. + */ + filterMembersLoaded?: FilterMembersLoadedEvent; + + /** + * Fired after the OK button in the filter members drop down is clicked. Return false to cancel the applying of the filters. + * Use ui.hierarchy for a reference to the hierarchy. + * Use ui.filterMembers for a collection with the selected filter members. If all filter members are selected the collection will be empty. + * Use ui.dropDownElement for a reference to the drop down. + */ + filterDropDownOk?: FilterDropDownOkEvent; + + /** + * Fired before the filter members drop down closes. Return false to cancel the closing. + * Use ui.hierarchy for a reference to the hierarchy. + * Use ui.dropDownElement for a reference to the drop down. + */ + filterDropDownClosing?: FilterDropDownClosingEvent; + + /** + * Fired after the filter members drop down closes. + * Use ui.hierarchy for a reference to the hierarchy. + */ + filterDropDownClosed?: FilterDropDownClosedEvent; + + /** + * Option for igPivotGrid + */ + [optionName: string]: any; +} +interface IgPivotGridMethods { + /** + * Returns the igGrid instance used to render the OLAP data. + */ + grid(): Object; + + /** + * Triggers an update on the data source and the igPivotGrid. + */ + updateGrid(): void; + + /** + * Expands a member from the data source and returns true if the expand succeeds. If the data source has a pending update, the method will return false. Note that igPivotGrid to will display the expanded result after the data source is updated. + * + * @param tupleLocation The name of the parent axis - 'columnAxis' or 'rowAxis'. + * @param tupleIndex The index of the containing tuple. This index should correspond to the position of the tuple in the original unsorted result of the data source. + * @param memberIndex The index of the member in the tuple. This index should correspond to the position of the member in the original unsorted result of the data source. + * @param shouldUpdate A flag indicating whether the data source should be updated after the expand. + */ + expandTupleMember(tupleLocation: string, tupleIndex: number, memberIndex: number, shouldUpdate?: boolean): boolean; + + /** + * Collapses a member from the data source and returns true if the collapse succeeds. If the data source has a pending update, the method will return false. Note that igPivotGrid to will display the expanded result after the data source is updated. + * + * @param tupleLocation The name of the parent axis - 'columnAxis' or 'rowAxis'. + * @param tupleIndex The index of the containing tuple. This index should correspond to the position of the tuple in the original unsorted result of the data source. + * @param memberIndex The index of the member in the tuple. This index should correspond to the position of the member in the original unsorted result of the data source. + * @param shouldUpdate A flag indicating whether the data source should be updated after the expand. + */ + collapseTupleMember(tupleLocation: string, tupleIndex: number, memberIndex: number, shouldUpdate?: boolean): boolean; + + /** + * Returns an array with the applied sort directions on the igPivotGrid's columns. The returned array contains objects with the following properties: + * memberNames: The names of the members in the tuple. + * tupleIndex: The index of the tuple on the column axis in the original unsorted result. + * sortDirection: The direction of the sort - ascending or descending. + */ + appliedColumnSortDirections(): any[]; + + /** + * Returns an array with the applied level sort direction items, which were used for the sorting of the header cells. The returned array contains objects with the following properties: + * levelUniqueName: Specifies the unique name of the level, which was sorted. + * sortDirection: The direction of the header sort - ascending or descending. + */ + appliedLevelSortDirections(): any[]; + + /** + * Destroy is part of the jQuery UI widget API and does the following: + * 1. Remove custom CSS classes that were added. + * 2. Unwrap any wrapping elements such as scrolling divs and other containers. + * 3. Unbind all events that were bound. + */ + destroy(): void; +} +interface JQuery { + data(propertyName: "igPivotGrid"): IgPivotGridMethods; +} + +interface JQuery { + igPivotGrid(methodName: "grid"): Object; + igPivotGrid(methodName: "updateGrid"): void; + igPivotGrid(methodName: "expandTupleMember", tupleLocation: string, tupleIndex: number, memberIndex: number, shouldUpdate?: boolean): boolean; + igPivotGrid(methodName: "collapseTupleMember", tupleLocation: string, tupleIndex: number, memberIndex: number, shouldUpdate?: boolean): boolean; + igPivotGrid(methodName: "appliedColumnSortDirections"): any[]; + igPivotGrid(methodName: "appliedLevelSortDirections"): any[]; + igPivotGrid(methodName: "destroy"): void; + + /** + */ + igPivotGrid(optionLiteral: 'option', optionName: "width"): string|number; + + /** + */ + igPivotGrid(optionLiteral: 'option', optionName: "width", optionValue: string|number): void; + + /** + * This is the total height of the grid. + */ + igPivotGrid(optionLiteral: 'option', optionName: "height"): string|number; + + /** + * This is the total height of the grid. + * + * @optionValue New value to be set. + */ + igPivotGrid(optionLiteral: 'option', optionName: "height", optionValue: string|number): void; + + /** + * An instance of $.ig.OlapXmlaDataSource or $.ig.OlapFlatDataSource. + */ + igPivotGrid(optionLiteral: 'option', optionName: "dataSource"): any; + + /** + * An instance of $.ig.OlapXmlaDataSource or $.ig.OlapFlatDataSource. + * + * @optionValue New value to be set. + */ + igPivotGrid(optionLiteral: 'option', optionName: "dataSource", optionValue: any): void; + + /** + * An object that will be used to create an instance of $.ig.OlapXmlaDataSource or $.ig.OlapFlatDataSource. + * The provided value must contain an object with settings for one of the data source types - xmlaOptions or flatDataOptions. + */ + igPivotGrid(optionLiteral: 'option', optionName: "dataSourceOptions"): IgPivotGridDataSourceOptions; + + /** + * An object that will be used to create an instance of $.ig.OlapXmlaDataSource or $.ig.OlapFlatDataSource. + * The provided value must contain an object with settings for one of the data source types - xmlaOptions or flatDataOptions. + * + * @optionValue New value to be set. + */ + igPivotGrid(optionLiteral: 'option', optionName: "dataSourceOptions", optionValue: IgPivotGridDataSourceOptions): void; + + /** + * Setting deferUpdate to true will not apply changes to the data source until the updateGrid method is called. + */ + igPivotGrid(optionLiteral: 'option', optionName: "deferUpdate"): boolean; + + /** + * Setting deferUpdate to true will not apply changes to the data source until the updateGrid method is called. + * + * @optionValue New value to be set. + */ + igPivotGrid(optionLiteral: 'option', optionName: "deferUpdate", optionValue: boolean): void; + + /** + * A boolean value indicating whether a parent in the columns is in front of its children. + * If set to true, the query set sorts members in a level in their natural order - child members immediately follow their parent members. + * If set to false the query set sorts the members in a level using a post-natural order. In other words, child members precede their parents. + */ + igPivotGrid(optionLiteral: 'option', optionName: "isParentInFrontForColumns"): boolean; + + /** + * A boolean value indicating whether a parent in the columns is in front of its children. + * If set to true, the query set sorts members in a level in their natural order - child members immediately follow their parent members. + * If set to false the query set sorts the members in a level using a post-natural order. In other words, child members precede their parents. + * + * @optionValue New value to be set. + */ + igPivotGrid(optionLiteral: 'option', optionName: "isParentInFrontForColumns", optionValue: boolean): void; + + /** + * A boolean value indicating whether a parent in the rows is in front of its children. + * If set to true, the query set sorts members in a level in their natural order - child members immediately follow their parent members. + * If set to false the query set sorts the members in a level using a post-natural order. In other words, child members precede their parents. + */ + igPivotGrid(optionLiteral: 'option', optionName: "isParentInFrontForRows"): boolean; + + /** + * A boolean value indicating whether a parent in the rows is in front of its children. + * If set to true, the query set sorts members in a level in their natural order - child members immediately follow their parent members. + * If set to false the query set sorts the members in a level using a post-natural order. In other words, child members precede their parents. + * + * @optionValue New value to be set. + */ + igPivotGrid(optionLiteral: 'option', optionName: "isParentInFrontForRows", optionValue: boolean): void; + + /** + * A boolean value indicating whether the column headers should be arranged for compact header layout i.e. each hierarchy is in a single row. + */ + igPivotGrid(optionLiteral: 'option', optionName: "compactColumnHeaders"): boolean; + + /** + * A boolean value indicating whether the column headers should be arranged for compact header layout i.e. each hierarchy is in a single row. + * + * @optionValue New value to be set. + */ + igPivotGrid(optionLiteral: 'option', optionName: "compactColumnHeaders", optionValue: boolean): void; + + /** + * A boolean value indicating whether the row headers should be arranged for compact header layout i.e. each hierarchy is in a single column. + */ + igPivotGrid(optionLiteral: 'option', optionName: "compactRowHeaders"): boolean; + + /** + * A boolean value indicating whether the row headers should be arranged for compact header layout i.e. each hierarchy is in a single column. + * + * @optionValue New value to be set. + */ + igPivotGrid(optionLiteral: 'option', optionName: "compactRowHeaders", optionValue: boolean): void; + + /** + * A value indicating whether the layout that row headers should be arranged. standard Each hierarchy in the rows is displayed in a separate column. The child members of a member in the rows are displayed on its right. + * superCompact Each hierarchy in the rows is displayed in a separate column. The child members of a member in the rows are displayed on above or below it (Depending on the isParentInFrontForRows setting). + * tree All hierarchies in the rows are displayed in a tree-like structure in a single column (The column's width is dependent on the defaultRowHEaderWidth, which can be set to "null" to enable the built-in auto-sizing functionality). + * + */ + igPivotGrid(optionLiteral: 'option', optionName: "rowHeadersLayout"): any; + + /** + * A value indicating whether the layout that row headers should be arranged. standard Each hierarchy in the rows is displayed in a separate column. The child members of a member in the rows are displayed on its right. + * superCompact Each hierarchy in the rows is displayed in a separate column. The child members of a member in the rows are displayed on above or below it (Depending on the isParentInFrontForRows setting). + * tree All hierarchies in the rows are displayed in a tree-like structure in a single column (The column's width is dependent on the defaultRowHEaderWidth, which can be set to "null" to enable the built-in auto-sizing functionality). + * + * + * @optionValue New value to be set. + */ + igPivotGrid(optionLiteral: 'option', optionName: "rowHeadersLayout", optionValue: any): void; + + /** + * The indentation for every level column when the compactColumnHeaders is set to true. + */ + igPivotGrid(optionLiteral: 'option', optionName: "compactColumnHeaderIndentation"): number; + + /** + * The indentation for every level column when the compactColumnHeaders is set to true. + * + * @optionValue New value to be set. + */ + igPivotGrid(optionLiteral: 'option', optionName: "compactColumnHeaderIndentation", optionValue: number): void; + + /** + * The indentation for every level row when the rowHeadersLayout is set to 'superCompact'. + */ + igPivotGrid(optionLiteral: 'option', optionName: "compactRowHeaderIndentation"): number; + + /** + * The indentation for every level row when the rowHeadersLayout is set to 'superCompact'. + * + * @optionValue New value to be set. + */ + igPivotGrid(optionLiteral: 'option', optionName: "compactRowHeaderIndentation", optionValue: number): void; + + /** + * Use it when you set rowHeadersLayout to "tree". This property will set a margin between the level's caption and the next level's (underlined text) caption. + */ + igPivotGrid(optionLiteral: 'option', optionName: "rowHeaderLinkGroupIndentation"): number; + + /** + * Use it when you set rowHeadersLayout to "tree". This property will set a margin between the level's caption and the next level's (underlined text) caption. + * + * @optionValue New value to be set. + */ + igPivotGrid(optionLiteral: 'option', optionName: "rowHeaderLinkGroupIndentation", optionValue: number): void; + + /** + * The indentation for the neighboring hierarchy's level row when the rowHeaderLayout is set to 'tree'. + */ + igPivotGrid(optionLiteral: 'option', optionName: "treeRowHeaderIndentation"): number; + + /** + * The indentation for the neighboring hierarchy's level row when the rowHeaderLayout is set to 'tree'. + * + * @optionValue New value to be set. + */ + igPivotGrid(optionLiteral: 'option', optionName: "treeRowHeaderIndentation", optionValue: number): void; + + /** + * Gets the width of the row headers. + */ + igPivotGrid(optionLiteral: 'option', optionName: "defaultRowHeaderWidth"): number; + + /** + * Sets the width of the row headers. + * + * @optionValue New value to be set. + */ + igPivotGrid(optionLiteral: 'option', optionName: "defaultRowHeaderWidth", optionValue: number): void; + + /** + * Enables sorting of the value cells in columns. + */ + igPivotGrid(optionLiteral: 'option', optionName: "allowSorting"): boolean; + + /** + * Enables sorting of the value cells in columns. + * + * @optionValue New value to be set. + */ + igPivotGrid(optionLiteral: 'option', optionName: "allowSorting", optionValue: boolean): void; + + /** + * Gets the default sort direction for the rows. + */ + igPivotGrid(optionLiteral: 'option', optionName: "firstSortDirection"): any; + + /** + * Sets the default sort direction for the rows. + * + * @optionValue New value to be set. + */ + igPivotGrid(optionLiteral: 'option', optionName: "firstSortDirection", optionValue: any): void; + + /** + * Enables sorting of the header cells in rows. + */ + igPivotGrid(optionLiteral: 'option', optionName: "allowHeaderRowsSorting"): boolean; + + /** + * Enables sorting of the header cells in rows. + * + * @optionValue New value to be set. + */ + igPivotGrid(optionLiteral: 'option', optionName: "allowHeaderRowsSorting", optionValue: boolean): void; + + /** + * Enables sorting of the header cells in columns. + */ + igPivotGrid(optionLiteral: 'option', optionName: "allowHeaderColumnsSorting"): boolean; + + /** + * Enables sorting of the header cells in columns. + * + * @optionValue New value to be set. + */ + igPivotGrid(optionLiteral: 'option', optionName: "allowHeaderColumnsSorting", optionValue: boolean): void; + + /** + * An array of level sort direction items, which predefine the sorted header cells. + */ + igPivotGrid(optionLiteral: 'option', optionName: "levelSortDirections"): IgPivotGridLevelSortDirection[]; + + /** + * An array of level sort direction items, which predefine the sorted header cells. + * + * @optionValue New value to be set. + */ + igPivotGrid(optionLiteral: 'option', optionName: "levelSortDirections", optionValue: IgPivotGridLevelSortDirection[]): void; + + /** + * Gets the default sort behavior for the levels if no sort behavior is specified in an item from the levelSortDirections option. + */ + igPivotGrid(optionLiteral: 'option', optionName: "defaultLevelSortBehavior"): string; + + /** + * Sets the default sort behavior for the levels if no sort behavior is specified in an item from the levelSortDirections option. + * + * @optionValue New value to be set. + */ + igPivotGrid(optionLiteral: 'option', optionName: "defaultLevelSortBehavior", optionValue: string): void; + + /** + * Gets the default sort direction for the levels if no sort direction is specified in an item from the levelSortDirections option. + */ + igPivotGrid(optionLiteral: 'option', optionName: "firstLevelSortDirection"): any; + + /** + * Sets the default sort direction for the levels if no sort direction is specified in an item from the levelSortDirections option. + * + * @optionValue New value to be set. + */ + igPivotGrid(optionLiteral: 'option', optionName: "firstLevelSortDirection", optionValue: any): void; + + /** + * Options specific to the igGrid that will render the pivot grid view. + */ + igPivotGrid(optionLiteral: 'option', optionName: "gridOptions"): IgPivotGridGridOptions; + + /** + * Options specific to the igGrid that will render the pivot grid view. + * + * @optionValue New value to be set. + */ + igPivotGrid(optionLiteral: 'option', optionName: "gridOptions", optionValue: IgPivotGridGridOptions): void; + + /** + * Settings for the drag and drop functionality of the igPivotGrid. + */ + igPivotGrid(optionLiteral: 'option', optionName: "dragAndDropSettings"): IgPivotGridDragAndDropSettings; + + /** + * Settings for the drag and drop functionality of the igPivotGrid. + * + * @optionValue New value to be set. + */ + igPivotGrid(optionLiteral: 'option', optionName: "dragAndDropSettings", optionValue: IgPivotGridDragAndDropSettings): void; + + /** + * Gets the parent for the drop downs. + */ + igPivotGrid(optionLiteral: 'option', optionName: "dropDownParent"): any; + + /** + * Sets the parent for the drop downs. + * + * @optionValue New value to be set. + */ + igPivotGrid(optionLiteral: 'option', optionName: "dropDownParent", optionValue: any): void; + + /** + * Disable the drag and drop for the rows drop area and the ability to use filtering and remove items from it. + */ + igPivotGrid(optionLiteral: 'option', optionName: "disableRowsDropArea"): boolean; + + /** + * Disable the drag and drop for the rows drop area and the ability to use filtering and remove items from it. + * + * @optionValue New value to be set. + */ + igPivotGrid(optionLiteral: 'option', optionName: "disableRowsDropArea", optionValue: boolean): void; + + /** + * Disable the drag and drop for the columns drop area and the ability to use filtering and remove items from it. + */ + igPivotGrid(optionLiteral: 'option', optionName: "disableColumnsDropArea"): boolean; + + /** + * Disable the drag and drop for the columns drop area and the ability to use filtering and remove items from it. + * + * @optionValue New value to be set. + */ + igPivotGrid(optionLiteral: 'option', optionName: "disableColumnsDropArea", optionValue: boolean): void; + + /** + * Disable the drag and drop for the measures drop area and the ability to use filtering and remove items from it. + */ + igPivotGrid(optionLiteral: 'option', optionName: "disableMeasuresDropArea"): boolean; + + /** + * Disable the drag and drop for the measures drop area and the ability to use filtering and remove items from it. + * + * @optionValue New value to be set. + */ + igPivotGrid(optionLiteral: 'option', optionName: "disableMeasuresDropArea", optionValue: boolean): void; + + /** + * Disable the drag and drop for the filters drop area and the ability to use filtering and remove items from it. + */ + igPivotGrid(optionLiteral: 'option', optionName: "disableFiltersDropArea"): boolean; + + /** + * Disable the drag and drop for the filters drop area and the ability to use filtering and remove items from it. + * + * @optionValue New value to be set. + */ + igPivotGrid(optionLiteral: 'option', optionName: "disableFiltersDropArea", optionValue: boolean): void; + + /** + * Hide the rows drop area. + */ + igPivotGrid(optionLiteral: 'option', optionName: "hideRowsDropArea"): boolean; + + /** + * Hide the rows drop area. + * + * @optionValue New value to be set. + */ + igPivotGrid(optionLiteral: 'option', optionName: "hideRowsDropArea", optionValue: boolean): void; + + /** + * Hide the columns drop area. + */ + igPivotGrid(optionLiteral: 'option', optionName: "hideColumnsDropArea"): boolean; + + /** + * Hide the columns drop area. + * + * @optionValue New value to be set. + */ + igPivotGrid(optionLiteral: 'option', optionName: "hideColumnsDropArea", optionValue: boolean): void; + + /** + * Hide the measures drop area. + */ + igPivotGrid(optionLiteral: 'option', optionName: "hideMeasuresDropArea"): boolean; + + /** + * Hide the measures drop area. + * + * @optionValue New value to be set. + */ + igPivotGrid(optionLiteral: 'option', optionName: "hideMeasuresDropArea", optionValue: boolean): void; + + /** + * Hide the filters drop area. + */ + igPivotGrid(optionLiteral: 'option', optionName: "hideFiltersDropArea"): boolean; + + /** + * Hide the filters drop area. + * + * @optionValue New value to be set. + */ + igPivotGrid(optionLiteral: 'option', optionName: "hideFiltersDropArea", optionValue: boolean): void; + + /** + * A function that will be called to determine if an item can be moved in or dropped on an area of the pivot grid. + * paramType="string" The location where the item will be moved - igPivotGrid, igPivotDataSelector, filters, rows, columns or measures. + * paramType="string" The type of the item - Hierarchy, Measure or MeasureList. + * paramType="string" The unique name of the item. + * returnType="bool" The function must return true if the item should be accepted. + */ + igPivotGrid(optionLiteral: 'option', optionName: "customMoveValidation"): Function; + + /** + * A function that will be called to determine if an item can be moved in or dropped on an area of the pivot grid. + * paramType="string" The location where the item will be moved - igPivotGrid, igPivotDataSelector, filters, rows, columns or measures. + * paramType="string" The type of the item - Hierarchy, Measure or MeasureList. + * paramType="string" The unique name of the item. + * returnType="bool" The function must return true if the item should be accepted. + * + * @optionValue New value to be set. + */ + igPivotGrid(optionLiteral: 'option', optionName: "customMoveValidation", optionValue: Function): void; + + /** + * Fired after the data source has initialized. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the pivot grid. + * Use ui.dataSource to get a reference to the data source. + * Use ui.error to see if an error has occured during initialization. + * Use ui.metadataTreeRoot to get a reference to the root of the data source metatadata root item. + */ + igPivotGrid(optionLiteral: 'option', optionName: "dataSourceInitialized"): DataSourceInitializedEvent; + + /** + * Fired after the data source has initialized. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the pivot grid. + * Use ui.dataSource to get a reference to the data source. + * Use ui.error to see if an error has occured during initialization. + * Use ui.metadataTreeRoot to get a reference to the root of the data source metatadata root item. + * + * @optionValue New value to be set. + */ + igPivotGrid(optionLiteral: 'option', optionName: "dataSourceInitialized", optionValue: DataSourceInitializedEvent): void; + + /** + * Fired after the data source has updated. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the pivot grid. + * Use ui.dataSource to get a reference to the data source. + * Use ui.error to see if an error has occured during update. + * Use ui.result to get the result of the update operation. + */ + igPivotGrid(optionLiteral: 'option', optionName: "dataSourceUpdated"): DataSourceUpdatedEvent; + + /** + * Fired after the data source has updated. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the pivot grid. + * Use ui.dataSource to get a reference to the data source. + * Use ui.error to see if an error has occured during update. + * Use ui.result to get the result of the update operation. + * + * @optionValue New value to be set. + */ + igPivotGrid(optionLiteral: 'option', optionName: "dataSourceUpdated", optionValue: DataSourceUpdatedEvent): void; + + /** + * Event fired after the headers have been rendered. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the pivot grid. + * Use ui.grid to get a reference to the igGrid widget, which holds the headers. + * Use ui.table to get a reference to the headers table DOM element. + */ + igPivotGrid(optionLiteral: 'option', optionName: "pivotGridHeadersRendered"): PivotGridHeadersRenderedEvent; + + /** + * Event fired after the headers have been rendered. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the pivot grid. + * Use ui.grid to get a reference to the igGrid widget, which holds the headers. + * Use ui.table to get a reference to the headers table DOM element. + * + * @optionValue Define event handler function. + */ + igPivotGrid(optionLiteral: 'option', optionName: "pivotGridHeadersRendered", optionValue: PivotGridHeadersRenderedEvent): void; + + /** + * Event fired after the whole grid widget has been rendered (including headers, footers, etc.). + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the pivot grid. + * Use ui.grid to get reference to the igGrid widget, which represents the data. + */ + igPivotGrid(optionLiteral: 'option', optionName: "pivotGridRendered"): PivotGridRenderedEvent; + + /** + * Event fired after the whole grid widget has been rendered (including headers, footers, etc.). + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the pivot grid. + * Use ui.grid to get reference to the igGrid widget, which represents the data. + * + * @optionValue Define event handler function. + */ + igPivotGrid(optionLiteral: 'option', optionName: "pivotGridRendered", optionValue: PivotGridRenderedEvent): void; + + /** + * Fired before the expand of the tuple member. + * Function takes arguments evt and ui. Return false to cancel the expanding. + * Use ui.owner to get a reference to the pivot grid. + * Use ui.dataSource to get a reference to the data source. + * Use ui.axisName to get the name of axis, which holds the member and the tuple. + * Use ui.tupleIndex to get the index of the tuple in the axis. + * Use ui.memberIndex to get the index of the member in the tuple. + */ + igPivotGrid(optionLiteral: 'option', optionName: "tupleMemberExpanding"): TupleMemberExpandingEvent; + + /** + * Fired before the expand of the tuple member. + * Function takes arguments evt and ui. Return false to cancel the expanding. + * Use ui.owner to get a reference to the pivot grid. + * Use ui.dataSource to get a reference to the data source. + * Use ui.axisName to get the name of axis, which holds the member and the tuple. + * Use ui.tupleIndex to get the index of the tuple in the axis. + * Use ui.memberIndex to get the index of the member in the tuple. + * + * @optionValue New value to be set. + */ + igPivotGrid(optionLiteral: 'option', optionName: "tupleMemberExpanding", optionValue: TupleMemberExpandingEvent): void; + + /** + * Fired after the expand of the tuple member. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the pivot grid. + * Use ui.dataSource to get a reference to the data source. + * Use ui.axisName to get the name of axis, which holds the member and the tuple. + * Use ui.tupleIndex to get the index of the tuple in the axis. + * Use ui.memberIndex to get the index of the member in the tuple. + */ + igPivotGrid(optionLiteral: 'option', optionName: "tupleMemberExpanded"): TupleMemberExpandedEvent; + + /** + * Fired after the expand of the tuple member. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the pivot grid. + * Use ui.dataSource to get a reference to the data source. + * Use ui.axisName to get the name of axis, which holds the member and the tuple. + * Use ui.tupleIndex to get the index of the tuple in the axis. + * Use ui.memberIndex to get the index of the member in the tuple. + * + * @optionValue New value to be set. + */ + igPivotGrid(optionLiteral: 'option', optionName: "tupleMemberExpanded", optionValue: TupleMemberExpandedEvent): void; + + /** + * Fired before the collapse of the tuple member. + * Function takes arguments evt and ui. Return false to cancel the collapsing. + * Use ui.owner to get a reference to the pivot grid. + * Use ui.dataSource to get a reference to the data source. + * Use ui.axisName to get the name of axis, which holds the member and the tuple. + * Use ui.tupleIndex to get the index of the tuple in the axis. + * Use ui.memberIndex to get the index of the member in the tuple. + */ + igPivotGrid(optionLiteral: 'option', optionName: "tupleMemberCollapsing"): TupleMemberCollapsingEvent; + + /** + * Fired before the collapse of the tuple member. + * Function takes arguments evt and ui. Return false to cancel the collapsing. + * Use ui.owner to get a reference to the pivot grid. + * Use ui.dataSource to get a reference to the data source. + * Use ui.axisName to get the name of axis, which holds the member and the tuple. + * Use ui.tupleIndex to get the index of the tuple in the axis. + * Use ui.memberIndex to get the index of the member in the tuple. + * + * @optionValue New value to be set. + */ + igPivotGrid(optionLiteral: 'option', optionName: "tupleMemberCollapsing", optionValue: TupleMemberCollapsingEvent): void; + + /** + * Fired after the collapse of the tuple member. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the pivot grid. + * Use ui.dataSource to get a reference to the data source. + * Use ui.axisName to get the name of axis, which holds the member and the tuple. + * Use ui.tupleIndex to get the index of the tuple in the axis. + * Use ui.memberIndex to get the index of the member in the tuple. + */ + igPivotGrid(optionLiteral: 'option', optionName: "tupleMemberCollapsed"): TupleMemberCollapsedEvent; + + /** + * Fired after the collapse of the tuple member. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the pivot grid. + * Use ui.dataSource to get a reference to the data source. + * Use ui.axisName to get the name of axis, which holds the member and the tuple. + * Use ui.tupleIndex to get the index of the tuple in the axis. + * Use ui.memberIndex to get the index of the member in the tuple. + * + * @optionValue New value to be set. + */ + igPivotGrid(optionLiteral: 'option', optionName: "tupleMemberCollapsed", optionValue: TupleMemberCollapsedEvent): void; + + /** + * Fired before the sorting of the columns. + * Function takes arguments evt and ui. Return false to cancel the sorting. + * Use ui.owner to get a reference to the pivot grid. + * Use ui.sortDirections to get an array of the tuple indices and sort directions that will be used. + */ + igPivotGrid(optionLiteral: 'option', optionName: "sorting"): SortingEvent; + + /** + * Fired before the sorting of the columns. + * Function takes arguments evt and ui. Return false to cancel the sorting. + * Use ui.owner to get a reference to the pivot grid. + * Use ui.sortDirections to get an array of the tuple indices and sort directions that will be used. + * + * @optionValue New value to be set. + */ + igPivotGrid(optionLiteral: 'option', optionName: "sorting", optionValue: SortingEvent): void; + + /** + * Fired after the sorting of the columns. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the pivot grid. + * Use ui.sortDirections to get an array of the tuple indices and sort directions that were passed to the table view. + * Use ui.appliedSortDirections to get an array of the tuple indices and sort directions that were actually applied to the table view. + */ + igPivotGrid(optionLiteral: 'option', optionName: "sorted"): SortedEvent; + + /** + * Fired after the sorting of the columns. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the pivot grid. + * Use ui.sortDirections to get an array of the tuple indices and sort directions that were passed to the table view. + * Use ui.appliedSortDirections to get an array of the tuple indices and sort directions that were actually applied to the table view. + * + * @optionValue New value to be set. + */ + igPivotGrid(optionLiteral: 'option', optionName: "sorted", optionValue: SortedEvent): void; + + /** + * Fired before the sorting of the headers. + * Function takes arguments evt and ui. Return false to cancel the sorting. + * Use ui.owner to get a reference to the pivot grid. + * Use ui.levelSortDirections to get an array of the level names and sort directions that will be used. + */ + igPivotGrid(optionLiteral: 'option', optionName: "headersSorting"): HeadersSortingEvent; + + /** + * Fired before the sorting of the headers. + * Function takes arguments evt and ui. Return false to cancel the sorting. + * Use ui.owner to get a reference to the pivot grid. + * Use ui.levelSortDirections to get an array of the level names and sort directions that will be used. + * + * @optionValue New value to be set. + */ + igPivotGrid(optionLiteral: 'option', optionName: "headersSorting", optionValue: HeadersSortingEvent): void; + + /** + * Fired after the sorting of the headers. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the pivot grid. + * Use ui.levelSortDirections to get an array of the level names and sort directions that were used. + * Use ui.appliedLevelSortDirections to get an array of the level names and sort directions that were actually applied to the table view. + */ + igPivotGrid(optionLiteral: 'option', optionName: "headersSorted"): HeadersSortedEvent; + + /** + * Fired after the sorting of the headers. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the pivot grid. + * Use ui.levelSortDirections to get an array of the level names and sort directions that were used. + * Use ui.appliedLevelSortDirections to get an array of the level names and sort directions that were actually applied to the table view. + * + * @optionValue New value to be set. + */ + igPivotGrid(optionLiteral: 'option', optionName: "headersSorted", optionValue: HeadersSortedEvent): void; + + /** + * Fired on drag start. Return false to cancel the dragging. + * Use ui.metadatato get a reference to the data. + * Use ui.helper to get a reference to the helper. + * Use ui.offset to get a reference to the offset. + * Use ui.originalPosition to get a reference to the original position of the draggable element. + * Use ui.position to get a reference to the current position of the draggable element. + */ + igPivotGrid(optionLiteral: 'option', optionName: "dragStart"): DragStartEvent; + + /** + * Fired on drag start. Return false to cancel the dragging. + * Use ui.metadatato get a reference to the data. + * Use ui.helper to get a reference to the helper. + * Use ui.offset to get a reference to the offset. + * Use ui.originalPosition to get a reference to the original position of the draggable element. + * Use ui.position to get a reference to the current position of the draggable element. + * + * @optionValue New value to be set. + */ + igPivotGrid(optionLiteral: 'option', optionName: "dragStart", optionValue: DragStartEvent): void; + + /** + * Fired on drag. Return false to cancel the drag. + * Use ui.metadatato get a reference to the data. + * Use ui.helper to get a reference to the helper. + * Use ui.offset to get a reference to the offset. + * Use ui.originalPosition to get a reference to the original position of the draggable element. + * Use ui.position to get a reference to the current position of the draggable element. + */ + igPivotGrid(optionLiteral: 'option', optionName: "drag"): DragEvent; + + /** + * Fired on drag. Return false to cancel the drag. + * Use ui.metadatato get a reference to the data. + * Use ui.helper to get a reference to the helper. + * Use ui.offset to get a reference to the offset. + * Use ui.originalPosition to get a reference to the original position of the draggable element. + * Use ui.position to get a reference to the current position of the draggable element. + * + * @optionValue New value to be set. + */ + igPivotGrid(optionLiteral: 'option', optionName: "drag", optionValue: DragEvent): void; + + /** + * Fired on drag stop. + * Use ui.helper to get a reference to the helper. + * Use ui.offset to get a reference to the offset. + * Use ui.originalPosition to get a reference to the original position of the draggable element. + * Use ui.position to get a reference to the current position of the draggable element. + */ + igPivotGrid(optionLiteral: 'option', optionName: "dragStop"): DragStopEvent; + + /** + * Fired on drag stop. + * Use ui.helper to get a reference to the helper. + * Use ui.offset to get a reference to the offset. + * Use ui.originalPosition to get a reference to the original position of the draggable element. + * Use ui.position to get a reference to the current position of the draggable element. + * + * @optionValue New value to be set. + */ + igPivotGrid(optionLiteral: 'option', optionName: "dragStop", optionValue: DragStopEvent): void; + + /** + * Fired before a metadata item drop. Return false to cancel the drop. + * Use ui.targetElement for a reference to the drop target. + * Use ui.draggedElement for a reference to the metadata item element. + * Use ui.metadatato get a reference to the data. + * Use ui.metadataIndex to get the index at which the metadata will be inserted. + * Use ui.helper to get a reference to the helper. + * Use ui.offset to get a reference to the offset. + * Use ui.position to get a reference to the current position of the draggable element. + */ + igPivotGrid(optionLiteral: 'option', optionName: "metadataDropping"): MetadataDroppingEvent; + + /** + * Fired before a metadata item drop. Return false to cancel the drop. + * Use ui.targetElement for a reference to the drop target. + * Use ui.draggedElement for a reference to the metadata item element. + * Use ui.metadatato get a reference to the data. + * Use ui.metadataIndex to get the index at which the metadata will be inserted. + * Use ui.helper to get a reference to the helper. + * Use ui.offset to get a reference to the offset. + * Use ui.position to get a reference to the current position of the draggable element. + * + * @optionValue New value to be set. + */ + igPivotGrid(optionLiteral: 'option', optionName: "metadataDropping", optionValue: MetadataDroppingEvent): void; + + /** + * Fired after a metadata item drop. + * Use ui.targetElement for a reference to the drop target. + * Use ui.draggedElement for a reference to the dragged element. + * Use ui.metadatato get a reference to the data. + * Use ui.metadataIndex to get the index at which the metadata is inserted. + * Use ui.helper to get a reference to the helper. + * Use ui.offset to get a reference to the offset. + * Use ui.position to get a reference to the current position of the draggable element. + */ + igPivotGrid(optionLiteral: 'option', optionName: "metadataDropped"): MetadataDroppedEvent; + + /** + * Fired after a metadata item drop. + * Use ui.targetElement for a reference to the drop target. + * Use ui.draggedElement for a reference to the dragged element. + * Use ui.metadatato get a reference to the data. + * Use ui.metadataIndex to get the index at which the metadata is inserted. + * Use ui.helper to get a reference to the helper. + * Use ui.offset to get a reference to the offset. + * Use ui.position to get a reference to the current position of the draggable element. + * + * @optionValue New value to be set. + */ + igPivotGrid(optionLiteral: 'option', optionName: "metadataDropped", optionValue: MetadataDroppedEvent): void; + + /** + * Fired before a metadata item is removed when the user clicks the close icon. Return false to cancel the removing. + * Use ui.targetElement for a reference to the dragged element. + * Use ui.metadatato get a reference to the data. + */ + igPivotGrid(optionLiteral: 'option', optionName: "metadataRemoving"): MetadataRemovingEvent; + + /** + * Fired before a metadata item is removed when the user clicks the close icon. Return false to cancel the removing. + * Use ui.targetElement for a reference to the dragged element. + * Use ui.metadatato get a reference to the data. + * + * @optionValue New value to be set. + */ + igPivotGrid(optionLiteral: 'option', optionName: "metadataRemoving", optionValue: MetadataRemovingEvent): void; + + /** + * Fired after a metadata item is removed when the user clicks the close icon. + * Use ui.metadatato get a reference to the data. + */ + igPivotGrid(optionLiteral: 'option', optionName: "metadataRemoved"): MetadataRemovedEvent; + + /** + * Fired after a metadata item is removed when the user clicks the close icon. + * Use ui.metadatato get a reference to the data. + * + * @optionValue New value to be set. + */ + igPivotGrid(optionLiteral: 'option', optionName: "metadataRemoved", optionValue: MetadataRemovedEvent): void; + + /** + * Fired before the filter members drop down opens. Return false to cancel the opening. + * Use ui.hierarchy for a reference to the hierarchy. + */ + igPivotGrid(optionLiteral: 'option', optionName: "filterDropDownOpening"): FilterDropDownOpeningEvent; + + /** + * Fired before the filter members drop down opens. Return false to cancel the opening. + * Use ui.hierarchy for a reference to the hierarchy. + * + * @optionValue New value to be set. + */ + igPivotGrid(optionLiteral: 'option', optionName: "filterDropDownOpening", optionValue: FilterDropDownOpeningEvent): void; + + /** + * Fired after the filter members drop down opens. + * Use ui.hierarchy for a reference to the hierarchy. + * Use ui.dropDownElement for a reference to the drop down. + */ + igPivotGrid(optionLiteral: 'option', optionName: "filterDropDownOpened"): FilterDropDownOpenedEvent; + + /** + * Fired after the filter members drop down opens. + * Use ui.hierarchy for a reference to the hierarchy. + * Use ui.dropDownElement for a reference to the drop down. + * + * @optionValue New value to be set. + */ + igPivotGrid(optionLiteral: 'option', optionName: "filterDropDownOpened", optionValue: FilterDropDownOpenedEvent): void; + + /** + * Fired after the filter members are loaded. + * Use ui.parent to get the parent node or the igTree instance in the initial load. + * Use ui.rootFilterMembers for a collection with the root filter members . + * Use ui.filterMembers for a collection with the newly loaded filter members. + */ + igPivotGrid(optionLiteral: 'option', optionName: "filterMembersLoaded"): FilterMembersLoadedEvent; + + /** + * Fired after the filter members are loaded. + * Use ui.parent to get the parent node or the igTree instance in the initial load. + * Use ui.rootFilterMembers for a collection with the root filter members . + * Use ui.filterMembers for a collection with the newly loaded filter members. + * + * @optionValue New value to be set. + */ + igPivotGrid(optionLiteral: 'option', optionName: "filterMembersLoaded", optionValue: FilterMembersLoadedEvent): void; + + /** + * Fired after the OK button in the filter members drop down is clicked. Return false to cancel the applying of the filters. + * Use ui.hierarchy for a reference to the hierarchy. + * Use ui.filterMembers for a collection with the selected filter members. If all filter members are selected the collection will be empty. + * Use ui.dropDownElement for a reference to the drop down. + */ + igPivotGrid(optionLiteral: 'option', optionName: "filterDropDownOk"): FilterDropDownOkEvent; + + /** + * Fired after the OK button in the filter members drop down is clicked. Return false to cancel the applying of the filters. + * Use ui.hierarchy for a reference to the hierarchy. + * Use ui.filterMembers for a collection with the selected filter members. If all filter members are selected the collection will be empty. + * Use ui.dropDownElement for a reference to the drop down. + * + * @optionValue New value to be set. + */ + igPivotGrid(optionLiteral: 'option', optionName: "filterDropDownOk", optionValue: FilterDropDownOkEvent): void; + + /** + * Fired before the filter members drop down closes. Return false to cancel the closing. + * Use ui.hierarchy for a reference to the hierarchy. + * Use ui.dropDownElement for a reference to the drop down. + */ + igPivotGrid(optionLiteral: 'option', optionName: "filterDropDownClosing"): FilterDropDownClosingEvent; + + /** + * Fired before the filter members drop down closes. Return false to cancel the closing. + * Use ui.hierarchy for a reference to the hierarchy. + * Use ui.dropDownElement for a reference to the drop down. + * + * @optionValue New value to be set. + */ + igPivotGrid(optionLiteral: 'option', optionName: "filterDropDownClosing", optionValue: FilterDropDownClosingEvent): void; + + /** + * Fired after the filter members drop down closes. + * Use ui.hierarchy for a reference to the hierarchy. + */ + igPivotGrid(optionLiteral: 'option', optionName: "filterDropDownClosed"): FilterDropDownClosedEvent; + + /** + * Fired after the filter members drop down closes. + * Use ui.hierarchy for a reference to the hierarchy. + * + * @optionValue New value to be set. + */ + igPivotGrid(optionLiteral: 'option', optionName: "filterDropDownClosed", optionValue: FilterDropDownClosedEvent): void; + igPivotGrid(options: IgPivotGrid): JQuery; + igPivotGrid(optionLiteral: 'option', optionName: string): any; + igPivotGrid(optionLiteral: 'option', options: IgPivotGrid): JQuery; + igPivotGrid(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igPivotGrid(methodName: string, ...methodParams: any[]): any; +} +interface IgPivotViewDataSourceOptionsXmlaOptionsRequestOptions { + /** + * The value is applied to XmlHttpRequest.withCredentials if supported by the user agent. + * Setting this property to true will allow IE8/IE9 to make authenticated cross-origin requests to tusted domains through XmlHttpRequest instead of XDomainRequest + * and will prompt the user for credentials. + */ + withCredentials?: boolean; + + /** + * A callback to be invoked right before the request is send to the server. Extends beforeSend callback of jQuery.ajax’s options object. + */ + beforeSend?: Function; + + /** + * Option for IgPivotViewDataSourceOptionsXmlaOptionsRequestOptions + */ + [optionName: string]: any; +} + +interface IgPivotViewDataSourceOptionsXmlaOptionsMdxSettings { + /** + * Optional="true" a value indicating whether a NON EMPTY clause is present on ROWS axis. Default value is true + */ + nonEmptyOnRows?: boolean; + + /** + * Optional="true" a value indicating whether a NON EMPTY clause is present on COLUMNS axis. Default value is true + */ + nonEmptyOnColumns?: boolean; + + /** + * Optional="true" a value indicating whether a members' set expressions on ROWS axis should be wrapped with AddCalculatedMembers MDX method. Default value is true + */ + addCalculatedMembersOnRows?: boolean; + + /** + * Optional="true" a value indicating whether a members' set expressions on COLUMNS axis should be wrapped with AddCalculatedMembers MDX method. Default value is true + */ + addCalculatedMembersOnColumns?: boolean; + + /** + * Optional="true" a string array with the names of intrinsic non-context sensitive member properties applied on ROWS axis. By defult CHILDREN_CARDINALITY and PARENT_UNIQUE_NAME properties are always added to DIMENSION PROPERTIES + */ + dimensionPropertiesOnRows?: any[]; + + /** + * Optional="true" a string array with the names of intrinsic non-context sensitive member properties applied on COLUMNS axis. By defult CHILDREN_CARDINALITY and PARENT_UNIQUE_NAME properties are always added to DIMENSION PROPERTIES + */ + dimensionPropertiesOnColumns?: any[]; + + /** + * Option for IgPivotViewDataSourceOptionsXmlaOptionsMdxSettings + */ + [optionName: string]: any; +} + +interface IgPivotViewDataSourceOptionsXmlaOptions { + /** + * Optional="false" The URL of the XMLA server. + */ + serverUrl?: string; + + /** + * The catalog name. + */ + catalog?: string; + + /** + * The name of the cube in the data source. + */ + cube?: string; + + /** + * The name of the measure group in the data source. + */ + measureGroup?: string; + + /** + * An object containing information about how the request to the XMLA server should be processed. + */ + requestOptions?: IgPivotViewDataSourceOptionsXmlaOptionsRequestOptions; + + /** + * Enables/disables caching of the XMLA result object. + */ + enableResultCache?: boolean; + + /** + * Additional properties sent with every discover request. + * The object is treated as a key/value store where each property name is used as the key and the property value as the value. + */ + discoverProperties?: any; + + /** + * Additional properties sent with every execute request. + * The object is treated as a key/value store where each property name is used as the key and the property value as the value. + */ + executeProperties?: any; + + /** + * Optional="true" a javascript object containing information about how the request to the xmla server should be processed + */ + mdxSettings?: IgPivotViewDataSourceOptionsXmlaOptionsMdxSettings; + + /** + * Option for IgPivotViewDataSourceOptionsXmlaOptions + */ + [optionName: string]: any; +} + +interface IgPivotViewDataSourceOptionsFlatDataOptionsMetadataCubeMeasuresDimensionMeasure { + /** + * Optional="false" A unique name for the measure. + */ + name?: string; + + /** + * A caption for the measure. + */ + caption?: string; + + /** + * Optional="false" An aggregator function called when each cell is evaluated. + * Returns a value for the cell. If the returned value is null, no cell will be created in for the data source result. + */ + aggregator?: Function; + + /** + * The path used when displaying the measure in the user interface. Nested folders are indicated by a backslash (\). + */ + displayFolder?: string; + + /** + * Option for IgPivotViewDataSourceOptionsFlatDataOptionsMetadataCubeMeasuresDimensionMeasure + */ + [optionName: string]: any; +} + +interface IgPivotViewDataSourceOptionsFlatDataOptionsMetadataCubeMeasuresDimension { + /** + * A unique name for the measures dimension. + * The default value is "Measures". This name is used to create the names of dimensions using the following pattern: + * [].[] + */ + name?: string; + + /** + * A caption for the measures dimension. + * The default value is "Measures". + */ + caption?: string; + + /** + * An array of measure metadata objects. + */ + measures?: IgPivotViewDataSourceOptionsFlatDataOptionsMetadataCubeMeasuresDimensionMeasure[]; + + /** + * Option for IgPivotViewDataSourceOptionsFlatDataOptionsMetadataCubeMeasuresDimension + */ + [optionName: string]: any; +} + +interface IgPivotViewDataSourceOptionsFlatDataOptionsMetadataCubeDimensionHierarchieLevel { + /** + * Optional="false" A name for the level. + * The unique name of the level is formed using the following pattern: + * {}.[] + */ + name?: string; + + /** + * A caption for the level. + */ + caption?: string; + + /** + * A function called for each item of the data source array when level members are created. + * Based on the item parameter the function should return a value that will form the $.ig.Member’s name and caption. + */ + memberProvider?: Function; + + /** + * Option for IgPivotViewDataSourceOptionsFlatDataOptionsMetadataCubeDimensionHierarchieLevel + */ + [optionName: string]: any; +} + +interface IgPivotViewDataSourceOptionsFlatDataOptionsMetadataCubeDimensionHierarchie { + /** + * Optional="false" A name for the hierarchy. + * The unique name of the hierarchy is formed using the following pattern: + * [].[] + */ + name?: string; + + /** + * A caption for the hierarchy. + */ + caption?: string; + + /** + * The path to be used when displaying the hierarchy in the user interface. + * Nested folders are indicated by a backslash (\). + * The folder hierarchy will appear under parent dimension node. + */ + displayFolder?: string; + + /** + * An array of level metadata objects. + */ + levels?: IgPivotViewDataSourceOptionsFlatDataOptionsMetadataCubeDimensionHierarchieLevel[]; + + /** + * Option for IgPivotViewDataSourceOptionsFlatDataOptionsMetadataCubeDimensionHierarchie + */ + [optionName: string]: any; +} + +interface IgPivotViewDataSourceOptionsFlatDataOptionsMetadataCubeDimension { + /** + * Optional="false" A unique name for the dimension. + */ + name?: string; + + /** + * A caption for the dimension. + */ + caption?: string; + + /** + * An array of hierarchy metadata objects. + */ + hierarchies?: IgPivotViewDataSourceOptionsFlatDataOptionsMetadataCubeDimensionHierarchie[]; + + /** + * Option for IgPivotViewDataSourceOptionsFlatDataOptionsMetadataCubeDimension + */ + [optionName: string]: any; +} + +interface IgPivotViewDataSourceOptionsFlatDataOptionsMetadataCube { + /** + * Optional="false" A unique name for the cube. + */ + name?: string; + + /** + * A caption for the cube. + */ + caption?: string; + + /** + * An object providing information about the measures' root node. + */ + measuresDimension?: IgPivotViewDataSourceOptionsFlatDataOptionsMetadataCubeMeasuresDimension; + + /** + * An array of dimension metadata objects. + */ + dimensions?: IgPivotViewDataSourceOptionsFlatDataOptionsMetadataCubeDimension[]; + + /** + * Option for IgPivotViewDataSourceOptionsFlatDataOptionsMetadataCube + */ + [optionName: string]: any; +} + +interface IgPivotViewDataSourceOptionsFlatDataOptionsMetadata { + /** + * Optional="false" Metadata used for the creation of the cube. + */ + cube?: IgPivotViewDataSourceOptionsFlatDataOptionsMetadataCube; + + /** + * Option for IgPivotViewDataSourceOptionsFlatDataOptionsMetadata + */ + [optionName: string]: any; +} + +interface IgPivotViewDataSourceOptionsFlatDataOptions { + /** + * Specifies any valid data source accepted by $.ig.DataSource, or an instance of an $.ig.DataSource itself. + */ + dataSource?: any; + + /** + * Specifies a remote URL accepted by $.ig.DataSource in order to request data from it. + */ + dataSourceUrl?: string; + + /** + * Explicitly set data source type (such as "json"). Please refer to the documentation of $.ig.DataSource and its type property. + */ + dataSourceType?: string; + + /** + * See $.ig.DataSource. + * string Specifies the name of the property in which data records are held if the response is wrapped. + * null Option is ignored. + */ + responseDataKey?: string; + + /** + * String Explicitly set data source type (such as "json"). Please refer to the documentation of $.ig.DataSource and its type property. + * null Option is ignored. + */ + responseDataType?: string; + + /** + * Optional="false" An object containing processing instructions for the $.ig.DataSource data. + */ + metadata?: IgPivotViewDataSourceOptionsFlatDataOptionsMetadata; + + /** + * Option for IgPivotViewDataSourceOptionsFlatDataOptions + */ + [optionName: string]: any; +} + +interface IgPivotViewDataSourceOptions { + /** + * Settings for creating an instance of $.ig.OlapXmlaDataSource. + */ + xmlaOptions?: IgPivotViewDataSourceOptionsXmlaOptions; + + /** + * Settings for creating an instance of $.ig.OlapFlatDataSource. + */ + flatDataOptions?: IgPivotViewDataSourceOptionsFlatDataOptions; + + /** + * A list of measure names separated by comma (,). These will be the measures of the data source. + */ + measures?: string; + + /** + * A list of hierarchy names separated by comma (,). These will be hierarchies in the filters of the data source. + */ + filters?: string; + + /** + * A list of hierarchy names separated by comma (,). These will be the hierarchies in the rows of the data source. + */ + rows?: string; + + /** + * A list of hierarchy names separated by comma (,). These will be the hierarchies in the columns of the data source. + */ + columns?: string; + + /** + * Option for IgPivotViewDataSourceOptions + */ + [optionName: string]: any; +} + +interface IgPivotViewPivotGridOptionsLevelSortDirection { + /** + * Specifies the unique name of the level, which will be sorted. + */ + levelUniqueName?: string; + + /** + * optional="true" Specifies the sort direction. If no direction is specified,the level is going to be sorted in the direction specified by the firstLevelSortDirection option. + * + */ + sortDirection?: any; + + /** + * Option for IgPivotViewPivotGridOptionsLevelSortDirection + */ + [optionName: string]: any; +} + +interface IgPivotViewPivotGridOptionsGridOptionsFeatures { + /** + * Option for IgPivotViewPivotGridOptionsGridOptionsFeatures + */ + [optionName: string]: any; +} + +interface IgPivotViewPivotGridOptionsGridOptions { + /** + * Default column width that will be set for all columns. + * + * Valid values: + * "string" The default column width can be set in pixels (px). + * "number" The default column width can be set as a number. + */ + defaultColumnWidth?: string|number; + + /** + * Headers will be fixed if this option is set to true, and only the grid data will be scrollable. + */ + fixedHeaders?: boolean; + + /** + * Caption text that will be shown above the pivot grid header. + */ + caption?: string; + + /** + * A list of grid features definitions. The supported features are Resizing and Tooltips. Each feature goes with its separate options that are documented for the feature accordingly. + */ + features?: IgPivotViewPivotGridOptionsGridOptionsFeatures; + + /** + * Initial tabIndex attribute that will be set on the container element. + */ + tabIndex?: number; + + /** + * Enables/disables rendering of alternating row styles (odd and even rows receive different styling). Note that if a custom jQuery template is set, this has no effect and CSS for the row should be adjusted manually in the template contents. + */ + alternateRowStyles?: boolean; + + /** + * Enables/disables rendering of ui-state-hover classes when the mouse is over a record. This can be useful in templating scenarios, for example, where we don't want to apply hover styling to templated content. + */ + enableHoverStyles?: boolean; + + /** + * Option for IgPivotViewPivotGridOptionsGridOptions + */ + [optionName: string]: any; +} + +interface IgPivotViewPivotGridOptionsDragAndDropSettings { + /** + * Which element the draggable helper should be appended to while dragging. + */ + appendTo?: any; + + /** + * Specifies the containment for the drag helper. The area inside of which the helper is contained would be scrollable while dragging. + * + */ + containment?: boolean|string|Array; + + /** + * Specifies z-index that would be set for the drag helper. + */ + zIndex?: number; + + /** + * Option for IgPivotViewPivotGridOptionsDragAndDropSettings + */ + [optionName: string]: any; +} + +interface IgPivotViewPivotGridOptions { + /** + * A boolean value indicating whether a parent in the columns is in front of its children. + * If set to true, the query set sorts members in a level in their natural order - child members immediately follow their parent members. + * If set to false the query set sorts the members in a level using a post-natural order. In other words, child members precede their parents. + */ + isParentInFrontForColumns?: boolean; + + /** + * A boolean value indicating whether a parent in the rows is in front of its children. + * If set to true, the query set sorts members in a level in their natural order - child members immediately follow their parent members. + * If set to false the query set sorts the members in a level using a post-natural order. In other words, child members precede their parents. + */ + isParentInFrontForRows?: boolean; + + /** + * A boolean value indicating wheter the column headers should be arranged for compact header layout – each hieararchy is in a single row. + */ + compactColumnHeaders?: boolean; + + /** + * A value indicating wheter the layout that row headers should be arranged. For compact header layout – each hieararchy is in a single column. + */ + rowHeadersLayout?: any; + + /** + * The indentation for every level column when the compactColumnHeaders is set to true. + */ + compactColumnHeaderIndentation?: number; + + /** + * The indentation for every level row when the rowHeadersLayout is set to 'compact'. + */ + compactRowHeaderIndentation?: number; + + /** + * Typle="number" Specifies the width of the row headers. + */ + defaultRowHeaderWidth?: number; + + /** + * Enables sorting of the value cells in columns. + */ + allowSorting?: boolean; + + /** + * Spefies the default sort direction for the rows. + */ + firstSortDirection?: any; + + /** + * Enables sorting of the header cells in rows. + */ + allowHeaderRowsSorting?: boolean; + + /** + * Enables sorting of the header cells in columns. + */ + allowHeaderColumnsSorting?: boolean; + + /** + * An array of level sort direction items, which predefine the sorted header cells. + */ + levelSortDirections?: IgPivotViewPivotGridOptionsLevelSortDirection[]; + + /** + * Spefies the default sort direction for the levels if no sort direction is specified in an item from the levelSortDirections option. + */ + firstLevelSortDirection?: any; + + /** + * Options specific to the igGrid that will render the pivot grid view. + */ + gridOptions?: IgPivotViewPivotGridOptionsGridOptions; + + /** + * Settings for the drag and drop functionality of the igPivotDataSelector. + */ + dragAndDropSettings?: IgPivotViewPivotGridOptionsDragAndDropSettings; + + /** + * Specifies the parent for the drop downs. + */ + dropDownParent?: any; + + /** + * Disable the drag and drop for the rows drop area and the ability to use filtering and remove items from it. + */ + disableRowsDropArea?: boolean; + + /** + * Disable the drag and drop for the columns drop area and the ability to use filtering and remove items from it. + */ + disableColumnsDropArea?: boolean; + + /** + * Disable the drag and drop for the measures drop area and the ability to use filtering and remove items from it. + */ + disableMeasuresDropArea?: boolean; + + /** + * Disable the drag and drop for the filters drop area and the ability to use filtering and remove items from it. + */ + disableFiltersDropArea?: boolean; + + /** + * Hide the rows drop area. + */ + hideRowsDropArea?: boolean; + + /** + * Hide the columns drop area. + */ + hideColumnsDropArea?: boolean; + + /** + * Hide the measures drop area. + */ + hideMeasuresDropArea?: boolean; + + /** + * Hide the filters drop area. + */ + hideFiltersDropArea?: boolean; + + /** + * A function that will be called to determine if an item can be moved in or dropped on an area of the pivot grid. + * paramType="string" The location where the item will be moved - igPivotGrid, igPivotDataSelector, filters, rows, columns or measures. + * paramType="string" The type of the item - Hierarchy, Measure or MeasureList. + * paramType="string" The unique name of the item. + * returnType="bool" The function must return true if the item should be accepted. + */ + customMoveValidation?: Function; + + /** + * Option for IgPivotViewPivotGridOptions + */ + [optionName: string]: any; +} + +interface IgPivotViewDataSelectorOptionsDragAndDropSettings { + /** + * Which element the draggable helper should be appended to while dragging. + */ + appendTo?: any; + + /** + * Specifies the containment for the drag helper. The area inside of which the helper is contained would be scrollable while dragging. + * + */ + containment?: boolean|string|Array; + + /** + * Specifies z-index that would be set for the drag helper. + */ + zIndex?: number; + + /** + * Option for IgPivotViewDataSelectorOptionsDragAndDropSettings + */ + [optionName: string]: any; +} + +interface IgPivotViewDataSelectorOptions { + /** + * Settings for the drag and drop functionality of the igPivotDataSelector. + */ + dragAndDropSettings?: IgPivotViewDataSelectorOptionsDragAndDropSettings; + + /** + * Specifies the parent for the drop downs. + */ + dropDownParent?: any; + + /** + * A function that will be called to determine if an item can be moved in or dropped on an area of the data selector. + * paramType="string" The location where the item will be moved - igPivotGrid, igPivotDataSelector, filters, rows, columns or measures. + * paramType="string" The type of the item - Hierarchy, Measure or MeasureList. + * paramType="string" The unique name of the item. + * returnType="bool" The function must return true if the item should be accepted. + */ + customMoveValidation?: Function; + + /** + * Option for IgPivotViewDataSelectorOptions + */ + [optionName: string]: any; +} + +interface IgPivotViewPivotGridPanel { + /** + * Determines if the panel containing the igPivotGrid will be resizable. + */ + resizable?: boolean; + + /** + * Determines if the panel containing the igPivotGrid will be collapsible. + */ + collapsible?: boolean; + + /** + * Determines if the panel containing the igPivotGrid will initially collapsed. + */ + collapsed?: boolean; + + /** + * Determines the size of the igPivotGrid panel. + * + * Valid values: + * "string" The panel size can be set in pixels (px). + * "number" The size can be set as a number. + * "null" will automatically size the panel. + */ + size?: string|number; + + /** + * Option for IgPivotViewPivotGridPanel + */ + [optionName: string]: any; +} + +interface IgPivotViewDataSelectorPanel { + /** + * Determines the position of the data selector panel inside the igPivotView widget. + */ + location?: any; + + /** + * Determines if the panel containing the igPivotDataSelector will be resizable. + */ + resizable?: boolean; + + /** + * Determines if the panel containing the igPivotDataSelector will be collapsible. + */ + collapsible?: boolean; + + /** + * Determines if the panel containing the igPivotDataSelector will initially collapsed. + */ + collapsed?: boolean; + + /** + * Determines the size of the igPivotDataSelector panel. The recommended value is 250px. + * + * Valid values: + * "string" The panel size can be set in pixels (px). + * "number" The size can be set as a number. + * "null" will automatically size the panel. + */ + size?: string|number; + + /** + * Option for IgPivotViewDataSelectorPanel + */ + [optionName: string]: any; +} + +interface IgPivotView { + width?: string|number; + height?: string|number; + + /** + * An instance of $.ig.OlapXmlaDataSource or $.ig.OlapFlatDataSource. + */ + dataSource?: any; + + /** + * An object that will be used to create an instance of $.ig.OlapXmlaDataSource or $.ig.OlapFlatDataSource. + * The provided value must contain an object with settings for one of the data source types - xmlaOptions or flatDataOptions. + */ + dataSourceOptions?: IgPivotViewDataSourceOptions; + + /** + * Configuration settings that will be assigned to the igPivotGrid widget. + */ + pivotGridOptions?: IgPivotViewPivotGridOptions; + + /** + * Configuration settings that will be assigned to the igPivotDataSelector widget. + */ + dataSelectorOptions?: IgPivotViewDataSelectorOptions; + + /** + * Configuration settings for the panel containing the igPivotGrid. + */ + pivotGridPanel?: IgPivotViewPivotGridPanel; + + /** + * Configuration settings for the panel containing the igPivotDataSelector. + */ + dataSelectorPanel?: IgPivotViewDataSelectorPanel; + + /** + * Option for igPivotView + */ + [optionName: string]: any; +} +interface IgPivotViewMethods { + /** + * Returns the igPivotGrid instance of the pivot view. + */ + pivotGrid(): Object; + + /** + * Returns the igPivotDataSelector instance of the pivot view. + */ + dataSelector(): Object; + + /** + * Returns the igSplitter instance used to separate the pivot grid and the data selector. + */ + splitter(): Object; + + /** + * Destroy is part of the jQuery UI widget API and does the following: + * 1. Remove custom CSS classes that were added. + * 2. Unwrap any wrapping elements such as scrolling divs and other containers. + * 3. Unbind all events that were bound. + */ + destroy(): void; +} +interface JQuery { + data(propertyName: "igPivotView"): IgPivotViewMethods; +} + +interface JQuery { + igPivotView(methodName: "pivotGrid"): Object; + igPivotView(methodName: "dataSelector"): Object; + igPivotView(methodName: "splitter"): Object; + igPivotView(methodName: "destroy"): void; + + /** + */ + igPivotView(optionLiteral: 'option', optionName: "width"): string|number; + + /** + */ + igPivotView(optionLiteral: 'option', optionName: "width", optionValue: string|number): void; + + /** + */ + igPivotView(optionLiteral: 'option', optionName: "height"): string|number; + + /** + */ + igPivotView(optionLiteral: 'option', optionName: "height", optionValue: string|number): void; + + /** + * An instance of $.ig.OlapXmlaDataSource or $.ig.OlapFlatDataSource. + */ + igPivotView(optionLiteral: 'option', optionName: "dataSource"): any; + + /** + * An instance of $.ig.OlapXmlaDataSource or $.ig.OlapFlatDataSource. + * + * @optionValue New value to be set. + */ + igPivotView(optionLiteral: 'option', optionName: "dataSource", optionValue: any): void; + + /** + * An object that will be used to create an instance of $.ig.OlapXmlaDataSource or $.ig.OlapFlatDataSource. + * The provided value must contain an object with settings for one of the data source types - xmlaOptions or flatDataOptions. + */ + igPivotView(optionLiteral: 'option', optionName: "dataSourceOptions"): IgPivotViewDataSourceOptions; + + /** + * An object that will be used to create an instance of $.ig.OlapXmlaDataSource or $.ig.OlapFlatDataSource. + * The provided value must contain an object with settings for one of the data source types - xmlaOptions or flatDataOptions. + * + * @optionValue New value to be set. + */ + igPivotView(optionLiteral: 'option', optionName: "dataSourceOptions", optionValue: IgPivotViewDataSourceOptions): void; + + /** + * Configuration settings that will be assigned to the igPivotGrid widget. + */ + igPivotView(optionLiteral: 'option', optionName: "pivotGridOptions"): IgPivotViewPivotGridOptions; + + /** + * Configuration settings that will be assigned to the igPivotGrid widget. + * + * @optionValue New value to be set. + */ + igPivotView(optionLiteral: 'option', optionName: "pivotGridOptions", optionValue: IgPivotViewPivotGridOptions): void; + + /** + * Configuration settings that will be assigned to the igPivotDataSelector widget. + */ + igPivotView(optionLiteral: 'option', optionName: "dataSelectorOptions"): IgPivotViewDataSelectorOptions; + + /** + * Configuration settings that will be assigned to the igPivotDataSelector widget. + * + * @optionValue New value to be set. + */ + igPivotView(optionLiteral: 'option', optionName: "dataSelectorOptions", optionValue: IgPivotViewDataSelectorOptions): void; + + /** + * Configuration settings for the panel containing the igPivotGrid. + */ + igPivotView(optionLiteral: 'option', optionName: "pivotGridPanel"): IgPivotViewPivotGridPanel; + + /** + * Configuration settings for the panel containing the igPivotGrid. + * + * @optionValue New value to be set. + */ + igPivotView(optionLiteral: 'option', optionName: "pivotGridPanel", optionValue: IgPivotViewPivotGridPanel): void; + + /** + * Configuration settings for the panel containing the igPivotDataSelector. + */ + igPivotView(optionLiteral: 'option', optionName: "dataSelectorPanel"): IgPivotViewDataSelectorPanel; + + /** + * Configuration settings for the panel containing the igPivotDataSelector. + * + * @optionValue New value to be set. + */ + igPivotView(optionLiteral: 'option', optionName: "dataSelectorPanel", optionValue: IgPivotViewDataSelectorPanel): void; + igPivotView(options: IgPivotView): JQuery; + igPivotView(optionLiteral: 'option', optionName: string): any; + igPivotView(optionLiteral: 'option', options: IgPivotView): JQuery; + igPivotView(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igPivotView(methodName: string, ...methodParams: any[]): any; +} +interface IgPopover { + /** + * Controls whether the popover will close on blur or not + */ + closeOnBlur?: boolean; + + /** + * controls the direction in which the control shows relative to the target element + * + * Valid values: + * "auto" lets the control show on the side where enough space is available with the following priority top > bottom > right > left + * "left" shows popover on the left side of the target element + * "right" shows popover on the right side of the target element + * "top" shows popover on the top of the target element + * "bottom" shows popover on the bottom of the target element + */ + direction?: string; + + /** + * controls the position of the popover according to the target element in case the popover is larger than the target on the side we want to position, if the popover is smaller it should always be in the middle of the visible area + * + * Valid values: + * "auto" lets the control choose a position depending on available space with the following priority balanced > end > start + * "balanced" the popover is positioned at the middle of the target element + * "start" the popover is positioned at the beginning of the target element + * "end" the popover is positioned at the end of the target element + */ + position?: string; + + /** + * defines width for the popover. leave null for auto. + */ + width?: number|string; + + /** + * defines height for the popover. leave null for auto + */ + height?: number|string; + + /** + * defines width the popover won't go under the value even if no specific one is set. + */ + minWidth?: number|string; + + /** + * defines width the popover won't exceed even if no specific one is set. + */ + maxWidth?: number|string; + + /** + * defines height the popover won't exceed even if no specific one is set. + */ + maxHeight?: number|string; + + /** + * Sets the time popover fades in and out when showing/hiding + */ + animationDuration?: number; + + /** + * sets the content for the popover container. If left null the content will be get from the target. + * + * Valid values: + * "string" String content of the popover container + * "function" Function which is a callback that should return the content. Use the 'this' value to access the target DOM element. + */ + contentTemplate?: string|Function; + + /** + * Selectors indicating which items should show popovers. The predefined value is [title]. Customize if you're using something other then the title attribute for the popover content, or if you need a different selector for event delegation. When changing this option, you likely need to also change the contentTemplate option + */ + selectors?: string; + + /** + * Sets the content for the popover header + */ + headerTemplate?: IgPopoverHeaderTemplate; + + /** + * sets the event on which the popover will be shown. Predefined values are "mouseenter", "click" and "focus" + * + * Valid values: + * "mouseenter" the popover is shown on mouse enter in the target element + * "click" the popover is shown on click on the target element + * "focus" the popover is shown on focusing the target element + */ + showOn?: string; + + /** + * Sets the containment for the popover. Accepts a jQuery object + */ + containment?: any; + + /** + * Controls where the popover DOM should be attached to. + * + * + * Valid values: + * "string" A valid jQuery selector for the element + * "object" A reference to the parent jQuery object + */ + appendTo?: string|Object; + + /** + * Event fired before popover is shown. + * Function takes arguments evt and ui. + * Use ui.element to get the element the popover will show for. + * Use ui.content to get or set the content to be shown as a string. + * Use ui.popover to get the popover element showing. + * Use ui.owner to get reference to the igPopover widget + */ + showing?: ShowingEvent; + + /** + * Event fired after popover is shown. + * Function takes arguments evt and ui. + * Use ui.element to get the element the popover showed for. + * Use ui.content to get the content that was shown as a string. + * Use ui.popover to get the popover element shown. + * Use ui.owner to get reference to the igPopover widget + */ + shown?: ShownEvent; + + /** + * Event fired before popover is hidden. + * Function takes arguments evt and ui. + * Use ui.element to get the element the popover will hide for. + * Use ui.content to get the current content displayed in the popover as a string. + * Use ui.popover to get the popover element hiding. + * Use ui.owner to get reference to the igPopover widget + */ + hiding?: HidingEvent; + + /** + * Event fired after popover is hidden. + * Function takes arguments evt and ui. + * Use ui.element to get the element the popover is hidden for. + * Use ui.content to get the content displayed in the popover as a string. + * Use ui.popover to get the popover element hidden. + * Use ui.owner to get reference to the igPopover widget + */ + hidden?: HiddenEvent; + + /** + * Option for igPopover + */ + [optionName: string]: any; +} +interface IgPopoverMethods { + /** + * Destroys the popover widget. + */ + destroy(): void; + + /** + * Returns the ID of the element the popover is attached to + */ + id(): string; + + /** + * Returns the container for the popover contents + */ + container(): Object; + + /** + * Shows the popover for the specified target + * + * @param trg The element to show popover for. + * @param content The string to set for the popover to show. + */ + show(trg?: Element, content?: string): void; + + /** + * Hides the popover for the specified target + */ + hide(): void; + + /** + * Gets the currently set content for the popover container + */ + getContent(): string; + + /** + * Sets the content for the popover container + * + * @param newCnt The popover content to set. + */ + setContent(newCnt: string): void; + + /** + * Gets the popover current target + */ + target(): Object; + + /** + * Gets the current coordinates of the popover + */ + getCoordinates(): Object; + + /** + * Sets the popover to specific coordinates. + * + * @param pos The popover coordinates in pixels. + */ + setCoordinates(pos: Object): void; +} +interface JQuery { + data(propertyName: "igPopover"): IgPopoverMethods; +} + +interface JQuery { + igPopover(methodName: "destroy"): void; + igPopover(methodName: "id"): string; + igPopover(methodName: "container"): Object; + igPopover(methodName: "show", trg?: Element, content?: string): void; + igPopover(methodName: "hide"): void; + igPopover(methodName: "getContent"): string; + igPopover(methodName: "setContent", newCnt: string): void; + igPopover(methodName: "target"): Object; + igPopover(methodName: "getCoordinates"): Object; + igPopover(methodName: "setCoordinates", pos: Object): void; + + /** + * Controls whether the popover will close on blur or not + */ + igPopover(optionLiteral: 'option', optionName: "closeOnBlur"): boolean; + + /** + * Controls whether the popover will close on blur or not + * + * @optionValue New value to be set. + */ + igPopover(optionLiteral: 'option', optionName: "closeOnBlur", optionValue: boolean): void; + + /** + * Controls the direction in which the control shows relative to the target element + */ + igPopover(optionLiteral: 'option', optionName: "direction"): string; + + /** + * Controls the direction in which the control shows relative to the target element + * + * @optionValue New value to be set. + */ + igPopover(optionLiteral: 'option', optionName: "direction", optionValue: string): void; + + /** + * Controls the position of the popover according to the target element in case the popover is larger than the target on the side we want to position, if the popover is smaller it should always be in the middle of the visible area + */ + igPopover(optionLiteral: 'option', optionName: "position"): string; + + /** + * Controls the position of the popover according to the target element in case the popover is larger than the target on the side we want to position, if the popover is smaller it should always be in the middle of the visible area + * + * @optionValue New value to be set. + */ + igPopover(optionLiteral: 'option', optionName: "position", optionValue: string): void; + + /** + * Defines width for the popover. leave null for auto. + */ + igPopover(optionLiteral: 'option', optionName: "width"): number|string; + + /** + * Defines width for the popover. leave null for auto. + * + * @optionValue New value to be set. + */ + igPopover(optionLiteral: 'option', optionName: "width", optionValue: number|string): void; + + /** + * Defines height for the popover. leave null for auto + */ + igPopover(optionLiteral: 'option', optionName: "height"): number|string; + + /** + * Defines height for the popover. leave null for auto + * + * @optionValue New value to be set. + */ + igPopover(optionLiteral: 'option', optionName: "height", optionValue: number|string): void; + + /** + * Defines width the popover won't go under the value even if no specific one is set. + */ + igPopover(optionLiteral: 'option', optionName: "minWidth"): number|string; + + /** + * Defines width the popover won't go under the value even if no specific one is set. + * + * @optionValue New value to be set. + */ + igPopover(optionLiteral: 'option', optionName: "minWidth", optionValue: number|string): void; + + /** + * Defines width the popover won't exceed even if no specific one is set. + */ + igPopover(optionLiteral: 'option', optionName: "maxWidth"): number|string; + + /** + * Defines width the popover won't exceed even if no specific one is set. + * + * @optionValue New value to be set. + */ + igPopover(optionLiteral: 'option', optionName: "maxWidth", optionValue: number|string): void; + + /** + * Defines height the popover won't exceed even if no specific one is set. + */ + igPopover(optionLiteral: 'option', optionName: "maxHeight"): number|string; + + /** + * Defines height the popover won't exceed even if no specific one is set. + * + * @optionValue New value to be set. + */ + igPopover(optionLiteral: 'option', optionName: "maxHeight", optionValue: number|string): void; + + /** + * The time popover fades in and out when showing/hiding + */ + igPopover(optionLiteral: 'option', optionName: "animationDuration"): number; + + /** + * Sets the time popover fades in and out when showing/hiding + * + * @optionValue New value to be set. + */ + igPopover(optionLiteral: 'option', optionName: "animationDuration", optionValue: number): void; + + /** + * The content for the popover container. If left null the content will be get from the target. + */ + igPopover(optionLiteral: 'option', optionName: "contentTemplate"): string|Function; + + /** + * Sets the content for the popover container. If left null the content will be get from the target. + * + * @optionValue New value to be set. + */ + igPopover(optionLiteral: 'option', optionName: "contentTemplate", optionValue: string|Function): void; + + /** + * Selectors indicating which items should show popovers. The predefined value is [title]. Customize if you're using something other then the title attribute for the popover content, or if you need a different selector for event delegation. When changing this option, you likely need to also change the contentTemplate option + */ + igPopover(optionLiteral: 'option', optionName: "selectors"): string; + + /** + * Selectors indicating which items should show popovers. The predefined value is [title]. Customize if you're using something other then the title attribute for the popover content, or if you need a different selector for event delegation. When changing this option, you likely need to also change the contentTemplate option + * + * @optionValue New value to be set. + */ + igPopover(optionLiteral: 'option', optionName: "selectors", optionValue: string): void; + + /** + * The content for the popover header + */ + igPopover(optionLiteral: 'option', optionName: "headerTemplate"): IgPopoverHeaderTemplate; + + /** + * Sets the content for the popover header + * + * @optionValue New value to be set. + */ + igPopover(optionLiteral: 'option', optionName: "headerTemplate", optionValue: IgPopoverHeaderTemplate): void; + + /** + * The event on which the popover will be shown. Predefined values are "mouseenter", "click" and "focus" + */ + igPopover(optionLiteral: 'option', optionName: "showOn"): string; + + /** + * Sets the event on which the popover will be shown. Predefined values are "mouseenter", "click" and "focus" + * + * @optionValue New value to be set. + */ + igPopover(optionLiteral: 'option', optionName: "showOn", optionValue: string): void; + + /** + * The containment for the popover. Accepts a jQuery object + */ + igPopover(optionLiteral: 'option', optionName: "containment"): any; + + /** + * Sets the containment for the popover. Accepts a jQuery object + * + * @optionValue New value to be set. + */ + igPopover(optionLiteral: 'option', optionName: "containment", optionValue: any): void; + + /** + * Controls where the popover DOM should be attached to. + * + */ + igPopover(optionLiteral: 'option', optionName: "appendTo"): string|Object; + + /** + * Controls where the popover DOM should be attached to. + * + * + * @optionValue New value to be set. + */ + igPopover(optionLiteral: 'option', optionName: "appendTo", optionValue: string|Object): void; + + /** + * Event fired before popover is shown. + * Function takes arguments evt and ui. + * Use ui.element to get the element the popover will show for. + * Use ui.content to get or set the content to be shown as a string. + * Use ui.popover to get the popover element showing. + * Use ui.owner to get reference to the igPopover widget + */ + igPopover(optionLiteral: 'option', optionName: "showing"): ShowingEvent; + + /** + * Event fired before popover is shown. + * Function takes arguments evt and ui. + * Use ui.element to get the element the popover will show for. + * Use ui.content to get or set the content to be shown as a string. + * Use ui.popover to get the popover element showing. + * Use ui.owner to get reference to the igPopover widget + * + * @optionValue Define event handler function. + */ + igPopover(optionLiteral: 'option', optionName: "showing", optionValue: ShowingEvent): void; + + /** + * Event fired after popover is shown. + * Function takes arguments evt and ui. + * Use ui.element to get the element the popover showed for. + * Use ui.content to get the content that was shown as a string. + * Use ui.popover to get the popover element shown. + * Use ui.owner to get reference to the igPopover widget + */ + igPopover(optionLiteral: 'option', optionName: "shown"): ShownEvent; + + /** + * Event fired after popover is shown. + * Function takes arguments evt and ui. + * Use ui.element to get the element the popover showed for. + * Use ui.content to get the content that was shown as a string. + * Use ui.popover to get the popover element shown. + * Use ui.owner to get reference to the igPopover widget + * + * @optionValue Define event handler function. + */ + igPopover(optionLiteral: 'option', optionName: "shown", optionValue: ShownEvent): void; + + /** + * Event fired before popover is hidden. + * Function takes arguments evt and ui. + * Use ui.element to get the element the popover will hide for. + * Use ui.content to get the current content displayed in the popover as a string. + * Use ui.popover to get the popover element hiding. + * Use ui.owner to get reference to the igPopover widget + */ + igPopover(optionLiteral: 'option', optionName: "hiding"): HidingEvent; + + /** + * Event fired before popover is hidden. + * Function takes arguments evt and ui. + * Use ui.element to get the element the popover will hide for. + * Use ui.content to get the current content displayed in the popover as a string. + * Use ui.popover to get the popover element hiding. + * Use ui.owner to get reference to the igPopover widget + * + * @optionValue Define event handler function. + */ + igPopover(optionLiteral: 'option', optionName: "hiding", optionValue: HidingEvent): void; + + /** + * Event fired after popover is hidden. + * Function takes arguments evt and ui. + * Use ui.element to get the element the popover is hidden for. + * Use ui.content to get the content displayed in the popover as a string. + * Use ui.popover to get the popover element hidden. + * Use ui.owner to get reference to the igPopover widget + */ + igPopover(optionLiteral: 'option', optionName: "hidden"): HiddenEvent; + + /** + * Event fired after popover is hidden. + * Function takes arguments evt and ui. + * Use ui.element to get the element the popover is hidden for. + * Use ui.content to get the content displayed in the popover as a string. + * Use ui.popover to get the popover element hidden. + * Use ui.owner to get reference to the igPopover widget + * + * @optionValue Define event handler function. + */ + igPopover(optionLiteral: 'option', optionName: "hidden", optionValue: HiddenEvent): void; + igPopover(options: IgPopover): JQuery; + igPopover(optionLiteral: 'option', optionName: string): any; + igPopover(optionLiteral: 'option', options: IgPopover): JQuery; + igPopover(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igPopover(methodName: string, ...methodParams: any[]): any; +} +interface IgRadialGaugeRange { + /** + * Gets or sets the name of the range. + */ + name?: string; + + /** + * Gets or sets the starting value of the range. + */ + startValue?: number; + + /** + * Gets or sets the ending value of the range. + */ + endValue?: number; + + /** + * Gets or sets the starting value of the outer extent of the range. + */ + outerStartExtent?: number; + + /** + * Gets or sets the ending value of the outer extent of the range. + */ + outerEndExtent?: number; + + /** + * Gets or sets the starting value of the inner extent of the range. + */ + innerStartExtent?: number; + + /** + * Gets or sets the ending value of the inner extent of the range. + */ + innerEndExtent?: number; + + /** + * Gets or sets the brush for the entire range. + */ + brush?: string; + + /** + * Gets or sets the brush for the outline of the range. + */ + outline?: string; + + /** + * Gets or sets the thickness of the range outline. + */ + strokeThickness?: number; + + /** + * Gets or sets the flag used to determine if the range should be removed. If set to true, the range (if existing) is removed. + */ + remove?: boolean; + + /** + * Option for IgRadialGaugeRange + */ + [optionName: string]: any; +} + +interface IgRadialGauge { + /** + * The width of the gauge. It can be set as a number in pixels, string (px) or percentage (%). + */ + width?: string|number; + + /** + * The height of the gauge. It can be set as a number in pixels, string (px) or percentage (%). + */ + height?: string|number; + + /** + * Gets or sets the scale ranges to render on the linear gauge. + */ + ranges?: IgRadialGaugeRange[]; + + /** + * Gets or sets a collection of brushes to be used as the palette for gauge ranges. + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + rangeBrushes?: any; + + /** + * Gets or sets a collection of brushes to be used as the palette for gauge outlines. + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + rangeOutlines?: any; + + /** + * Gets or sets the minimum value of the scale. + */ + minimumValue?: number; + + /** + * Gets or sets the maximum value of the scale. + */ + maximumValue?: number; + + /** + * Gets or sets the interval to use for the scale. + */ + interval?: number; + + /** + * Gets or sets the x position of the center of the gauge with the value ranging from 0 to 1. + */ + centerX?: number; + + /** + * Gets or sets the y position of the center of the gauge with the value ranging from 0 to 1. + */ + centerY?: number; + + /** + * Gets or sets the value at which to point the needle of the gauge. + */ + value?: number; + + /** + * Gets or sets the start angle for the scale in degrees. + */ + scaleStartAngle?: number; + + /** + * Gets or sets the end angle for the scale in degrees. + */ + scaleEndAngle?: number; + + /** + * Gets or sets the direction in which the scale sweeps around the center from the start angle to end angle. + * + * Valid values: + * "counterclockwise" + * "clockwise" + */ + scaleSweepDirection?: string; + + /** + * Gets or sets the number of milliseconds over which changes to the gauge should be animated. + */ + transitionDuration?: number; + + /** + * Gets or sets the easing function used to morph the current series. + */ + transitionEasingFunction?: any; + + /** + * Gets or sets the brush to use when rendering the fill of the needle. + */ + needleBrush?: string; + + /** + * Gets or sets the brush to use when rendering the outline of the needle. + */ + needleOutline?: string; + + /** + * Gets or sets the extent (from -1 to 1) at which to start rendering the needle, measured from the center of the gauge. + * Values further from zero than 1 can be used to make this extend further than the normal radius of the gauge. + */ + needleStartExtent?: number; + + /** + * Gets or sets the extent (from -1 to 1) at which to end rendering the needle, measured from the center of the gauge. + * Values further from zero than 1 can be used to make this extend further than the normal radius of the gauge. + */ + needleEndExtent?: number; + + /** + * Gets or sets the shape to use when rendering the needle from a number of options. + * + * Valid values: + * "none" + * "rectangle" + * "triangle" + * "needle" + * "trapezoid" + * "rectangleWithBulb" + * "triangleWithBulb" + * "needleWithBulb" + * "trapezoidWithBulb" + */ + needleShape?: string; + + /** + * Gets or sets the width of the needle at its point using a value from (0 to 1). Note: Only some needle shapes respect this property. + * Values further from zero than 1 can be used to make this extend further than the normal radius of the gauge. + */ + needleStartWidthRatio?: number; + + /** + * Gets or sets the width of the needle at its point using a value from (0 to 1). Note: Only some needle shapes respect this property. + * Values further from zero than 1 can be used to make this extend further than the normal radius of the gauge. + */ + needleEndWidthRatio?: number; + + /** + * Gets or sets the width of the needle at its feature which is closest to the base (e.g. a bulb) with a value from 0 to 1. Note: Only some needle shapes respect this property. + * Values further from zero than 1 can be used to make this extend further than the normal radius of the gauge. + */ + needleBaseFeatureWidthRatio?: number; + + /** + * Gets or sets the extent of the feature which is closest to the base (e.g. a bulb) with a value from -1 to 1. Note: Only some needle shapes respect this property. + * Values further from zero than 1 can be used to make this extend further than the normal radius of the gauge. + */ + needleBaseFeatureExtent?: number; + + /** + * Gets or sets the width of the needle at its feature which is closest to the point (e.g. the tapering point of a needle) with a value from 0 to 1. Note: Only some needle shapes respect this property. + * Values further from zero than 1 can be used to make this extend further than the normal radius of the gauge. + */ + needlePointFeatureWidthRatio?: number; + + /** + * Gets or sets the extent of the feature which is closest to the point (e.g. the tapering point of a needle) with a value from -1 to 1. Note: Only some needle shapes respect this property. + * Values further from zero than 1 can be used to make this extend further than the normal radius of the gauge. + */ + needlePointFeatureExtent?: number; + + /** + * Gets or sets the width of the cap of the needle with a value from 0 to 1. Note: Will only take effect if you have a cap set on the needle. + * Values further from zero than 1 can be used to make this extend further than the normal radius of the gauge. + */ + needlePivotWidthRatio?: number; + + /** + * Gets or sets the width of the inner cutout section of the needle cap with a value from 0 to 1. Note: Will only take effect if you have a cap set on the needle that has a cutout section. + */ + needlePivotInnerWidthRatio?: number; + + /** + * Gets or sets the shape to use for the needle cap. + * + * Valid values: + * "none" + * "circle" + * "circleWithHole" + * "circleOverlay" + * "circleOverlayWithHole" + * "circleUnderlay" + * "circleUnderlayWithHole" + */ + needlePivotShape?: string; + + /** + * Gets or sets the position at which to start rendering the scale, measured from the center of the gauge as a value from 0 to 1. + * Values further from zero than 1 can be used to make this extend further than the normal radius of the gauge. + */ + scaleStartExtent?: number; + + /** + * Gets or sets the brush to use for filling the needle cap. Note: this only applies to certain cap shapes. + */ + needlePivotBrush?: string; + + /** + * Gets or sets the brush to use for the outlines of the needle cap. + */ + needlePivotOutline?: string; + + /** + * Gets or sets the stroke thickness of the needle outline. + */ + needleStrokeThickness?: number; + + /** + * Gets or sets the stroke thickness to use for the outline of the needle cap. + */ + needlePivotStrokeThickness?: number; + + /** + * Gets or sets the position at which to stop rendering the scale as a value from 0 to 1 measured from the center of the gauge. + * Values further from zero than 1 can be used to make this extend further than the normal radius of the gauge. + */ + scaleEndExtent?: number; + + /** + * Gets or sets the position at which to put the labels as a value from 0 to 1, measured form the center of the gauge. + * Values further from zero than 1 can be used to make this extend further than the normal radius of the gauge. + */ + labelExtent?: number; + + /** + * Gets or sets the interval to use for rendering labels. This defaults to be the same interval as the tickmarks on the scale. + */ + labelInterval?: number; + + /** + * Gets or sets the position at which to start rendering the major tickmarks as a value from 0 to 1, measured from the center of the gauge. + * Values further from zero than 1 can be used to make this extend further than the normal radius of the gauge. + */ + tickStartExtent?: number; + + /** + * Gets or sets the position at which to stop rendering the major tickmarks as a value from 0 to 1, measured from the center of the gauge. + * Values further from zero than 1 can be used to make this extend further than the normal radius of the gauge. + */ + tickEndExtent?: number; + + /** + * Gets or sets the stroke thickness to use when rendering ticks. + */ + tickStrokeThickness?: number; + + /** + * Gets or sets the brush to use for the major tickmarks. + */ + tickBrush?: string; + + /** + * Gets or sets the brush to use for the label font. + */ + fontBrush?: string; + + /** + * Gets or sets the position at which to start rendering the minor tickmarks as a value from 0 to 1, measured from the center of the gauge. + * Values further from zero than 1 can be used to make this extend further than the normal radius of the gauge. + */ + minorTickStartExtent?: number; + + /** + * Gets or sets the position at which to stop rendering the minor tickmarks as a value from 0 to 1, measured from the center of the gauge. + * Values further from zero than 1 can be used to make this extend further than the normal radius of the gauge. + */ + minorTickEndExtent?: number; + + /** + * Gets or sets the stroke thickness to use when rendering minor ticks. + */ + minorTickStrokeThickness?: number; + + /** + * Gets or sets the brush to use for the minor tickmarks. + */ + minorTickBrush?: string; + + /** + * Gets or sets the number of minor tickmarks to place between major tickmarks. + */ + minorTickCount?: number; + + /** + * Gets or sets the brush to use to fill the background of the scale. + */ + scaleBrush?: string; + + /** + * Gets or sets the brush to use to fill the backing of the gauge. + */ + backingBrush?: string; + + /** + * Gets or sets the brush to use for the outline of the backing. + */ + backingOutline?: string; + + /** + * Gets or sets the stroke thickness of the backing outline. + */ + backingStrokeThickness?: number; + + /** + * Gets or sets the outer extent of the gauge backing. + */ + backingOuterExtent?: number; + + /** + * Gets or sets the over sweep angle to apply to the backing if it is displaying fitted (in degrees). Must be greater or equal to 0. + */ + backingOversweep?: number; + + /** + * Gets or sets the extra degrees of sweep to apply to the scale background. Must be greater or equal to 0. + */ + scaleOversweep?: number; + + /** + * Gets or sets the over or shape to use for the excess fill area for the scale. + * + * Valid values: + * "auto" + * "circular" + * "fitted" + */ + scaleOversweepShape?: string; + + /** + * Gets or sets the corner rounding radius to use for the fitted scale backings. + */ + backingCornerRadius?: number; + + /** + * Gets or sets the inner extent of the gauge backing. + */ + backingInnerExtent?: number; + + /** + * Gets or sets the type of shape to use for the backing of the gauge. + * + * Valid values: + * "circular" + * "fitted" + */ + backingShape?: string; + + /** + * Gets or sets the multiplying factor to apply to the normal radius of the gauge. + * The radius of the gauge is defined by the minimum of the width and height of the control divided by 2.0. + * This introduces a multiplicative factor to that value. + */ + radiusMultiplier?: number; + + /** + * Gets or sets the strategy to use for omitting labels if the first and last label have the same value. + * + * Valid values: + * "omitLast" + * "omitFirst" + * "omitNeither" + * "omitBoth" + */ + duplicateLabelOmissionStrategy?: string; + + /** + * Gets or sets whether needle dragging is enabled or not. + */ + isNeedleDraggingEnabled?: boolean; + + /** + * Gets or sets whether the needle is constrained within the minimum and maximum value range during dragging. + */ + isNeedleDraggingConstrained?: boolean; + + /** + * Gets or sets the font. + */ + font?: string; + + /** + * Gets the transition progress of the animation when the control is animating. + */ + transitionProgress?: number; + + /** + * Gets or sets the scaling value used by the main canvas rendering context to apply a scale transform to it. + */ + pixelScalingRatio?: number; + formatLabel?: FormatLabelEvent; + alignLabel?: AlignLabelEvent; + + /** + * Occurs when the Value property changes. + */ + valueChanged?: ValueChangedEvent; + + /** + * Option for igRadialGauge + */ + [optionName: string]: any; +} +interface IgRadialGaugeMethods { + /** + * Returns a string containing the names of all the ranges delimited with a \n symbol. + */ + getRangeNames(): string; + + /** + * Adds a new range to the radial gauge. + * + * @param value + */ + addRange(value: Object): void; + + /** + * Removes a specified range. + * + * @param value + */ + removeRange(value: Object): void; + + /** + * Updates the range. + * + * @param value + */ + updateRange(value: Object): void; + + /** + * Clears the ranges in the radial gauge. + */ + clearRanges(): void; + + /** + * Scales a value on the gauge's main scale to an angle around the center point of the gauge, in radians. + * + * @param value + */ + scaleValue(value: Object): void; + + /** + * Unscales a value from an angle in radians to the represented value along the main scale of the gauge. + * + * @param value + */ + unscaleValue(value: Object): void; + + /** + * Gets the value for the main scale of the gauge for a given point within the bounds of the gauge. + * + * @param x + * @param y + */ + getValueForPoint(x: Object, y: Object): number; + + /** + * Gets the point on the gauge for a given scale value and extent. + * + * @param value + * @param extent + */ + getPointForValue(value: Object, extent: Object): void; + + /** + * Returns true if the main gauge needle bounding box contains the point provided, otherwise false. + * + * @param x + * @param y + */ + needleContainsPoint(x: Object, y: Object): void; + + /** + * Exports the visual data for the radial gauge. + */ + exportVisualData(): void; + + /** + * Flushes the gauge. + */ + flush(): void; + + /** + * Destroys widget. + */ + destroy(): void; + + /** + * Returns true if the style was updated for the radial gauge. + */ + styleUpdated(): void; +} +interface JQuery { + data(propertyName: "igRadialGauge"): IgRadialGaugeMethods; +} + +interface JQuery { + igRadialGauge(methodName: "getRangeNames"): string; + igRadialGauge(methodName: "addRange", value: Object): void; + igRadialGauge(methodName: "removeRange", value: Object): void; + igRadialGauge(methodName: "updateRange", value: Object): void; + igRadialGauge(methodName: "clearRanges"): void; + igRadialGauge(methodName: "scaleValue", value: Object): void; + igRadialGauge(methodName: "unscaleValue", value: Object): void; + igRadialGauge(methodName: "getValueForPoint", x: Object, y: Object): number; + igRadialGauge(methodName: "getPointForValue", value: Object, extent: Object): void; + igRadialGauge(methodName: "needleContainsPoint", x: Object, y: Object): void; + igRadialGauge(methodName: "exportVisualData"): void; + igRadialGauge(methodName: "flush"): void; + igRadialGauge(methodName: "destroy"): void; + igRadialGauge(methodName: "styleUpdated"): void; + + /** + * The width of the gauge. It can be set as a number in pixels, string (px) or percentage (%). + */ + igRadialGauge(optionLiteral: 'option', optionName: "width"): string|number; + + /** + * The width of the gauge. It can be set as a number in pixels, string (px) or percentage (%). + * + * @optionValue New value to be set. + */ + igRadialGauge(optionLiteral: 'option', optionName: "width", optionValue: string|number): void; + + /** + * The height of the gauge. It can be set as a number in pixels, string (px) or percentage (%). + */ + igRadialGauge(optionLiteral: 'option', optionName: "height"): string|number; + + /** + * The height of the gauge. It can be set as a number in pixels, string (px) or percentage (%). + * + * @optionValue New value to be set. + */ + igRadialGauge(optionLiteral: 'option', optionName: "height", optionValue: string|number): void; + + /** + * Gets the scale ranges to render on the linear gauge. + */ + igRadialGauge(optionLiteral: 'option', optionName: "ranges"): IgRadialGaugeRange[]; + + /** + * Sets the scale ranges to render on the linear gauge. + * + * @optionValue New value to be set. + */ + igRadialGauge(optionLiteral: 'option', optionName: "ranges", optionValue: IgRadialGaugeRange[]): void; + + /** + * Gets a collection of brushes to be used as the palette for gauge ranges. + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + igRadialGauge(optionLiteral: 'option', optionName: "rangeBrushes"): any; + + /** + * Sets a collection of brushes to be used as the palette for gauge ranges. + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + * + * @optionValue New value to be set. + */ + igRadialGauge(optionLiteral: 'option', optionName: "rangeBrushes", optionValue: any): void; + + /** + * Gets a collection of brushes to be used as the palette for gauge outlines. + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + igRadialGauge(optionLiteral: 'option', optionName: "rangeOutlines"): any; + + /** + * Sets a collection of brushes to be used as the palette for gauge outlines. + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + * + * @optionValue New value to be set. + */ + igRadialGauge(optionLiteral: 'option', optionName: "rangeOutlines", optionValue: any): void; + + /** + * Gets the minimum value of the scale. + */ + igRadialGauge(optionLiteral: 'option', optionName: "minimumValue"): number; + + /** + * Sets the minimum value of the scale. + * + * @optionValue New value to be set. + */ + igRadialGauge(optionLiteral: 'option', optionName: "minimumValue", optionValue: number): void; + + /** + * Gets the maximum value of the scale. + */ + igRadialGauge(optionLiteral: 'option', optionName: "maximumValue"): number; + + /** + * Sets the maximum value of the scale. + * + * @optionValue New value to be set. + */ + igRadialGauge(optionLiteral: 'option', optionName: "maximumValue", optionValue: number): void; + + /** + * Gets the interval to use for the scale. + */ + igRadialGauge(optionLiteral: 'option', optionName: "interval"): number; + + /** + * Sets the interval to use for the scale. + * + * @optionValue New value to be set. + */ + igRadialGauge(optionLiteral: 'option', optionName: "interval", optionValue: number): void; + + /** + * Gets the x position of the center of the gauge with the value ranging from 0 to 1. + */ + igRadialGauge(optionLiteral: 'option', optionName: "centerX"): number; + + /** + * Sets the x position of the center of the gauge with the value ranging from 0 to 1. + * + * @optionValue New value to be set. + */ + igRadialGauge(optionLiteral: 'option', optionName: "centerX", optionValue: number): void; + + /** + * Gets the y position of the center of the gauge with the value ranging from 0 to 1. + */ + igRadialGauge(optionLiteral: 'option', optionName: "centerY"): number; + + /** + * Sets the y position of the center of the gauge with the value ranging from 0 to 1. + * + * @optionValue New value to be set. + */ + igRadialGauge(optionLiteral: 'option', optionName: "centerY", optionValue: number): void; + + /** + * Gets the value at which to point the needle of the gauge. + */ + igRadialGauge(optionLiteral: 'option', optionName: "value"): number; + + /** + * Sets the value at which to point the needle of the gauge. + * + * @optionValue New value to be set. + */ + igRadialGauge(optionLiteral: 'option', optionName: "value", optionValue: number): void; + + /** + * Gets the start angle for the scale in degrees. + */ + igRadialGauge(optionLiteral: 'option', optionName: "scaleStartAngle"): number; + + /** + * Sets the start angle for the scale in degrees. + * + * @optionValue New value to be set. + */ + igRadialGauge(optionLiteral: 'option', optionName: "scaleStartAngle", optionValue: number): void; + + /** + * Gets the end angle for the scale in degrees. + */ + igRadialGauge(optionLiteral: 'option', optionName: "scaleEndAngle"): number; + + /** + * Sets the end angle for the scale in degrees. + * + * @optionValue New value to be set. + */ + igRadialGauge(optionLiteral: 'option', optionName: "scaleEndAngle", optionValue: number): void; + + /** + * Gets the direction in which the scale sweeps around the center from the start angle to end angle. + */ + igRadialGauge(optionLiteral: 'option', optionName: "scaleSweepDirection"): string; + + /** + * Sets the direction in which the scale sweeps around the center from the start angle to end angle. + * + * @optionValue New value to be set. + */ + igRadialGauge(optionLiteral: 'option', optionName: "scaleSweepDirection", optionValue: string): void; + + /** + * Gets the number of milliseconds over which changes to the gauge should be animated. + */ + igRadialGauge(optionLiteral: 'option', optionName: "transitionDuration"): number; + + /** + * Sets the number of milliseconds over which changes to the gauge should be animated. + * + * @optionValue New value to be set. + */ + igRadialGauge(optionLiteral: 'option', optionName: "transitionDuration", optionValue: number): void; + + /** + * Gets the easing function used to morph the current series. + */ + igRadialGauge(optionLiteral: 'option', optionName: "transitionEasingFunction"): any; + + /** + * Sets the easing function used to morph the current series. + * + * @optionValue New value to be set. + */ + igRadialGauge(optionLiteral: 'option', optionName: "transitionEasingFunction", optionValue: any): void; + + /** + * Gets the brush to use when rendering the fill of the needle. + */ + igRadialGauge(optionLiteral: 'option', optionName: "needleBrush"): string; + + /** + * Sets the brush to use when rendering the fill of the needle. + * + * @optionValue New value to be set. + */ + igRadialGauge(optionLiteral: 'option', optionName: "needleBrush", optionValue: string): void; + + /** + * Gets the brush to use when rendering the outline of the needle. + */ + igRadialGauge(optionLiteral: 'option', optionName: "needleOutline"): string; + + /** + * Sets the brush to use when rendering the outline of the needle. + * + * @optionValue New value to be set. + */ + igRadialGauge(optionLiteral: 'option', optionName: "needleOutline", optionValue: string): void; + + /** + * Gets the extent (from -1 to 1) at which to start rendering the needle, measured from the center of the gauge. + * Values further from zero than 1 can be used to make this extend further than the normal radius of the gauge. + */ + igRadialGauge(optionLiteral: 'option', optionName: "needleStartExtent"): number; + + /** + * Sets the extent (from -1 to 1) at which to start rendering the needle, measured from the center of the gauge. + * Values further from zero than 1 can be used to make this extend further than the normal radius of the gauge. + * + * @optionValue New value to be set. + */ + igRadialGauge(optionLiteral: 'option', optionName: "needleStartExtent", optionValue: number): void; + + /** + * Gets the extent (from -1 to 1) at which to end rendering the needle, measured from the center of the gauge. + * Values further from zero than 1 can be used to make this extend further than the normal radius of the gauge. + */ + igRadialGauge(optionLiteral: 'option', optionName: "needleEndExtent"): number; + + /** + * Sets the extent (from -1 to 1) at which to end rendering the needle, measured from the center of the gauge. + * Values further from zero than 1 can be used to make this extend further than the normal radius of the gauge. + * + * @optionValue New value to be set. + */ + igRadialGauge(optionLiteral: 'option', optionName: "needleEndExtent", optionValue: number): void; + + /** + * Gets the shape to use when rendering the needle from a number of options. + */ + igRadialGauge(optionLiteral: 'option', optionName: "needleShape"): string; + + /** + * Sets the shape to use when rendering the needle from a number of options. + * + * @optionValue New value to be set. + */ + igRadialGauge(optionLiteral: 'option', optionName: "needleShape", optionValue: string): void; + + /** + * Gets the width of the needle at its point using a value from (0 to 1). Note: Only some needle shapes respect this property. + * Values further from zero than 1 can be used to make this extend further than the normal radius of the gauge. + */ + igRadialGauge(optionLiteral: 'option', optionName: "needleStartWidthRatio"): number; + + /** + * Sets the width of the needle at its point using a value from (0 to 1). Note: Only some needle shapes respect this property. + * Values further from zero than 1 can be used to make this extend further than the normal radius of the gauge. + * + * @optionValue New value to be set. + */ + igRadialGauge(optionLiteral: 'option', optionName: "needleStartWidthRatio", optionValue: number): void; + + /** + * Gets the width of the needle at its point using a value from (0 to 1). Note: Only some needle shapes respect this property. + * Values further from zero than 1 can be used to make this extend further than the normal radius of the gauge. + */ + igRadialGauge(optionLiteral: 'option', optionName: "needleEndWidthRatio"): number; + + /** + * Sets the width of the needle at its point using a value from (0 to 1). Note: Only some needle shapes respect this property. + * Values further from zero than 1 can be used to make this extend further than the normal radius of the gauge. + * + * @optionValue New value to be set. + */ + igRadialGauge(optionLiteral: 'option', optionName: "needleEndWidthRatio", optionValue: number): void; + + /** + * Gets the width of the needle at its feature which is closest to the base (e.g. a bulb) with a value from 0 to 1. Note: Only some needle shapes respect this property. + * Values further from zero than 1 can be used to make this extend further than the normal radius of the gauge. + */ + igRadialGauge(optionLiteral: 'option', optionName: "needleBaseFeatureWidthRatio"): number; + + /** + * Sets the width of the needle at its feature which is closest to the base (e.g. a bulb) with a value from 0 to 1. Note: Only some needle shapes respect this property. + * Values further from zero than 1 can be used to make this extend further than the normal radius of the gauge. + * + * @optionValue New value to be set. + */ + igRadialGauge(optionLiteral: 'option', optionName: "needleBaseFeatureWidthRatio", optionValue: number): void; + + /** + * Gets the extent of the feature which is closest to the base (e.g. a bulb) with a value from -1 to 1. Note: Only some needle shapes respect this property. + * Values further from zero than 1 can be used to make this extend further than the normal radius of the gauge. + */ + igRadialGauge(optionLiteral: 'option', optionName: "needleBaseFeatureExtent"): number; + + /** + * Sets the extent of the feature which is closest to the base (e.g. a bulb) with a value from -1 to 1. Note: Only some needle shapes respect this property. + * Values further from zero than 1 can be used to make this extend further than the normal radius of the gauge. + * + * @optionValue New value to be set. + */ + igRadialGauge(optionLiteral: 'option', optionName: "needleBaseFeatureExtent", optionValue: number): void; + + /** + * Gets the width of the needle at its feature which is closest to the point (e.g. the tapering point of a needle) with a value from 0 to 1. Note: Only some needle shapes respect this property. + * Values further from zero than 1 can be used to make this extend further than the normal radius of the gauge. + */ + igRadialGauge(optionLiteral: 'option', optionName: "needlePointFeatureWidthRatio"): number; + + /** + * Sets the width of the needle at its feature which is closest to the point (e.g. the tapering point of a needle) with a value from 0 to 1. Note: Only some needle shapes respect this property. + * Values further from zero than 1 can be used to make this extend further than the normal radius of the gauge. + * + * @optionValue New value to be set. + */ + igRadialGauge(optionLiteral: 'option', optionName: "needlePointFeatureWidthRatio", optionValue: number): void; + + /** + * Gets the extent of the feature which is closest to the point (e.g. the tapering point of a needle) with a value from -1 to 1. Note: Only some needle shapes respect this property. + * Values further from zero than 1 can be used to make this extend further than the normal radius of the gauge. + */ + igRadialGauge(optionLiteral: 'option', optionName: "needlePointFeatureExtent"): number; + + /** + * Sets the extent of the feature which is closest to the point (e.g. the tapering point of a needle) with a value from -1 to 1. Note: Only some needle shapes respect this property. + * Values further from zero than 1 can be used to make this extend further than the normal radius of the gauge. + * + * @optionValue New value to be set. + */ + igRadialGauge(optionLiteral: 'option', optionName: "needlePointFeatureExtent", optionValue: number): void; + + /** + * Gets the width of the cap of the needle with a value from 0 to 1. Note: Will only take effect if you have a cap set on the needle. + * Values further from zero than 1 can be used to make this extend further than the normal radius of the gauge. + */ + igRadialGauge(optionLiteral: 'option', optionName: "needlePivotWidthRatio"): number; + + /** + * Sets the width of the cap of the needle with a value from 0 to 1. Note: Will only take effect if you have a cap set on the needle. + * Values further from zero than 1 can be used to make this extend further than the normal radius of the gauge. + * + * @optionValue New value to be set. + */ + igRadialGauge(optionLiteral: 'option', optionName: "needlePivotWidthRatio", optionValue: number): void; + + /** + * Gets the width of the inner cutout section of the needle cap with a value from 0 to 1. Note: Will only take effect if you have a cap set on the needle that has a cutout section. + */ + igRadialGauge(optionLiteral: 'option', optionName: "needlePivotInnerWidthRatio"): number; + + /** + * Sets the width of the inner cutout section of the needle cap with a value from 0 to 1. Note: Will only take effect if you have a cap set on the needle that has a cutout section. + * + * @optionValue New value to be set. + */ + igRadialGauge(optionLiteral: 'option', optionName: "needlePivotInnerWidthRatio", optionValue: number): void; + + /** + * Gets the shape to use for the needle cap. + */ + igRadialGauge(optionLiteral: 'option', optionName: "needlePivotShape"): string; + + /** + * Sets the shape to use for the needle cap. + * + * @optionValue New value to be set. + */ + igRadialGauge(optionLiteral: 'option', optionName: "needlePivotShape", optionValue: string): void; + + /** + * Gets the position at which to start rendering the scale, measured from the center of the gauge as a value from 0 to 1. + * Values further from zero than 1 can be used to make this extend further than the normal radius of the gauge. + */ + igRadialGauge(optionLiteral: 'option', optionName: "scaleStartExtent"): number; + + /** + * Sets the position at which to start rendering the scale, measured from the center of the gauge as a value from 0 to 1. + * Values further from zero than 1 can be used to make this extend further than the normal radius of the gauge. + * + * @optionValue New value to be set. + */ + igRadialGauge(optionLiteral: 'option', optionName: "scaleStartExtent", optionValue: number): void; + + /** + * Gets the brush to use for filling the needle cap. Note: this only applies to certain cap shapes. + */ + igRadialGauge(optionLiteral: 'option', optionName: "needlePivotBrush"): string; + + /** + * Sets the brush to use for filling the needle cap. Note: this only applies to certain cap shapes. + * + * @optionValue New value to be set. + */ + igRadialGauge(optionLiteral: 'option', optionName: "needlePivotBrush", optionValue: string): void; + + /** + * Gets the brush to use for the outlines of the needle cap. + */ + igRadialGauge(optionLiteral: 'option', optionName: "needlePivotOutline"): string; + + /** + * Sets the brush to use for the outlines of the needle cap. + * + * @optionValue New value to be set. + */ + igRadialGauge(optionLiteral: 'option', optionName: "needlePivotOutline", optionValue: string): void; + + /** + * Gets the stroke thickness of the needle outline. + */ + igRadialGauge(optionLiteral: 'option', optionName: "needleStrokeThickness"): number; + + /** + * Sets the stroke thickness of the needle outline. + * + * @optionValue New value to be set. + */ + igRadialGauge(optionLiteral: 'option', optionName: "needleStrokeThickness", optionValue: number): void; + + /** + * Gets the stroke thickness to use for the outline of the needle cap. + */ + igRadialGauge(optionLiteral: 'option', optionName: "needlePivotStrokeThickness"): number; + + /** + * Sets the stroke thickness to use for the outline of the needle cap. + * + * @optionValue New value to be set. + */ + igRadialGauge(optionLiteral: 'option', optionName: "needlePivotStrokeThickness", optionValue: number): void; + + /** + * Gets the position at which to stop rendering the scale as a value from 0 to 1 measured from the center of the gauge. + * Values further from zero than 1 can be used to make this extend further than the normal radius of the gauge. + */ + igRadialGauge(optionLiteral: 'option', optionName: "scaleEndExtent"): number; + + /** + * Sets the position at which to stop rendering the scale as a value from 0 to 1 measured from the center of the gauge. + * Values further from zero than 1 can be used to make this extend further than the normal radius of the gauge. + * + * @optionValue New value to be set. + */ + igRadialGauge(optionLiteral: 'option', optionName: "scaleEndExtent", optionValue: number): void; + + /** + * Gets the position at which to put the labels as a value from 0 to 1, measured form the center of the gauge. + * Values further from zero than 1 can be used to make this extend further than the normal radius of the gauge. + */ + igRadialGauge(optionLiteral: 'option', optionName: "labelExtent"): number; + + /** + * Sets the position at which to put the labels as a value from 0 to 1, measured form the center of the gauge. + * Values further from zero than 1 can be used to make this extend further than the normal radius of the gauge. + * + * @optionValue New value to be set. + */ + igRadialGauge(optionLiteral: 'option', optionName: "labelExtent", optionValue: number): void; + + /** + * Gets the interval to use for rendering labels. This defaults to be the same interval as the tickmarks on the scale. + */ + igRadialGauge(optionLiteral: 'option', optionName: "labelInterval"): number; + + /** + * Sets the interval to use for rendering labels. This defaults to be the same interval as the tickmarks on the scale. + * + * @optionValue New value to be set. + */ + igRadialGauge(optionLiteral: 'option', optionName: "labelInterval", optionValue: number): void; + + /** + * Gets the position at which to start rendering the major tickmarks as a value from 0 to 1, measured from the center of the gauge. + * Values further from zero than 1 can be used to make this extend further than the normal radius of the gauge. + */ + igRadialGauge(optionLiteral: 'option', optionName: "tickStartExtent"): number; + + /** + * Sets the position at which to start rendering the major tickmarks as a value from 0 to 1, measured from the center of the gauge. + * Values further from zero than 1 can be used to make this extend further than the normal radius of the gauge. + * + * @optionValue New value to be set. + */ + igRadialGauge(optionLiteral: 'option', optionName: "tickStartExtent", optionValue: number): void; + + /** + * Gets the position at which to stop rendering the major tickmarks as a value from 0 to 1, measured from the center of the gauge. + * Values further from zero than 1 can be used to make this extend further than the normal radius of the gauge. + */ + igRadialGauge(optionLiteral: 'option', optionName: "tickEndExtent"): number; + + /** + * Sets the position at which to stop rendering the major tickmarks as a value from 0 to 1, measured from the center of the gauge. + * Values further from zero than 1 can be used to make this extend further than the normal radius of the gauge. + * + * @optionValue New value to be set. + */ + igRadialGauge(optionLiteral: 'option', optionName: "tickEndExtent", optionValue: number): void; + + /** + * Gets the stroke thickness to use when rendering ticks. + */ + igRadialGauge(optionLiteral: 'option', optionName: "tickStrokeThickness"): number; + + /** + * Sets the stroke thickness to use when rendering ticks. + * + * @optionValue New value to be set. + */ + igRadialGauge(optionLiteral: 'option', optionName: "tickStrokeThickness", optionValue: number): void; + + /** + * Gets the brush to use for the major tickmarks. + */ + igRadialGauge(optionLiteral: 'option', optionName: "tickBrush"): string; + + /** + * Sets the brush to use for the major tickmarks. + * + * @optionValue New value to be set. + */ + igRadialGauge(optionLiteral: 'option', optionName: "tickBrush", optionValue: string): void; + + /** + * Gets the brush to use for the label font. + */ + igRadialGauge(optionLiteral: 'option', optionName: "fontBrush"): string; + + /** + * Sets the brush to use for the label font. + * + * @optionValue New value to be set. + */ + igRadialGauge(optionLiteral: 'option', optionName: "fontBrush", optionValue: string): void; + + /** + * Gets the position at which to start rendering the minor tickmarks as a value from 0 to 1, measured from the center of the gauge. + * Values further from zero than 1 can be used to make this extend further than the normal radius of the gauge. + */ + igRadialGauge(optionLiteral: 'option', optionName: "minorTickStartExtent"): number; + + /** + * Sets the position at which to start rendering the minor tickmarks as a value from 0 to 1, measured from the center of the gauge. + * Values further from zero than 1 can be used to make this extend further than the normal radius of the gauge. + * + * @optionValue New value to be set. + */ + igRadialGauge(optionLiteral: 'option', optionName: "minorTickStartExtent", optionValue: number): void; + + /** + * Gets the position at which to stop rendering the minor tickmarks as a value from 0 to 1, measured from the center of the gauge. + * Values further from zero than 1 can be used to make this extend further than the normal radius of the gauge. + */ + igRadialGauge(optionLiteral: 'option', optionName: "minorTickEndExtent"): number; + + /** + * Sets the position at which to stop rendering the minor tickmarks as a value from 0 to 1, measured from the center of the gauge. + * Values further from zero than 1 can be used to make this extend further than the normal radius of the gauge. + * + * @optionValue New value to be set. + */ + igRadialGauge(optionLiteral: 'option', optionName: "minorTickEndExtent", optionValue: number): void; + + /** + * Gets the stroke thickness to use when rendering minor ticks. + */ + igRadialGauge(optionLiteral: 'option', optionName: "minorTickStrokeThickness"): number; + + /** + * Sets the stroke thickness to use when rendering minor ticks. + * + * @optionValue New value to be set. + */ + igRadialGauge(optionLiteral: 'option', optionName: "minorTickStrokeThickness", optionValue: number): void; + + /** + * Gets the brush to use for the minor tickmarks. + */ + igRadialGauge(optionLiteral: 'option', optionName: "minorTickBrush"): string; + + /** + * Sets the brush to use for the minor tickmarks. + * + * @optionValue New value to be set. + */ + igRadialGauge(optionLiteral: 'option', optionName: "minorTickBrush", optionValue: string): void; + + /** + * Gets the number of minor tickmarks to place between major tickmarks. + */ + igRadialGauge(optionLiteral: 'option', optionName: "minorTickCount"): number; + + /** + * Sets the number of minor tickmarks to place between major tickmarks. + * + * @optionValue New value to be set. + */ + igRadialGauge(optionLiteral: 'option', optionName: "minorTickCount", optionValue: number): void; + + /** + * Gets the brush to use to fill the background of the scale. + */ + igRadialGauge(optionLiteral: 'option', optionName: "scaleBrush"): string; + + /** + * Sets the brush to use to fill the background of the scale. + * + * @optionValue New value to be set. + */ + igRadialGauge(optionLiteral: 'option', optionName: "scaleBrush", optionValue: string): void; + + /** + * Gets the brush to use to fill the backing of the gauge. + */ + igRadialGauge(optionLiteral: 'option', optionName: "backingBrush"): string; + + /** + * Sets the brush to use to fill the backing of the gauge. + * + * @optionValue New value to be set. + */ + igRadialGauge(optionLiteral: 'option', optionName: "backingBrush", optionValue: string): void; + + /** + * Gets the brush to use for the outline of the backing. + */ + igRadialGauge(optionLiteral: 'option', optionName: "backingOutline"): string; + + /** + * Sets the brush to use for the outline of the backing. + * + * @optionValue New value to be set. + */ + igRadialGauge(optionLiteral: 'option', optionName: "backingOutline", optionValue: string): void; + + /** + * Gets the stroke thickness of the backing outline. + */ + igRadialGauge(optionLiteral: 'option', optionName: "backingStrokeThickness"): number; + + /** + * Sets the stroke thickness of the backing outline. + * + * @optionValue New value to be set. + */ + igRadialGauge(optionLiteral: 'option', optionName: "backingStrokeThickness", optionValue: number): void; + + /** + * Gets the outer extent of the gauge backing. + */ + igRadialGauge(optionLiteral: 'option', optionName: "backingOuterExtent"): number; + + /** + * Sets the outer extent of the gauge backing. + * + * @optionValue New value to be set. + */ + igRadialGauge(optionLiteral: 'option', optionName: "backingOuterExtent", optionValue: number): void; + + /** + * Gets the over sweep angle to apply to the backing if it is displaying fitted (in degrees). Must be greater or equal to 0. + */ + igRadialGauge(optionLiteral: 'option', optionName: "backingOversweep"): number; + + /** + * Sets the over sweep angle to apply to the backing if it is displaying fitted (in degrees). Must be greater or equal to 0. + * + * @optionValue New value to be set. + */ + igRadialGauge(optionLiteral: 'option', optionName: "backingOversweep", optionValue: number): void; + + /** + * Gets the extra degrees of sweep to apply to the scale background. Must be greater or equal to 0. + */ + igRadialGauge(optionLiteral: 'option', optionName: "scaleOversweep"): number; + + /** + * Sets the extra degrees of sweep to apply to the scale background. Must be greater or equal to 0. + * + * @optionValue New value to be set. + */ + igRadialGauge(optionLiteral: 'option', optionName: "scaleOversweep", optionValue: number): void; + + /** + * Gets the over or shape to use for the excess fill area for the scale. + */ + igRadialGauge(optionLiteral: 'option', optionName: "scaleOversweepShape"): string; + + /** + * Sets the over or shape to use for the excess fill area for the scale. + * + * @optionValue New value to be set. + */ + igRadialGauge(optionLiteral: 'option', optionName: "scaleOversweepShape", optionValue: string): void; + + /** + * Gets the corner rounding radius to use for the fitted scale backings. + */ + igRadialGauge(optionLiteral: 'option', optionName: "backingCornerRadius"): number; + + /** + * Sets the corner rounding radius to use for the fitted scale backings. + * + * @optionValue New value to be set. + */ + igRadialGauge(optionLiteral: 'option', optionName: "backingCornerRadius", optionValue: number): void; + + /** + * Gets the inner extent of the gauge backing. + */ + igRadialGauge(optionLiteral: 'option', optionName: "backingInnerExtent"): number; + + /** + * Sets the inner extent of the gauge backing. + * + * @optionValue New value to be set. + */ + igRadialGauge(optionLiteral: 'option', optionName: "backingInnerExtent", optionValue: number): void; + + /** + * Gets the type of shape to use for the backing of the gauge. + */ + igRadialGauge(optionLiteral: 'option', optionName: "backingShape"): string; + + /** + * Sets the type of shape to use for the backing of the gauge. + * + * @optionValue New value to be set. + */ + igRadialGauge(optionLiteral: 'option', optionName: "backingShape", optionValue: string): void; + + /** + * Gets the multiplying factor to apply to the normal radius of the gauge. + * The radius of the gauge is defined by the minimum of the width and height of the control divided by 2.0. + * This introduces a multiplicative factor to that value. + */ + igRadialGauge(optionLiteral: 'option', optionName: "radiusMultiplier"): number; + + /** + * Sets the multiplying factor to apply to the normal radius of the gauge. + * The radius of the gauge is defined by the minimum of the width and height of the control divided by 2.0. + * This introduces a multiplicative factor to that value. + * + * @optionValue New value to be set. + */ + igRadialGauge(optionLiteral: 'option', optionName: "radiusMultiplier", optionValue: number): void; + + /** + * Gets the strategy to use for omitting labels if the first and last label have the same value. + */ + igRadialGauge(optionLiteral: 'option', optionName: "duplicateLabelOmissionStrategy"): string; + + /** + * Sets the strategy to use for omitting labels if the first and last label have the same value. + * + * @optionValue New value to be set. + */ + igRadialGauge(optionLiteral: 'option', optionName: "duplicateLabelOmissionStrategy", optionValue: string): void; + + /** + * Gets whether needle dragging is enabled or not. + */ + igRadialGauge(optionLiteral: 'option', optionName: "isNeedleDraggingEnabled"): boolean; + + /** + * Sets whether needle dragging is enabled or not. + * + * @optionValue New value to be set. + */ + igRadialGauge(optionLiteral: 'option', optionName: "isNeedleDraggingEnabled", optionValue: boolean): void; + + /** + * Gets whether the needle is constrained within the minimum and maximum value range during dragging. + */ + igRadialGauge(optionLiteral: 'option', optionName: "isNeedleDraggingConstrained"): boolean; + + /** + * Sets whether the needle is constrained within the minimum and maximum value range during dragging. + * + * @optionValue New value to be set. + */ + igRadialGauge(optionLiteral: 'option', optionName: "isNeedleDraggingConstrained", optionValue: boolean): void; + + /** + * Gets the font. + */ + igRadialGauge(optionLiteral: 'option', optionName: "font"): string; + + /** + * Sets the font. + * + * @optionValue New value to be set. + */ + igRadialGauge(optionLiteral: 'option', optionName: "font", optionValue: string): void; + + /** + * Gets the transition progress of the animation when the control is animating. + */ + igRadialGauge(optionLiteral: 'option', optionName: "transitionProgress"): number; + + /** + * The transition progress of the animation when the control is animating. + * + * @optionValue New value to be set. + */ + igRadialGauge(optionLiteral: 'option', optionName: "transitionProgress", optionValue: number): void; + + /** + * Gets the scaling value used by the main canvas rendering context to apply a scale transform to it. + */ + igRadialGauge(optionLiteral: 'option', optionName: "pixelScalingRatio"): number; + + /** + * Sets the scaling value used by the main canvas rendering context to apply a scale transform to it. + * + * @optionValue New value to be set. + */ + igRadialGauge(optionLiteral: 'option', optionName: "pixelScalingRatio", optionValue: number): void; + + /** + */ + igRadialGauge(optionLiteral: 'option', optionName: "formatLabel"): FormatLabelEvent; + + /** + */ + igRadialGauge(optionLiteral: 'option', optionName: "formatLabel", optionValue: FormatLabelEvent): void; + + /** + */ + igRadialGauge(optionLiteral: 'option', optionName: "alignLabel"): AlignLabelEvent; + + /** + */ + igRadialGauge(optionLiteral: 'option', optionName: "alignLabel", optionValue: AlignLabelEvent): void; + + /** + * Occurs when the Value property changes. + */ + igRadialGauge(optionLiteral: 'option', optionName: "valueChanged"): ValueChangedEvent; + + /** + * Occurs when the Value property changes. + * + * @optionValue New value to be set. + */ + igRadialGauge(optionLiteral: 'option', optionName: "valueChanged", optionValue: ValueChangedEvent): void; + igRadialGauge(options: IgRadialGauge): JQuery; + igRadialGauge(optionLiteral: 'option', optionName: string): any; + igRadialGauge(optionLiteral: 'option', options: IgRadialGauge): JQuery; + igRadialGauge(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igRadialGauge(methodName: string, ...methodParams: any[]): any; +} +interface IgRadialMenuItem { + /** + * Gets or sets a value indicating what type of item is being provided. + * + * + * Valid values: + * "button" + * "coloritem" + * "colorwell" + * "list" + * "numericitem" + * "numericgauge" + */ + type?: string; + + /** + * Gets or sets the unique name of the item within the menu. + */ + name?: string; + + /** + * Gets or sets the name of the child item that represents the most recently interacted with item. Note other item properties may be set to "{RecentItem}" to have them automatically set to values of the associated recent child item. + */ + recentItemName?: string; + + /** + * Returns or sets the value of the numeric item. + */ + value?: number; + + /** + * Returns or sets the value while the user is interacting with the element. + */ + pendingValue?: any; + + /** + * Returns or sets a boolean indicating if the children should be rotated to align with the location of this element. + */ + autoRotateChildren?: boolean; + + /** + * Returns or sets the brush used for the arc displayed within the tool when checked. + */ + checkedHighlightBrush?: string; + + /** + * Returns or sets the foreground for the inner area of the item. + */ + foreground?: string; + + /** + * Returns or sets the brush used for the arc displayed within the tool when hot tracked. + */ + highlightBrush?: string; + + /** + * Returns or sets the background of the inner area of the menu item. + */ + innerAreaFill?: string; + + /** + * Returns or sets the brush for the background of the inner area of the menu item that is under the pointer. + */ + innerAreaHotTrackFill?: string; + + /** + * Returns or sets the brush for the default border of the inner area for the menu item that is under the pointer. + */ + innerAreaHotTrackStroke?: string; + + /** + * Returns or sets the brush for the default border of the inner area for the menu item. + */ + innerAreaStroke?: string; + + /** + * Returns or sets the thickness of the border for the inner area for the menu item. + */ + innerAreaStrokeThickness?: number; + + /** + * Returns or sets a boolean indicating whether the item is enabled. + */ + isEnabled?: boolean; + + /** + * Returns or sets a boolean indicating if a tooltip may be displayed for the item. + */ + isToolTipEnabled?: boolean; + + /** + * Returns or sets the brush for the background of the button within the outer ring for a menu item that is under the pointer. + */ + outerRingButtonHotTrackFill?: string; + + /** + * Returns or sets the foreground of the buttons in the outer ring of the menu that is under the pointer. + */ + outerRingButtonHotTrackForeground?: string; + + /** + * Returns or sets the brush for the default border of the button within the outer ring for a menu item that is under the pointer. + */ + outerRingButtonHotTrackStroke?: string; + + /** + * Returns or sets the default background of the button within the outer ring for a menu item. + */ + outerRingButtonFill?: string; + + /** + * Returns or sets the brush for the foreground of the buttons in the outer ring of the menu. + */ + outerRingButtonForeground?: string; + + /** + * Returns or sets the brush for the default border of the button within the outer ring for a menu item. + */ + outerRingButtonStroke?: string; + + /** + * Returns or sets the width of the outline of a button in the outer ring of the menu. + */ + outerRingButtonStrokeThickness?: number; + + /** + * Returns or sets the tooltip to be displayed for the radial menu item. + */ + toolTip?: any; + + /** + * Returns or sets the wedge at which the item should be positioned. + */ + wedgeIndex?: number; + + /** + * Returns or sets the number of wedges that the item should occupy. + */ + wedgeSpan?: number; + + /** + * Returns or sets a boolean indicating if the RecentItem property is updated when a child item is clicked. + */ + autoUpdateRecentItem?: boolean; + + /** + * Returns or sets an enumeration indicating where the child items are displayed. + * + * Valid values: + * "asChildren" The Items are displayed within a separate level that is accessed by clicking on the button in the outer ring of the xamRadialMenu for the parent. + * "asSiblingsWhenChecked" The items are displayed as siblings of the parent as long as the IsChecked is set to true. + * "none" The child items are not displayed. + */ + childItemPlacement?: string; + + /** + * Returns or sets a value indicating how the IsChecked property may be changed. + * + * Valid values: + * "none" The item is not checkable + * "checkBox" The item is checkable and may be independantly checked or unchecked without affecting other items. + * "radioButton" The item is checkable. Only 1 item from the items with the same GroupName may be checked at a time and the checked item may not be unchecked. + * "radioButtonAllowAllUp" The item is checkable. Only 1 item from the items with the same GroupName may be checked at a time and the checked item may not be checked allowing all items to be unchecked. + */ + checkBehavior?: string; + + /** + * Returns or sets a boolean indicating if the item is displayed as checked. + */ + isChecked?: boolean; + + /** + * Returns or sets the name used to identify which RadioButton type items will be grouped together when determining the item to uncheck when the item is checked. + */ + groupName?: string; + + /** + * Returns or sets the header of the menu item. + */ + header?: any; + + /** + * Returns or sets the uri of the image for the item. + */ + iconUri?: string; + + /** + * Returns or sets the color that the item represents. + * Note: When the Color property is set, several of the brush properties are changed. + */ + color?: any; + + /** + * Returns or sets the brush used to render the line that represents the PendingValue + */ + pendingValueNeedleBrush?: string; + + /** + * Returns or sets a boolean indicating whether space should be left before the first tickmark. + */ + reserveFirstSlice?: boolean; + + /** + * Returns or sets the amount that the PendingValue should be adjusted when incrementing or decrementing the value. + */ + smallIncrement?: number; + + /** + * Returns or sets the brush used to render the tick marks. + */ + tickBrush?: string; + + /** + * Returns or sets the values of the ticks. + */ + ticks?: any; + + /** + * Returns or sets the starting color for the track. + */ + trackStartColor?: any; + + /** + * Returns or sets the ending color for the track. + */ + trackEndColor?: any; + + /** + * Returns or sets the brush used to represent the Value + */ + valueNeedleBrush?: string; + + /** + * Cancel="false" Invoked when one navigates back to the item after viewing the child items. + * Function takes a first argument ui. + * Use ui.owner to obtain reference to menu widget. + * Use ui.item to obtain reference to the item. + */ + closed?: any; + + /** + * Cancel="false" Invoked when one navigates to the view the child items. + * Function takes a first argument ui. + * Use ui.owner to obtain reference to menu widget. + * Use ui.item to obtain reference to the item. + */ + opened?: any; + + /** + * Cancel="false" Occurs when the IsChecked is changed to true. + * Function takes a first argument ui. + * Use ui.owner to obtain reference to menu widget. + * Use ui.item to obtain reference to the item. + */ + checked?: any; + + /** + * Cancel="false" Occurs when the item area is clicked. + * Function takes a first argument ui. + * Use ui.owner to obtain reference to menu widget. + * Use ui.item to obtain reference to the item. + */ + click?: any; + + /** + * Cancel="false" Occurs when the IsChecked is changed to false. + * Function takes a first argument ui. + * Use ui.owner to obtain reference to menu widget. + * Use ui.item to obtain reference to the item. + */ + unchecked?: any; + + /** + * Cancel="false" Event invoked when the Color property is changed. + * Function takes a first argument ui. + * Use ui.owner to obtain reference to menu widget. + * Use ui.oldValue to obtain the previous value. + * Use ui.newValue to obtain the new value. + * Use ui.item to obtain reference to the item. + */ + colorChanged?: any; + + /** + * Cancel="false" Occurs when the item area of a descendant color well is clicked. + * Function takes a first argument ui. + * Use ui.owner to obtain reference to menu widget. + * Use ui.item to obtain reference to the item. + */ + colorWellClick?: any; + + /** + * Cancel="false" Event invoked when the Value property is changed. + * Function takes a first argument ui. + * Use ui.owner to obtain reference to menu widget. + * Use ui.oldValue to obtain the previous value. + * Use ui.newValue to obtain the new value. + * Use ui.item to obtain reference to the item. + */ + valueChanged?: any; + + /** + * Cancel="false" Event invoked when the PendingValue property is changed. + * Function takes a first argument ui. + * Use ui.owner to obtain reference to menu widget. + * Use ui.oldValue to obtain the previous value. + * Use ui.newValue to obtain the new value. + * Use ui.item to obtain reference to the item. + */ + pendingValueChanged?: any; + + /** + * Option for IgRadialMenuItem + */ + [optionName: string]: any; +} + +interface ClosedEvent { + (event: Event, ui: ClosedEventUIParam): void; +} + +interface ClosedEventUIParam { + /** + * Used to obtain reference to menu widget. + */ + owner?: any; +} + +interface OpenedEvent { + (event: Event, ui: OpenedEventUIParam): void; +} + +interface OpenedEventUIParam { + /** + * Used to obtain reference to menu widget. + */ + owner?: any; +} + +interface IgRadialMenu { + /** + * Gets or sets the items in the menu. + */ + items?: IgRadialMenuItem[]; + + /** + * Gets or sets the name of the item within the menu whose children are currently displayed. + */ + currentOpenMenuItemName?: string; + + /** + * Returns or sets the width of the center button content. + */ + centerButtonContentWidth?: number; + + /** + * Returns or sets the height of the center button content. + */ + centerButtonContentHeight?: number; + + /** + * Returns or sets the background of the center button of the menu when the IsOpen property is false. + */ + centerButtonClosedFill?: string; + + /** + * Returns or sets the brush used for the outline of the ring of the center button when the IsOpen property is false. + */ + centerButtonClosedStroke?: string; + + /** + * Returns or sets the background of the center button of the menu when the IsOpen property is true. + */ + centerButtonFill?: string; + + /** + * Returns or sets the background of the center button of the menu when under the pointer. + */ + centerButtonHotTrackFill?: string; + + /** + * Returns or sets the brush used for the outline of the ring of the center button when under the pointer. + */ + centerButtonHotTrackStroke?: string; + + /** + * Returns or sets the brush used for the outline of the ring of the center button when the IsOpen is true. + */ + centerButtonStroke?: string; + + /** + * Returns or sets the width of the outline of the inner rings of the menu. + */ + centerButtonStrokeThickness?: number; + + /** + * The font for the control + */ + font?: string; + + /** + * Returns or sets a boolean indicating whether the items of the menu are currently displayed. When closed, only the center button is rendered. + */ + isOpen?: boolean; + + /** + * Returns or sets the brush for the backing of the radial menu. + */ + menuBackground?: string; + + /** + * Returns or sets the duration of the animation performed when the IsOpen property is changed. + */ + menuItemOpenCloseAnimationDuration?: number; + + /** + * Returns or sets the easing function applied to the animation that occurs when the IsOpen property is changed. + */ + menuItemOpenCloseAnimationEasingFunction?: any; + + /** + * Returns or sets the duration of the animation performed when the IsOpen property is changed. + */ + menuOpenCloseAnimationDuration?: number; + + /** + * Returns or sets the easing function applied to the animation that occurs when the IsOpen property is changed. + */ + menuOpenCloseAnimationEasingFunction?: any; + + /** + * Returns or sets the minimum number of wedges displayed by the menu. + */ + minWedgeCount?: number; + + /** + * Returns or sets the background of the outer ring of the menu. + */ + outerRingFill?: string; + + /** + * Returns or sets the thickness of the outer ring of the menu. + */ + outerRingThickness?: number; + + /** + * Returns or sets the brush used for the outline of the outer ring. + */ + outerRingStroke?: string; + + /** + * Returns or sets the width of the outline of the outer ring of the menu. + */ + outerRingStrokeThickness?: number; + + /** + * Returns or sets the starting angle of the items in degrees. + */ + rotationInDegrees?: number; + + /** + * Returns or sets the starting angle of the items expressed as the percentage of the width of a single wedge/slice. + */ + rotationAsPercentageOfWedge?: number; + + /** + * Returns or sets the amount of padding around each wedge in degrees. + */ + wedgePaddingInDegrees?: number; + pixelScalingRatio?: number; + + /** + * Invoked when the IsOpen property is changed to false. + * Function takes a first argument ui. + * Use ui.owner to obtain reference to menu widget. + */ + closed?: ClosedEvent; + + /** + * Invoked when the IsOpen property is changed to true. + * Function takes a first argument ui. + * Use ui.owner to obtain reference to menu widget. + */ + opened?: OpenedEvent; + + /** + * Option for igRadialMenu + */ + [optionName: string]: any; +} +interface IgRadialMenuMethods { + /** + * Gets or sets the value of a property for the item created with the specified key + * + * @param itemKey The name of the item + * @param key The name of the property/option + * @param value The new value for the property or undefined to obtain the current value + */ + itemOption(itemKey: string, key: string, value: Object): Object; + + /** + * Exports visual data from the radial menu to aid in unit testing + */ + exportVisualData(): void; + + /** + * Forces any pending deferred work to render on the radial menu before continuing + */ + flush(): void; + + /** + * Destroys the widget. + */ + destroy(): void; + + /** + * Notify the radial menu that style information used for rendering the menu may have been updated. + */ + styleUpdated(): void; +} +interface JQuery { + data(propertyName: "igRadialMenu"): IgRadialMenuMethods; +} + +interface JQuery { + igRadialMenu(methodName: "itemOption", itemKey: string, key: string, value: Object): Object; + igRadialMenu(methodName: "exportVisualData"): void; + igRadialMenu(methodName: "flush"): void; + igRadialMenu(methodName: "destroy"): void; + igRadialMenu(methodName: "styleUpdated"): void; + + /** + * Gets the items in the menu. + */ + igRadialMenu(optionLiteral: 'option', optionName: "items"): IgRadialMenuItem[]; + + /** + * Sets the items in the menu. + * + * @optionValue New value to be set. + */ + igRadialMenu(optionLiteral: 'option', optionName: "items", optionValue: IgRadialMenuItem[]): void; + + /** + * Gets the name of the item within the menu whose children are currently displayed. + */ + igRadialMenu(optionLiteral: 'option', optionName: "currentOpenMenuItemName"): string; + + /** + * Sets the name of the item within the menu whose children are currently displayed. + * + * @optionValue New value to be set. + */ + igRadialMenu(optionLiteral: 'option', optionName: "currentOpenMenuItemName", optionValue: string): void; + + /** + * Returns the width of the center button content. + */ + igRadialMenu(optionLiteral: 'option', optionName: "centerButtonContentWidth"): number; + + /** + * Returns or sets the width of the center button content. + * + * @optionValue New value to be set. + */ + igRadialMenu(optionLiteral: 'option', optionName: "centerButtonContentWidth", optionValue: number): void; + + /** + * Returns the height of the center button content. + */ + igRadialMenu(optionLiteral: 'option', optionName: "centerButtonContentHeight"): number; + + /** + * Returns or sets the height of the center button content. + * + * @optionValue New value to be set. + */ + igRadialMenu(optionLiteral: 'option', optionName: "centerButtonContentHeight", optionValue: number): void; + + /** + * Returns the background of the center button of the menu when the IsOpen property is false. + */ + igRadialMenu(optionLiteral: 'option', optionName: "centerButtonClosedFill"): string; + + /** + * Returns or sets the background of the center button of the menu when the IsOpen property is false. + * + * @optionValue New value to be set. + */ + igRadialMenu(optionLiteral: 'option', optionName: "centerButtonClosedFill", optionValue: string): void; + + /** + * Returns the brush used for the outline of the ring of the center button when the IsOpen property is false. + */ + igRadialMenu(optionLiteral: 'option', optionName: "centerButtonClosedStroke"): string; + + /** + * Returns or sets the brush used for the outline of the ring of the center button when the IsOpen property is false. + * + * @optionValue New value to be set. + */ + igRadialMenu(optionLiteral: 'option', optionName: "centerButtonClosedStroke", optionValue: string): void; + + /** + * Returns the background of the center button of the menu when the IsOpen property is true. + */ + igRadialMenu(optionLiteral: 'option', optionName: "centerButtonFill"): string; + + /** + * Returns or sets the background of the center button of the menu when the IsOpen property is true. + * + * @optionValue New value to be set. + */ + igRadialMenu(optionLiteral: 'option', optionName: "centerButtonFill", optionValue: string): void; + + /** + * Returns the background of the center button of the menu when under the pointer. + */ + igRadialMenu(optionLiteral: 'option', optionName: "centerButtonHotTrackFill"): string; + + /** + * Returns or sets the background of the center button of the menu when under the pointer. + * + * @optionValue New value to be set. + */ + igRadialMenu(optionLiteral: 'option', optionName: "centerButtonHotTrackFill", optionValue: string): void; + + /** + * Returns the brush used for the outline of the ring of the center button when under the pointer. + */ + igRadialMenu(optionLiteral: 'option', optionName: "centerButtonHotTrackStroke"): string; + + /** + * Returns or sets the brush used for the outline of the ring of the center button when under the pointer. + * + * @optionValue New value to be set. + */ + igRadialMenu(optionLiteral: 'option', optionName: "centerButtonHotTrackStroke", optionValue: string): void; + + /** + * Returns the brush used for the outline of the ring of the center button when the IsOpen is true. + */ + igRadialMenu(optionLiteral: 'option', optionName: "centerButtonStroke"): string; + + /** + * Returns or sets the brush used for the outline of the ring of the center button when the IsOpen is true. + * + * @optionValue New value to be set. + */ + igRadialMenu(optionLiteral: 'option', optionName: "centerButtonStroke", optionValue: string): void; + + /** + * Returns the width of the outline of the inner rings of the menu. + */ + igRadialMenu(optionLiteral: 'option', optionName: "centerButtonStrokeThickness"): number; + + /** + * Returns or sets the width of the outline of the inner rings of the menu. + * + * @optionValue New value to be set. + */ + igRadialMenu(optionLiteral: 'option', optionName: "centerButtonStrokeThickness", optionValue: number): void; + + /** + * The font for the control + */ + igRadialMenu(optionLiteral: 'option', optionName: "font"): string; + + /** + * The font for the control + * + * @optionValue New value to be set. + */ + igRadialMenu(optionLiteral: 'option', optionName: "font", optionValue: string): void; + + /** + * Returns a boolean indicating whether the items of the menu are currently displayed. When closed, only the center button is rendered. + */ + igRadialMenu(optionLiteral: 'option', optionName: "isOpen"): boolean; + + /** + * Returns or sets a boolean indicating whether the items of the menu are currently displayed. When closed, only the center button is rendered. + * + * @optionValue New value to be set. + */ + igRadialMenu(optionLiteral: 'option', optionName: "isOpen", optionValue: boolean): void; + + /** + * Returns the brush for the backing of the radial menu. + */ + igRadialMenu(optionLiteral: 'option', optionName: "menuBackground"): string; + + /** + * Returns or sets the brush for the backing of the radial menu. + * + * @optionValue New value to be set. + */ + igRadialMenu(optionLiteral: 'option', optionName: "menuBackground", optionValue: string): void; + + /** + * Returns the duration of the animation performed when the IsOpen property is changed. + */ + igRadialMenu(optionLiteral: 'option', optionName: "menuItemOpenCloseAnimationDuration"): number; + + /** + * Returns or sets the duration of the animation performed when the IsOpen property is changed. + * + * @optionValue New value to be set. + */ + igRadialMenu(optionLiteral: 'option', optionName: "menuItemOpenCloseAnimationDuration", optionValue: number): void; + + /** + * Returns the easing function applied to the animation that occurs when the IsOpen property is changed. + */ + igRadialMenu(optionLiteral: 'option', optionName: "menuItemOpenCloseAnimationEasingFunction"): any; + + /** + * Returns or sets the easing function applied to the animation that occurs when the IsOpen property is changed. + * + * @optionValue New value to be set. + */ + igRadialMenu(optionLiteral: 'option', optionName: "menuItemOpenCloseAnimationEasingFunction", optionValue: any): void; + + /** + * Returns the duration of the animation performed when the IsOpen property is changed. + */ + igRadialMenu(optionLiteral: 'option', optionName: "menuOpenCloseAnimationDuration"): number; + + /** + * Returns or sets the duration of the animation performed when the IsOpen property is changed. + * + * @optionValue New value to be set. + */ + igRadialMenu(optionLiteral: 'option', optionName: "menuOpenCloseAnimationDuration", optionValue: number): void; + + /** + * Returns the easing function applied to the animation that occurs when the IsOpen property is changed. + */ + igRadialMenu(optionLiteral: 'option', optionName: "menuOpenCloseAnimationEasingFunction"): any; + + /** + * Returns or sets the easing function applied to the animation that occurs when the IsOpen property is changed. + * + * @optionValue New value to be set. + */ + igRadialMenu(optionLiteral: 'option', optionName: "menuOpenCloseAnimationEasingFunction", optionValue: any): void; + + /** + * Returns the minimum number of wedges displayed by the menu. + */ + igRadialMenu(optionLiteral: 'option', optionName: "minWedgeCount"): number; + + /** + * Returns or sets the minimum number of wedges displayed by the menu. + * + * @optionValue New value to be set. + */ + igRadialMenu(optionLiteral: 'option', optionName: "minWedgeCount", optionValue: number): void; + + /** + * Returns the background of the outer ring of the menu. + */ + igRadialMenu(optionLiteral: 'option', optionName: "outerRingFill"): string; + + /** + * Returns or sets the background of the outer ring of the menu. + * + * @optionValue New value to be set. + */ + igRadialMenu(optionLiteral: 'option', optionName: "outerRingFill", optionValue: string): void; + + /** + * Returns the thickness of the outer ring of the menu. + */ + igRadialMenu(optionLiteral: 'option', optionName: "outerRingThickness"): number; + + /** + * Returns or sets the thickness of the outer ring of the menu. + * + * @optionValue New value to be set. + */ + igRadialMenu(optionLiteral: 'option', optionName: "outerRingThickness", optionValue: number): void; + + /** + * Returns the brush used for the outline of the outer ring. + */ + igRadialMenu(optionLiteral: 'option', optionName: "outerRingStroke"): string; + + /** + * Returns or sets the brush used for the outline of the outer ring. + * + * @optionValue New value to be set. + */ + igRadialMenu(optionLiteral: 'option', optionName: "outerRingStroke", optionValue: string): void; + + /** + * Returns the width of the outline of the outer ring of the menu. + */ + igRadialMenu(optionLiteral: 'option', optionName: "outerRingStrokeThickness"): number; + + /** + * Returns or sets the width of the outline of the outer ring of the menu. + * + * @optionValue New value to be set. + */ + igRadialMenu(optionLiteral: 'option', optionName: "outerRingStrokeThickness", optionValue: number): void; + + /** + * Returns the starting angle of the items in degrees. + */ + igRadialMenu(optionLiteral: 'option', optionName: "rotationInDegrees"): number; + + /** + * Returns or sets the starting angle of the items in degrees. + * + * @optionValue New value to be set. + */ + igRadialMenu(optionLiteral: 'option', optionName: "rotationInDegrees", optionValue: number): void; + + /** + * Returns the starting angle of the items expressed as the percentage of the width of a single wedge/slice. + */ + igRadialMenu(optionLiteral: 'option', optionName: "rotationAsPercentageOfWedge"): number; + + /** + * Returns or sets the starting angle of the items expressed as the percentage of the width of a single wedge/slice. + * + * @optionValue New value to be set. + */ + igRadialMenu(optionLiteral: 'option', optionName: "rotationAsPercentageOfWedge", optionValue: number): void; + + /** + * Returns the amount of padding around each wedge in degrees. + */ + igRadialMenu(optionLiteral: 'option', optionName: "wedgePaddingInDegrees"): number; + + /** + * Returns or sets the amount of padding around each wedge in degrees. + * + * @optionValue New value to be set. + */ + igRadialMenu(optionLiteral: 'option', optionName: "wedgePaddingInDegrees", optionValue: number): void; + + /** + */ + igRadialMenu(optionLiteral: 'option', optionName: "pixelScalingRatio"): number; + + /** + */ + igRadialMenu(optionLiteral: 'option', optionName: "pixelScalingRatio", optionValue: number): void; + + /** + * Invoked when the IsOpen property is changed to false. + * Function takes a first argument ui. + * Use ui.owner to obtain reference to menu widget. + */ + igRadialMenu(optionLiteral: 'option', optionName: "closed"): ClosedEvent; + + /** + * Invoked when the IsOpen property is changed to false. + * Function takes a first argument ui. + * Use ui.owner to obtain reference to menu widget. + * + * @optionValue New value to be set. + */ + igRadialMenu(optionLiteral: 'option', optionName: "closed", optionValue: ClosedEvent): void; + + /** + * Invoked when the IsOpen property is changed to true. + * Function takes a first argument ui. + * Use ui.owner to obtain reference to menu widget. + */ + igRadialMenu(optionLiteral: 'option', optionName: "opened"): OpenedEvent; + + /** + * Invoked when the IsOpen property is changed to true. + * Function takes a first argument ui. + * Use ui.owner to obtain reference to menu widget. + * + * @optionValue New value to be set. + */ + igRadialMenu(optionLiteral: 'option', optionName: "opened", optionValue: OpenedEvent): void; + igRadialMenu(options: IgRadialMenu): JQuery; + igRadialMenu(optionLiteral: 'option', optionName: string): any; + igRadialMenu(optionLiteral: 'option', options: IgRadialMenu): JQuery; + igRadialMenu(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igRadialMenu(methodName: string, ...methodParams: any[]): any; +} +interface HoverChangeEvent { + (event: Event, ui: HoverChangeEventUIParam): void; +} + +interface HoverChangeEventUIParam { + /** + * Used to get new value. + */ + value?: any; + + /** + * Used to get old value. + */ + oldValue?: any; +} + +interface ValueChangeEvent { + (event: Event, ui: ValueChangeEventUIParam): void; +} + +interface ValueChangeEventUIParam { + /** + * Used to get new value. + */ + value?: any; + + /** + * Used to get old value. + */ + oldValue?: any; +} + +interface IgRating { + /** + * Gets a vertical or horizontal orientation for the votes. + * Change of that option is not supported after igRating was created. + * + */ + vertical?: boolean; + + /** + * Gets/Sets value (selected votes or percent). If the value is of type string, it should be suitable for parsing to number. According to [valueAsPercent](ui.igrating#options:valueAsPercent) options the value is used as number of selected votes or as a percent of the votes. + * + */ + value?: number|string; + + /** + * Gets/Sets value-hover (hovered votes or percent of hovered votes). The default is same as value. If the value is of type string, it should be suitable for parsing to number. According to [valueAsPercent](ui.igrating#options:valueAsPercent) options the valueHover is used as number of hovered votes or as a percent of the hovered votes. + * + */ + valueHover?: number|string; + + /** + * Gets/Sets number of votes. + * + */ + voteCount?: number; + + /** + * Gets/Sets custom width of a vote in pixels. In case of 0 the run time style value is used. + * + */ + voteWidth?: number; + + /** + * Gets/Sets custom height of a vote in pixels. In case of 0 the run time style value is used. + * + */ + voteHeight?: number; + + /** + * Gets the direction of selected and hovered votes. Change of that option is not supported after igRating was created. + * Value true: from left to right or from top to bottom. + * Value false: from right to left or from bottom to left. + * + */ + swapDirection?: boolean; + + /** + * Gets/Sets percent or vote number to measure value and value-hover. + * Value true: value is measured as percent (from 0 to 1). + * Value false: value is measured in number of voted (from 0 to voteCount) + * + */ + valueAsPercent?: boolean; + + /** + * Gets if igRating can have focus. Change of that option is not supported after igRating was created. + * Value true: can get focus and process key events. + * Value false: cannot get focus. + * + */ + focusable?: boolean; + + /** + * Gets/Sets precision. Precision of value and valueHover. + * + * + * Valid values: + * "exact" Value corresponds location of mouse. + * "half" Value is rounded to the half of vote. + * "whole" Value is rounded to the number of votes. + */ + precision?: string; + + /** + * Gets/Sets part of vote-size, which is considered as zero value. + * It has effect only when precision is set to "half" or "whole". + * If user clicks between edge of the first vote and (sizeOfVote * precisionZeroVote), then value is set to 0. + * Same is applied for mouseover as well. + * + */ + precisionZeroVote?: number; + + /** + * Gets/Sets number of decimal places used to round value and value-hover. + * Negative value will disable that option and value will not be rounded. + * Notes: + * If precision is "whole" or "half" and roundedDecimalPlaces is set in range of 0..2, then 3 is used. + * If valueAsPercent is enabled and roundedDecimalPlaces is set to 0, then 1 is used. + * If it is larger than 15, then 15 is used. + * + */ + roundedDecimalPlaces?: number; + + /** + * Gets/Sets selector for css classes. + * That option allows replacing all default css styles by custom values. + * Application should provide css classes for all members defined in the css options with "theme" selector. + * + */ + theme?: string; + + /** + * Gets/Sets object which contains options supported by igValidator. + * Note that for onblur validation depends on the [focusable](ui.igrating#options:focusable) option. + * + */ + validatorOptions?: any; + + /** + * Gets/Sets custom css votes. + * That object should be 2-dimentional array or object with indexes, where every item of first level represents settings for a vote at that index. + * Second level of an item is settings for a vote and it should contain classes for a specific state of vote. + * Item at index [0] on second level is used for css class of vote in normal state. + * Item at index [1] on second level is used for css class of vote in selected state. + * Item at index [2] on second level is used for css class of vote in hover state. + * Examples: + * { 1: { 0: "normalCss", 1: "selectedCss", 2: "hoverCss"} } + * will customize only second vote with [normalCss](ui.igrating#theming:ui-igrating ui-state-default ui-widget-content) for normal state, [hoverCss](ui.igrating#theming:ui-igrating-hover ui-state-hover) for hover state and [selectedCss](ui.igrating#theming:ui-igrating-voteselected) for selected state. + * [[null, 's1', 'h1'], [null, 's2', 'h2'], [null, 's3', 'h3']] + * will customize selected and hover states for first 3 votes with classes h# and s#. + * + */ + cssVotes?: any; + + /** + * Event which is raised before hover value is changed. + * If application returns false, then action is canceled and hover value stays unchanged. + * + * Function takes arguments evt and ui. + * Use ui.value to get new value. + * Use ui.oldValue to get old value. + */ + hoverChange?: HoverChangeEvent; + + /** + * Event which is raised before (selected) value is changed. + * If application returns false, then action is canceled and value stays unchanged. + * + * Function takes arguments evt and ui. + * Use ui.value to get new value. + * Use ui.oldValue to get old value. + */ + valueChange?: ValueChangeEvent; + + /** + * Option for igRating + */ + [optionName: string]: any; +} +interface IgRatingMethods { + /** + * Gets reference to [igValidator](ui.igvalidator) used by igRating. + * + * @param destroy Request to destroy validator. + */ + validator(destroy?: boolean): Object; + + /** + * Triggers validation. + */ + validate(): boolean; + + /** + * Gets/Sets (selected) value. + * + * @param val New value which is rendered with selected css. + * @return number|object If parameter is not 'number', then exact value rendered with selected css is returned. Otherwise, reference to igRating is returned. + */ + value(val: number): number|Object; + + /** + * Gets/Sets hover value. + * + * @param val New value which will be rendered with hover css when rating gets mouse. + * @return number|object If parameter is not "number", then last value which was rendered with hover css is returned. Otherwise, reference to igRating is returned. + */ + valueHover(val?: number): number|Object; + + /** + * Checks if igRating has focus. + */ + hasFocus(): boolean; + + /** + * Sets focus to igRating. That has effect only when options.focusable is enabled. + */ + focus(): Object; + + /** + * Destroys igRating widget. + */ + destroy(): Object; +} +interface JQuery { + data(propertyName: "igRating"): IgRatingMethods; +} + +interface JQuery { + igRating(methodName: "validator", destroy?: boolean): Object; + igRating(methodName: "validate"): boolean; + igRating(methodName: "value", val: number): number|Object; + igRating(methodName: "valueHover", val?: number): number|Object; + igRating(methodName: "hasFocus"): boolean; + igRating(methodName: "focus"): Object; + igRating(methodName: "destroy"): Object; + + /** + * Gets a vertical or horizontal orientation for the votes. + * Change of that option is not supported after igRating was created. + * + */ + igRating(optionLiteral: 'option', optionName: "vertical"): boolean; + + /** + * A vertical or horizontal orientation for the votes. + * Change of that option is not supported after igRating was created. + * + * + * @optionValue New value to be set. + */ + igRating(optionLiteral: 'option', optionName: "vertical", optionValue: boolean): void; + + /** + * Gets/Sets value (selected votes or percent). If the value is of type string, it should be suitable for parsing to number. According to [valueAsPercent](ui.igrating#options:valueAsPercent) options the value is used as number of selected votes or as a percent of the votes. + * + */ + igRating(optionLiteral: 'option', optionName: "value"): number|string; + + /** + * /Sets value (selected votes or percent). If the value is of type string, it should be suitable for parsing to number. According to [valueAsPercent](ui.igrating#options:valueAsPercent) options the value is used as number of selected votes or as a percent of the votes. + * + * + * @optionValue New value to be set. + */ + igRating(optionLiteral: 'option', optionName: "value", optionValue: number|string): void; + + /** + * Gets/Sets value-hover (hovered votes or percent of hovered votes). The default is same as value. If the value is of type string, it should be suitable for parsing to number. According to [valueAsPercent](ui.igrating#options:valueAsPercent) options the valueHover is used as number of hovered votes or as a percent of the hovered votes. + * + */ + igRating(optionLiteral: 'option', optionName: "valueHover"): number|string; + + /** + * /Sets value-hover (hovered votes or percent of hovered votes). The default is same as value. If the value is of type string, it should be suitable for parsing to number. According to [valueAsPercent](ui.igrating#options:valueAsPercent) options the valueHover is used as number of hovered votes or as a percent of the hovered votes. + * + * + * @optionValue New value to be set. + */ + igRating(optionLiteral: 'option', optionName: "valueHover", optionValue: number|string): void; + + /** + * Gets/Sets number of votes. + * + */ + igRating(optionLiteral: 'option', optionName: "voteCount"): number; + + /** + * /Sets number of votes. + * + * + * @optionValue New value to be set. + */ + igRating(optionLiteral: 'option', optionName: "voteCount", optionValue: number): void; + + /** + * Gets/Sets custom width of a vote in pixels. In case of 0 the run time style value is used. + * + */ + igRating(optionLiteral: 'option', optionName: "voteWidth"): number; + + /** + * /Sets custom width of a vote in pixels. In case of 0 the run time style value is used. + * + * + * @optionValue New value to be set. + */ + igRating(optionLiteral: 'option', optionName: "voteWidth", optionValue: number): void; + + /** + * Gets/Sets custom height of a vote in pixels. In case of 0 the run time style value is used. + * + */ + igRating(optionLiteral: 'option', optionName: "voteHeight"): number; + + /** + * /Sets custom height of a vote in pixels. In case of 0 the run time style value is used. + * + * + * @optionValue New value to be set. + */ + igRating(optionLiteral: 'option', optionName: "voteHeight", optionValue: number): void; + + /** + * Gets the direction of selected and hovered votes. Change of that option is not supported after igRating was created. + * Value true: from left to right or from top to bottom. + * Value false: from right to left or from bottom to left. + * + */ + igRating(optionLiteral: 'option', optionName: "swapDirection"): boolean; + + /** + * The direction of selected and hovered votes. Change of that option is not supported after igRating was created. + * Value true: from left to right or from top to bottom. + * Value false: from right to left or from bottom to left. + * + * + * @optionValue New value to be set. + */ + igRating(optionLiteral: 'option', optionName: "swapDirection", optionValue: boolean): void; + + /** + * Gets/Sets percent or vote number to measure value and value-hover. + * Value true: value is measured as percent (from 0 to 1). + * Value false: value is measured in number of voted (from 0 to voteCount) + * + */ + igRating(optionLiteral: 'option', optionName: "valueAsPercent"): boolean; + + /** + * /Sets percent or vote number to measure value and value-hover. + * Value true: value is measured as percent (from 0 to 1). + * Value false: value is measured in number of voted (from 0 to voteCount) + * + * + * @optionValue New value to be set. + */ + igRating(optionLiteral: 'option', optionName: "valueAsPercent", optionValue: boolean): void; + + /** + * Gets if igRating can have focus. Change of that option is not supported after igRating was created. + * Value true: can get focus and process key events. + * Value false: cannot get focus. + * + */ + igRating(optionLiteral: 'option', optionName: "focusable"): boolean; + + /** + * If igRating can have focus. Change of that option is not supported after igRating was created. + * Value true: can get focus and process key events. + * Value false: cannot get focus. + * + * + * @optionValue New value to be set. + */ + igRating(optionLiteral: 'option', optionName: "focusable", optionValue: boolean): void; + + /** + * Gets/Sets precision. Precision of value and valueHover. + * + */ + igRating(optionLiteral: 'option', optionName: "precision"): string; + + /** + * /Sets precision. Precision of value and valueHover. + * + * + * @optionValue New value to be set. + */ + igRating(optionLiteral: 'option', optionName: "precision", optionValue: string): void; + + /** + * Gets/Sets part of vote-size, which is considered as zero value. + * It has effect only when precision is set to "half" or "whole". + * If user clicks between edge of the first vote and (sizeOfVote * precisionZeroVote), then value is set to 0. + * Same is applied for mouseover as well. + * + */ + igRating(optionLiteral: 'option', optionName: "precisionZeroVote"): number; + + /** + * /Sets part of vote-size, which is considered as zero value. + * It has effect only when precision is set to "half" or "whole". + * If user clicks between edge of the first vote and (sizeOfVote * precisionZeroVote), then value is set to 0. + * Same is applied for mouseover as well. + * + * + * @optionValue New value to be set. + */ + igRating(optionLiteral: 'option', optionName: "precisionZeroVote", optionValue: number): void; + + /** + * Gets/Sets number of decimal places used to round value and value-hover. + * Negative value will disable that option and value will not be rounded. + * Notes: + * If precision is "whole" or "half" and roundedDecimalPlaces is set in range of 0..2, then 3 is used. + * If valueAsPercent is enabled and roundedDecimalPlaces is set to 0, then 1 is used. + * If it is larger than 15, then 15 is used. + * + */ + igRating(optionLiteral: 'option', optionName: "roundedDecimalPlaces"): number; + + /** + * /Sets number of decimal places used to round value and value-hover. + * Negative value will disable that option and value will not be rounded. + * Notes: + * If precision is "whole" or "half" and roundedDecimalPlaces is set in range of 0..2, then 3 is used. + * If valueAsPercent is enabled and roundedDecimalPlaces is set to 0, then 1 is used. + * If it is larger than 15, then 15 is used. + * + * + * @optionValue New value to be set. + */ + igRating(optionLiteral: 'option', optionName: "roundedDecimalPlaces", optionValue: number): void; + + /** + * Gets/Sets selector for css classes. + * That option allows replacing all default css styles by custom values. + * Application should provide css classes for all members defined in the css options with "theme" selector. + * + */ + igRating(optionLiteral: 'option', optionName: "theme"): string; + + /** + * /Sets selector for css classes. + * That option allows replacing all default css styles by custom values. + * Application should provide css classes for all members defined in the css options with "theme" selector. + * + * + * @optionValue New value to be set. + */ + igRating(optionLiteral: 'option', optionName: "theme", optionValue: string): void; + + /** + * Gets/Sets object which contains options supported by igValidator. + * Note that for onblur validation depends on the [focusable](ui.igrating#options:focusable) option. + * + */ + igRating(optionLiteral: 'option', optionName: "validatorOptions"): any; + + /** + * /Sets object which contains options supported by igValidator. + * Note that for onblur validation depends on the [focusable](ui.igrating#options:focusable) option. + * + * + * @optionValue New value to be set. + */ + igRating(optionLiteral: 'option', optionName: "validatorOptions", optionValue: any): void; + + /** + * Gets/Sets custom css votes. + * That object should be 2-dimentional array or object with indexes, where every item of first level represents settings for a vote at that index. + * Second level of an item is settings for a vote and it should contain classes for a specific state of vote. + * Item at index [0] on second level is used for css class of vote in normal state. + * Item at index [1] on second level is used for css class of vote in selected state. + * Item at index [2] on second level is used for css class of vote in hover state. + * Examples: + * { 1: { 0: "normalCss", 1: "selectedCss", 2: "hoverCss"} } + * will customize only second vote with [normalCss](ui.igrating#theming:ui-igrating ui-state-default ui-widget-content) for normal state, [hoverCss](ui.igrating#theming:ui-igrating-hover ui-state-hover) for hover state and [selectedCss](ui.igrating#theming:ui-igrating-voteselected) for selected state. + * [[null, 's1', 'h1'], [null, 's2', 'h2'], [null, 's3', 'h3']] + * will customize selected and hover states for first 3 votes with classes h# and s#. + * + */ + igRating(optionLiteral: 'option', optionName: "cssVotes"): any; + + /** + * /Sets custom css votes. + * That object should be 2-dimentional array or object with indexes, where every item of first level represents settings for a vote at that index. + * Second level of an item is settings for a vote and it should contain classes for a specific state of vote. + * Item at index [0] on second level is used for css class of vote in normal state. + * Item at index [1] on second level is used for css class of vote in selected state. + * Item at index [2] on second level is used for css class of vote in hover state. + * Examples: + * { 1: { 0: "normalCss", 1: "selectedCss", 2: "hoverCss"} } + * will customize only second vote with [normalCss](ui.igrating#theming:ui-igrating ui-state-default ui-widget-content) for normal state, [hoverCss](ui.igrating#theming:ui-igrating-hover ui-state-hover) for hover state and [selectedCss](ui.igrating#theming:ui-igrating-voteselected) for selected state. + * [[null, 's1', 'h1'], [null, 's2', 'h2'], [null, 's3', 'h3']] + * will customize selected and hover states for first 3 votes with classes h# and s#. + * + * + * @optionValue New value to be set. + */ + igRating(optionLiteral: 'option', optionName: "cssVotes", optionValue: any): void; + + /** + * Event which is raised before hover value is changed. + * If application returns false, then action is canceled and hover value stays unchanged. + * + * Function takes arguments evt and ui. + * Use ui.value to get new value. + * Use ui.oldValue to get old value. + */ + igRating(optionLiteral: 'option', optionName: "hoverChange"): HoverChangeEvent; + + /** + * Event which is raised before hover value is changed. + * If application returns false, then action is canceled and hover value stays unchanged. + * + * Function takes arguments evt and ui. + * Use ui.value to get new value. + * Use ui.oldValue to get old value. + * + * @optionValue Define event handler function. + */ + igRating(optionLiteral: 'option', optionName: "hoverChange", optionValue: HoverChangeEvent): void; + + /** + * Event which is raised before (selected) value is changed. + * If application returns false, then action is canceled and value stays unchanged. + * + * Function takes arguments evt and ui. + * Use ui.value to get new value. + * Use ui.oldValue to get old value. + */ + igRating(optionLiteral: 'option', optionName: "valueChange"): ValueChangeEvent; + + /** + * Event which is raised before (selected) value is changed. + * If application returns false, then action is canceled and value stays unchanged. + * + * Function takes arguments evt and ui. + * Use ui.value to get new value. + * Use ui.oldValue to get old value. + * + * @optionValue Define event handler function. + */ + igRating(optionLiteral: 'option', optionName: "valueChange", optionValue: ValueChangeEvent): void; + igRating(options: IgRating): JQuery; + igRating(optionLiteral: 'option', optionName: string): any; + igRating(optionLiteral: 'option', options: IgRating): JQuery; + igRating(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igRating(methodName: string, ...methodParams: any[]): any; +} +interface ScrollingEvent { + (event: Event, ui: ScrollingEventUIParam): void; +} + +interface ScrollingEventUIParam { + /** + * Used to obtain reference to igScroll. + */ + owner?: any; + + /** + * Used to obtain if the content is scrolled by the arrows. 0 - none used, -1 - Arrow Up/Left, 1 - Arrow Down/Right. + */ + smallIncrement?: any; + + /** + * Used to obtain if the content is scrolled by the scrollbar track areas. 0 - none used, -1 - Scrolled Up/Left, 1 - Scrolled Down/Right. + */ + bigIncrement?: any; + + /** + * Used to obtain which axis is being used to scroll - horizontal(true) or vertical(false). + */ + horizontal?: any; + + /** + * Used to obtain how much the content will be scrolled horizontally + */ + stepX?: any; + + /** + * Used to obtain how much the content will be scrolled vertically + */ + stepY?: any; +} + +interface ScrolledEvent { + (event: Event, ui: ScrolledEventUIParam): void; +} + +interface ScrolledEventUIParam { + /** + * Used to obtain reference to igScroll. + */ + owner?: any; + + /** + * Used to obtain if the content is scrolled by the arrows. 0 - none used, -1 - Arrow Up/Left, 1 - Arrow Down/Right. + */ + smallIncrement?: any; + + /** + * Used to obtain if the content is scrolled by the scrollbar track areas. 0 - none used, -1 - Scrolled Up/Left, 1 - Scrolled Down/Right. + */ + bigIncrement?: any; + + /** + * Used to obtain which axis is being used to scroll - horizontal(true) or vertical(false). + */ + horizontal?: any; +} + +interface ThumbDragStartEvent { + (event: Event, ui: ThumbDragStartEventUIParam): void; +} + +interface ThumbDragStartEventUIParam { + /** + * Used to obtain reference to igScroll. + */ + owner?: any; + + /** + * Used to obtain which scrollbar thumb is being used - horizontal(true) or vertical(false). + */ + horizontal?: any; +} + +interface ThumbDragMoveEvent { + (event: Event, ui: ThumbDragMoveEventUIParam): void; +} + +interface ThumbDragMoveEventUIParam { + /** + * Used to obtain reference to igScroll. + */ + owner?: any; + + /** + * Used to obtain which scrollbar thumb is being used - horizontal(true) or vertical(false). + */ + horizontal?: any; + + /** + * Used to obtain how much the content will be scrolled horizontally + */ + stepX?: any; + + /** + * Used to obtain how much the content will be scrolled vertically + */ + stepY?: any; +} + +interface ThumbDragEndEvent { + (event: Event, ui: ThumbDragEndEventUIParam): void; +} + +interface ThumbDragEndEventUIParam { + /** + * Used to obtain reference to igScroll. + */ + owner?: any; + + /** + * Used to obtain which scrollbar thumb is being used - horizontal(true) or vertical(false). + */ + horizontal?: any; +} + +interface IgScroll { + /** + * Sets or gets if the scrollbars should be always visible (on all environments). Otherwise it will be the default behavior. Note: this option is only for the custom scrollbars set through the scrollbarType option. + * + */ + alwaysVisible?: boolean; + + /** + * Sets or gets what type of scrollbars should be using the igScroll (on all environments). + * + * + * Valid values: + * "custom" Custom scrollbars with custom ui and events. + * "native" Native scrollbars + * "none" No scrollbars should be visible + */ + scrollbarType?: string; + + /** + * Sets or gets if igScroll can modify the DOM when it is initialized on certain element so that the content can be scrollable. + * + */ + modifyDOM?: boolean; + + /** + * Sets custom value for how high is actually the content. Useful when wanting to scroll and update the shown content manually. + * + */ + scrollHeight?: number; + + /** + * Sets custom value for what width is actually the content. Useful when wanting to scroll and update the shown content manually. + * + */ + scrollWidth?: number; + + /** + * Sets gets current vertical position of the content. + * + */ + scrollTop?: number; + + /** + * Sets gets current horizontal position of the content. + * + */ + scrollLeft?: number; + + /** + * Sets gets the step of the default scrolling behavior when using mouse wheel + * + */ + wheelStep?: number; + + /** + * Sets gets the step of the default scrolling behavior when using any of the custom scrollbar arrows + * + */ + smallIncrementStep?: number; + + /** + * Sets gets the step of the default scrolling behavior when using any of the custom scrollbar track areas. + * + */ + bigIncrementStep?: number; + + /** + * Sets gets if smoother scrolling with small intertia should be used when using mouse wheel + * + */ + smoothing?: boolean; + + /** + * Sets or gets the modifier for how many pixels will be scrolled when using the mouse wheel once. This is used only for the smooth scrolling behavior. + * + */ + smoothingStep?: number; + + /** + * Sets or gets the modifier for how long the scroll ‘animation’ lasts when using the mouse wheel once. This is used only for the smooth scrolling behavior. + * + */ + smoothingDuration?: number; + + /** + * Sets gets the modifier for how much the inertia scrolls on mobile devices + * + */ + inertiaStep?: number; + + /** + * Sets gets the modifier for how long the inertia last on mobile devices + * + */ + inertiaDuration?: number; + + /** + * Sets gets how much pixels of toleration there will be when initially swiping horizontally. This is to improve swiping up/down without scrolling left/right when not intended due to small deviation left/right + * + */ + swipeToleranceX?: number; + + /** + * Sets gets at least how many times the horizontal speed should be bigger so the inertia proceeds only horizontally without scrolling vertically. This is to improve interactions due to not perfectly swiping left/right with some deviation down/up + * + */ + inertiaDeltaX?: number; + + /** + * Sets gets at least how many times the vertical speed should be bigger so the inertia proceeds only vertically without scrolling horizontally. This is to improve interactions due to not perfectly swiping down/up with some deviation left/right + * + */ + inertiaDeltaY?: number; + + /** + * Sets gets elements that are linked to the main content horizontally. When the content is scrolled on X axis the linked elements scroll accordingly. + * + */ + syncedElemsH?: any[]; + + /** + * Sets gets elements that are linked to the main content vertically. When the content is scrolled on Y axis the linked elements scroll accordingly. + * + */ + syncedElemsV?: any[]; + + /** + * Sets gets html or jQuery element which is used for horizontal scrolling. + * + */ + scrollbarH?: string; + + /** + * Sets gets html or jQuery element which is used for vertical scrolling. + * + */ + scrollbarV?: string; + + /** + * Sets gets if only the linked horizontal scrollbar should be used for horizontal scrolling. Note: The behavior when the linked scrollbar is scrolled in this case should be handled manually. + * + */ + scrollOnlyHBar?: boolean; + + /** + * Sets gets if only the linked vertical scrollbar should be used for vertical scrolling. Note: The behavior when the linked scrollbar is scrolled in this case should be handled manually. + * + */ + scrollOnlyVBar?: boolean; + + /** + * Sets gets html or jQuery element to which the horizontal scrollbar will be appended to. + * + */ + scrollbarHParent?: string; + + /** + * Sets gets html or jQuery element to which the vertical scrollbar will be appended to. + * + */ + scrollbarVParent?: string; + + /** + * Event which is raised after the scroller has been rendered fully + * Function takes arguments evt and args. + * Use evt.originalEvent (with validation for not null of evt) to obtain reference to event of browser. + * Use args.owner to obtain reference to igScroll. + */ + rendered?: RenderedEvent; + + /** + * Event which is raised before scrolling or before each step when having inertia. + * Return false in order to cancel action. + * Function takes arguments evt and args. + * Use evt.originalEvent (with validation for not null of evt) to obtain reference to event of browser. + * Use args.owner to obtain reference to igScroll. + * Use args.smallIncrement to obtain if the content is scrolled by the arrows. 0 - none used, -1 - Arrow Up/Left, 1 - Arrow Down/Right. + * Use args.bigIncrement to obtain if the content is scrolled by the scrollbar track areas. 0 - none used, -1 - Scrolled Up/Left, 1 - Scrolled Down/Right. + * Use args.horizontal to obtain which axis is being used to scroll - horizontal(true) or vertical(false). + * Use args.stepX to obtain how much the content will be scrolled horizontally + * Use args.stepY to obtain how much the content will be scrolled vertically + */ + scrolling?: ScrollingEvent; + + /** + * Event which is raised after scrolling has stopped. + * Function takes arguments evt and args. + * Use evt.originalEvent (with validation for not null of evt) to obtain reference to event of browser. + * Use args.owner to obtain reference to igScroll. + * Use args.smallIncrement to obtain if the content is scrolled by the arrows. 0 - none used, -1 - Arrow Up/Left, 1 - Arrow Down/Right. + * Use args.bigIncrement to obtain if the content is scrolled by the scrollbar track areas. 0 - none used, -1 - Scrolled Up/Left, 1 - Scrolled Down/Right. + * Use args.horizontal to obtain which axis is being used to scroll - horizontal(true) or vertical(false). + */ + scrolled?: ScrolledEvent; + + /** + * Event which is raised when there is mouse click on the scrollbar's thumb drag. + * Function takes arguments evt and args. + * Use evt.originalEvent (with validation for not null of evt) to obtain reference to event of browser. + * Use args.owner to obtain reference to igScroll. + * Use args.horizontal to obtain which scrollbar thumb is being used - horizontal(true) or vertical(false). + */ + thumbDragStart?: ThumbDragStartEvent; + + /** + * Event which is raised when the thumb drag is being moved. + * Return false in order to cancel action. + * Function takes arguments evt and args. + * Use evt.originalEvent (with validation for not null of evt) to obtain reference to event of browser. + * Use args.owner to obtain reference to igScroll. + * Use args.horizontal to obtain which scrollbar thumb is being used - horizontal(true) or vertical(false). + * Use args.stepX to obtain how much the content will be scrolled horizontally + * Use args.stepY to obtain how much the content will be scrolled vertically + */ + thumbDragMove?: ThumbDragMoveEvent; + + /** + * Event which is raised on mouse up from the scrollbar's thumb drag. + * Function takes arguments evt and args. + * Use evt.originalEvent (with validation for not null of evt) to obtain reference to event of browser. + * Use args.owner to obtain reference to igScroll. + * Use args.horizontal to obtain which scrollbar thumb is being used - horizontal(true) or vertical(false). + */ + thumbDragEnd?: ThumbDragEndEvent; + + /** + * Option for igScroll + */ + [optionName: string]: any; +} +interface IgScrollMethods { + refresh(): void; + option(optionName: Object, value: Object): void; + destroy(): void; +} +interface JQuery { + data(propertyName: "igScroll"): IgScrollMethods; +} + +interface JQuery { + igScroll(methodName: "refresh"): void; + igScroll(methodName: "option", optionName: Object, value: Object): void; + igScroll(methodName: "destroy"): void; + + /** + * Sets or gets if the scrollbars should be always visible (on all environments). Otherwise it will be the default behavior. Note: this option is only for the custom scrollbars set through the scrollbarType option. + * + */ + igScroll(optionLiteral: 'option', optionName: "alwaysVisible"): boolean; + + /** + * Sets or gets if the scrollbars should be always visible (on all environments). Otherwise it will be the default behavior. Note: this option is only for the custom scrollbars set through the scrollbarType option. + * + * + * @optionValue New value to be set. + */ + igScroll(optionLiteral: 'option', optionName: "alwaysVisible", optionValue: boolean): void; + + /** + * Sets or gets what type of scrollbars should be using the igScroll (on all environments). + * + */ + igScroll(optionLiteral: 'option', optionName: "scrollbarType"): string; + + /** + * Sets or gets what type of scrollbars should be using the igScroll (on all environments). + * + * + * @optionValue New value to be set. + */ + igScroll(optionLiteral: 'option', optionName: "scrollbarType", optionValue: string): void; + + /** + * Sets or gets if igScroll can modify the DOM when it is initialized on certain element so that the content can be scrollable. + * + */ + igScroll(optionLiteral: 'option', optionName: "modifyDOM"): boolean; + + /** + * Sets or gets if igScroll can modify the DOM when it is initialized on certain element so that the content can be scrollable. + * + * + * @optionValue New value to be set. + */ + igScroll(optionLiteral: 'option', optionName: "modifyDOM", optionValue: boolean): void; + + /** + * Sets custom value for how high is actually the content. Useful when wanting to scroll and update the shown content manually. + * + */ + igScroll(optionLiteral: 'option', optionName: "scrollHeight"): number; + + /** + * Sets custom value for how high is actually the content. Useful when wanting to scroll and update the shown content manually. + * + * + * @optionValue New value to be set. + */ + igScroll(optionLiteral: 'option', optionName: "scrollHeight", optionValue: number): void; + + /** + * Sets custom value for what width is actually the content. Useful when wanting to scroll and update the shown content manually. + * + */ + igScroll(optionLiteral: 'option', optionName: "scrollWidth"): number; + + /** + * Sets custom value for what width is actually the content. Useful when wanting to scroll and update the shown content manually. + * + * + * @optionValue New value to be set. + */ + igScroll(optionLiteral: 'option', optionName: "scrollWidth", optionValue: number): void; + + /** + * Sets gets current vertical position of the content. + * + */ + igScroll(optionLiteral: 'option', optionName: "scrollTop"): number; + + /** + * Sets gets current vertical position of the content. + * + * + * @optionValue New value to be set. + */ + igScroll(optionLiteral: 'option', optionName: "scrollTop", optionValue: number): void; + + /** + * Sets gets current horizontal position of the content. + * + */ + igScroll(optionLiteral: 'option', optionName: "scrollLeft"): number; + + /** + * Sets gets current horizontal position of the content. + * + * + * @optionValue New value to be set. + */ + igScroll(optionLiteral: 'option', optionName: "scrollLeft", optionValue: number): void; + + /** + * Sets gets the step of the default scrolling behavior when using mouse wheel + * + */ + igScroll(optionLiteral: 'option', optionName: "wheelStep"): number; + + /** + * Sets gets the step of the default scrolling behavior when using mouse wheel + * + * + * @optionValue New value to be set. + */ + igScroll(optionLiteral: 'option', optionName: "wheelStep", optionValue: number): void; + + /** + * Sets gets the step of the default scrolling behavior when using any of the custom scrollbar arrows + * + */ + igScroll(optionLiteral: 'option', optionName: "smallIncrementStep"): number; + + /** + * Sets gets the step of the default scrolling behavior when using any of the custom scrollbar arrows + * + * + * @optionValue New value to be set. + */ + igScroll(optionLiteral: 'option', optionName: "smallIncrementStep", optionValue: number): void; + + /** + * Sets gets the step of the default scrolling behavior when using any of the custom scrollbar track areas. + * + */ + igScroll(optionLiteral: 'option', optionName: "bigIncrementStep"): number; + + /** + * Sets gets the step of the default scrolling behavior when using any of the custom scrollbar track areas. + * + * + * @optionValue New value to be set. + */ + igScroll(optionLiteral: 'option', optionName: "bigIncrementStep", optionValue: number): void; + + /** + * Sets gets if smoother scrolling with small intertia should be used when using mouse wheel + * + */ + igScroll(optionLiteral: 'option', optionName: "smoothing"): boolean; + + /** + * Sets gets if smoother scrolling with small intertia should be used when using mouse wheel + * + * + * @optionValue New value to be set. + */ + igScroll(optionLiteral: 'option', optionName: "smoothing", optionValue: boolean): void; + + /** + * Sets or gets the modifier for how many pixels will be scrolled when using the mouse wheel once. This is used only for the smooth scrolling behavior. + * + */ + igScroll(optionLiteral: 'option', optionName: "smoothingStep"): number; + + /** + * Sets or gets the modifier for how many pixels will be scrolled when using the mouse wheel once. This is used only for the smooth scrolling behavior. + * + * + * @optionValue New value to be set. + */ + igScroll(optionLiteral: 'option', optionName: "smoothingStep", optionValue: number): void; + + /** + * Sets or gets the modifier for how long the scroll ‘animation’ lasts when using the mouse wheel once. This is used only for the smooth scrolling behavior. + * + */ + igScroll(optionLiteral: 'option', optionName: "smoothingDuration"): number; + + /** + * Sets or gets the modifier for how long the scroll ‘animation’ lasts when using the mouse wheel once. This is used only for the smooth scrolling behavior. + * + * + * @optionValue New value to be set. + */ + igScroll(optionLiteral: 'option', optionName: "smoothingDuration", optionValue: number): void; + + /** + * Sets gets the modifier for how much the inertia scrolls on mobile devices + * + */ + igScroll(optionLiteral: 'option', optionName: "inertiaStep"): number; + + /** + * Sets gets the modifier for how much the inertia scrolls on mobile devices + * + * + * @optionValue New value to be set. + */ + igScroll(optionLiteral: 'option', optionName: "inertiaStep", optionValue: number): void; + + /** + * Sets gets the modifier for how long the inertia last on mobile devices + * + */ + igScroll(optionLiteral: 'option', optionName: "inertiaDuration"): number; + + /** + * Sets gets the modifier for how long the inertia last on mobile devices + * + * + * @optionValue New value to be set. + */ + igScroll(optionLiteral: 'option', optionName: "inertiaDuration", optionValue: number): void; + + /** + * Sets gets how much pixels of toleration there will be when initially swiping horizontally. This is to improve swiping up/down without scrolling left/right when not intended due to small deviation left/right + * + */ + igScroll(optionLiteral: 'option', optionName: "swipeToleranceX"): number; + + /** + * Sets gets how much pixels of toleration there will be when initially swiping horizontally. This is to improve swiping up/down without scrolling left/right when not intended due to small deviation left/right + * + * + * @optionValue New value to be set. + */ + igScroll(optionLiteral: 'option', optionName: "swipeToleranceX", optionValue: number): void; + + /** + * Sets gets at least how many times the horizontal speed should be bigger so the inertia proceeds only horizontally without scrolling vertically. This is to improve interactions due to not perfectly swiping left/right with some deviation down/up + * + */ + igScroll(optionLiteral: 'option', optionName: "inertiaDeltaX"): number; + + /** + * Sets gets at least how many times the horizontal speed should be bigger so the inertia proceeds only horizontally without scrolling vertically. This is to improve interactions due to not perfectly swiping left/right with some deviation down/up + * + * + * @optionValue New value to be set. + */ + igScroll(optionLiteral: 'option', optionName: "inertiaDeltaX", optionValue: number): void; + + /** + * Sets gets at least how many times the vertical speed should be bigger so the inertia proceeds only vertically without scrolling horizontally. This is to improve interactions due to not perfectly swiping down/up with some deviation left/right + * + */ + igScroll(optionLiteral: 'option', optionName: "inertiaDeltaY"): number; + + /** + * Sets gets at least how many times the vertical speed should be bigger so the inertia proceeds only vertically without scrolling horizontally. This is to improve interactions due to not perfectly swiping down/up with some deviation left/right + * + * + * @optionValue New value to be set. + */ + igScroll(optionLiteral: 'option', optionName: "inertiaDeltaY", optionValue: number): void; + + /** + * Sets gets elements that are linked to the main content horizontally. When the content is scrolled on X axis the linked elements scroll accordingly. + * + */ + igScroll(optionLiteral: 'option', optionName: "syncedElemsH"): any[]; + + /** + * Sets gets elements that are linked to the main content horizontally. When the content is scrolled on X axis the linked elements scroll accordingly. + * + * + * @optionValue New value to be set. + */ + igScroll(optionLiteral: 'option', optionName: "syncedElemsH", optionValue: any[]): void; + + /** + * Sets gets elements that are linked to the main content vertically. When the content is scrolled on Y axis the linked elements scroll accordingly. + * + */ + igScroll(optionLiteral: 'option', optionName: "syncedElemsV"): any[]; + + /** + * Sets gets elements that are linked to the main content vertically. When the content is scrolled on Y axis the linked elements scroll accordingly. + * + * + * @optionValue New value to be set. + */ + igScroll(optionLiteral: 'option', optionName: "syncedElemsV", optionValue: any[]): void; + + /** + * Sets gets html or jQuery element which is used for horizontal scrolling. + * + */ + igScroll(optionLiteral: 'option', optionName: "scrollbarH"): string; + + /** + * Sets gets html or jQuery element which is used for horizontal scrolling. + * + * + * @optionValue New value to be set. + */ + igScroll(optionLiteral: 'option', optionName: "scrollbarH", optionValue: string): void; + + /** + * Sets gets html or jQuery element which is used for vertical scrolling. + * + */ + igScroll(optionLiteral: 'option', optionName: "scrollbarV"): string; + + /** + * Sets gets html or jQuery element which is used for vertical scrolling. + * + * + * @optionValue New value to be set. + */ + igScroll(optionLiteral: 'option', optionName: "scrollbarV", optionValue: string): void; + + /** + * Sets gets if only the linked horizontal scrollbar should be used for horizontal scrolling. Note: The behavior when the linked scrollbar is scrolled in this case should be handled manually. + * + */ + igScroll(optionLiteral: 'option', optionName: "scrollOnlyHBar"): boolean; + + /** + * Sets gets if only the linked horizontal scrollbar should be used for horizontal scrolling. Note: The behavior when the linked scrollbar is scrolled in this case should be handled manually. + * + * + * @optionValue New value to be set. + */ + igScroll(optionLiteral: 'option', optionName: "scrollOnlyHBar", optionValue: boolean): void; + + /** + * Sets gets if only the linked vertical scrollbar should be used for vertical scrolling. Note: The behavior when the linked scrollbar is scrolled in this case should be handled manually. + * + */ + igScroll(optionLiteral: 'option', optionName: "scrollOnlyVBar"): boolean; + + /** + * Sets gets if only the linked vertical scrollbar should be used for vertical scrolling. Note: The behavior when the linked scrollbar is scrolled in this case should be handled manually. + * + * + * @optionValue New value to be set. + */ + igScroll(optionLiteral: 'option', optionName: "scrollOnlyVBar", optionValue: boolean): void; + + /** + * Sets gets html or jQuery element to which the horizontal scrollbar will be appended to. + * + */ + igScroll(optionLiteral: 'option', optionName: "scrollbarHParent"): string; + + /** + * Sets gets html or jQuery element to which the horizontal scrollbar will be appended to. + * + * + * @optionValue New value to be set. + */ + igScroll(optionLiteral: 'option', optionName: "scrollbarHParent", optionValue: string): void; + + /** + * Sets gets html or jQuery element to which the vertical scrollbar will be appended to. + * + */ + igScroll(optionLiteral: 'option', optionName: "scrollbarVParent"): string; + + /** + * Sets gets html or jQuery element to which the vertical scrollbar will be appended to. + * + * + * @optionValue New value to be set. + */ + igScroll(optionLiteral: 'option', optionName: "scrollbarVParent", optionValue: string): void; + + /** + * Event which is raised after the scroller has been rendered fully + * Function takes arguments evt and args. + * Use evt.originalEvent (with validation for not null of evt) to obtain reference to event of browser. + * Use args.owner to obtain reference to igScroll. + */ + igScroll(optionLiteral: 'option', optionName: "rendered"): RenderedEvent; + + /** + * Event which is raised after the scroller has been rendered fully + * Function takes arguments evt and args. + * Use evt.originalEvent (with validation for not null of evt) to obtain reference to event of browser. + * Use args.owner to obtain reference to igScroll. + * + * @optionValue Define event handler function. + */ + igScroll(optionLiteral: 'option', optionName: "rendered", optionValue: RenderedEvent): void; + + /** + * Event which is raised before scrolling or before each step when having inertia. + * Return false in order to cancel action. + * Function takes arguments evt and args. + * Use evt.originalEvent (with validation for not null of evt) to obtain reference to event of browser. + * Use args.owner to obtain reference to igScroll. + * Use args.smallIncrement to obtain if the content is scrolled by the arrows. 0 - none used, -1 - Arrow Up/Left, 1 - Arrow Down/Right. + * Use args.bigIncrement to obtain if the content is scrolled by the scrollbar track areas. 0 - none used, -1 - Scrolled Up/Left, 1 - Scrolled Down/Right. + * Use args.horizontal to obtain which axis is being used to scroll - horizontal(true) or vertical(false). + * Use args.stepX to obtain how much the content will be scrolled horizontally + * Use args.stepY to obtain how much the content will be scrolled vertically + */ + igScroll(optionLiteral: 'option', optionName: "scrolling"): ScrollingEvent; + + /** + * Event which is raised before scrolling or before each step when having inertia. + * Return false in order to cancel action. + * Function takes arguments evt and args. + * Use evt.originalEvent (with validation for not null of evt) to obtain reference to event of browser. + * Use args.owner to obtain reference to igScroll. + * Use args.smallIncrement to obtain if the content is scrolled by the arrows. 0 - none used, -1 - Arrow Up/Left, 1 - Arrow Down/Right. + * Use args.bigIncrement to obtain if the content is scrolled by the scrollbar track areas. 0 - none used, -1 - Scrolled Up/Left, 1 - Scrolled Down/Right. + * Use args.horizontal to obtain which axis is being used to scroll - horizontal(true) or vertical(false). + * Use args.stepX to obtain how much the content will be scrolled horizontally + * Use args.stepY to obtain how much the content will be scrolled vertically + * + * @optionValue Define event handler function. + */ + igScroll(optionLiteral: 'option', optionName: "scrolling", optionValue: ScrollingEvent): void; + + /** + * Event which is raised after scrolling has stopped. + * Function takes arguments evt and args. + * Use evt.originalEvent (with validation for not null of evt) to obtain reference to event of browser. + * Use args.owner to obtain reference to igScroll. + * Use args.smallIncrement to obtain if the content is scrolled by the arrows. 0 - none used, -1 - Arrow Up/Left, 1 - Arrow Down/Right. + * Use args.bigIncrement to obtain if the content is scrolled by the scrollbar track areas. 0 - none used, -1 - Scrolled Up/Left, 1 - Scrolled Down/Right. + * Use args.horizontal to obtain which axis is being used to scroll - horizontal(true) or vertical(false). + */ + igScroll(optionLiteral: 'option', optionName: "scrolled"): ScrolledEvent; + + /** + * Event which is raised after scrolling has stopped. + * Function takes arguments evt and args. + * Use evt.originalEvent (with validation for not null of evt) to obtain reference to event of browser. + * Use args.owner to obtain reference to igScroll. + * Use args.smallIncrement to obtain if the content is scrolled by the arrows. 0 - none used, -1 - Arrow Up/Left, 1 - Arrow Down/Right. + * Use args.bigIncrement to obtain if the content is scrolled by the scrollbar track areas. 0 - none used, -1 - Scrolled Up/Left, 1 - Scrolled Down/Right. + * Use args.horizontal to obtain which axis is being used to scroll - horizontal(true) or vertical(false). + * + * @optionValue Define event handler function. + */ + igScroll(optionLiteral: 'option', optionName: "scrolled", optionValue: ScrolledEvent): void; + + /** + * Event which is raised when there is mouse click on the scrollbar's thumb drag. + * Function takes arguments evt and args. + * Use evt.originalEvent (with validation for not null of evt) to obtain reference to event of browser. + * Use args.owner to obtain reference to igScroll. + * Use args.horizontal to obtain which scrollbar thumb is being used - horizontal(true) or vertical(false). + */ + igScroll(optionLiteral: 'option', optionName: "thumbDragStart"): ThumbDragStartEvent; + + /** + * Event which is raised when there is mouse click on the scrollbar's thumb drag. + * Function takes arguments evt and args. + * Use evt.originalEvent (with validation for not null of evt) to obtain reference to event of browser. + * Use args.owner to obtain reference to igScroll. + * Use args.horizontal to obtain which scrollbar thumb is being used - horizontal(true) or vertical(false). + * + * @optionValue Define event handler function. + */ + igScroll(optionLiteral: 'option', optionName: "thumbDragStart", optionValue: ThumbDragStartEvent): void; + + /** + * Event which is raised when the thumb drag is being moved. + * Return false in order to cancel action. + * Function takes arguments evt and args. + * Use evt.originalEvent (with validation for not null of evt) to obtain reference to event of browser. + * Use args.owner to obtain reference to igScroll. + * Use args.horizontal to obtain which scrollbar thumb is being used - horizontal(true) or vertical(false). + * Use args.stepX to obtain how much the content will be scrolled horizontally + * Use args.stepY to obtain how much the content will be scrolled vertically + */ + igScroll(optionLiteral: 'option', optionName: "thumbDragMove"): ThumbDragMoveEvent; + + /** + * Event which is raised when the thumb drag is being moved. + * Return false in order to cancel action. + * Function takes arguments evt and args. + * Use evt.originalEvent (with validation for not null of evt) to obtain reference to event of browser. + * Use args.owner to obtain reference to igScroll. + * Use args.horizontal to obtain which scrollbar thumb is being used - horizontal(true) or vertical(false). + * Use args.stepX to obtain how much the content will be scrolled horizontally + * Use args.stepY to obtain how much the content will be scrolled vertically + * + * @optionValue Define event handler function. + */ + igScroll(optionLiteral: 'option', optionName: "thumbDragMove", optionValue: ThumbDragMoveEvent): void; + + /** + * Event which is raised on mouse up from the scrollbar's thumb drag. + * Function takes arguments evt and args. + * Use evt.originalEvent (with validation for not null of evt) to obtain reference to event of browser. + * Use args.owner to obtain reference to igScroll. + * Use args.horizontal to obtain which scrollbar thumb is being used - horizontal(true) or vertical(false). + */ + igScroll(optionLiteral: 'option', optionName: "thumbDragEnd"): ThumbDragEndEvent; + + /** + * Event which is raised on mouse up from the scrollbar's thumb drag. + * Function takes arguments evt and args. + * Use evt.originalEvent (with validation for not null of evt) to obtain reference to event of browser. + * Use args.owner to obtain reference to igScroll. + * Use args.horizontal to obtain which scrollbar thumb is being used - horizontal(true) or vertical(false). + * + * @optionValue Define event handler function. + */ + igScroll(optionLiteral: 'option', optionName: "thumbDragEnd", optionValue: ThumbDragEndEvent): void; + igScroll(options: IgScroll): JQuery; + igScroll(optionLiteral: 'option', optionName: string): any; + igScroll(optionLiteral: 'option', options: IgScroll): JQuery; + igScroll(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igScroll(methodName: string, ...methodParams: any[]): any; +} +interface IgLoading { + cssClass?: any; + includeVerticalOffset?: boolean; + + /** + * Option for igLoading + */ + [optionName: string]: any; +} +interface IgLoadingMethods { + indicatorElement(): void; + indicator(): void; + show(refresh: Object): void; + hide(): void; + refreshPos(): void; + destroy(): void; +} +interface JQuery { + data(propertyName: "igLoading"): IgLoadingMethods; +} + +interface IgSliderBookmarks { + /** + * Get or set the bookmark value. Should be between slider min and max values. + */ + value?: number; + + /** + * Get or set the bookmark title. Show in tooltip on hover. + */ + title?: string; + + /** + * Get or set whether the bookmark is disabled or not. + */ + disabled?: boolean; + + /** + * Get or set a custom css class to be applied to the bookmark anchor element. + */ + css?: string; + + /** + * Option for IgSliderBookmarks + */ + [optionName: string]: any; +} + +interface StartEvent { + (event: Event, ui: StartEventUIParam): void; +} + +interface StartEventUIParam { +} + +interface SlideEvent { + (event: Event, ui: SlideEventUIParam): void; +} + +interface SlideEventUIParam { +} + +interface StopEvent { + (event: Event, ui: StopEventUIParam): void; +} + +interface StopEventUIParam { +} + +interface ChangeEvent { + (event: Event, ui: ChangeEventUIParam): void; +} + +interface ChangeEventUIParam { +} + +interface BookmarkHitEvent { + (event: Event, ui: BookmarkHitEventUIParam): void; +} + +interface BookmarkHitEventUIParam { +} + +interface BookmarkClickEvent { + (event: Event, ui: BookmarkClickEventUIParam): void; +} + +interface BookmarkClickEventUIParam { +} + +interface IgSlider { + /** + * Get or set whether the slide handle will animate when it is moved. + */ + animate?: boolean; + + /** + * Get or set the slider range maximum value. + */ + max?: number; + + /** + * Get or set the slider range minimum value. + */ + min?: number; + + /** + * Get or set the slider orientation. + */ + orientation?: any; + + /** + * Get or set the step with which the value is increased. + */ + step?: number; + + /** + * Get or set the slider value. + */ + value?: number; + + /** + * Get or set the bookmarks array. + */ + bookmarks?: IgSliderBookmarks; + + /** + * Get or set the whether to show bookmarks title on bookmark hover or not. + */ + showBookmarkTitle?: boolean; + + /** + * Get or set whether the handle will be moved to the bookmark position when a bookmark is clicked. + */ + syncHandleWithBookmark?: boolean; + + /** + * Defines the slide start event. + */ + start?: StartEvent; + + /** + * Defines the slide event. Fired when the user is sliding with mouse. + */ + slide?: SlideEvent; + + /** + * Defines the slide stop event. Fired to mark the end of a sliding action. + */ + stop?: StopEvent; + + /** + * Defines the slider value change event. Fired when the value of the slider changes. It fires after the slide event. + */ + change?: ChangeEvent; + + /** + * Defines the slider bookmark hit event. Fired when the slider handle passes after the bookmark value. + */ + bookmarkHit?: BookmarkHitEvent; + + /** + * Defines the slider bookmark click event. Fired when a bookmark is clicked. + */ + bookmarkClick?: BookmarkClickEvent; + + /** + * Option for igSlider + */ + [optionName: string]: any; +} +interface IgSliderMethods { + widget(): void; + destroy(): void; + clearBookmarks(): void; + value(newValue: Object): void; +} +interface JQuery { + data(propertyName: "igSlider"): IgSliderMethods; +} + +interface IgProgressBar { + animate?: boolean; + animateTimeout?: number; + max?: number; + min?: number; + orientation?: string; + value?: number; + width?: string; + height?: string; + range?: boolean; + + /** + * A Boolean indicating whether to place the animation in the effects queue. If false, the animation will begin immediately. + */ + queue?: boolean; + endValue?: number; + change?: ChangeEvent; + + /** + * Option for igProgressBar + */ + [optionName: string]: any; +} +interface IgProgressBarMethods { + widget(): void; + destroy(): void; + value(newValue: Object): void; +} +interface JQuery { + data(propertyName: "igProgressBar"): IgProgressBarMethods; +} + +interface IgButtonLink { + href?: any; + target?: any; + title?: any; + + /** + * Option for IgButtonLink + */ + [optionName: string]: any; +} + +interface IgButtonIcons { + primary?: any; + secondary?: any; + + /** + * Option for IgButtonIcons + */ + [optionName: string]: any; +} + +interface IgButton { + width?: any; + height?: any; + link?: IgButtonLink; + labelText?: string; + centerLabel?: boolean; + css?: any; + onlyIcons?: boolean; + icons?: IgButtonIcons; + title?: boolean; + + /** + * Option for igButton + */ + [optionName: string]: any; +} +interface IgButtonMethods { + setTitle(title: Object): void; + widget(): void; + destroy(): void; +} +interface JQuery { + data(propertyName: "igButton"): IgButtonMethods; +} + +interface IgTooltip { + text?: string; + arrowLocation?: string; + + /** + * Option for igTooltip + */ + [optionName: string]: any; +} +interface IgTooltipMethods { + destroy(): void; +} +interface JQuery { + data(propertyName: "igTooltip"): IgTooltipMethods; +} + +interface CaptureEvent { + (event: Event, ui: CaptureEventUIParam): void; +} + +interface CaptureEventUIParam { +} + +interface MouseWrapper { + cancel?: string; + distance?: number; + delay?: number; + start?: StartEvent; + drag?: DragEvent; + stop?: StopEvent; + capture?: CaptureEvent; + + /** + * Option for mouseWrapper + */ + [optionName: string]: any; +} +interface MouseWrapperMethods { + destroy(): void; +} +interface JQuery { + data(propertyName: "mouseWrapper"): MouseWrapperMethods; +} + +interface IgResponsiveContainer { + /** + * The time between two resize checks in milliseconds. + */ + pollingInterval?: number; + + /** + * Option for igResponsiveContainer + */ + [optionName: string]: any; +} +interface IgResponsiveContainerMethods { + /** + * Destroys the ResponsiveContainer widget + */ + destroy(): void; + + /** + * Starts the automatic size check procedure + */ + startPoller(): void; + + /** + * Stops the automatic size check procedure + */ + stopPoller(): void; + + /** + * Removes a callback from the callbacks collection. + * + * @param callbackId The callback id to remove. + */ + removeCallback(callbackId: number): void; + + /** + * Adds a callback to the callback collection. + * + * @param callback The function to call when requirements are met. + * @param owner The owner object of the function. + * @param reactionStep The sensitivity of the size change recognition. + * @param reactionDirection The dimensions the changes of which to be traced. + */ + addCallback(callback: Function, owner: Object, reactionStep: number, reactionDirection: Object): void; +} +interface JQuery { + data(propertyName: "igResponsiveContainer"): IgResponsiveContainerMethods; +} + +interface JQuery { + igLoading(methodName: "indicatorElement"): void; + igLoading(methodName: "indicator"): void; + igLoading(methodName: "show", refresh: Object): void; + igLoading(methodName: "hide"): void; + igLoading(methodName: "refreshPos"): void; + igLoading(methodName: "destroy"): void; + + /** + */ + igLoading(optionLiteral: 'option', optionName: "cssClass"): any; + + /** + */ + igLoading(optionLiteral: 'option', optionName: "cssClass", optionValue: any): void; + + /** + */ + igLoading(optionLiteral: 'option', optionName: "includeVerticalOffset"): boolean; + + /** + */ + igLoading(optionLiteral: 'option', optionName: "includeVerticalOffset", optionValue: boolean): void; + igLoading(options: IgLoading): JQuery; + igLoading(optionLiteral: 'option', optionName: string): any; + igLoading(optionLiteral: 'option', options: IgLoading): JQuery; + igLoading(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igLoading(methodName: string, ...methodParams: any[]): any; +} +interface JQuery { + igSlider(methodName: "widget"): void; + igSlider(methodName: "destroy"): void; + igSlider(methodName: "clearBookmarks"): void; + igSlider(methodName: "value", newValue: Object): void; + + /** + * Get or set whether the slide handle will animate when it is moved. + */ + igSlider(optionLiteral: 'option', optionName: "animate"): boolean; + + /** + * Get or set whether the slide handle will animate when it is moved. + * + * @optionValue New value to be set. + */ + igSlider(optionLiteral: 'option', optionName: "animate", optionValue: boolean): void; + + /** + * Get or set the slider range maximum value. + */ + igSlider(optionLiteral: 'option', optionName: "max"): number; + + /** + * Get or set the slider range maximum value. + * + * @optionValue New value to be set. + */ + igSlider(optionLiteral: 'option', optionName: "max", optionValue: number): void; + + /** + * Get or set the slider range minimum value. + */ + igSlider(optionLiteral: 'option', optionName: "min"): number; + + /** + * Get or set the slider range minimum value. + * + * @optionValue New value to be set. + */ + igSlider(optionLiteral: 'option', optionName: "min", optionValue: number): void; + + /** + * Get or set the slider orientation. + */ + igSlider(optionLiteral: 'option', optionName: "orientation"): any; + + /** + * Get or set the slider orientation. + * + * @optionValue New value to be set. + */ + igSlider(optionLiteral: 'option', optionName: "orientation", optionValue: any): void; + + /** + * Get or set the step with which the value is increased. + */ + igSlider(optionLiteral: 'option', optionName: "step"): number; + + /** + * Get or set the step with which the value is increased. + * + * @optionValue New value to be set. + */ + igSlider(optionLiteral: 'option', optionName: "step", optionValue: number): void; + + /** + * Get or set the slider value. + */ + igSlider(optionLiteral: 'option', optionName: "value"): number; + + /** + * Get or set the slider value. + * + * @optionValue New value to be set. + */ + igSlider(optionLiteral: 'option', optionName: "value", optionValue: number): void; + + /** + * Get or set the bookmarks array. + */ + igSlider(optionLiteral: 'option', optionName: "bookmarks"): IgSliderBookmarks; + + /** + * Get or set the bookmarks array. + * + * @optionValue New value to be set. + */ + igSlider(optionLiteral: 'option', optionName: "bookmarks", optionValue: IgSliderBookmarks): void; + + /** + * Get or set the whether to show bookmarks title on bookmark hover or not. + */ + igSlider(optionLiteral: 'option', optionName: "showBookmarkTitle"): boolean; + + /** + * Get or set the whether to show bookmarks title on bookmark hover or not. + * + * @optionValue New value to be set. + */ + igSlider(optionLiteral: 'option', optionName: "showBookmarkTitle", optionValue: boolean): void; + + /** + * Get or set whether the handle will be moved to the bookmark position when a bookmark is clicked. + */ + igSlider(optionLiteral: 'option', optionName: "syncHandleWithBookmark"): boolean; + + /** + * Get or set whether the handle will be moved to the bookmark position when a bookmark is clicked. + * + * @optionValue New value to be set. + */ + igSlider(optionLiteral: 'option', optionName: "syncHandleWithBookmark", optionValue: boolean): void; + + /** + * Defines the slide start event. + */ + igSlider(optionLiteral: 'option', optionName: "start"): StartEvent; + + /** + * Defines the slide start event. + * + * @optionValue New value to be set. + */ + igSlider(optionLiteral: 'option', optionName: "start", optionValue: StartEvent): void; + + /** + * Defines the slide event. Fired when the user is sliding with mouse. + */ + igSlider(optionLiteral: 'option', optionName: "slide"): SlideEvent; + + /** + * Defines the slide event. Fired when the user is sliding with mouse. + * + * @optionValue New value to be set. + */ + igSlider(optionLiteral: 'option', optionName: "slide", optionValue: SlideEvent): void; + + /** + * Defines the slide stop event. Fired to mark the end of a sliding action. + */ + igSlider(optionLiteral: 'option', optionName: "stop"): StopEvent; + + /** + * Defines the slide stop event. Fired to mark the end of a sliding action. + * + * @optionValue New value to be set. + */ + igSlider(optionLiteral: 'option', optionName: "stop", optionValue: StopEvent): void; + + /** + * Defines the slider value change event. Fired when the value of the slider changes. It fires after the slide event. + */ + igSlider(optionLiteral: 'option', optionName: "change"): ChangeEvent; + + /** + * Defines the slider value change event. Fired when the value of the slider changes. It fires after the slide event. + * + * @optionValue New value to be set. + */ + igSlider(optionLiteral: 'option', optionName: "change", optionValue: ChangeEvent): void; + + /** + * Defines the slider bookmark hit event. Fired when the slider handle passes after the bookmark value. + */ + igSlider(optionLiteral: 'option', optionName: "bookmarkHit"): BookmarkHitEvent; + + /** + * Defines the slider bookmark hit event. Fired when the slider handle passes after the bookmark value. + * + * @optionValue New value to be set. + */ + igSlider(optionLiteral: 'option', optionName: "bookmarkHit", optionValue: BookmarkHitEvent): void; + + /** + * Defines the slider bookmark click event. Fired when a bookmark is clicked. + */ + igSlider(optionLiteral: 'option', optionName: "bookmarkClick"): BookmarkClickEvent; + + /** + * Defines the slider bookmark click event. Fired when a bookmark is clicked. + * + * @optionValue New value to be set. + */ + igSlider(optionLiteral: 'option', optionName: "bookmarkClick", optionValue: BookmarkClickEvent): void; + igSlider(options: IgSlider): JQuery; + igSlider(optionLiteral: 'option', optionName: string): any; + igSlider(optionLiteral: 'option', options: IgSlider): JQuery; + igSlider(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igSlider(methodName: string, ...methodParams: any[]): any; +} +interface JQuery { + igProgressBar(methodName: "widget"): void; + igProgressBar(methodName: "destroy"): void; + igProgressBar(methodName: "value", newValue: Object): void; + + /** + */ + igProgressBar(optionLiteral: 'option', optionName: "animate"): boolean; + + /** + */ + igProgressBar(optionLiteral: 'option', optionName: "animate", optionValue: boolean): void; + + /** + */ + igProgressBar(optionLiteral: 'option', optionName: "animateTimeout"): number; + + /** + */ + igProgressBar(optionLiteral: 'option', optionName: "animateTimeout", optionValue: number): void; + + /** + */ + igProgressBar(optionLiteral: 'option', optionName: "max"): number; + + /** + */ + igProgressBar(optionLiteral: 'option', optionName: "max", optionValue: number): void; + + /** + */ + igProgressBar(optionLiteral: 'option', optionName: "min"): number; + + /** + */ + igProgressBar(optionLiteral: 'option', optionName: "min", optionValue: number): void; + + /** + */ + igProgressBar(optionLiteral: 'option', optionName: "orientation"): string; + + /** + */ + igProgressBar(optionLiteral: 'option', optionName: "orientation", optionValue: string): void; + + /** + */ + igProgressBar(optionLiteral: 'option', optionName: "value"): number; + + /** + */ + igProgressBar(optionLiteral: 'option', optionName: "value", optionValue: number): void; + + /** + */ + igProgressBar(optionLiteral: 'option', optionName: "width"): string; + + /** + */ + igProgressBar(optionLiteral: 'option', optionName: "width", optionValue: string): void; + + /** + */ + igProgressBar(optionLiteral: 'option', optionName: "height"): string; + + /** + */ + igProgressBar(optionLiteral: 'option', optionName: "height", optionValue: string): void; + + /** + */ + igProgressBar(optionLiteral: 'option', optionName: "range"): boolean; + + /** + */ + igProgressBar(optionLiteral: 'option', optionName: "range", optionValue: boolean): void; + + /** + * A Boolean indicating whether to place the animation in the effects queue. If false, the animation will begin immediately. + */ + igProgressBar(optionLiteral: 'option', optionName: "queue"): boolean; + + /** + * A Boolean indicating whether to place the animation in the effects queue. If false, the animation will begin immediately. + * + * @optionValue New value to be set. + */ + igProgressBar(optionLiteral: 'option', optionName: "queue", optionValue: boolean): void; + + /** + */ + igProgressBar(optionLiteral: 'option', optionName: "endValue"): number; + + /** + */ + igProgressBar(optionLiteral: 'option', optionName: "endValue", optionValue: number): void; + + /** + */ + igProgressBar(optionLiteral: 'option', optionName: "change"): ChangeEvent; + + /** + */ + igProgressBar(optionLiteral: 'option', optionName: "change", optionValue: ChangeEvent): void; + igProgressBar(options: IgProgressBar): JQuery; + igProgressBar(optionLiteral: 'option', optionName: string): any; + igProgressBar(optionLiteral: 'option', options: IgProgressBar): JQuery; + igProgressBar(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igProgressBar(methodName: string, ...methodParams: any[]): any; +} +interface JQuery { + igButton(methodName: "setTitle", title: Object): void; + igButton(methodName: "widget"): void; + igButton(methodName: "destroy"): void; + + /** + */ + igButton(optionLiteral: 'option', optionName: "width"): any; + + /** + */ + igButton(optionLiteral: 'option', optionName: "width", optionValue: any): void; + + /** + */ + igButton(optionLiteral: 'option', optionName: "height"): any; + + /** + */ + igButton(optionLiteral: 'option', optionName: "height", optionValue: any): void; + + /** + */ + igButton(optionLiteral: 'option', optionName: "link"): IgButtonLink; + + /** + */ + igButton(optionLiteral: 'option', optionName: "link", optionValue: IgButtonLink): void; + + /** + */ + igButton(optionLiteral: 'option', optionName: "labelText"): string; + + /** + */ + igButton(optionLiteral: 'option', optionName: "labelText", optionValue: string): void; + + /** + */ + igButton(optionLiteral: 'option', optionName: "centerLabel"): boolean; + + /** + */ + igButton(optionLiteral: 'option', optionName: "centerLabel", optionValue: boolean): void; + + /** + */ + igButton(optionLiteral: 'option', optionName: "css"): any; + + /** + */ + igButton(optionLiteral: 'option', optionName: "css", optionValue: any): void; + + /** + */ + igButton(optionLiteral: 'option', optionName: "onlyIcons"): boolean; + + /** + */ + igButton(optionLiteral: 'option', optionName: "onlyIcons", optionValue: boolean): void; + + /** + */ + igButton(optionLiteral: 'option', optionName: "icons"): IgButtonIcons; + + /** + */ + igButton(optionLiteral: 'option', optionName: "icons", optionValue: IgButtonIcons): void; + + /** + */ + igButton(optionLiteral: 'option', optionName: "title"): boolean; + + /** + */ + igButton(optionLiteral: 'option', optionName: "title", optionValue: boolean): void; + igButton(options: IgButton): JQuery; + igButton(optionLiteral: 'option', optionName: string): any; + igButton(optionLiteral: 'option', options: IgButton): JQuery; + igButton(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igButton(methodName: string, ...methodParams: any[]): any; +} +interface JQuery { + igTooltip(methodName: "destroy"): void; + + /** + */ + igTooltip(optionLiteral: 'option', optionName: "text"): string; + + /** + */ + igTooltip(optionLiteral: 'option', optionName: "text", optionValue: string): void; + + /** + */ + igTooltip(optionLiteral: 'option', optionName: "arrowLocation"): string; + + /** + */ + igTooltip(optionLiteral: 'option', optionName: "arrowLocation", optionValue: string): void; + igTooltip(options: IgTooltip): JQuery; + igTooltip(optionLiteral: 'option', optionName: string): any; + igTooltip(optionLiteral: 'option', options: IgTooltip): JQuery; + igTooltip(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igTooltip(methodName: string, ...methodParams: any[]): any; +} +interface JQuery { + mouseWrapper(methodName: "destroy"): void; + + /** + */ + mouseWrapper(optionLiteral: 'option', optionName: "cancel"): string; + + /** + */ + mouseWrapper(optionLiteral: 'option', optionName: "cancel", optionValue: string): void; + + /** + */ + mouseWrapper(optionLiteral: 'option', optionName: "distance"): number; + + /** + */ + mouseWrapper(optionLiteral: 'option', optionName: "distance", optionValue: number): void; + + /** + */ + mouseWrapper(optionLiteral: 'option', optionName: "delay"): number; + + /** + */ + mouseWrapper(optionLiteral: 'option', optionName: "delay", optionValue: number): void; + + /** + */ + mouseWrapper(optionLiteral: 'option', optionName: "start"): StartEvent; + + /** + */ + mouseWrapper(optionLiteral: 'option', optionName: "start", optionValue: StartEvent): void; + + /** + */ + mouseWrapper(optionLiteral: 'option', optionName: "drag"): DragEvent; + + /** + */ + mouseWrapper(optionLiteral: 'option', optionName: "drag", optionValue: DragEvent): void; + + /** + */ + mouseWrapper(optionLiteral: 'option', optionName: "stop"): StopEvent; + + /** + */ + mouseWrapper(optionLiteral: 'option', optionName: "stop", optionValue: StopEvent): void; + + /** + */ + mouseWrapper(optionLiteral: 'option', optionName: "capture"): CaptureEvent; + + /** + */ + mouseWrapper(optionLiteral: 'option', optionName: "capture", optionValue: CaptureEvent): void; + mouseWrapper(options: MouseWrapper): JQuery; + mouseWrapper(optionLiteral: 'option', optionName: string): any; + mouseWrapper(optionLiteral: 'option', options: MouseWrapper): JQuery; + mouseWrapper(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + mouseWrapper(methodName: string, ...methodParams: any[]): any; +} +interface JQuery { + igResponsiveContainer(methodName: "destroy"): void; + igResponsiveContainer(methodName: "startPoller"): void; + igResponsiveContainer(methodName: "stopPoller"): void; + igResponsiveContainer(methodName: "removeCallback", callbackId: number): void; + igResponsiveContainer(methodName: "addCallback", callback: Function, owner: Object, reactionStep: number, reactionDirection: Object): void; + + /** + * The time between two resize checks in milliseconds. + */ + igResponsiveContainer(optionLiteral: 'option', optionName: "pollingInterval"): number; + + /** + * The time between two resize checks in milliseconds. + * + * @optionValue New value to be set. + */ + igResponsiveContainer(optionLiteral: 'option', optionName: "pollingInterval", optionValue: number): void; + igResponsiveContainer(options: IgResponsiveContainer): JQuery; + igResponsiveContainer(optionLiteral: 'option', optionName: string): any; + igResponsiveContainer(optionLiteral: 'option', options: IgResponsiveContainer): JQuery; + igResponsiveContainer(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igResponsiveContainer(methodName: string, ...methodParams: any[]): any; +} +interface IgSparkline { + /** + * The width of the sparkline. It can be set as a number in pixels, string (px) or percentage (%). + */ + width?: string|number; + + /** + * The height of the sparkline. It can be set as a number in pixels, string (px) or percentage (%). + */ + height?: string|number; + + /** + * Gets or sets the sparkline brush. + */ + brush?: string; + + /** + * Gets or sets the negative brush of the sparkline. + */ + negativeBrush?: string; + + /** + * Gets or sets the marker brush of the sparkline. + */ + markerBrush?: string; + + /** + * Gets or sets the negative marker brush of the sparkline. + */ + negativeMarkerBrush?: string; + + /** + * Gets or sets the first marker brush of the sparkline. + */ + firstMarkerBrush?: string; + + /** + * Gets or sets the last marker brush of the sparkline. + */ + lastMarkerBrush?: string; + + /** + * Gets or sets the high marker brush of the sparkline. + */ + highMarkerBrush?: string; + + /** + * Gets or sets the low marker brush of the sparkline. + */ + lowMarkerBrush?: string; + + /** + * Gets or sets the trendline brush of the sparkline. + */ + trendLineBrush?: string; + + /** + * Gets or sets the horizontal axis line brush of the sparkline. + */ + horizontalAxisBrush?: string; + + /** + * Gets or sets the vertical axis line brush of the sparkline. + */ + verticalAxisBrush?: string; + + /** + * Gets or sets the normal range brush of the sparkline. + */ + normalRangeFill?: string; + + /** + * Gets or sets the display state of the horizontal axis. + * + * Valid values: + * "visible" + * "collapsed" + */ + horizontalAxisVisibility?: string; + + /** + * Gets or sets the display state of the vertical axis. + * + * Valid values: + * "visible" + * "collapsed" + */ + verticalAxisVisibility?: string; + + /** + * Gets or sets the marker visibility of the sparkline. + * + * Valid values: + * "visible" + * "collapsed" + */ + markerVisibility?: string; + + /** + * Gets or sets the negative marker visibility of the sparkline. + * + * Valid values: + * "visible" + * "collapsed" + */ + negativeMarkerVisibility?: string; + + /** + * Gets or sets the first marker visibility of the sparkline. + * + * Valid values: + * "visible" + * "collapsed" + */ + firstMarkerVisibility?: string; + + /** + * Gets or sets the last marker visibility of the sparkline. + * + * Valid values: + * "visible" + * "collapsed" + */ + lastMarkerVisibility?: string; + + /** + * Gets or sets the low marker visibility of the sparkline. + * + * Valid values: + * "visible" + * "collapsed" + */ + lowMarkerVisibility?: string; + + /** + * Gets or sets the high marker visibility of the sparkline. + * + * Valid values: + * "visible" + * "collapsed" + */ + highMarkerVisibility?: string; + + /** + * Gets or sets the normal range visibility of the sparkline. + * + * Valid values: + * "visible" + * "collapsed" + */ + normalRangeVisibility?: string; + + /** + * Gets or sets the position of the normal range on the sparkline. + */ + displayNormalRangeInFront?: boolean; + + /** + * Gets or sets the marker size of the sparkline. + */ + markerSize?: number; + + /** + * Gets or sets the first marker size of the sparkline. + */ + firstMarkerSize?: number; + + /** + * Gets or sets the last marker size of the sparkline. + */ + lastMarkerSize?: number; + + /** + * Gets or sets the high marker size of the sparkline. + */ + highMarkerSize?: number; + + /** + * Gets or sets the low marker size of the sparkline. + */ + lowMarkerSize?: number; + + /** + * Gets or sets the negative marker size of the sparkline. + */ + negativeMarkerSize?: number; + + /** + * Gets or sets the line thickness of the sparkline. + */ + lineThickness?: number; + + /** + * Gets or sets the string path to the value column. + */ + valueMemberPath?: string; + + /** + * String identifier of a column or property name to get labels from on each item in the data source. These labels will be retrieved from the first and last item, and displayed by the horizontal axis. + */ + labelMemberPath?: string; + + /** + * Gets or sets the type of trendline used by the sparkline. + * + * Valid values: + * "none" + * "linearFit" + * "quadraticFit" + * "cubicFit" + * "quarticFit" + * "quinticFit" + * "logarithmicFit" + * "exponentialFit" + * "powerLawFit" + * "simpleAverage" + * "exponentialAverage" + * "modifiedAverage" + * "cumulativeAverage" + * "weightedAverage" + */ + trendLineType?: string; + + /** + * Gets or sets the trendline period used by the sparkline. + */ + trendLinePeriod?: number; + + /** + * Gets or sets the thickness of the sparkline's trendline. + */ + trendLineThickness?: number; + + /** + * Gets or sets the minimum value of the normal range. + */ + normalRangeMinimum?: number; + + /** + * Gets or sets the maximum value of the normal range. + */ + normalRangeMaximum?: number; + + /** + * Gets or sets the display type of the sparkline. + * + * Valid values: + * "line" Display the sparkline as a line. + * "area" Display the sparkline as a filled polygon. + * "column" Display the sparkline as a set of columns. + * "winLoss" Display the sparkline as a set of columns on a boolean scale. + */ + displayType?: string; + + /** + * Gets or sets the way null values are interpreted. + * + * Valid values: + * "linearInterpolate" + * "dontPlot" + */ + unknownValuePlotting?: string; + + /** + * The value or content to display on the vertical axis. + * This can be set to a formatted string, such as "{0:n}", or it can be set to a DataTemplate. + */ + verticalAxisLabel?: any; + + /** + * The value or content to display on the horizontal axis. + * This can be set to a formatted string, such as "{0}", or it can be set to a DataTemplate. + */ + horizontalAxisLabel?: any; + + /** + * Sets or gets a function which takes an object that produces a formatted label for displaying in the chart. + */ + formatLabel?: any; + pixelScalingRatio?: number; + + /** + * Gets sets template for tooltip associated with chart item. + * Example: "Value: $(ValueMemberPathInDataSource)" + */ + tooltipTemplate?: string; + + /** + * Gets sets maximum number of displayed records in chart. + */ + maxRecCount?: number; + + /** + * Gets sets a valid data source. + * That can be instance of array or primitives, array of objects, instance of $.ig.DataSource, or any other data accepted by $.ig.DataSource. + * Note: if it is set to string and "dataSourceType" option is not set, then $.ig.JSONPDataSource is used. + */ + dataSource?: any; + + /** + * Gets sets data source type (such as "json", "xml", etc). Please refer to the documentation of $.ig.DataSource and its type property + */ + dataSourceType?: string; + + /** + * Gets sets url which is used for sending JSON on request for remote data. + */ + dataSourceUrl?: string; + + /** + * See $.ig.DataSource. property in the response specifying the total number of records on the server. + */ + responseTotalRecCountKey?: string; + + /** + * See $.ig.DataSource. This is basically the property in the responses where data records are held, if the response is wrapped. + */ + responseDataKey?: string; + + /** + * Event which is raised before data binding. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to igSparkline. + * Use ui.dataSource to obtain reference to instance of $.ig.DataSource. + */ + dataBinding?: DataBindingEvent; + + /** + * Event which is raised after data binding. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to igSparkline. + * Use ui.data to obtain reference to array actual data which is displayed by chart. + * Use ui.dataSource to obtain reference to instance of $.ig.DataSource. + */ + dataBound?: DataBoundEvent; + + /** + * Event which is raised before tooltip is updated. + * Return false in order to cancel updating and hide tooltip. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.text to obtain html of tooltip. Value of that member can be modified. If modified value is null or empty string, then current content of tooltip keeps old value. + * Use ui.item to obtain reference to item. Value of that member can be modified or replaced by custom item. + * Use ui.x to obtain left position of tooltip in pixels relative to widget. Value of that member can be modified. + * Use ui.y to obtain top position of tooltip in pixels relative to widget. Value of that member can be modified. + * Use ui.element to obtain reference to jquery object which represents tooltip. Value of that member can be replaced by custom element. + */ + updateTooltip?: UpdateTooltipEvent; + + /** + * Event which is raised before tooltip is hidden. + * Return false in order to cancel hiding and keep tooltip visible. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.item to obtain reference to item. + * Use ui.element to obtain reference to jquery object which represents tooltip or value of ui.element from last updateTooltip event. Value of that member can be replaced by custom element. + */ + hideTooltip?: HideTooltipEvent; + + /** + * Option for igSparkline + */ + [optionName: string]: any; +} +interface IgSparklineMethods { + destroy(): void; + + /** + * Find index of item within actual data used by chart. + * + * @param item The reference to item. + */ + findIndexOfItem(item: Object): number; + + /** + * Get item within actual data used by chart. That is similar to this.getData()[ index ]. + * + * @param index Index of data item. + */ + getDataItem(index: Object): Object; + + /** + * Get reference of actual data used by chart. + */ + getData(): any[]; + + /** + * Adds a new item to the data source and notifies the chart. + * + * @param item The item that we want to add to the data source. + */ + addItem(item: Object): Object; + + /** + * Inserts a new item to the data source and notifies the chart. + * + * @param item the new item that we want to insert in the data source. + * @param index The index in the data source where the new item will be inserted. + */ + insertItem(item: Object, index: number): Object; + + /** + * Deletes an item from the data source and notifies the chart. + * + * @param index The index in the data source from where the item will be been removed. + */ + removeItem(index: number): Object; + + /** + * Updates an item in the data source and notifies the chart. + * + * @param index The index of the item in the data source that we want to change. + * @param item The new item object that will be set in the data source. + */ + setItem(index: number, item: Object): Object; + + /** + * Notifies the chart that an item has been set in an associated data source. + * + * @param dataSource The data source in which the change happened. + * @param index The index in the items source that has been changed. + * @param newItem the new item that has been set in the collection. + * @param oldItem the old item that has been overwritten in the collection. + */ + notifySetItem(dataSource: Object, index: number, newItem: Object, oldItem: Object): Object; + + /** + * Notifies the chart that the items have been cleared from an associated data source. + * It's not necessary to notify more than one target of a change if they share the same items source. + * + * @param dataSource The data source in which the change happened. + */ + notifyClearItems(dataSource: Object): Object; + + /** + * Notifies the target axis or series that an item has been inserted at the specified index in its data source. + * It's not necessary to notify more than one target of a change if they share the same items source. + * + * @param dataSource The data source in which the change happened. + * @param index The index in the items source where the new item has been inserted. + * @param newItem the new item that has been set in the collection. + */ + notifyInsertItem(dataSource: Object, index: number, newItem: Object): Object; + + /** + * Notifies the target axis or series that an item has been removed from the specified index in its data source. + * It's not necessary to notify more than one target of a change if they share the same items source. + * + * @param dataSource The data source in which the change happened. + * @param index The index in the items source from where the old item has been removed. + * @param oldItem the old item that has been removed from the collection. + */ + notifyRemoveItem(dataSource: Object, index: number, oldItem: Object): Object; + + /** + * Get reference to chart object. + */ + chart(): Object; + + /** + * Binds data to the chart + */ + dataBind(): void; +} +interface JQuery { + data(propertyName: "igSparkline"): IgSparklineMethods; +} + +interface JQuery { + igSparkline(methodName: "destroy"): void; + igSparkline(methodName: "findIndexOfItem", item: Object): number; + igSparkline(methodName: "getDataItem", index: Object): Object; + igSparkline(methodName: "getData"): any[]; + igSparkline(methodName: "addItem", item: Object): Object; + igSparkline(methodName: "insertItem", item: Object, index: number): Object; + igSparkline(methodName: "removeItem", index: number): Object; + igSparkline(methodName: "setItem", index: number, item: Object): Object; + igSparkline(methodName: "notifySetItem", dataSource: Object, index: number, newItem: Object, oldItem: Object): Object; + igSparkline(methodName: "notifyClearItems", dataSource: Object): Object; + igSparkline(methodName: "notifyInsertItem", dataSource: Object, index: number, newItem: Object): Object; + igSparkline(methodName: "notifyRemoveItem", dataSource: Object, index: number, oldItem: Object): Object; + igSparkline(methodName: "chart"): Object; + igSparkline(methodName: "dataBind"): void; + + /** + * The width of the sparkline. It can be set as a number in pixels, string (px) or percentage (%). + */ + igSparkline(optionLiteral: 'option', optionName: "width"): string|number; + + /** + * The width of the sparkline. It can be set as a number in pixels, string (px) or percentage (%). + * + * @optionValue New value to be set. + */ + igSparkline(optionLiteral: 'option', optionName: "width", optionValue: string|number): void; + + /** + * The height of the sparkline. It can be set as a number in pixels, string (px) or percentage (%). + */ + igSparkline(optionLiteral: 'option', optionName: "height"): string|number; + + /** + * The height of the sparkline. It can be set as a number in pixels, string (px) or percentage (%). + * + * @optionValue New value to be set. + */ + igSparkline(optionLiteral: 'option', optionName: "height", optionValue: string|number): void; + + /** + * Gets the sparkline brush. + */ + igSparkline(optionLiteral: 'option', optionName: "brush"): string; + + /** + * Sets the sparkline brush. + * + * @optionValue New value to be set. + */ + igSparkline(optionLiteral: 'option', optionName: "brush", optionValue: string): void; + + /** + * Gets the negative brush of the sparkline. + */ + igSparkline(optionLiteral: 'option', optionName: "negativeBrush"): string; + + /** + * Sets the negative brush of the sparkline. + * + * @optionValue New value to be set. + */ + igSparkline(optionLiteral: 'option', optionName: "negativeBrush", optionValue: string): void; + + /** + * Gets the marker brush of the sparkline. + */ + igSparkline(optionLiteral: 'option', optionName: "markerBrush"): string; + + /** + * Sets the marker brush of the sparkline. + * + * @optionValue New value to be set. + */ + igSparkline(optionLiteral: 'option', optionName: "markerBrush", optionValue: string): void; + + /** + * Gets the negative marker brush of the sparkline. + */ + igSparkline(optionLiteral: 'option', optionName: "negativeMarkerBrush"): string; + + /** + * Sets the negative marker brush of the sparkline. + * + * @optionValue New value to be set. + */ + igSparkline(optionLiteral: 'option', optionName: "negativeMarkerBrush", optionValue: string): void; + + /** + * Gets the first marker brush of the sparkline. + */ + igSparkline(optionLiteral: 'option', optionName: "firstMarkerBrush"): string; + + /** + * Sets the first marker brush of the sparkline. + * + * @optionValue New value to be set. + */ + igSparkline(optionLiteral: 'option', optionName: "firstMarkerBrush", optionValue: string): void; + + /** + * Gets the last marker brush of the sparkline. + */ + igSparkline(optionLiteral: 'option', optionName: "lastMarkerBrush"): string; + + /** + * Sets the last marker brush of the sparkline. + * + * @optionValue New value to be set. + */ + igSparkline(optionLiteral: 'option', optionName: "lastMarkerBrush", optionValue: string): void; + + /** + * Gets the high marker brush of the sparkline. + */ + igSparkline(optionLiteral: 'option', optionName: "highMarkerBrush"): string; + + /** + * Sets the high marker brush of the sparkline. + * + * @optionValue New value to be set. + */ + igSparkline(optionLiteral: 'option', optionName: "highMarkerBrush", optionValue: string): void; + + /** + * Gets the low marker brush of the sparkline. + */ + igSparkline(optionLiteral: 'option', optionName: "lowMarkerBrush"): string; + + /** + * Sets the low marker brush of the sparkline. + * + * @optionValue New value to be set. + */ + igSparkline(optionLiteral: 'option', optionName: "lowMarkerBrush", optionValue: string): void; + + /** + * Gets the trendline brush of the sparkline. + */ + igSparkline(optionLiteral: 'option', optionName: "trendLineBrush"): string; + + /** + * Sets the trendline brush of the sparkline. + * + * @optionValue New value to be set. + */ + igSparkline(optionLiteral: 'option', optionName: "trendLineBrush", optionValue: string): void; + + /** + * Gets the horizontal axis line brush of the sparkline. + */ + igSparkline(optionLiteral: 'option', optionName: "horizontalAxisBrush"): string; + + /** + * Sets the horizontal axis line brush of the sparkline. + * + * @optionValue New value to be set. + */ + igSparkline(optionLiteral: 'option', optionName: "horizontalAxisBrush", optionValue: string): void; + + /** + * Gets the vertical axis line brush of the sparkline. + */ + igSparkline(optionLiteral: 'option', optionName: "verticalAxisBrush"): string; + + /** + * Sets the vertical axis line brush of the sparkline. + * + * @optionValue New value to be set. + */ + igSparkline(optionLiteral: 'option', optionName: "verticalAxisBrush", optionValue: string): void; + + /** + * Gets the normal range brush of the sparkline. + */ + igSparkline(optionLiteral: 'option', optionName: "normalRangeFill"): string; + + /** + * Sets the normal range brush of the sparkline. + * + * @optionValue New value to be set. + */ + igSparkline(optionLiteral: 'option', optionName: "normalRangeFill", optionValue: string): void; + + /** + * Gets the display state of the horizontal axis. + */ + igSparkline(optionLiteral: 'option', optionName: "horizontalAxisVisibility"): string; + + /** + * Sets the display state of the horizontal axis. + * + * @optionValue New value to be set. + */ + igSparkline(optionLiteral: 'option', optionName: "horizontalAxisVisibility", optionValue: string): void; + + /** + * Gets the display state of the vertical axis. + */ + igSparkline(optionLiteral: 'option', optionName: "verticalAxisVisibility"): string; + + /** + * Sets the display state of the vertical axis. + * + * @optionValue New value to be set. + */ + igSparkline(optionLiteral: 'option', optionName: "verticalAxisVisibility", optionValue: string): void; + + /** + * Gets the marker visibility of the sparkline. + */ + igSparkline(optionLiteral: 'option', optionName: "markerVisibility"): string; + + /** + * Sets the marker visibility of the sparkline. + * + * @optionValue New value to be set. + */ + igSparkline(optionLiteral: 'option', optionName: "markerVisibility", optionValue: string): void; + + /** + * Gets the negative marker visibility of the sparkline. + */ + igSparkline(optionLiteral: 'option', optionName: "negativeMarkerVisibility"): string; + + /** + * Sets the negative marker visibility of the sparkline. + * + * @optionValue New value to be set. + */ + igSparkline(optionLiteral: 'option', optionName: "negativeMarkerVisibility", optionValue: string): void; + + /** + * Gets the first marker visibility of the sparkline. + */ + igSparkline(optionLiteral: 'option', optionName: "firstMarkerVisibility"): string; + + /** + * Sets the first marker visibility of the sparkline. + * + * @optionValue New value to be set. + */ + igSparkline(optionLiteral: 'option', optionName: "firstMarkerVisibility", optionValue: string): void; + + /** + * Gets the last marker visibility of the sparkline. + */ + igSparkline(optionLiteral: 'option', optionName: "lastMarkerVisibility"): string; + + /** + * Sets the last marker visibility of the sparkline. + * + * @optionValue New value to be set. + */ + igSparkline(optionLiteral: 'option', optionName: "lastMarkerVisibility", optionValue: string): void; + + /** + * Gets the low marker visibility of the sparkline. + */ + igSparkline(optionLiteral: 'option', optionName: "lowMarkerVisibility"): string; + + /** + * Sets the low marker visibility of the sparkline. + * + * @optionValue New value to be set. + */ + igSparkline(optionLiteral: 'option', optionName: "lowMarkerVisibility", optionValue: string): void; + + /** + * Gets the high marker visibility of the sparkline. + */ + igSparkline(optionLiteral: 'option', optionName: "highMarkerVisibility"): string; + + /** + * Sets the high marker visibility of the sparkline. + * + * @optionValue New value to be set. + */ + igSparkline(optionLiteral: 'option', optionName: "highMarkerVisibility", optionValue: string): void; + + /** + * Gets the normal range visibility of the sparkline. + */ + igSparkline(optionLiteral: 'option', optionName: "normalRangeVisibility"): string; + + /** + * Sets the normal range visibility of the sparkline. + * + * @optionValue New value to be set. + */ + igSparkline(optionLiteral: 'option', optionName: "normalRangeVisibility", optionValue: string): void; + + /** + * Gets the position of the normal range on the sparkline. + */ + igSparkline(optionLiteral: 'option', optionName: "displayNormalRangeInFront"): boolean; + + /** + * Sets the position of the normal range on the sparkline. + * + * @optionValue New value to be set. + */ + igSparkline(optionLiteral: 'option', optionName: "displayNormalRangeInFront", optionValue: boolean): void; + + /** + * Gets the marker size of the sparkline. + */ + igSparkline(optionLiteral: 'option', optionName: "markerSize"): number; + + /** + * Sets the marker size of the sparkline. + * + * @optionValue New value to be set. + */ + igSparkline(optionLiteral: 'option', optionName: "markerSize", optionValue: number): void; + + /** + * Gets the first marker size of the sparkline. + */ + igSparkline(optionLiteral: 'option', optionName: "firstMarkerSize"): number; + + /** + * Sets the first marker size of the sparkline. + * + * @optionValue New value to be set. + */ + igSparkline(optionLiteral: 'option', optionName: "firstMarkerSize", optionValue: number): void; + + /** + * Gets the last marker size of the sparkline. + */ + igSparkline(optionLiteral: 'option', optionName: "lastMarkerSize"): number; + + /** + * Sets the last marker size of the sparkline. + * + * @optionValue New value to be set. + */ + igSparkline(optionLiteral: 'option', optionName: "lastMarkerSize", optionValue: number): void; + + /** + * Gets the high marker size of the sparkline. + */ + igSparkline(optionLiteral: 'option', optionName: "highMarkerSize"): number; + + /** + * Sets the high marker size of the sparkline. + * + * @optionValue New value to be set. + */ + igSparkline(optionLiteral: 'option', optionName: "highMarkerSize", optionValue: number): void; + + /** + * Gets the low marker size of the sparkline. + */ + igSparkline(optionLiteral: 'option', optionName: "lowMarkerSize"): number; + + /** + * Sets the low marker size of the sparkline. + * + * @optionValue New value to be set. + */ + igSparkline(optionLiteral: 'option', optionName: "lowMarkerSize", optionValue: number): void; + + /** + * Gets the negative marker size of the sparkline. + */ + igSparkline(optionLiteral: 'option', optionName: "negativeMarkerSize"): number; + + /** + * Sets the negative marker size of the sparkline. + * + * @optionValue New value to be set. + */ + igSparkline(optionLiteral: 'option', optionName: "negativeMarkerSize", optionValue: number): void; + + /** + * Gets the line thickness of the sparkline. + */ + igSparkline(optionLiteral: 'option', optionName: "lineThickness"): number; + + /** + * Sets the line thickness of the sparkline. + * + * @optionValue New value to be set. + */ + igSparkline(optionLiteral: 'option', optionName: "lineThickness", optionValue: number): void; + + /** + * Gets the string path to the value column. + */ + igSparkline(optionLiteral: 'option', optionName: "valueMemberPath"): string; + + /** + * Sets the string path to the value column. + * + * @optionValue New value to be set. + */ + igSparkline(optionLiteral: 'option', optionName: "valueMemberPath", optionValue: string): void; + + /** + * String identifier of a column or property name to get labels from on each item in the data source. These labels will be retrieved from the first and last item, and displayed by the horizontal axis. + */ + igSparkline(optionLiteral: 'option', optionName: "labelMemberPath"): string; + + /** + * String identifier of a column or property name to get labels from on each item in the data source. These labels will be retrieved from the first and last item, and displayed by the horizontal axis. + * + * @optionValue New value to be set. + */ + igSparkline(optionLiteral: 'option', optionName: "labelMemberPath", optionValue: string): void; + + /** + * Gets the type of trendline used by the sparkline. + */ + igSparkline(optionLiteral: 'option', optionName: "trendLineType"): string; + + /** + * Sets the type of trendline used by the sparkline. + * + * @optionValue New value to be set. + */ + igSparkline(optionLiteral: 'option', optionName: "trendLineType", optionValue: string): void; + + /** + * Gets the trendline period used by the sparkline. + */ + igSparkline(optionLiteral: 'option', optionName: "trendLinePeriod"): number; + + /** + * Sets the trendline period used by the sparkline. + * + * @optionValue New value to be set. + */ + igSparkline(optionLiteral: 'option', optionName: "trendLinePeriod", optionValue: number): void; + + /** + * Gets the thickness of the sparkline's trendline. + */ + igSparkline(optionLiteral: 'option', optionName: "trendLineThickness"): number; + + /** + * Sets the thickness of the sparkline's trendline. + * + * @optionValue New value to be set. + */ + igSparkline(optionLiteral: 'option', optionName: "trendLineThickness", optionValue: number): void; + + /** + * Gets the minimum value of the normal range. + */ + igSparkline(optionLiteral: 'option', optionName: "normalRangeMinimum"): number; + + /** + * Sets the minimum value of the normal range. + * + * @optionValue New value to be set. + */ + igSparkline(optionLiteral: 'option', optionName: "normalRangeMinimum", optionValue: number): void; + + /** + * Gets the maximum value of the normal range. + */ + igSparkline(optionLiteral: 'option', optionName: "normalRangeMaximum"): number; + + /** + * Sets the maximum value of the normal range. + * + * @optionValue New value to be set. + */ + igSparkline(optionLiteral: 'option', optionName: "normalRangeMaximum", optionValue: number): void; + + /** + * Gets the display type of the sparkline. + */ + igSparkline(optionLiteral: 'option', optionName: "displayType"): string; + + /** + * Sets the display type of the sparkline. + * + * @optionValue New value to be set. + */ + igSparkline(optionLiteral: 'option', optionName: "displayType", optionValue: string): void; + + /** + * Gets the way null values are interpreted. + */ + igSparkline(optionLiteral: 'option', optionName: "unknownValuePlotting"): string; + + /** + * Sets the way null values are interpreted. + * + * @optionValue New value to be set. + */ + igSparkline(optionLiteral: 'option', optionName: "unknownValuePlotting", optionValue: string): void; + + /** + * The value or content to display on the vertical axis. + * This can be set to a formatted string, such as "{0:n}", or it can be set to a DataTemplate. + */ + igSparkline(optionLiteral: 'option', optionName: "verticalAxisLabel"): any; + + /** + * The value or content to display on the vertical axis. + * This can be set to a formatted string, such as "{0:n}", or it can be set to a DataTemplate. + * + * @optionValue New value to be set. + */ + igSparkline(optionLiteral: 'option', optionName: "verticalAxisLabel", optionValue: any): void; + + /** + * The value or content to display on the horizontal axis. + * This can be set to a formatted string, such as "{0}", or it can be set to a DataTemplate. + */ + igSparkline(optionLiteral: 'option', optionName: "horizontalAxisLabel"): any; + + /** + * The value or content to display on the horizontal axis. + * This can be set to a formatted string, such as "{0}", or it can be set to a DataTemplate. + * + * @optionValue New value to be set. + */ + igSparkline(optionLiteral: 'option', optionName: "horizontalAxisLabel", optionValue: any): void; + + /** + * Sets or gets a function which takes an object that produces a formatted label for displaying in the chart. + */ + igSparkline(optionLiteral: 'option', optionName: "formatLabel"): any; + + /** + * Sets or gets a function which takes an object that produces a formatted label for displaying in the chart. + * + * @optionValue New value to be set. + */ + igSparkline(optionLiteral: 'option', optionName: "formatLabel", optionValue: any): void; + + /** + */ + igSparkline(optionLiteral: 'option', optionName: "pixelScalingRatio"): number; + + /** + */ + igSparkline(optionLiteral: 'option', optionName: "pixelScalingRatio", optionValue: number): void; + + /** + * Gets template for tooltip associated with chart item. + * Example: "Value: $(ValueMemberPathInDataSource)" + */ + igSparkline(optionLiteral: 'option', optionName: "tooltipTemplate"): string; + + /** + * Sets template for tooltip associated with chart item. + * Example: "Value: $(ValueMemberPathInDataSource)" + * + * @optionValue New value to be set. + */ + igSparkline(optionLiteral: 'option', optionName: "tooltipTemplate", optionValue: string): void; + + /** + * Gets maximum number of displayed records in chart. + */ + igSparkline(optionLiteral: 'option', optionName: "maxRecCount"): number; + + /** + * Sets maximum number of displayed records in chart. + * + * @optionValue New value to be set. + */ + igSparkline(optionLiteral: 'option', optionName: "maxRecCount", optionValue: number): void; + + /** + * Gets a valid data source. + * That can be instance of array or primitives, array of objects, instance of $.ig.DataSource, or any other data accepted by $.ig.DataSource. + * Note: if it is set to string and "dataSourceType" option is not set, then $.ig.JSONPDataSource is used. + */ + igSparkline(optionLiteral: 'option', optionName: "dataSource"): any; + + /** + * Sets a valid data source. + * That can be instance of array or primitives, array of objects, instance of $.ig.DataSource, or any other data accepted by $.ig.DataSource. + * Note: if it is set to string and "dataSourceType" option is not set, then $.ig.JSONPDataSource is used. + * + * @optionValue New value to be set. + */ + igSparkline(optionLiteral: 'option', optionName: "dataSource", optionValue: any): void; + + /** + * Gets data source type (such as "json", "xml", etc). Please refer to the documentation of $.ig.DataSource and its type property + */ + igSparkline(optionLiteral: 'option', optionName: "dataSourceType"): string; + + /** + * Sets data source type (such as "json", "xml", etc). Please refer to the documentation of $.ig.DataSource and its type property + * + * @optionValue New value to be set. + */ + igSparkline(optionLiteral: 'option', optionName: "dataSourceType", optionValue: string): void; + + /** + * Gets url which is used for sending JSON on request for remote data. + */ + igSparkline(optionLiteral: 'option', optionName: "dataSourceUrl"): string; + + /** + * Sets url which is used for sending JSON on request for remote data. + * + * @optionValue New value to be set. + */ + igSparkline(optionLiteral: 'option', optionName: "dataSourceUrl", optionValue: string): void; + + /** + * See $.ig.DataSource. property in the response specifying the total number of records on the server. + */ + igSparkline(optionLiteral: 'option', optionName: "responseTotalRecCountKey"): string; + + /** + * See $.ig.DataSource. property in the response specifying the total number of records on the server. + * + * @optionValue New value to be set. + */ + igSparkline(optionLiteral: 'option', optionName: "responseTotalRecCountKey", optionValue: string): void; + + /** + * See $.ig.DataSource. This is basically the property in the responses where data records are held, if the response is wrapped. + */ + igSparkline(optionLiteral: 'option', optionName: "responseDataKey"): string; + + /** + * See $.ig.DataSource. This is basically the property in the responses where data records are held, if the response is wrapped. + * + * @optionValue New value to be set. + */ + igSparkline(optionLiteral: 'option', optionName: "responseDataKey", optionValue: string): void; + + /** + * Event which is raised before data binding. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to igSparkline. + * Use ui.dataSource to obtain reference to instance of $.ig.DataSource. + */ + igSparkline(optionLiteral: 'option', optionName: "dataBinding"): DataBindingEvent; + + /** + * Event which is raised before data binding. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to igSparkline. + * Use ui.dataSource to obtain reference to instance of $.ig.DataSource. + * + * @optionValue Define event handler function. + */ + igSparkline(optionLiteral: 'option', optionName: "dataBinding", optionValue: DataBindingEvent): void; + + /** + * Event which is raised after data binding. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to igSparkline. + * Use ui.data to obtain reference to array actual data which is displayed by chart. + * Use ui.dataSource to obtain reference to instance of $.ig.DataSource. + */ + igSparkline(optionLiteral: 'option', optionName: "dataBound"): DataBoundEvent; + + /** + * Event which is raised after data binding. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to igSparkline. + * Use ui.data to obtain reference to array actual data which is displayed by chart. + * Use ui.dataSource to obtain reference to instance of $.ig.DataSource. + * + * @optionValue Define event handler function. + */ + igSparkline(optionLiteral: 'option', optionName: "dataBound", optionValue: DataBoundEvent): void; + + /** + * Event which is raised before tooltip is updated. + * Return false in order to cancel updating and hide tooltip. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.text to obtain html of tooltip. Value of that member can be modified. If modified value is null or empty string, then current content of tooltip keeps old value. + * Use ui.item to obtain reference to item. Value of that member can be modified or replaced by custom item. + * Use ui.x to obtain left position of tooltip in pixels relative to widget. Value of that member can be modified. + * Use ui.y to obtain top position of tooltip in pixels relative to widget. Value of that member can be modified. + * Use ui.element to obtain reference to jquery object which represents tooltip. Value of that member can be replaced by custom element. + */ + igSparkline(optionLiteral: 'option', optionName: "updateTooltip"): UpdateTooltipEvent; + + /** + * Event which is raised before tooltip is updated. + * Return false in order to cancel updating and hide tooltip. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.text to obtain html of tooltip. Value of that member can be modified. If modified value is null or empty string, then current content of tooltip keeps old value. + * Use ui.item to obtain reference to item. Value of that member can be modified or replaced by custom item. + * Use ui.x to obtain left position of tooltip in pixels relative to widget. Value of that member can be modified. + * Use ui.y to obtain top position of tooltip in pixels relative to widget. Value of that member can be modified. + * Use ui.element to obtain reference to jquery object which represents tooltip. Value of that member can be replaced by custom element. + * + * @optionValue Define event handler function. + */ + igSparkline(optionLiteral: 'option', optionName: "updateTooltip", optionValue: UpdateTooltipEvent): void; + + /** + * Event which is raised before tooltip is hidden. + * Return false in order to cancel hiding and keep tooltip visible. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.item to obtain reference to item. + * Use ui.element to obtain reference to jquery object which represents tooltip or value of ui.element from last updateTooltip event. Value of that member can be replaced by custom element. + */ + igSparkline(optionLiteral: 'option', optionName: "hideTooltip"): HideTooltipEvent; + + /** + * Event which is raised before tooltip is hidden. + * Return false in order to cancel hiding and keep tooltip visible. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.item to obtain reference to item. + * Use ui.element to obtain reference to jquery object which represents tooltip or value of ui.element from last updateTooltip event. Value of that member can be replaced by custom element. + * + * @optionValue Define event handler function. + */ + igSparkline(optionLiteral: 'option', optionName: "hideTooltip", optionValue: HideTooltipEvent): void; + igSparkline(options: IgSparkline): JQuery; + igSparkline(optionLiteral: 'option', optionName: string): any; + igSparkline(optionLiteral: 'option', options: IgSparkline): JQuery; + igSparkline(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igSparkline(methodName: string, ...methodParams: any[]): any; +} +interface IgSplitButtonItem { + /** + * Item name + */ + name?: string; + + /** + * Item display label + */ + label?: string; + + /** + * Css class to represent the iconClass of the item + */ + iconClass?: string; + + /** + * Option for IgSplitButtonItem + */ + [optionName: string]: any; +} + +interface IgSplitButton { + /** + * Button items. + * + */ + items?: IgSplitButtonItem[]; + + /** + * Default button item name. + * + */ + defaultItemName?: string; + + /** + * Specifies whether the default button will be switched when another button is selected. + * + */ + swapDefaultEnabled?: boolean; + + /** + * Event fired when the button is clicked. + * + * Function takes arguments evt and ui. + * Use ui.item to get a reference the igSplitButton element. + */ + click?: ClickEvent; + + /** + * Event fired after the button is expanded. + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference the igSplitButton. + */ + expanded?: ExpandedEvent; + + /** + * Event fired before a button item is expanded. + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference the igSplitButton. + */ + expanding?: ExpandingEvent; + + /** + * Event fired after the button is collapsed. + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference the igSplitButton. + */ + collapsed?: CollapsedEvent; + + /** + * Event fired before a button item is collapsed. + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference the igSplitButton. + */ + collapsing?: CollapsingEvent; + + /** + * Option for igSplitButton + */ + [optionName: string]: any; +} +interface IgSplitButtonMethods { + /** + * Switch to given igToolbar button. + * + * @param button . The button jQuery element. + */ + switchToButton(button: Object): void; + widget(): void; + + /** + * Toggle widget state between collapsed and expanded. + * + * @param e The igSplitButton to be expanded/collapsed. + */ + toggle(e: Object): Object; + + /** + * Collapse the widget. + * + * @param e Indicates the browser event which triggered this action (not API). + */ + collapse(e?: Object): Object; + + /** + * Expands the widget. + * + * @param e Indicates the browser event which triggered this action (not API). + */ + expand(e?: Object): Object; + + /** + * Destroy the widget. + */ + destroy(): void; +} +interface JQuery { + data(propertyName: "igSplitButton"): IgSplitButtonMethods; +} + +interface JQuery { + igSplitButton(methodName: "switchToButton", button: Object): void; + igSplitButton(methodName: "widget"): void; + igSplitButton(methodName: "toggle", e: Object): Object; + igSplitButton(methodName: "collapse", e?: Object): Object; + igSplitButton(methodName: "expand", e?: Object): Object; + igSplitButton(methodName: "destroy"): void; + + /** + * Button items. + * + */ + igSplitButton(optionLiteral: 'option', optionName: "items"): IgSplitButtonItem[]; + + /** + * Button items. + * + * + * @optionValue New value to be set. + */ + igSplitButton(optionLiteral: 'option', optionName: "items", optionValue: IgSplitButtonItem[]): void; + + /** + * Default button item name. + * + */ + igSplitButton(optionLiteral: 'option', optionName: "defaultItemName"): string; + + /** + * Default button item name. + * + * + * @optionValue New value to be set. + */ + igSplitButton(optionLiteral: 'option', optionName: "defaultItemName", optionValue: string): void; + + /** + * Gets whether the default button will be switched when another button is selected. + * + */ + igSplitButton(optionLiteral: 'option', optionName: "swapDefaultEnabled"): boolean; + + /** + * Sets whether the default button will be switched when another button is selected. + * + * + * @optionValue New value to be set. + */ + igSplitButton(optionLiteral: 'option', optionName: "swapDefaultEnabled", optionValue: boolean): void; + + /** + * Event fired when the button is clicked. + * + * Function takes arguments evt and ui. + * Use ui.item to get a reference the igSplitButton element. + */ + igSplitButton(optionLiteral: 'option', optionName: "click"): ClickEvent; + + /** + * Event fired when the button is clicked. + * + * Function takes arguments evt and ui. + * Use ui.item to get a reference the igSplitButton element. + * + * @optionValue Define event handler function. + */ + igSplitButton(optionLiteral: 'option', optionName: "click", optionValue: ClickEvent): void; + + /** + * Event fired after the button is expanded. + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference the igSplitButton. + */ + igSplitButton(optionLiteral: 'option', optionName: "expanded"): ExpandedEvent; + + /** + * Event fired after the button is expanded. + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference the igSplitButton. + * + * @optionValue Define event handler function. + */ + igSplitButton(optionLiteral: 'option', optionName: "expanded", optionValue: ExpandedEvent): void; + + /** + * Event fired before a button item is expanded. + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference the igSplitButton. + */ + igSplitButton(optionLiteral: 'option', optionName: "expanding"): ExpandingEvent; + + /** + * Event fired before a button item is expanded. + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference the igSplitButton. + * + * @optionValue Define event handler function. + */ + igSplitButton(optionLiteral: 'option', optionName: "expanding", optionValue: ExpandingEvent): void; + + /** + * Event fired after the button is collapsed. + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference the igSplitButton. + */ + igSplitButton(optionLiteral: 'option', optionName: "collapsed"): CollapsedEvent; + + /** + * Event fired after the button is collapsed. + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference the igSplitButton. + * + * @optionValue Define event handler function. + */ + igSplitButton(optionLiteral: 'option', optionName: "collapsed", optionValue: CollapsedEvent): void; + + /** + * Event fired before a button item is collapsed. + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference the igSplitButton. + */ + igSplitButton(optionLiteral: 'option', optionName: "collapsing"): CollapsingEvent; + + /** + * Event fired before a button item is collapsed. + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference the igSplitButton. + * + * @optionValue Define event handler function. + */ + igSplitButton(optionLiteral: 'option', optionName: "collapsing", optionValue: CollapsingEvent): void; + igSplitButton(options: IgSplitButton): JQuery; + igSplitButton(optionLiteral: 'option', optionName: string): any; + igSplitButton(optionLiteral: 'option', options: IgSplitButton): JQuery; + igSplitButton(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igSplitButton(methodName: string, ...methodParams: any[]): any; +} +interface IgSplitterPanel { + /** + * Gets the size of the panel + * + */ + size?: string|number; + + /** + * Gets the minimum size that the panel can have + * + */ + min?: string|number; + + /** + * Gets the maximum size that the panel can have + * + */ + max?: string|number; + + /** + * Gets whether the panel can be resized + * + */ + resizable?: boolean; + + /** + * Gets whether the panel is initially collapsed + * + */ + collapsed?: boolean; + + /** + * Gets whether the panel can be collapsed + * + */ + collapsible?: boolean; + + /** + * Option for IgSplitterPanel + */ + [optionName: string]: any; +} + +interface ResizeStartedEvent { + (event: Event, ui: ResizeStartedEventUIParam): void; +} + +interface ResizeStartedEventUIParam { + /** + * Used to get a reference to the splitter instance. + */ + owner?: any; +} + +interface ResizingEvent { + (event: Event, ui: ResizingEventUIParam): void; +} + +interface ResizingEventUIParam { + /** + * Used to get a reference to the splitter instance. + */ + owner?: any; +} + +interface ResizeEndedEvent { + (event: Event, ui: ResizeEndedEventUIParam): void; +} + +interface ResizeEndedEventUIParam { + /** + * Used to get a reference to the splitter instance. + */ + owner?: any; +} + +interface LayoutRefreshingEvent { + (event: Event, ui: LayoutRefreshingEventUIParam): void; +} + +interface LayoutRefreshingEventUIParam { + /** + * Used to get a reference to the splitter instance. + */ + owner?: any; +} + +interface LayoutRefreshedEvent { + (event: Event, ui: LayoutRefreshedEventUIParam): void; +} + +interface LayoutRefreshedEventUIParam { + /** + * Used to get a reference to the splitter instance. + */ + owner?: any; +} + +interface IgSplitter { + /** + * Gets/Sets the width of the container. + * + * + * Valid values: + * "null" will stretch to fit data, if no other widths are defined. + */ + width?: string|number; + + /** + * Gets/Sets the height of the container. + * + * + * Valid values: + * "null" will fit the tree inside its parent container, if no other widths are defined. + */ + height?: string|number; + + /** + * Specifies the orientation of the splitter. + * + * + * Valid values: + * "vertical" + * "horizontal" + */ + orientation?: string; + + /** + * Array of objects options that specify the panels settings. The panels are no more than two. Settings are specified via enumeration. + * + */ + panels?: IgSplitterPanel[]; + + /** + * Specifies drag delta of the split bar. In order to start dragging "move", the mouse has to be moved specific distance from its original position. + * + */ + dragDelta?: number; + + /** + * Specifies whether the other splitters on the page will be resized as this splitter resizes. + * + */ + resizeOtherSplitters?: boolean; + + /** + * Fired after collapsing is performed + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the splitter instance. + * Use ui.index to get an index of collapsed panel. + */ + collapsed?: CollapsedEvent; + + /** + * Fired after expanding is performed + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the splitter instance. + * Use ui.index to get an index of expanded panel. + */ + expanded?: ExpandedEvent; + + /** + * Fired before split bar move is performed + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the splitter instance. + */ + resizeStarted?: ResizeStartedEvent; + + /** + * Fired while split bar move is performed + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the splitter instance. + */ + resizing?: ResizingEvent; + + /** + * Fired after split bar move is performed + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the splitter instance. + */ + resizeEnded?: ResizeEndedEvent; + + /** + * Fired before the panels are refreshed because of browser"s resizing. + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the splitter instance. + */ + layoutRefreshing?: LayoutRefreshingEvent; + + /** + * Fired after the panels are refreshed because of browser"s resizing. + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the splitter instance. + */ + layoutRefreshed?: LayoutRefreshedEvent; + + /** + * Option for igSplitter + */ + [optionName: string]: any; +} +interface IgSplitterMethods { + /** + * Returns the element that represents this widget. + */ + widget(): Object; + + /** + * Expand the specified panel by index. + * + * @param index Specifies the index of the panel to expand. + */ + expandAt(index: Object): void; + + /** + * Collapse the specified panel. + * + * @param index Specifies the index of the panel to collapse. + */ + collapseAt(index: Object): void; + + /** + * Retrieves the jQuery element of the first panel. + */ + firstPanel(): Object; + + /** + * Retrieves the jQuery element of the second panel. + */ + secondPanel(): Object; + + /** + * Refresh splitter layout, use this method to re-render the splitter if some changes to the layout are applied. + */ + refreshLayout(): void; + + /** + * You can set new size of the first panel after the splitter is rendered. + * + * @param size Specifies the new size of the first panel. + */ + setFirstPanelSize(size: Object): void; + + /** + * You can set new size of the second panel after the splitter is rendered. + * + * @param size Specifies the new size of the second panel. + */ + setSecondPanelSize(size: Object): void; + + /** + * Destroys the igSplitter widget + */ + destroy(): void; +} +interface JQuery { + data(propertyName: "igSplitter"): IgSplitterMethods; +} + +interface JQuery { + igSplitter(methodName: "widget"): Object; + igSplitter(methodName: "expandAt", index: Object): void; + igSplitter(methodName: "collapseAt", index: Object): void; + igSplitter(methodName: "firstPanel"): Object; + igSplitter(methodName: "secondPanel"): Object; + igSplitter(methodName: "refreshLayout"): void; + igSplitter(methodName: "setFirstPanelSize", size: Object): void; + igSplitter(methodName: "setSecondPanelSize", size: Object): void; + igSplitter(methodName: "destroy"): void; + + /** + * Gets/Sets the width of the container. + * + */ + igSplitter(optionLiteral: 'option', optionName: "width"): string|number; + + /** + * /Sets the width of the container. + * + * + * @optionValue New value to be set. + */ + igSplitter(optionLiteral: 'option', optionName: "width", optionValue: string|number): void; + + /** + * Gets/Sets the height of the container. + * + */ + igSplitter(optionLiteral: 'option', optionName: "height"): string|number; + + /** + * /Sets the height of the container. + * + * + * @optionValue New value to be set. + */ + igSplitter(optionLiteral: 'option', optionName: "height", optionValue: string|number): void; + + /** + * Gets the orientation of the splitter. + * + */ + igSplitter(optionLiteral: 'option', optionName: "orientation"): string; + + /** + * Sets the orientation of the splitter. + * + * + * @optionValue New value to be set. + */ + igSplitter(optionLiteral: 'option', optionName: "orientation", optionValue: string): void; + + /** + * Array of objects options that specify the panels settings. The panels are no more than two. Settings are specified via enumeration. + * + */ + igSplitter(optionLiteral: 'option', optionName: "panels"): IgSplitterPanel[]; + + /** + * Array of objects options that specify the panels settings. The panels are no more than two. Settings are specified via enumeration. + * + * + * @optionValue New value to be set. + */ + igSplitter(optionLiteral: 'option', optionName: "panels", optionValue: IgSplitterPanel[]): void; + + /** + * Gets drag delta of the split bar. In order to start dragging "move", the mouse has to be moved specific distance from its original position. + * + */ + igSplitter(optionLiteral: 'option', optionName: "dragDelta"): number; + + /** + * Sets drag delta of the split bar. In order to start dragging "move", the mouse has to be moved specific distance from its original position. + * + * + * @optionValue New value to be set. + */ + igSplitter(optionLiteral: 'option', optionName: "dragDelta", optionValue: number): void; + + /** + * Gets whether the other splitters on the page will be resized as this splitter resizes. + * + */ + igSplitter(optionLiteral: 'option', optionName: "resizeOtherSplitters"): boolean; + + /** + * Sets whether the other splitters on the page will be resized as this splitter resizes. + * + * + * @optionValue New value to be set. + */ + igSplitter(optionLiteral: 'option', optionName: "resizeOtherSplitters", optionValue: boolean): void; + + /** + * Fired after collapsing is performed + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the splitter instance. + * Use ui.index to get an index of collapsed panel. + */ + igSplitter(optionLiteral: 'option', optionName: "collapsed"): CollapsedEvent; + + /** + * Fired after collapsing is performed + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the splitter instance. + * Use ui.index to get an index of collapsed panel. + * + * @optionValue New value to be set. + */ + igSplitter(optionLiteral: 'option', optionName: "collapsed", optionValue: CollapsedEvent): void; + + /** + * Fired after expanding is performed + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the splitter instance. + * Use ui.index to get an index of expanded panel. + */ + igSplitter(optionLiteral: 'option', optionName: "expanded"): ExpandedEvent; + + /** + * Fired after expanding is performed + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the splitter instance. + * Use ui.index to get an index of expanded panel. + * + * @optionValue New value to be set. + */ + igSplitter(optionLiteral: 'option', optionName: "expanded", optionValue: ExpandedEvent): void; + + /** + * Fired before split bar move is performed + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the splitter instance. + */ + igSplitter(optionLiteral: 'option', optionName: "resizeStarted"): ResizeStartedEvent; + + /** + * Fired before split bar move is performed + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the splitter instance. + * + * @optionValue New value to be set. + */ + igSplitter(optionLiteral: 'option', optionName: "resizeStarted", optionValue: ResizeStartedEvent): void; + + /** + * Fired while split bar move is performed + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the splitter instance. + */ + igSplitter(optionLiteral: 'option', optionName: "resizing"): ResizingEvent; + + /** + * Fired while split bar move is performed + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the splitter instance. + * + * @optionValue New value to be set. + */ + igSplitter(optionLiteral: 'option', optionName: "resizing", optionValue: ResizingEvent): void; + + /** + * Fired after split bar move is performed + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the splitter instance. + */ + igSplitter(optionLiteral: 'option', optionName: "resizeEnded"): ResizeEndedEvent; + + /** + * Fired after split bar move is performed + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the splitter instance. + * + * @optionValue New value to be set. + */ + igSplitter(optionLiteral: 'option', optionName: "resizeEnded", optionValue: ResizeEndedEvent): void; + + /** + * Fired before the panels are refreshed because of browser"s resizing. + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the splitter instance. + */ + igSplitter(optionLiteral: 'option', optionName: "layoutRefreshing"): LayoutRefreshingEvent; + + /** + * Fired before the panels are refreshed because of browser"s resizing. + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the splitter instance. + * + * @optionValue New value to be set. + */ + igSplitter(optionLiteral: 'option', optionName: "layoutRefreshing", optionValue: LayoutRefreshingEvent): void; + + /** + * Fired after the panels are refreshed because of browser"s resizing. + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the splitter instance. + */ + igSplitter(optionLiteral: 'option', optionName: "layoutRefreshed"): LayoutRefreshedEvent; + + /** + * Fired after the panels are refreshed because of browser"s resizing. + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the splitter instance. + * + * @optionValue New value to be set. + */ + igSplitter(optionLiteral: 'option', optionName: "layoutRefreshed", optionValue: LayoutRefreshedEvent): void; + igSplitter(options: IgSplitter): JQuery; + igSplitter(optionLiteral: 'option', optionName: string): any; + igSplitter(optionLiteral: 'option', options: IgSplitter): JQuery; + igSplitter(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igSplitter(methodName: string, ...methodParams: any[]): any; +} +interface IgTileManagerSplitterOptionsEvents { + /** + * Event fired after collapsing is performed. Not cancellable. + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the splitter instance. + * Use ui.index to get an index of collased panel. + */ + collapsed?: any; + + /** + * Event fired after expanding is performed. Not cancellable. + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the splitter instance. + * Use ui.index to get an index of expanded panel. + */ + expanded?: any; + + /** + * Option for IgTileManagerSplitterOptionsEvents + */ + [optionName: string]: any; +} + +interface IgTileManagerSplitterOptions { + /** + * Gets/Sets whether the splitter should be enabled. + * + */ + enabled?: boolean; + + /** + * Gets whether the splitter can be collapsible. + * + */ + collapsible?: boolean; + + /** + * Gets whether the splitter should be initially collapsed. + * + */ + collapsed?: boolean; + + /** + * Gets/Sets splitter events. + * + */ + events?: IgTileManagerSplitterOptionsEvents; + + /** + * Option for IgTileManagerSplitterOptions + */ + [optionName: string]: any; +} + +interface TileRenderingEvent { + (event: Event, ui: TileRenderingEventUIParam): void; +} + +interface TileRenderingEventUIParam { + /** + * Used to get a reference to the tile manager performing rendering. + */ + owner?: any; + + /** + * Used to get a reference to the tile being rendered + */ + tile?: any; +} + +interface TileRenderedEvent { + (event: Event, ui: TileRenderedEventUIParam): void; +} + +interface TileRenderedEventUIParam { + /** + * Used to get a reference to the tile manager performing rendering. + */ + owner?: any; + + /** + * Used to get a reference to the rendered tile + */ + tile?: any; +} + +interface TileMaximizingEvent { + (event: Event, ui: TileMaximizingEventUIParam): void; +} + +interface TileMaximizingEventUIParam { + /** + * Used to get a reference to the tile manager performing the maximizing the tile belongs to. + */ + owner?: any; + + /** + * Used to get the jQuery element of the tile being maximized + */ + tile?: any; + + /** + * Used to get reference to the tile that is minimizing simultaneously or null if no tile is minimizing. + */ + minimizingTile?: any; +} + +interface TileMaximizedEvent { + (event: Event, ui: TileMaximizedEventUIParam): void; +} + +interface TileMaximizedEventUIParam { + /** + * Used to get a reference to the tile manager the maximized tile belongs to. + */ + owner?: any; + + /** + * Used to get the jQuery element of the maximized tile + */ + tile?: any; +} + +interface TileMinimizingEvent { + (event: Event, ui: TileMinimizingEventUIParam): void; +} + +interface TileMinimizingEventUIParam { + /** + * Used to get a reference to the tile manager performing the minimizing the tile belongs to. + */ + owner?: any; + + /** + * Used to get the jQuery element of the tile being minimized + */ + tile?: any; + + /** + * Used to get reference to the tile that is maximizing simultaneously or null if no tile is maximizing. + */ + maximizingTile?: any; +} + +interface TileMinimizedEvent { + (event: Event, ui: TileMinimizedEventUIParam): void; +} + +interface TileMinimizedEventUIParam { + /** + * Used to get a reference to the tile manager the minimized tile belongs to. + */ + owner?: any; + + /** + * Used to get the jQuery element of the minimized tile + */ + tile?: any; +} + +interface IgTileManager { + /** + * + * + * Valid values: + * "string" The container width can be set in pixels (px) and percentage (%). + * "number" The container width can be set as a number in pixels. + */ + width?: string|number; + + /** + * Gets/Sets the height of the container. + * + * + * Valid values: + * "string" The height width can be set in pixels (px) and percentage (%). + * "number" The height width can be set as a number in pixels. + * "null" The height width can be set as a number in pixels. + */ + height?: string|number; + + /** + * Gets/Sets the width of each column in the container. + * + * + * Valid values: + * "string" The column width can be set in pixels (px) or percentage (%). + * "number" The column width can be set as a number representing value in pixels. + * "null" The column width will be calculated based on the container width and the other options. + */ + columnWidth?: string|number; + + /** + * Gets/Sets the height of each column in the container. + * + * + * Valid values: + * "string" The column height can be set in pixels (px) or percentage (%). + * "number" The column height can be set as a number representing value in pixels. + * "null" The column height will be calculated based on the container height and the other options. + */ + columnHeight?: string|number; + + /** + * Gets/Sets the columns count in the container. + * + * + * Valid values: + * "null" The column count will be automatically calculated. + * "number" The column count can be set as a number. + */ + cols?: number; + + /** + * Gets/Sets the rows count in the container. + * + * + * Valid values: + * "number" The row count can be set as a number. + * "null" The row count will be automatically calculated. + */ + rows?: number; + + /** + * Gets/Sets the horizontal spacing between tiles. + * + * number The horizontal spacing between tiles can be set as a number. + */ + marginLeft?: number; + + /** + * Gets/Sets the vertical spacing between tiles. + * + * number The vertical spacing between tiles can be set as a number. + */ + marginTop?: number; + + /** + * Gets/Sets whether the items will rearrange when the container is resized. + * + */ + rearrangeItems?: boolean; + + /** + * Gets/Sets the tiles configurations. Every tile is described by rowSpan, colSpan, rowIndex and colIndex. + * + * + * Valid values: + * "array" An array with colSpan, rowSpan, colIndex, rowIndex configurations for each tile. + * "null" Default tile configurations of rowSpan: 1 and colSpan: 1 will be used. + */ + items?: Object; + + /** + * Specifies any valid data source accepted by [$.ig.DataSource](ig.datasource), or an instance of an [$.ig.DataSource](ig.datasource) itself. + * + */ + dataSource?: any; + + /** + * Gets/Sets the content of the tiles in minimized state. + * + * + * Valid values: + * "string" When initializing on html markup provide jQuery selector specifying what content of the tile to be shown in minimized state. When initializing on data source provide igTemplate that will be rendered for the minimized state. + * "null" The whole content of the tile will be visible in minimized state. + */ + minimizedState?: string; + + /** + * Gets/Sets the content of the tiles in maximized state. + * + * + * Valid values: + * "string" When initializing on html markup provide jQuery selector specifying which elements of the tile to be shown in maximized state. When initializing on data source provide igTemplate that will be rendered for the maximized state. + * "null" The whole content of the tile will be visible in maximized state. + */ + maximizedState?: string; + + /** + * Gets/Sets the index of which items configuration will be used for positioning and sizing of the maximized tile. + * + * + * Valid values: + * "number" The maximizedTileindex can be set as a number. + * "null" Option is ignored. + */ + maximizedTileIndex?: number; + + /** + * Gets/Sets how many columns to be displayed in the right panel when the tiles are minimized. + * + * + * Valid values: + * "number" Set the number of right panel columns as a number. The minimum value is 1. + * "null" Default of 1 column will be used. + */ + rightPanelCols?: number; + + /** + * Gets/Sets the width of the minimized tiles in the right panel. + * + * + * Valid values: + * "number" Set the width of the minimized tiles as a number. + * "null" Default value equal to the column width will be used. + */ + rightPanelTilesWidth?: number; + + /** + * Gets/Sets the height of the minimized tiles in the right panel. + * + * + * Valid values: + * "number" Set the height of the minimized tiles as a number. + * "null" Default value equal to the column height will be used. + */ + rightPanelTilesHeight?: number; + + /** + * Gets/Sets whether the right panel should show scrollbar when tiles are overflowing. + * + */ + showRightPanelScroll?: boolean; + + /** + * Configure the container variable representation, which defines splitter functionality. + * + */ + splitterOptions?: IgTileManagerSplitterOptions; + + /** + * Gets/Sets JQuery selector that specifies which elements will not trigger maximizing when clicked on. + * + */ + preventMaximizingSelector?: string; + + /** + * Gets/Sets the duration of the animations in the tile manager. + * + */ + animationDuration?: number; + + /** + * Specifies a remote URL accepted by [$.ig.DataSource](ig.datasource) in order to request data from it. + * + */ + dataSourceUrl?: string; + + /** + * Property in the response which specifies where the data records array will be held (if the response is wrapped). See [$.ig.DataSource responseDataKey](ig.datasource#options:settings.responseDataKey). + * + * + * Valid values: + * "string" Specifies the name of the property in which data records are held if the response is wrapped. + * "null" Option is ignored. + */ + responseDataKey?: string; + + /** + * Explicitly set data source type (such as "json"). Please refer to the documentation of [$.ig.DataSource type](ig.datasource#options:settings.type) and its type property. + * + * + * Valid values: + * "string" Explicitly set data source type (such as "json"). Please refer to the documentation of $.ig.DataSource and its type property. + * "null" Option is ignored. + */ + responseDataType?: string; + + /** + * Explicitly set data source type (such as "json"). Please refer to the documentation of [$.ig.DataSource type](ig.datasource#options:settings.type) and its type property. + * + */ + dataSourceType?: string; + + /** + * Specifies the HTTP request method. + * + */ + requestType?: string; + + /** + * Gets/Sets the HTTP content type for the response object. See [Perform an asynchronous HTTP (Ajax) request](http://api.jquery.com/jQuery.ajax/). + * + */ + responseContentType?: string; + + /** + * Fired before databinding is performed + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the tile manager performing databinding. + * Use ui.dataSource to get a reference to the [$.ig.DataSource](ig.datasource) the tile manager is to be databound to. + */ + dataBinding?: DataBindingEvent; + + /** + * Fired after databinding is complete + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the tile manager performing databinding. + * Use ui.dataView to get a reference to the data the tile manager is databound to. + * Use ui.success to get see if the databinding was performed correctly. + * Use ui.errorMessage to get the error message if the databinding failed. + */ + dataBound?: DataBoundEvent; + + /** + * Fired before rendering of the tile manager begins. + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the tile manager performing rendering. + * Use ui.tiles to get a reference to the tiles the tile manager is going to render. If using data source this referes to the data provided. + * Use ui.items to get a reference to the item configurations the tile manager has. + */ + rendering?: RenderingEvent; + + /** + * Fired after rendering of the tile manager completes. + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the tile manager performing rendering. + */ + rendered?: RenderedEvent; + + /** + * Event fired before a tile is rendered in the container + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the tile manager performing rendering. + * Use ui.tile to get a reference to the tile being rendered + */ + tileRendering?: TileRenderingEvent; + + /** + * Event Fired after a tile has been rendered in the container + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the tile manager performing rendering. + * Use ui.tile to get a reference to the rendered tile + */ + tileRendered?: TileRenderedEvent; + + /** + * Fired before a tile in the tile manager is maximized. + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the tile manager performing the maximizing the tile belongs to. + * Use ui.tile to get the jQuery element of the tile being maximized + * Use ui.minimizingTile to get reference to the tile that is minimizing simultaneously or null if no tile is minimizing. + */ + tileMaximizing?: TileMaximizingEvent; + + /** + * Fired after a tile in the tile manager is maximized. + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the tile manager the maximized tile belongs to. + * Use ui.tile to get the jQuery element of the maximized tile + */ + tileMaximized?: TileMaximizedEvent; + + /** + * Fired before a tile in the tile manager is minimized. + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the tile manager performing the minimizing the tile belongs to. + * Use ui.tile to get the jQuery element of the tile being minimized + * Use ui.maximizingTile to get reference to the tile that is maximizing simultaneously or null if no tile is maximizing. + */ + tileMinimizing?: TileMinimizingEvent; + + /** + * Fired after a tile in the tile manager is minimized. + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the tile manager the minimized tile belongs to. + * Use ui.tile to get the jQuery element of the minimized tile + */ + tileMinimized?: TileMinimizedEvent; + + /** + * Option for igTileManager + */ + [optionName: string]: any; +} +interface IgTileManagerMethods { + /** + * Maximizes a given tile. + * + * @param $tileToMaximize Specifies the jQuery object of the tile element to be maximized. + * @param animDuration Specifies the animation duration for this maximizing. + * @param event Indicates the browser even which triggered this action (not API). + */ + maximize($tileToMaximize: Object, animDuration?: number, event?: Object): void; + + /** + * Minimizes the maximized tile. Has no effect if no maximized tile is present. + * + * @param animDuration Specifies the animation duration for this minimize. + * @param event Indicates the browser even which triggered this action (not API). + */ + minimize(animDuration?: number, event?: Object): void; + + /** + * Returns the maximized tile or null if such is not present. + * @return object|null Returns the maximized tile or null if such is not present. + */ + maximizedTile(): Object; + + /** + * Returns an array with the tiles in minimized state or null if such are not present. + * @return object|null Returns an array with the tiles in minimized state or null if such are not present. + */ + minimizedTiles(): Object; + + /** + * Returns the splitter associated with this tile manager or + * null if the tile manager was instantiated with maximizedTileIndex. + * @return object|null Returns the splitter associated with this tile manager or null if the tile manager was instantiated with maximizedTileIndex. + */ + splitter(): Object; + + /** + * Returns the [layout manager](ui.iglayoutmanager) associated with current tile manager. + */ + layoutManager(): Object; + + /** + * Reflow the tile manager. Rearranging the tiles to fit in the container + * + * @param forceReflow Indicates whether the reflow should be forced. Useful in cases where the items size and position was changed manually. + * @param animationDuration The animation duration to be used for this reflow only. + * @param event Indicates the browser even which triggered this action (not API). + */ + reflow(forceReflow?: Object, animationDuration?: number, event?: Object): void; + + /** + * Returns the element that represents this widget. + */ + widget(): Object; + + /** + * Causes the TileManager to data bind to the data source (local or remote) , and re-render all of the data as well. + */ + dataBind(): void; + + /** + * Deletes the widget instance (client object). It is no longer accessible and all its event handlers stop working. Destroys all child widgets. Removes auto-generated HTML content, which is outside the widget, e.g. detached popups, dropdowns, etc. + */ + destroy(): Object; +} +interface JQuery { + data(propertyName: "igTileManager"): IgTileManagerMethods; +} + +interface JQuery { + igTileManager(methodName: "maximize", $tileToMaximize: Object, animDuration?: number, event?: Object): void; + igTileManager(methodName: "minimize", animDuration?: number, event?: Object): void; + igTileManager(methodName: "maximizedTile"): Object; + igTileManager(methodName: "minimizedTiles"): Object; + igTileManager(methodName: "splitter"): Object; + igTileManager(methodName: "layoutManager"): Object; + igTileManager(methodName: "reflow", forceReflow?: Object, animationDuration?: number, event?: Object): void; + igTileManager(methodName: "widget"): Object; + igTileManager(methodName: "dataBind"): void; + igTileManager(methodName: "destroy"): Object; + + /** + * * + */ + igTileManager(optionLiteral: 'option', optionName: "width"): string|number; + + /** + * * + * + * @optionValue New value to be set. + */ + igTileManager(optionLiteral: 'option', optionName: "width", optionValue: string|number): void; + + /** + * Gets/Sets the height of the container. + * + */ + igTileManager(optionLiteral: 'option', optionName: "height"): string|number; + + /** + * /Sets the height of the container. + * + * + * @optionValue New value to be set. + */ + igTileManager(optionLiteral: 'option', optionName: "height", optionValue: string|number): void; + + /** + * Gets/Sets the width of each column in the container. + * + */ + igTileManager(optionLiteral: 'option', optionName: "columnWidth"): string|number; + + /** + * /Sets the width of each column in the container. + * + * + * @optionValue New value to be set. + */ + igTileManager(optionLiteral: 'option', optionName: "columnWidth", optionValue: string|number): void; + + /** + * Gets/Sets the height of each column in the container. + * + */ + igTileManager(optionLiteral: 'option', optionName: "columnHeight"): string|number; + + /** + * /Sets the height of each column in the container. + * + * + * @optionValue New value to be set. + */ + igTileManager(optionLiteral: 'option', optionName: "columnHeight", optionValue: string|number): void; + + /** + * Gets/Sets the columns count in the container. + * + */ + igTileManager(optionLiteral: 'option', optionName: "cols"): number; + + /** + * /Sets the columns count in the container. + * + * + * @optionValue New value to be set. + */ + igTileManager(optionLiteral: 'option', optionName: "cols", optionValue: number): void; + + /** + * Gets/Sets the rows count in the container. + * + */ + igTileManager(optionLiteral: 'option', optionName: "rows"): number; + + /** + * /Sets the rows count in the container. + * + * + * @optionValue New value to be set. + */ + igTileManager(optionLiteral: 'option', optionName: "rows", optionValue: number): void; + + /** + * Gets/Sets the horizontal spacing between tiles. + * + * number The horizontal spacing between tiles can be set as a number. + */ + igTileManager(optionLiteral: 'option', optionName: "marginLeft"): number; + + /** + * /Sets the horizontal spacing between tiles. + * + * number The horizontal spacing between tiles can be set as a number. + * + * @optionValue New value to be set. + */ + igTileManager(optionLiteral: 'option', optionName: "marginLeft", optionValue: number): void; + + /** + * Gets/Sets the vertical spacing between tiles. + * + * number The vertical spacing between tiles can be set as a number. + */ + igTileManager(optionLiteral: 'option', optionName: "marginTop"): number; + + /** + * /Sets the vertical spacing between tiles. + * + * number The vertical spacing between tiles can be set as a number. + * + * @optionValue New value to be set. + */ + igTileManager(optionLiteral: 'option', optionName: "marginTop", optionValue: number): void; + + /** + * Gets/Sets whether the items will rearrange when the container is resized. + * + */ + igTileManager(optionLiteral: 'option', optionName: "rearrangeItems"): boolean; + + /** + * /Sets whether the items will rearrange when the container is resized. + * + * + * @optionValue New value to be set. + */ + igTileManager(optionLiteral: 'option', optionName: "rearrangeItems", optionValue: boolean): void; + + /** + * Gets/Sets the tiles configurations. Every tile is described by rowSpan, colSpan, rowIndex and colIndex. + * + */ + igTileManager(optionLiteral: 'option', optionName: "items"): Object; + + /** + * /Sets the tiles configurations. Every tile is described by rowSpan, colSpan, rowIndex and colIndex. + * + * + * @optionValue New value to be set. + */ + igTileManager(optionLiteral: 'option', optionName: "items", optionValue: Object): void; + + /** + * Gets any valid data source accepted by [$.ig.DataSource](ig.datasource), or an instance of an [$.ig.DataSource](ig.datasource) itself. + * + */ + igTileManager(optionLiteral: 'option', optionName: "dataSource"): any; + + /** + * Sets any valid data source accepted by [$.ig.DataSource](ig.datasource), or an instance of an [$.ig.DataSource](ig.datasource) itself. + * + * + * @optionValue New value to be set. + */ + igTileManager(optionLiteral: 'option', optionName: "dataSource", optionValue: any): void; + + /** + * Gets/Sets the content of the tiles in minimized state. + * + */ + igTileManager(optionLiteral: 'option', optionName: "minimizedState"): string; + + /** + * /Sets the content of the tiles in minimized state. + * + * + * @optionValue New value to be set. + */ + igTileManager(optionLiteral: 'option', optionName: "minimizedState", optionValue: string): void; + + /** + * Gets/Sets the content of the tiles in maximized state. + * + */ + igTileManager(optionLiteral: 'option', optionName: "maximizedState"): string; + + /** + * /Sets the content of the tiles in maximized state. + * + * + * @optionValue New value to be set. + */ + igTileManager(optionLiteral: 'option', optionName: "maximizedState", optionValue: string): void; + + /** + * Gets/Sets the index of which items configuration will be used for positioning and sizing of the maximized tile. + * + */ + igTileManager(optionLiteral: 'option', optionName: "maximizedTileIndex"): number; + + /** + * /Sets the index of which items configuration will be used for positioning and sizing of the maximized tile. + * + * + * @optionValue New value to be set. + */ + igTileManager(optionLiteral: 'option', optionName: "maximizedTileIndex", optionValue: number): void; + + /** + * Gets/Sets how many columns to be displayed in the right panel when the tiles are minimized. + * + */ + igTileManager(optionLiteral: 'option', optionName: "rightPanelCols"): number; + + /** + * /Sets how many columns to be displayed in the right panel when the tiles are minimized. + * + * + * @optionValue New value to be set. + */ + igTileManager(optionLiteral: 'option', optionName: "rightPanelCols", optionValue: number): void; + + /** + * Gets/Sets the width of the minimized tiles in the right panel. + * + */ + igTileManager(optionLiteral: 'option', optionName: "rightPanelTilesWidth"): number; + + /** + * /Sets the width of the minimized tiles in the right panel. + * + * + * @optionValue New value to be set. + */ + igTileManager(optionLiteral: 'option', optionName: "rightPanelTilesWidth", optionValue: number): void; + + /** + * Gets/Sets the height of the minimized tiles in the right panel. + * + */ + igTileManager(optionLiteral: 'option', optionName: "rightPanelTilesHeight"): number; + + /** + * /Sets the height of the minimized tiles in the right panel. + * + * + * @optionValue New value to be set. + */ + igTileManager(optionLiteral: 'option', optionName: "rightPanelTilesHeight", optionValue: number): void; + + /** + * Gets/Sets whether the right panel should show scrollbar when tiles are overflowing. + * + */ + igTileManager(optionLiteral: 'option', optionName: "showRightPanelScroll"): boolean; + + /** + * /Sets whether the right panel should show scrollbar when tiles are overflowing. + * + * + * @optionValue New value to be set. + */ + igTileManager(optionLiteral: 'option', optionName: "showRightPanelScroll", optionValue: boolean): void; + + /** + * Configure the container variable representation, which defines splitter functionality. + * + */ + igTileManager(optionLiteral: 'option', optionName: "splitterOptions"): IgTileManagerSplitterOptions; + + /** + * Configure the container variable representation, which defines splitter functionality. + * + * + * @optionValue New value to be set. + */ + igTileManager(optionLiteral: 'option', optionName: "splitterOptions", optionValue: IgTileManagerSplitterOptions): void; + + /** + * Gets/Sets JQuery selector that specifies which elements will not trigger maximizing when clicked on. + * + */ + igTileManager(optionLiteral: 'option', optionName: "preventMaximizingSelector"): string; + + /** + * /Sets JQuery selector that specifies which elements will not trigger maximizing when clicked on. + * + * + * @optionValue New value to be set. + */ + igTileManager(optionLiteral: 'option', optionName: "preventMaximizingSelector", optionValue: string): void; + + /** + * Gets/Sets the duration of the animations in the tile manager. + * + */ + igTileManager(optionLiteral: 'option', optionName: "animationDuration"): number; + + /** + * /Sets the duration of the animations in the tile manager. + * + * + * @optionValue New value to be set. + */ + igTileManager(optionLiteral: 'option', optionName: "animationDuration", optionValue: number): void; + + /** + * Gets a remote URL accepted by [$.ig.DataSource](ig.datasource) in order to request data from it. + * + */ + igTileManager(optionLiteral: 'option', optionName: "dataSourceUrl"): string; + + /** + * Sets a remote URL accepted by [$.ig.DataSource](ig.datasource) in order to request data from it. + * + * + * @optionValue New value to be set. + */ + igTileManager(optionLiteral: 'option', optionName: "dataSourceUrl", optionValue: string): void; + + /** + * Property in the response which specifies where the data records array will be held (if the response is wrapped). See [$.ig.DataSource responseDataKey](ig.datasource#options:settings.responseDataKey). + * + */ + igTileManager(optionLiteral: 'option', optionName: "responseDataKey"): string; + + /** + * Property in the response which specifies where the data records array will be held (if the response is wrapped). See [$.ig.DataSource responseDataKey](ig.datasource#options:settings.responseDataKey). + * + * + * @optionValue New value to be set. + */ + igTileManager(optionLiteral: 'option', optionName: "responseDataKey", optionValue: string): void; + + /** + * Explicitly set data source type (such as "json"). Please refer to the documentation of [$.ig.DataSource type](ig.datasource#options:settings.type) and its type property. + * + */ + igTileManager(optionLiteral: 'option', optionName: "responseDataType"): string; + + /** + * Explicitly set data source type (such as "json"). Please refer to the documentation of [$.ig.DataSource type](ig.datasource#options:settings.type) and its type property. + * + * + * @optionValue New value to be set. + */ + igTileManager(optionLiteral: 'option', optionName: "responseDataType", optionValue: string): void; + + /** + * Explicitly set data source type (such as "json"). Please refer to the documentation of [$.ig.DataSource type](ig.datasource#options:settings.type) and its type property. + * + */ + igTileManager(optionLiteral: 'option', optionName: "dataSourceType"): string; + + /** + * Explicitly set data source type (such as "json"). Please refer to the documentation of [$.ig.DataSource type](ig.datasource#options:settings.type) and its type property. + * + * + * @optionValue New value to be set. + */ + igTileManager(optionLiteral: 'option', optionName: "dataSourceType", optionValue: string): void; + + /** + * Gets the HTTP request method. + * + */ + igTileManager(optionLiteral: 'option', optionName: "requestType"): string; + + /** + * Sets the HTTP request method. + * + * + * @optionValue New value to be set. + */ + igTileManager(optionLiteral: 'option', optionName: "requestType", optionValue: string): void; + + /** + * Gets/Sets the HTTP content type for the response object. See [Perform an asynchronous HTTP (Ajax) request](http://api.jquery.com/jQuery.ajax/). + * + */ + igTileManager(optionLiteral: 'option', optionName: "responseContentType"): string; + + /** + * /Sets the HTTP content type for the response object. See [Perform an asynchronous HTTP (Ajax) request](http://api.jquery.com/jQuery.ajax/). + * + * + * @optionValue New value to be set. + */ + igTileManager(optionLiteral: 'option', optionName: "responseContentType", optionValue: string): void; + + /** + * Fired before databinding is performed + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the tile manager performing databinding. + * Use ui.dataSource to get a reference to the [$.ig.DataSource](ig.datasource) the tile manager is to be databound to. + */ + igTileManager(optionLiteral: 'option', optionName: "dataBinding"): DataBindingEvent; + + /** + * Fired before databinding is performed + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the tile manager performing databinding. + * Use ui.dataSource to get a reference to the [$.ig.DataSource](ig.datasource) the tile manager is to be databound to. + * + * @optionValue New value to be set. + */ + igTileManager(optionLiteral: 'option', optionName: "dataBinding", optionValue: DataBindingEvent): void; + + /** + * Fired after databinding is complete + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the tile manager performing databinding. + * Use ui.dataView to get a reference to the data the tile manager is databound to. + * Use ui.success to get see if the databinding was performed correctly. + * Use ui.errorMessage to get the error message if the databinding failed. + */ + igTileManager(optionLiteral: 'option', optionName: "dataBound"): DataBoundEvent; + + /** + * Fired after databinding is complete + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the tile manager performing databinding. + * Use ui.dataView to get a reference to the data the tile manager is databound to. + * Use ui.success to get see if the databinding was performed correctly. + * Use ui.errorMessage to get the error message if the databinding failed. + * + * @optionValue New value to be set. + */ + igTileManager(optionLiteral: 'option', optionName: "dataBound", optionValue: DataBoundEvent): void; + + /** + * Fired before rendering of the tile manager begins. + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the tile manager performing rendering. + * Use ui.tiles to get a reference to the tiles the tile manager is going to render. If using data source this referes to the data provided. + * Use ui.items to get a reference to the item configurations the tile manager has. + */ + igTileManager(optionLiteral: 'option', optionName: "rendering"): RenderingEvent; + + /** + * Fired before rendering of the tile manager begins. + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the tile manager performing rendering. + * Use ui.tiles to get a reference to the tiles the tile manager is going to render. If using data source this referes to the data provided. + * Use ui.items to get a reference to the item configurations the tile manager has. + * + * @optionValue New value to be set. + */ + igTileManager(optionLiteral: 'option', optionName: "rendering", optionValue: RenderingEvent): void; + + /** + * Fired after rendering of the tile manager completes. + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the tile manager performing rendering. + */ + igTileManager(optionLiteral: 'option', optionName: "rendered"): RenderedEvent; + + /** + * Fired after rendering of the tile manager completes. + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the tile manager performing rendering. + * + * @optionValue New value to be set. + */ + igTileManager(optionLiteral: 'option', optionName: "rendered", optionValue: RenderedEvent): void; + + /** + * Event fired before a tile is rendered in the container + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the tile manager performing rendering. + * Use ui.tile to get a reference to the tile being rendered + */ + igTileManager(optionLiteral: 'option', optionName: "tileRendering"): TileRenderingEvent; + + /** + * Event fired before a tile is rendered in the container + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the tile manager performing rendering. + * Use ui.tile to get a reference to the tile being rendered + * + * @optionValue Define event handler function. + */ + igTileManager(optionLiteral: 'option', optionName: "tileRendering", optionValue: TileRenderingEvent): void; + + /** + * Event Fired after a tile has been rendered in the container + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the tile manager performing rendering. + * Use ui.tile to get a reference to the rendered tile + */ + igTileManager(optionLiteral: 'option', optionName: "tileRendered"): TileRenderedEvent; + + /** + * Event Fired after a tile has been rendered in the container + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the tile manager performing rendering. + * Use ui.tile to get a reference to the rendered tile + * + * @optionValue Define event handler function. + */ + igTileManager(optionLiteral: 'option', optionName: "tileRendered", optionValue: TileRenderedEvent): void; + + /** + * Fired before a tile in the tile manager is maximized. + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the tile manager performing the maximizing the tile belongs to. + * Use ui.tile to get the jQuery element of the tile being maximized + * Use ui.minimizingTile to get reference to the tile that is minimizing simultaneously or null if no tile is minimizing. + */ + igTileManager(optionLiteral: 'option', optionName: "tileMaximizing"): TileMaximizingEvent; + + /** + * Fired before a tile in the tile manager is maximized. + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the tile manager performing the maximizing the tile belongs to. + * Use ui.tile to get the jQuery element of the tile being maximized + * Use ui.minimizingTile to get reference to the tile that is minimizing simultaneously or null if no tile is minimizing. + * + * @optionValue New value to be set. + */ + igTileManager(optionLiteral: 'option', optionName: "tileMaximizing", optionValue: TileMaximizingEvent): void; + + /** + * Fired after a tile in the tile manager is maximized. + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the tile manager the maximized tile belongs to. + * Use ui.tile to get the jQuery element of the maximized tile + */ + igTileManager(optionLiteral: 'option', optionName: "tileMaximized"): TileMaximizedEvent; + + /** + * Fired after a tile in the tile manager is maximized. + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the tile manager the maximized tile belongs to. + * Use ui.tile to get the jQuery element of the maximized tile + * + * @optionValue New value to be set. + */ + igTileManager(optionLiteral: 'option', optionName: "tileMaximized", optionValue: TileMaximizedEvent): void; + + /** + * Fired before a tile in the tile manager is minimized. + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the tile manager performing the minimizing the tile belongs to. + * Use ui.tile to get the jQuery element of the tile being minimized + * Use ui.maximizingTile to get reference to the tile that is maximizing simultaneously or null if no tile is maximizing. + */ + igTileManager(optionLiteral: 'option', optionName: "tileMinimizing"): TileMinimizingEvent; + + /** + * Fired before a tile in the tile manager is minimized. + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the tile manager performing the minimizing the tile belongs to. + * Use ui.tile to get the jQuery element of the tile being minimized + * Use ui.maximizingTile to get reference to the tile that is maximizing simultaneously or null if no tile is maximizing. + * + * @optionValue New value to be set. + */ + igTileManager(optionLiteral: 'option', optionName: "tileMinimizing", optionValue: TileMinimizingEvent): void; + + /** + * Fired after a tile in the tile manager is minimized. + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the tile manager the minimized tile belongs to. + * Use ui.tile to get the jQuery element of the minimized tile + */ + igTileManager(optionLiteral: 'option', optionName: "tileMinimized"): TileMinimizedEvent; + + /** + * Fired after a tile in the tile manager is minimized. + * + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to the tile manager the minimized tile belongs to. + * Use ui.tile to get the jQuery element of the minimized tile + * + * @optionValue New value to be set. + */ + igTileManager(optionLiteral: 'option', optionName: "tileMinimized", optionValue: TileMinimizedEvent): void; + igTileManager(options: IgTileManager): JQuery; + igTileManager(optionLiteral: 'option', optionName: string): any; + igTileManager(optionLiteral: 'option', options: IgTileManager): JQuery; + igTileManager(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igTileManager(methodName: string, ...methodParams: any[]): any; +} +interface ToolbarButtonClickEvent { + (event: Event, ui: ToolbarButtonClickEventUIParam): void; +} + +interface ToolbarButtonClickEventUIParam { +} + +interface ToolbarComboOpeningEvent { + (event: Event, ui: ToolbarComboOpeningEventUIParam): void; +} + +interface ToolbarComboOpeningEventUIParam { +} + +interface ToolbarComboSelectedEvent { + (event: Event, ui: ToolbarComboSelectedEventUIParam): void; +} + +interface ToolbarComboSelectedEventUIParam { +} + +interface ToolbarCustomItemClickEvent { + (event: Event, ui: ToolbarCustomItemClickEventUIParam): void; +} + +interface ToolbarCustomItemClickEventUIParam { +} + +interface ItemRemovedEvent { + (event: Event, ui: ItemRemovedEventUIParam): void; +} + +interface ItemRemovedEventUIParam { +} + +interface ItemAddedEvent { + (event: Event, ui: ItemAddedEventUIParam): void; +} + +interface ItemAddedEventUIParam { +} + +interface ItemDisableEvent { + (event: Event, ui: ItemDisableEventUIParam): void; +} + +interface ItemDisableEventUIParam { +} + +interface ItemEnabledEvent { + (event: Event, ui: ItemEnabledEventUIParam): void; +} + +interface ItemEnabledEventUIParam { +} + +interface WindowResizedEvent { + (event: Event, ui: WindowResizedEventUIParam): void; +} + +interface WindowResizedEventUIParam { +} + +interface IgToolbar { + /** + * Set/Get the widget height. + * + */ + height?: any; + + /** + * Set/Get the widget width. + * + */ + width?: any; + + /** + * Get/Set whether the toolbar can be collapsed. + * + */ + allowCollapsing?: boolean; + + /** + * The css class that will be applied to collapseButtonIcon. + * + */ + collapseButtonIcon?: string; + + /** + * The css class that will be applied to the expand/collapse button icon. + * + */ + expandButtonIcon?: string; + + /** + * Formal name of the widget. + * + */ + name?: string; + + /** + * Display Name of the widget. + * + */ + displayName?: string; + + /** + * Get/Set Toolbar's items. + * + */ + items?: any[]; + + /** + * Get/Set whether the widget is expanded initially. + * + */ + isExpanded?: boolean; + + /** + * Event fired after a click on any toolbar button + */ + toolbarButtonClick?: ToolbarButtonClickEvent; + + /** + * Event is fired before the toolbar is opened. + */ + toolbarComboOpening?: ToolbarComboOpeningEvent; + + /** + * Event fired after toolbar combo is selected + */ + toolbarComboSelected?: ToolbarComboSelectedEvent; + + /** + * Event fired after a click on custom item + */ + toolbarCustomItemClick?: ToolbarCustomItemClickEvent; + + /** + * Event fired after item is removed + */ + itemRemoved?: ItemRemovedEvent; + + /** + * Event fired after item is added + */ + itemAdded?: ItemAddedEvent; + + /** + * Event is fired before item is collapsed. + */ + collapsing?: CollapsingEvent; + + /** + * Event fired after item is collapsed + */ + collapsed?: CollapsedEvent; + + /** + * Event fired before item is expanded + */ + expanding?: ExpandingEvent; + + /** + * Event fired after item is expanded + */ + expanded?: ExpandedEvent; + + /** + * Fired after item is dissabled + */ + itemDisable?: ItemDisableEvent; + + /** + * Fired after item is enabled + */ + itemEnabled?: ItemEnabledEvent; + + /** + * Fired after the window is resized + */ + windowResized?: WindowResizedEvent; + + /** + * Option for igToolbar + */ + [optionName: string]: any; +} +interface IgToolbarMethods { + /** + * Returns the element on which the widget was instantiated + */ + widget(): void; + + /** + * Gets the item by matching the provided index. + * + * @param index The index of the item. + */ + getItem(index: Object): Object; + + /** + * Add item to widget item array + * + * @param item The item to be added. + */ + addItem(item: Object): void; + + /** + * Remove the item matching provided index. + * + * @param index The index of the item. + */ + removeItem(index: Object): Object; + + /** + * Disable item matching provided index. + * + * @param index The index of the item. + * @param disabled The disabled property value. + */ + disableItem(index: Object, disabled: Object): void; + + /** + * Activate item matching provided index. + * + * @param index The index of the item. + * @param activated The activate property value. + */ + activateItem(index: Object, activated: Object): void; + + /** + * Deactivate all buttons. + */ + deactivateAll(): void; + + /** + * Destroy the widget. + */ + destroy(): void; +} +interface JQuery { + data(propertyName: "igToolbar"): IgToolbarMethods; +} + +interface JQuery { + igToolbar(methodName: "widget"): void; + igToolbar(methodName: "getItem", index: Object): Object; + igToolbar(methodName: "addItem", item: Object): void; + igToolbar(methodName: "removeItem", index: Object): Object; + igToolbar(methodName: "disableItem", index: Object, disabled: Object): void; + igToolbar(methodName: "activateItem", index: Object, activated: Object): void; + igToolbar(methodName: "deactivateAll"): void; + igToolbar(methodName: "destroy"): void; + + /** + * Set/Get the widget height. + * + */ + igToolbar(optionLiteral: 'option', optionName: "height"): any; + + /** + * Set/Get the widget height. + * + * + * @optionValue New value to be set. + */ + igToolbar(optionLiteral: 'option', optionName: "height", optionValue: any): void; + + /** + * Set/Get the widget width. + * + */ + igToolbar(optionLiteral: 'option', optionName: "width"): any; + + /** + * Set/Get the widget width. + * + * + * @optionValue New value to be set. + */ + igToolbar(optionLiteral: 'option', optionName: "width", optionValue: any): void; + + /** + * Get/Set whether the toolbar can be collapsed. + * + */ + igToolbar(optionLiteral: 'option', optionName: "allowCollapsing"): boolean; + + /** + * Get/Set whether the toolbar can be collapsed. + * + * + * @optionValue New value to be set. + */ + igToolbar(optionLiteral: 'option', optionName: "allowCollapsing", optionValue: boolean): void; + + /** + * The css class that will be applied to collapseButtonIcon. + * + */ + igToolbar(optionLiteral: 'option', optionName: "collapseButtonIcon"): string; + + /** + * The css class that will be applied to collapseButtonIcon. + * + * + * @optionValue New value to be set. + */ + igToolbar(optionLiteral: 'option', optionName: "collapseButtonIcon", optionValue: string): void; + + /** + * The css class that will be applied to the expand/collapse button icon. + * + */ + igToolbar(optionLiteral: 'option', optionName: "expandButtonIcon"): string; + + /** + * The css class that will be applied to the expand/collapse button icon. + * + * + * @optionValue New value to be set. + */ + igToolbar(optionLiteral: 'option', optionName: "expandButtonIcon", optionValue: string): void; + + /** + * Formal name of the widget. + * + */ + igToolbar(optionLiteral: 'option', optionName: "name"): string; + + /** + * Formal name of the widget. + * + * + * @optionValue New value to be set. + */ + igToolbar(optionLiteral: 'option', optionName: "name", optionValue: string): void; + + /** + * Display Name of the widget. + * + */ + igToolbar(optionLiteral: 'option', optionName: "displayName"): string; + + /** + * Display Name of the widget. + * + * + * @optionValue New value to be set. + */ + igToolbar(optionLiteral: 'option', optionName: "displayName", optionValue: string): void; + + /** + * Get/Set Toolbar's items. + * + */ + igToolbar(optionLiteral: 'option', optionName: "items"): any[]; + + /** + * Get/Set Toolbar's items. + * + * + * @optionValue New value to be set. + */ + igToolbar(optionLiteral: 'option', optionName: "items", optionValue: any[]): void; + + /** + * Get/Set whether the widget is expanded initially. + * + */ + igToolbar(optionLiteral: 'option', optionName: "isExpanded"): boolean; + + /** + * Get/Set whether the widget is expanded initially. + * + * + * @optionValue New value to be set. + */ + igToolbar(optionLiteral: 'option', optionName: "isExpanded", optionValue: boolean): void; + + /** + * Event fired after a click on any toolbar button + */ + igToolbar(optionLiteral: 'option', optionName: "toolbarButtonClick"): ToolbarButtonClickEvent; + + /** + * Event fired after a click on any toolbar button + * + * @optionValue Define event handler function. + */ + igToolbar(optionLiteral: 'option', optionName: "toolbarButtonClick", optionValue: ToolbarButtonClickEvent): void; + + /** + * Event is fired before the toolbar is opened. + */ + igToolbar(optionLiteral: 'option', optionName: "toolbarComboOpening"): ToolbarComboOpeningEvent; + + /** + * Event is fired before the toolbar is opened. + * + * @optionValue Define event handler function. + */ + igToolbar(optionLiteral: 'option', optionName: "toolbarComboOpening", optionValue: ToolbarComboOpeningEvent): void; + + /** + * Event fired after toolbar combo is selected + */ + igToolbar(optionLiteral: 'option', optionName: "toolbarComboSelected"): ToolbarComboSelectedEvent; + + /** + * Event fired after toolbar combo is selected + * + * @optionValue Define event handler function. + */ + igToolbar(optionLiteral: 'option', optionName: "toolbarComboSelected", optionValue: ToolbarComboSelectedEvent): void; + + /** + * Event fired after a click on custom item + */ + igToolbar(optionLiteral: 'option', optionName: "toolbarCustomItemClick"): ToolbarCustomItemClickEvent; + + /** + * Event fired after a click on custom item + * + * @optionValue Define event handler function. + */ + igToolbar(optionLiteral: 'option', optionName: "toolbarCustomItemClick", optionValue: ToolbarCustomItemClickEvent): void; + + /** + * Event fired after item is removed + */ + igToolbar(optionLiteral: 'option', optionName: "itemRemoved"): ItemRemovedEvent; + + /** + * Event fired after item is removed + * + * @optionValue Define event handler function. + */ + igToolbar(optionLiteral: 'option', optionName: "itemRemoved", optionValue: ItemRemovedEvent): void; + + /** + * Event fired after item is added + */ + igToolbar(optionLiteral: 'option', optionName: "itemAdded"): ItemAddedEvent; + + /** + * Event fired after item is added + * + * @optionValue Define event handler function. + */ + igToolbar(optionLiteral: 'option', optionName: "itemAdded", optionValue: ItemAddedEvent): void; + + /** + * Event is fired before item is collapsed. + */ + igToolbar(optionLiteral: 'option', optionName: "collapsing"): CollapsingEvent; + + /** + * Event is fired before item is collapsed. + * + * @optionValue Define event handler function. + */ + igToolbar(optionLiteral: 'option', optionName: "collapsing", optionValue: CollapsingEvent): void; + + /** + * Event fired after item is collapsed + */ + igToolbar(optionLiteral: 'option', optionName: "collapsed"): CollapsedEvent; + + /** + * Event fired after item is collapsed + * + * @optionValue Define event handler function. + */ + igToolbar(optionLiteral: 'option', optionName: "collapsed", optionValue: CollapsedEvent): void; + + /** + * Event fired before item is expanded + */ + igToolbar(optionLiteral: 'option', optionName: "expanding"): ExpandingEvent; + + /** + * Event fired before item is expanded + * + * @optionValue Define event handler function. + */ + igToolbar(optionLiteral: 'option', optionName: "expanding", optionValue: ExpandingEvent): void; + + /** + * Event fired after item is expanded + */ + igToolbar(optionLiteral: 'option', optionName: "expanded"): ExpandedEvent; + + /** + * Event fired after item is expanded + * + * @optionValue Define event handler function. + */ + igToolbar(optionLiteral: 'option', optionName: "expanded", optionValue: ExpandedEvent): void; + + /** + * Fired after item is dissabled + */ + igToolbar(optionLiteral: 'option', optionName: "itemDisable"): ItemDisableEvent; + + /** + * Fired after item is dissabled + * + * @optionValue New value to be set. + */ + igToolbar(optionLiteral: 'option', optionName: "itemDisable", optionValue: ItemDisableEvent): void; + + /** + * Fired after item is enabled + */ + igToolbar(optionLiteral: 'option', optionName: "itemEnabled"): ItemEnabledEvent; + + /** + * Fired after item is enabled + * + * @optionValue New value to be set. + */ + igToolbar(optionLiteral: 'option', optionName: "itemEnabled", optionValue: ItemEnabledEvent): void; + + /** + * Fired after the window is resized + */ + igToolbar(optionLiteral: 'option', optionName: "windowResized"): WindowResizedEvent; + + /** + * Fired after the window is resized + * + * @optionValue New value to be set. + */ + igToolbar(optionLiteral: 'option', optionName: "windowResized", optionValue: WindowResizedEvent): void; + igToolbar(options: IgToolbar): JQuery; + igToolbar(optionLiteral: 'option', optionName: string): any; + igToolbar(optionLiteral: 'option', options: IgToolbar): JQuery; + igToolbar(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igToolbar(methodName: string, ...methodParams: any[]): any; +} +interface ActivatingEvent { + (event: Event, ui: ActivatingEventUIParam): void; +} + +interface ActivatingEventUIParam { + /** + * Used to get reference to this igToolbarButton. + */ + owner?: any; +} + +interface ActivatedEvent { + (event: Event, ui: ActivatedEventUIParam): void; +} + +interface ActivatedEventUIParam { + /** + * Used to get reference to this igToolbarButton. + */ + owner?: any; +} + +interface DeactivatingEvent { + (event: Event, ui: DeactivatingEventUIParam): void; +} + +interface DeactivatingEventUIParam { + /** + * Used to get reference to this igToolbarButton. + */ + owner?: any; +} + +interface DeactivatedEvent { + (event: Event, ui: DeactivatedEventUIParam): void; +} + +interface DeactivatedEventUIParam { + /** + * Used to get reference to this igToolbarButton. + */ + owner?: any; +} + +interface IgToolbarButton { + /** + * Enable/Disable the "Toggling" of a button. + * + */ + allowToggling?: boolean; + + /** + * Get/Set whether the toolbar button is selected. + * + */ + isSelected?: boolean; + + /** + * Event fired before the toolbar button is activated. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to this igToolbarButton. + */ + activating?: ActivatingEvent; + + /** + * Event fired after the toolbar button is activated. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to this igToolbarButton. + */ + activated?: ActivatedEvent; + + /** + * Event fired before the toolbar button is deactivated. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to this igToolbarButton. + */ + deactivating?: DeactivatingEvent; + + /** + * Event fired after the toolbar button is deactivated. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to this igToolbarButton. + */ + deactivated?: DeactivatedEvent; + + /** + * Option for igToolbarButton + */ + [optionName: string]: any; +} +interface IgToolbarButtonMethods { + /** + * Toggle toolbar button + */ + toggle(): void; + + /** + * Activate toolbar button + * + * @param event + */ + activate(event: Object): void; + + /** + * Deactivate toolbar button + * + * @param event + */ + deactivate(event: Object): void; + + /** + * Returns the element that represents this widget. + */ + widget(): Object; + + /** + * Destroy the widget. + */ + destroy(): void; +} +interface JQuery { + data(propertyName: "igToolbarButton"): IgToolbarButtonMethods; +} + +interface JQuery { + igToolbarButton(methodName: "toggle"): void; + igToolbarButton(methodName: "activate", event: Object): void; + igToolbarButton(methodName: "deactivate", event: Object): void; + igToolbarButton(methodName: "widget"): Object; + igToolbarButton(methodName: "destroy"): void; + + /** + * Gets the "Toggling" of a button. + * + */ + igToolbarButton(optionLiteral: 'option', optionName: "allowToggling"): boolean; + + /** + * Enable/Disable the "Toggling" of a button. + * + * + * @optionValue New value to be set. + */ + igToolbarButton(optionLiteral: 'option', optionName: "allowToggling", optionValue: boolean): void; + + /** + * Get/Set whether the toolbar button is selected. + * + */ + igToolbarButton(optionLiteral: 'option', optionName: "isSelected"): boolean; + + /** + * Get/Set whether the toolbar button is selected. + * + * + * @optionValue New value to be set. + */ + igToolbarButton(optionLiteral: 'option', optionName: "isSelected", optionValue: boolean): void; + + /** + * Event fired before the toolbar button is activated. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to this igToolbarButton. + */ + igToolbarButton(optionLiteral: 'option', optionName: "activating"): ActivatingEvent; + + /** + * Event fired before the toolbar button is activated. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to this igToolbarButton. + * + * @optionValue Define event handler function. + */ + igToolbarButton(optionLiteral: 'option', optionName: "activating", optionValue: ActivatingEvent): void; + + /** + * Event fired after the toolbar button is activated. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to this igToolbarButton. + */ + igToolbarButton(optionLiteral: 'option', optionName: "activated"): ActivatedEvent; + + /** + * Event fired after the toolbar button is activated. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to this igToolbarButton. + * + * @optionValue Define event handler function. + */ + igToolbarButton(optionLiteral: 'option', optionName: "activated", optionValue: ActivatedEvent): void; + + /** + * Event fired before the toolbar button is deactivated. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to this igToolbarButton. + */ + igToolbarButton(optionLiteral: 'option', optionName: "deactivating"): DeactivatingEvent; + + /** + * Event fired before the toolbar button is deactivated. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to this igToolbarButton. + * + * @optionValue Define event handler function. + */ + igToolbarButton(optionLiteral: 'option', optionName: "deactivating", optionValue: DeactivatingEvent): void; + + /** + * Event fired after the toolbar button is deactivated. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to this igToolbarButton. + */ + igToolbarButton(optionLiteral: 'option', optionName: "deactivated"): DeactivatedEvent; + + /** + * Event fired after the toolbar button is deactivated. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to this igToolbarButton. + * + * @optionValue Define event handler function. + */ + igToolbarButton(optionLiteral: 'option', optionName: "deactivated", optionValue: DeactivatedEvent): void; + igToolbarButton(options: IgToolbarButton): JQuery; + igToolbarButton(optionLiteral: 'option', optionName: string): any; + igToolbarButton(optionLiteral: 'option', options: IgToolbarButton): JQuery; + igToolbarButton(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igToolbarButton(methodName: string, ...methodParams: any[]): any; +} +interface IgTreeGridColumnFixing { + /** + * Option for igTreeGridColumnFixing + */ + [optionName: string]: any; +} +interface IgTreeGridColumnFixingMethods { + destroy(): void; +} +interface JQuery { + data(propertyName: "igTreeGridColumnFixing"): IgTreeGridColumnFixingMethods; +} + +interface JQuery { + igTreeGridColumnFixing(methodName: "destroy"): void; + igTreeGridColumnFixing(options: IgTreeGridColumnFixing): JQuery; + igTreeGridColumnFixing(optionLiteral: 'option', optionName: string): any; + igTreeGridColumnFixing(optionLiteral: 'option', options: IgTreeGridColumnFixing): JQuery; + igTreeGridColumnFixing(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igTreeGridColumnFixing(methodName: string, ...methodParams: any[]): any; +} +interface IgTreeGridColumnMoving { + /** + * Option for igTreeGridColumnMoving + */ + [optionName: string]: any; +} +interface IgTreeGridColumnMovingMethods { + destroy(): void; +} +interface JQuery { + data(propertyName: "igTreeGridColumnMoving"): IgTreeGridColumnMovingMethods; +} + +interface JQuery { + igTreeGridColumnMoving(methodName: "destroy"): void; + igTreeGridColumnMoving(options: IgTreeGridColumnMoving): JQuery; + igTreeGridColumnMoving(optionLiteral: 'option', optionName: string): any; + igTreeGridColumnMoving(optionLiteral: 'option', options: IgTreeGridColumnMoving): JQuery; + igTreeGridColumnMoving(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igTreeGridColumnMoving(methodName: string, ...methodParams: any[]): any; +} +interface IgTreeGridFiltering { + /** + * The property in the response that will hold the total number of records in the data source + * + */ + recordCountKey?: string; + + /** + * Specifies from which data bound level to be applied filtering - 0 is the first level + * + */ + fromLevel?: number; + + /** + * Specifies to which data bound level to be applied filtering - if -1 filtering should be applied to the last data bound level + * + */ + toLevel?: number; + + /** + * If displayMode is showWithAncestorsAndDescendants, show all records that match filtering conditions and their child records, even if child records don"t match filtering conditions. If displayMode is showWithAncestors show only those records that match filtering conditions and do not show child records(if any) that don"t match filtering conditions + * + */ + displayMode?: any; + + /** + * Specifies the name of a boolean property in the dataRecord object that indicates whether the dataRow matches the filtering conditions. + * When filtering a boolean flag with the specified name is added on each data record object with a value of true if it matches the condition or false if it doesn"t. + * This is used mainly for internal purposes. + * + */ + matchFiltering?: string; + + /** + * Template that is used when filtering is applied and paging is enabled and user goes to another page. It takes precedence over the pagerRecordsLabelTemplate(option from igTreeGridPaging). If it is set to null then it is taken option from igTreeGridPaging. + * Supported options: + * ${currentPageMatches} (filtering) + * ${totalMatches} (filtering) + * ${startRecord} (paging) + * ${endRecord} (paging) + * ${recordCount} (paging) + */ + filterSummaryInPagerTemplate?: string; + + /** + * Option for igTreeGridFiltering + */ + [optionName: string]: any; +} +interface IgTreeGridFilteringMethods { + /** + * Returns the count of data records that match filtering conditions + */ + getFilteringMatchesCount(): number; + destroy(): void; +} +interface JQuery { + data(propertyName: "igTreeGridFiltering"): IgTreeGridFilteringMethods; +} + +interface JQuery { + igTreeGridFiltering(methodName: "getFilteringMatchesCount"): number; + igTreeGridFiltering(methodName: "destroy"): void; + + /** + * The property in the response that will hold the total number of records in the data source + * + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "recordCountKey"): string; + + /** + * The property in the response that will hold the total number of records in the data source + * + * + * @optionValue New value to be set. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "recordCountKey", optionValue: string): void; + + /** + * Specifies from which data bound level to be applied filtering - 0 is the first level + * + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "fromLevel"): number; + + /** + * Specifies from which data bound level to be applied filtering - 0 is the first level + * + * + * @optionValue New value to be set. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "fromLevel", optionValue: number): void; + + /** + * Specifies to which data bound level to be applied filtering - if -1 filtering should be applied to the last data bound level + * + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "toLevel"): number; + + /** + * Specifies to which data bound level to be applied filtering - if -1 filtering should be applied to the last data bound level + * + * + * @optionValue New value to be set. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "toLevel", optionValue: number): void; + + /** + * If displayMode is showWithAncestorsAndDescendants, show all records that match filtering conditions and their child records, even if child records don"t match filtering conditions. If displayMode is showWithAncestors show only those records that match filtering conditions and do not show child records(if any) that don"t match filtering conditions + * + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "displayMode"): any; + + /** + * If displayMode is showWithAncestorsAndDescendants, show all records that match filtering conditions and their child records, even if child records don"t match filtering conditions. If displayMode is showWithAncestors show only those records that match filtering conditions and do not show child records(if any) that don"t match filtering conditions + * + * + * @optionValue New value to be set. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "displayMode", optionValue: any): void; + + /** + * Gets the name of a boolean property in the dataRecord object that indicates whether the dataRow matches the filtering conditions. + * When filtering a boolean flag with the specified name is added on each data record object with a value of true if it matches the condition or false if it doesn"t. + * This is used mainly for internal purposes. + * + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "matchFiltering"): string; + + /** + * Sets the name of a boolean property in the dataRecord object that indicates whether the dataRow matches the filtering conditions. + * When filtering a boolean flag with the specified name is added on each data record object with a value of true if it matches the condition or false if it doesn"t. + * This is used mainly for internal purposes. + * + * + * @optionValue New value to be set. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "matchFiltering", optionValue: string): void; + + /** + * Template that is used when filtering is applied and paging is enabled and user goes to another page. It takes precedence over the pagerRecordsLabelTemplate(option from igTreeGridPaging). If it is set to null then it is taken option from igTreeGridPaging. + * Supported options: + * ${currentPageMatches} (filtering) + * ${totalMatches} (filtering) + * ${startRecord} (paging) + * ${endRecord} (paging) + * ${recordCount} (paging) + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterSummaryInPagerTemplate"): string; + + /** + * Template that is used when filtering is applied and paging is enabled and user goes to another page. It takes precedence over the pagerRecordsLabelTemplate(option from igTreeGridPaging). If it is set to null then it is taken option from igTreeGridPaging. + * Supported options: + * ${currentPageMatches} (filtering) + * ${totalMatches} (filtering) + * ${startRecord} (paging) + * ${endRecord} (paging) + * ${recordCount} (paging) + * + * @optionValue New value to be set. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterSummaryInPagerTemplate", optionValue: string): void; + igTreeGridFiltering(options: IgTreeGridFiltering): JQuery; + igTreeGridFiltering(optionLiteral: 'option', optionName: string): any; + igTreeGridFiltering(optionLiteral: 'option', options: IgTreeGridFiltering): JQuery; + igTreeGridFiltering(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igTreeGridFiltering(methodName: string, ...methodParams: any[]): any; +} +interface IgTreeGridHiding { + /** + * A list of column settings that specifies hiding options on a per column basis. + * + */ + columnSettings?: IgGridHidingColumnSetting[]; + + /** + * The width in pixels of the hidden column indicator in the header. + * + */ + hiddenColumnIndicatorHeaderWidth?: number; + + /** + * Controls containment behavior. + * + * owner The column chooser dialog will be draggable only in the grid area + * window The column chooser dialog will be draggable in the whole window area + */ + columnChooserContainment?: string; + + /** + * The default column chooser width. + * + */ + columnChooserWidth?: string; + + /** + * The default column chooser height. + * + */ + columnChooserHeight?: string; + + /** + * The duration of the dropdown animation in milliseconds. + * + */ + dropDownAnimationDuration?: number; + + /** + * The caption of the column chooser dialog. + * + */ + columnChooserCaptionText?: string; + + /** + * The text used in the drop down tools menu(Feature Chooser) to launch the column chooser dialog. + * + */ + columnChooserDisplayText?: string; + + /** + * The text displayed in the tooltip of the hidden column indicator. + * + */ + hiddenColumnIndicatorTooltipText?: string; + + /** + * The text used in the drop down tools menu(Feature Chooser) to hide a column. + * + */ + columnHideText?: string; + + /** + * The text used in the column chooser to show column + * + */ + columnChooserShowText?: string; + + /** + * The text used in the column chooser to hide column + * + */ + columnChooserHideText?: string; + + /** + * Specifies on click show/hide directly to be shown/hidden columns. If columnChooserHideOnClick is false then Apply and Cancel Buttons are shown on the bottom of modal dialog. Columns are Shown/Hidden after the Apply button is clicked + * + */ + columnChooserHideOnClick?: boolean; + + /** + * Text label for reset button. + * + */ + columnChooserResetButtonLabel?: string; + + /** + * Specifies time of milliseconds for animation duration to show/hide modal dialog + * + */ + columnChooserAnimationDuration?: number; + + /** + * Specifies text of button which apply changes in modal dialog + * + */ + columnChooserButtonApplyText?: string; + + /** + * Specifies text of button which cancel changes in modal dialog + * + */ + columnChooserButtonCancelText?: string; + + /** + * Name of the dialog widget to be used. It should inherit from $.ui.igGridModalDialog. + * + */ + dialogWidget?: string; + + /** + * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. + * + */ + inherit?: boolean; + + /** + * Event fired before a hiding operation is executed. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnIndex to get the hidden column index. Has a value only if the column's key is a number. + * Use ui.columnKey to get the hidden column key. Has a value only if the column's key is a string. + */ + columnHiding?: ColumnHidingEvent; + + /** + * Event fired when trying to hide all columns in fixed or unfixed area. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnKeys array of column keys. Has a value only if the column's key is a string. + */ + columnHidingRefused?: ColumnHidingRefusedEvent; + + /** + * Event fired when trying to show column(s) in fixed area and total width of fixed are will be larger than whole grid width. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnKeys array of column keys. Has a value only if the column's key is a string. + */ + columnShowingRefused?: ColumnShowingRefusedEvent; + + /** + * Event fired before a hiding operation is executed. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnKeys to get array of the hidden column keys. In case when click on Reset button in column chooser then this is an array of column keys. + */ + multiColumnHiding?: MultiColumnHidingEvent; + + /** + * Event fired after the hiding has been executed and results are rendered. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnIndex to get the hidden column index. Has a value only if the column's key is a number. + * Use ui.columnKey to get the hidden column key. Has a value only if the column's key is a string. + */ + columnHidden?: ColumnHiddenEvent; + + /** + * Event fired before a showing operation is executed. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnIndex to get the shown column index. + * Use ui.columnKey to get the shown column key. + */ + columnShowing?: ColumnShowingEvent; + + /** + * Event fired after the showing has been executed and results are rendered. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnIndex to get the shown column index. + * Use ui.columnKey to get the shown column key. + */ + columnShown?: ColumnShownEvent; + + /** + * Event fired before the column chooser is opened. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnChooserElement to get a reference to the Column Chooser element. This is a jQuery object. + */ + columnChooserOpening?: ColumnChooserOpeningEvent; + + /** + * Event fired after the column chooser is already opened. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnChooserElement to get a reference to the Column Chooser element. This is a jQuery object. + */ + columnChooserOpened?: ColumnChooserOpenedEvent; + + /** + * Event fired every time the column chooser changes its position. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnChooserElement to get a reference to the Column Chooser element. This is a jQuery object. + * Use ui.originalPosition to get the original position of the column chooser div as { top, left } object, relative to the page. + * Use ui.position to get the current position of the column chooser div as { top, left } object, relative to the page. + */ + columnChooserMoving?: ColumnChooserMovingEvent; + + /** + * Event fired before the column chooser is closed. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnChooserElement to get a reference to the Column Chooser element. This is a jQuery object. + */ + columnChooserClosing?: ColumnChooserClosingEvent; + + /** + * Event fired after the column chooser has been closed. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnChooserElement to get a reference to the Column Chooser element. This is a jQuery object. + */ + columnChooserClosed?: ColumnChooserClosedEvent; + + /** + * Event fired before the contents of the column chooser are rendered. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnChooserElement to get a reference to the Column Chooser element. This is a jQuery object. + */ + columnChooserContentsRendering?: ColumnChooserContentsRenderingEvent; + + /** + * Event fired after the contents of the column chooser are rendered. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnChooserElement to get a reference to the Column Chooser element. This is a jQuery object. + */ + columnChooserContentsRendered?: ColumnChooserContentsRenderedEvent; + + /** + * Event fired when button Apply in column chooser is clicked + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnChooserElement to get a reference to the Column Chooser element. This is a jQuery object. + * Use ui.columnsToShow to get array of columns identifiers which should be shown + * Use ui.columnsToHide to get array of columns identifiers which should be hidden + */ + columnChooserButtonApplyClick?: ColumnChooserButtonApplyClickEvent; + + /** + * Event fired when button Reset in column chooser is clicked + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnChooserElement to get a reference to the Column Chooser element. This is a jQuery object. + */ + columnChooserButtonResetClick?: ColumnChooserButtonResetClickEvent; + + /** + * Option for igTreeGridHiding + */ + [optionName: string]: any; +} +interface IgTreeGridHidingMethods { + destroy(): void; + + /** + * Shows the Column Chooser dialog. If it is visible the method does nothing. + */ + showColumnChooser(): void; + + /** + * Hides the Column Chooser dialog. If it is not visible the method does nothing. + */ + hideColumnChooser(): void; + + /** + * Shows a hidden column. If the column is not hidden the method does nothing. + * Note: This method is asynchronous which means that it returns immediately and any subsequent code will execute in parallel. This may lead to runtime errors. To avoid them put the subsequent code in the callback parameter provided by the method. + * + * @param column An identifier for the column. If a number is provided it will be used as a column index else if a strings is provided it will be used as a column key. + * @param isMultiColumnHeader If it is true then the column is of type multicolumnheader. An identifier for the column should be of type string. + * @param callback Specifies a custom function to be called when the column(s) is shown(optional) + */ + showColumn(column: Object, isMultiColumnHeader?: boolean, callback?: Function): void; + + /** + * Hides a visible column. If the column is hidden the method does nothing. + * Note: This method is asynchronous which means that it returns immediately and any subsequent code will execute in parallel. This may lead to runtime errors. To avoid them put the subsequent code in the callback parameter provided by the method. + * + * @param column An identifier for the column. If a number is provided it will be used as a column index else if a strings is provided it will be used as a column key. + * @param isMultiColumnHeader If it is true then the column is of type multicolumnheader. An identifier for the column should be of type string. + * @param callback Specifies a custom function to be called when the column is hidden(optional) + */ + hideColumn(column: Object, isMultiColumnHeader?: boolean, callback?: Function): void; + + /** + * Hides visible columns specified by the array. If the column is hidden the method does nothing. + * Note: This method is asynchronous which means that it returns immediately and any subsequent code will execute in parallel. This may lead to runtime errors. To avoid them put the subsequent code in the callback parameter provided by the method. + * + * @param columns An array of identifiers for the columns. If a number is provided it will be used as a column index else if a strings is provided it will be used as a column key. + * @param callback Specifies a custom function to be called when all columns are hidden(optional) + */ + hideMultiColumns(columns: any[], callback?: Function): void; + + /** + * Show visible columns specified by the array. If the column is shown the method does nothing. + * Note: This method is asynchronous which means that it returns immediately and any subsequent code will execute in parallel. This may lead to runtime errors. To avoid them put the subsequent code in the callback parameter provided by the method. + * + * @param columns An array of identifiers for the columns. If a number is provided it will be used as a column index else if a strings is provided it will be used as a column key. + * @param callback Specifies a custom function to be called when all columns are shown(optional) + */ + showMultiColumns(columns: any[], callback?: Function): void; + + /** + * Gets whether the reset button in the column chooser dialog is to be rendered or not. + */ + isToRenderButtonReset(): void; + + /** + * Reset hidden/shown column to initial state of dialog(when it is opened) + */ + resetHidingColumnChooser(): void; + + /** + * Renders the Reset button in the Column Chooser dialog. + */ + renderColumnChooserResetButton(): void; + + /** + * Remove Reset button in column chooser modal dialog + */ + removeColumnChooserResetButton(): void; +} +interface JQuery { + data(propertyName: "igTreeGridHiding"): IgTreeGridHidingMethods; +} + +interface JQuery { + igTreeGridHiding(methodName: "destroy"): void; + igTreeGridHiding(methodName: "showColumnChooser"): void; + igTreeGridHiding(methodName: "hideColumnChooser"): void; + igTreeGridHiding(methodName: "showColumn", column: Object, isMultiColumnHeader?: boolean, callback?: Function): void; + igTreeGridHiding(methodName: "hideColumn", column: Object, isMultiColumnHeader?: boolean, callback?: Function): void; + igTreeGridHiding(methodName: "hideMultiColumns", columns: any[], callback?: Function): void; + igTreeGridHiding(methodName: "showMultiColumns", columns: any[], callback?: Function): void; + igTreeGridHiding(methodName: "isToRenderButtonReset"): void; + igTreeGridHiding(methodName: "resetHidingColumnChooser"): void; + igTreeGridHiding(methodName: "renderColumnChooserResetButton"): void; + igTreeGridHiding(methodName: "removeColumnChooserResetButton"): void; + + /** + * A list of column settings that specifies hiding options on a per column basis. + * + */ + igTreeGridHiding(optionLiteral: 'option', optionName: "columnSettings"): IgGridHidingColumnSetting[]; + + /** + * A list of column settings that specifies hiding options on a per column basis. + * + * + * @optionValue New value to be set. + */ + igTreeGridHiding(optionLiteral: 'option', optionName: "columnSettings", optionValue: IgGridHidingColumnSetting[]): void; + + /** + * The width in pixels of the hidden column indicator in the header. + * + */ + igTreeGridHiding(optionLiteral: 'option', optionName: "hiddenColumnIndicatorHeaderWidth"): number; + + /** + * The width in pixels of the hidden column indicator in the header. + * + * + * @optionValue New value to be set. + */ + igTreeGridHiding(optionLiteral: 'option', optionName: "hiddenColumnIndicatorHeaderWidth", optionValue: number): void; + + /** + * Controls containment behavior. + * + * owner The column chooser dialog will be draggable only in the grid area + * window The column chooser dialog will be draggable in the whole window area + */ + igTreeGridHiding(optionLiteral: 'option', optionName: "columnChooserContainment"): string; + + /** + * Controls containment behavior. + * + * owner The column chooser dialog will be draggable only in the grid area + * window The column chooser dialog will be draggable in the whole window area + * + * @optionValue New value to be set. + */ + igTreeGridHiding(optionLiteral: 'option', optionName: "columnChooserContainment", optionValue: string): void; + + /** + * The default column chooser width. + * + */ + igTreeGridHiding(optionLiteral: 'option', optionName: "columnChooserWidth"): string; + + /** + * The default column chooser width. + * + * + * @optionValue New value to be set. + */ + igTreeGridHiding(optionLiteral: 'option', optionName: "columnChooserWidth", optionValue: string): void; + + /** + * The default column chooser height. + * + */ + igTreeGridHiding(optionLiteral: 'option', optionName: "columnChooserHeight"): string; + + /** + * The default column chooser height. + * + * + * @optionValue New value to be set. + */ + igTreeGridHiding(optionLiteral: 'option', optionName: "columnChooserHeight", optionValue: string): void; + + /** + * The duration of the dropdown animation in milliseconds. + * + */ + igTreeGridHiding(optionLiteral: 'option', optionName: "dropDownAnimationDuration"): number; + + /** + * The duration of the dropdown animation in milliseconds. + * + * + * @optionValue New value to be set. + */ + igTreeGridHiding(optionLiteral: 'option', optionName: "dropDownAnimationDuration", optionValue: number): void; + + /** + * The caption of the column chooser dialog. + * + */ + igTreeGridHiding(optionLiteral: 'option', optionName: "columnChooserCaptionText"): string; + + /** + * The caption of the column chooser dialog. + * + * + * @optionValue New value to be set. + */ + igTreeGridHiding(optionLiteral: 'option', optionName: "columnChooserCaptionText", optionValue: string): void; + + /** + * The text used in the drop down tools menu(Feature Chooser) to launch the column chooser dialog. + * + */ + igTreeGridHiding(optionLiteral: 'option', optionName: "columnChooserDisplayText"): string; + + /** + * The text used in the drop down tools menu(Feature Chooser) to launch the column chooser dialog. + * + * + * @optionValue New value to be set. + */ + igTreeGridHiding(optionLiteral: 'option', optionName: "columnChooserDisplayText", optionValue: string): void; + + /** + * The text displayed in the tooltip of the hidden column indicator. + * + */ + igTreeGridHiding(optionLiteral: 'option', optionName: "hiddenColumnIndicatorTooltipText"): string; + + /** + * The text displayed in the tooltip of the hidden column indicator. + * + * + * @optionValue New value to be set. + */ + igTreeGridHiding(optionLiteral: 'option', optionName: "hiddenColumnIndicatorTooltipText", optionValue: string): void; + + /** + * The text used in the drop down tools menu(Feature Chooser) to hide a column. + * + */ + igTreeGridHiding(optionLiteral: 'option', optionName: "columnHideText"): string; + + /** + * The text used in the drop down tools menu(Feature Chooser) to hide a column. + * + * + * @optionValue New value to be set. + */ + igTreeGridHiding(optionLiteral: 'option', optionName: "columnHideText", optionValue: string): void; + + /** + * The text used in the column chooser to show column + * + */ + igTreeGridHiding(optionLiteral: 'option', optionName: "columnChooserShowText"): string; + + /** + * The text used in the column chooser to show column + * + * + * @optionValue New value to be set. + */ + igTreeGridHiding(optionLiteral: 'option', optionName: "columnChooserShowText", optionValue: string): void; + + /** + * The text used in the column chooser to hide column + * + */ + igTreeGridHiding(optionLiteral: 'option', optionName: "columnChooserHideText"): string; + + /** + * The text used in the column chooser to hide column + * + * + * @optionValue New value to be set. + */ + igTreeGridHiding(optionLiteral: 'option', optionName: "columnChooserHideText", optionValue: string): void; + + /** + * Gets on click show/hide directly to be shown/hidden columns. If columnChooserHideOnClick is false then Apply and Cancel Buttons are shown on the bottom of modal dialog. Columns are Shown/Hidden after the Apply button is clicked + * + */ + igTreeGridHiding(optionLiteral: 'option', optionName: "columnChooserHideOnClick"): boolean; + + /** + * Sets on click show/hide directly to be shown/hidden columns. If columnChooserHideOnClick is false then Apply and Cancel Buttons are shown on the bottom of modal dialog. Columns are Shown/Hidden after the Apply button is clicked + * + * + * @optionValue New value to be set. + */ + igTreeGridHiding(optionLiteral: 'option', optionName: "columnChooserHideOnClick", optionValue: boolean): void; + + /** + * Text label for reset button. + * + */ + igTreeGridHiding(optionLiteral: 'option', optionName: "columnChooserResetButtonLabel"): string; + + /** + * Text label for reset button. + * + * + * @optionValue New value to be set. + */ + igTreeGridHiding(optionLiteral: 'option', optionName: "columnChooserResetButtonLabel", optionValue: string): void; + + /** + * Gets time of milliseconds for animation duration to show/hide modal dialog + * + */ + igTreeGridHiding(optionLiteral: 'option', optionName: "columnChooserAnimationDuration"): number; + + /** + * Sets time of milliseconds for animation duration to show/hide modal dialog + * + * + * @optionValue New value to be set. + */ + igTreeGridHiding(optionLiteral: 'option', optionName: "columnChooserAnimationDuration", optionValue: number): void; + + /** + * Gets text of button which apply changes in modal dialog + * + */ + igTreeGridHiding(optionLiteral: 'option', optionName: "columnChooserButtonApplyText"): string; + + /** + * Sets text of button which apply changes in modal dialog + * + * + * @optionValue New value to be set. + */ + igTreeGridHiding(optionLiteral: 'option', optionName: "columnChooserButtonApplyText", optionValue: string): void; + + /** + * Gets text of button which cancel changes in modal dialog + * + */ + igTreeGridHiding(optionLiteral: 'option', optionName: "columnChooserButtonCancelText"): string; + + /** + * Sets text of button which cancel changes in modal dialog + * + * + * @optionValue New value to be set. + */ + igTreeGridHiding(optionLiteral: 'option', optionName: "columnChooserButtonCancelText", optionValue: string): void; + + /** + * Name of the dialog widget to be used. It should inherit from $.ui.igGridModalDialog. + * + */ + igTreeGridHiding(optionLiteral: 'option', optionName: "dialogWidget"): string; + + /** + * Name of the dialog widget to be used. It should inherit from $.ui.igGridModalDialog. + * + * + * @optionValue New value to be set. + */ + igTreeGridHiding(optionLiteral: 'option', optionName: "dialogWidget", optionValue: string): void; + + /** + * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. + * + */ + igTreeGridHiding(optionLiteral: 'option', optionName: "inherit"): boolean; + + /** + * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. + * + * + * @optionValue New value to be set. + */ + igTreeGridHiding(optionLiteral: 'option', optionName: "inherit", optionValue: boolean): void; + + /** + * Event fired before a hiding operation is executed. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnIndex to get the hidden column index. Has a value only if the column's key is a number. + * Use ui.columnKey to get the hidden column key. Has a value only if the column's key is a string. + */ + igTreeGridHiding(optionLiteral: 'option', optionName: "columnHiding"): ColumnHidingEvent; + + /** + * Event fired before a hiding operation is executed. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnIndex to get the hidden column index. Has a value only if the column's key is a number. + * Use ui.columnKey to get the hidden column key. Has a value only if the column's key is a string. + * + * @optionValue Define event handler function. + */ + igTreeGridHiding(optionLiteral: 'option', optionName: "columnHiding", optionValue: ColumnHidingEvent): void; + + /** + * Event fired when trying to hide all columns in fixed or unfixed area. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnKeys array of column keys. Has a value only if the column's key is a string. + */ + igTreeGridHiding(optionLiteral: 'option', optionName: "columnHidingRefused"): ColumnHidingRefusedEvent; + + /** + * Event fired when trying to hide all columns in fixed or unfixed area. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnKeys array of column keys. Has a value only if the column's key is a string. + * + * @optionValue Define event handler function. + */ + igTreeGridHiding(optionLiteral: 'option', optionName: "columnHidingRefused", optionValue: ColumnHidingRefusedEvent): void; + + /** + * Event fired when trying to show column(s) in fixed area and total width of fixed are will be larger than whole grid width. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnKeys array of column keys. Has a value only if the column's key is a string. + */ + igTreeGridHiding(optionLiteral: 'option', optionName: "columnShowingRefused"): ColumnShowingRefusedEvent; + + /** + * Event fired when trying to show column(s) in fixed area and total width of fixed are will be larger than whole grid width. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnKeys array of column keys. Has a value only if the column's key is a string. + * + * @optionValue Define event handler function. + */ + igTreeGridHiding(optionLiteral: 'option', optionName: "columnShowingRefused", optionValue: ColumnShowingRefusedEvent): void; + + /** + * Event fired before a hiding operation is executed. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnKeys to get array of the hidden column keys. In case when click on Reset button in column chooser then this is an array of column keys. + */ + igTreeGridHiding(optionLiteral: 'option', optionName: "multiColumnHiding"): MultiColumnHidingEvent; + + /** + * Event fired before a hiding operation is executed. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnKeys to get array of the hidden column keys. In case when click on Reset button in column chooser then this is an array of column keys. + * + * @optionValue Define event handler function. + */ + igTreeGridHiding(optionLiteral: 'option', optionName: "multiColumnHiding", optionValue: MultiColumnHidingEvent): void; + + /** + * Event fired after the hiding has been executed and results are rendered. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnIndex to get the hidden column index. Has a value only if the column's key is a number. + * Use ui.columnKey to get the hidden column key. Has a value only if the column's key is a string. + */ + igTreeGridHiding(optionLiteral: 'option', optionName: "columnHidden"): ColumnHiddenEvent; + + /** + * Event fired after the hiding has been executed and results are rendered. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnIndex to get the hidden column index. Has a value only if the column's key is a number. + * Use ui.columnKey to get the hidden column key. Has a value only if the column's key is a string. + * + * @optionValue Define event handler function. + */ + igTreeGridHiding(optionLiteral: 'option', optionName: "columnHidden", optionValue: ColumnHiddenEvent): void; + + /** + * Event fired before a showing operation is executed. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnIndex to get the shown column index. + * Use ui.columnKey to get the shown column key. + */ + igTreeGridHiding(optionLiteral: 'option', optionName: "columnShowing"): ColumnShowingEvent; + + /** + * Event fired before a showing operation is executed. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnIndex to get the shown column index. + * Use ui.columnKey to get the shown column key. + * + * @optionValue Define event handler function. + */ + igTreeGridHiding(optionLiteral: 'option', optionName: "columnShowing", optionValue: ColumnShowingEvent): void; + + /** + * Event fired after the showing has been executed and results are rendered. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnIndex to get the shown column index. + * Use ui.columnKey to get the shown column key. + */ + igTreeGridHiding(optionLiteral: 'option', optionName: "columnShown"): ColumnShownEvent; + + /** + * Event fired after the showing has been executed and results are rendered. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnIndex to get the shown column index. + * Use ui.columnKey to get the shown column key. + * + * @optionValue Define event handler function. + */ + igTreeGridHiding(optionLiteral: 'option', optionName: "columnShown", optionValue: ColumnShownEvent): void; + + /** + * Event fired before the column chooser is opened. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnChooserElement to get a reference to the Column Chooser element. This is a jQuery object. + */ + igTreeGridHiding(optionLiteral: 'option', optionName: "columnChooserOpening"): ColumnChooserOpeningEvent; + + /** + * Event fired before the column chooser is opened. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnChooserElement to get a reference to the Column Chooser element. This is a jQuery object. + * + * @optionValue Define event handler function. + */ + igTreeGridHiding(optionLiteral: 'option', optionName: "columnChooserOpening", optionValue: ColumnChooserOpeningEvent): void; + + /** + * Event fired after the column chooser is already opened. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnChooserElement to get a reference to the Column Chooser element. This is a jQuery object. + */ + igTreeGridHiding(optionLiteral: 'option', optionName: "columnChooserOpened"): ColumnChooserOpenedEvent; + + /** + * Event fired after the column chooser is already opened. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnChooserElement to get a reference to the Column Chooser element. This is a jQuery object. + * + * @optionValue Define event handler function. + */ + igTreeGridHiding(optionLiteral: 'option', optionName: "columnChooserOpened", optionValue: ColumnChooserOpenedEvent): void; + + /** + * Event fired every time the column chooser changes its position. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnChooserElement to get a reference to the Column Chooser element. This is a jQuery object. + * Use ui.originalPosition to get the original position of the column chooser div as { top, left } object, relative to the page. + * Use ui.position to get the current position of the column chooser div as { top, left } object, relative to the page. + */ + igTreeGridHiding(optionLiteral: 'option', optionName: "columnChooserMoving"): ColumnChooserMovingEvent; + + /** + * Event fired every time the column chooser changes its position. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnChooserElement to get a reference to the Column Chooser element. This is a jQuery object. + * Use ui.originalPosition to get the original position of the column chooser div as { top, left } object, relative to the page. + * Use ui.position to get the current position of the column chooser div as { top, left } object, relative to the page. + * + * @optionValue Define event handler function. + */ + igTreeGridHiding(optionLiteral: 'option', optionName: "columnChooserMoving", optionValue: ColumnChooserMovingEvent): void; + + /** + * Event fired before the column chooser is closed. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnChooserElement to get a reference to the Column Chooser element. This is a jQuery object. + */ + igTreeGridHiding(optionLiteral: 'option', optionName: "columnChooserClosing"): ColumnChooserClosingEvent; + + /** + * Event fired before the column chooser is closed. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnChooserElement to get a reference to the Column Chooser element. This is a jQuery object. + * + * @optionValue Define event handler function. + */ + igTreeGridHiding(optionLiteral: 'option', optionName: "columnChooserClosing", optionValue: ColumnChooserClosingEvent): void; + + /** + * Event fired after the column chooser has been closed. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnChooserElement to get a reference to the Column Chooser element. This is a jQuery object. + */ + igTreeGridHiding(optionLiteral: 'option', optionName: "columnChooserClosed"): ColumnChooserClosedEvent; + + /** + * Event fired after the column chooser has been closed. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnChooserElement to get a reference to the Column Chooser element. This is a jQuery object. + * + * @optionValue Define event handler function. + */ + igTreeGridHiding(optionLiteral: 'option', optionName: "columnChooserClosed", optionValue: ColumnChooserClosedEvent): void; + + /** + * Event fired before the contents of the column chooser are rendered. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnChooserElement to get a reference to the Column Chooser element. This is a jQuery object. + */ + igTreeGridHiding(optionLiteral: 'option', optionName: "columnChooserContentsRendering"): ColumnChooserContentsRenderingEvent; + + /** + * Event fired before the contents of the column chooser are rendered. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnChooserElement to get a reference to the Column Chooser element. This is a jQuery object. + * + * @optionValue Define event handler function. + */ + igTreeGridHiding(optionLiteral: 'option', optionName: "columnChooserContentsRendering", optionValue: ColumnChooserContentsRenderingEvent): void; + + /** + * Event fired after the contents of the column chooser are rendered. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnChooserElement to get a reference to the Column Chooser element. This is a jQuery object. + */ + igTreeGridHiding(optionLiteral: 'option', optionName: "columnChooserContentsRendered"): ColumnChooserContentsRenderedEvent; + + /** + * Event fired after the contents of the column chooser are rendered. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnChooserElement to get a reference to the Column Chooser element. This is a jQuery object. + * + * @optionValue Define event handler function. + */ + igTreeGridHiding(optionLiteral: 'option', optionName: "columnChooserContentsRendered", optionValue: ColumnChooserContentsRenderedEvent): void; + + /** + * Event fired when button Apply in column chooser is clicked + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnChooserElement to get a reference to the Column Chooser element. This is a jQuery object. + * Use ui.columnsToShow to get array of columns identifiers which should be shown + * Use ui.columnsToHide to get array of columns identifiers which should be hidden + */ + igTreeGridHiding(optionLiteral: 'option', optionName: "columnChooserButtonApplyClick"): ColumnChooserButtonApplyClickEvent; + + /** + * Event fired when button Apply in column chooser is clicked + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnChooserElement to get a reference to the Column Chooser element. This is a jQuery object. + * Use ui.columnsToShow to get array of columns identifiers which should be shown + * Use ui.columnsToHide to get array of columns identifiers which should be hidden + * + * @optionValue Define event handler function. + */ + igTreeGridHiding(optionLiteral: 'option', optionName: "columnChooserButtonApplyClick", optionValue: ColumnChooserButtonApplyClickEvent): void; + + /** + * Event fired when button Reset in column chooser is clicked + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnChooserElement to get a reference to the Column Chooser element. This is a jQuery object. + */ + igTreeGridHiding(optionLiteral: 'option', optionName: "columnChooserButtonResetClick"): ColumnChooserButtonResetClickEvent; + + /** + * Event fired when button Reset in column chooser is clicked + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridHiding widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnChooserElement to get a reference to the Column Chooser element. This is a jQuery object. + * + * @optionValue Define event handler function. + */ + igTreeGridHiding(optionLiteral: 'option', optionName: "columnChooserButtonResetClick", optionValue: ColumnChooserButtonResetClickEvent): void; + igTreeGridHiding(options: IgTreeGridHiding): JQuery; + igTreeGridHiding(optionLiteral: 'option', optionName: string): any; + igTreeGridHiding(optionLiteral: 'option', options: IgTreeGridHiding): JQuery; + igTreeGridHiding(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igTreeGridHiding(methodName: string, ...methodParams: any[]): any; +} +interface IgTreeGridDataSourceSettings { + /** + * The name of the property that keeps track of the expansion state of a data item. Defaults to __ig_options.expanded. + * + */ + propertyExpanded?: string; + + /** + * The name of the property that keeps track of the level in the hierarchy.Defaults to __ig_options.dataLevel. + * + */ + propertyDataLevel?: string; + + /** + * If set to TRUE it is expected that the source of data is normalized and transformed(has set dataLevel and expansion state). The source of data is used as flatDataView. Usually used when the paging is remote and paging mode is allLevels, or features are remote(and the processing of the returned result should be made on the server) + * + */ + initialFlatDataView?: boolean; + + /** + * Option for IgTreeGridDataSourceSettings + */ + [optionName: string]: any; +} + +interface IgTreeGrid { + /** + * Specifies the indentation (in pixels or percent) for a tree grid row. Nested indentation is achieved by calculating the level times the indentation value. Ex: '10px' or '5%'. Default is 30. + * + */ + indentation?: string; + + /** + * If initial indentation level is set then it is used to be calculated width of the data skip column(usually used when remote load on demand is enabled) + * + */ + initialIndentationLevel?: number; + + /** + * Specifies if rows(that have child rows) will have an expander image that will allow end users to expand and collapse them. This option can be set only at initialization. + * + */ + showExpansionIndicator?: boolean; + + /** + * Specifies the expansion indicator tooltip text. + * + */ + expandTooltipText?: string; + + /** + * Specifies the collapse indicator tooltip text. + * + */ + collapseTooltipText?: string; + + /** + * Unique identifier used in a self-referencing flat data source. Used with primaryKey to create a relationship among flat data sources. + * + */ + foreignKey?: string; + + /** + * Specifies the depth down to which the tree grid would be expanded upon initial render. To expand all rows set value to -1. Default is -1. + * + */ + initialExpandDepth?: number; + + /** + * Specifies the foreign key value in the data source to treat as the root level once the grid is data bound. Defaults to -1 (which includes the entire data source) + * + */ + foreignKeyRootValue?: number; + + /** + * Specify whether to render non-data column which contains expander indicators + * + */ + renderExpansionIndicatorColumn?: boolean; + + /** + * a reference or name of a javascript function which changes first data cell - renders indentation according to databound level + * + */ + renderFirstDataCellFunction?: string|Object; + + /** + * Property name of the array of child data in a hierarchical data source. + * + */ + childDataKey?: string; + + /** + * a reference or name of a javascript function which renders expand indicators(called ONLY IF option renderExpansionIndicatorColumn is true) + * + */ + renderExpansionCellFunction?: string|Object; + + /** + * Specifies to the tree grid if data is loaded on demand from a remote server. Default is false. + * + */ + enableRemoteLoadOnDemand?: boolean; + + /** + * Options object to configure data source-specific settings + * + */ + dataSourceSettings?: IgTreeGridDataSourceSettings; + + /** + * Fired when a row is about to be expanded. + * use args.owner to access the instance of the igTreeGrid + * use args.row to access the row element (as a wrapped jQuery object) that is about to be expanded + * use args.fixedRow to access the row element (as a jQuery wrapped object) in a fixed column that is about to expanded. If there are no fixed columns then this property returns undefined. + * use args.dataLevel to access the level in the hierarchy associated with the row + */ + rowExpanding?: RowExpandingEvent; + + /** + * Fired when a row is expanded. + * use args.owner to access the instance of the igTreeGrid + * use args.row to access the row element (as a wrapped jQuery object) that is about to be expanded + * use args.fixedRow to access the row element (as a jQuery wrapped object) in a fixed column that is about to expanded. If there are no fixed columns then this property returns undefined. + * use args.dataLevel to access the level in the hierarchy associated with the row + * use args.dataRecord to access the source data record + */ + rowExpanded?: RowExpandedEvent; + + /** + * Fired when a row is about to be collapsed. + * use args.owner to access the instance of the igTreeGrid + * use args.row to access the row element (as a wrapped jQuery object) that is about to be expanded + * use args.fixedRow to access the row element (as a jQuery wrapped object) in a fixed column that is about to expanded. If there are no fixed columns then this property returns undefined. + * use args.dataLevel to access the level in the hierarchy associated with the row + */ + rowCollapsing?: RowCollapsingEvent; + + /** + * Fired after a row is collapsed + * use args.owner to access the instance of the igTreeGrid + * use args.row to access the row element (as a wrapped jQuery object) that is about to be expanded + * use args.fixedRow to access the row element (as a jQuery wrapped object) in a fixed column that is about to expanded. If there are no fixed columns then this property returns undefined. + * use args.dataLevel to access the level in the hierarchy associated with the row + * use args.dataRecord to access the source data record + */ + rowCollapsed?: RowCollapsedEvent; + + /** + * Option for igTreeGrid + */ + [optionName: string]: any; +} +interface IgTreeGridMethods { + /** + * Clears the transaction log (delegates to igDataSource). Note that this does not update the UI. In case the UI must be updated, set the second parameter "updateUI" to true, which will trigger a call to dataBind() to re-render the contents. + * + * @param rowId If specified, will only rollback the transactions with that row id. + * @param updateUI Whether to update the UI or not. + */ + rollback(rowId?: Object, updateUI?: boolean): any[]; + + /** + * Causes the treegrid to data bind to the data source (local or remote) , and re-render all of the data + */ + dataBind(): void; + + /** + * Toggle row by specified row or row identifier + * + * @param row jQuery table row object or a row id. + * @param callback Specifies a custom function to be called when row is expanded/collapsed. The callback has 4 arguments- a reference to the current context(this), object that holds 2 properties(unfixedRow - DOM representation of the unfixed row, fixedRow - DOM representation of the fixed row, if there is no fixed columns it is undefined), reference to the dataRecord, expand - specifies whether row is expanded + */ + toggleRow(row: Object, callback?: Function): void; + + /** + * Expands a parent row by specified row or row identifier + * + * @param row jQuery table row object or a row id. + * @param callback Specifies a custom function to be called when row is expanded/collapsed. The callback has 4 arguments- a reference to the current context(this), object that holds 2 properties(unfixedRow - DOM representation of the unfixed row, fixedRow - DOM representation of the fixed row, if there is no fixed columns it is undefined), reference to the dataRecord, expand - specifies whether row is expanded + */ + expandRow(row: Object, callback?: Function): void; + + /** + * Collapses a parent row by specified row or row identifier + * + * @param row jQuery table row object, raw DOM row object or a row id. + * @param callback Specifies a custom function to be called when row is expanded/collapsed. The callback has 4 arguments- a reference to the current context(this), object that holds 2 properties(unfixedRow - DOM representation of the unfixed row, fixedRow - DOM representation of the fixed row, if there is no fixed columns it is undefined), reference to the dataRecord, expand - specifies whether row is expanded + */ + collapseRow(row: Object, callback?: Function): void; + + /** + * Adds a new row (TR) to the grid as a child of a specific row, by taking a data row object. Assumes the record will have the primary key. + * + * @param rec The data row JavaScript object. + * @param parentId Identifier/key of the targeted parent row. If missing, then the new row is rendered to the bottom of the grid. + */ + renderNewChild(rec: Object, parentId?: string): void; + + /** + * Destroys igTreeGrid + */ + destroy(): Object; +} +interface JQuery { + data(propertyName: "igTreeGrid"): IgTreeGridMethods; +} + +interface JQuery { + igTreeGrid(methodName: "rollback", rowId?: Object, updateUI?: boolean): any[]; + igTreeGrid(methodName: "dataBind"): void; + igTreeGrid(methodName: "toggleRow", row: Object, callback?: Function): void; + igTreeGrid(methodName: "expandRow", row: Object, callback?: Function): void; + igTreeGrid(methodName: "collapseRow", row: Object, callback?: Function): void; + igTreeGrid(methodName: "renderNewChild", rec: Object, parentId?: string): void; + igTreeGrid(methodName: "destroy"): Object; + + /** + * Gets the indentation (in pixels or percent) for a tree grid row. Nested indentation is achieved by calculating the level times the indentation value. Ex: '10px' or '5%'. Default is 30. + * + */ + igTreeGrid(optionLiteral: 'option', optionName: "indentation"): string; + + /** + * Sets the indentation (in pixels or percent) for a tree grid row. Nested indentation is achieved by calculating the level times the indentation value. Ex: '10px' or '5%'. Default is 30. + * + * + * @optionValue New value to be set. + */ + igTreeGrid(optionLiteral: 'option', optionName: "indentation", optionValue: string): void; + + /** + * If initial indentation level is set then it is used to be calculated width of the data skip column(usually used when remote load on demand is enabled) + * + */ + igTreeGrid(optionLiteral: 'option', optionName: "initialIndentationLevel"): number; + + /** + * If initial indentation level is set then it is used to be calculated width of the data skip column(usually used when remote load on demand is enabled) + * + * + * @optionValue New value to be set. + */ + igTreeGrid(optionLiteral: 'option', optionName: "initialIndentationLevel", optionValue: number): void; + + /** + * Gets if rows(that have child rows) will have an expander image that will allow end users to expand and collapse them. This option can be set only at initialization. + * + */ + igTreeGrid(optionLiteral: 'option', optionName: "showExpansionIndicator"): boolean; + + /** + * Sets if rows(that have child rows) will have an expander image that will allow end users to expand and collapse them. This option can be set only at initialization. + * + * + * @optionValue New value to be set. + */ + igTreeGrid(optionLiteral: 'option', optionName: "showExpansionIndicator", optionValue: boolean): void; + + /** + * Gets the expansion indicator tooltip text. + * + */ + igTreeGrid(optionLiteral: 'option', optionName: "expandTooltipText"): string; + + /** + * Sets the expansion indicator tooltip text. + * + * + * @optionValue New value to be set. + */ + igTreeGrid(optionLiteral: 'option', optionName: "expandTooltipText", optionValue: string): void; + + /** + * Gets the collapse indicator tooltip text. + * + */ + igTreeGrid(optionLiteral: 'option', optionName: "collapseTooltipText"): string; + + /** + * Sets the collapse indicator tooltip text. + * + * + * @optionValue New value to be set. + */ + igTreeGrid(optionLiteral: 'option', optionName: "collapseTooltipText", optionValue: string): void; + + /** + * Unique identifier used in a self-referencing flat data source. Used with primaryKey to create a relationship among flat data sources. + * + */ + igTreeGrid(optionLiteral: 'option', optionName: "foreignKey"): string; + + /** + * Unique identifier used in a self-referencing flat data source. Used with primaryKey to create a relationship among flat data sources. + * + * + * @optionValue New value to be set. + */ + igTreeGrid(optionLiteral: 'option', optionName: "foreignKey", optionValue: string): void; + + /** + * Gets the depth down to which the tree grid would be expanded upon initial render. To expand all rows set value to -1. Default is -1. + * + */ + igTreeGrid(optionLiteral: 'option', optionName: "initialExpandDepth"): number; + + /** + * Sets the depth down to which the tree grid would be expanded upon initial render. To expand all rows set value to -1. Default is -1. + * + * + * @optionValue New value to be set. + */ + igTreeGrid(optionLiteral: 'option', optionName: "initialExpandDepth", optionValue: number): void; + + /** + * Gets the foreign key value in the data source to treat as the root level once the grid is data bound. Defaults to -1 (which includes the entire data source) + * + */ + igTreeGrid(optionLiteral: 'option', optionName: "foreignKeyRootValue"): number; + + /** + * Sets the foreign key value in the data source to treat as the root level once the grid is data bound. Defaults to -1 (which includes the entire data source) + * + * + * @optionValue New value to be set. + */ + igTreeGrid(optionLiteral: 'option', optionName: "foreignKeyRootValue", optionValue: number): void; + + /** + * Specify whether to render non-data column which contains expander indicators + * + */ + igTreeGrid(optionLiteral: 'option', optionName: "renderExpansionIndicatorColumn"): boolean; + + /** + * Specify whether to render non-data column which contains expander indicators + * + * + * @optionValue New value to be set. + */ + igTreeGrid(optionLiteral: 'option', optionName: "renderExpansionIndicatorColumn", optionValue: boolean): void; + + /** + * A reference or name of a javascript function which changes first data cell - renders indentation according to databound level + * + */ + igTreeGrid(optionLiteral: 'option', optionName: "renderFirstDataCellFunction"): string|Object; + + /** + * A reference or name of a javascript function which changes first data cell - renders indentation according to databound level + * + * + * @optionValue New value to be set. + */ + igTreeGrid(optionLiteral: 'option', optionName: "renderFirstDataCellFunction", optionValue: string|Object): void; + + /** + * Property name of the array of child data in a hierarchical data source. + * + */ + igTreeGrid(optionLiteral: 'option', optionName: "childDataKey"): string; + + /** + * Property name of the array of child data in a hierarchical data source. + * + * + * @optionValue New value to be set. + */ + igTreeGrid(optionLiteral: 'option', optionName: "childDataKey", optionValue: string): void; + + /** + * A reference or name of a javascript function which renders expand indicators(called ONLY IF option renderExpansionIndicatorColumn is true) + * + */ + igTreeGrid(optionLiteral: 'option', optionName: "renderExpansionCellFunction"): string|Object; + + /** + * A reference or name of a javascript function which renders expand indicators(called ONLY IF option renderExpansionIndicatorColumn is true) + * + * + * @optionValue New value to be set. + */ + igTreeGrid(optionLiteral: 'option', optionName: "renderExpansionCellFunction", optionValue: string|Object): void; + + /** + * Gets to the tree grid if data is loaded on demand from a remote server. Default is false. + * + */ + igTreeGrid(optionLiteral: 'option', optionName: "enableRemoteLoadOnDemand"): boolean; + + /** + * Sets to the tree grid if data is loaded on demand from a remote server. Default is false. + * + * + * @optionValue New value to be set. + */ + igTreeGrid(optionLiteral: 'option', optionName: "enableRemoteLoadOnDemand", optionValue: boolean): void; + + /** + * Options object to configure data source-specific settings + * + */ + igTreeGrid(optionLiteral: 'option', optionName: "dataSourceSettings"): IgTreeGridDataSourceSettings; + + /** + * Options object to configure data source-specific settings + * + * + * @optionValue New value to be set. + */ + igTreeGrid(optionLiteral: 'option', optionName: "dataSourceSettings", optionValue: IgTreeGridDataSourceSettings): void; + + /** + * Fired when a row is about to be expanded. + * use args.owner to access the instance of the igTreeGrid + * use args.row to access the row element (as a wrapped jQuery object) that is about to be expanded + * use args.fixedRow to access the row element (as a jQuery wrapped object) in a fixed column that is about to expanded. If there are no fixed columns then this property returns undefined. + * use args.dataLevel to access the level in the hierarchy associated with the row + */ + igTreeGrid(optionLiteral: 'option', optionName: "rowExpanding"): RowExpandingEvent; + + /** + * Fired when a row is about to be expanded. + * use args.owner to access the instance of the igTreeGrid + * use args.row to access the row element (as a wrapped jQuery object) that is about to be expanded + * use args.fixedRow to access the row element (as a jQuery wrapped object) in a fixed column that is about to expanded. If there are no fixed columns then this property returns undefined. + * use args.dataLevel to access the level in the hierarchy associated with the row + * + * @optionValue New value to be set. + */ + igTreeGrid(optionLiteral: 'option', optionName: "rowExpanding", optionValue: RowExpandingEvent): void; + + /** + * Fired when a row is expanded. + * use args.owner to access the instance of the igTreeGrid + * use args.row to access the row element (as a wrapped jQuery object) that is about to be expanded + * use args.fixedRow to access the row element (as a jQuery wrapped object) in a fixed column that is about to expanded. If there are no fixed columns then this property returns undefined. + * use args.dataLevel to access the level in the hierarchy associated with the row + * use args.dataRecord to access the source data record + */ + igTreeGrid(optionLiteral: 'option', optionName: "rowExpanded"): RowExpandedEvent; + + /** + * Fired when a row is expanded. + * use args.owner to access the instance of the igTreeGrid + * use args.row to access the row element (as a wrapped jQuery object) that is about to be expanded + * use args.fixedRow to access the row element (as a jQuery wrapped object) in a fixed column that is about to expanded. If there are no fixed columns then this property returns undefined. + * use args.dataLevel to access the level in the hierarchy associated with the row + * use args.dataRecord to access the source data record + * + * @optionValue New value to be set. + */ + igTreeGrid(optionLiteral: 'option', optionName: "rowExpanded", optionValue: RowExpandedEvent): void; + + /** + * Fired when a row is about to be collapsed. + * use args.owner to access the instance of the igTreeGrid + * use args.row to access the row element (as a wrapped jQuery object) that is about to be expanded + * use args.fixedRow to access the row element (as a jQuery wrapped object) in a fixed column that is about to expanded. If there are no fixed columns then this property returns undefined. + * use args.dataLevel to access the level in the hierarchy associated with the row + */ + igTreeGrid(optionLiteral: 'option', optionName: "rowCollapsing"): RowCollapsingEvent; + + /** + * Fired when a row is about to be collapsed. + * use args.owner to access the instance of the igTreeGrid + * use args.row to access the row element (as a wrapped jQuery object) that is about to be expanded + * use args.fixedRow to access the row element (as a jQuery wrapped object) in a fixed column that is about to expanded. If there are no fixed columns then this property returns undefined. + * use args.dataLevel to access the level in the hierarchy associated with the row + * + * @optionValue New value to be set. + */ + igTreeGrid(optionLiteral: 'option', optionName: "rowCollapsing", optionValue: RowCollapsingEvent): void; + + /** + * Fired after a row is collapsed + * use args.owner to access the instance of the igTreeGrid + * use args.row to access the row element (as a wrapped jQuery object) that is about to be expanded + * use args.fixedRow to access the row element (as a jQuery wrapped object) in a fixed column that is about to expanded. If there are no fixed columns then this property returns undefined. + * use args.dataLevel to access the level in the hierarchy associated with the row + * use args.dataRecord to access the source data record + */ + igTreeGrid(optionLiteral: 'option', optionName: "rowCollapsed"): RowCollapsedEvent; + + /** + * Fired after a row is collapsed + * use args.owner to access the instance of the igTreeGrid + * use args.row to access the row element (as a wrapped jQuery object) that is about to be expanded + * use args.fixedRow to access the row element (as a jQuery wrapped object) in a fixed column that is about to expanded. If there are no fixed columns then this property returns undefined. + * use args.dataLevel to access the level in the hierarchy associated with the row + * use args.dataRecord to access the source data record + * + * @optionValue New value to be set. + */ + igTreeGrid(optionLiteral: 'option', optionName: "rowCollapsed", optionValue: RowCollapsedEvent): void; + igTreeGrid(options: IgTreeGrid): JQuery; + igTreeGrid(optionLiteral: 'option', optionName: string): any; + igTreeGrid(optionLiteral: 'option', options: IgTreeGrid): JQuery; + igTreeGrid(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igTreeGrid(methodName: string, ...methodParams: any[]): any; +} +interface IgTreeGridMultiColumnHeaders { + /** + * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. + */ + inherit?: boolean; + + /** + * Event fired before a group collapsing operation is executed. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridMultiColumnHeaders widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.column to get the column object for the current group that is collapsing. + * Use ui.element to get a reference to the jQuery object for the column being collapsing (th). + */ + groupCollapsing?: GroupCollapsingEvent; + + /** + * Event fired after the group collapsing has been executed and results are rendered. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridMultiColumnHeaders widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.column to get the column object for the current group that is collapsed. + * Use ui.element to get a reference to the jQuery object for the column being collapsed (th). + */ + groupCollapsed?: GroupCollapsedEvent; + + /** + * Event fired before a group expanding operation is executed. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridMultiColumnHeaders widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.column to get the column object for the current group that is expanding. + * Use ui.element to get a reference to the jQuery object for the column being expanded (th). + */ + groupExpanding?: GroupExpandingEvent; + + /** + * Event fired after the group expanding has been executed and results are rendered. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridMultiColumnHeaders widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.column to get the column object for the current group that is expanded. + * Use ui.element to get a reference to the jQuery object for the column being expanded (th). + */ + groupExpanded?: GroupExpandedEvent; + + /** + * Option for igTreeGridMultiColumnHeaders + */ + [optionName: string]: any; +} +interface IgTreeGridMultiColumnHeadersMethods { + destroy(): void; + + /** + * Expands a collapsed group. If the group is expanded, the method does nothing. + * Note: This method is asynchronous which means that it returns immediately and any subsequent code will execute in parallel. This may lead to runtime errors. To avoid them put the subsequent code in the callback parameter provided by the method. + * + * @param groupKey Group key. + * @param callback Specifies a custom function to be called when the group is expanded. + */ + expandGroup(groupKey: string, callback?: Function): void; + + /** + * Collapses an expanded group. If the group is collapsed, the method does nothing. + * Note: This method is asynchronous which means that it returns immediately and any subsequent code will execute in parallel. This may lead to runtime errors. To avoid them put the subsequent code in the callback parameter provided by the method. + * + * @param groupKey Group key. + * @param callback Specifies a custom function to be called when the group is collapsed. + */ + collapseGroup(groupKey: string, callback?: Function): void; + + /** + * Toggles a collapsible group. + * Note: This method is asynchronous which means that it returns immediately and any subsequent code will execute in parallel. This may lead to runtime errors. To avoid them put the subsequent code in the callback parameter provided by the method. + * + * @param groupKey Group key. + * @param callback Specifies a custom function to be called when the group is toggled. + */ + toggleGroup(groupKey: string, callback?: Function): void; + + /** + * Returns multicolumn headers array. if there aren"t multicolumn headers returns undefined + */ + getMultiColumnHeaders(): any[]; +} +interface JQuery { + data(propertyName: "igTreeGridMultiColumnHeaders"): IgTreeGridMultiColumnHeadersMethods; +} + +interface JQuery { + igTreeGridMultiColumnHeaders(methodName: "destroy"): void; + igTreeGridMultiColumnHeaders(methodName: "expandGroup", groupKey: string, callback?: Function): void; + igTreeGridMultiColumnHeaders(methodName: "collapseGroup", groupKey: string, callback?: Function): void; + igTreeGridMultiColumnHeaders(methodName: "toggleGroup", groupKey: string, callback?: Function): void; + igTreeGridMultiColumnHeaders(methodName: "getMultiColumnHeaders"): any[]; + + /** + * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. + */ + igTreeGridMultiColumnHeaders(optionLiteral: 'option', optionName: "inherit"): boolean; + + /** + * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. + * + * @optionValue New value to be set. + */ + igTreeGridMultiColumnHeaders(optionLiteral: 'option', optionName: "inherit", optionValue: boolean): void; + + /** + * Event fired before a group collapsing operation is executed. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridMultiColumnHeaders widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.column to get the column object for the current group that is collapsing. + * Use ui.element to get a reference to the jQuery object for the column being collapsing (th). + */ + igTreeGridMultiColumnHeaders(optionLiteral: 'option', optionName: "groupCollapsing"): GroupCollapsingEvent; + + /** + * Event fired before a group collapsing operation is executed. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridMultiColumnHeaders widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.column to get the column object for the current group that is collapsing. + * Use ui.element to get a reference to the jQuery object for the column being collapsing (th). + * + * @optionValue Define event handler function. + */ + igTreeGridMultiColumnHeaders(optionLiteral: 'option', optionName: "groupCollapsing", optionValue: GroupCollapsingEvent): void; + + /** + * Event fired after the group collapsing has been executed and results are rendered. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridMultiColumnHeaders widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.column to get the column object for the current group that is collapsed. + * Use ui.element to get a reference to the jQuery object for the column being collapsed (th). + */ + igTreeGridMultiColumnHeaders(optionLiteral: 'option', optionName: "groupCollapsed"): GroupCollapsedEvent; + + /** + * Event fired after the group collapsing has been executed and results are rendered. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridMultiColumnHeaders widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.column to get the column object for the current group that is collapsed. + * Use ui.element to get a reference to the jQuery object for the column being collapsed (th). + * + * @optionValue Define event handler function. + */ + igTreeGridMultiColumnHeaders(optionLiteral: 'option', optionName: "groupCollapsed", optionValue: GroupCollapsedEvent): void; + + /** + * Event fired before a group expanding operation is executed. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridMultiColumnHeaders widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.column to get the column object for the current group that is expanding. + * Use ui.element to get a reference to the jQuery object for the column being expanded (th). + */ + igTreeGridMultiColumnHeaders(optionLiteral: 'option', optionName: "groupExpanding"): GroupExpandingEvent; + + /** + * Event fired before a group expanding operation is executed. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridMultiColumnHeaders widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.column to get the column object for the current group that is expanding. + * Use ui.element to get a reference to the jQuery object for the column being expanded (th). + * + * @optionValue Define event handler function. + */ + igTreeGridMultiColumnHeaders(optionLiteral: 'option', optionName: "groupExpanding", optionValue: GroupExpandingEvent): void; + + /** + * Event fired after the group expanding has been executed and results are rendered. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridMultiColumnHeaders widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.column to get the column object for the current group that is expanded. + * Use ui.element to get a reference to the jQuery object for the column being expanded (th). + */ + igTreeGridMultiColumnHeaders(optionLiteral: 'option', optionName: "groupExpanded"): GroupExpandedEvent; + + /** + * Event fired after the group expanding has been executed and results are rendered. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridMultiColumnHeaders widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.column to get the column object for the current group that is expanded. + * Use ui.element to get a reference to the jQuery object for the column being expanded (th). + * + * @optionValue Define event handler function. + */ + igTreeGridMultiColumnHeaders(optionLiteral: 'option', optionName: "groupExpanded", optionValue: GroupExpandedEvent): void; + igTreeGridMultiColumnHeaders(options: IgTreeGridMultiColumnHeaders): JQuery; + igTreeGridMultiColumnHeaders(optionLiteral: 'option', optionName: string): any; + igTreeGridMultiColumnHeaders(optionLiteral: 'option', options: IgTreeGridMultiColumnHeaders): JQuery; + igTreeGridMultiColumnHeaders(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igTreeGridMultiColumnHeaders(methodName: string, ...methodParams: any[]): any; +} +interface ContextRowRenderingEvent { + (event: Event, ui: ContextRowRenderingEventUIParam): void; +} + +interface ContextRowRenderingEventUIParam { + /** + * Used to get reference to igTreeGridPaging. + */ + owner?: any; + + /** + * Used to get reference to the first data row. Null if there are no records. + */ + dataRow?: any; + + /** + * Used to get current page index. + */ + currentPageIndex?: any; + + /** + * Used to get the current context row mode. + */ + contextRowMode?: any; +} + +interface ContextRowRenderedEvent { + (event: Event, ui: ContextRowRenderedEventUIParam): void; +} + +interface ContextRowRenderedEventUIParam { + /** + * Used to get reference to igTreeGridPaging. + */ + owner?: any; + + /** + * Used to get reference to the first data row. Null if there are no records. + */ + dataRow?: any; + + /** + * Used to get current page index. + */ + currentPageIndex?: any; + + /** + * Used to get array of the parent rows(of the ui.dataRow). If the dataRow is null(for instance filter is applied and no records are shown) then it is empty array. Otherwise it contains all ancestors ordered by level(including the current dataRow) - the first item is root level, the last array item is the current ui.dataRow + */ + parentRows?: any; + + /** + * Used to get the current context row mode. + */ + contextRowMode?: any; +} + +interface IgTreeGridPaging { + /** + * Sets gets paging mode. + * + * + * Valid values: + * "rootLevelOnly" Only pages records at the root of the tree grid are displayed. + * "allLevels" includes all visible records in paging. + */ + mode?: string; + + /** + * When data flows to the next page there are a couple of different modes that can help communicate the context of a leaf level row. When mode option is "rootLevelOnly" then the context row always shows the value of the contextRowRootText option. + * + * + * Valid values: + * "none" Does not render the contextual row + * "parent" Renders a read-only representation of the immediate parent row + * "breadcrumb" Renders a read-only breadcrumb trail representing the full path through all ancestors + */ + contextRowMode?: string; + + /** + * Sets/gets the text message shown while loading content of the context row(while processing breadcrumb/immediate parent row). It is set via $.html(). If set to null loading message is not shown. + * + */ + contextRowLoadingText?: string; + + /** + * Sets/gets the content of the context row when the first record in the page is root(hasn't ancestors) record. It is set via $.html() + * + */ + contextRowRootText?: string; + + /** + * Sets/gets the column key of ancestor to be shown in the breadcrumb trail. It is used only when contextRowMode is breadcrumb + * + */ + breadcrumbKey?: string; + + /** + * Sets/gets (it is set via $.html()) delimiter between ancestors in the breadcrumb trail. It is used only when contextRowMode is breadcrumb + * + */ + breadcrumbDelimiter?: string; + + /** + * Reference to the (or name of )function, called before rendering context row content(rendering loading message/bread crumb/parent row). The function takes 4 arguments- dataRow, $textArea- jQuery representation of the text area of the context row(when mode is loading/breadcrumb then it is otherwise ), array of parent rows and context mode - "loading"|"breadcrumb"|"parent". When the function returns string it is used as html set in $textArea. If the function does not return result or returns false/empty string then rendering of the content of the context row should be handled by the developer(similar to canceling rendering of context row content). + * + */ + renderContextRowFunc?: Function|string; + + /** + * Number of records loaded and displayed per page. + * + */ + pageSize?: number; + + /** + * The property in the response data, when using remote data source, that will hold the total number of records in the data source. + * + */ + recordCountKey?: string; + + /** + * Denotes the name of the encoded URL parameter that will state what is the currently requested page size. + * + */ + pageSizeUrlKey?: string; + + /** + * Denotes the name of the encoded URL parameter that will state what is the currently requested page index. + * + */ + pageIndexUrlKey?: string; + + /** + * Current page index that's bound in the data source and rendered in the UI. + * + */ + currentPageIndex?: number; + + /** + * Type of paging. Delegates all paging functionality to the [$.ig.DataSource](ig.datasource). + * + * + * Valid values: + * "remote" Paging is performed by a remote end-point. + * "local" Paging is performed locally by the [$.ig.DataSource](ig.datasource). + */ + type?: string; + + /** + * If false, a dropdown allowing to change the page size will not be rendered in the UI. + * + */ + showPageSizeDropDown?: boolean; + + /** + * Text rendered in front of the page size dropdown, when [showPageSizeDropDown](ui.iggridpaging#options:showPageSizeDropDown) is set to true. + * + */ + pageSizeDropDownLabel?: string; + + /** + * Trailing text for the page size dropdown, when [showPageSizeDropDown](ui.iggridpaging#options:showPageSizeDropDown) is set to true. + * + */ + pageSizeDropDownTrailingLabel?: string; + + /** + * Page size dropdown location, when [showPageSizeDropDown](ui.iggridpaging#options:showPageSizeDropDown) is set to true. Can be rendered above the grid header or inside the pager, next to the page links. + * + * + * Valid values: + * "above" The page size drop down will be rendered above the grid header. + * "inpager" The page size drop down will be rendered next to page links. + */ + pageSizeDropDownLocation?: string; + + /** + * Option specifying whether to show summary label for the currently rendered records or not. + * + */ + showPagerRecordsLabel?: boolean; + + /** + * Custom pager records label template - in [igTemplating](http://www.igniteui.com/help/igtemplating-overview) style and syntax. + * + */ + pagerRecordsLabelTemplate?: string; + + /** + * Text for the next page label. + * + */ + nextPageLabelText?: string; + + /** + * Text for the previous page label. + * + */ + prevPageLabelText?: string; + + /** + * Text for the first page label. + * + */ + firstPageLabelText?: string; + + /** + * Text for the last page label. + * + */ + lastPageLabelText?: string; + + /** + * Option specifying whether to render the first and last page navigation buttons. + * + */ + showFirstLastPages?: boolean; + + /** + * Option specifying whether to render the previous and next page navigation buttons. + * + */ + showPrevNextPages?: boolean; + + /** + * Leading label text for the drop down from where the page index can be switched. + * + */ + currentPageDropDownLeadingLabel?: string; + + /** + * Trailing label text for the drop down from where the page index can be switched. + * + */ + currentPageDropDownTrailingLabel?: string; + + /** + * Tooltip text for the page index drop down. + * + */ + currentPageDropDownTooltip?: string; + + /** + * Tooltip text for the page size drop down. + * + */ + pageSizeDropDownTooltip?: string; + + /** + * Tooltip text for the pager records label. + * + */ + pagerRecordsLabelTooltip?: string; + + /** + * Tooltip text for the previous page button. + * + */ + prevPageTooltip?: string; + + /** + * Tooltip text for the next page button. + * + */ + nextPageTooltip?: string; + + /** + * Tooltip text for the first page button. + * + */ + firstPageTooltip?: string; + + /** + * Tooltip text for the last page button. + * + */ + lastPageTooltip?: string; + + /** + * Tooltip text templates of buttons that navigate to a particular page. The format string follows the [igTemplating](http://www.igniteui.com/help/igtemplating-overview) style and syntax. See also the [pageCountLimit](ui.iggridpaging#options:pageCountLimit) option. + * + */ + pageTooltipFormat?: string; + + /** + * Predefined page sizes that are available to the end user to switch their grid paging to, through a drop down in the grid header. + * + */ + pageSizeList?: any; + + /** + * Sets/Gets the number of pages which if exceeded a drop down list of page indices is displayed. If the number of pages is less than or equal to this option then buttons for each page are displayed. + * + */ + pageCountLimit?: number; + + /** + * Number of page buttons, adjacent to and including the [active page](ui.iggridpaging#options:currentPageIndex), that are constantly visible. For the invisible pages, previous and next buttons are used. + * + */ + visiblePageCount?: number; + + /** + * Drop down width for the page size and page index drop downs. + * + */ + defaultDropDownWidth?: number; + + /** + * Time in milliseconds for which page drop down will wait for keystrokes before changing the page. + * + */ + delayOnPageChanged?: number; + + /** + * Enables/disables paging persistence between states. + * + */ + persist?: boolean; + + /** + * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. + * + */ + inherit?: boolean; + + /** + * Event fired before rendering context row content. + * Return false in order to cancel this event. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to igTreeGridPaging. + * Use ui.dataRow to get reference to the first data row. Null if there are no records. + * Use ui.currentPageIndex to get current page index. + * Use ui.contextRowMode to get the current context row mode. + */ + contextRowRendering?: ContextRowRenderingEvent; + + /** + * Event fired context row content is rendered. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to igTreeGridPaging. + * Use ui.dataRow to get reference to the first data row. Null if there are no records. + * Use ui.currentPageIndex to get current page index. + * Use ui.parentRows to get array of the parent rows(of the ui.dataRow). If the dataRow is null(for instance filter is applied and no records are shown) then it is empty array. Otherwise it contains all ancestors ordered by level(including the current dataRow) - the first item is root level, the last array item is the current ui.dataRow + * Use ui.contextRowMode to get the current context row mode. + */ + contextRowRendered?: ContextRowRenderedEvent; + + /** + * Event fired before the page index is changed. + * Return false in order to cancel page index changing. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridPaging. + * Use ui.owner.grid to get reference to the grid. + * Use ui.currentPageIndex to get current page index. + * Use ui.newPageIndex to get new page index. + */ + pageIndexChanging?: PageIndexChangingEvent; + + /** + * Event fired after the page index is changed , but before grid data rebinds + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridPaging. + * Use ui.owner.grid to get reference to the grid. + * Use ui.pageIndex to get current page index. + */ + pageIndexChanged?: PageIndexChangedEvent; + + /** + * Event fired when the page size is about to be changed from the page size dropdown. + * Return false in order to cancel page size changing. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridPaging. + * Use ui.owner.grid to get reference to the grid. + * Use ui.currentPageSize to get current page size. + * Use ui.newPageSize to get new page size. + */ + pageSizeChanging?: PageSizeChangingEvent; + + /** + * Event fired after the page size is changed from the page size dropdown. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridPaging. + * Use ui.owner.grid to get reference to the grid. + * Use ui.pageSize to get current page size. + */ + pageSizeChanged?: PageSizeChangedEvent; + + /** + * Event fired before the pager footer is rendered (the whole area below the grid records). + * Return false in order to cancel pager footer rendering. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridPaging. + * Use ui.owner.grid to get reference to the grid. + * Use ui.dataSource to get reference to grid's data source. + */ + pagerRendering?: PagerRenderingEvent; + + /** + * Event fired after the pager footer is rendered + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridPaging. + * Use ui.owner.grid to get reference to the grid. + * Use ui.dataSource to get reference to grid's data source. + */ + pagerRendered?: PagerRenderedEvent; + + /** + * Option for igTreeGridPaging + */ + [optionName: string]: any; +} +interface IgTreeGridPagingMethods { + /** + * Destroys the igTreeGridPaging feature by removing all elements in the pager area, unbinding events, and resetting data to discard data filtering on paging + */ + destroy(): void; + + /** + * Get jQuery representation of of the context row. It is rendered in the header. If there isn't such element - creates it. + */ + getContextRow(): Object; + + /** + * Get jQuery representation of element that holds text area of the context row. If there isn't such element - creates it. + */ + getContextRowTextArea(): Object; + + /** + * Gets/Sets the current page index, delegates data binding and paging to [$.ig.DataSource](ig.datasource). + * + * @param index The page index to go to. + */ + pageIndex(index?: number): number; + + /** + * Gets/Sets the page size. If no parameter is specified, just returns the current page size. + * + * @param size The new page size. + */ + pageSize(size?: number): number; +} +interface JQuery { + data(propertyName: "igTreeGridPaging"): IgTreeGridPagingMethods; +} + +interface JQuery { + igTreeGridPaging(methodName: "destroy"): void; + igTreeGridPaging(methodName: "getContextRow"): Object; + igTreeGridPaging(methodName: "getContextRowTextArea"): Object; + igTreeGridPaging(methodName: "pageIndex", index?: number): number; + igTreeGridPaging(methodName: "pageSize", size?: number): number; + + /** + * Sets gets paging mode. + * + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "mode"): string; + + /** + * Sets gets paging mode. + * + * + * @optionValue New value to be set. + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "mode", optionValue: string): void; + + /** + * When data flows to the next page there are a couple of different modes that can help communicate the context of a leaf level row. When mode option is "rootLevelOnly" then the context row always shows the value of the contextRowRootText option. + * + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "contextRowMode"): string; + + /** + * When data flows to the next page there are a couple of different modes that can help communicate the context of a leaf level row. When mode option is "rootLevelOnly" then the context row always shows the value of the contextRowRootText option. + * + * + * @optionValue New value to be set. + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "contextRowMode", optionValue: string): void; + + /** + * Sets/gets the text message shown while loading content of the context row(while processing breadcrumb/immediate parent row). It is set via $.html(). If set to null loading message is not shown. + * + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "contextRowLoadingText"): string; + + /** + * Sets/gets the text message shown while loading content of the context row(while processing breadcrumb/immediate parent row). It is set via $.html(). If set to null loading message is not shown. + * + * + * @optionValue New value to be set. + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "contextRowLoadingText", optionValue: string): void; + + /** + * Sets/gets the content of the context row when the first record in the page is root(hasn't ancestors) record. It is set via $.html() + * + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "contextRowRootText"): string; + + /** + * Sets/gets the content of the context row when the first record in the page is root(hasn't ancestors) record. It is set via $.html() + * + * + * @optionValue New value to be set. + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "contextRowRootText", optionValue: string): void; + + /** + * Sets/gets the column key of ancestor to be shown in the breadcrumb trail. It is used only when contextRowMode is breadcrumb + * + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "breadcrumbKey"): string; + + /** + * Sets/gets the column key of ancestor to be shown in the breadcrumb trail. It is used only when contextRowMode is breadcrumb + * + * + * @optionValue New value to be set. + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "breadcrumbKey", optionValue: string): void; + + /** + * Sets/gets (it is set via $.html()) delimiter between ancestors in the breadcrumb trail. It is used only when contextRowMode is breadcrumb + * + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "breadcrumbDelimiter"): string; + + /** + * Sets/gets (it is set via $.html()) delimiter between ancestors in the breadcrumb trail. It is used only when contextRowMode is breadcrumb + * + * + * @optionValue New value to be set. + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "breadcrumbDelimiter", optionValue: string): void; + + /** + * Reference to the (or name of )function, called before rendering context row content(rendering loading message/bread crumb/parent row). The function takes 4 arguments- dataRow, $textArea- jQuery representation of the text area of the context row(when mode is loading/breadcrumb then it is otherwise ), array of parent rows and context mode - "loading"|"breadcrumb"|"parent". When the function returns string it is used as html set in $textArea. If the function does not return result or returns false/empty string then rendering of the content of the context row should be handled by the developer(similar to canceling rendering of context row content). + * + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "renderContextRowFunc"): Function|string; + + /** + * Reference to the (or name of )function, called before rendering context row content(rendering loading message/bread crumb/parent row). The function takes 4 arguments- dataRow, $textArea- jQuery representation of the text area of the context row(when mode is loading/breadcrumb then it is otherwise ), array of parent rows and context mode - "loading"|"breadcrumb"|"parent". When the function returns string it is used as html set in $textArea. If the function does not return result or returns false/empty string then rendering of the content of the context row should be handled by the developer(similar to canceling rendering of context row content). + * + * + * @optionValue New value to be set. + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "renderContextRowFunc", optionValue: Function|string): void; + + /** + * Number of records loaded and displayed per page. + * + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "pageSize"): number; + + /** + * Number of records loaded and displayed per page. + * + * + * @optionValue New value to be set. + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "pageSize", optionValue: number): void; + + /** + * The property in the response data, when using remote data source, that will hold the total number of records in the data source. + * + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "recordCountKey"): string; + + /** + * The property in the response data, when using remote data source, that will hold the total number of records in the data source. + * + * + * @optionValue New value to be set. + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "recordCountKey", optionValue: string): void; + + /** + * Denotes the name of the encoded URL parameter that will state what is the currently requested page size. + * + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "pageSizeUrlKey"): string; + + /** + * Denotes the name of the encoded URL parameter that will state what is the currently requested page size. + * + * + * @optionValue New value to be set. + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "pageSizeUrlKey", optionValue: string): void; + + /** + * Denotes the name of the encoded URL parameter that will state what is the currently requested page index. + * + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "pageIndexUrlKey"): string; + + /** + * Denotes the name of the encoded URL parameter that will state what is the currently requested page index. + * + * + * @optionValue New value to be set. + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "pageIndexUrlKey", optionValue: string): void; + + /** + * Current page index that's bound in the data source and rendered in the UI. + * + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "currentPageIndex"): number; + + /** + * Current page index that's bound in the data source and rendered in the UI. + * + * + * @optionValue New value to be set. + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "currentPageIndex", optionValue: number): void; + + /** + * Type of paging. Delegates all paging functionality to the [$.ig.DataSource](ig.datasource). + * + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "type"): string; + + /** + * Type of paging. Delegates all paging functionality to the [$.ig.DataSource](ig.datasource). + * + * + * @optionValue New value to be set. + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "type", optionValue: string): void; + + /** + * If false, a dropdown allowing to change the page size will not be rendered in the UI. + * + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "showPageSizeDropDown"): boolean; + + /** + * If false, a dropdown allowing to change the page size will not be rendered in the UI. + * + * + * @optionValue New value to be set. + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "showPageSizeDropDown", optionValue: boolean): void; + + /** + * Text rendered in front of the page size dropdown, when [showPageSizeDropDown](ui.iggridpaging#options:showPageSizeDropDown) is set to true. + * + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "pageSizeDropDownLabel"): string; + + /** + * Text rendered in front of the page size dropdown, when [showPageSizeDropDown](ui.iggridpaging#options:showPageSizeDropDown) is set to true. + * + * + * @optionValue New value to be set. + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "pageSizeDropDownLabel", optionValue: string): void; + + /** + * Trailing text for the page size dropdown, when [showPageSizeDropDown](ui.iggridpaging#options:showPageSizeDropDown) is set to true. + * + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "pageSizeDropDownTrailingLabel"): string; + + /** + * Trailing text for the page size dropdown, when [showPageSizeDropDown](ui.iggridpaging#options:showPageSizeDropDown) is set to true. + * + * + * @optionValue New value to be set. + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "pageSizeDropDownTrailingLabel", optionValue: string): void; + + /** + * Page size dropdown location, when [showPageSizeDropDown](ui.iggridpaging#options:showPageSizeDropDown) is set to true. Can be rendered above the grid header or inside the pager, next to the page links. + * + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "pageSizeDropDownLocation"): string; + + /** + * Page size dropdown location, when [showPageSizeDropDown](ui.iggridpaging#options:showPageSizeDropDown) is set to true. Can be rendered above the grid header or inside the pager, next to the page links. + * + * + * @optionValue New value to be set. + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "pageSizeDropDownLocation", optionValue: string): void; + + /** + * Option specifying whether to show summary label for the currently rendered records or not. + * + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "showPagerRecordsLabel"): boolean; + + /** + * Option specifying whether to show summary label for the currently rendered records or not. + * + * + * @optionValue New value to be set. + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "showPagerRecordsLabel", optionValue: boolean): void; + + /** + * Custom pager records label template - in [igTemplating](http://www.igniteui.com/help/igtemplating-overview) style and syntax. + * + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "pagerRecordsLabelTemplate"): string; + + /** + * Custom pager records label template - in [igTemplating](http://www.igniteui.com/help/igtemplating-overview) style and syntax. + * + * + * @optionValue New value to be set. + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "pagerRecordsLabelTemplate", optionValue: string): void; + + /** + * Text for the next page label. + * + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "nextPageLabelText"): string; + + /** + * Text for the next page label. + * + * + * @optionValue New value to be set. + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "nextPageLabelText", optionValue: string): void; + + /** + * Text for the previous page label. + * + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "prevPageLabelText"): string; + + /** + * Text for the previous page label. + * + * + * @optionValue New value to be set. + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "prevPageLabelText", optionValue: string): void; + + /** + * Text for the first page label. + * + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "firstPageLabelText"): string; + + /** + * Text for the first page label. + * + * + * @optionValue New value to be set. + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "firstPageLabelText", optionValue: string): void; + + /** + * Text for the last page label. + * + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "lastPageLabelText"): string; + + /** + * Text for the last page label. + * + * + * @optionValue New value to be set. + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "lastPageLabelText", optionValue: string): void; + + /** + * Option specifying whether to render the first and last page navigation buttons. + * + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "showFirstLastPages"): boolean; + + /** + * Option specifying whether to render the first and last page navigation buttons. + * + * + * @optionValue New value to be set. + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "showFirstLastPages", optionValue: boolean): void; + + /** + * Option specifying whether to render the previous and next page navigation buttons. + * + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "showPrevNextPages"): boolean; + + /** + * Option specifying whether to render the previous and next page navigation buttons. + * + * + * @optionValue New value to be set. + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "showPrevNextPages", optionValue: boolean): void; + + /** + * Leading label text for the drop down from where the page index can be switched. + * + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "currentPageDropDownLeadingLabel"): string; + + /** + * Leading label text for the drop down from where the page index can be switched. + * + * + * @optionValue New value to be set. + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "currentPageDropDownLeadingLabel", optionValue: string): void; + + /** + * Trailing label text for the drop down from where the page index can be switched. + * + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "currentPageDropDownTrailingLabel"): string; + + /** + * Trailing label text for the drop down from where the page index can be switched. + * + * + * @optionValue New value to be set. + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "currentPageDropDownTrailingLabel", optionValue: string): void; + + /** + * Tooltip text for the page index drop down. + * + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "currentPageDropDownTooltip"): string; + + /** + * Tooltip text for the page index drop down. + * + * + * @optionValue New value to be set. + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "currentPageDropDownTooltip", optionValue: string): void; + + /** + * Tooltip text for the page size drop down. + * + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "pageSizeDropDownTooltip"): string; + + /** + * Tooltip text for the page size drop down. + * + * + * @optionValue New value to be set. + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "pageSizeDropDownTooltip", optionValue: string): void; + + /** + * Tooltip text for the pager records label. + * + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "pagerRecordsLabelTooltip"): string; + + /** + * Tooltip text for the pager records label. + * + * + * @optionValue New value to be set. + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "pagerRecordsLabelTooltip", optionValue: string): void; + + /** + * Tooltip text for the previous page button. + * + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "prevPageTooltip"): string; + + /** + * Tooltip text for the previous page button. + * + * + * @optionValue New value to be set. + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "prevPageTooltip", optionValue: string): void; + + /** + * Tooltip text for the next page button. + * + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "nextPageTooltip"): string; + + /** + * Tooltip text for the next page button. + * + * + * @optionValue New value to be set. + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "nextPageTooltip", optionValue: string): void; + + /** + * Tooltip text for the first page button. + * + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "firstPageTooltip"): string; + + /** + * Tooltip text for the first page button. + * + * + * @optionValue New value to be set. + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "firstPageTooltip", optionValue: string): void; + + /** + * Tooltip text for the last page button. + * + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "lastPageTooltip"): string; + + /** + * Tooltip text for the last page button. + * + * + * @optionValue New value to be set. + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "lastPageTooltip", optionValue: string): void; + + /** + * Tooltip text templates of buttons that navigate to a particular page. The format string follows the [igTemplating](http://www.igniteui.com/help/igtemplating-overview) style and syntax. See also the [pageCountLimit](ui.iggridpaging#options:pageCountLimit) option. + * + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "pageTooltipFormat"): string; + + /** + * Tooltip text templates of buttons that navigate to a particular page. The format string follows the [igTemplating](http://www.igniteui.com/help/igtemplating-overview) style and syntax. See also the [pageCountLimit](ui.iggridpaging#options:pageCountLimit) option. + * + * + * @optionValue New value to be set. + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "pageTooltipFormat", optionValue: string): void; + + /** + * Predefined page sizes that are available to the end user to switch their grid paging to, through a drop down in the grid header. + * + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "pageSizeList"): any; + + /** + * Predefined page sizes that are available to the end user to switch their grid paging to, through a drop down in the grid header. + * + * + * @optionValue New value to be set. + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "pageSizeList", optionValue: any): void; + + /** + * Sets/Gets the number of pages which if exceeded a drop down list of page indices is displayed. If the number of pages is less than or equal to this option then buttons for each page are displayed. + * + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "pageCountLimit"): number; + + /** + * Sets/ the number of pages which if exceeded a drop down list of page indices is displayed. If the number of pages is less than or equal to this option then buttons for each page are displayed. + * + * + * @optionValue New value to be set. + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "pageCountLimit", optionValue: number): void; + + /** + * Number of page buttons, adjacent to and including the [active page](ui.iggridpaging#options:currentPageIndex), that are constantly visible. For the invisible pages, previous and next buttons are used. + * + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "visiblePageCount"): number; + + /** + * Number of page buttons, adjacent to and including the [active page](ui.iggridpaging#options:currentPageIndex), that are constantly visible. For the invisible pages, previous and next buttons are used. + * + * + * @optionValue New value to be set. + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "visiblePageCount", optionValue: number): void; + + /** + * Drop down width for the page size and page index drop downs. + * + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "defaultDropDownWidth"): number; + + /** + * Drop down width for the page size and page index drop downs. + * + * + * @optionValue New value to be set. + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "defaultDropDownWidth", optionValue: number): void; + + /** + * Time in milliseconds for which page drop down will wait for keystrokes before changing the page. + * + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "delayOnPageChanged"): number; + + /** + * Time in milliseconds for which page drop down will wait for keystrokes before changing the page. + * + * + * @optionValue New value to be set. + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "delayOnPageChanged", optionValue: number): void; + + /** + * Enables/disables paging persistence between states. + * + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "persist"): boolean; + + /** + * Enables/disables paging persistence between states. + * + * + * @optionValue New value to be set. + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "persist", optionValue: boolean): void; + + /** + * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. + * + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "inherit"): boolean; + + /** + * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. + * + * + * @optionValue New value to be set. + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "inherit", optionValue: boolean): void; + + /** + * Event fired before rendering context row content. + * Return false in order to cancel this event. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to igTreeGridPaging. + * Use ui.dataRow to get reference to the first data row. Null if there are no records. + * Use ui.currentPageIndex to get current page index. + * Use ui.contextRowMode to get the current context row mode. + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "contextRowRendering"): ContextRowRenderingEvent; + + /** + * Event fired before rendering context row content. + * Return false in order to cancel this event. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to igTreeGridPaging. + * Use ui.dataRow to get reference to the first data row. Null if there are no records. + * Use ui.currentPageIndex to get current page index. + * Use ui.contextRowMode to get the current context row mode. + * + * @optionValue Define event handler function. + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "contextRowRendering", optionValue: ContextRowRenderingEvent): void; + + /** + * Event fired context row content is rendered. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to igTreeGridPaging. + * Use ui.dataRow to get reference to the first data row. Null if there are no records. + * Use ui.currentPageIndex to get current page index. + * Use ui.parentRows to get array of the parent rows(of the ui.dataRow). If the dataRow is null(for instance filter is applied and no records are shown) then it is empty array. Otherwise it contains all ancestors ordered by level(including the current dataRow) - the first item is root level, the last array item is the current ui.dataRow + * Use ui.contextRowMode to get the current context row mode. + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "contextRowRendered"): ContextRowRenderedEvent; + + /** + * Event fired context row content is rendered. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to igTreeGridPaging. + * Use ui.dataRow to get reference to the first data row. Null if there are no records. + * Use ui.currentPageIndex to get current page index. + * Use ui.parentRows to get array of the parent rows(of the ui.dataRow). If the dataRow is null(for instance filter is applied and no records are shown) then it is empty array. Otherwise it contains all ancestors ordered by level(including the current dataRow) - the first item is root level, the last array item is the current ui.dataRow + * Use ui.contextRowMode to get the current context row mode. + * + * @optionValue Define event handler function. + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "contextRowRendered", optionValue: ContextRowRenderedEvent): void; + + /** + * Event fired before the page index is changed. + * Return false in order to cancel page index changing. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridPaging. + * Use ui.owner.grid to get reference to the grid. + * Use ui.currentPageIndex to get current page index. + * Use ui.newPageIndex to get new page index. + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "pageIndexChanging"): PageIndexChangingEvent; + + /** + * Event fired before the page index is changed. + * Return false in order to cancel page index changing. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridPaging. + * Use ui.owner.grid to get reference to the grid. + * Use ui.currentPageIndex to get current page index. + * Use ui.newPageIndex to get new page index. + * + * @optionValue Define event handler function. + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "pageIndexChanging", optionValue: PageIndexChangingEvent): void; + + /** + * Event fired after the page index is changed , but before grid data rebinds + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridPaging. + * Use ui.owner.grid to get reference to the grid. + * Use ui.pageIndex to get current page index. + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "pageIndexChanged"): PageIndexChangedEvent; + + /** + * Event fired after the page index is changed , but before grid data rebinds + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridPaging. + * Use ui.owner.grid to get reference to the grid. + * Use ui.pageIndex to get current page index. + * + * @optionValue Define event handler function. + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "pageIndexChanged", optionValue: PageIndexChangedEvent): void; + + /** + * Event fired when the page size is about to be changed from the page size dropdown. + * Return false in order to cancel page size changing. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridPaging. + * Use ui.owner.grid to get reference to the grid. + * Use ui.currentPageSize to get current page size. + * Use ui.newPageSize to get new page size. + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "pageSizeChanging"): PageSizeChangingEvent; + + /** + * Event fired when the page size is about to be changed from the page size dropdown. + * Return false in order to cancel page size changing. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridPaging. + * Use ui.owner.grid to get reference to the grid. + * Use ui.currentPageSize to get current page size. + * Use ui.newPageSize to get new page size. + * + * @optionValue Define event handler function. + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "pageSizeChanging", optionValue: PageSizeChangingEvent): void; + + /** + * Event fired after the page size is changed from the page size dropdown. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridPaging. + * Use ui.owner.grid to get reference to the grid. + * Use ui.pageSize to get current page size. + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "pageSizeChanged"): PageSizeChangedEvent; + + /** + * Event fired after the page size is changed from the page size dropdown. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridPaging. + * Use ui.owner.grid to get reference to the grid. + * Use ui.pageSize to get current page size. + * + * @optionValue Define event handler function. + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "pageSizeChanged", optionValue: PageSizeChangedEvent): void; + + /** + * Event fired before the pager footer is rendered (the whole area below the grid records). + * Return false in order to cancel pager footer rendering. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridPaging. + * Use ui.owner.grid to get reference to the grid. + * Use ui.dataSource to get reference to grid's data source. + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "pagerRendering"): PagerRenderingEvent; + + /** + * Event fired before the pager footer is rendered (the whole area below the grid records). + * Return false in order to cancel pager footer rendering. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridPaging. + * Use ui.owner.grid to get reference to the grid. + * Use ui.dataSource to get reference to grid's data source. + * + * @optionValue Define event handler function. + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "pagerRendering", optionValue: PagerRenderingEvent): void; + + /** + * Event fired after the pager footer is rendered + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridPaging. + * Use ui.owner.grid to get reference to the grid. + * Use ui.dataSource to get reference to grid's data source. + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "pagerRendered"): PagerRenderedEvent; + + /** + * Event fired after the pager footer is rendered + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridPaging. + * Use ui.owner.grid to get reference to the grid. + * Use ui.dataSource to get reference to grid's data source. + * + * @optionValue Define event handler function. + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "pagerRendered", optionValue: PagerRenderedEvent): void; + igTreeGridPaging(options: IgTreeGridPaging): JQuery; + igTreeGridPaging(optionLiteral: 'option', optionName: string): any; + igTreeGridPaging(optionLiteral: 'option', options: IgTreeGridPaging): JQuery; + igTreeGridPaging(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igTreeGridPaging(methodName: string, ...methodParams: any[]): any; +} +interface IgTreeGridResizing { + /** + * Resize the column to the size of the longest currently visible cell value. + * + */ + allowDoubleClickToResize?: boolean; + + /** + * Specifies whether the resizing should be deferred until the user finishes resizing or applied immediately. + * + */ + deferredResizing?: boolean; + + /** + * A list of column settings that specifies resizing options on a per column basis. + * + */ + columnSettings?: IgGridResizingColumnSetting[]; + + /** + * The width in pixels of the resizing handle which is position at the right side of each resizeable column header. + * + */ + handleThreshold?: number; + + /** + * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. + */ + inherit?: boolean; + + /** + * Event fired before a resizing operation is executed. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridResizing widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnIndex to get the resized column index. + * Use ui.columnKey to get the resized column key. + * Use ui.desiredWidth to get the desired width(before min/max coercion) for the resized column. + */ + columnResizing?: ColumnResizingEvent; + + /** + * Event fired(only when columnFixing is enabled) when trying to resize column in fixed area so total width of unfixed area to be less than minimalVisibleAreaWidth(option defined in columnFixing) + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridResizing widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnIndex to get the resized column index. + * Use ui.columnKey to get the resized column key. + * Use ui.desiredWidth to get the desired width(before min/max coercion) for the resized column. + */ + columnResizingRefused?: ColumnResizingRefusedEvent; + + /** + * Event fired after the resizing has been executed and results are rendered + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridResizing widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnIndex to get the resized column index. + * Use ui.columnKey to get the resized column key. + * Use ui.originalWidth to get the original column width. + * Use ui.newWidth to get the final column width after resizing. + */ + columnResized?: ColumnResizedEvent; + + /** + * Option for igTreeGridResizing + */ + [optionName: string]: any; +} +interface IgTreeGridResizingMethods { + destroy(): void; + + /** + * Resizes a column to a specified width in pixels, percents or auto if no width is specified. + * + * @param column An identifier for the column. If a number is provided it will be used as a columnIndex else if a strings is provided it will be used as a columnKey. + * @param width Width of the column in pixels or percents. If no width or "*" is specified the column will be auto-sized to the width of the data in it (including header and footer cells). + */ + resize(column: Object, width?: Object): void; +} +interface JQuery { + data(propertyName: "igTreeGridResizing"): IgTreeGridResizingMethods; +} + +interface JQuery { + igTreeGridResizing(methodName: "destroy"): void; + igTreeGridResizing(methodName: "resize", column: Object, width?: Object): void; + + /** + * Resize the column to the size of the longest currently visible cell value. + * + */ + igTreeGridResizing(optionLiteral: 'option', optionName: "allowDoubleClickToResize"): boolean; + + /** + * Resize the column to the size of the longest currently visible cell value. + * + * + * @optionValue New value to be set. + */ + igTreeGridResizing(optionLiteral: 'option', optionName: "allowDoubleClickToResize", optionValue: boolean): void; + + /** + * Gets whether the resizing should be deferred until the user finishes resizing or applied immediately. + * + */ + igTreeGridResizing(optionLiteral: 'option', optionName: "deferredResizing"): boolean; + + /** + * Sets whether the resizing should be deferred until the user finishes resizing or applied immediately. + * + * + * @optionValue New value to be set. + */ + igTreeGridResizing(optionLiteral: 'option', optionName: "deferredResizing", optionValue: boolean): void; + + /** + * A list of column settings that specifies resizing options on a per column basis. + * + */ + igTreeGridResizing(optionLiteral: 'option', optionName: "columnSettings"): IgGridResizingColumnSetting[]; + + /** + * A list of column settings that specifies resizing options on a per column basis. + * + * + * @optionValue New value to be set. + */ + igTreeGridResizing(optionLiteral: 'option', optionName: "columnSettings", optionValue: IgGridResizingColumnSetting[]): void; + + /** + * The width in pixels of the resizing handle which is position at the right side of each resizeable column header. + * + */ + igTreeGridResizing(optionLiteral: 'option', optionName: "handleThreshold"): number; + + /** + * The width in pixels of the resizing handle which is position at the right side of each resizeable column header. + * + * + * @optionValue New value to be set. + */ + igTreeGridResizing(optionLiteral: 'option', optionName: "handleThreshold", optionValue: number): void; + + /** + * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. + */ + igTreeGridResizing(optionLiteral: 'option', optionName: "inherit"): boolean; + + /** + * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. + * + * @optionValue New value to be set. + */ + igTreeGridResizing(optionLiteral: 'option', optionName: "inherit", optionValue: boolean): void; + + /** + * Event fired before a resizing operation is executed. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridResizing widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnIndex to get the resized column index. + * Use ui.columnKey to get the resized column key. + * Use ui.desiredWidth to get the desired width(before min/max coercion) for the resized column. + */ + igTreeGridResizing(optionLiteral: 'option', optionName: "columnResizing"): ColumnResizingEvent; + + /** + * Event fired before a resizing operation is executed. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridResizing widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnIndex to get the resized column index. + * Use ui.columnKey to get the resized column key. + * Use ui.desiredWidth to get the desired width(before min/max coercion) for the resized column. + * + * @optionValue Define event handler function. + */ + igTreeGridResizing(optionLiteral: 'option', optionName: "columnResizing", optionValue: ColumnResizingEvent): void; + + /** + * Event fired(only when columnFixing is enabled) when trying to resize column in fixed area so total width of unfixed area to be less than minimalVisibleAreaWidth(option defined in columnFixing) + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridResizing widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnIndex to get the resized column index. + * Use ui.columnKey to get the resized column key. + * Use ui.desiredWidth to get the desired width(before min/max coercion) for the resized column. + */ + igTreeGridResizing(optionLiteral: 'option', optionName: "columnResizingRefused"): ColumnResizingRefusedEvent; + + /** + * Event fired(only when columnFixing is enabled) when trying to resize column in fixed area so total width of unfixed area to be less than minimalVisibleAreaWidth(option defined in columnFixing) + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridResizing widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnIndex to get the resized column index. + * Use ui.columnKey to get the resized column key. + * Use ui.desiredWidth to get the desired width(before min/max coercion) for the resized column. + * + * @optionValue Define event handler function. + */ + igTreeGridResizing(optionLiteral: 'option', optionName: "columnResizingRefused", optionValue: ColumnResizingRefusedEvent): void; + + /** + * Event fired after the resizing has been executed and results are rendered + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridResizing widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnIndex to get the resized column index. + * Use ui.columnKey to get the resized column key. + * Use ui.originalWidth to get the original column width. + * Use ui.newWidth to get the final column width after resizing. + */ + igTreeGridResizing(optionLiteral: 'option', optionName: "columnResized"): ColumnResizedEvent; + + /** + * Event fired after the resizing has been executed and results are rendered + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridResizing widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnIndex to get the resized column index. + * Use ui.columnKey to get the resized column key. + * Use ui.originalWidth to get the original column width. + * Use ui.newWidth to get the final column width after resizing. + * + * @optionValue Define event handler function. + */ + igTreeGridResizing(optionLiteral: 'option', optionName: "columnResized", optionValue: ColumnResizedEvent): void; + igTreeGridResizing(options: IgTreeGridResizing): JQuery; + igTreeGridResizing(optionLiteral: 'option', optionName: string): any; + igTreeGridResizing(optionLiteral: 'option', options: IgTreeGridResizing): JQuery; + igTreeGridResizing(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igTreeGridResizing(methodName: string, ...methodParams: any[]): any; +} +interface IgTreeGridRowSelectors { + /** + * Determines row numbering format. + * + * + * Valid values: + * "sequential" Defines numbering format to be the index of the visible records. + * "hierarchical" Defines numbering format to be concatenation of the parent and children indexes. + */ + rowSelectorNumberingMode?: string; + + /** + * Gets the type of checkboxes rendered in the row selector. Can be set only at initialization. + * + * + * Valid values: + * "biState" Checkboxes are rendered and support two states(checked and unchecked). Checkboxes do not cascade down or up in this mode. + * "triState" Checkboxes are rendered and support three states(checked, partial and unchecked). Checkboxes cascade up and down in this mode. + */ + checkBoxMode?: string; + + /** + * Determines whether the row selectors column should contain row numbering + * + */ + enableRowNumbering?: boolean; + + /** + * Determines whether the row selectors column should contain checkboxes + * + */ + enableCheckBoxes?: boolean; + + /** + * The seed to be added to the default numbering + * + */ + rowNumberingSeed?: number; + + /** + * + * + * Valid values: + * "string" The row selector column width can be set in pixels (px) and percentage (%) + * "number" The row selector width can be set as a number + * "null" will let the feature decide the best width depending on enabled contents + */ + rowSelectorColumnWidth?: string|number; + + /** + * Determines whether the selection feature is required for the row selectors. If set to "false" + * the widget will not check for Selection availability. If set to "true" an exception will be thrown if Selection is + * not available. + * + */ + requireSelection?: boolean; + + /** + * Determines whether checkboxes will be shown only if row selectors are on focus/selected. + * + */ + showCheckBoxesOnFocus?: boolean; + + /** + * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. + */ + inherit?: boolean; + + /** + * Enables/disables showing an overlay after clicking on the header checkbox, which allows selecting all records from all pages. + * + */ + enableSelectAllForPaging?: boolean; + + /** + * Custom template for "select all" overlay with paging + * Element with attribute data-rs-select-all is used for sellecting all the records + * Element with attribute data-rs-close-all is used for closing the overlay + * The default template is "
You have selected ${checked} records. Select all ${totalRecordsCount} records
" + * There is also ${allCheckedRecords} parameter which is not used in the default template, but it represents the checked records from all pages. + * + */ + selectAllForPagingTemplate?: string; + + /** + * Custom template for "deselect all" overlay with paging + * Element with attribute data-rs-deselect-all is used for sellecting all the records + * Element with attribute data-rs-close-all is used for closing the overlay + * The default template is "
You have deselected ${unchecked} records. Deselect all ${totalRecordsCount} records
" + * There is also ${allCheckedRecords} parameter which is not used in the default template, but it represents the checked records from all pages. + * + */ + deselectAllForPagingTemplate?: string; + + /** + * Event fired after a row selector is clicked. + * Function takes arguments evt and ui. + * Use ui.row to get reference to the row the clicked row selector resides in. + * Use ui.fixedRow to get reference to the fixed row the clicked row selector resides in(if there are fixed columns). + * Use ui.rowIndex to get the index of the row the clicked row selector resides in. + * Use ui.rowKey to get the key of the row the clicked row selector resides in. + * Use ui.rowSelector to get reference to the row selector cell. + * Use ui.owner to get reference to RowSelectors. + * Use ui.grid to get reference to the grid the RowSelectors are initialized for. + */ + rowSelectorClicked?: RowSelectorClickedEvent; + + /** + * Event fired when a row selector checkbox is changing. + * Function takes arguments evt and ui. + * Use ui.row to get reference to the row the clicked row selector resides in. + * Use ui.rowIndex to get the index of the row the clicked row selector resides in. + * Use ui.rowKey to get the key of the row the clicked row selector resides in. + * Use ui.rowSelector to get reference to the row selector cell. + * Use ui.owner to get reference to igRowSelectors. + * Use ui.grid to get reference to the grid the RowSelectors are initialized for. + * Use ui.currentState to get the current state of the checkbox ("on","off"). + * Use ui.newState to get the new state of the checkbox ("on","off"). + * Use ui.isHeader to check if the header check box is the one being clicked. In this case no row related args are passed. + */ + checkBoxStateChanging?: CheckBoxStateChangingEvent; + + /** + * Event fired after a row selector checkbox had changed state. + * Function takes arguments evt and ui. + * Use ui.row to get reference to the row the clicked row selector resides in. + * Use ui.rowIndex to get the index of the row the clicked row selector resides in. + * Use ui.rowKey to get the key of the row the clicked row selector resides in. + * Use ui.rowSelector to get reference to the row selector cell. + * Use ui.owner to get reference to igRowSelectors. + * Use ui.grid to get reference to the grid the RowSelectors are initialized for. + * Use ui.state to get the state of the checkbox ("on","off"). + * Use ui.isHeader to check if the header check box is the one being clicked. In this case no row related args are passed. + */ + checkBoxStateChanged?: CheckBoxStateChangedEvent; + + /** + * Option for igTreeGridRowSelectors + */ + [optionName: string]: any; +} +interface IgTreeGridRowSelectorsMethods { + destroy(): void; + + /** + * Change the check state of a row by row id + * + * @param rowId Row Id + * @param toCheck The new check state of the checkbox - true for checked or false for unchecked + */ + changeCheckStateById(rowId: Object, toCheck: boolean): void; + + /** + * Changes the check state of a row by index to specified value + * + * @param index Row index + * @param toCheck The new check state of the checkbox - true for checked or false for unchecked + */ + changeCheckState(index: number, toCheck: boolean): void; + + /** + * Toggles the check state of a row by row id + * + * @param rowId Row Id + */ + toggleCheckStateById(rowId: Object): void; + + /** + * Toggles the check state of a row by index + * + * @param index Row index + */ + toggleCheckState(index: number): void; + + /** + * Gets an array of all the checked rows. Every object from the array has the following format { element: , id: , index: } + */ + checkedRows(): any[]; + + /** + * Gets an array of all the partially checked rows. Every object from the array has the following format { element: , id: , index: } + */ + partiallyCheckedRows(): any[]; + + /** + * Gets an array of all the unchecked rows. Every object from the array has the following format { element: , id: , index: } + */ + uncheckedRows(): any[]; + + /** + * Returns the check state of the row by id. + * + * @param rowId + */ + checkStateById(rowId: Object): string; +} +interface JQuery { + data(propertyName: "igTreeGridRowSelectors"): IgTreeGridRowSelectorsMethods; +} + +interface JQuery { + igTreeGridRowSelectors(methodName: "destroy"): void; + igTreeGridRowSelectors(methodName: "changeCheckStateById", rowId: Object, toCheck: boolean): void; + igTreeGridRowSelectors(methodName: "changeCheckState", index: number, toCheck: boolean): void; + igTreeGridRowSelectors(methodName: "toggleCheckStateById", rowId: Object): void; + igTreeGridRowSelectors(methodName: "toggleCheckState", index: number): void; + igTreeGridRowSelectors(methodName: "checkedRows"): any[]; + igTreeGridRowSelectors(methodName: "partiallyCheckedRows"): any[]; + igTreeGridRowSelectors(methodName: "uncheckedRows"): any[]; + igTreeGridRowSelectors(methodName: "checkStateById", rowId: Object): string; + + /** + * Determines row numbering format. + * + */ + igTreeGridRowSelectors(optionLiteral: 'option', optionName: "rowSelectorNumberingMode"): string; + + /** + * Determines row numbering format. + * + * + * @optionValue New value to be set. + */ + igTreeGridRowSelectors(optionLiteral: 'option', optionName: "rowSelectorNumberingMode", optionValue: string): void; + + /** + * Gets the type of checkboxes rendered in the row selector. Can be set only at initialization. + * + */ + igTreeGridRowSelectors(optionLiteral: 'option', optionName: "checkBoxMode"): string; + + /** + * The type of checkboxes rendered in the row selector. Can be set only at initialization. + * + * + * @optionValue New value to be set. + */ + igTreeGridRowSelectors(optionLiteral: 'option', optionName: "checkBoxMode", optionValue: string): void; + + /** + * Determines whether the row selectors column should contain row numbering + * + */ + igTreeGridRowSelectors(optionLiteral: 'option', optionName: "enableRowNumbering"): boolean; + + /** + * Determines whether the row selectors column should contain row numbering + * + * + * @optionValue New value to be set. + */ + igTreeGridRowSelectors(optionLiteral: 'option', optionName: "enableRowNumbering", optionValue: boolean): void; + + /** + * Determines whether the row selectors column should contain checkboxes + * + */ + igTreeGridRowSelectors(optionLiteral: 'option', optionName: "enableCheckBoxes"): boolean; + + /** + * Determines whether the row selectors column should contain checkboxes + * + * + * @optionValue New value to be set. + */ + igTreeGridRowSelectors(optionLiteral: 'option', optionName: "enableCheckBoxes", optionValue: boolean): void; + + /** + * The seed to be added to the default numbering + * + */ + igTreeGridRowSelectors(optionLiteral: 'option', optionName: "rowNumberingSeed"): number; + + /** + * The seed to be added to the default numbering + * + * + * @optionValue New value to be set. + */ + igTreeGridRowSelectors(optionLiteral: 'option', optionName: "rowNumberingSeed", optionValue: number): void; + + /** + * * + */ + igTreeGridRowSelectors(optionLiteral: 'option', optionName: "rowSelectorColumnWidth"): string|number; + + /** + * * + * + * @optionValue New value to be set. + */ + igTreeGridRowSelectors(optionLiteral: 'option', optionName: "rowSelectorColumnWidth", optionValue: string|number): void; + + /** + * Determines whether the selection feature is required for the row selectors. If set to "false" + * the widget will not check for Selection availability. If set to "true" an exception will be thrown if Selection is + * not available. + * + */ + igTreeGridRowSelectors(optionLiteral: 'option', optionName: "requireSelection"): boolean; + + /** + * Determines whether the selection feature is required for the row selectors. If set to "false" + * the widget will not check for Selection availability. If set to "true" an exception will be thrown if Selection is + * not available. + * + * + * @optionValue New value to be set. + */ + igTreeGridRowSelectors(optionLiteral: 'option', optionName: "requireSelection", optionValue: boolean): void; + + /** + * Determines whether checkboxes will be shown only if row selectors are on focus/selected. + * + */ + igTreeGridRowSelectors(optionLiteral: 'option', optionName: "showCheckBoxesOnFocus"): boolean; + + /** + * Determines whether checkboxes will be shown only if row selectors are on focus/selected. + * + * + * @optionValue New value to be set. + */ + igTreeGridRowSelectors(optionLiteral: 'option', optionName: "showCheckBoxesOnFocus", optionValue: boolean): void; + + /** + * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. + */ + igTreeGridRowSelectors(optionLiteral: 'option', optionName: "inherit"): boolean; + + /** + * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. + * + * @optionValue New value to be set. + */ + igTreeGridRowSelectors(optionLiteral: 'option', optionName: "inherit", optionValue: boolean): void; + + /** + * Enables/disables showing an overlay after clicking on the header checkbox, which allows selecting all records from all pages. + * + */ + igTreeGridRowSelectors(optionLiteral: 'option', optionName: "enableSelectAllForPaging"): boolean; + + /** + * Enables/disables showing an overlay after clicking on the header checkbox, which allows selecting all records from all pages. + * + * + * @optionValue New value to be set. + */ + igTreeGridRowSelectors(optionLiteral: 'option', optionName: "enableSelectAllForPaging", optionValue: boolean): void; + + /** + * Custom template for "select all" overlay with paging + * Element with attribute data-rs-select-all is used for sellecting all the records + * Element with attribute data-rs-close-all is used for closing the overlay + * The default template is "
You have selected ${checked} records. Select all ${totalRecordsCount} records
" + * There is also ${allCheckedRecords} parameter which is not used in the default template, but it represents the checked records from all pages. + * + */ + igTreeGridRowSelectors(optionLiteral: 'option', optionName: "selectAllForPagingTemplate"): string; + + /** + * Custom template for "select all" overlay with paging + * Element with attribute data-rs-select-all is used for sellecting all the records + * Element with attribute data-rs-close-all is used for closing the overlay + * The default template is "
You have selected ${checked} records. Select all ${totalRecordsCount} records
" + * There is also ${allCheckedRecords} parameter which is not used in the default template, but it represents the checked records from all pages. + * + * + * @optionValue New value to be set. + */ + igTreeGridRowSelectors(optionLiteral: 'option', optionName: "selectAllForPagingTemplate", optionValue: string): void; + + /** + * Custom template for "deselect all" overlay with paging + * Element with attribute data-rs-deselect-all is used for sellecting all the records + * Element with attribute data-rs-close-all is used for closing the overlay + * The default template is "
You have deselected ${unchecked} records. Deselect all ${totalRecordsCount} records
" + * There is also ${allCheckedRecords} parameter which is not used in the default template, but it represents the checked records from all pages. + * + */ + igTreeGridRowSelectors(optionLiteral: 'option', optionName: "deselectAllForPagingTemplate"): string; + + /** + * Custom template for "deselect all" overlay with paging + * Element with attribute data-rs-deselect-all is used for sellecting all the records + * Element with attribute data-rs-close-all is used for closing the overlay + * The default template is "
You have deselected ${unchecked} records. Deselect all ${totalRecordsCount} records
" + * There is also ${allCheckedRecords} parameter which is not used in the default template, but it represents the checked records from all pages. + * + * + * @optionValue New value to be set. + */ + igTreeGridRowSelectors(optionLiteral: 'option', optionName: "deselectAllForPagingTemplate", optionValue: string): void; + + /** + * Event fired after a row selector is clicked. + * Function takes arguments evt and ui. + * Use ui.row to get reference to the row the clicked row selector resides in. + * Use ui.fixedRow to get reference to the fixed row the clicked row selector resides in(if there are fixed columns). + * Use ui.rowIndex to get the index of the row the clicked row selector resides in. + * Use ui.rowKey to get the key of the row the clicked row selector resides in. + * Use ui.rowSelector to get reference to the row selector cell. + * Use ui.owner to get reference to RowSelectors. + * Use ui.grid to get reference to the grid the RowSelectors are initialized for. + */ + igTreeGridRowSelectors(optionLiteral: 'option', optionName: "rowSelectorClicked"): RowSelectorClickedEvent; + + /** + * Event fired after a row selector is clicked. + * Function takes arguments evt and ui. + * Use ui.row to get reference to the row the clicked row selector resides in. + * Use ui.fixedRow to get reference to the fixed row the clicked row selector resides in(if there are fixed columns). + * Use ui.rowIndex to get the index of the row the clicked row selector resides in. + * Use ui.rowKey to get the key of the row the clicked row selector resides in. + * Use ui.rowSelector to get reference to the row selector cell. + * Use ui.owner to get reference to RowSelectors. + * Use ui.grid to get reference to the grid the RowSelectors are initialized for. + * + * @optionValue Define event handler function. + */ + igTreeGridRowSelectors(optionLiteral: 'option', optionName: "rowSelectorClicked", optionValue: RowSelectorClickedEvent): void; + + /** + * Event fired when a row selector checkbox is changing. + * Function takes arguments evt and ui. + * Use ui.row to get reference to the row the clicked row selector resides in. + * Use ui.rowIndex to get the index of the row the clicked row selector resides in. + * Use ui.rowKey to get the key of the row the clicked row selector resides in. + * Use ui.rowSelector to get reference to the row selector cell. + * Use ui.owner to get reference to igRowSelectors. + * Use ui.grid to get reference to the grid the RowSelectors are initialized for. + * Use ui.currentState to get the current state of the checkbox ("on","off"). + * Use ui.newState to get the new state of the checkbox ("on","off"). + * Use ui.isHeader to check if the header check box is the one being clicked. In this case no row related args are passed. + */ + igTreeGridRowSelectors(optionLiteral: 'option', optionName: "checkBoxStateChanging"): CheckBoxStateChangingEvent; + + /** + * Event fired when a row selector checkbox is changing. + * Function takes arguments evt and ui. + * Use ui.row to get reference to the row the clicked row selector resides in. + * Use ui.rowIndex to get the index of the row the clicked row selector resides in. + * Use ui.rowKey to get the key of the row the clicked row selector resides in. + * Use ui.rowSelector to get reference to the row selector cell. + * Use ui.owner to get reference to igRowSelectors. + * Use ui.grid to get reference to the grid the RowSelectors are initialized for. + * Use ui.currentState to get the current state of the checkbox ("on","off"). + * Use ui.newState to get the new state of the checkbox ("on","off"). + * Use ui.isHeader to check if the header check box is the one being clicked. In this case no row related args are passed. + * + * @optionValue Define event handler function. + */ + igTreeGridRowSelectors(optionLiteral: 'option', optionName: "checkBoxStateChanging", optionValue: CheckBoxStateChangingEvent): void; + + /** + * Event fired after a row selector checkbox had changed state. + * Function takes arguments evt and ui. + * Use ui.row to get reference to the row the clicked row selector resides in. + * Use ui.rowIndex to get the index of the row the clicked row selector resides in. + * Use ui.rowKey to get the key of the row the clicked row selector resides in. + * Use ui.rowSelector to get reference to the row selector cell. + * Use ui.owner to get reference to igRowSelectors. + * Use ui.grid to get reference to the grid the RowSelectors are initialized for. + * Use ui.state to get the state of the checkbox ("on","off"). + * Use ui.isHeader to check if the header check box is the one being clicked. In this case no row related args are passed. + */ + igTreeGridRowSelectors(optionLiteral: 'option', optionName: "checkBoxStateChanged"): CheckBoxStateChangedEvent; + + /** + * Event fired after a row selector checkbox had changed state. + * Function takes arguments evt and ui. + * Use ui.row to get reference to the row the clicked row selector resides in. + * Use ui.rowIndex to get the index of the row the clicked row selector resides in. + * Use ui.rowKey to get the key of the row the clicked row selector resides in. + * Use ui.rowSelector to get reference to the row selector cell. + * Use ui.owner to get reference to igRowSelectors. + * Use ui.grid to get reference to the grid the RowSelectors are initialized for. + * Use ui.state to get the state of the checkbox ("on","off"). + * Use ui.isHeader to check if the header check box is the one being clicked. In this case no row related args are passed. + * + * @optionValue Define event handler function. + */ + igTreeGridRowSelectors(optionLiteral: 'option', optionName: "checkBoxStateChanged", optionValue: CheckBoxStateChangedEvent): void; + igTreeGridRowSelectors(options: IgTreeGridRowSelectors): JQuery; + igTreeGridRowSelectors(optionLiteral: 'option', optionName: string): any; + igTreeGridRowSelectors(optionLiteral: 'option', options: IgTreeGridRowSelectors): JQuery; + igTreeGridRowSelectors(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igTreeGridRowSelectors(methodName: string, ...methodParams: any[]): any; +} +interface IgTreeGridSelection { + /** + * Enables / Disables multiple selection of cells and rows - depending on the mode + * + */ + multipleSelection?: boolean; + + /** + * Enables / disables selection via dragging with the mouse - only applicable for cell selection + * + */ + mouseDragSelect?: boolean; + + /** + * Defines type of the selection. + * + * + * Valid values: + * "row" Defines row selection mode. + * "cell" Defines cell selection mode. + */ + mode?: string; + + /** + * Enables / disables activation of rows and cells. Activation implies ability to perform navigating through cells and rows via the keyboard, and selecting rows and cells using CTRL / SHIFT - in the way cells/rows are selected in Ms Excel + * + */ + activation?: boolean; + + /** + * If wrapAround is enabled and selection is on the first or last row or cell, then when the end user tries to go beyond that, the first/last row or cell will be selected + * + */ + wrapAround?: boolean; + + /** + * If true will basically skip going into child grids with down / up / right / left arrow keys, when in the context of hierarchical grid + * + */ + skipChildren?: boolean; + + /** + * If true multiple selection of cells is done as if CTRL is being held. the option is disregarded if mode is set to row. this option is useful for enabling multiple discountinued selection on touch environments. + * + */ + multipleCellSelectOnClick?: boolean; + + /** + * Enables / disables selection via continuous touch event - only applicable for cell selection and touch-supported environments + * + */ + touchDragSelect?: boolean; + + /** + * Enables / disables selection persistance between states. + * + */ + persist?: boolean; + + /** + * Enables / disables the ability to ctrl drag multiple selection windows when selection mode is 'cell' + * + */ + allowMultipleRangeSelection?: boolean; + + /** + * Event fired before row(s) are about to be selected (cancellable). + * Return false in order to cancel selection changing. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridSelection. + * Use ui.owner.grid to get reference to the grid. + * Use ui.row to get reference to row object. + * Use ui.row.element to get reference to row DOM element. + * Use ui.row.index to get row index. + * Use ui.row.id to get the row id if primary key is defined or persistence is enabled. + * Use ui.selectedRows to get reference to rows object array. + * Use ui.startIndex to get the start index for a range row selection. + * Use ui.endIndex to get the end index for a range row selection. + */ + rowSelectionChanging?: RowSelectionChangingEvent; + + /** + * Event fired after row(s) are selected. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridSelection. + * Use ui.owner.grid to get reference to the grid. + * Use ui.row to get reference to row object. + * Use ui.row.element to get reference to row DOM element. + * Use ui.row.index to get row index. + * Use ui.row.id to get the row id if primary key is defined or persistence is enabled. + * Use ui.selectedRows to get reference to rows object array. + */ + rowSelectionChanged?: RowSelectionChangedEvent; + + /** + * Event fired before cell(s) are about to be selected (cancellable). + * Return false in order to cancel cell selection changing. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridSelection. + * Use ui.owner.grid to get reference to the grid. + * Use ui.cell to get reference to cell object. + * Use ui.cell.element to get reference to cell DOM element. + * Use ui.cell.columnKey to get reference to column key. + * Use ui.cell.rowId to get the row id if primary key is defined or persistence is enabled. + * Use ui.cell.index to get column index. + * Use ui.cell.row to get reference to row DOM element. + * Use ui.cell.rowIndex to get row index. + * Use ui.selectedCells to get reference to selected cells object array. + * Use ui.firstColumnIndex to get the column index for the first cell in a range selection. + * Use ui.firstRowIndex to get the row index for the first cell in a range selection. + * Use ui.lastColumnIndex to get the column index for the last cell in a range selection. + * Use ui.lastRowIndex to get the row index for the last cell in a range selection. + */ + cellSelectionChanging?: CellSelectionChangingEvent; + + /** + * Event fired after cell(s) are selected. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridSelection. + * Use ui.owner.grid to get reference to the grid. + * Use ui.cell to get reference to cell object. + * Use ui.cell.element to get reference to cell DOM element. + * Use ui.cell.columnKey to get reference to column key. + * Use ui.cell.rowId to get the row id if primary key is defined or persistence is enabled. + * Use ui.cell.index to get column index. + * Use ui.cell.row to get reference to row DOM element. + * Use ui.cell.rowIndex to get row index. + * Use ui.selectedCells to get reference to selected cells object array. + */ + cellSelectionChanged?: CellSelectionChangedEvent; + + /** + * Event fired before a cell becomes active (focus style applied) (cancellable). + * Return false in order to cancel active cell changing. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridSelection. + * Use ui.owner.grid to get reference to the grid. + * Use ui.cell to get reference to cell object. + * Use ui.cell.element to get reference to cell DOM element. + * Use ui.cell.columnKey to get column key. + * Use ui.cell.rowId to get the row id if primary key is defined or persistence is enabled. + * Use ui.cell.index to get column index. + * Use ui.cell.row to get reference to row DOM element. + * Use ui.cell.rowIndex to get row index. + */ + activeCellChanging?: ActiveCellChangingEvent; + + /** + * Event fired after a cell becomes active (focus style applied). + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridSelection. + * Use ui.owner.grid to get reference to the grid. + * Use ui.cell to get reference to cell object. + * Use ui.cell.element to get reference to cell DOM element. + * Use ui.cell.columnKey to get column key. + * Use ui.cell.rowId to get the row id if primary key is defined or persistence is enabled. + * Use ui.cell.index to get column index. + * Use ui.cell.row to get reference to row DOM element. + * Use ui.cell.rowIndex to get row index. + */ + activeCellChanged?: ActiveCellChangedEvent; + + /** + * Event fired before a row becomes active (focus style applied) (cancellable). + * Return false in order to cancel active row changing. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridSelection. + * Use ui.owner.grid to get reference to the grid. + * Use ui.row to get reference to row object. + * Use ui.row.element to get reference to active row DOM element. + * Use ui.row.index to get active row index. + * Use ui.row.id to get the active row id if primary key is defined or persistence is enabled. + */ + activeRowChanging?: ActiveRowChangingEvent; + + /** + * Event fired after a row becomes active (focus style applied). + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridSelection. + * Use ui.owner.grid to get reference to the grid. + * Use ui.row to get reference to row object. + * Use ui.row.element to get reference to active row DOM element. + * Use ui.row.index to get active row index. + * Use ui.row.id to get the active row id if primary key is defined or persistence is enabled. + */ + activeRowChanged?: ActiveRowChangedEvent; + + /** + * Option for igTreeGridSelection + */ + [optionName: string]: any; +} +interface IgTreeGridSelectionMethods { + destroy(): void; + + /** + * Selects a row by row id + * + * @param id Row Id + */ + selectRowById(id: Object): void; + + /** + * Clears all selected cells, selected rows, active cell and active row. Also updates the UI accordingly + */ + clearSelection(): void; + + /** + * Selects a cell by row/col + * + * @param row Row index + * @param col Column index + * @param isFixed If the cell is part of the fixed or unfixed area of the grid. + */ + selectCell(row: number, col: number, isFixed?: boolean): void; + + /** + * Selects a cell by row id/column key + * + * @param id Row Id + * @param colKey Column key + */ + selectCellById(id: Object, colKey: string): void; + + /** + * Deselects a cell by row/col + * + * @param row Row index + * @param col Column index + * @param isFixed If the cell is part of the fixed or unfixed area of the grid. + */ + deselectCell(row: number, col: number, isFixed?: boolean): void; + + /** + * Deselects a cell by row id/column key + * + * @param id Row Id + * @param colKey Column key + */ + deselectCellById(id: Object, colKey: string): void; + + /** + * Selects a row by index + * + * @param index Row index + */ + selectRow(index: number): void; + + /** + * Deselects a row by index + * + * @param index Row index + */ + deselectRow(index: number): void; + + /** + * Deselects a row by row id + * + * @param id Row Id + */ + deselectRowById(id: Object): void; + + /** + * Returns an array of selected cells in arbitrary order where every objects has the format { element: , row: , index: , rowIndex: , columnKey: } . + * + * If multiple selection is disabled the function will return null. + */ + selectedCells(): any[]; + + /** + * Returns an array of selected rows in arbitrary order where every object has the format { element: , index: } . + * + * If multiple selection is disabled the function will return null. + */ + selectedRows(): any[]; + + /** + * Returns the currently selected cell that has the format { element: , row: , index: , rowIndex: , columnKey: }, if any. + * + * If multiple selection is enabled the function will return null. + */ + selectedCell(): Object; + + /** + * Returns the currently selected row that has the format { element: , index: }, if any. + * + * If multiple selection is enabled the function will return null. + */ + selectedRow(): Object; + + /** + * Returns the currently active (focused) cell that has the format { element: , row: , index: , rowIndex: , columnKey: }, if any. + */ + activeCell(): Object; + + /** + * Returns the currently active (focused) row that has the format { element: , index: }, if any. + */ + activeRow(): Object; +} +interface JQuery { + data(propertyName: "igTreeGridSelection"): IgTreeGridSelectionMethods; +} + +interface JQuery { + igTreeGridSelection(methodName: "destroy"): void; + igTreeGridSelection(methodName: "selectRowById", id: Object): void; + igTreeGridSelection(methodName: "clearSelection"): void; + igTreeGridSelection(methodName: "selectCell", row: number, col: number, isFixed?: boolean): void; + igTreeGridSelection(methodName: "selectCellById", id: Object, colKey: string): void; + igTreeGridSelection(methodName: "deselectCell", row: number, col: number, isFixed?: boolean): void; + igTreeGridSelection(methodName: "deselectCellById", id: Object, colKey: string): void; + igTreeGridSelection(methodName: "selectRow", index: number): void; + igTreeGridSelection(methodName: "deselectRow", index: number): void; + igTreeGridSelection(methodName: "deselectRowById", id: Object): void; + igTreeGridSelection(methodName: "selectedCells"): any[]; + igTreeGridSelection(methodName: "selectedRows"): any[]; + igTreeGridSelection(methodName: "selectedCell"): Object; + igTreeGridSelection(methodName: "selectedRow"): Object; + igTreeGridSelection(methodName: "activeCell"): Object; + igTreeGridSelection(methodName: "activeRow"): Object; + + /** + * Enables / Disables multiple selection of cells and rows - depending on the mode + * + */ + igTreeGridSelection(optionLiteral: 'option', optionName: "multipleSelection"): boolean; + + /** + * Enables / Disables multiple selection of cells and rows - depending on the mode + * + * + * @optionValue New value to be set. + */ + igTreeGridSelection(optionLiteral: 'option', optionName: "multipleSelection", optionValue: boolean): void; + + /** + * Enables / disables selection via dragging with the mouse - only applicable for cell selection + * + */ + igTreeGridSelection(optionLiteral: 'option', optionName: "mouseDragSelect"): boolean; + + /** + * Enables / disables selection via dragging with the mouse - only applicable for cell selection + * + * + * @optionValue New value to be set. + */ + igTreeGridSelection(optionLiteral: 'option', optionName: "mouseDragSelect", optionValue: boolean): void; + + /** + * Defines type of the selection. + * + */ + igTreeGridSelection(optionLiteral: 'option', optionName: "mode"): string; + + /** + * Defines type of the selection. + * + * + * @optionValue New value to be set. + */ + igTreeGridSelection(optionLiteral: 'option', optionName: "mode", optionValue: string): void; + + /** + * Enables / disables activation of rows and cells. Activation implies ability to perform navigating through cells and rows via the keyboard, and selecting rows and cells using CTRL / SHIFT - in the way cells/rows are selected in Ms Excel + * + */ + igTreeGridSelection(optionLiteral: 'option', optionName: "activation"): boolean; + + /** + * Enables / disables activation of rows and cells. Activation implies ability to perform navigating through cells and rows via the keyboard, and selecting rows and cells using CTRL / SHIFT - in the way cells/rows are selected in Ms Excel + * + * + * @optionValue New value to be set. + */ + igTreeGridSelection(optionLiteral: 'option', optionName: "activation", optionValue: boolean): void; + + /** + * If wrapAround is enabled and selection is on the first or last row or cell, then when the end user tries to go beyond that, the first/last row or cell will be selected + * + */ + igTreeGridSelection(optionLiteral: 'option', optionName: "wrapAround"): boolean; + + /** + * If wrapAround is enabled and selection is on the first or last row or cell, then when the end user tries to go beyond that, the first/last row or cell will be selected + * + * + * @optionValue New value to be set. + */ + igTreeGridSelection(optionLiteral: 'option', optionName: "wrapAround", optionValue: boolean): void; + + /** + * If true will basically skip going into child grids with down / up / right / left arrow keys, when in the context of hierarchical grid + * + */ + igTreeGridSelection(optionLiteral: 'option', optionName: "skipChildren"): boolean; + + /** + * If true will basically skip going into child grids with down / up / right / left arrow keys, when in the context of hierarchical grid + * + * + * @optionValue New value to be set. + */ + igTreeGridSelection(optionLiteral: 'option', optionName: "skipChildren", optionValue: boolean): void; + + /** + * If true multiple selection of cells is done as if CTRL is being held. the option is disregarded if mode is set to row. this option is useful for enabling multiple discountinued selection on touch environments. + * + */ + igTreeGridSelection(optionLiteral: 'option', optionName: "multipleCellSelectOnClick"): boolean; + + /** + * If true multiple selection of cells is done as if CTRL is being held. the option is disregarded if mode is set to row. this option is useful for enabling multiple discountinued selection on touch environments. + * + * + * @optionValue New value to be set. + */ + igTreeGridSelection(optionLiteral: 'option', optionName: "multipleCellSelectOnClick", optionValue: boolean): void; + + /** + * Enables / disables selection via continuous touch event - only applicable for cell selection and touch-supported environments + * + */ + igTreeGridSelection(optionLiteral: 'option', optionName: "touchDragSelect"): boolean; + + /** + * Enables / disables selection via continuous touch event - only applicable for cell selection and touch-supported environments + * + * + * @optionValue New value to be set. + */ + igTreeGridSelection(optionLiteral: 'option', optionName: "touchDragSelect", optionValue: boolean): void; + + /** + * Enables / disables selection persistance between states. + * + */ + igTreeGridSelection(optionLiteral: 'option', optionName: "persist"): boolean; + + /** + * Enables / disables selection persistance between states. + * + * + * @optionValue New value to be set. + */ + igTreeGridSelection(optionLiteral: 'option', optionName: "persist", optionValue: boolean): void; + + /** + * Enables / disables the ability to ctrl drag multiple selection windows when selection mode is 'cell' + * + */ + igTreeGridSelection(optionLiteral: 'option', optionName: "allowMultipleRangeSelection"): boolean; + + /** + * Enables / disables the ability to ctrl drag multiple selection windows when selection mode is 'cell' + * + * + * @optionValue New value to be set. + */ + igTreeGridSelection(optionLiteral: 'option', optionName: "allowMultipleRangeSelection", optionValue: boolean): void; + + /** + * Event fired before row(s) are about to be selected (cancellable). + * Return false in order to cancel selection changing. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridSelection. + * Use ui.owner.grid to get reference to the grid. + * Use ui.row to get reference to row object. + * Use ui.row.element to get reference to row DOM element. + * Use ui.row.index to get row index. + * Use ui.row.id to get the row id if primary key is defined or persistence is enabled. + * Use ui.selectedRows to get reference to rows object array. + * Use ui.startIndex to get the start index for a range row selection. + * Use ui.endIndex to get the end index for a range row selection. + */ + igTreeGridSelection(optionLiteral: 'option', optionName: "rowSelectionChanging"): RowSelectionChangingEvent; + + /** + * Event fired before row(s) are about to be selected (cancellable). + * Return false in order to cancel selection changing. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridSelection. + * Use ui.owner.grid to get reference to the grid. + * Use ui.row to get reference to row object. + * Use ui.row.element to get reference to row DOM element. + * Use ui.row.index to get row index. + * Use ui.row.id to get the row id if primary key is defined or persistence is enabled. + * Use ui.selectedRows to get reference to rows object array. + * Use ui.startIndex to get the start index for a range row selection. + * Use ui.endIndex to get the end index for a range row selection. + * + * @optionValue Define event handler function. + */ + igTreeGridSelection(optionLiteral: 'option', optionName: "rowSelectionChanging", optionValue: RowSelectionChangingEvent): void; + + /** + * Event fired after row(s) are selected. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridSelection. + * Use ui.owner.grid to get reference to the grid. + * Use ui.row to get reference to row object. + * Use ui.row.element to get reference to row DOM element. + * Use ui.row.index to get row index. + * Use ui.row.id to get the row id if primary key is defined or persistence is enabled. + * Use ui.selectedRows to get reference to rows object array. + */ + igTreeGridSelection(optionLiteral: 'option', optionName: "rowSelectionChanged"): RowSelectionChangedEvent; + + /** + * Event fired after row(s) are selected. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridSelection. + * Use ui.owner.grid to get reference to the grid. + * Use ui.row to get reference to row object. + * Use ui.row.element to get reference to row DOM element. + * Use ui.row.index to get row index. + * Use ui.row.id to get the row id if primary key is defined or persistence is enabled. + * Use ui.selectedRows to get reference to rows object array. + * + * @optionValue Define event handler function. + */ + igTreeGridSelection(optionLiteral: 'option', optionName: "rowSelectionChanged", optionValue: RowSelectionChangedEvent): void; + + /** + * Event fired before cell(s) are about to be selected (cancellable). + * Return false in order to cancel cell selection changing. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridSelection. + * Use ui.owner.grid to get reference to the grid. + * Use ui.cell to get reference to cell object. + * Use ui.cell.element to get reference to cell DOM element. + * Use ui.cell.columnKey to get reference to column key. + * Use ui.cell.rowId to get the row id if primary key is defined or persistence is enabled. + * Use ui.cell.index to get column index. + * Use ui.cell.row to get reference to row DOM element. + * Use ui.cell.rowIndex to get row index. + * Use ui.selectedCells to get reference to selected cells object array. + * Use ui.firstColumnIndex to get the column index for the first cell in a range selection. + * Use ui.firstRowIndex to get the row index for the first cell in a range selection. + * Use ui.lastColumnIndex to get the column index for the last cell in a range selection. + * Use ui.lastRowIndex to get the row index for the last cell in a range selection. + */ + igTreeGridSelection(optionLiteral: 'option', optionName: "cellSelectionChanging"): CellSelectionChangingEvent; + + /** + * Event fired before cell(s) are about to be selected (cancellable). + * Return false in order to cancel cell selection changing. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridSelection. + * Use ui.owner.grid to get reference to the grid. + * Use ui.cell to get reference to cell object. + * Use ui.cell.element to get reference to cell DOM element. + * Use ui.cell.columnKey to get reference to column key. + * Use ui.cell.rowId to get the row id if primary key is defined or persistence is enabled. + * Use ui.cell.index to get column index. + * Use ui.cell.row to get reference to row DOM element. + * Use ui.cell.rowIndex to get row index. + * Use ui.selectedCells to get reference to selected cells object array. + * Use ui.firstColumnIndex to get the column index for the first cell in a range selection. + * Use ui.firstRowIndex to get the row index for the first cell in a range selection. + * Use ui.lastColumnIndex to get the column index for the last cell in a range selection. + * Use ui.lastRowIndex to get the row index for the last cell in a range selection. + * + * @optionValue Define event handler function. + */ + igTreeGridSelection(optionLiteral: 'option', optionName: "cellSelectionChanging", optionValue: CellSelectionChangingEvent): void; + + /** + * Event fired after cell(s) are selected. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridSelection. + * Use ui.owner.grid to get reference to the grid. + * Use ui.cell to get reference to cell object. + * Use ui.cell.element to get reference to cell DOM element. + * Use ui.cell.columnKey to get reference to column key. + * Use ui.cell.rowId to get the row id if primary key is defined or persistence is enabled. + * Use ui.cell.index to get column index. + * Use ui.cell.row to get reference to row DOM element. + * Use ui.cell.rowIndex to get row index. + * Use ui.selectedCells to get reference to selected cells object array. + */ + igTreeGridSelection(optionLiteral: 'option', optionName: "cellSelectionChanged"): CellSelectionChangedEvent; + + /** + * Event fired after cell(s) are selected. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridSelection. + * Use ui.owner.grid to get reference to the grid. + * Use ui.cell to get reference to cell object. + * Use ui.cell.element to get reference to cell DOM element. + * Use ui.cell.columnKey to get reference to column key. + * Use ui.cell.rowId to get the row id if primary key is defined or persistence is enabled. + * Use ui.cell.index to get column index. + * Use ui.cell.row to get reference to row DOM element. + * Use ui.cell.rowIndex to get row index. + * Use ui.selectedCells to get reference to selected cells object array. + * + * @optionValue Define event handler function. + */ + igTreeGridSelection(optionLiteral: 'option', optionName: "cellSelectionChanged", optionValue: CellSelectionChangedEvent): void; + + /** + * Event fired before a cell becomes active (focus style applied) (cancellable). + * Return false in order to cancel active cell changing. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridSelection. + * Use ui.owner.grid to get reference to the grid. + * Use ui.cell to get reference to cell object. + * Use ui.cell.element to get reference to cell DOM element. + * Use ui.cell.columnKey to get column key. + * Use ui.cell.rowId to get the row id if primary key is defined or persistence is enabled. + * Use ui.cell.index to get column index. + * Use ui.cell.row to get reference to row DOM element. + * Use ui.cell.rowIndex to get row index. + */ + igTreeGridSelection(optionLiteral: 'option', optionName: "activeCellChanging"): ActiveCellChangingEvent; + + /** + * Event fired before a cell becomes active (focus style applied) (cancellable). + * Return false in order to cancel active cell changing. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridSelection. + * Use ui.owner.grid to get reference to the grid. + * Use ui.cell to get reference to cell object. + * Use ui.cell.element to get reference to cell DOM element. + * Use ui.cell.columnKey to get column key. + * Use ui.cell.rowId to get the row id if primary key is defined or persistence is enabled. + * Use ui.cell.index to get column index. + * Use ui.cell.row to get reference to row DOM element. + * Use ui.cell.rowIndex to get row index. + * + * @optionValue Define event handler function. + */ + igTreeGridSelection(optionLiteral: 'option', optionName: "activeCellChanging", optionValue: ActiveCellChangingEvent): void; + + /** + * Event fired after a cell becomes active (focus style applied). + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridSelection. + * Use ui.owner.grid to get reference to the grid. + * Use ui.cell to get reference to cell object. + * Use ui.cell.element to get reference to cell DOM element. + * Use ui.cell.columnKey to get column key. + * Use ui.cell.rowId to get the row id if primary key is defined or persistence is enabled. + * Use ui.cell.index to get column index. + * Use ui.cell.row to get reference to row DOM element. + * Use ui.cell.rowIndex to get row index. + */ + igTreeGridSelection(optionLiteral: 'option', optionName: "activeCellChanged"): ActiveCellChangedEvent; + + /** + * Event fired after a cell becomes active (focus style applied). + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridSelection. + * Use ui.owner.grid to get reference to the grid. + * Use ui.cell to get reference to cell object. + * Use ui.cell.element to get reference to cell DOM element. + * Use ui.cell.columnKey to get column key. + * Use ui.cell.rowId to get the row id if primary key is defined or persistence is enabled. + * Use ui.cell.index to get column index. + * Use ui.cell.row to get reference to row DOM element. + * Use ui.cell.rowIndex to get row index. + * + * @optionValue Define event handler function. + */ + igTreeGridSelection(optionLiteral: 'option', optionName: "activeCellChanged", optionValue: ActiveCellChangedEvent): void; + + /** + * Event fired before a row becomes active (focus style applied) (cancellable). + * Return false in order to cancel active row changing. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridSelection. + * Use ui.owner.grid to get reference to the grid. + * Use ui.row to get reference to row object. + * Use ui.row.element to get reference to active row DOM element. + * Use ui.row.index to get active row index. + * Use ui.row.id to get the active row id if primary key is defined or persistence is enabled. + */ + igTreeGridSelection(optionLiteral: 'option', optionName: "activeRowChanging"): ActiveRowChangingEvent; + + /** + * Event fired before a row becomes active (focus style applied) (cancellable). + * Return false in order to cancel active row changing. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridSelection. + * Use ui.owner.grid to get reference to the grid. + * Use ui.row to get reference to row object. + * Use ui.row.element to get reference to active row DOM element. + * Use ui.row.index to get active row index. + * Use ui.row.id to get the active row id if primary key is defined or persistence is enabled. + * + * @optionValue Define event handler function. + */ + igTreeGridSelection(optionLiteral: 'option', optionName: "activeRowChanging", optionValue: ActiveRowChangingEvent): void; + + /** + * Event fired after a row becomes active (focus style applied). + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridSelection. + * Use ui.owner.grid to get reference to the grid. + * Use ui.row to get reference to row object. + * Use ui.row.element to get reference to active row DOM element. + * Use ui.row.index to get active row index. + * Use ui.row.id to get the active row id if primary key is defined or persistence is enabled. + */ + igTreeGridSelection(optionLiteral: 'option', optionName: "activeRowChanged"): ActiveRowChangedEvent; + + /** + * Event fired after a row becomes active (focus style applied). + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridSelection. + * Use ui.owner.grid to get reference to the grid. + * Use ui.row to get reference to row object. + * Use ui.row.element to get reference to active row DOM element. + * Use ui.row.index to get active row index. + * Use ui.row.id to get the active row id if primary key is defined or persistence is enabled. + * + * @optionValue Define event handler function. + */ + igTreeGridSelection(optionLiteral: 'option', optionName: "activeRowChanged", optionValue: ActiveRowChangedEvent): void; + igTreeGridSelection(options: IgTreeGridSelection): JQuery; + igTreeGridSelection(optionLiteral: 'option', optionName: string): any; + igTreeGridSelection(optionLiteral: 'option', options: IgTreeGridSelection): JQuery; + igTreeGridSelection(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igTreeGridSelection(methodName: string, ...methodParams: any[]): any; +} +interface IgTreeGridSorting { + /** + * Specifies from which data bound level to be applied sorting - 0 is the first level + * + */ + fromLevel?: number; + + /** + * Specifies to which data bound level to be applied sorting - if -1 sorting should be applied to the last data bound level + * + */ + toLevel?: number; + + /** + * Defines local or remote sorting operations. + * + * + * Valid values: + * "remote" Sorting is performed remotely as a server-side operation. + * "local" Sorting is performed locally by the [$.ig.DataSource](ig.datasource) component. + */ + type?: string; + + /** + * Enables or disables the case sensitivity of the sorting. Works only for [local](ui.iggridsorting#options:type) sorting. + * + */ + caseSensitive?: boolean; + + /** + * Enables/disables special styling for sorted columns. If false, sorted column cells will not have any special sort-related styling. + * + */ + applySortedColumnCss?: boolean; + + /** + * URL param name which specifies how sorting expressions will be encoded in the URL. Uses OData conventions. ex: ?sort(col1)=asc + * + */ + sortUrlKey?: string; + + /** + * URL param value for ascending type of sorting. Uses OData conventions. Example: ?sort(col1)=asc + * + */ + sortUrlKeyAscValue?: string; + + /** + * URL param value for descending type of sorting. Uses OData conventions. Example: ?sort(col1)=desc + * + */ + sortUrlKeyDescValue?: string; + + /** + * Defines single column sorting or multiple column sorting. + * + * + * Valid values: + * "single" Only a single column can be sorted. Previously sorted columns will not preserve their sorting upon sorting a new column. + * "multi" If enabled, previous sorted state for columns won't be cleared + */ + mode?: string; + + /** + * Custom sort function(or name of the function as a string) accepting three parameters - the data to be sorted, an array of data source field definitions, and the direction to sort with (optional). The function should return the sorted data array. + * + */ + customSortFunction?: Function; + + /** + * Specifies which direction to use on the first click / keydown, if the column is sorted for the first time. + * + * + * Valid values: + * "ascending" The first sort of the column data will be in ascending order. + * "descending" The first sort of the column data will be in descending order. + */ + firstSortDirection?: string; + + /** + * Custom sorted column tooltip in [igTemplating](http://www.igniteui.com/help/igtemplating-overview) format + */ + sortedColumnTooltip?: string; + + /** + * Specifies whether sorting to be applied immediately when click sort/unsort columns when using the multiple sorting dialog. When it is false Apply button shows and sorting is applied when the button is clicked. + * + */ + modalDialogSortOnClick?: boolean; + + /** + * Specifies sortby button text for each unsorted column in multiple sorting dialog. + * + */ + modalDialogSortByButtonText?: string; + + /** + * Specifies sortby button label for each unsorted column in multiple sorting dialog. + * + */ + modalDialogResetButtonLabel?: string; + + /** + * Specifies caption for each descending sorted column in multiple sorting dialog. + * + */ + modalDialogCaptionButtonDesc?: string; + + /** + * Specifies caption for each ascending sorted column in multiple sorting dialog. + * + */ + modalDialogCaptionButtonAsc?: string; + + /** + * Specifies caption for unsort button in multiple sorting dialog. + * + */ + modalDialogCaptionButtonUnsort?: string; + + /** + * Specifies width of multiple sorting dialog. + * + * + * Valid values: + * "string" Specifies the width in pixels as a string ("300px"). + * "number" Specifies the width in pixels as a number (300) + */ + modalDialogWidth?: string|number; + + /** + * Specifies height of multiple sorting dialog. + * + * + * Valid values: + * "string" The widget height can be set in pixels (px) and percentage (%). + * "number" The widget height can be set in pixels as a number. + */ + modalDialogHeight?: string|number; + + /** + * Specifies time of milliseconds for animation duration to show/hide modal dialog. + * + */ + modalDialogAnimationDuration?: number; + + /** + * Specifies the text of the feature chooser sorting button. + * + */ + featureChooserText?: string; + + /** + * Custom unsorted column tooltip in [igTemplating](http://www.igniteui.com/help/igtemplating-overview) format. + * + */ + unsortedColumnTooltip?: string; + + /** + * A list of custom column settings that specify custom sorting settings for a specific column (whether sorting is enabled / disabled, default sort direction, first sort direction, etc.). + * + */ + columnSettings?: IgGridSortingColumnSetting[]; + + /** + * Specifies caption text for multiple sorting dialog. + * + */ + modalDialogCaptionText?: string; + + /** + * Specifies text of button which apply changes in modal dialog. + * + */ + modalDialogButtonApplyText?: string; + + /** + * Specifies text of button which cancels the changes in the advanced sorting modal dialog. + * + */ + modalDialogButtonCancelText?: string; + + /** + * Specifies the text shown in the feature chooser item for sorting in ascending order (displayed only on touch environment). + * + */ + featureChooserSortAsc?: string; + + /** + * Specifies the text shown in the feature chooser item for sorting in descending order (displayed only on touch environment). + * + */ + featureChooserSortDesc?: string; + + /** + * Enables/disables sorting persistence when the grid is rebound. + * + */ + persist?: boolean; + + /** + * Controls containment behavior of multiple sorting dialog. + * + * owner The multi sorting dialog will be draggable only in the grid area + * window The multi sorting dialog will be draggable in the whole window area + */ + sortingDialogContainment?: string; + + /** + * Name of the dialog widget to be used. It should inherit from $.ui.igGridModalDialog. + * + */ + dialogWidget?: string; + + /** + * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. + * + */ + inherit?: boolean; + + /** + * Event fired before sorting is invoked for a certain column. + * Return false in order to cancel column sorting. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridSorting. + * Use ui.owner.grid to get reference to grid. + * Use ui.columnKey to get column key. + * Use ui.direction to get sorting direction. + * Use ui.newExpressions to get sorting expressions. + */ + columnSorting?: ColumnSortingEvent; + + /** + * Event fired after the column has already been sorted and data - re-rendered. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridSorting. + * Use ui.owner.grid to get reference to grid. + * Use ui.columnKey to get column key. + * Use ui.direction to get sorting direction. + * Use ui.expressions to get sorted expressions. + */ + columnSorted?: ColumnSortedEvent; + + /** + * Event fired before the modal dialog is opened. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridSorting widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnChooserElement to get a reference to the modal dialog element. This is a jQuery object. + */ + modalDialogOpening?: ModalDialogOpeningEvent; + + /** + * Event fired after the modal dialog is already opened. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridSorting widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + */ + modalDialogOpened?: ModalDialogOpenedEvent; + + /** + * Event fired every time the modal dialog changes its position. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridSorting widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + * Use ui.originalPosition to get the original position of the modal dialog div as { top, left } object, relative to the page. + * Use ui.position to get the current position of the modal dialog div as { top, left } object, relative to the page. + */ + modalDialogMoving?: ModalDialogMovingEvent; + + /** + * Event fired before the modal dialog is closed. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridSorting widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + */ + modalDialogClosing?: ModalDialogClosingEvent; + + /** + * Event fired after the modal dialog has been closed. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridSorting widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + */ + modalDialogClosed?: ModalDialogClosedEvent; + + /** + * Event fired before the contents of the modal dialog are rendered. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridSorting widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + */ + modalDialogContentsRendering?: ModalDialogContentsRenderingEvent; + + /** + * Event fired after the contents of the modal dialog are rendered. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridSorting widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + */ + modalDialogContentsRendered?: ModalDialogContentsRenderedEvent; + + /** + * Event fired when sorting of column is changed in modal dialog. Column should be sorted + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridSorting widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + * Use ui.columnKey to get the column key + * Use ui.isAsc to get whether column should be ascending or not. If true it should be ascending + */ + modalDialogSortingChanged?: ModalDialogSortingChangedEvent; + + /** + * Event fired when button to unsort column is clicked in modal dialog + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridSorting widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + * Use ui.columnKey to get the column key + */ + modalDialogButtonUnsortClick?: ModalDialogButtonUnsortClickEvent; + + /** + * Event fired when column(which is not sorted) is clicked to be sorted in modal dialog + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridSorting widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + * Use ui.columnKey to get the column key + */ + modalDialogSortClick?: ModalDialogSortClickEvent; + + /** + * Event fired when button Apply in modal dialog is clicked + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridSorting widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + * Use ui.columnsToSort to get array of columns which should be sorted - array of objects of sort order - Asc/Desc and columnIdentifier + */ + modalDialogButtonApplyClick?: ModalDialogButtonApplyClickEvent; + + /** + * Event fired when the button to reset sorting is clicked. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridSorting widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + */ + modalDialogButtonResetClick?: ModalDialogButtonResetClickEvent; + + /** + * Option for igTreeGridSorting + */ + [optionName: string]: any; +} +interface IgTreeGridSortingMethods { + /** + * Returns whether a column with the specified columnKey is sorted(taken from the data source sorting expressions) + * + * @param columnKey Column key (string) + */ + isColumnSorted(columnKey: string): boolean; + destroy(): void; + + /** + * Sorts the data in a grid column and updates the UI. + * + * @param index Column key (string) or index (number) - for multi-row grid only column key can be used. Specifies the column which we want to sort. If the mode is multiple, previous sorting states are not cleared. + * @param direction Specifies sorting direction (ascending or descending) + * @param header + */ + sortColumn(index: Object, direction: Object, header: Object): void; + + /** + * Sorts the data in grid columns and updates the UI.\ + */ + sortMultiple(): void; + + /** + * Removes current sorting(for all sorted columns) and updates the UI. + */ + clearSorting(): void; + + /** + * Removes sorting for the grid column with the specified columnKey/columnIndex and updates the UI. + * + * @param index Column key (string) or index (number) - for multi-row grid only column key can be used. Specifies the column for which we want to remove sorting. If the mode is multiple, previous sorting states are not cleared. + * @param header - if specified client events should be fired + */ + unsortColumn(index: Object, header: Object): void; + + /** + * Opens the multiple sorting dialog. + */ + openMultipleSortingDialog(): void; + + /** + * Closes the multiple sorting dialog. + */ + closeMultipleSortingDialog(): void; + + /** + * Renders content of multiple sorting dialog - sorted and unsorted columns. + * + * @param isToCallEvents + */ + renderMultipleSortingDialogContent(isToCallEvents: Object): void; + + /** + * Remove clear button for multiple sorting dialog + */ + removeDialogClearButton(): void; +} +interface JQuery { + data(propertyName: "igTreeGridSorting"): IgTreeGridSortingMethods; +} + +interface JQuery { + igTreeGridSorting(methodName: "isColumnSorted", columnKey: string): boolean; + igTreeGridSorting(methodName: "destroy"): void; + igTreeGridSorting(methodName: "sortColumn", index: Object, direction: Object, header: Object): void; + igTreeGridSorting(methodName: "sortMultiple"): void; + igTreeGridSorting(methodName: "clearSorting"): void; + igTreeGridSorting(methodName: "unsortColumn", index: Object, header: Object): void; + igTreeGridSorting(methodName: "openMultipleSortingDialog"): void; + igTreeGridSorting(methodName: "closeMultipleSortingDialog"): void; + igTreeGridSorting(methodName: "renderMultipleSortingDialogContent", isToCallEvents: Object): void; + igTreeGridSorting(methodName: "removeDialogClearButton"): void; + + /** + * Specifies from which data bound level to be applied sorting - 0 is the first level + * + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "fromLevel"): number; + + /** + * Specifies from which data bound level to be applied sorting - 0 is the first level + * + * + * @optionValue New value to be set. + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "fromLevel", optionValue: number): void; + + /** + * Specifies to which data bound level to be applied sorting - if -1 sorting should be applied to the last data bound level + * + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "toLevel"): number; + + /** + * Specifies to which data bound level to be applied sorting - if -1 sorting should be applied to the last data bound level + * + * + * @optionValue New value to be set. + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "toLevel", optionValue: number): void; + + /** + * Defines local or remote sorting operations. + * + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "type"): string; + + /** + * Defines local or remote sorting operations. + * + * + * @optionValue New value to be set. + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "type", optionValue: string): void; + + /** + * Enables or disables the case sensitivity of the sorting. Works only for [local](ui.iggridsorting#options:type) sorting. + * + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "caseSensitive"): boolean; + + /** + * Enables or disables the case sensitivity of the sorting. Works only for [local](ui.iggridsorting#options:type) sorting. + * + * + * @optionValue New value to be set. + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "caseSensitive", optionValue: boolean): void; + + /** + * Enables/disables special styling for sorted columns. If false, sorted column cells will not have any special sort-related styling. + * + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "applySortedColumnCss"): boolean; + + /** + * Enables/disables special styling for sorted columns. If false, sorted column cells will not have any special sort-related styling. + * + * + * @optionValue New value to be set. + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "applySortedColumnCss", optionValue: boolean): void; + + /** + * URL param name which specifies how sorting expressions will be encoded in the URL. Uses OData conventions. ex: ?sort(col1)=asc + * + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "sortUrlKey"): string; + + /** + * URL param name which specifies how sorting expressions will be encoded in the URL. Uses OData conventions. ex: ?sort(col1)=asc + * + * + * @optionValue New value to be set. + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "sortUrlKey", optionValue: string): void; + + /** + * URL param value for ascending type of sorting. Uses OData conventions. Example: ?sort(col1)=asc + * + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "sortUrlKeyAscValue"): string; + + /** + * URL param value for ascending type of sorting. Uses OData conventions. Example: ?sort(col1)=asc + * + * + * @optionValue New value to be set. + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "sortUrlKeyAscValue", optionValue: string): void; + + /** + * URL param value for descending type of sorting. Uses OData conventions. Example: ?sort(col1)=desc + * + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "sortUrlKeyDescValue"): string; + + /** + * URL param value for descending type of sorting. Uses OData conventions. Example: ?sort(col1)=desc + * + * + * @optionValue New value to be set. + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "sortUrlKeyDescValue", optionValue: string): void; + + /** + * Defines single column sorting or multiple column sorting. + * + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "mode"): string; + + /** + * Defines single column sorting or multiple column sorting. + * + * + * @optionValue New value to be set. + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "mode", optionValue: string): void; + + /** + * Custom sort function(or name of the function as a string) accepting three parameters - the data to be sorted, an array of data source field definitions, and the direction to sort with (optional). The function should return the sorted data array. + * + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "customSortFunction"): Function; + + /** + * Custom sort function(or name of the function as a string) accepting three parameters - the data to be sorted, an array of data source field definitions, and the direction to sort with (optional). The function should return the sorted data array. + * + * + * @optionValue New value to be set. + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "customSortFunction", optionValue: Function): void; + + /** + * Gets which direction to use on the first click / keydown, if the column is sorted for the first time. + * + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "firstSortDirection"): string; + + /** + * Sets which direction to use on the first click / keydown, if the column is sorted for the first time. + * + * + * @optionValue New value to be set. + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "firstSortDirection", optionValue: string): void; + + /** + * Custom sorted column tooltip in [igTemplating](http://www.igniteui.com/help/igtemplating-overview) format + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "sortedColumnTooltip"): string; + + /** + * Custom sorted column tooltip in [igTemplating](http://www.igniteui.com/help/igtemplating-overview) format + * + * @optionValue New value to be set. + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "sortedColumnTooltip", optionValue: string): void; + + /** + * Gets whether sorting to be applied immediately when click sort/unsort columns when using the multiple sorting dialog. When it is false Apply button shows and sorting is applied when the button is clicked. + * + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "modalDialogSortOnClick"): boolean; + + /** + * Sets whether sorting to be applied immediately when click sort/unsort columns when using the multiple sorting dialog. When it is false Apply button shows and sorting is applied when the button is clicked. + * + * + * @optionValue New value to be set. + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "modalDialogSortOnClick", optionValue: boolean): void; + + /** + * Gets sortby button text for each unsorted column in multiple sorting dialog. + * + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "modalDialogSortByButtonText"): string; + + /** + * Sets sortby button text for each unsorted column in multiple sorting dialog. + * + * + * @optionValue New value to be set. + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "modalDialogSortByButtonText", optionValue: string): void; + + /** + * Gets sortby button label for each unsorted column in multiple sorting dialog. + * + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "modalDialogResetButtonLabel"): string; + + /** + * Sets sortby button label for each unsorted column in multiple sorting dialog. + * + * + * @optionValue New value to be set. + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "modalDialogResetButtonLabel", optionValue: string): void; + + /** + * Gets caption for each descending sorted column in multiple sorting dialog. + * + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "modalDialogCaptionButtonDesc"): string; + + /** + * Sets caption for each descending sorted column in multiple sorting dialog. + * + * + * @optionValue New value to be set. + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "modalDialogCaptionButtonDesc", optionValue: string): void; + + /** + * Gets caption for each ascending sorted column in multiple sorting dialog. + * + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "modalDialogCaptionButtonAsc"): string; + + /** + * Sets caption for each ascending sorted column in multiple sorting dialog. + * + * + * @optionValue New value to be set. + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "modalDialogCaptionButtonAsc", optionValue: string): void; + + /** + * Gets caption for unsort button in multiple sorting dialog. + * + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "modalDialogCaptionButtonUnsort"): string; + + /** + * Sets caption for unsort button in multiple sorting dialog. + * + * + * @optionValue New value to be set. + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "modalDialogCaptionButtonUnsort", optionValue: string): void; + + /** + * Gets width of multiple sorting dialog. + * + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "modalDialogWidth"): string|number; + + /** + * Sets width of multiple sorting dialog. + * + * + * @optionValue New value to be set. + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "modalDialogWidth", optionValue: string|number): void; + + /** + * Gets height of multiple sorting dialog. + * + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "modalDialogHeight"): string|number; + + /** + * Sets height of multiple sorting dialog. + * + * + * @optionValue New value to be set. + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "modalDialogHeight", optionValue: string|number): void; + + /** + * Gets time of milliseconds for animation duration to show/hide modal dialog. + * + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "modalDialogAnimationDuration"): number; + + /** + * Sets time of milliseconds for animation duration to show/hide modal dialog. + * + * + * @optionValue New value to be set. + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "modalDialogAnimationDuration", optionValue: number): void; + + /** + * Gets the text of the feature chooser sorting button. + * + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "featureChooserText"): string; + + /** + * Sets the text of the feature chooser sorting button. + * + * + * @optionValue New value to be set. + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "featureChooserText", optionValue: string): void; + + /** + * Custom unsorted column tooltip in [igTemplating](http://www.igniteui.com/help/igtemplating-overview) format. + * + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "unsortedColumnTooltip"): string; + + /** + * Custom unsorted column tooltip in [igTemplating](http://www.igniteui.com/help/igtemplating-overview) format. + * + * + * @optionValue New value to be set. + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "unsortedColumnTooltip", optionValue: string): void; + + /** + * A list of custom column settings that specify custom sorting settings for a specific column (whether sorting is enabled / disabled, default sort direction, first sort direction, etc.). + * + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "columnSettings"): IgGridSortingColumnSetting[]; + + /** + * A list of custom column settings that specify custom sorting settings for a specific column (whether sorting is enabled / disabled, default sort direction, first sort direction, etc.). + * + * + * @optionValue New value to be set. + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "columnSettings", optionValue: IgGridSortingColumnSetting[]): void; + + /** + * Gets caption text for multiple sorting dialog. + * + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "modalDialogCaptionText"): string; + + /** + * Sets caption text for multiple sorting dialog. + * + * + * @optionValue New value to be set. + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "modalDialogCaptionText", optionValue: string): void; + + /** + * Gets text of button which apply changes in modal dialog. + * + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "modalDialogButtonApplyText"): string; + + /** + * Sets text of button which apply changes in modal dialog. + * + * + * @optionValue New value to be set. + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "modalDialogButtonApplyText", optionValue: string): void; + + /** + * Gets text of button which cancels the changes in the advanced sorting modal dialog. + * + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "modalDialogButtonCancelText"): string; + + /** + * Sets text of button which cancels the changes in the advanced sorting modal dialog. + * + * + * @optionValue New value to be set. + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "modalDialogButtonCancelText", optionValue: string): void; + + /** + * Gets the text shown in the feature chooser item for sorting in ascending order (displayed only on touch environment). + * + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "featureChooserSortAsc"): string; + + /** + * Sets the text shown in the feature chooser item for sorting in ascending order (displayed only on touch environment). + * + * + * @optionValue New value to be set. + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "featureChooserSortAsc", optionValue: string): void; + + /** + * Gets the text shown in the feature chooser item for sorting in descending order (displayed only on touch environment). + * + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "featureChooserSortDesc"): string; + + /** + * Sets the text shown in the feature chooser item for sorting in descending order (displayed only on touch environment). + * + * + * @optionValue New value to be set. + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "featureChooserSortDesc", optionValue: string): void; + + /** + * Enables/disables sorting persistence when the grid is rebound. + * + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "persist"): boolean; + + /** + * Enables/disables sorting persistence when the grid is rebound. + * + * + * @optionValue New value to be set. + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "persist", optionValue: boolean): void; + + /** + * Controls containment behavior of multiple sorting dialog. + * + * owner The multi sorting dialog will be draggable only in the grid area + * window The multi sorting dialog will be draggable in the whole window area + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "sortingDialogContainment"): string; + + /** + * Controls containment behavior of multiple sorting dialog. + * + * owner The multi sorting dialog will be draggable only in the grid area + * window The multi sorting dialog will be draggable in the whole window area + * + * @optionValue New value to be set. + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "sortingDialogContainment", optionValue: string): void; + + /** + * Name of the dialog widget to be used. It should inherit from $.ui.igGridModalDialog. + * + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "dialogWidget"): string; + + /** + * Name of the dialog widget to be used. It should inherit from $.ui.igGridModalDialog. + * + * + * @optionValue New value to be set. + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "dialogWidget", optionValue: string): void; + + /** + * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. + * + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "inherit"): boolean; + + /** + * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. + * + * + * @optionValue New value to be set. + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "inherit", optionValue: boolean): void; + + /** + * Event fired before sorting is invoked for a certain column. + * Return false in order to cancel column sorting. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridSorting. + * Use ui.owner.grid to get reference to grid. + * Use ui.columnKey to get column key. + * Use ui.direction to get sorting direction. + * Use ui.newExpressions to get sorting expressions. + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "columnSorting"): ColumnSortingEvent; + + /** + * Event fired before sorting is invoked for a certain column. + * Return false in order to cancel column sorting. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridSorting. + * Use ui.owner.grid to get reference to grid. + * Use ui.columnKey to get column key. + * Use ui.direction to get sorting direction. + * Use ui.newExpressions to get sorting expressions. + * + * @optionValue Define event handler function. + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "columnSorting", optionValue: ColumnSortingEvent): void; + + /** + * Event fired after the column has already been sorted and data - re-rendered. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridSorting. + * Use ui.owner.grid to get reference to grid. + * Use ui.columnKey to get column key. + * Use ui.direction to get sorting direction. + * Use ui.expressions to get sorted expressions. + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "columnSorted"): ColumnSortedEvent; + + /** + * Event fired after the column has already been sorted and data - re-rendered. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to GridSorting. + * Use ui.owner.grid to get reference to grid. + * Use ui.columnKey to get column key. + * Use ui.direction to get sorting direction. + * Use ui.expressions to get sorted expressions. + * + * @optionValue Define event handler function. + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "columnSorted", optionValue: ColumnSortedEvent): void; + + /** + * Event fired before the modal dialog is opened. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridSorting widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnChooserElement to get a reference to the modal dialog element. This is a jQuery object. + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "modalDialogOpening"): ModalDialogOpeningEvent; + + /** + * Event fired before the modal dialog is opened. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridSorting widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.columnChooserElement to get a reference to the modal dialog element. This is a jQuery object. + * + * @optionValue Define event handler function. + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "modalDialogOpening", optionValue: ModalDialogOpeningEvent): void; + + /** + * Event fired after the modal dialog is already opened. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridSorting widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "modalDialogOpened"): ModalDialogOpenedEvent; + + /** + * Event fired after the modal dialog is already opened. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridSorting widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + * + * @optionValue Define event handler function. + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "modalDialogOpened", optionValue: ModalDialogOpenedEvent): void; + + /** + * Event fired every time the modal dialog changes its position. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridSorting widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + * Use ui.originalPosition to get the original position of the modal dialog div as { top, left } object, relative to the page. + * Use ui.position to get the current position of the modal dialog div as { top, left } object, relative to the page. + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "modalDialogMoving"): ModalDialogMovingEvent; + + /** + * Event fired every time the modal dialog changes its position. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridSorting widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + * Use ui.originalPosition to get the original position of the modal dialog div as { top, left } object, relative to the page. + * Use ui.position to get the current position of the modal dialog div as { top, left } object, relative to the page. + * + * @optionValue Define event handler function. + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "modalDialogMoving", optionValue: ModalDialogMovingEvent): void; + + /** + * Event fired before the modal dialog is closed. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridSorting widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "modalDialogClosing"): ModalDialogClosingEvent; + + /** + * Event fired before the modal dialog is closed. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridSorting widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + * + * @optionValue Define event handler function. + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "modalDialogClosing", optionValue: ModalDialogClosingEvent): void; + + /** + * Event fired after the modal dialog has been closed. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridSorting widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "modalDialogClosed"): ModalDialogClosedEvent; + + /** + * Event fired after the modal dialog has been closed. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridSorting widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + * + * @optionValue Define event handler function. + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "modalDialogClosed", optionValue: ModalDialogClosedEvent): void; + + /** + * Event fired before the contents of the modal dialog are rendered. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridSorting widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "modalDialogContentsRendering"): ModalDialogContentsRenderingEvent; + + /** + * Event fired before the contents of the modal dialog are rendered. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridSorting widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + * + * @optionValue Define event handler function. + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "modalDialogContentsRendering", optionValue: ModalDialogContentsRenderingEvent): void; + + /** + * Event fired after the contents of the modal dialog are rendered. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridSorting widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "modalDialogContentsRendered"): ModalDialogContentsRenderedEvent; + + /** + * Event fired after the contents of the modal dialog are rendered. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridSorting widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + * + * @optionValue Define event handler function. + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "modalDialogContentsRendered", optionValue: ModalDialogContentsRenderedEvent): void; + + /** + * Event fired when sorting of column is changed in modal dialog. Column should be sorted + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridSorting widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + * Use ui.columnKey to get the column key + * Use ui.isAsc to get whether column should be ascending or not. If true it should be ascending + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "modalDialogSortingChanged"): ModalDialogSortingChangedEvent; + + /** + * Event fired when sorting of column is changed in modal dialog. Column should be sorted + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridSorting widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + * Use ui.columnKey to get the column key + * Use ui.isAsc to get whether column should be ascending or not. If true it should be ascending + * + * @optionValue Define event handler function. + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "modalDialogSortingChanged", optionValue: ModalDialogSortingChangedEvent): void; + + /** + * Event fired when button to unsort column is clicked in modal dialog + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridSorting widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + * Use ui.columnKey to get the column key + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "modalDialogButtonUnsortClick"): ModalDialogButtonUnsortClickEvent; + + /** + * Event fired when button to unsort column is clicked in modal dialog + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridSorting widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + * Use ui.columnKey to get the column key + * + * @optionValue Define event handler function. + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "modalDialogButtonUnsortClick", optionValue: ModalDialogButtonUnsortClickEvent): void; + + /** + * Event fired when column(which is not sorted) is clicked to be sorted in modal dialog + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridSorting widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + * Use ui.columnKey to get the column key + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "modalDialogSortClick"): ModalDialogSortClickEvent; + + /** + * Event fired when column(which is not sorted) is clicked to be sorted in modal dialog + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridSorting widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + * Use ui.columnKey to get the column key + * + * @optionValue Define event handler function. + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "modalDialogSortClick", optionValue: ModalDialogSortClickEvent): void; + + /** + * Event fired when button Apply in modal dialog is clicked + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridSorting widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + * Use ui.columnsToSort to get array of columns which should be sorted - array of objects of sort order - Asc/Desc and columnIdentifier + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "modalDialogButtonApplyClick"): ModalDialogButtonApplyClickEvent; + + /** + * Event fired when button Apply in modal dialog is clicked + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridSorting widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + * Use ui.columnsToSort to get array of columns which should be sorted - array of objects of sort order - Asc/Desc and columnIdentifier + * + * @optionValue Define event handler function. + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "modalDialogButtonApplyClick", optionValue: ModalDialogButtonApplyClickEvent): void; + + /** + * Event fired when the button to reset sorting is clicked. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridSorting widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "modalDialogButtonResetClick"): ModalDialogButtonResetClickEvent; + + /** + * Event fired when the button to reset sorting is clicked. + * The handler function takes arguments evt and ui. + * Use ui.owner to get the reference to the GridSorting widget. + * Use ui.owner.grid to get the reference to the grid widget. + * Use ui.modalDialogElement to get a reference to the modal dialog element. This is a jQuery object. + * + * @optionValue Define event handler function. + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "modalDialogButtonResetClick", optionValue: ModalDialogButtonResetClickEvent): void; + igTreeGridSorting(options: IgTreeGridSorting): JQuery; + igTreeGridSorting(optionLiteral: 'option', optionName: string): any; + igTreeGridSorting(optionLiteral: 'option', options: IgTreeGridSorting): JQuery; + igTreeGridSorting(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igTreeGridSorting(methodName: string, ...methodParams: any[]): any; +} +interface IgTreeGridTooltips { + /** + * determines the tooltip visibility option + * + * + * Valid values: + * "always" tooltips always show for hovered elements + * "never" tooltips do not show automatically + * "overflow" tooltips show only when the underlying data overflows its container + */ + visibility?: string; + + /** + * controls the tooltip's style + * + * + * Valid values: + * "tooltip" The tooltip will be positioned according to the mouse cursor. Will render the tooltip content as plain text. + * "popover" The tooltip will be positioned according to the target element with an arrow pointing the element. This style is more suitable for touch-supported environments. Will render the tooltip content as HTML. + */ + style?: string; + + /** + * The time in milliseconds after which tooltip will show when + * mouse cursor is hovered over a cell. + * + */ + showDelay?: number; + + /** + * Type="integer" The time in milliseconds after which tooltip hides when mouse + * cursor gets outside of the cell. + * + */ + hideDelay?: number; + + /** + * A list of custom column settings that specify custom tooltip settings for a specific column (whether tooltips are enabled / disabled) + * + */ + columnSettings?: IgGridTooltipsColumnSettings; + + /** + * Sets the time tooltip fades in and out when showing/hiding + * + */ + fadeTimespan?: number; + + /** + * Sets the left position of the tooltip relative to the mouse cursor + * + */ + cursorLeftOffset?: number; + + /** + * Sets the top position of the tooltip relative to the mouse cursor + * + */ + cursorTopOffset?: number; + + /** + * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. + */ + inherit?: boolean; + + /** + * Event fired when the mouse has hovered on an element long enough to display a tooltip + * use args.owner to get a reference to the widget + * use args.tooltip to get or set the string to be displayed + * use args.value to get the value of the cell the tooltip is displayed for + * use args.element to get a reference to the cell the tooltip is displayed for + * use args.index to get the row index of the cell the tooltip is displayed for + * use args.columnKey to get the column key of the cell the tooltip is displayed for + * use args.columnIndex to get the column index of the cell the tooltip is displayed for + */ + tooltipShowing?: TooltipShowingEvent; + + /** + * Event fired after a tooltip is shown + * use args.owner to get a reference to the widget + * use args.tooltip to get the string displayed in the tooltip + * use args.value to get the value of the cell the tooltip is displayed for + * use args.element to get a reference to the cell the tooltip is displayed for + * use args.index to get the row index of the cell the tooltip is displayed for + * use args.columnKey to get the column key of the cell the tooltip is displayed for + * use args.columnIndex to get the column index of the cell the tooltip is displayed for + */ + tooltipShown?: TooltipShownEvent; + + /** + * Event fired when the mouse has left an element and the tooltip is about to hide + * use args.owner to get a reference to the widget + * use args.tooltip to get the string displayed in the tooltip + * use args.value to get the value of the cell the tooltip is displayed for + * use args.element to get a reference to the cell the tooltip is displayed for + * use args.index to get the row index of the cell the tooltip is displayed for + * use args.columnKey to get the column key of the cell the tooltip is displayed for + * use args.columnIndex to get the column index of the cell the tooltip is displayed for + */ + tooltipHiding?: TooltipHidingEvent; + + /** + * Event fired after a tooltip is hidden + * use args.owner to get a reference to the widget + * use args.tooltip to get the string displayed in the tooltip + * use args.value to get the value of the cell the tooltip was displayed for + * use args.element to get a reference to the cell the tooltip was displayed for + * use args.index to get the row index of the cell the tooltip was displayed for + * use args.columnKey to get the column key of the cell the tooltip was displayed for + * use args.columnIndex to get the column index of the cell the tooltip was displayed for + */ + tooltipHidden?: TooltipHiddenEvent; + + /** + * Option for igTreeGridTooltips + */ + [optionName: string]: any; +} +interface IgTreeGridTooltipsMethods { + destroy(): void; + + /** + * Returns the ID of the parent div element bounding the ruler and the tooltip container + */ + id(): string; +} +interface JQuery { + data(propertyName: "igTreeGridTooltips"): IgTreeGridTooltipsMethods; +} + +interface JQuery { + igTreeGridTooltips(methodName: "destroy"): void; + igTreeGridTooltips(methodName: "id"): string; + + /** + * Determines the tooltip visibility option + * + */ + igTreeGridTooltips(optionLiteral: 'option', optionName: "visibility"): string; + + /** + * Determines the tooltip visibility option + * + * + * @optionValue New value to be set. + */ + igTreeGridTooltips(optionLiteral: 'option', optionName: "visibility", optionValue: string): void; + + /** + * Controls the tooltip's style + * + */ + igTreeGridTooltips(optionLiteral: 'option', optionName: "style"): string; + + /** + * Controls the tooltip's style + * + * + * @optionValue New value to be set. + */ + igTreeGridTooltips(optionLiteral: 'option', optionName: "style", optionValue: string): void; + + /** + * The time in milliseconds after which tooltip will show when + * mouse cursor is hovered over a cell. + * + */ + igTreeGridTooltips(optionLiteral: 'option', optionName: "showDelay"): number; + + /** + * The time in milliseconds after which tooltip will show when + * mouse cursor is hovered over a cell. + * + * + * @optionValue New value to be set. + */ + igTreeGridTooltips(optionLiteral: 'option', optionName: "showDelay", optionValue: number): void; + + /** + * Type="integer" The time in milliseconds after which tooltip hides when mouse + * cursor gets outside of the cell. + * + */ + igTreeGridTooltips(optionLiteral: 'option', optionName: "hideDelay"): number; + + /** + * Type="integer" The time in milliseconds after which tooltip hides when mouse + * cursor gets outside of the cell. + * + * + * @optionValue New value to be set. + */ + igTreeGridTooltips(optionLiteral: 'option', optionName: "hideDelay", optionValue: number): void; + + /** + * A list of custom column settings that specify custom tooltip settings for a specific column (whether tooltips are enabled / disabled) + * + */ + igTreeGridTooltips(optionLiteral: 'option', optionName: "columnSettings"): IgGridTooltipsColumnSettings; + + /** + * A list of custom column settings that specify custom tooltip settings for a specific column (whether tooltips are enabled / disabled) + * + * + * @optionValue New value to be set. + */ + igTreeGridTooltips(optionLiteral: 'option', optionName: "columnSettings", optionValue: IgGridTooltipsColumnSettings): void; + + /** + * The time tooltip fades in and out when showing/hiding + * + */ + igTreeGridTooltips(optionLiteral: 'option', optionName: "fadeTimespan"): number; + + /** + * Sets the time tooltip fades in and out when showing/hiding + * + * + * @optionValue New value to be set. + */ + igTreeGridTooltips(optionLiteral: 'option', optionName: "fadeTimespan", optionValue: number): void; + + /** + * The left position of the tooltip relative to the mouse cursor + * + */ + igTreeGridTooltips(optionLiteral: 'option', optionName: "cursorLeftOffset"): number; + + /** + * Sets the left position of the tooltip relative to the mouse cursor + * + * + * @optionValue New value to be set. + */ + igTreeGridTooltips(optionLiteral: 'option', optionName: "cursorLeftOffset", optionValue: number): void; + + /** + * The top position of the tooltip relative to the mouse cursor + * + */ + igTreeGridTooltips(optionLiteral: 'option', optionName: "cursorTopOffset"): number; + + /** + * Sets the top position of the tooltip relative to the mouse cursor + * + * + * @optionValue New value to be set. + */ + igTreeGridTooltips(optionLiteral: 'option', optionName: "cursorTopOffset", optionValue: number): void; + + /** + * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. + */ + igTreeGridTooltips(optionLiteral: 'option', optionName: "inherit"): boolean; + + /** + * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. + * + * @optionValue New value to be set. + */ + igTreeGridTooltips(optionLiteral: 'option', optionName: "inherit", optionValue: boolean): void; + + /** + * Event fired when the mouse has hovered on an element long enough to display a tooltip + * use args.owner to get a reference to the widget + * use args.tooltip to get or set the string to be displayed + * use args.value to get the value of the cell the tooltip is displayed for + * use args.element to get a reference to the cell the tooltip is displayed for + * use args.index to get the row index of the cell the tooltip is displayed for + * use args.columnKey to get the column key of the cell the tooltip is displayed for + * use args.columnIndex to get the column index of the cell the tooltip is displayed for + */ + igTreeGridTooltips(optionLiteral: 'option', optionName: "tooltipShowing"): TooltipShowingEvent; + + /** + * Event fired when the mouse has hovered on an element long enough to display a tooltip + * use args.owner to get a reference to the widget + * use args.tooltip to get or set the string to be displayed + * use args.value to get the value of the cell the tooltip is displayed for + * use args.element to get a reference to the cell the tooltip is displayed for + * use args.index to get the row index of the cell the tooltip is displayed for + * use args.columnKey to get the column key of the cell the tooltip is displayed for + * use args.columnIndex to get the column index of the cell the tooltip is displayed for + * + * @optionValue Define event handler function. + */ + igTreeGridTooltips(optionLiteral: 'option', optionName: "tooltipShowing", optionValue: TooltipShowingEvent): void; + + /** + * Event fired after a tooltip is shown + * use args.owner to get a reference to the widget + * use args.tooltip to get the string displayed in the tooltip + * use args.value to get the value of the cell the tooltip is displayed for + * use args.element to get a reference to the cell the tooltip is displayed for + * use args.index to get the row index of the cell the tooltip is displayed for + * use args.columnKey to get the column key of the cell the tooltip is displayed for + * use args.columnIndex to get the column index of the cell the tooltip is displayed for + */ + igTreeGridTooltips(optionLiteral: 'option', optionName: "tooltipShown"): TooltipShownEvent; + + /** + * Event fired after a tooltip is shown + * use args.owner to get a reference to the widget + * use args.tooltip to get the string displayed in the tooltip + * use args.value to get the value of the cell the tooltip is displayed for + * use args.element to get a reference to the cell the tooltip is displayed for + * use args.index to get the row index of the cell the tooltip is displayed for + * use args.columnKey to get the column key of the cell the tooltip is displayed for + * use args.columnIndex to get the column index of the cell the tooltip is displayed for + * + * @optionValue Define event handler function. + */ + igTreeGridTooltips(optionLiteral: 'option', optionName: "tooltipShown", optionValue: TooltipShownEvent): void; + + /** + * Event fired when the mouse has left an element and the tooltip is about to hide + * use args.owner to get a reference to the widget + * use args.tooltip to get the string displayed in the tooltip + * use args.value to get the value of the cell the tooltip is displayed for + * use args.element to get a reference to the cell the tooltip is displayed for + * use args.index to get the row index of the cell the tooltip is displayed for + * use args.columnKey to get the column key of the cell the tooltip is displayed for + * use args.columnIndex to get the column index of the cell the tooltip is displayed for + */ + igTreeGridTooltips(optionLiteral: 'option', optionName: "tooltipHiding"): TooltipHidingEvent; + + /** + * Event fired when the mouse has left an element and the tooltip is about to hide + * use args.owner to get a reference to the widget + * use args.tooltip to get the string displayed in the tooltip + * use args.value to get the value of the cell the tooltip is displayed for + * use args.element to get a reference to the cell the tooltip is displayed for + * use args.index to get the row index of the cell the tooltip is displayed for + * use args.columnKey to get the column key of the cell the tooltip is displayed for + * use args.columnIndex to get the column index of the cell the tooltip is displayed for + * + * @optionValue Define event handler function. + */ + igTreeGridTooltips(optionLiteral: 'option', optionName: "tooltipHiding", optionValue: TooltipHidingEvent): void; + + /** + * Event fired after a tooltip is hidden + * use args.owner to get a reference to the widget + * use args.tooltip to get the string displayed in the tooltip + * use args.value to get the value of the cell the tooltip was displayed for + * use args.element to get a reference to the cell the tooltip was displayed for + * use args.index to get the row index of the cell the tooltip was displayed for + * use args.columnKey to get the column key of the cell the tooltip was displayed for + * use args.columnIndex to get the column index of the cell the tooltip was displayed for + */ + igTreeGridTooltips(optionLiteral: 'option', optionName: "tooltipHidden"): TooltipHiddenEvent; + + /** + * Event fired after a tooltip is hidden + * use args.owner to get a reference to the widget + * use args.tooltip to get the string displayed in the tooltip + * use args.value to get the value of the cell the tooltip was displayed for + * use args.element to get a reference to the cell the tooltip was displayed for + * use args.index to get the row index of the cell the tooltip was displayed for + * use args.columnKey to get the column key of the cell the tooltip was displayed for + * use args.columnIndex to get the column index of the cell the tooltip was displayed for + * + * @optionValue Define event handler function. + */ + igTreeGridTooltips(optionLiteral: 'option', optionName: "tooltipHidden", optionValue: TooltipHiddenEvent): void; + igTreeGridTooltips(options: IgTreeGridTooltips): JQuery; + igTreeGridTooltips(optionLiteral: 'option', optionName: string): any; + igTreeGridTooltips(optionLiteral: 'option', options: IgTreeGridTooltips): JQuery; + igTreeGridTooltips(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igTreeGridTooltips(methodName: string, ...methodParams: any[]): any; +} +interface IgTreeGridUpdating { + /** + * Specifies whether to enable or disable adding children to rows. + * + */ + enableAddChild?: boolean; + + /** + * Specifies the add child tooltip text. + * + */ + addChildTooltip?: string; + + /** + * Specifies the label of the add child button in touch environment. + * + */ + addChildButtonLabel?: string; + + /** + * A list of custom column options that specify editing and validation settings for a specific column. + * + */ + columnSettings?: IgGridUpdatingColumnSetting[]; + + /** + * Specifies the edit mode. + * + * + * Valid values: + * "row" Editors are shown for all columns that are not read-only. The editor of the clicked cell receives initial focus. Done and Cancel buttons may be displayed based on the [showDoneCancelButtons](ui.iggridupdating#options:showDoneCancelButtons) property. + * "cell" An editor is shown for the cell entering edit mode. The Done and Cancel buttons are not supported for this mode. + * "dialog" A popup dialog is used with seperate settings available through the [rowEditDialogOptions](ui.iggridupdating#options:rowEditDialogOptions) property. + * "none" Editing through the UI is disabled. + */ + editMode?: string; + + /** + * Specifies if deleting rows through the UI is enabled. + * + */ + enableDeleteRow?: boolean; + + /** + * Specifies if adding rows through the UI is enabled. When enabled an additional row is rendered at the bottom of the grid's header that works as a button. When the end-user clicks on it edit mode is initiated either through a dialog (when [editMode](ui.iggridupdating#options:editMode) is 'dialog') or mimicking the look and feel of 'row' [editMode](ui.iggridupdating#options:editMode) (when [editMode](ui.iggridupdating#options:editMode) is 'row' or 'cell'). + * + */ + enableAddRow?: boolean; + + /** + * Specifies if the value of each editable column in the grid should be validated. The validation is done based on the rules of their corresponding editors. + * + */ + validation?: boolean; + + /** + * Specifies the label for the Done editing button (only applicable when the [showDoneCancelButtons](ui.iggridupdating#options:showDoneCancelButtons) option is enabled). If not set, $.ig.GridUpdating.locale.doneLabel is used. + * + */ + doneLabel?: string; + + /** + * Specifies the title for the Done editing button (only applicable when the [showDoneCancelButtons](ui.iggridupdating#options:showDoneCancelButtons) option is enabled). If not set, $.ig.GridUpdating.locale.doneTooltip is used. + * + */ + doneTooltip?: string; + + /** + * Specifies the label for the Cancel editing button (only applicable when the [showDoneCancelButtons](ui.iggridupdating#options:showDoneCancelButtons) option is enabled). If not set, $.ig.GridUpdating.locale.cancelLabel is used. + * + */ + cancelLabel?: string; + + /** + * Specifies the title for the Cancel editing button (only applicable when the [showDoneCancelButtons](ui.iggridupdating#options:showDoneCancelButtons) option is enabled). If not set, $.ig.GridUpdating.locale.cancelTooltip is used. + * + */ + cancelTooltip?: string; + + /** + * Specifies the label for the button starting edit mode for row adding. If not set, $.ig.GridUpdating.locale.addRowLabel is used. + * + */ + addRowLabel?: string; + + /** + * Specifies the title for the button starting edit mode for row adding. If not set, $.ig.GridUpdating.locale.addRowTooltip is used. + * + */ + addRowTooltip?: string; + + /** + * Specifies the label for the delete button. If not set, $.ig.GridUpdating.locale.deleteRowLabel is used. + * + */ + deleteRowLabel?: string; + + /** + * Specifies the title for the delete button. If not set, $.ig.GridUpdating.locale.deleteRowTooltip is used. + * + */ + deleteRowTooltip?: string; + + /** + * Determines if the Done and Cancel buttons will be available as means to end edit mode for [editMode](ui.iggridupdating#options:editMode) 'row' and when adding a new row. + * + */ + showDoneCancelButtons?: boolean; + + /** + * Specifies if an exception should be thrown when the grid's data view changes while there are pending transactions in the data source. The data view changes when the data source performs a sorting, filtering, groupby or paging operation and the exception thrown will prevent the operation from succeeding. All pending transactions must be committed before a data view operation is able to complete. Committing transactions can be done manually through the grid's [commit](ui.iggrid#methods:commit) function or automatically by setting [autoCommit](ui.iggrid#options:autoCommit) to 'true'. + * + */ + enableDataDirtyException?: boolean; + + /** + * Specifies how end-users are able to start edit mode. Possible values: "click", "dblclick", "F2", "enter" and their combinations separated by comma or in array. The keyboard triggers have effect only if the grid cells can receive focus (the grid's [tabIndex](ui.iggrid#options:tabIndex) property should not have a negative value) or Selection is enabled. If "dblclick" is included, then "click" has no effect. + * + */ + startEditTriggers?: string|Array; + + /** + * Determines if pressing Enter to navigate away from the currently edited cell should move the focus horizontally or vertically (default). + * + */ + horizontalMoveOnEnter?: boolean; + + /** + * Enables excel navigation style. When turned on, the arrow keys can be used for changing the currently edited cell similar to how Tab and Enter behave. When disabled, the arrow keys control the cursor inside editors. + * + */ + excelNavigationMode?: boolean; + + /** + * Sets a custom function to be called when the AJAX request to the URL specified by the [updateUrl](ui.iggrid#options:updateUrl) property succeeds. The function will be called with arguments representing the data returned by the server. + * + */ + saveChangesSuccessHandler?: Function|string; + + /** + * Sets a custom function to be called when the AJAX request to the URL specified by the [updateUrl](ui.iggrid#options:updateUrl) property fails. The function will be called with arguments representing the data returned by the server. + * + */ + saveChangesErrorHandler?: Function|string; + + /** + * On touch-enabled devices specifies the swipe distance for the delete button to appear. + * + */ + swipeDistance?: string|number; + + /** + * Controls if navigation will wrap around the grid. The feature will never wrap around virtual grids. + * + */ + wrapAround?: boolean; + + /** + * A list of options controlling the rendering behavior of the row edit dialog. If [editMode](ui.iggridupdating#options:editMode) is not 'dialog' these have no effect. + * + */ + rowEditDialogOptions?: IgGridUpdatingRowEditDialogOptions; + + /** + * Name of the dialog widget to be used. It should inherit from $.ui.igGridModalDialog. For more information on how to utilize this property, please refer to the [Extending igGrid Modal Dialog](http://www.igniteui.com/help/extending-iggrid-modal-dialog) topic. + * + */ + dialogWidget?: string; + + /** + * Enables/disables feature inheritance for the child layouts in igHierarchicalGrid. + */ + inherit?: boolean; + + /** + * Event fired before row editing begins. + * Return false in order to cancel editing. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.rowID to get the row's PK value. + * Use ui.rowAdding to check if the edit mode is for adding a new row. + */ + editRowStarting?: EditRowStartingEvent; + + /** + * Event fired after row editing begins. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.rowID to get the row's PK value. + * Use ui.rowAdding to check if the edit mode is for adding a new row. + */ + editRowStarted?: EditRowStartedEvent; + + /** + * Event fired before row editing ends. + * Return false in order to prevent the grid from exiting edit mode. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.rowID to get the row's PK value. + * Use ui.update to check if any of the values is changed which will cause update in the data source. Can be manually set to false to prevent this update. + * Use ui.rowAdding to check if the edit mode is for adding a new row. + * Use ui.values[key] to get or set the new value for the column with the specified key. + * Use ui.oldValues[key] to get the old value for the column with the specified key. + */ + editRowEnding?: EditRowEndingEvent; + + /** + * Event fired after row editing ends. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.rowID to get the row's PK value. + * Use ui.update to check if any of the values is changed which will cause update in the data source. + * Use ui.rowAdding to check if the edit mode is for adding a new row. + * Use ui.values[key] to get the new value for the column with the specified key. + * Use ui.oldValues[key] to get the old value for the column with the specified key. + */ + editRowEnded?: EditRowEndedEvent; + + /** + * Event fired before cell editing begins (including when row editing opens editing for a cell). + * Return false in order to cancel editing. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.rowID to get the row's PK value. + * Use ui.columnIndex to get the index of the column. + * Use ui.columnKey to get the key of the column. + * Use ui.editor to get a reference to the editor used for editing the column. + * Use ui.value to get or set the value of the editor. + * Use ui.rowAdding to check if the edit mode is for adding a new row. + */ + editCellStarting?: EditCellStartingEvent; + + /** + * Event fired after cell editing begins (including when row editing opens editing for a cell). + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.rowID to get the row's PK value. + * Use ui.columnIndex to get the index of the column. + * Use ui.columnKey to get the key of the column. + * Use ui.editor to get a reference to the editor used for editing the column. + * Use ui.value to get the value of the editor. + * Use ui.rowAdding to check if the edit mode is for adding a new row. + */ + editCellStarted?: EditCellStartedEvent; + + /** + * Event fired before cell editing ends (including when row editing closes editing for a cell). + * Return false in order to prevent the grid from exiting edit mode (only functions if [editMode](ui.iggridupdating#options:editMode) is 'cell'). + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.rowID to get the row's PK value. + * Use ui.columnIndex to get the index of the column. + * Use ui.columnKey to get the key of the column. + * Use ui.editor to get a reference to the editor used for editing the column. + * Use ui.value to get or set the value to be used when updating the data source. + * Use ui.oldValue to get the old value. + * Use ui.update to check if the value is changed which will cause update in the data source. Can be manually set to false to prevent this update. + * Use ui.rowAdding to check if the edit mode is for adding a new row. + */ + editCellEnding?: EditCellEndingEvent; + + /** + * Event fired after cell editing ends (including when row editing closes editing for a cell). + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.rowID to get the row's PK value. + * Use ui.columnIndex to get the index of the column. + * Use ui.columnKey to get the key of the column. + * Use ui.editor to get a reference to the editor used for editing the column. + * Use ui.value to get the new value. + * Use ui.oldValue to get the old value. + * Use ui.update to check if the value is changed which will cause update in the data source. + * Use ui.rowAdding to check if the edit mode is for adding a new row. + */ + editCellEnded?: EditCellEndedEvent; + + /** + * Event fired before adding a new row. + * Return false in order to cancel the adding of the new row to the data source. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.values[key] to get the value for the column with the specified key. + * Use ui.oldValues[key] to get the default value (before editing) for the column with the specified key. + */ + rowAdding?: RowAddingEvent; + + /** + * Event fired after adding a new row. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.values[key] to get the value for the column with the specified key. + * Use ui.oldValues[key] to get the default value (before editing) for the column with the specified key. + */ + rowAdded?: RowAddedEvent; + + /** + * Event fired before deleting a row. + * Return false in order to cancel the row's deletion. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.element to get a jQuery object containing the TR element of the row to delete. + * Use ui.rowID to get the row's PK value. + */ + rowDeleting?: RowDeletingEvent; + + /** + * Event fired after a row is deleted. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.element to get a jQuery object containing the TR element of the deleted row. + * Use ui.rowID to get the row's PK value. + */ + rowDeleted?: RowDeletedEvent; + + /** + * Event fired before the dataDirtyException is thrown. This can be controlled by the [enableDataDirtyException](ui.iggridupdating#options:enableDataDirtyException) property. Any pending changes may be committed in the handler of this event in order to prevent dataDirtyException from being thrown. + * Return false in order to prevent the exception. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + */ + dataDirty?: DataDirtyEvent; + + /** + * Event fired before editing starts for adding a new row, when Updating generates an automatic primary key for it. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.value to get the auto-generated primary key (the number of records in the data source + 1) or set a custom unique primary key for the new row. + */ + generatePrimaryKeyValue?: GeneratePrimaryKeyValueEvent; + + /** + * Event fired before the row edit dialog is opened. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.dialogElement to get reference to row edit dialog DOM element. + */ + rowEditDialogBeforeOpen?: RowEditDialogBeforeOpenEvent; + + /** + * Event fired after the row edit dialog is opened. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.dialogElement to get reference to row edit dialog DOM element. + */ + rowEditDialogAfterOpen?: RowEditDialogAfterOpenEvent; + + /** + * Event fired before the row edit dialog is closed. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.dialogElement to get reference to row edit dialog DOM element. + */ + rowEditDialogBeforeClose?: RowEditDialogBeforeCloseEvent; + + /** + * Event fired after the row edit dialog is closed. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.dialogElement to get reference to row edit dialog DOM element. + */ + rowEditDialogAfterClose?: RowEditDialogAfterCloseEvent; + + /** + * Event fired after the row edit dialog is rendered. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.dialogElement to get reference to row edit dialog DOM element. + */ + rowEditDialogContentsRendered?: RowEditDialogContentsRenderedEvent; + + /** + * Option for igTreeGridUpdating + */ + [optionName: string]: any; +} +interface IgTreeGridUpdatingMethods { + /** + * Adds a new child to a specific row. It also creates a transaction and updates the UI. + * + * @param values Pairs of values in the format { column1Key: value1, column2Key: value2, ... } . + * @param parentId The ID of the targeted row. + */ + addChild(values: Object, parentId: Object): void; + + /** + * Starts editing for adding a new child for specific row. + * + * @param parentId The ID of the targeted row. + * @param raiseEvents Specifies whether or not updating events should be raised for this operation. + */ + startAddChildFor(parentId: Object, raiseEvents?: Object): void; + + /** + * Shows the "Add Child" button for specific row. + * + * @param row A jQuery object of the targeted row. + */ + showAddChildButtonFor(row: Object): void; + + /** + * Hides the "Add Child" button. + */ + hideAddChildButton(): void; + destroy(): void; + + /** + * Sets a cell value for the specified cell. It also creates a transaction and updates the UI. + * If the specified cell is currently in edit mode, the function will set the desired value in the cell's editor instead. + * + * @param rowId The primary key of the row the cell is a child of. + * @param colKey The column key of the cell. + * @param value The new value for the cell. + */ + setCellValue(rowId: Object, colKey: string, value: Object): void; + + /** + * Sets values for specified cells in a row. It also creates a transaction and updates the UI. + * If the specified row is currently in edit mode, the function will set the desired values in the row's editors instead. + * + * @param rowId The primary key of the row to update. + * @param values Pairs of values in the format { column1Key: value1, column2Key: value2, ... } . + */ + updateRow(rowId: Object, values: Object): void; + + /** + * Adds a new row to the grid. It also creates a transaction and updates the UI. + * + * @param values Pairs of values in the format { column1Key: value1, column2Key: value2, ... } . + */ + addRow(values: Object): void; + + /** + * Deletes a row from the grid. It also creates a transaction and updates the UI. + * + * @param rowId The primary key of the row to delete. + */ + deleteRow(rowId: Object): void; + + /** + * Starts editing for the row or cell specified (depending on the [editMode](ui.iggridupdating#options:editMode)). + * + * @param rowId The row id. + * @param column The column key or index. + * @param raiseEvents Specifies whether or not updating events should be raised for this operation. + */ + startEdit(rowId: Object, column: Object, raiseEvents?: boolean): boolean; + + /** + * Starts editing for adding a new row. + * + * @param raiseEvents Specifies whether or not updating events should be raised for this operation. + */ + startAddRowEdit(raiseEvents?: boolean): boolean; + + /** + * Ends the currently active edit mode. + * + * @param update Specifies if the edit process should accept the current changes. Default is 'false'. + * @param raiseEvents Specifies whether or not updating events should be raised for this operation. + */ + endEdit(update?: boolean, raiseEvents?: boolean): boolean; + + /** + * Finds and returns the key of the first column the editor for which has invalid value. + */ + findInvalid(): string; + + /** + * Checks if the grid is in edit mode. + */ + isEditing(): boolean; + + /** + * Gets the editor for a column by the column key. That method can be used only after the editor has been created. + * + * @param key The key of the column. + */ + editorForKey(key: string): Object; + + /** + * Gets the editor for a column by the cell it resides in. If allowed the function can create the editor if it has not been created yet. + * + * @param cell Reference to the jQuery-wrapped TD object of the grid that the editor belongs to. + * @param create Requests to create the editor if it has not been created yet. + */ + editorForCell(cell: string, create?: boolean): Object; + + /** + * Shows the delete button for specific row. + * + * @param row A jQuery object of the targeted row. + */ + showDeleteButtonFor(row: Object): void; + + /** + * Hides the delete button. + */ + hideDeleteButton(): void; +} +interface JQuery { + data(propertyName: "igTreeGridUpdating"): IgTreeGridUpdatingMethods; +} + +interface JQuery { + igTreeGridUpdating(methodName: "addChild", values: Object, parentId: Object): void; + igTreeGridUpdating(methodName: "startAddChildFor", parentId: Object, raiseEvents?: Object): void; + igTreeGridUpdating(methodName: "showAddChildButtonFor", row: Object): void; + igTreeGridUpdating(methodName: "hideAddChildButton"): void; + igTreeGridUpdating(methodName: "destroy"): void; + igTreeGridUpdating(methodName: "setCellValue", rowId: Object, colKey: string, value: Object): void; + igTreeGridUpdating(methodName: "updateRow", rowId: Object, values: Object): void; + igTreeGridUpdating(methodName: "addRow", values: Object): void; + igTreeGridUpdating(methodName: "deleteRow", rowId: Object): void; + igTreeGridUpdating(methodName: "startEdit", rowId: Object, column: Object, raiseEvents?: boolean): boolean; + igTreeGridUpdating(methodName: "startAddRowEdit", raiseEvents?: boolean): boolean; + igTreeGridUpdating(methodName: "endEdit", update?: boolean, raiseEvents?: boolean): boolean; + igTreeGridUpdating(methodName: "findInvalid"): string; + igTreeGridUpdating(methodName: "isEditing"): boolean; + igTreeGridUpdating(methodName: "editorForKey", key: string): Object; + igTreeGridUpdating(methodName: "editorForCell", cell: string, create?: boolean): Object; + igTreeGridUpdating(methodName: "showDeleteButtonFor", row: Object): void; + igTreeGridUpdating(methodName: "hideDeleteButton"): void; + + /** + * Gets whether to enable or disable adding children to rows. + * + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "enableAddChild"): boolean; + + /** + * Sets whether to enable or disable adding children to rows. + * + * + * @optionValue New value to be set. + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "enableAddChild", optionValue: boolean): void; + + /** + * Gets the add child tooltip text. + * + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "addChildTooltip"): string; + + /** + * Sets the add child tooltip text. + * + * + * @optionValue New value to be set. + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "addChildTooltip", optionValue: string): void; + + /** + * Gets the label of the add child button in touch environment. + * + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "addChildButtonLabel"): string; + + /** + * Sets the label of the add child button in touch environment. + * + * + * @optionValue New value to be set. + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "addChildButtonLabel", optionValue: string): void; + + /** + * A list of custom column options that specify editing and validation settings for a specific column. + * + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "columnSettings"): IgGridUpdatingColumnSetting[]; + + /** + * A list of custom column options that specify editing and validation settings for a specific column. + * + * + * @optionValue New value to be set. + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "columnSettings", optionValue: IgGridUpdatingColumnSetting[]): void; + + /** + * Gets the edit mode. + * + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "editMode"): string; + + /** + * Sets the edit mode. + * + * + * @optionValue New value to be set. + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "editMode", optionValue: string): void; + + /** + * Gets if deleting rows through the UI is enabled. + * + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "enableDeleteRow"): boolean; + + /** + * Sets if deleting rows through the UI is enabled. + * + * + * @optionValue New value to be set. + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "enableDeleteRow", optionValue: boolean): void; + + /** + * Gets if adding rows through the UI is enabled. When enabled an additional row is rendered at the bottom of the grid's header that works as a button. When the end-user clicks on it edit mode is initiated either through a dialog (when [editMode](ui.iggridupdating#options:editMode) is 'dialog') or mimicking the look and feel of 'row' [editMode](ui.iggridupdating#options:editMode) (when [editMode](ui.iggridupdating#options:editMode) is 'row' or 'cell'). + * + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "enableAddRow"): boolean; + + /** + * Sets if adding rows through the UI is enabled. When enabled an additional row is rendered at the bottom of the grid's header that works as a button. When the end-user clicks on it edit mode is initiated either through a dialog (when [editMode](ui.iggridupdating#options:editMode) is 'dialog') or mimicking the look and feel of 'row' [editMode](ui.iggridupdating#options:editMode) (when [editMode](ui.iggridupdating#options:editMode) is 'row' or 'cell'). + * + * + * @optionValue New value to be set. + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "enableAddRow", optionValue: boolean): void; + + /** + * Gets if the value of each editable column in the grid should be validated. The validation is done based on the rules of their corresponding editors. + * + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "validation"): boolean; + + /** + * Sets if the value of each editable column in the grid should be validated. The validation is done based on the rules of their corresponding editors. + * + * + * @optionValue New value to be set. + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "validation", optionValue: boolean): void; + + /** + * Gets the label for the Done editing button (only applicable when the [showDoneCancelButtons](ui.iggridupdating#options:showDoneCancelButtons) option is enabled). If not set, $.ig.GridUpdating.locale.doneLabel is used. + * + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "doneLabel"): string; + + /** + * Sets the label for the Done editing button (only applicable when the [showDoneCancelButtons](ui.iggridupdating#options:showDoneCancelButtons) option is enabled). If not set, $.ig.GridUpdating.locale.doneLabel is used. + * + * + * @optionValue New value to be set. + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "doneLabel", optionValue: string): void; + + /** + * Gets the title for the Done editing button (only applicable when the [showDoneCancelButtons](ui.iggridupdating#options:showDoneCancelButtons) option is enabled). If not set, $.ig.GridUpdating.locale.doneTooltip is used. + * + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "doneTooltip"): string; + + /** + * Sets the title for the Done editing button (only applicable when the [showDoneCancelButtons](ui.iggridupdating#options:showDoneCancelButtons) option is enabled). If not set, $.ig.GridUpdating.locale.doneTooltip is used. + * + * + * @optionValue New value to be set. + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "doneTooltip", optionValue: string): void; + + /** + * Gets the label for the Cancel editing button (only applicable when the [showDoneCancelButtons](ui.iggridupdating#options:showDoneCancelButtons) option is enabled). If not set, $.ig.GridUpdating.locale.cancelLabel is used. + * + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "cancelLabel"): string; + + /** + * Sets the label for the Cancel editing button (only applicable when the [showDoneCancelButtons](ui.iggridupdating#options:showDoneCancelButtons) option is enabled). If not set, $.ig.GridUpdating.locale.cancelLabel is used. + * + * + * @optionValue New value to be set. + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "cancelLabel", optionValue: string): void; + + /** + * Gets the title for the Cancel editing button (only applicable when the [showDoneCancelButtons](ui.iggridupdating#options:showDoneCancelButtons) option is enabled). If not set, $.ig.GridUpdating.locale.cancelTooltip is used. + * + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "cancelTooltip"): string; + + /** + * Sets the title for the Cancel editing button (only applicable when the [showDoneCancelButtons](ui.iggridupdating#options:showDoneCancelButtons) option is enabled). If not set, $.ig.GridUpdating.locale.cancelTooltip is used. + * + * + * @optionValue New value to be set. + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "cancelTooltip", optionValue: string): void; + + /** + * Gets the label for the button starting edit mode for row adding. If not set, $.ig.GridUpdating.locale.addRowLabel is used. + * + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "addRowLabel"): string; + + /** + * Sets the label for the button starting edit mode for row adding. If not set, $.ig.GridUpdating.locale.addRowLabel is used. + * + * + * @optionValue New value to be set. + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "addRowLabel", optionValue: string): void; + + /** + * Gets the title for the button starting edit mode for row adding. If not set, $.ig.GridUpdating.locale.addRowTooltip is used. + * + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "addRowTooltip"): string; + + /** + * Sets the title for the button starting edit mode for row adding. If not set, $.ig.GridUpdating.locale.addRowTooltip is used. + * + * + * @optionValue New value to be set. + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "addRowTooltip", optionValue: string): void; + + /** + * Gets the label for the delete button. If not set, $.ig.GridUpdating.locale.deleteRowLabel is used. + * + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "deleteRowLabel"): string; + + /** + * Sets the label for the delete button. If not set, $.ig.GridUpdating.locale.deleteRowLabel is used. + * + * + * @optionValue New value to be set. + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "deleteRowLabel", optionValue: string): void; + + /** + * Gets the title for the delete button. If not set, $.ig.GridUpdating.locale.deleteRowTooltip is used. + * + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "deleteRowTooltip"): string; + + /** + * Sets the title for the delete button. If not set, $.ig.GridUpdating.locale.deleteRowTooltip is used. + * + * + * @optionValue New value to be set. + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "deleteRowTooltip", optionValue: string): void; + + /** + * Determines if the Done and Cancel buttons will be available as means to end edit mode for [editMode](ui.iggridupdating#options:editMode) 'row' and when adding a new row. + * + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "showDoneCancelButtons"): boolean; + + /** + * Determines if the Done and Cancel buttons will be available as means to end edit mode for [editMode](ui.iggridupdating#options:editMode) 'row' and when adding a new row. + * + * + * @optionValue New value to be set. + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "showDoneCancelButtons", optionValue: boolean): void; + + /** + * Gets if an exception should be thrown when the grid's data view changes while there are pending transactions in the data source. The data view changes when the data source performs a sorting, filtering, groupby or paging operation and the exception thrown will prevent the operation from succeeding. All pending transactions must be committed before a data view operation is able to complete. Committing transactions can be done manually through the grid's [commit](ui.iggrid#methods:commit) function or automatically by setting [autoCommit](ui.iggrid#options:autoCommit) to 'true'. + * + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "enableDataDirtyException"): boolean; + + /** + * Sets if an exception should be thrown when the grid's data view changes while there are pending transactions in the data source. The data view changes when the data source performs a sorting, filtering, groupby or paging operation and the exception thrown will prevent the operation from succeeding. All pending transactions must be committed before a data view operation is able to complete. Committing transactions can be done manually through the grid's [commit](ui.iggrid#methods:commit) function or automatically by setting [autoCommit](ui.iggrid#options:autoCommit) to 'true'. + * + * + * @optionValue New value to be set. + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "enableDataDirtyException", optionValue: boolean): void; + + /** + * Gets how end-users are able to start edit mode. Possible values: "click", "dblclick", "F2", "enter" and their combinations separated by comma or in array. The keyboard triggers have effect only if the grid cells can receive focus (the grid's [tabIndex](ui.iggrid#options:tabIndex) property should not have a negative value) or Selection is enabled. If "dblclick" is included, then "click" has no effect. + * + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "startEditTriggers"): string|Array; + + /** + * Sets how end-users are able to start edit mode. Possible values: "click", "dblclick", "F2", "enter" and their combinations separated by comma or in array. The keyboard triggers have effect only if the grid cells can receive focus (the grid's [tabIndex](ui.iggrid#options:tabIndex) property should not have a negative value) or Selection is enabled. If "dblclick" is included, then "click" has no effect. + * + * + * @optionValue New value to be set. + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "startEditTriggers", optionValue: string|Array): void; + + /** + * Determines if pressing Enter to navigate away from the currently edited cell should move the focus horizontally or vertically (default). + * + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "horizontalMoveOnEnter"): boolean; + + /** + * Determines if pressing Enter to navigate away from the currently edited cell should move the focus horizontally or vertically (default). + * + * + * @optionValue New value to be set. + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "horizontalMoveOnEnter", optionValue: boolean): void; + + /** + * Enables excel navigation style. When turned on, the arrow keys can be used for changing the currently edited cell similar to how Tab and Enter behave. When disabled, the arrow keys control the cursor inside editors. + * + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "excelNavigationMode"): boolean; + + /** + * Enables excel navigation style. When turned on, the arrow keys can be used for changing the currently edited cell similar to how Tab and Enter behave. When disabled, the arrow keys control the cursor inside editors. + * + * + * @optionValue New value to be set. + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "excelNavigationMode", optionValue: boolean): void; + + /** + * Sets a custom function to be called when the AJAX request to the URL specified by the [updateUrl](ui.iggrid#options:updateUrl) property succeeds. The function will be called with arguments representing the data returned by the server. + * + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "saveChangesSuccessHandler"): Function|string; + + /** + * Sets a custom function to be called when the AJAX request to the URL specified by the [updateUrl](ui.iggrid#options:updateUrl) property succeeds. The function will be called with arguments representing the data returned by the server. + * + * + * @optionValue New value to be set. + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "saveChangesSuccessHandler", optionValue: Function|string): void; + + /** + * Sets a custom function to be called when the AJAX request to the URL specified by the [updateUrl](ui.iggrid#options:updateUrl) property fails. The function will be called with arguments representing the data returned by the server. + * + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "saveChangesErrorHandler"): Function|string; + + /** + * Sets a custom function to be called when the AJAX request to the URL specified by the [updateUrl](ui.iggrid#options:updateUrl) property fails. The function will be called with arguments representing the data returned by the server. + * + * + * @optionValue New value to be set. + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "saveChangesErrorHandler", optionValue: Function|string): void; + + /** + * On touch-enabled devices specifies the swipe distance for the delete button to appear. + * + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "swipeDistance"): string|number; + + /** + * On touch-enabled devices specifies the swipe distance for the delete button to appear. + * + * + * @optionValue New value to be set. + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "swipeDistance", optionValue: string|number): void; + + /** + * Controls if navigation will wrap around the grid. The feature will never wrap around virtual grids. + * + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "wrapAround"): boolean; + + /** + * Controls if navigation will wrap around the grid. The feature will never wrap around virtual grids. + * + * + * @optionValue New value to be set. + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "wrapAround", optionValue: boolean): void; + + /** + * A list of options controlling the rendering behavior of the row edit dialog. If [editMode](ui.iggridupdating#options:editMode) is not 'dialog' these have no effect. + * + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "rowEditDialogOptions"): IgGridUpdatingRowEditDialogOptions; + + /** + * A list of options controlling the rendering behavior of the row edit dialog. If [editMode](ui.iggridupdating#options:editMode) is not 'dialog' these have no effect. + * + * + * @optionValue New value to be set. + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "rowEditDialogOptions", optionValue: IgGridUpdatingRowEditDialogOptions): void; + + /** + * Name of the dialog widget to be used. It should inherit from $.ui.igGridModalDialog. For more information on how to utilize this property, please refer to the [Extending igGrid Modal Dialog](http://www.igniteui.com/help/extending-iggrid-modal-dialog) topic. + * + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "dialogWidget"): string; + + /** + * Name of the dialog widget to be used. It should inherit from $.ui.igGridModalDialog. For more information on how to utilize this property, please refer to the [Extending igGrid Modal Dialog](http://www.igniteui.com/help/extending-iggrid-modal-dialog) topic. + * + * + * @optionValue New value to be set. + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "dialogWidget", optionValue: string): void; + + /** + * Enables/disables feature inheritance for the child layouts in igHierarchicalGrid. + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "inherit"): boolean; + + /** + * Enables/disables feature inheritance for the child layouts in igHierarchicalGrid. + * + * @optionValue New value to be set. + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "inherit", optionValue: boolean): void; + + /** + * Event fired before row editing begins. + * Return false in order to cancel editing. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.rowID to get the row's PK value. + * Use ui.rowAdding to check if the edit mode is for adding a new row. + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "editRowStarting"): EditRowStartingEvent; + + /** + * Event fired before row editing begins. + * Return false in order to cancel editing. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.rowID to get the row's PK value. + * Use ui.rowAdding to check if the edit mode is for adding a new row. + * + * @optionValue Define event handler function. + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "editRowStarting", optionValue: EditRowStartingEvent): void; + + /** + * Event fired after row editing begins. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.rowID to get the row's PK value. + * Use ui.rowAdding to check if the edit mode is for adding a new row. + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "editRowStarted"): EditRowStartedEvent; + + /** + * Event fired after row editing begins. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.rowID to get the row's PK value. + * Use ui.rowAdding to check if the edit mode is for adding a new row. + * + * @optionValue Define event handler function. + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "editRowStarted", optionValue: EditRowStartedEvent): void; + + /** + * Event fired before row editing ends. + * Return false in order to prevent the grid from exiting edit mode. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.rowID to get the row's PK value. + * Use ui.update to check if any of the values is changed which will cause update in the data source. Can be manually set to false to prevent this update. + * Use ui.rowAdding to check if the edit mode is for adding a new row. + * Use ui.values[key] to get or set the new value for the column with the specified key. + * Use ui.oldValues[key] to get the old value for the column with the specified key. + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "editRowEnding"): EditRowEndingEvent; + + /** + * Event fired before row editing ends. + * Return false in order to prevent the grid from exiting edit mode. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.rowID to get the row's PK value. + * Use ui.update to check if any of the values is changed which will cause update in the data source. Can be manually set to false to prevent this update. + * Use ui.rowAdding to check if the edit mode is for adding a new row. + * Use ui.values[key] to get or set the new value for the column with the specified key. + * Use ui.oldValues[key] to get the old value for the column with the specified key. + * + * @optionValue Define event handler function. + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "editRowEnding", optionValue: EditRowEndingEvent): void; + + /** + * Event fired after row editing ends. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.rowID to get the row's PK value. + * Use ui.update to check if any of the values is changed which will cause update in the data source. + * Use ui.rowAdding to check if the edit mode is for adding a new row. + * Use ui.values[key] to get the new value for the column with the specified key. + * Use ui.oldValues[key] to get the old value for the column with the specified key. + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "editRowEnded"): EditRowEndedEvent; + + /** + * Event fired after row editing ends. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.rowID to get the row's PK value. + * Use ui.update to check if any of the values is changed which will cause update in the data source. + * Use ui.rowAdding to check if the edit mode is for adding a new row. + * Use ui.values[key] to get the new value for the column with the specified key. + * Use ui.oldValues[key] to get the old value for the column with the specified key. + * + * @optionValue Define event handler function. + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "editRowEnded", optionValue: EditRowEndedEvent): void; + + /** + * Event fired before cell editing begins (including when row editing opens editing for a cell). + * Return false in order to cancel editing. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.rowID to get the row's PK value. + * Use ui.columnIndex to get the index of the column. + * Use ui.columnKey to get the key of the column. + * Use ui.editor to get a reference to the editor used for editing the column. + * Use ui.value to get or set the value of the editor. + * Use ui.rowAdding to check if the edit mode is for adding a new row. + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "editCellStarting"): EditCellStartingEvent; + + /** + * Event fired before cell editing begins (including when row editing opens editing for a cell). + * Return false in order to cancel editing. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.rowID to get the row's PK value. + * Use ui.columnIndex to get the index of the column. + * Use ui.columnKey to get the key of the column. + * Use ui.editor to get a reference to the editor used for editing the column. + * Use ui.value to get or set the value of the editor. + * Use ui.rowAdding to check if the edit mode is for adding a new row. + * + * @optionValue Define event handler function. + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "editCellStarting", optionValue: EditCellStartingEvent): void; + + /** + * Event fired after cell editing begins (including when row editing opens editing for a cell). + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.rowID to get the row's PK value. + * Use ui.columnIndex to get the index of the column. + * Use ui.columnKey to get the key of the column. + * Use ui.editor to get a reference to the editor used for editing the column. + * Use ui.value to get the value of the editor. + * Use ui.rowAdding to check if the edit mode is for adding a new row. + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "editCellStarted"): EditCellStartedEvent; + + /** + * Event fired after cell editing begins (including when row editing opens editing for a cell). + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.rowID to get the row's PK value. + * Use ui.columnIndex to get the index of the column. + * Use ui.columnKey to get the key of the column. + * Use ui.editor to get a reference to the editor used for editing the column. + * Use ui.value to get the value of the editor. + * Use ui.rowAdding to check if the edit mode is for adding a new row. + * + * @optionValue Define event handler function. + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "editCellStarted", optionValue: EditCellStartedEvent): void; + + /** + * Event fired before cell editing ends (including when row editing closes editing for a cell). + * Return false in order to prevent the grid from exiting edit mode (only functions if [editMode](ui.iggridupdating#options:editMode) is 'cell'). + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.rowID to get the row's PK value. + * Use ui.columnIndex to get the index of the column. + * Use ui.columnKey to get the key of the column. + * Use ui.editor to get a reference to the editor used for editing the column. + * Use ui.value to get or set the value to be used when updating the data source. + * Use ui.oldValue to get the old value. + * Use ui.update to check if the value is changed which will cause update in the data source. Can be manually set to false to prevent this update. + * Use ui.rowAdding to check if the edit mode is for adding a new row. + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "editCellEnding"): EditCellEndingEvent; + + /** + * Event fired before cell editing ends (including when row editing closes editing for a cell). + * Return false in order to prevent the grid from exiting edit mode (only functions if [editMode](ui.iggridupdating#options:editMode) is 'cell'). + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.rowID to get the row's PK value. + * Use ui.columnIndex to get the index of the column. + * Use ui.columnKey to get the key of the column. + * Use ui.editor to get a reference to the editor used for editing the column. + * Use ui.value to get or set the value to be used when updating the data source. + * Use ui.oldValue to get the old value. + * Use ui.update to check if the value is changed which will cause update in the data source. Can be manually set to false to prevent this update. + * Use ui.rowAdding to check if the edit mode is for adding a new row. + * + * @optionValue Define event handler function. + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "editCellEnding", optionValue: EditCellEndingEvent): void; + + /** + * Event fired after cell editing ends (including when row editing closes editing for a cell). + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.rowID to get the row's PK value. + * Use ui.columnIndex to get the index of the column. + * Use ui.columnKey to get the key of the column. + * Use ui.editor to get a reference to the editor used for editing the column. + * Use ui.value to get the new value. + * Use ui.oldValue to get the old value. + * Use ui.update to check if the value is changed which will cause update in the data source. + * Use ui.rowAdding to check if the edit mode is for adding a new row. + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "editCellEnded"): EditCellEndedEvent; + + /** + * Event fired after cell editing ends (including when row editing closes editing for a cell). + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.rowID to get the row's PK value. + * Use ui.columnIndex to get the index of the column. + * Use ui.columnKey to get the key of the column. + * Use ui.editor to get a reference to the editor used for editing the column. + * Use ui.value to get the new value. + * Use ui.oldValue to get the old value. + * Use ui.update to check if the value is changed which will cause update in the data source. + * Use ui.rowAdding to check if the edit mode is for adding a new row. + * + * @optionValue Define event handler function. + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "editCellEnded", optionValue: EditCellEndedEvent): void; + + /** + * Event fired before adding a new row. + * Return false in order to cancel the adding of the new row to the data source. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.values[key] to get the value for the column with the specified key. + * Use ui.oldValues[key] to get the default value (before editing) for the column with the specified key. + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "rowAdding"): RowAddingEvent; + + /** + * Event fired before adding a new row. + * Return false in order to cancel the adding of the new row to the data source. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.values[key] to get the value for the column with the specified key. + * Use ui.oldValues[key] to get the default value (before editing) for the column with the specified key. + * + * @optionValue Define event handler function. + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "rowAdding", optionValue: RowAddingEvent): void; + + /** + * Event fired after adding a new row. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.values[key] to get the value for the column with the specified key. + * Use ui.oldValues[key] to get the default value (before editing) for the column with the specified key. + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "rowAdded"): RowAddedEvent; + + /** + * Event fired after adding a new row. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.values[key] to get the value for the column with the specified key. + * Use ui.oldValues[key] to get the default value (before editing) for the column with the specified key. + * + * @optionValue Define event handler function. + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "rowAdded", optionValue: RowAddedEvent): void; + + /** + * Event fired before deleting a row. + * Return false in order to cancel the row's deletion. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.element to get a jQuery object containing the TR element of the row to delete. + * Use ui.rowID to get the row's PK value. + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "rowDeleting"): RowDeletingEvent; + + /** + * Event fired before deleting a row. + * Return false in order to cancel the row's deletion. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.element to get a jQuery object containing the TR element of the row to delete. + * Use ui.rowID to get the row's PK value. + * + * @optionValue Define event handler function. + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "rowDeleting", optionValue: RowDeletingEvent): void; + + /** + * Event fired after a row is deleted. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.element to get a jQuery object containing the TR element of the deleted row. + * Use ui.rowID to get the row's PK value. + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "rowDeleted"): RowDeletedEvent; + + /** + * Event fired after a row is deleted. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.element to get a jQuery object containing the TR element of the deleted row. + * Use ui.rowID to get the row's PK value. + * + * @optionValue Define event handler function. + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "rowDeleted", optionValue: RowDeletedEvent): void; + + /** + * Event fired before the dataDirtyException is thrown. This can be controlled by the [enableDataDirtyException](ui.iggridupdating#options:enableDataDirtyException) property. Any pending changes may be committed in the handler of this event in order to prevent dataDirtyException from being thrown. + * Return false in order to prevent the exception. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "dataDirty"): DataDirtyEvent; + + /** + * Event fired before the dataDirtyException is thrown. This can be controlled by the [enableDataDirtyException](ui.iggridupdating#options:enableDataDirtyException) property. Any pending changes may be committed in the handler of this event in order to prevent dataDirtyException from being thrown. + * Return false in order to prevent the exception. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * + * @optionValue Define event handler function. + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "dataDirty", optionValue: DataDirtyEvent): void; + + /** + * Event fired before editing starts for adding a new row, when Updating generates an automatic primary key for it. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.value to get the auto-generated primary key (the number of records in the data source + 1) or set a custom unique primary key for the new row. + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "generatePrimaryKeyValue"): GeneratePrimaryKeyValueEvent; + + /** + * Event fired before editing starts for adding a new row, when Updating generates an automatic primary key for it. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.value to get the auto-generated primary key (the number of records in the data source + 1) or set a custom unique primary key for the new row. + * + * @optionValue Define event handler function. + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "generatePrimaryKeyValue", optionValue: GeneratePrimaryKeyValueEvent): void; + + /** + * Event fired before the row edit dialog is opened. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.dialogElement to get reference to row edit dialog DOM element. + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "rowEditDialogBeforeOpen"): RowEditDialogBeforeOpenEvent; + + /** + * Event fired before the row edit dialog is opened. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.dialogElement to get reference to row edit dialog DOM element. + * + * @optionValue Define event handler function. + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "rowEditDialogBeforeOpen", optionValue: RowEditDialogBeforeOpenEvent): void; + + /** + * Event fired after the row edit dialog is opened. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.dialogElement to get reference to row edit dialog DOM element. + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "rowEditDialogAfterOpen"): RowEditDialogAfterOpenEvent; + + /** + * Event fired after the row edit dialog is opened. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.dialogElement to get reference to row edit dialog DOM element. + * + * @optionValue Define event handler function. + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "rowEditDialogAfterOpen", optionValue: RowEditDialogAfterOpenEvent): void; + + /** + * Event fired before the row edit dialog is closed. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.dialogElement to get reference to row edit dialog DOM element. + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "rowEditDialogBeforeClose"): RowEditDialogBeforeCloseEvent; + + /** + * Event fired before the row edit dialog is closed. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.dialogElement to get reference to row edit dialog DOM element. + * + * @optionValue Define event handler function. + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "rowEditDialogBeforeClose", optionValue: RowEditDialogBeforeCloseEvent): void; + + /** + * Event fired after the row edit dialog is closed. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.dialogElement to get reference to row edit dialog DOM element. + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "rowEditDialogAfterClose"): RowEditDialogAfterCloseEvent; + + /** + * Event fired after the row edit dialog is closed. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.dialogElement to get reference to row edit dialog DOM element. + * + * @optionValue Define event handler function. + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "rowEditDialogAfterClose", optionValue: RowEditDialogAfterCloseEvent): void; + + /** + * Event fired after the row edit dialog is rendered. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.dialogElement to get reference to row edit dialog DOM element. + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "rowEditDialogContentsRendered"): RowEditDialogContentsRenderedEvent; + + /** + * Event fired after the row edit dialog is rendered. + * Function takes arguments evt and ui. + * Use ui.owner to get a reference to GridUpdating. + * Use ui.owner.grid to get a reference to the grid. + * Use ui.dialogElement to get reference to row edit dialog DOM element. + * + * @optionValue Define event handler function. + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "rowEditDialogContentsRendered", optionValue: RowEditDialogContentsRenderedEvent): void; + igTreeGridUpdating(options: IgTreeGridUpdating): JQuery; + igTreeGridUpdating(optionLiteral: 'option', optionName: string): any; + igTreeGridUpdating(optionLiteral: 'option', options: IgTreeGridUpdating): JQuery; + igTreeGridUpdating(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igTreeGridUpdating(methodName: string, ...methodParams: any[]): any; +} +interface IgBrowseButton { + autoselect?: boolean; + multipleFiles?: boolean; + + /** + * M.H. 13 Feb 2014 Fix for bug #164347: Move input from document body to the upload container + */ + container?: any; + + /** + * Option for igBrowseButton + */ + [optionName: string]: any; +} +interface IgBrowseButtonMethods { + attachFilePicker(e: Object, isHidden: Object): void; + getFilePicker(): void; + + /** + * $(".selector").igUpload("destroy"); + */ + destroy(): void; +} +interface JQuery { + data(propertyName: "igBrowseButton"): IgBrowseButtonMethods; +} + +interface IgUploadFileExtensionIcons { + /** + * Array of string for file extensions + */ + ext?: any[]; + + /** + * Css classes which sets icon. + */ + css?: string; + + /** + * Default icons when the file extension is not found. It is taken only the first item which have def set to true, other are ignored. + */ + def?: boolean; + + /** + * Option for IgUploadFileExtensionIcons + */ + [optionName: string]: any; +} + +interface FileSelectingEvent { + (event: Event, ui: FileSelectingEventUIParam): void; +} + +interface FileSelectingEventUIParam { + /** + * Used to access the igUpload widget object. + */ + owner?: any; +} + +interface FileSelectedEvent { + (event: Event, ui: FileSelectedEventUIParam): void; +} + +interface FileSelectedEventUIParam { + /** + * Used to get unique identifier of the file + */ + fileId?: any; + + /** + * Used to get the name of the uploaded file + */ + filePath?: any; + + /** + * Used to access the igUpload widget object. + */ + owner?: any; +} + +interface FileUploadingEvent { + (event: Event, ui: FileUploadingEventUIParam): void; +} + +interface FileUploadingEventUIParam { + /** + * Used to get unique identifier of the file + */ + fileId?: any; + + /** + * Used to get the name of the uploaded file + */ + filePath?: any; + + /** + * Used totalSize to get the file size of the uploaded file + */ + totalSize?: any; + + /** + * Used to get uploaded bytes + */ + uploadedBytes?: any; + + /** + * Used to get current file status + */ + fileStatus?: any; + + /** + * Used to get reference to the fileInfo object - containing information for fileName, fileSize, serverMessage(if returned from server side), etc. + */ + fileInfo?: any; + + /** + * Used to access the igUpload widget object. + */ + owner?: any; +} + +interface FileUploadedEvent { + (event: Event, ui: FileUploadedEventUIParam): void; +} + +interface FileUploadedEventUIParam { + /** + * Used to get unique identifier of the file + */ + fileId?: any; + + /** + * Used to get the name of the uploaded file + */ + filePath?: any; + + /** + * Used totalSize to get the file size of the uploaded file + */ + totalSize?: any; + + /** + * Used to get reference to the fileInfo object - containing information for fileName, fileSize, serverMessage(if returned from server side), etc. + */ + fileInfo?: any; + + /** + * Used to access the igUpload widget object. + */ + owner?: any; +} + +interface FileUploadAbortedEvent { + (event: Event, ui: FileUploadAbortedEventUIParam): void; +} + +interface FileUploadAbortedEventUIParam { + /** + * Used to get unique identifier of the file + */ + fileId?: any; + + /** + * Used to get the name of the uploaded file + */ + filePath?: any; + + /** + * Used totalSize to get the file size of the uploaded file + */ + totalSize?: any; + + /** + * Used to get uploaded bytes + */ + uploadedBytes?: any; + + /** + * Used to get current file status + */ + fileStatus?: any; + + /** + * Used to access the igUpload widget object. + */ + owner?: any; +} + +interface CancelAllClickedEvent { + (event: Event, ui: CancelAllClickedEventUIParam): void; +} + +interface CancelAllClickedEventUIParam { + /** + * Used to access the igUpload widget object. + */ + owner?: any; +} + +interface OnErrorEvent { + (event: Event, ui: OnErrorEventUIParam): void; +} + +interface OnErrorEventUIParam { + /** + * Used to get current errorCode + */ + errorCode?: any; + + /** + * Used to get identifier of the file for which the event is fired(after that it can be used API function getFileInfo). NOTE: It is possible to be null in some cases: try to drop multiple files when mode is single , check maximum allowed uploading files fails or check for count of maximum allowed simultaneous files upload fails. + */ + fileId?: any; + + /** + * Used to get detailed error description + */ + errorMessage?: any; + + /** + * Used to get error type - it could be clientside or serverside + */ + errorType?: any; + + /** + * Used to get specific server message returned by server - if errorType is serverside + */ + serverMessage?: any; + + /** + * Used to access the igUpload widget object. + */ + owner?: any; +} + +interface FileExtensionsValidatingEvent { + (event: Event, ui: FileExtensionsValidatingEventUIParam): void; +} + +interface FileExtensionsValidatingEventUIParam { + /** + * Used to get the full file name + */ + fileName?: any; + + /** + * Used to get file extension + */ + fileExtension?: any; + + /** + * Used to access the igUpload widget object. + */ + owner?: any; +} + +interface OnXHRLoadEvent { + (event: Event, ui: OnXHRLoadEventUIParam): void; +} + +interface OnXHRLoadEventUIParam { + /** + * Used to get unique identifier of the file + */ + fileId?: any; + + /** + * Used to get reference to the original XMLHttpRequest object + */ + xhr?: any; + + /** + * Used to get reference to the fileInfo object - containing information for fileName, fileSize, serverMessage(if returned from the server-side), etc. + */ + fileInfo?: any; + + /** + * Used to access the igUpload widget object. + */ + owner?: any; +} + +interface OnFormDataSubmitEvent { + (event: Event, ui: OnFormDataSubmitEventUIParam): void; +} + +interface OnFormDataSubmitEventUIParam { + /** + * Used to get unique identifier of the file + */ + fileId?: any; + + /** + * Used to get reference to the fileInfo object - containing information for the fileName, fileSize, serverMessage, etc. + */ + fileInfo?: any; + + /** + * Used to get reference to the original XMLHttpRequest object(if the browser supports HTML 5 file API - if not it is undefined) + */ + xhr?: any; + + /** + * Used to get reference to FormData object(if the browser supports HTML5 file API) OR reference to jQuery representation of
+ */ + formData?: any; + + /** + * Used to access the igUpload widget object. + */ + owner?: any; +} + +interface IgUpload { + /** + * Get or set width of the main container of the file upload control. Main container contains all buttons, progressbar, etc. + * + */ + width?: number|string; + + /** + * Get or set height of the main container of the file upload control. Main container contains all buttons, progressbar, etc. + * + */ + height?: number|string; + + /** + * Get or set whether the file start upload automatically when it is selected. Default is false. + * + */ + autostartupload?: boolean; + + /** + * Get or set label for the first shown browse button. When file is selected for the first time this button is hidden. + * + */ + labelUploadButton?: string; + + /** + * Get or set label for browse button in main container. + * + */ + labelAddButton?: string; + + /** + * Get or set label for summary Clear all button. It will be shown only in multiple upload mode. + * + */ + labelClearAllButton?: string; + + /** + * Get or set template for showing summary template. {0} is count of uploaded files. {1} is total count of file to be uploaded. + * + */ + labelSummaryTemplate?: string; + + /** + * Get or set template for showing uploading information in summary progress bar. It will be shown only in multiple upload mode. {0} uploaded filesize. {1} - total file size. + * + */ + labelSummaryProgressBarTemplate?: string; + + /** + * Get or set label for show/hide details button when main container is hidden. + * + */ + labelShowDetails?: string; + + /** + * Get or set label for show/hide details button when main container is shown. + * + */ + labelHideDetails?: string; + + /** + * Get or set label for button cancelling all files. Shown only in multiple upload mode. + * + */ + labelSummaryProgressButtonCancel?: string; + + /** + * Get or set label for start upload batch files. Shown only in multiple upload mode and autostartupload is false. + * + */ + labelSummaryProgressButtonContinue?: string; + + /** + * Get or set label when upload is finished. Shown only in multiple upload mode. + * + */ + labelSummaryProgressButtonDone?: string; + + /** + * Get or set filename when it could not be shown the whole file name and should be shorten. + * + */ + labelProgressBarFileNameContinue?: string; + + /** + * Get or set message shown when max file size of the uploaded file exceeds the limit. + * + */ + errorMessageMaxFileSizeExceeded?: string; + + /** + * Get or set error message when ajax call to get file status throws error. + * + */ + errorMessageGetFileStatus?: string; + + /** + * Get or set error message when ajax call to send cancel upload command. + * + */ + errorMessageCancelUpload?: string; + + /** + * Get or set error message when file is not found. + * + */ + errorMessageNoSuchFile?: string; + + /** + * Get or set error message different from the other messages. + * + */ + errorMessageOther?: string; + + /** + * Get or set error message when file extension validation failed. + * + */ + errorMessageValidatingFileExtension?: string; + + /** + * Get or set error message when AJAX Request to get file size throws error. + * + */ + errorMessageAJAXRequestFileSize?: string; + + /** + * Get or set error message when trying to remove non existing file. + * + */ + errorMessageTryToRemoveNonExistingFile?: string; + + /** + * Get or set error message when trying to start non existing file. + * + */ + errorMessageTryToStartNonExistingFile?: string; + + /** + * Get or set error message when maximum allowed files exceeded. + * + */ + errorMessageMaxUploadedFiles?: string; + + /** + * Get or set error message when maximum simultaneous files is less or equal to 0. + * + */ + errorMessageMaxSimultaneousFiles?: string; + + /** + * Get or set error message when trying to drop more than 1 file and mode is single. + */ + errorMessageDropMultipleFilesWhenSingleModel?: string; + + /** + * Get or set URL for uploading. + * + */ + uploadUrl?: string; + + /** + * Get or set URL of HTTPHandler to get information about file upload, current size and also to get commands + * + */ + progressUrl?: string; + + /** + * Get or set file allowed file extensions. When this array is empty - it is not made such validation. Example ["gif", "jpg", "bmp"]. + * + */ + allowedExtensions?: any[]; + + /** + * Get or set whether to show File Extension icon + * + */ + showFileExtensionIcon?: boolean; + + /** + * Get or set control specific CSS options. For example you can override specific control classes with custom ones. + * + */ + css?: any; + + /** + * Set icon css classes for specified file extension + * + */ + fileExtensionIcons?: IgUploadFileExtensionIcons; + + /** + * Get or set multiple or single file upload. In single upload it is possible to upload only one file at the same time. + * + */ + mode?: any; + + /** + * Get or set a bool setting that allows user to select(for upload) more than 1 file from the browse dialog at once. HTML 5+ - it is supported by Chrome, MOzilla FF, Safar, Opera latest versions and IE10+ + * + */ + multipleFiles?: boolean; + + /** + * Get or set the maximum number of allowed files to upload. + * + */ + maxUploadedFiles?: number; + + /** + * Get or set count of files that could be uploaded at the same time. + * + */ + maxSimultaneousFilesUploads?: number; + + /** + * Get or set file size metrics how to be shown files size. + * + */ + fileSizeMetric?: any; + + /** + * UniqueId of the control - should not be changed by developer. Set from server-side wrapper. + * + */ + controlId?: string; + + /** + * The number of digits after the decimal point. + * + */ + fileSizeDecimalDisplay?: number; + + /** + * Maximum size(in bytes) allowed for the file to be uploaded. If it is set to null or -1 there is no limitation otherwise if the size(of the selected file) exceeds this value it is not allowed to be uploaded. This option is used for validation only on client side and only if the browser supports HTML5 file API and share information about the file size + */ + maxFileSize?: any; + + /** + * Defines the name of the file upload selecting event. Fired when browse button is pressed. + * Return false in order to cancel selecting file. + * Function takes arguments evt and ui. + * Use ui.owner in order to access the igUpload widget object. + */ + fileSelecting?: FileSelectingEvent; + + /** + * Defines the name of the file upload selected event. Fired when file is selected from browse dialog. + * Return false in order to cancel uploading file. + * Function takes arguments evt and ui. + * Use ui.fileId to get unique identifier of the file + * Use ui.filePath to get the name of the uploaded file + * Use ui.owner in order to access the igUpload widget object. + */ + fileSelected?: FileSelectedEvent; + + /** + * Defines the name of the file uploading event. Fired every time when fileuploader get status for the upload. + * Return false in order to cancel uploading file. + * Function takes arguments evt and ui. + * Use ui.fileId to get unique identifier of the file + * Use ui.filePath to get the name of the uploaded file + * Use ui.totalSize to get the file size of the uploaded file + * Use ui.uploadedBytes to get uploaded bytes + * Use ui.fileStatus to get current file status + * Use ui.fileInfo to get reference to the fileInfo object - containing information for fileName, fileSize, serverMessage(if returned from server side), etc. + * Use ui.owner in order to access the igUpload widget object. + */ + fileUploading?: FileUploadingEvent; + + /** + * Defines the name of the uploaded event. Fired when the file is uploaded + * Function takes arguments evt and ui. + * Use ui.fileId to get unique identifier of the file + * Use ui.filePath to get the name of the uploaded file + * Use ui.totalSize to get the file size of the uploaded file + * Use ui.fileInfo to get reference to the fileInfo object - containing information for fileName, fileSize, serverMessage(if returned from server side), etc. + * Use ui.owner in order to access the igUpload widget object. + */ + fileUploaded?: FileUploadedEvent; + + /** + * Defines the name of the file upload cancel event. Fired when the server responses that the file is canceled. + * Function takes arguments evt and ui. + * Use ui.fileId to get unique identifier of the file + * Use ui.filePath to get the name of the uploaded file + * Use ui.totalSize to get the file size of the uploaded file + * Use ui.uploadedBytes to get uploaded bytes + * Use ui.fileStatus to get current file status + * Use ui.owner in order to access the igUpload widget object. + */ + fileUploadAborted?: FileUploadAbortedEvent; + + /** + * Defines the name of the cancel all button event click. Fired when cancel all button in summary is clicked. Fired only in multiple upload mode. + * Function takes arguments evt and ui. + * Use ui.owner in order to access the igUpload widget object. + */ + cancelAllClicked?: CancelAllClickedEvent; + + /** + * Defines the name of the file upload error event. Fired when error is occurred. + * Function takes arguments evt and ui. + * Use ui.errorCode to get current errorCode + * Use ui.fileId to get identifier of the file for which the event is fired(after that it can be used API function getFileInfo). NOTE: It is possible to be null in some cases: try to drop multiple files when mode is single , check maximum allowed uploading files fails or check for count of maximum allowed simultaneous files upload fails. + * Use ui.errorMessage to get detailed error description + * Use ui.errorType to get error type - it could be clientside or serverside + * Use ui.serverMessage to get specific server message returned by server - if errorType is serverside + * Use ui.owner in order to access the igUpload widget object. + */ + onError?: OnErrorEvent; + + /** + * It is fired when validating file extensions + * Function takes arguments evt and ui. + * Use ui.fileName to get the full file name + * Use ui.fileExtension to get file extension + * Use ui.owner in order to access the igUpload widget object. + */ + fileExtensionsValidating?: FileExtensionsValidatingEvent; + + /** + * It is fired when event onload(of XmlHttpRequest) is fired. This event will be fired only if the browser supports HTML5 file API + * Function takes arguments evt and ui. + * Use ui.fileId to get unique identifier of the file + * Use ui.xhr to get reference to the original XMLHttpRequest object + * Use ui.fileInfo to get reference to the fileInfo object - containing information for fileName, fileSize, serverMessage(if returned from the server-side), etc. + * Use ui.owner in order to access the igUpload widget object. + */ + onXHRLoad?: OnXHRLoadEvent; + + /** + * It is fired before submitting to the server the uploading file(and its additional data if any). It could be used to append additional data fields to the FormData object(if the browser supports HTML5 file API - like newest Chrome, Firefox, IE11+). If the browser does not support HTML5 file API(IE10 and older) it could be added these data fields(as hidden input fields) to the form. Use the public API function addDataFields. + * Function takes arguments evt and ui. + * Use ui.fileId to get unique identifier of the file + * Use ui.fileInfo to get reference to the fileInfo object - containing information for the fileName, fileSize, serverMessage, etc. + * Use ui.xhr to get reference to the original XMLHttpRequest object(if the browser supports HTML 5 file API - if not it is undefined) + * Use ui.formData to get reference to FormData object(if the browser supports HTML5 file API) OR reference to jQuery representation of + * Use ui.owner in order to access the igUpload widget object. + */ + onFormDataSubmit?: OnFormDataSubmitEvent; + + /** + * Option for igUpload + */ + [optionName: string]: any; +} +interface IgUploadMethods { + /** + * Return jquery object of fileupload container - html DOM element + */ + container(): void; + + /** + * Returns the current widget element + */ + widget(): void; + + /** + * Hide finished files + */ + clearAll(): void; + + /** + * Append additional data field to formData(before submitting it to the server). Usually this function is used in the handler of the event onFormDataSubmit. If the browser supports HTML5 file API formData is instance of FormData, otherwise(like IE10 and older) formData is jQuery representation of the that should be submitted to the server + * + * @param formData If the browser supports HTML5 file API formData is instance of FormData, otherwise(like IE10 and older) formData is jQuery representation of the that should be submitted to the server + * @param field Data field that should be appended to the formData. The object has 2 properties - value and name. If the browser supports HTML5 the data field is appended to the formData object. Otherwise it is appended as input hidden field to the + */ + addDataField(formData: Object, field: Object): void; + + /** + * Append additional data fields to formData(before submitting it to the server). Usually this function is used in the handler of the event onFormDataSubmit. If the browser supports HTML5 file API formData is instance of FormData, otherwise(like IE10 and older) formData is jQuery representation of the that should be submitted to the server + * + * @param formData If the browser supports HTML5 file API formData is instance of FormData, otherwise(like IE10 and older) formData is jQuery representation of the that should be submitted to the server + * @param fields Array of data fields that should be appended to the formData. Each data field is object with 2 properties - value and name. If the browser supports HTML5 these data fields are added to the formData. Otherwise each of these data field is appended as input hidden field to the + */ + addDataFields(formData: Object, fields: any[]): void; + + /** + * Start uploading file as submitting form with the specified formNumber. + * + * @param formNumber id of the upload form + */ + startUpload(formNumber: number): void; + + /** + * Cancel upload for the specified file id + * formNumber - id of the file to be canceled + * + * @param formNumber id of the form which should be cancelled + */ + cancelUpload(formNumber: number): void; + + /** + * Destroy the widget + */ + destroy(): void; + + /** + * Returns the information about uploading files - all files uploaded/uploading/pending + */ + getFileInfoData(): Object; + + /** + * Cancel all uploading and pending files + */ + cancelAll(): void; + + /** + * Returns the information about the file by specified file identifier. It could be file which is uploading/uploaded or uploading is not started. If there isn"t file with the specified file id returns null + * + * @param fileIndex unique identifier of the file + */ + getFileInfo(fileIndex: number): Object; +} +interface JQuery { + data(propertyName: "igUpload"): IgUploadMethods; +} + +interface JQuery { + igBrowseButton(methodName: "attachFilePicker", e: Object, isHidden: Object): void; + igBrowseButton(methodName: "getFilePicker"): void; + igBrowseButton(methodName: "destroy"): void; + + /** + */ + igBrowseButton(optionLiteral: 'option', optionName: "autoselect"): boolean; + + /** + */ + igBrowseButton(optionLiteral: 'option', optionName: "autoselect", optionValue: boolean): void; + + /** + */ + igBrowseButton(optionLiteral: 'option', optionName: "multipleFiles"): boolean; + + /** + */ + igBrowseButton(optionLiteral: 'option', optionName: "multipleFiles", optionValue: boolean): void; + + /** + * M.H. 13 Feb 2014 Fix for bug #164347: Move input from document body to the upload container + */ + igBrowseButton(optionLiteral: 'option', optionName: "container"): any; + + /** + * M.H. 13 Feb 2014 Fix for bug #164347: Move input from document body to the upload container + * + * @optionValue New value to be set. + */ + igBrowseButton(optionLiteral: 'option', optionName: "container", optionValue: any): void; + igBrowseButton(options: IgBrowseButton): JQuery; + igBrowseButton(optionLiteral: 'option', optionName: string): any; + igBrowseButton(optionLiteral: 'option', options: IgBrowseButton): JQuery; + igBrowseButton(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igBrowseButton(methodName: string, ...methodParams: any[]): any; +} +interface JQuery { + igUpload(methodName: "container"): void; + igUpload(methodName: "widget"): void; + igUpload(methodName: "clearAll"): void; + igUpload(methodName: "addDataField", formData: Object, field: Object): void; + igUpload(methodName: "addDataFields", formData: Object, fields: any[]): void; + igUpload(methodName: "startUpload", formNumber: number): void; + igUpload(methodName: "cancelUpload", formNumber: number): void; + igUpload(methodName: "destroy"): void; + igUpload(methodName: "getFileInfoData"): Object; + igUpload(methodName: "cancelAll"): void; + igUpload(methodName: "getFileInfo", fileIndex: number): Object; + + /** + * Get or set width of the main container of the file upload control. Main container contains all buttons, progressbar, etc. + * + */ + igUpload(optionLiteral: 'option', optionName: "width"): number|string; + + /** + * Get or set width of the main container of the file upload control. Main container contains all buttons, progressbar, etc. + * + * + * @optionValue New value to be set. + */ + igUpload(optionLiteral: 'option', optionName: "width", optionValue: number|string): void; + + /** + * Get or set height of the main container of the file upload control. Main container contains all buttons, progressbar, etc. + * + */ + igUpload(optionLiteral: 'option', optionName: "height"): number|string; + + /** + * Get or set height of the main container of the file upload control. Main container contains all buttons, progressbar, etc. + * + * + * @optionValue New value to be set. + */ + igUpload(optionLiteral: 'option', optionName: "height", optionValue: number|string): void; + + /** + * Get or set whether the file start upload automatically when it is selected. Default is false. + * + */ + igUpload(optionLiteral: 'option', optionName: "autostartupload"): boolean; + + /** + * Get or set whether the file start upload automatically when it is selected. Default is false. + * + * + * @optionValue New value to be set. + */ + igUpload(optionLiteral: 'option', optionName: "autostartupload", optionValue: boolean): void; + + /** + * Get or set label for the first shown browse button. When file is selected for the first time this button is hidden. + * + */ + igUpload(optionLiteral: 'option', optionName: "labelUploadButton"): string; + + /** + * Get or set label for the first shown browse button. When file is selected for the first time this button is hidden. + * + * + * @optionValue New value to be set. + */ + igUpload(optionLiteral: 'option', optionName: "labelUploadButton", optionValue: string): void; + + /** + * Get or set label for browse button in main container. + * + */ + igUpload(optionLiteral: 'option', optionName: "labelAddButton"): string; + + /** + * Get or set label for browse button in main container. + * + * + * @optionValue New value to be set. + */ + igUpload(optionLiteral: 'option', optionName: "labelAddButton", optionValue: string): void; + + /** + * Get or set label for summary Clear all button. It will be shown only in multiple upload mode. + * + */ + igUpload(optionLiteral: 'option', optionName: "labelClearAllButton"): string; + + /** + * Get or set label for summary Clear all button. It will be shown only in multiple upload mode. + * + * + * @optionValue New value to be set. + */ + igUpload(optionLiteral: 'option', optionName: "labelClearAllButton", optionValue: string): void; + + /** + * Get or set template for showing summary template. {0} is count of uploaded files. {1} is total count of file to be uploaded. + * + */ + igUpload(optionLiteral: 'option', optionName: "labelSummaryTemplate"): string; + + /** + * Get or set template for showing summary template. {0} is count of uploaded files. {1} is total count of file to be uploaded. + * + * + * @optionValue New value to be set. + */ + igUpload(optionLiteral: 'option', optionName: "labelSummaryTemplate", optionValue: string): void; + + /** + * Get or set template for showing uploading information in summary progress bar. It will be shown only in multiple upload mode. {0} uploaded filesize. {1} - total file size. + * + */ + igUpload(optionLiteral: 'option', optionName: "labelSummaryProgressBarTemplate"): string; + + /** + * Get or set template for showing uploading information in summary progress bar. It will be shown only in multiple upload mode. {0} uploaded filesize. {1} - total file size. + * + * + * @optionValue New value to be set. + */ + igUpload(optionLiteral: 'option', optionName: "labelSummaryProgressBarTemplate", optionValue: string): void; + + /** + * Get or set label for show/hide details button when main container is hidden. + * + */ + igUpload(optionLiteral: 'option', optionName: "labelShowDetails"): string; + + /** + * Get or set label for show/hide details button when main container is hidden. + * + * + * @optionValue New value to be set. + */ + igUpload(optionLiteral: 'option', optionName: "labelShowDetails", optionValue: string): void; + + /** + * Get or set label for show/hide details button when main container is shown. + * + */ + igUpload(optionLiteral: 'option', optionName: "labelHideDetails"): string; + + /** + * Get or set label for show/hide details button when main container is shown. + * + * + * @optionValue New value to be set. + */ + igUpload(optionLiteral: 'option', optionName: "labelHideDetails", optionValue: string): void; + + /** + * Get or set label for button cancelling all files. Shown only in multiple upload mode. + * + */ + igUpload(optionLiteral: 'option', optionName: "labelSummaryProgressButtonCancel"): string; + + /** + * Get or set label for button cancelling all files. Shown only in multiple upload mode. + * + * + * @optionValue New value to be set. + */ + igUpload(optionLiteral: 'option', optionName: "labelSummaryProgressButtonCancel", optionValue: string): void; + + /** + * Get or set label for start upload batch files. Shown only in multiple upload mode and autostartupload is false. + * + */ + igUpload(optionLiteral: 'option', optionName: "labelSummaryProgressButtonContinue"): string; + + /** + * Get or set label for start upload batch files. Shown only in multiple upload mode and autostartupload is false. + * + * + * @optionValue New value to be set. + */ + igUpload(optionLiteral: 'option', optionName: "labelSummaryProgressButtonContinue", optionValue: string): void; + + /** + * Get or set label when upload is finished. Shown only in multiple upload mode. + * + */ + igUpload(optionLiteral: 'option', optionName: "labelSummaryProgressButtonDone"): string; + + /** + * Get or set label when upload is finished. Shown only in multiple upload mode. + * + * + * @optionValue New value to be set. + */ + igUpload(optionLiteral: 'option', optionName: "labelSummaryProgressButtonDone", optionValue: string): void; + + /** + * Get or set filename when it could not be shown the whole file name and should be shorten. + * + */ + igUpload(optionLiteral: 'option', optionName: "labelProgressBarFileNameContinue"): string; + + /** + * Get or set filename when it could not be shown the whole file name and should be shorten. + * + * + * @optionValue New value to be set. + */ + igUpload(optionLiteral: 'option', optionName: "labelProgressBarFileNameContinue", optionValue: string): void; + + /** + * Get or set message shown when max file size of the uploaded file exceeds the limit. + * + */ + igUpload(optionLiteral: 'option', optionName: "errorMessageMaxFileSizeExceeded"): string; + + /** + * Get or set message shown when max file size of the uploaded file exceeds the limit. + * + * + * @optionValue New value to be set. + */ + igUpload(optionLiteral: 'option', optionName: "errorMessageMaxFileSizeExceeded", optionValue: string): void; + + /** + * Get or set error message when ajax call to get file status throws error. + * + */ + igUpload(optionLiteral: 'option', optionName: "errorMessageGetFileStatus"): string; + + /** + * Get or set error message when ajax call to get file status throws error. + * + * + * @optionValue New value to be set. + */ + igUpload(optionLiteral: 'option', optionName: "errorMessageGetFileStatus", optionValue: string): void; + + /** + * Get or set error message when ajax call to send cancel upload command. + * + */ + igUpload(optionLiteral: 'option', optionName: "errorMessageCancelUpload"): string; + + /** + * Get or set error message when ajax call to send cancel upload command. + * + * + * @optionValue New value to be set. + */ + igUpload(optionLiteral: 'option', optionName: "errorMessageCancelUpload", optionValue: string): void; + + /** + * Get or set error message when file is not found. + * + */ + igUpload(optionLiteral: 'option', optionName: "errorMessageNoSuchFile"): string; + + /** + * Get or set error message when file is not found. + * + * + * @optionValue New value to be set. + */ + igUpload(optionLiteral: 'option', optionName: "errorMessageNoSuchFile", optionValue: string): void; + + /** + * Get or set error message different from the other messages. + * + */ + igUpload(optionLiteral: 'option', optionName: "errorMessageOther"): string; + + /** + * Get or set error message different from the other messages. + * + * + * @optionValue New value to be set. + */ + igUpload(optionLiteral: 'option', optionName: "errorMessageOther", optionValue: string): void; + + /** + * Get or set error message when file extension validation failed. + * + */ + igUpload(optionLiteral: 'option', optionName: "errorMessageValidatingFileExtension"): string; + + /** + * Get or set error message when file extension validation failed. + * + * + * @optionValue New value to be set. + */ + igUpload(optionLiteral: 'option', optionName: "errorMessageValidatingFileExtension", optionValue: string): void; + + /** + * Get or set error message when AJAX Request to get file size throws error. + * + */ + igUpload(optionLiteral: 'option', optionName: "errorMessageAJAXRequestFileSize"): string; + + /** + * Get or set error message when AJAX Request to get file size throws error. + * + * + * @optionValue New value to be set. + */ + igUpload(optionLiteral: 'option', optionName: "errorMessageAJAXRequestFileSize", optionValue: string): void; + + /** + * Get or set error message when trying to remove non existing file. + * + */ + igUpload(optionLiteral: 'option', optionName: "errorMessageTryToRemoveNonExistingFile"): string; + + /** + * Get or set error message when trying to remove non existing file. + * + * + * @optionValue New value to be set. + */ + igUpload(optionLiteral: 'option', optionName: "errorMessageTryToRemoveNonExistingFile", optionValue: string): void; + + /** + * Get or set error message when trying to start non existing file. + * + */ + igUpload(optionLiteral: 'option', optionName: "errorMessageTryToStartNonExistingFile"): string; + + /** + * Get or set error message when trying to start non existing file. + * + * + * @optionValue New value to be set. + */ + igUpload(optionLiteral: 'option', optionName: "errorMessageTryToStartNonExistingFile", optionValue: string): void; + + /** + * Get or set error message when maximum allowed files exceeded. + * + */ + igUpload(optionLiteral: 'option', optionName: "errorMessageMaxUploadedFiles"): string; + + /** + * Get or set error message when maximum allowed files exceeded. + * + * + * @optionValue New value to be set. + */ + igUpload(optionLiteral: 'option', optionName: "errorMessageMaxUploadedFiles", optionValue: string): void; + + /** + * Get or set error message when maximum simultaneous files is less or equal to 0. + * + */ + igUpload(optionLiteral: 'option', optionName: "errorMessageMaxSimultaneousFiles"): string; + + /** + * Get or set error message when maximum simultaneous files is less or equal to 0. + * + * + * @optionValue New value to be set. + */ + igUpload(optionLiteral: 'option', optionName: "errorMessageMaxSimultaneousFiles", optionValue: string): void; + + /** + * Get or set error message when trying to drop more than 1 file and mode is single. + */ + igUpload(optionLiteral: 'option', optionName: "errorMessageDropMultipleFilesWhenSingleModel"): string; + + /** + * Get or set error message when trying to drop more than 1 file and mode is single. + * + * @optionValue New value to be set. + */ + igUpload(optionLiteral: 'option', optionName: "errorMessageDropMultipleFilesWhenSingleModel", optionValue: string): void; + + /** + * Get or set URL for uploading. + * + */ + igUpload(optionLiteral: 'option', optionName: "uploadUrl"): string; + + /** + * Get or set URL for uploading. + * + * + * @optionValue New value to be set. + */ + igUpload(optionLiteral: 'option', optionName: "uploadUrl", optionValue: string): void; + + /** + * Get or set URL of HTTPHandler to get information about file upload, current size and also to get commands + * + */ + igUpload(optionLiteral: 'option', optionName: "progressUrl"): string; + + /** + * Get or set URL of HTTPHandler to get information about file upload, current size and also to get commands + * + * + * @optionValue New value to be set. + */ + igUpload(optionLiteral: 'option', optionName: "progressUrl", optionValue: string): void; + + /** + * Get or set file allowed file extensions. When this array is empty - it is not made such validation. Example ["gif", "jpg", "bmp"]. + * + */ + igUpload(optionLiteral: 'option', optionName: "allowedExtensions"): any[]; + + /** + * Get or set file allowed file extensions. When this array is empty - it is not made such validation. Example ["gif", "jpg", "bmp"]. + * + * + * @optionValue New value to be set. + */ + igUpload(optionLiteral: 'option', optionName: "allowedExtensions", optionValue: any[]): void; + + /** + * Get or set whether to show File Extension icon + * + */ + igUpload(optionLiteral: 'option', optionName: "showFileExtensionIcon"): boolean; + + /** + * Get or set whether to show File Extension icon + * + * + * @optionValue New value to be set. + */ + igUpload(optionLiteral: 'option', optionName: "showFileExtensionIcon", optionValue: boolean): void; + + /** + * Get or set control specific CSS options. For example you can override specific control classes with custom ones. + * + */ + igUpload(optionLiteral: 'option', optionName: "css"): any; + + /** + * Get or set control specific CSS options. For example you can override specific control classes with custom ones. + * + * + * @optionValue New value to be set. + */ + igUpload(optionLiteral: 'option', optionName: "css", optionValue: any): void; + + /** + * Set icon css classes for specified file extension + * + */ + igUpload(optionLiteral: 'option', optionName: "fileExtensionIcons"): IgUploadFileExtensionIcons; + + /** + * Set icon css classes for specified file extension + * + * + * @optionValue New value to be set. + */ + igUpload(optionLiteral: 'option', optionName: "fileExtensionIcons", optionValue: IgUploadFileExtensionIcons): void; + + /** + * Get or set multiple or single file upload. In single upload it is possible to upload only one file at the same time. + * + */ + igUpload(optionLiteral: 'option', optionName: "mode"): any; + + /** + * Get or set multiple or single file upload. In single upload it is possible to upload only one file at the same time. + * + * + * @optionValue New value to be set. + */ + igUpload(optionLiteral: 'option', optionName: "mode", optionValue: any): void; + + /** + * Get or set a bool setting that allows user to select(for upload) more than 1 file from the browse dialog at once. HTML 5+ - it is supported by Chrome, MOzilla FF, Safar, Opera latest versions and IE10+ + * + */ + igUpload(optionLiteral: 'option', optionName: "multipleFiles"): boolean; + + /** + * Get or set a bool setting that allows user to select(for upload) more than 1 file from the browse dialog at once. HTML 5+ - it is supported by Chrome, MOzilla FF, Safar, Opera latest versions and IE10+ + * + * + * @optionValue New value to be set. + */ + igUpload(optionLiteral: 'option', optionName: "multipleFiles", optionValue: boolean): void; + + /** + * Get or set the maximum number of allowed files to upload. + * + */ + igUpload(optionLiteral: 'option', optionName: "maxUploadedFiles"): number; + + /** + * Get or set the maximum number of allowed files to upload. + * + * + * @optionValue New value to be set. + */ + igUpload(optionLiteral: 'option', optionName: "maxUploadedFiles", optionValue: number): void; + + /** + * Get or set count of files that could be uploaded at the same time. + * + */ + igUpload(optionLiteral: 'option', optionName: "maxSimultaneousFilesUploads"): number; + + /** + * Get or set count of files that could be uploaded at the same time. + * + * + * @optionValue New value to be set. + */ + igUpload(optionLiteral: 'option', optionName: "maxSimultaneousFilesUploads", optionValue: number): void; + + /** + * Get or set file size metrics how to be shown files size. + * + */ + igUpload(optionLiteral: 'option', optionName: "fileSizeMetric"): any; + + /** + * Get or set file size metrics how to be shown files size. + * + * + * @optionValue New value to be set. + */ + igUpload(optionLiteral: 'option', optionName: "fileSizeMetric", optionValue: any): void; + + /** + * UniqueId of the control - should not be changed by developer. Set from server-side wrapper. + * + */ + igUpload(optionLiteral: 'option', optionName: "controlId"): string; + + /** + * UniqueId of the control - should not be changed by developer. Set from server-side wrapper. + * + * + * @optionValue New value to be set. + */ + igUpload(optionLiteral: 'option', optionName: "controlId", optionValue: string): void; + + /** + * The number of digits after the decimal point. + * + */ + igUpload(optionLiteral: 'option', optionName: "fileSizeDecimalDisplay"): number; + + /** + * The number of digits after the decimal point. + * + * + * @optionValue New value to be set. + */ + igUpload(optionLiteral: 'option', optionName: "fileSizeDecimalDisplay", optionValue: number): void; + + /** + * Maximum size(in bytes) allowed for the file to be uploaded. If it is set to null or -1 there is no limitation otherwise if the size(of the selected file) exceeds this value it is not allowed to be uploaded. This option is used for validation only on client side and only if the browser supports HTML5 file API and share information about the file size + */ + igUpload(optionLiteral: 'option', optionName: "maxFileSize"): any; + + /** + * Maximum size(in bytes) allowed for the file to be uploaded. If it is set to null or -1 there is no limitation otherwise if the size(of the selected file) exceeds this value it is not allowed to be uploaded. This option is used for validation only on client side and only if the browser supports HTML5 file API and share information about the file size + * + * @optionValue New value to be set. + */ + igUpload(optionLiteral: 'option', optionName: "maxFileSize", optionValue: any): void; + + /** + * Defines the name of the file upload selecting event. Fired when browse button is pressed. + * Return false in order to cancel selecting file. + * Function takes arguments evt and ui. + * Use ui.owner in order to access the igUpload widget object. + */ + igUpload(optionLiteral: 'option', optionName: "fileSelecting"): FileSelectingEvent; + + /** + * Defines the name of the file upload selecting event. Fired when browse button is pressed. + * Return false in order to cancel selecting file. + * Function takes arguments evt and ui. + * Use ui.owner in order to access the igUpload widget object. + * + * @optionValue New value to be set. + */ + igUpload(optionLiteral: 'option', optionName: "fileSelecting", optionValue: FileSelectingEvent): void; + + /** + * Defines the name of the file upload selected event. Fired when file is selected from browse dialog. + * Return false in order to cancel uploading file. + * Function takes arguments evt and ui. + * Use ui.fileId to get unique identifier of the file + * Use ui.filePath to get the name of the uploaded file + * Use ui.owner in order to access the igUpload widget object. + */ + igUpload(optionLiteral: 'option', optionName: "fileSelected"): FileSelectedEvent; + + /** + * Defines the name of the file upload selected event. Fired when file is selected from browse dialog. + * Return false in order to cancel uploading file. + * Function takes arguments evt and ui. + * Use ui.fileId to get unique identifier of the file + * Use ui.filePath to get the name of the uploaded file + * Use ui.owner in order to access the igUpload widget object. + * + * @optionValue New value to be set. + */ + igUpload(optionLiteral: 'option', optionName: "fileSelected", optionValue: FileSelectedEvent): void; + + /** + * Defines the name of the file uploading event. Fired every time when fileuploader get status for the upload. + * Return false in order to cancel uploading file. + * Function takes arguments evt and ui. + * Use ui.fileId to get unique identifier of the file + * Use ui.filePath to get the name of the uploaded file + * Use ui.totalSize to get the file size of the uploaded file + * Use ui.uploadedBytes to get uploaded bytes + * Use ui.fileStatus to get current file status + * Use ui.fileInfo to get reference to the fileInfo object - containing information for fileName, fileSize, serverMessage(if returned from server side), etc. + * Use ui.owner in order to access the igUpload widget object. + */ + igUpload(optionLiteral: 'option', optionName: "fileUploading"): FileUploadingEvent; + + /** + * Defines the name of the file uploading event. Fired every time when fileuploader get status for the upload. + * Return false in order to cancel uploading file. + * Function takes arguments evt and ui. + * Use ui.fileId to get unique identifier of the file + * Use ui.filePath to get the name of the uploaded file + * Use ui.totalSize to get the file size of the uploaded file + * Use ui.uploadedBytes to get uploaded bytes + * Use ui.fileStatus to get current file status + * Use ui.fileInfo to get reference to the fileInfo object - containing information for fileName, fileSize, serverMessage(if returned from server side), etc. + * Use ui.owner in order to access the igUpload widget object. + * + * @optionValue New value to be set. + */ + igUpload(optionLiteral: 'option', optionName: "fileUploading", optionValue: FileUploadingEvent): void; + + /** + * Defines the name of the uploaded event. Fired when the file is uploaded + * Function takes arguments evt and ui. + * Use ui.fileId to get unique identifier of the file + * Use ui.filePath to get the name of the uploaded file + * Use ui.totalSize to get the file size of the uploaded file + * Use ui.fileInfo to get reference to the fileInfo object - containing information for fileName, fileSize, serverMessage(if returned from server side), etc. + * Use ui.owner in order to access the igUpload widget object. + */ + igUpload(optionLiteral: 'option', optionName: "fileUploaded"): FileUploadedEvent; + + /** + * Defines the name of the uploaded event. Fired when the file is uploaded + * Function takes arguments evt and ui. + * Use ui.fileId to get unique identifier of the file + * Use ui.filePath to get the name of the uploaded file + * Use ui.totalSize to get the file size of the uploaded file + * Use ui.fileInfo to get reference to the fileInfo object - containing information for fileName, fileSize, serverMessage(if returned from server side), etc. + * Use ui.owner in order to access the igUpload widget object. + * + * @optionValue New value to be set. + */ + igUpload(optionLiteral: 'option', optionName: "fileUploaded", optionValue: FileUploadedEvent): void; + + /** + * Defines the name of the file upload cancel event. Fired when the server responses that the file is canceled. + * Function takes arguments evt and ui. + * Use ui.fileId to get unique identifier of the file + * Use ui.filePath to get the name of the uploaded file + * Use ui.totalSize to get the file size of the uploaded file + * Use ui.uploadedBytes to get uploaded bytes + * Use ui.fileStatus to get current file status + * Use ui.owner in order to access the igUpload widget object. + */ + igUpload(optionLiteral: 'option', optionName: "fileUploadAborted"): FileUploadAbortedEvent; + + /** + * Defines the name of the file upload cancel event. Fired when the server responses that the file is canceled. + * Function takes arguments evt and ui. + * Use ui.fileId to get unique identifier of the file + * Use ui.filePath to get the name of the uploaded file + * Use ui.totalSize to get the file size of the uploaded file + * Use ui.uploadedBytes to get uploaded bytes + * Use ui.fileStatus to get current file status + * Use ui.owner in order to access the igUpload widget object. + * + * @optionValue New value to be set. + */ + igUpload(optionLiteral: 'option', optionName: "fileUploadAborted", optionValue: FileUploadAbortedEvent): void; + + /** + * Defines the name of the cancel all button event click. Fired when cancel all button in summary is clicked. Fired only in multiple upload mode. + * Function takes arguments evt and ui. + * Use ui.owner in order to access the igUpload widget object. + */ + igUpload(optionLiteral: 'option', optionName: "cancelAllClicked"): CancelAllClickedEvent; + + /** + * Defines the name of the cancel all button event click. Fired when cancel all button in summary is clicked. Fired only in multiple upload mode. + * Function takes arguments evt and ui. + * Use ui.owner in order to access the igUpload widget object. + * + * @optionValue New value to be set. + */ + igUpload(optionLiteral: 'option', optionName: "cancelAllClicked", optionValue: CancelAllClickedEvent): void; + + /** + * Defines the name of the file upload error event. Fired when error is occurred. + * Function takes arguments evt and ui. + * Use ui.errorCode to get current errorCode + * Use ui.fileId to get identifier of the file for which the event is fired(after that it can be used API function getFileInfo). NOTE: It is possible to be null in some cases: try to drop multiple files when mode is single , check maximum allowed uploading files fails or check for count of maximum allowed simultaneous files upload fails. + * Use ui.errorMessage to get detailed error description + * Use ui.errorType to get error type - it could be clientside or serverside + * Use ui.serverMessage to get specific server message returned by server - if errorType is serverside + * Use ui.owner in order to access the igUpload widget object. + */ + igUpload(optionLiteral: 'option', optionName: "onError"): OnErrorEvent; + + /** + * Defines the name of the file upload error event. Fired when error is occurred. + * Function takes arguments evt and ui. + * Use ui.errorCode to get current errorCode + * Use ui.fileId to get identifier of the file for which the event is fired(after that it can be used API function getFileInfo). NOTE: It is possible to be null in some cases: try to drop multiple files when mode is single , check maximum allowed uploading files fails or check for count of maximum allowed simultaneous files upload fails. + * Use ui.errorMessage to get detailed error description + * Use ui.errorType to get error type - it could be clientside or serverside + * Use ui.serverMessage to get specific server message returned by server - if errorType is serverside + * Use ui.owner in order to access the igUpload widget object. + * + * @optionValue New value to be set. + */ + igUpload(optionLiteral: 'option', optionName: "onError", optionValue: OnErrorEvent): void; + + /** + * It is fired when validating file extensions + * Function takes arguments evt and ui. + * Use ui.fileName to get the full file name + * Use ui.fileExtension to get file extension + * Use ui.owner in order to access the igUpload widget object. + */ + igUpload(optionLiteral: 'option', optionName: "fileExtensionsValidating"): FileExtensionsValidatingEvent; + + /** + * It is fired when validating file extensions + * Function takes arguments evt and ui. + * Use ui.fileName to get the full file name + * Use ui.fileExtension to get file extension + * Use ui.owner in order to access the igUpload widget object. + * + * @optionValue New value to be set. + */ + igUpload(optionLiteral: 'option', optionName: "fileExtensionsValidating", optionValue: FileExtensionsValidatingEvent): void; + + /** + * It is fired when event onload(of XmlHttpRequest) is fired. This event will be fired only if the browser supports HTML5 file API + * Function takes arguments evt and ui. + * Use ui.fileId to get unique identifier of the file + * Use ui.xhr to get reference to the original XMLHttpRequest object + * Use ui.fileInfo to get reference to the fileInfo object - containing information for fileName, fileSize, serverMessage(if returned from the server-side), etc. + * Use ui.owner in order to access the igUpload widget object. + */ + igUpload(optionLiteral: 'option', optionName: "onXHRLoad"): OnXHRLoadEvent; + + /** + * It is fired when event onload(of XmlHttpRequest) is fired. This event will be fired only if the browser supports HTML5 file API + * Function takes arguments evt and ui. + * Use ui.fileId to get unique identifier of the file + * Use ui.xhr to get reference to the original XMLHttpRequest object + * Use ui.fileInfo to get reference to the fileInfo object - containing information for fileName, fileSize, serverMessage(if returned from the server-side), etc. + * Use ui.owner in order to access the igUpload widget object. + * + * @optionValue New value to be set. + */ + igUpload(optionLiteral: 'option', optionName: "onXHRLoad", optionValue: OnXHRLoadEvent): void; + + /** + * It is fired before submitting to the server the uploading file(and its additional data if any). It could be used to append additional data fields to the FormData object(if the browser supports HTML5 file API - like newest Chrome, Firefox, IE11+). If the browser does not support HTML5 file API(IE10 and older) it could be added these data fields(as hidden input fields) to the form. Use the public API function addDataFields. + * Function takes arguments evt and ui. + * Use ui.fileId to get unique identifier of the file + * Use ui.fileInfo to get reference to the fileInfo object - containing information for the fileName, fileSize, serverMessage, etc. + * Use ui.xhr to get reference to the original XMLHttpRequest object(if the browser supports HTML 5 file API - if not it is undefined) + * Use ui.formData to get reference to FormData object(if the browser supports HTML5 file API) OR reference to jQuery representation of + * Use ui.owner in order to access the igUpload widget object. + */ + igUpload(optionLiteral: 'option', optionName: "onFormDataSubmit"): OnFormDataSubmitEvent; + + /** + * It is fired before submitting to the server the uploading file(and its additional data if any). It could be used to append additional data fields to the FormData object(if the browser supports HTML5 file API - like newest Chrome, Firefox, IE11+). If the browser does not support HTML5 file API(IE10 and older) it could be added these data fields(as hidden input fields) to the form. Use the public API function addDataFields. + * Function takes arguments evt and ui. + * Use ui.fileId to get unique identifier of the file + * Use ui.fileInfo to get reference to the fileInfo object - containing information for the fileName, fileSize, serverMessage, etc. + * Use ui.xhr to get reference to the original XMLHttpRequest object(if the browser supports HTML 5 file API - if not it is undefined) + * Use ui.formData to get reference to FormData object(if the browser supports HTML5 file API) OR reference to jQuery representation of + * Use ui.owner in order to access the igUpload widget object. + * + * @optionValue New value to be set. + */ + igUpload(optionLiteral: 'option', optionName: "onFormDataSubmit", optionValue: OnFormDataSubmitEvent): void; + igUpload(options: IgUpload): JQuery; + igUpload(optionLiteral: 'option', optionName: string): any; + igUpload(optionLiteral: 'option', options: IgUpload): JQuery; + igUpload(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igUpload(methodName: string, ...methodParams: any[]): any; +} +interface IgValidatorField { + /** + * Gets the target element (input or control target) to be validated. This field setting is required. + * + * + * Valid values: + * "string" A valid jQuery selector for the element + * "object" A reference to a jQuery object + */ + selector?: string|Object; + + /** + * Option for IgValidatorField + */ + [optionName: string]: any; +} + +interface ValidatingEvent { + (event: Event, ui: ValidatingEventUIParam): void; +} + +interface ValidatingEventUIParam { + /** + * Used to get reference to the igValidator widget. + */ + owner?: any; + + /** + * Used to get current value in target. + */ + value?: any; +} + +interface ValidatedEvent { + (event: Event, ui: ValidatedEventUIParam): void; +} + +interface ValidatedEventUIParam { + /** + * Used to get reference to the igValidator widget. + */ + owner?: any; + + /** + * Used to get current value in target. + */ + value?: any; + + /** + * Used to determine the outcome of the validation. + */ + valid?: any; + + /** + * Used to get text of message. + */ + message?: any; +} + +interface SuccessEvent { + (event: Event, ui: SuccessEventUIParam): void; +} + +interface SuccessEventUIParam { + /** + * Used to get reference to the igValidator widget. + */ + owner?: any; + + /** + * Used to get current value in target. + */ + value?: any; + + /** + * Used to determine the outcome of the validation. + */ + valid?: any; + + /** + * Used to get text of message. + */ + message?: any; +} + +interface ErrorEvent { + (event: Event, ui: ErrorEventUIParam): void; +} + +interface ErrorEventUIParam { + /** + * Used to get reference to the igValidator widget. + */ + owner?: any; + + /** + * Used to get current value in target. + */ + value?: any; + + /** + * Used to determine the outcome of the validation. + */ + valid?: any; + + /** + * Used to get text of message. + */ + message?: any; +} + +interface ErrorShowingEvent { + (event: Event, ui: ErrorShowingEventUIParam): void; +} + +interface ErrorShowingEventUIParam { + /** + * Used to get reference to the igValidator widget. + */ + owner?: any; + + /** + * Used to get text of message. + */ + message?: any; + + /** + * Used to get reference to the target of the message. + */ + target?: any; +} + +interface ErrorHidingEvent { + (event: Event, ui: ErrorHidingEventUIParam): void; +} + +interface ErrorHidingEventUIParam { + /** + * Used to get reference to the igValidator widget. + */ + owner?: any; + + /** + * Used to get text of message. + */ + message?: any; + + /** + * Used to get reference to the target of the message. + */ + target?: any; +} + +interface ErrorShownEvent { + (event: Event, ui: ErrorShownEventUIParam): void; +} + +interface ErrorShownEventUIParam { + /** + * Used to get reference to the igValidator widget. + */ + owner?: any; + + /** + * Used to get text of message. + */ + message?: any; + + /** + * Used to get reference to the target of the message. + */ + target?: any; +} + +interface ErrorHiddenEvent { + (event: Event, ui: ErrorHiddenEventUIParam): void; +} + +interface ErrorHiddenEventUIParam { + /** + * Used to get reference to the igValidator widget. + */ + owner?: any; + + /** + * Used to get text of message. + */ + message?: any; + + /** + * Used to get reference to the target of the message. + */ + target?: any; +} + +interface SuccessShowingEvent { + (event: Event, ui: SuccessShowingEventUIParam): void; +} + +interface SuccessShowingEventUIParam { + /** + * Used to get reference to the igValidator widget. + */ + owner?: any; + + /** + * Used to get text of message. + */ + message?: any; + + /** + * Used to get reference to the target of the message. + */ + target?: any; +} + +interface SuccessHidingEvent { + (event: Event, ui: SuccessHidingEventUIParam): void; +} + +interface SuccessHidingEventUIParam { + /** + * Used to get reference to the igValidator widget. + */ + owner?: any; + + /** + * Used to get text of message. + */ + message?: any; + + /** + * Used to get reference to the target of the message. + */ + target?: any; +} + +interface SuccessShownEvent { + (event: Event, ui: SuccessShownEventUIParam): void; +} + +interface SuccessShownEventUIParam { + /** + * Used to get reference to the igValidator widget. + */ + owner?: any; + + /** + * Used to get text of message. + */ + message?: any; + + /** + * Used to get reference to the target of the message. + */ + target?: any; +} + +interface SuccessHiddenEvent { + (event: Event, ui: SuccessHiddenEventUIParam): void; +} + +interface SuccessHiddenEventUIParam { + /** + * Used to get reference to the igValidator widget. + */ + owner?: any; + + /** + * Used to get text of message. + */ + message?: any; + + /** + * Used to get reference to the target of the message. + */ + target?: any; +} + +interface FormValidatingEvent { + (event: Event, ui: FormValidatingEventUIParam): void; +} + +interface FormValidatingEventUIParam { + /** + * Used to get reference to the igValidator widget. + */ + owner?: any; + + /** + * Used to get reference of the event target form. + */ + target?: any; +} + +interface FormValidatedEvent { + (event: Event, ui: FormValidatedEventUIParam): void; +} + +interface FormValidatedEventUIParam { + /** + * Used to get reference to the igValidator widget. + */ + owner?: any; + + /** + * Used to get reference of the event target form. + */ + target?: any; + + /** + * Used to determine the outcome of the validation. + */ + valid?: any; +} + +interface FormErrorEvent { + (event: Event, ui: FormErrorEventUIParam): void; +} + +interface FormErrorEventUIParam { + /** + * Used to get reference to the igValidator widget. + */ + owner?: any; + + /** + * Used to get reference of the event target form. + */ + target?: any; +} + +interface FormSuccessEvent { + (event: Event, ui: FormSuccessEventUIParam): void; +} + +interface FormSuccessEventUIParam { + /** + * Used to get reference to the igValidator widget. + */ + owner?: any; + + /** + * Used to get reference of the event target form. + */ + target?: any; +} + +interface IgValidator { + /** + * Gets/Sets whether validation is triggered when the text in editor changes. + * Note that this is more appropriate for selection controls such as checkbox, combo or rating. + * As it can cause excessive messages with text-based fields, the initail validation can be delayed via the [threshold](ui.igvalidator#options:threshold) option. + * + */ + onchange?: boolean; + + /** + * Gets/Sets whether validation is triggered when the editor loses focus. + * + */ + onblur?: boolean; + + /** + * Gets/Sets whether validation is triggered when a form containing validation targets is submitting. If any of the validations fail, the submit action will be prevented. + * Note that this doesn't apply to the native JavaScript submit function, but will handle the jQuery equivalent and the browser default action. + * + */ + onsubmit?: boolean; + + /** + * Gets/Sets option to validate if a value was entered (not empty text, selected item, etc.) + * + * + * Valid values: + * "boolean" A boolean value indicating if the field is required. + * "object" A configuration object with optional error message (e.g. required: { errorMessage: "Error!"} ) + */ + required?: boolean|Object; + + /** + * Gets/Sets number validation rule options.Default separators for decimals and thousands are '.' and ',' respectively and are defined in the "$.ui.igValidator.defaults" object. + * + * + * + * Valid values: + * "boolean" A boolean value indicating if the field should be a number. Default separators are used. + * "object" A configuration object with errorMessage, decimalSeparator and thousandsSeparator. Those properties are all optional. + */ + number?: boolean|Object; + + /** + * Gets/Sets date validation rule options. This can additionally help guide the [valueRange](ui.igvalidator#options:valueRange) validation.Note: Dependat on JavaScript Date parsing which will accept a wide range of values. + * + * + * + * Valid values: + * "boolean" A boolean value indicating if the field should be a valid JavaScript Date or can be parsed as one. + * "object" A configuration object with optional error message (e.g. date: { errorMessage: "Enter a valid number"} ) + */ + date?: boolean|Object; + + /** + * Gets/Sets email validation rule options. Uses a RegExp defined in the "$.ui.igValidator.defaults" object. + * + * + * Valid values: + * "boolean" A boolean value indicating if the field should be an email. + * "object" A configuration object with optional error message (e.g. email: { errorMessage: "Enter a valid email"} ) + */ + email?: boolean|Object; + + /** + * Gets/Sets a minimum and/or maximum length of text or number of selected items. Null or 0 values are ignored. + * + * + * Valid values: + * "array" An array of two numbers, where the first value is the minimum and the second is the maximum. (e.g. lengthRange: [ 1, 10] ) + * "object" A configuration object with optional error message. Message strings can contain format items for min and max respecitively (e.g. lengthRange: { min: 6, max: 20, errorMessage: "Password must be at least {0} long and no more than {1}." } ) + */ + lengthRange?: Array|Object; + + /** + * Gets/Sets a minimum and/or maximum value. Null values are ignored. + * + * + * Valid values: + * "array" An array of two numbers or dates, where the first is the minimum and the second is the maximum. (e.g. valueRange: [ 1, 10] ) + * "object" A configuration object with optional error message. Message strings can contain format items for min and max respecitively (e.g. lengthRange: { min: 6, max: 20, errorMessage: "Value must be between {0} and {1}." } ) + */ + valueRange?: Array|Object; + + /** + * Gets/Sets Credit Card number validation rule options.Note: This rule will only validate the checksum of the number using Luhn algorithm irregardless of card type. + * + * + * + * Valid values: + * "boolean" A boolean value indicating if the field should be a valid Credit Card number. + * "object" A configuration object with optional error message (e.g. creditCard: { errorMessage: "Enter a valid card number"} ) + */ + creditCard?: boolean|Object; + + /** + * Gets/Sets regular expression validation rule options. + * + * + * Valid values: + * "string" A string containing regular expression. + * "object" A RegExp object or an object with expression and errorMessage properties. + */ + pattern?: string|Object; + + /** + * Gets/Sets a custom jQuery element to be used for validation messages. That inner HTML of the target is modified, can be a SPAN, LABEL or DIV. + * + */ + messageTarget?: Element; + + /** + * Gets/Sets text for an error message to be used if none is set for the particular rule. Overrides default rule-specific error messages. + * + */ + errorMessage?: string; + + /** + * Gets/Sets text for a success message. Note that since there is no default, setting this message will enable showing success indication. + * + */ + successMessage?: string; + + /** + * Gets/Sets validation minimum input length. Validation won't be triggered for input before that value is reached on change and focus loss. + * Note: This will not affect required fields on form submit. + * + */ + threshold?: number; + + /** + * Gets/Sets a requirement for the value in this field to be the same as another input element or editor control. + * + * + * Valid values: + * "string" A valid jQuery selector for the target element + * "object" A reference to the jQuery object for the target or an object with selector property and custom errorMessage. + */ + equalTo?: string|Object; + + /** + * Gets/Sets a custom function to perform validation. Use 'this' to reference the calling validator and the value and optional field settings arguments to determine and return the state of the field. + * + * + * Valid values: + * "function" The function to call + * "string" Function name, must be in global namespace (window["name"]) + * "object" A configuration object with method property being the function and optional error message. + */ + custom?: Function|string|Object; + + /** + * Gets a list of target field items describing each with validation options and a required selector. Fields can contain any of the validation rules and triggers but not other fields or event handlers. + * Applicable options are also inherited from the global control configuration if not set. + * + */ + fields?: IgValidatorField[]; + + /** + * Gets/Sets the options for the [igNotifier](ui.ignotifier#options) used to show error messages. + * + */ + notificationOptions?: any; + + /** + * Gets/Sets the option to show an asterisks indication next to required fields. + * Note: Indicators are not supported on grouped controls such as checkbox or radio button sets and the igRating control. + * + */ + requiredIndication?: boolean; + + /** + * Gets/Sets the option to show a label indication next to optional fields. + * Note: Indicators are not supported on grouped controls such as checkbox or radio button sets and the igRating control. + * + */ + optionalIndication?: boolean; + + /** + * Event which is raised on validation before default validation logic is applied. + * Return false in order to cancel the event and consider the field valid. + * + * Function takes arguments evt and ui. + * Use ui.owner to get reference to the igValidator widget. + * Use ui.value to get current value in target. + * ui.fieldOptions is populated with options for the specific field in the collection or null. + */ + validating?: ValidatingEvent; + + /** + * Event which is raised after value was validated but before any action takes effect. + * + * Function takes arguments evt and ui. + * Use ui.owner to get reference to the igValidator widget. + * Use ui.value to get current value in target. + * Use ui.valid to determine the outcome of the validation. + * Use ui.message to get text of message. + * ui.rule is populated with the name of the rule that failed validation, if any. + * ui.fieldOptions is populated with options for the specific field in the collection or null. + */ + validated?: ValidatedEvent; + + /** + * Event raised for valid field after value was validated but before any action takes effect. + * Function takes arguments evt and ui. + * + * Use ui.owner to get reference to the igValidator widget. + * Use ui.value to get current value in target. + * Use ui.valid to determine the outcome of the validation. + * Use ui.message to get text of message. + * ui.fieldOptions is populated with options for the specific field in the collection or null. + */ + success?: SuccessEvent; + + /** + * Event raised for invalid field after value was validated but before any action takes effect. + * Function takes arguments evt and ui. + * + * Use ui.owner to get reference to the igValidator widget. + * Use ui.value to get current value in target. + * Use ui.valid to determine the outcome of the validation. + * Use ui.message to get text of message. + * ui.rule is populated with the name of the rule that failed validation. + * ui.fieldOptions is populated with options for the specific field in the collection or null. + */ + error?: ErrorEvent; + + /** + * Event which is raised before error message is displayed. + * Return false in order to prevent error message display. + * + * Function takes arguments evt and ui. + * Use ui.owner to get reference to the igValidator widget. + * Use ui.message to get text of message. + * Use ui.target to get reference to the target of the message. + * ui.fieldOptions is populated with options for the specific field in the collection or null. + */ + errorShowing?: ErrorShowingEvent; + + /** + * Event which is raised before error message is hidden. + * Return false in order to keep the error message displayed. + * + * Function takes arguments evt and ui. + * Use ui.owner to get reference to the igValidator widget. + * Use ui.message to get text of message. + * Use ui.target to get reference to the target of the message. + * ui.fieldOptions is populated with options for the specific field in the collection or null. + */ + errorHiding?: ErrorHidingEvent; + + /** + * Event which is raised after error message was displayed. + * + * Function takes arguments evt and ui. + * Use ui.owner to get reference to the igValidator widget. + * Use ui.message to get text of message. + * Use ui.target to get reference to the target of the message. + * ui.fieldOptions is populated with options for the specific field in the collection or null. + */ + errorShown?: ErrorShownEvent; + + /** + * Event which is raised after error message was hidden. + * + * Function takes arguments evt and ui. + * Use ui.owner to get reference to the igValidator widget. + * Use ui.message to get text of message. + * Use ui.target to get reference to the target of the message. + * ui.fieldOptions is populated with options for the specific field in the collection or null. + */ + errorHidden?: ErrorHiddenEvent; + + /** + * Event which is raised before success message is displayed. + * Return false in order to prevent success message display. + * + * Function takes arguments evt and ui. + * Use ui.owner to get reference to the igValidator widget. + * Use ui.message to get text of message. + * Use ui.target to get reference to the target of the message. + * ui.fieldOptions is populated with options for the specific field in the collection or null. + */ + successShowing?: SuccessShowingEvent; + + /** + * Event which is raised before success message is hidden. + * Return false in order to keep success message displayed. + * + * Function takes arguments evt and ui. + * Use ui.owner to get reference to the igValidator widget. + * Use ui.message to get text of message. + * Use ui.target to get reference to the target of the message. + * ui.fieldOptions is populated with options for the specific field in the collection or null. + */ + successHiding?: SuccessHidingEvent; + + /** + * Event which is raised after success message was displayed. + * + * Function takes arguments evt and ui. + * Use ui.owner to get reference to the igValidator widget. + * Use ui.message to get text of message. + * Use ui.target to get reference to the target of the message. + * ui.fieldOptions is populated with options for the specific field in the collection or null. + */ + successShown?: SuccessShownEvent; + + /** + * Event which is raised after success message was hidden. + * + * Function takes arguments evt and ui. + * Use ui.owner to get reference to the igValidator widget. + * Use ui.message to get text of message. + * Use ui.target to get reference to the target of the message. + * ui.fieldOptions is populated with options for the specific field in the collection or null. + */ + successHidden?: SuccessHiddenEvent; + + /** + * Event triggered on Validator instance level before handling a form submit event. + * Return false to cancel to skip validating and potentially allow the submit if no other other validators return erros. + * + * Function takes arguments evt and ui. + * Use ui.owner to get reference to the igValidator widget. + * Use ui.target to get reference of the event target form. + */ + formValidating?: FormValidatingEvent; + + /** + * Event triggered on Validator instance level after validation on form submit event.. + * + * Function takes arguments evt and ui. + * Use ui.owner to get reference to the igValidator widget. + * Use ui.target to get reference of the event target form. + * Use ui.valid to determine the outcome of the validation. + */ + formValidated?: FormValidatedEvent; + + /** + * Event triggered on Validator instance level after failed validation on form submit event. + * + * Function takes arguments evt and ui. + * Use ui.owner to get reference to the igValidator widget. + * Use ui.target to get reference of the event target form. + */ + formError?: FormErrorEvent; + + /** + * Event triggered on Validator instance level after successful validation on form submit event. + * + * Function takes arguments evt and ui. + * Use ui.owner to get reference to the igValidator widget. + * Use ui.target to get reference of the event target form. + */ + formSuccess?: FormSuccessEvent; + + /** + * Option for igValidator + */ + [optionName: string]: any; +} +interface IgValidatorMethods { + /** + * Trigger validation and show errors for invalid fields. + * + * @param field Optional field object, its selector or zero-based index to check. Only has effect with fields collection and skips other fields. + */ + validate(field?: Object): boolean; + + /** + * Trigger validation but do not display error messages. + * + * @param field Optional field object, its selector or zero-based index to check. Only has effect with fields collection and skips other fields. + */ + isValid(field?: Object): boolean; + + /** + * Hide any possible message(s) (either messageTarget or igNotifier). + * Note: When the validator has a fields colleciton, not passing a field will hide messages on all fields. + * + * @param field Optional field object, its selector or zero-based index to hide message for. + */ + hide(field?: Object): void; + + /** + * Gets all current error messages for invalid field(s). Note that this method does not valdiate and states and messages are only updated on validation, so + * this can be used on formValidated event or after validate/isValid method calls. + * + * @param field Optional field object, selector or zero-based index for a single field to get error message for. + */ + getErrorMessages(field?: Object): any[]; + + /** + * Check for currently displayed message(s). Takes an optional field. + * Note: When the validator has a fields colleciton, not passing a field will return a cumulative true even if just one field has a visible message. + * + * @param field Optional field object, selector or zero-based index for a single field to get error message for. + */ + isMessageDisplayed(field?: Object): boolean; + + /** + * Gets the notifier for the igValidator or for a single filed. + * + * @param field Optional field object, its selector or zero-based index to get notifier for. + */ + notifier(field?: Object): Object; + + /** + * Adds an new input to the fields collection and initializes it with the validator. Note: Additional fields are only accepted if the validator has been created with the collection. + * + * @param field An object with the field selector and options. + */ + addField(field: Object): void; + + /** + * Removes an input from the fields collection. + * + * @param field The field object to remove, its zero-based index or selector. + */ + removeField(field: Object): void; + + /** + * Updates a field in the validator collection. Used to reinitialize field in case a control has been created after the validator or to pass in new options. + * + * @param field The field object to update, its zero-based index or selector. + * @param fieldOptions New options to apply to the field. + */ + updateField(field: Object, fieldOptions?: Object): void; + + /** + * Destroys the validator widget. + */ + destroy(): void; +} +interface JQuery { + data(propertyName: "igValidator"): IgValidatorMethods; +} + +declare namespace Infragistics { + class IgValidatorBaseRule { + constructor(name: string); + constructor(formatItems: any[]); + + /** + * Gets the error message type to get from locale settings (matching as "Message>"). Returns the rule name by default. + * Only used when there's no errorMessage option available through getRuleMessage. + * + * @param options + */ + getMessageType(options: Object): string; + + /** + * Gets an errorMessage from either the rule or field/global options. + * + * @param options + */ + getRuleMessage(options: Object): string; + + /** + * Formats an error message using rule-specific values (usually from formatItems). + * + * @param message The unformatted error message the validator intends to display. + */ + formatMessage(message: string): string; + + /** + * Validates a value against this rule and returns the result. + * + * @param options Options for the validator, if fields are used this parameter is already populated with inherited ones. + * @param value The value to check. + */ + isValid(options: Object, value: Object): boolean; + } +} +interface IgniteUIStatic { + IgValidatorBaseRule: typeof Infragistics.IgValidatorBaseRule; +} + +declare namespace Infragistics { + class IgValidatorRequiredRule { + constructor(name: string); + constructor(groupTypes: any[]); + constructor(groupMessageName: string); + constructor(formatItems: any[]); + getMessageType(options: Object): void; + isValid(options: Object, value: Object): void; + + /** + * Gets an errorMessage from either the rule or field/global options. + * + * @param options + */ + getRuleMessage(options: Object): string; + + /** + * Formats an error message using rule-specific values (usually from formatItems). + * + * @param message The unformatted error message the validator intends to display. + */ + formatMessage(message: string): string; + } +} +interface IgniteUIStatic { + IgValidatorRequiredRule: typeof Infragistics.IgValidatorRequiredRule; +} + +declare namespace Infragistics { + class IgValidatorControlRule { + constructor(name: string); + constructor(formatItems: any[]); + getMessageType(): void; + + /** + * Returns an error message for the rule from options + * + * @param options + */ + getRuleMessage(options: Object): void; + isValid(options: Object): void; + + /** + * Formats an error message using rule-specific values (usually from formatItems). + * + * @param message The unformatted error message the validator intends to display. + */ + formatMessage(message: string): string; + } +} +interface IgniteUIStatic { + IgValidatorControlRule: typeof Infragistics.IgValidatorControlRule; +} + +declare namespace Infragistics { + class IgValidatorNumberRule { + constructor(name: string); + constructor(formatItems: any[]); + isValid(options: Object, value: Object): void; + + /** + * Gets the error message type to get from locale settings (matching as "Message>"). Returns the rule name by default. + * Only used when there's no errorMessage option available through getRuleMessage. + * + * @param options + */ + getMessageType(options: Object): string; + + /** + * Gets an errorMessage from either the rule or field/global options. + * + * @param options + */ + getRuleMessage(options: Object): string; + + /** + * Formats an error message using rule-specific values (usually from formatItems). + * + * @param message The unformatted error message the validator intends to display. + */ + formatMessage(message: string): string; + } +} +interface IgniteUIStatic { + IgValidatorNumberRule: typeof Infragistics.IgValidatorNumberRule; +} + +declare namespace Infragistics { + class IgValidatorDateRule { + constructor(name: string); + constructor(formatItems: any[]); + isValid(options: Object, value: Object): void; + + /** + * Gets the error message type to get from locale settings (matching as "Message>"). Returns the rule name by default. + * Only used when there's no errorMessage option available through getRuleMessage. + * + * @param options + */ + getMessageType(options: Object): string; + + /** + * Gets an errorMessage from either the rule or field/global options. + * + * @param options + */ + getRuleMessage(options: Object): string; + + /** + * Formats an error message using rule-specific values (usually from formatItems). + * + * @param message The unformatted error message the validator intends to display. + */ + formatMessage(message: string): string; + } +} +interface IgniteUIStatic { + IgValidatorDateRule: typeof Infragistics.IgValidatorDateRule; +} + +declare namespace Infragistics { + class IgValidatorLengthRule { + constructor(name: string); + constructor(formatItems: any[]); + getMessageType(): void; + isValid(options: Object, value: Object): void; + + /** + * Gets an errorMessage from either the rule or field/global options. + * + * @param options + */ + getRuleMessage(options: Object): string; + + /** + * Formats an error message using rule-specific values (usually from formatItems). + * + * @param message The unformatted error message the validator intends to display. + */ + formatMessage(message: string): string; + } +} +interface IgniteUIStatic { + IgValidatorLengthRule: typeof Infragistics.IgValidatorLengthRule; +} + +declare namespace Infragistics { + class IgValidatorValueRule { + constructor(name: string); + constructor(formatItems: any[]); + getMessageType(): void; + isValid(options: Object, value: Object): void; + } +} +interface IgniteUIStatic { + IgValidatorValueRule: typeof Infragistics.IgValidatorValueRule; +} + +declare namespace Infragistics { + class IgValidatorEqualToRule { + constructor(name: string); + constructor(formatItems: any[]); + isValid(options: Object, value: Object): void; + + /** + * Gets the error message type to get from locale settings (matching as "Message>"). Returns the rule name by default. + * Only used when there's no errorMessage option available through getRuleMessage. + * + * @param options + */ + getMessageType(options: Object): string; + + /** + * Gets an errorMessage from either the rule or field/global options. + * + * @param options + */ + getRuleMessage(options: Object): string; + + /** + * Formats an error message using rule-specific values (usually from formatItems). + * + * @param message The unformatted error message the validator intends to display. + */ + formatMessage(message: string): string; + } +} +interface IgniteUIStatic { + IgValidatorEqualToRule: typeof Infragistics.IgValidatorEqualToRule; +} + +declare namespace Infragistics { + class IgValidatorEmailRule { + constructor(name: string); + constructor(formatItems: any[]); + isValid(options: Object, value: Object): void; + + /** + * Gets the error message type to get from locale settings (matching as "Message>"). Returns the rule name by default. + * Only used when there's no errorMessage option available through getRuleMessage. + * + * @param options + */ + getMessageType(options: Object): string; + + /** + * Gets an errorMessage from either the rule or field/global options. + * + * @param options + */ + getRuleMessage(options: Object): string; + + /** + * Formats an error message using rule-specific values (usually from formatItems). + * + * @param message The unformatted error message the validator intends to display. + */ + formatMessage(message: string): string; + } +} +interface IgniteUIStatic { + IgValidatorEmailRule: typeof Infragistics.IgValidatorEmailRule; +} + +declare namespace Infragistics { + class IgValidatorPatternRule { + constructor(name: string); + constructor(formatItems: any[]); + isValid(options: Object, value: Object): void; + + /** + * Gets the error message type to get from locale settings (matching as "Message>"). Returns the rule name by default. + * Only used when there's no errorMessage option available through getRuleMessage. + * + * @param options + */ + getMessageType(options: Object): string; + + /** + * Gets an errorMessage from either the rule or field/global options. + * + * @param options + */ + getRuleMessage(options: Object): string; + + /** + * Formats an error message using rule-specific values (usually from formatItems). + * + * @param message The unformatted error message the validator intends to display. + */ + formatMessage(message: string): string; + } +} +interface IgniteUIStatic { + IgValidatorPatternRule: typeof Infragistics.IgValidatorPatternRule; +} + +declare namespace Infragistics { + class IgValidatorCustomRule { + constructor(name: string); + constructor(formatItems: any[]); + getMessageType(): void; + isValid(options: Object, value: Object): void; + + /** + * Gets an errorMessage from either the rule or field/global options. + * + * @param options + */ + getRuleMessage(options: Object): string; + + /** + * Formats an error message using rule-specific values (usually from formatItems). + * + * @param message The unformatted error message the validator intends to display. + */ + formatMessage(message: string): string; + } +} +interface IgniteUIStatic { + IgValidatorCustomRule: typeof Infragistics.IgValidatorCustomRule; +} + +declare namespace Infragistics { + class IgValidatorCreditCardRule { + constructor(name: string); + constructor(formatItems: any[]); + + /** + * Based on ASP.NET CreditCardAttribute check, + * https://github.com/Microsoft/referencesource/blob/master/System.ComponentModel.DataAnnotations/DataAnnotations/CreditCardAttribute.cs + * using Luhn algorithm https://en.wikipedia.org/wiki/Luhn_algorithm + * + * @param options + * @param value + */ + isValid(options: Object, value: Object): void; + + /** + * Gets the error message type to get from locale settings (matching as "Message>"). Returns the rule name by default. + * Only used when there's no errorMessage option available through getRuleMessage. + * + * @param options + */ + getMessageType(options: Object): string; + + /** + * Gets an errorMessage from either the rule or field/global options. + * + * @param options + */ + getRuleMessage(options: Object): string; + + /** + * Formats an error message using rule-specific values (usually from formatItems). + * + * @param message The unformatted error message the validator intends to display. + */ + formatMessage(message: string): string; + } +} +interface IgniteUIStatic { + IgValidatorCreditCardRule: typeof Infragistics.IgValidatorCreditCardRule; +} + +interface JQuery { + igValidator(methodName: "validate", field?: Object): boolean; + igValidator(methodName: "isValid", field?: Object): boolean; + igValidator(methodName: "hide", field?: Object): void; + igValidator(methodName: "getErrorMessages", field?: Object): any[]; + igValidator(methodName: "isMessageDisplayed", field?: Object): boolean; + igValidator(methodName: "notifier", field?: Object): Object; + igValidator(methodName: "addField", field: Object): void; + igValidator(methodName: "removeField", field: Object): void; + igValidator(methodName: "updateField", field: Object, fieldOptions?: Object): void; + igValidator(methodName: "destroy"): void; + + /** + * Gets/Sets whether validation is triggered when the text in editor changes. + * Note that this is more appropriate for selection controls such as checkbox, combo or rating. + * As it can cause excessive messages with text-based fields, the initail validation can be delayed via the [threshold](ui.igvalidator#options:threshold) option. + * + */ + igValidator(optionLiteral: 'option', optionName: "onchange"): boolean; + + /** + * /Sets whether validation is triggered when the text in editor changes. + * Note that this is more appropriate for selection controls such as checkbox, combo or rating. + * As it can cause excessive messages with text-based fields, the initail validation can be delayed via the [threshold](ui.igvalidator#options:threshold) option. + * + * + * @optionValue New value to be set. + */ + igValidator(optionLiteral: 'option', optionName: "onchange", optionValue: boolean): void; + + /** + * Gets/Sets whether validation is triggered when the editor loses focus. + * + */ + igValidator(optionLiteral: 'option', optionName: "onblur"): boolean; + + /** + * /Sets whether validation is triggered when the editor loses focus. + * + * + * @optionValue New value to be set. + */ + igValidator(optionLiteral: 'option', optionName: "onblur", optionValue: boolean): void; + + /** + * Gets/Sets whether validation is triggered when a form containing validation targets is submitting. If any of the validations fail, the submit action will be prevented. + * Note that this doesn't apply to the native JavaScript submit function, but will handle the jQuery equivalent and the browser default action. + * + */ + igValidator(optionLiteral: 'option', optionName: "onsubmit"): boolean; + + /** + * /Sets whether validation is triggered when a form containing validation targets is submitting. If any of the validations fail, the submit action will be prevented. + * Note that this doesn't apply to the native JavaScript submit function, but will handle the jQuery equivalent and the browser default action. + * + * + * @optionValue New value to be set. + */ + igValidator(optionLiteral: 'option', optionName: "onsubmit", optionValue: boolean): void; + + /** + * Gets/Sets option to validate if a value was entered (not empty text, selected item, etc.) + * + */ + igValidator(optionLiteral: 'option', optionName: "required"): boolean|Object; + + /** + * /Sets option to validate if a value was entered (not empty text, selected item, etc.) + * + * + * @optionValue New value to be set. + */ + igValidator(optionLiteral: 'option', optionName: "required", optionValue: boolean|Object): void; + + /** + * Gets/Sets number validation rule options.Default separators for decimals and thousands are '.' and ',' respectively and are defined in the "$.ui.igValidator.defaults" object. + * + * + */ + igValidator(optionLiteral: 'option', optionName: "number"): boolean|Object; + + /** + * /Sets number validation rule options.Default separators for decimals and thousands are '.' and ',' respectively and are defined in the "$.ui.igValidator.defaults" object. + * + * + * + * @optionValue New value to be set. + */ + igValidator(optionLiteral: 'option', optionName: "number", optionValue: boolean|Object): void; + + /** + * Gets/Sets date validation rule options. This can additionally help guide the [valueRange](ui.igvalidator#options:valueRange) validation.Note: Dependat on JavaScript Date parsing which will accept a wide range of values. + * + * + */ + igValidator(optionLiteral: 'option', optionName: "date"): boolean|Object; + + /** + * /Sets date validation rule options. This can additionally help guide the [valueRange](ui.igvalidator#options:valueRange) validation.Note: Dependat on JavaScript Date parsing which will accept a wide range of values. + * + * + * + * @optionValue New value to be set. + */ + igValidator(optionLiteral: 'option', optionName: "date", optionValue: boolean|Object): void; + + /** + * Gets/Sets email validation rule options. Uses a RegExp defined in the "$.ui.igValidator.defaults" object. + * + */ + igValidator(optionLiteral: 'option', optionName: "email"): boolean|Object; + + /** + * /Sets email validation rule options. Uses a RegExp defined in the "$.ui.igValidator.defaults" object. + * + * + * @optionValue New value to be set. + */ + igValidator(optionLiteral: 'option', optionName: "email", optionValue: boolean|Object): void; + + /** + * Gets/Sets a minimum and/or maximum length of text or number of selected items. Null or 0 values are ignored. + * + */ + igValidator(optionLiteral: 'option', optionName: "lengthRange"): Array|Object; + + /** + * /Sets a minimum and/or maximum length of text or number of selected items. Null or 0 values are ignored. + * + * + * @optionValue New value to be set. + */ + igValidator(optionLiteral: 'option', optionName: "lengthRange", optionValue: Array|Object): void; + + /** + * Gets/Sets a minimum and/or maximum value. Null values are ignored. + * + */ + igValidator(optionLiteral: 'option', optionName: "valueRange"): Array|Object; + + /** + * /Sets a minimum and/or maximum value. Null values are ignored. + * + * + * @optionValue New value to be set. + */ + igValidator(optionLiteral: 'option', optionName: "valueRange", optionValue: Array|Object): void; + + /** + * Gets/Sets Credit Card number validation rule options.Note: This rule will only validate the checksum of the number using Luhn algorithm irregardless of card type. + * + * + */ + igValidator(optionLiteral: 'option', optionName: "creditCard"): boolean|Object; + + /** + * /Sets Credit Card number validation rule options.Note: This rule will only validate the checksum of the number using Luhn algorithm irregardless of card type. + * + * + * + * @optionValue New value to be set. + */ + igValidator(optionLiteral: 'option', optionName: "creditCard", optionValue: boolean|Object): void; + + /** + * Gets/Sets regular expression validation rule options. + * + */ + igValidator(optionLiteral: 'option', optionName: "pattern"): string|Object; + + /** + * /Sets regular expression validation rule options. + * + * + * @optionValue New value to be set. + */ + igValidator(optionLiteral: 'option', optionName: "pattern", optionValue: string|Object): void; + + /** + * Gets/Sets a custom jQuery element to be used for validation messages. That inner HTML of the target is modified, can be a SPAN, LABEL or DIV. + * + */ + igValidator(optionLiteral: 'option', optionName: "messageTarget"): Element; + + /** + * /Sets a custom jQuery element to be used for validation messages. That inner HTML of the target is modified, can be a SPAN, LABEL or DIV. + * + * + * @optionValue New value to be set. + */ + igValidator(optionLiteral: 'option', optionName: "messageTarget", optionValue: Element): void; + + /** + * Gets/Sets text for an error message to be used if none is set for the particular rule. Overrides default rule-specific error messages. + * + */ + igValidator(optionLiteral: 'option', optionName: "errorMessage"): string; + + /** + * /Sets text for an error message to be used if none is set for the particular rule. Overrides default rule-specific error messages. + * + * + * @optionValue New value to be set. + */ + igValidator(optionLiteral: 'option', optionName: "errorMessage", optionValue: string): void; + + /** + * Gets/Sets text for a success message. Note that since there is no default, setting this message will enable showing success indication. + * + */ + igValidator(optionLiteral: 'option', optionName: "successMessage"): string; + + /** + * /Sets text for a success message. Note that since there is no default, setting this message will enable showing success indication. + * + * + * @optionValue New value to be set. + */ + igValidator(optionLiteral: 'option', optionName: "successMessage", optionValue: string): void; + + /** + * Gets/Sets validation minimum input length. Validation won't be triggered for input before that value is reached on change and focus loss. + * Note: This will not affect required fields on form submit. + * + */ + igValidator(optionLiteral: 'option', optionName: "threshold"): number; + + /** + * /Sets validation minimum input length. Validation won't be triggered for input before that value is reached on change and focus loss. + * Note: This will not affect required fields on form submit. + * + * + * @optionValue New value to be set. + */ + igValidator(optionLiteral: 'option', optionName: "threshold", optionValue: number): void; + + /** + * Gets/Sets a requirement for the value in this field to be the same as another input element or editor control. + * + */ + igValidator(optionLiteral: 'option', optionName: "equalTo"): string|Object; + + /** + * /Sets a requirement for the value in this field to be the same as another input element or editor control. + * + * + * @optionValue New value to be set. + */ + igValidator(optionLiteral: 'option', optionName: "equalTo", optionValue: string|Object): void; + + /** + * Gets/Sets a custom function to perform validation. Use 'this' to reference the calling validator and the value and optional field settings arguments to determine and return the state of the field. + * + */ + igValidator(optionLiteral: 'option', optionName: "custom"): Function|string|Object; + + /** + * /Sets a custom function to perform validation. Use 'this' to reference the calling validator and the value and optional field settings arguments to determine and return the state of the field. + * + * + * @optionValue New value to be set. + */ + igValidator(optionLiteral: 'option', optionName: "custom", optionValue: Function|string|Object): void; + + /** + * Gets a list of target field items describing each with validation options and a required selector. Fields can contain any of the validation rules and triggers but not other fields or event handlers. + * Applicable options are also inherited from the global control configuration if not set. + * + */ + igValidator(optionLiteral: 'option', optionName: "fields"): IgValidatorField[]; + + /** + * A list of target field items describing each with validation options and a required selector. Fields can contain any of the validation rules and triggers but not other fields or event handlers. + * Applicable options are also inherited from the global control configuration if not set. + * + * + * @optionValue New value to be set. + */ + igValidator(optionLiteral: 'option', optionName: "fields", optionValue: IgValidatorField[]): void; + + /** + * Gets/Sets the options for the [igNotifier](ui.ignotifier#options) used to show error messages. + * + */ + igValidator(optionLiteral: 'option', optionName: "notificationOptions"): any; + + /** + * /Sets the options for the [igNotifier](ui.ignotifier#options) used to show error messages. + * + * + * @optionValue New value to be set. + */ + igValidator(optionLiteral: 'option', optionName: "notificationOptions", optionValue: any): void; + + /** + * Gets/Sets the option to show an asterisks indication next to required fields. + * Note: Indicators are not supported on grouped controls such as checkbox or radio button and the igRating control. + * + */ + igValidator(optionLiteral: 'option', optionName: "requiredIndication"): boolean; + + /** + * /Sets the option to show an asterisks indication next to required fields. + * Note: Indicators are not supported on grouped controls such as checkbox or radio button sets and the igRating control. + * + * + * @optionValue New value to be set. + */ + igValidator(optionLiteral: 'option', optionName: "requiredIndication", optionValue: boolean): void; + + /** + * Gets/Sets the option to show a label indication next to optional fields. + * Note: Indicators are not supported on grouped controls such as checkbox or radio button and the igRating control. + * + */ + igValidator(optionLiteral: 'option', optionName: "optionalIndication"): boolean; + + /** + * /Sets the option to show a label indication next to optional fields. + * Note: Indicators are not supported on grouped controls such as checkbox or radio button sets and the igRating control. + * + * + * @optionValue New value to be set. + */ + igValidator(optionLiteral: 'option', optionName: "optionalIndication", optionValue: boolean): void; + + /** + * Event which is raised on validation before default validation logic is applied. + * Return false in order to cancel the event and consider the field valid. + * + * Function takes arguments evt and ui. + * Use ui.owner to get reference to the igValidator widget. + * Use ui.value to get current value in target. + * ui.fieldOptions is populated with options for the specific field in the collection or null. + */ + igValidator(optionLiteral: 'option', optionName: "validating"): ValidatingEvent; + + /** + * Event which is raised on validation before default validation logic is applied. + * Return false in order to cancel the event and consider the field valid. + * + * Function takes arguments evt and ui. + * Use ui.owner to get reference to the igValidator widget. + * Use ui.value to get current value in target. + * ui.fieldOptions is populated with options for the specific field in the collection or null. + * + * @optionValue Define event handler function. + */ + igValidator(optionLiteral: 'option', optionName: "validating", optionValue: ValidatingEvent): void; + + /** + * Event which is raised after value was validated but before any action takes effect. + * + * Function takes arguments evt and ui. + * Use ui.owner to get reference to the igValidator widget. + * Use ui.value to get current value in target. + * Use ui.valid to determine the outcome of the validation. + * Use ui.message to get text of message. + * ui.rule is populated with the name of the rule that failed validation, if any. + * ui.fieldOptions is populated with options for the specific field in the collection or null. + */ + igValidator(optionLiteral: 'option', optionName: "validated"): ValidatedEvent; + + /** + * Event which is raised after value was validated but before any action takes effect. + * + * Function takes arguments evt and ui. + * Use ui.owner to get reference to the igValidator widget. + * Use ui.value to get current value in target. + * Use ui.valid to determine the outcome of the validation. + * Use ui.message to get text of message. + * ui.rule is populated with the name of the rule that failed validation, if any. + * ui.fieldOptions is populated with options for the specific field in the collection or null. + * + * @optionValue Define event handler function. + */ + igValidator(optionLiteral: 'option', optionName: "validated", optionValue: ValidatedEvent): void; + + /** + * Event raised for valid field after value was validated but before any action takes effect. + * Function takes arguments evt and ui. + * + * Use ui.owner to get reference to the igValidator widget. + * Use ui.value to get current value in target. + * Use ui.valid to determine the outcome of the validation. + * Use ui.message to get text of message. + * ui.fieldOptions is populated with options for the specific field in the collection or null. + */ + igValidator(optionLiteral: 'option', optionName: "success"): SuccessEvent; + + /** + * Event raised for valid field after value was validated but before any action takes effect. + * Function takes arguments evt and ui. + * + * Use ui.owner to get reference to the igValidator widget. + * Use ui.value to get current value in target. + * Use ui.valid to determine the outcome of the validation. + * Use ui.message to get text of message. + * ui.fieldOptions is populated with options for the specific field in the collection or null. + * + * @optionValue Define event handler function. + */ + igValidator(optionLiteral: 'option', optionName: "success", optionValue: SuccessEvent): void; + + /** + * Event raised for invalid field after value was validated but before any action takes effect. + * Function takes arguments evt and ui. + * + * Use ui.owner to get reference to the igValidator widget. + * Use ui.value to get current value in target. + * Use ui.valid to determine the outcome of the validation. + * Use ui.message to get text of message. + * ui.rule is populated with the name of the rule that failed validation. + * ui.fieldOptions is populated with options for the specific field in the collection or null. + */ + igValidator(optionLiteral: 'option', optionName: "error"): ErrorEvent; + + /** + * Event raised for invalid field after value was validated but before any action takes effect. + * Function takes arguments evt and ui. + * + * Use ui.owner to get reference to the igValidator widget. + * Use ui.value to get current value in target. + * Use ui.valid to determine the outcome of the validation. + * Use ui.message to get text of message. + * ui.rule is populated with the name of the rule that failed validation. + * ui.fieldOptions is populated with options for the specific field in the collection or null. + * + * @optionValue Define event handler function. + */ + igValidator(optionLiteral: 'option', optionName: "error", optionValue: ErrorEvent): void; + + /** + * Event which is raised before error message is displayed. + * Return false in order to prevent error message display. + * + * Function takes arguments evt and ui. + * Use ui.owner to get reference to the igValidator widget. + * Use ui.message to get text of message. + * Use ui.target to get reference to the target of the message. + * ui.fieldOptions is populated with options for the specific field in the collection or null. + */ + igValidator(optionLiteral: 'option', optionName: "errorShowing"): ErrorShowingEvent; + + /** + * Event which is raised before error message is displayed. + * Return false in order to prevent error message display. + * + * Function takes arguments evt and ui. + * Use ui.owner to get reference to the igValidator widget. + * Use ui.message to get text of message. + * Use ui.target to get reference to the target of the message. + * ui.fieldOptions is populated with options for the specific field in the collection or null. + * + * @optionValue Define event handler function. + */ + igValidator(optionLiteral: 'option', optionName: "errorShowing", optionValue: ErrorShowingEvent): void; + + /** + * Event which is raised before error message is hidden. + * Return false in order to keep the error message displayed. + * + * Function takes arguments evt and ui. + * Use ui.owner to get reference to the igValidator widget. + * Use ui.message to get text of message. + * Use ui.target to get reference to the target of the message. + * ui.fieldOptions is populated with options for the specific field in the collection or null. + */ + igValidator(optionLiteral: 'option', optionName: "errorHiding"): ErrorHidingEvent; + + /** + * Event which is raised before error message is hidden. + * Return false in order to keep the error message displayed. + * + * Function takes arguments evt and ui. + * Use ui.owner to get reference to the igValidator widget. + * Use ui.message to get text of message. + * Use ui.target to get reference to the target of the message. + * ui.fieldOptions is populated with options for the specific field in the collection or null. + * + * @optionValue Define event handler function. + */ + igValidator(optionLiteral: 'option', optionName: "errorHiding", optionValue: ErrorHidingEvent): void; + + /** + * Event which is raised after error message was displayed. + * + * Function takes arguments evt and ui. + * Use ui.owner to get reference to the igValidator widget. + * Use ui.message to get text of message. + * Use ui.target to get reference to the target of the message. + * ui.fieldOptions is populated with options for the specific field in the collection or null. + */ + igValidator(optionLiteral: 'option', optionName: "errorShown"): ErrorShownEvent; + + /** + * Event which is raised after error message was displayed. + * + * Function takes arguments evt and ui. + * Use ui.owner to get reference to the igValidator widget. + * Use ui.message to get text of message. + * Use ui.target to get reference to the target of the message. + * ui.fieldOptions is populated with options for the specific field in the collection or null. + * + * @optionValue Define event handler function. + */ + igValidator(optionLiteral: 'option', optionName: "errorShown", optionValue: ErrorShownEvent): void; + + /** + * Event which is raised after error message was hidden. + * + * Function takes arguments evt and ui. + * Use ui.owner to get reference to the igValidator widget. + * Use ui.message to get text of message. + * Use ui.target to get reference to the target of the message. + * ui.fieldOptions is populated with options for the specific field in the collection or null. + */ + igValidator(optionLiteral: 'option', optionName: "errorHidden"): ErrorHiddenEvent; + + /** + * Event which is raised after error message was hidden. + * + * Function takes arguments evt and ui. + * Use ui.owner to get reference to the igValidator widget. + * Use ui.message to get text of message. + * Use ui.target to get reference to the target of the message. + * ui.fieldOptions is populated with options for the specific field in the collection or null. + * + * @optionValue Define event handler function. + */ + igValidator(optionLiteral: 'option', optionName: "errorHidden", optionValue: ErrorHiddenEvent): void; + + /** + * Event which is raised before success message is displayed. + * Return false in order to prevent success message display. + * + * Function takes arguments evt and ui. + * Use ui.owner to get reference to the igValidator widget. + * Use ui.message to get text of message. + * Use ui.target to get reference to the target of the message. + * ui.fieldOptions is populated with options for the specific field in the collection or null. + */ + igValidator(optionLiteral: 'option', optionName: "successShowing"): SuccessShowingEvent; + + /** + * Event which is raised before success message is displayed. + * Return false in order to prevent success message display. + * + * Function takes arguments evt and ui. + * Use ui.owner to get reference to the igValidator widget. + * Use ui.message to get text of message. + * Use ui.target to get reference to the target of the message. + * ui.fieldOptions is populated with options for the specific field in the collection or null. + * + * @optionValue Define event handler function. + */ + igValidator(optionLiteral: 'option', optionName: "successShowing", optionValue: SuccessShowingEvent): void; + + /** + * Event which is raised before success message is hidden. + * Return false in order to keep success message displayed. + * + * Function takes arguments evt and ui. + * Use ui.owner to get reference to the igValidator widget. + * Use ui.message to get text of message. + * Use ui.target to get reference to the target of the message. + * ui.fieldOptions is populated with options for the specific field in the collection or null. + */ + igValidator(optionLiteral: 'option', optionName: "successHiding"): SuccessHidingEvent; + + /** + * Event which is raised before success message is hidden. + * Return false in order to keep success message displayed. + * + * Function takes arguments evt and ui. + * Use ui.owner to get reference to the igValidator widget. + * Use ui.message to get text of message. + * Use ui.target to get reference to the target of the message. + * ui.fieldOptions is populated with options for the specific field in the collection or null. + * + * @optionValue Define event handler function. + */ + igValidator(optionLiteral: 'option', optionName: "successHiding", optionValue: SuccessHidingEvent): void; + + /** + * Event which is raised after success message was displayed. + * + * Function takes arguments evt and ui. + * Use ui.owner to get reference to the igValidator widget. + * Use ui.message to get text of message. + * Use ui.target to get reference to the target of the message. + * ui.fieldOptions is populated with options for the specific field in the collection or null. + */ + igValidator(optionLiteral: 'option', optionName: "successShown"): SuccessShownEvent; + + /** + * Event which is raised after success message was displayed. + * + * Function takes arguments evt and ui. + * Use ui.owner to get reference to the igValidator widget. + * Use ui.message to get text of message. + * Use ui.target to get reference to the target of the message. + * ui.fieldOptions is populated with options for the specific field in the collection or null. + * + * @optionValue Define event handler function. + */ + igValidator(optionLiteral: 'option', optionName: "successShown", optionValue: SuccessShownEvent): void; + + /** + * Event which is raised after success message was hidden. + * + * Function takes arguments evt and ui. + * Use ui.owner to get reference to the igValidator widget. + * Use ui.message to get text of message. + * Use ui.target to get reference to the target of the message. + * ui.fieldOptions is populated with options for the specific field in the collection or null. + */ + igValidator(optionLiteral: 'option', optionName: "successHidden"): SuccessHiddenEvent; + + /** + * Event which is raised after success message was hidden. + * + * Function takes arguments evt and ui. + * Use ui.owner to get reference to the igValidator widget. + * Use ui.message to get text of message. + * Use ui.target to get reference to the target of the message. + * ui.fieldOptions is populated with options for the specific field in the collection or null. + * + * @optionValue Define event handler function. + */ + igValidator(optionLiteral: 'option', optionName: "successHidden", optionValue: SuccessHiddenEvent): void; + + /** + * Event triggered on Validator instance level before handling a form submit event. + * Return false to cancel to skip validating and potentially allow the submit if no other other validators return erros. + * + * Function takes arguments evt and ui. + * Use ui.owner to get reference to the igValidator widget. + * Use ui.target to get reference of the event target form. + */ + igValidator(optionLiteral: 'option', optionName: "formValidating"): FormValidatingEvent; + + /** + * Event triggered on Validator instance level before handling a form submit event. + * Return false to cancel to skip validating and potentially allow the submit if no other other validators return erros. + * + * Function takes arguments evt and ui. + * Use ui.owner to get reference to the igValidator widget. + * Use ui.target to get reference of the event target form. + * + * @optionValue Define event handler function. + */ + igValidator(optionLiteral: 'option', optionName: "formValidating", optionValue: FormValidatingEvent): void; + + /** + * Event triggered on Validator instance level after validation on form submit event.. + * + * Function takes arguments evt and ui. + * Use ui.owner to get reference to the igValidator widget. + * Use ui.target to get reference of the event target form. + * Use ui.valid to determine the outcome of the validation. + */ + igValidator(optionLiteral: 'option', optionName: "formValidated"): FormValidatedEvent; + + /** + * Event triggered on Validator instance level after validation on form submit event.. + * + * Function takes arguments evt and ui. + * Use ui.owner to get reference to the igValidator widget. + * Use ui.target to get reference of the event target form. + * Use ui.valid to determine the outcome of the validation. + * + * @optionValue Define event handler function. + */ + igValidator(optionLiteral: 'option', optionName: "formValidated", optionValue: FormValidatedEvent): void; + + /** + * Event triggered on Validator instance level after failed validation on form submit event. + * + * Function takes arguments evt and ui. + * Use ui.owner to get reference to the igValidator widget. + * Use ui.target to get reference of the event target form. + */ + igValidator(optionLiteral: 'option', optionName: "formError"): FormErrorEvent; + + /** + * Event triggered on Validator instance level after failed validation on form submit event. + * + * Function takes arguments evt and ui. + * Use ui.owner to get reference to the igValidator widget. + * Use ui.target to get reference of the event target form. + * + * @optionValue Define event handler function. + */ + igValidator(optionLiteral: 'option', optionName: "formError", optionValue: FormErrorEvent): void; + + /** + * Event triggered on Validator instance level after successful validation on form submit event. + * + * Function takes arguments evt and ui. + * Use ui.owner to get reference to the igValidator widget. + * Use ui.target to get reference of the event target form. + */ + igValidator(optionLiteral: 'option', optionName: "formSuccess"): FormSuccessEvent; + + /** + * Event triggered on Validator instance level after successful validation on form submit event. + * + * Function takes arguments evt and ui. + * Use ui.owner to get reference to the igValidator widget. + * Use ui.target to get reference of the event target form. + * + * @optionValue Define event handler function. + */ + igValidator(optionLiteral: 'option', optionName: "formSuccess", optionValue: FormSuccessEvent): void; + igValidator(options: IgValidator): JQuery; + igValidator(optionLiteral: 'option', optionName: string): any; + igValidator(optionLiteral: 'option', options: IgValidator): JQuery; + igValidator(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igValidator(methodName: string, ...methodParams: any[]): any; +} +interface IgVideoPlayerBookmark { + /** + * Gets/Sets where the bookmark will be positioned. Should be between 0 and movie duration in seconds. + * + */ + time?: number; + + /** + * Gets/Sets bookmark title. It is shown as tooltip on hover. + * + */ + title?: string; + + /** + * Gets/Sets whether the bookmark is disabled or not. + * + */ + disabled?: boolean; + + /** + * Option for IgVideoPlayerBookmark + */ + [optionName: string]: any; +} + +interface IgVideoPlayerRelatedVideo { + /** + * Gets/Sets the URL of the related video image. + * + */ + imageUrl?: string; + + /** + * Gets/Sets the title of the video. + * + */ + title?: string; + + /** + * Gets/Sets the width of the related video image. + * + */ + width?: number; + + /** + * Gets/Sets the height of the related video image. + * + */ + height?: number; + + /** + * Gets/Sets a link to a page that will play the related video. It will be opened in a new window. If there are sources also, the link property has a priority. + * + */ + link?: string; + + /** + * Gets/Sets the sources of the related video. + * + */ + sources?: any[]; + + /** + * Gets/Sets custom CSS class to be applied on the related video element. + * + */ + css?: string; + + /** + * Option for IgVideoPlayerRelatedVideo + */ + [optionName: string]: any; +} + +interface IgVideoPlayerBanner { + /** + * Gets/Sets the banner image url. + * + */ + imageUrl?: string; + + /** + * Gets/Sets an array of numbers. Each number specifies on which second in the movie the banner will pop. + * + */ + times?: any[]; + + /** + * Gets/Sets whether the user will be able to close the banner or not. + * + */ + closeBanner?: boolean; + + /** + * Gets/Sets whether to apply animation effects when showing or hiding the banner. If set to true, the animation is played for banner.duration in milliseconds. + * + */ + animate?: boolean; + + /** + * Gets/Sets whether the banner is visible or not. + * + */ + visible?: boolean; + + /** + * Gets/Sets the banner animation duration. + * + */ + duration?: number; + + /** + * Gets/Sets whether to automatically hide the banner. If set to true, the banner is hidden after [hidedelay](ui.igvideoplayer#options:banners.hidedelay) in milliseconds. + * + */ + autohide?: boolean; + + /** + * Gets/Sets the banner autohide delay in milliseconds. It is taken into account only if the banner.autohide option is set to true. + * + */ + hidedelay?: number; + + /** + * Gets/Sets the banner link that will open in new window. + * + */ + link?: string; + + /** + * Gets/Sets the banner width + * + */ + width?: number|string; + + /** + * Gets/Sets the banner height + * + */ + height?: number|string; + + /** + * Gets/Sets the banner specific css class, that will be applied on the banner grid. + * + */ + css?: string; + + /** + * Option for IgVideoPlayerBanner + */ + [optionName: string]: any; +} + +interface IgVideoPlayerCommercialsLinkedCommercial { + /** + * Gets/Sets the sources of the linked commercial video. + * + */ + sources?: any[]; + + /** + * Gets/Sets the second in the video at which the linked commercial should play. + * + */ + startTime?: number; + + /** + * Gets/Sets the link to open on linked commercial click. + * + */ + link?: string; + + /** + * Gets/Sets the tooltip for the linked commercial bookmark. + * + */ + title?: string; + + /** + * Option for IgVideoPlayerCommercialsLinkedCommercial + */ + [optionName: string]: any; +} + +interface IgVideoPlayerCommercialsEmbeddedCommercial { + /** + * Gets/Sets the start second of the embedded commercial. + * + */ + startTime?: number; + + /** + * Gets/Sets the end second of the embedded commercial. + * + */ + endTime?: number; + + /** + * Gets/Sets the sponsored link of the embedded commercial. + * + */ + link?: string; + + /** + * Gets/Sets the tooltip for the bookmark of the embedded commercial. + * + */ + title?: string; + + /** + * Option for IgVideoPlayerCommercialsEmbeddedCommercial + */ + [optionName: string]: any; +} + +interface IgVideoPlayerCommercialsAdMessage { + /** + * Gets/Sets whether to apply an animation effect when showing or hiding the ad message. If set to true, the animation is played for [animationDuration](ui.igvideoplayer#options:commercials.adMessage.animationDuration) in milliseconds. + * + */ + animate?: boolean; + + /** + * Gets/Sets the ad message auto hide of the commercial. + * + */ + autoHide?: boolean; + + /** + * Gets/Sets the ad message hide delay. + * + */ + hideDelay?: number; + + /** + * Gets/Sets the ad message animation duration of the commercial. + * + */ + animationDuration?: number; + + /** + * Option for IgVideoPlayerCommercialsAdMessage + */ + [optionName: string]: any; +} + +interface IgVideoPlayerCommercials { + /** + * Gets/Sets an array of linked commercial objects. A linked commercial is a separate video file that will be played in the specified position of the original movie clip by [startTime](ui.igvideoplayer#options:commercials.linkedCommercials.startTime). This feature is useful if you have frequently changing outside commercial sources. + * + */ + linkedCommercials?: IgVideoPlayerCommercialsLinkedCommercial[]; + + /** + * Gets/Sets an array of embedded commercials objects. An embedded commercial is an ad that is contained in the original video file. It is suitable when you want to mark some sections of the video as commercials. + * + */ + embeddedCommercials?: IgVideoPlayerCommercialsEmbeddedCommercial[]; + + /** + * Gets/Sets whether the commercials will play againg during the repetitive video plays. + * + */ + alwaysPlayCommercials?: boolean; + + /** + * Gets/Sets whether to show commercial locations or not. + * + */ + showBookmarks?: boolean; + + /** + * Customizes the ad message settings of the commercial. Ad message shows the duration of the commercial and pops up when the commercial starts playing. + * + */ + adMessage?: IgVideoPlayerCommercialsAdMessage; + + /** + * Option for IgVideoPlayerCommercials + */ + [optionName: string]: any; +} + +interface EndedEvent { + (event: Event, ui: EndedEventUIParam): void; +} + +interface EndedEventUIParam { + /** + * Used to get the url of the playing video. + */ + source?: any; + + /** + * Used to get the video duration in seconds. + */ + duration?: any; +} + +interface PlayingEvent { + (event: Event, ui: PlayingEventUIParam): void; +} + +interface PlayingEventUIParam { + /** + * Used to get the url of the playing video. + */ + source?: any; + + /** + * Used to get the video duration in seconds. + */ + duration?: any; +} + +interface PausedEvent { + (event: Event, ui: PausedEventUIParam): void; +} + +interface PausedEventUIParam { + /** + * Used to get the url of the playing video. + */ + source?: any; + + /** + * Used to get the video duration in seconds. + */ + duration?: any; +} + +interface BufferingEvent { + (event: Event, ui: BufferingEventUIParam): void; +} + +interface BufferingEventUIParam { + /** + * Used to get the url of the playing video. + */ + source?: any; + + /** + * Used to get buffered percentage. + */ + buffered?: any; +} + +interface ProgressEvent { + (event: Event, ui: ProgressEventUIParam): void; +} + +interface ProgressEventUIParam { + /** + * Used to get the url of the playing video. + */ + source?: any; + + /** + * Used to get current position in the video at which the event was fired. + */ + currentTime?: any; + + /** + * Used to get the video duration in seconds. + */ + duration?: any; +} + +interface WaitingEvent { + (event: Event, ui: WaitingEventUIParam): void; +} + +interface WaitingEventUIParam { + /** + * Used to get the url of the playing video. + */ + source?: any; + + /** + * Used to get current position in the video at which the event was fired. + */ + currentTime?: any; + + /** + * Used to get the video duration in seconds. + */ + duration?: any; +} + +interface EnterFullScreenEvent { + (event: Event, ui: EnterFullScreenEventUIParam): void; +} + +interface EnterFullScreenEventUIParam { + /** + * Used to get the url of the playing video. + */ + source?: any; +} + +interface ExitFullScreenEvent { + (event: Event, ui: ExitFullScreenEventUIParam): void; +} + +interface ExitFullScreenEventUIParam { + /** + * Used to get the url of the playing video. + */ + source?: any; +} + +interface RelatedVideoClickEvent { + (event: Event, ui: RelatedVideoClickEventUIParam): void; +} + +interface RelatedVideoClickEventUIParam { + /** + * Used to get the relatedVideo object from the relatedVideos array. + */ + relatedVideo?: any; + + /** + * Used to get the relatedVideo html element in the DOM. + */ + relatedVideoElement?: any; +} + +interface BannerVisibleEvent { + (event: Event, ui: BannerVisibleEventUIParam): void; +} + +interface BannerVisibleEventUIParam { + /** + * Used to get the banner index in the banners array. + */ + index?: any; + + /** + * Used to get the banner object from the banners array. + */ + banner?: any; + + /** + * Used to get the banner html element in the DOM. + */ + bannerElement?: any; +} + +interface BannerHiddenEvent { + (event: Event, ui: BannerHiddenEventUIParam): void; +} + +interface BannerHiddenEventUIParam { + /** + * Used to get the banner index in the banners array. + */ + index?: any; + + /** + * Used to get the banner object from the banners array. + */ + banner?: any; + + /** + * Used to get the banner html element in the DOM. + */ + bannerElement?: any; +} + +interface BannerClickEvent { + (event: Event, ui: BannerClickEventUIParam): void; +} + +interface BannerClickEventUIParam { + /** + * Used to get the banner html element in the DOM. + */ + bannerElement?: any; +} + +interface IgVideoPlayer { + /** + * Gets/Sets a list of video sources to choose from. Best coded/format is automatically detected by the control. Supported types are depending on the browser and could be one of the following mov, mp4, webm, ogg. + * + */ + sources?: any[]; + + /** + * Gets/Sets the width of the control. By default null will stretch the control to fit data, if no other widths are defined. + * + */ + width?: string|number; + + /** + * Gets/Sets the height of the control. By default null will stretch the control to fit data, if no other heights are defined. + * + */ + height?: string|number; + + /** + * Gets/Sets a URL to an image to show, when no video data is available. + * + */ + posterUrl?: string; + + /** + * Gets/Sets whether to preload load initial data for duration of video. If true it may start buffering the video, but this highly depends on the specific browser implementation. + * + */ + preload?: boolean; + + /** + * Gets/Sets whether the video should start playing immediately after the control is loaded. + * + */ + autoplay?: boolean; + + /** + * Gets/Sets whether player controls will auto hide when video is not hovered. This is applicable only when Infragistics playback controls are used. + * + */ + autohide?: boolean; + + /** + * Gets/Sets volume slider auto hide delay. This is applicable only when Infragistics playback controls are used. + * + */ + volumeAutohideDelay?: number; + + /** + * Gets/Sets the center big button hide delay. + * + */ + centerButtonHideDelay?: number; + + /** + * Gets/Sets whether the video to start again after it has ended. + * + */ + loop?: boolean; + + /** + * Gets/Sets whether if you want to use the built in browser controls. By default player uses Infragistics playback controls. Note that you may have different look and feel across different browsers if you use the built in browser controls. + * + */ + browserControls?: boolean; + + /** + * Gets/Sets whether the video player to be in full screen or not. This is not a pure full screen, because browsers do not allow that. It just sets 100% width and height to the control. + * + */ + fullscreen?: boolean; + + /** + * Gets/Sets the video volume. It can be between 0.0 and 1.0. + * + */ + volume?: number; + + /** + * Gets/Sets whether the video volume is muted. + * + */ + muted?: boolean; + + /** + * Gets/Sets video title. + * + */ + title?: string; + + /** + * Gets/Sets whether the control seek tool tip will be shown when hovering the video progress bar. + * + */ + showSeekTime?: boolean; + + /** + * Gets/Sets the format of the video progress label. You should use ${currentTime} to represent current playback position and ${duration} to represent video duration. + * + */ + progressLabelFormat?: string; + + /** + * Gets/Sets an array of bookmarks that will be displayed in the video player control. + * + */ + bookmarks?: IgVideoPlayerBookmark[]; + + /** + * Gets/Sets an array of related videos that will be displayed when video playback has ended. + * + */ + relatedVideos?: IgVideoPlayerRelatedVideo[]; + + /** + * Gets/Sets an array of banner objects that will show the banners when the video clip is played. + * + */ + banners?: IgVideoPlayerBanner[]; + + /** + * Gets/Sets an array of commercials objects that will be displayed when the video is playing. + * + */ + commercials?: IgVideoPlayerCommercials; + + /** + * Occurs when video has ended. + * + * Function takes arguments evt and ui. + * Use ui.source to get the url of the playing video. + * Use ui.duration to get the video duration in seconds. + */ + ended?: EndedEvent; + + /** + * Occurs when video gets playing. + * + * Function takes arguments evt and ui. + * Use ui.source to get the url of the playing video. + * Use ui.duration to get the video duration in seconds. + */ + playing?: PlayingEvent; + + /** + * Occurs when video is paused. + * + * Function takes arguments evt and ui. + * Use ui.source to get the url of the playing video. + * Use ui.duration to get the video duration in seconds. + */ + paused?: PausedEvent; + + /** + * Occurs when a chunk of data is buffered. + * + * Function takes arguments evt and ui. + * Use ui.source to get the url of the playing video. + * Use ui.buffered to get buffered percentage. + */ + buffering?: BufferingEvent; + + /** + * Occurs when video has advanced the playback position. + * + * Function takes arguments evt and ui. + * Use ui.source to get the url of the playing video. + * Use ui.currentTime to get current position in the video at which the event was fired. + * Use ui.duration to get the video duration in seconds. + */ + progress?: ProgressEvent; + + /** + * Occurs when igVideoPlayer is waiting for data from the server. + * + * Function takes arguments evt and ui. + * Use ui.source to get the url of the playing video. + * Use ui.currentTime to get current position in the video at which the event was fired. + * Use ui.duration to get the video duration in seconds. + */ + waiting?: WaitingEvent; + + /** + * Occurs when the bookmark is hit. + * + * Function takes arguments evt and ui. + * Use ui.source to get the url of the playing video. + * Use ui.bookmark to get the bookmark object from the bookmarks array. + * Use ui.bookmarkElement to get the html element in the DOM. + */ + bookmarkHit?: BookmarkHitEvent; + + /** + * Occurs when the bookmark is clicked. + * + * Function takes arguments evt and ui. + * Use ui.bookmark to get the bookmark object from the bookmarks array. + * Use ui.bookmarkElement to get the html element in the DOM. + */ + bookmarkClick?: BookmarkClickEvent; + + /** + * Occurs when igVideoPlayer enters full screen mode. + * + * Function takes arguments evt and ui. + * Use ui.source to get the url of the playing video. + */ + enterFullScreen?: EnterFullScreenEvent; + + /** + * Occurs when igVideoPlayer exits full screen mode. + * + * Function takes arguments evt and ui. + * Use ui.source to get the url of the playing video. + */ + exitFullScreen?: ExitFullScreenEvent; + + /** + * Occurs when related video is clicked. + * + * Function takes arguments evt and ui. + * Use ui.relatedVideo to get the relatedVideo object from the relatedVideos array. + * Use ui.relatedVideoElement to get the relatedVideo html element in the DOM. + */ + relatedVideoClick?: RelatedVideoClickEvent; + + /** + * Defines the name of the player banner visible event. Fired when the banner has been displayed. + * + * Function takes arguments evt and ui. + * Use ui.index to get the banner index in the banners array. + * Use ui.banner to get the banner object from the banners array. + * Use ui.bannerElement to get the banner html element in the DOM. + */ + bannerVisible?: BannerVisibleEvent; + + /** + * Occurs when the banner is hidden. + * + * Function takes arguments evt and ui. + * Use ui.index to get the banner index in the banners array. + * Use ui.banner to get the banner object from the banners array. + * Use ui.bannerElement to get the banner html element in the DOM. + */ + bannerHidden?: BannerHiddenEvent; + + /** + * Occurs when the banner is clicked. + * + * Function takes arguments evt and ui. + * Use ui.bannerElement to get the banner html element in the DOM. + */ + bannerClick?: BannerClickEvent; + + /** + * Occurs when browser does not support HTML 5 video. + */ + browserNotSupported?: BrowserNotSupportedEvent; + + /** + * Option for igVideoPlayer + */ + [optionName: string]: any; +} +interface IgVideoPlayerMethods { + /** + * Returns the element on which the widget was instantiated + */ + widget(): void; + + /** + * Hide the add message if shown. + */ + hideAdMessage(): void; + + /** + * Play a linked commercial for this video. + * + * @param commercial Specify the linked commercial to play. + */ + playCommercial(commercial: Object): void; + + /** + * Shows the ad banner, if there is such. + * + * @param index Specify the index of the banner from the banners array. + */ + showBanner(index: number): void; + + /** + * Hide the ad banner, if there is such. + * + * @param index Specify the index of the banner from the banners array. + */ + hideBanner(index: number): void; + + /** + * Resets the commercials, to be shown again. + */ + resetCommercialsShow(): void; + + /** + * Toggle control play state. If video is playing it will pause, if video is paused it will play. + */ + togglePlay(): void; + + /** + * Start playing current loaded video if any. + */ + play(): void; + + /** + * Pause the currently playing video if any. + */ + pause(): void; + + /** + * Gets/Sets the current time of the playing video. + * + * @param val Specify the playback position in seconds to navigate to. + */ + currentTime(val: number): number; + + /** + * Get a screenshot of the current video frame. It returns a canvas object that you can position and show on the page. This depends on the browser support for canvas. + * + * @param scaleFactor Specify scale factor between 0 and 1. + */ + screenshot(scaleFactor?: number): Object; + + /** + * Get whether the current browser supports video tag. + */ + supportsVideo(): boolean; + + /** + * Get whether the current browser supports H.264 codec. + */ + supportsH264BaselineVideo(): boolean; + + /** + * Get whether the current browser supports Theora codec. + */ + supportsOggTheoraVideo(): boolean; + + /** + * Get whether the current browser supports WEBM codec. + */ + supportsWebmVideo(): boolean; + + /** + * Returns whether the currently played video is paused. + */ + paused(): boolean; + + /** + * Get whether the current played video has ended. + */ + ended(): boolean; + + /** + * Get the current duration of the played video. It may be NaN if duration is still not loaded or the video is a live stream. + */ + duration(): number; + + /** + * Get whether the player is seeking to find the new playback position specified. + */ + seeking(): boolean; + + /** + * Destroys the widget. + */ + destroy(): void; +} +interface JQuery { + data(propertyName: "igVideoPlayer"): IgVideoPlayerMethods; +} + +interface JQuery { + igVideoPlayer(methodName: "widget"): void; + igVideoPlayer(methodName: "hideAdMessage"): void; + igVideoPlayer(methodName: "playCommercial", commercial: Object): void; + igVideoPlayer(methodName: "showBanner", index: number): void; + igVideoPlayer(methodName: "hideBanner", index: number): void; + igVideoPlayer(methodName: "resetCommercialsShow"): void; + igVideoPlayer(methodName: "togglePlay"): void; + igVideoPlayer(methodName: "play"): void; + igVideoPlayer(methodName: "pause"): void; + igVideoPlayer(methodName: "currentTime", val: number): number; + igVideoPlayer(methodName: "screenshot", scaleFactor?: number): Object; + igVideoPlayer(methodName: "supportsVideo"): boolean; + igVideoPlayer(methodName: "supportsH264BaselineVideo"): boolean; + igVideoPlayer(methodName: "supportsOggTheoraVideo"): boolean; + igVideoPlayer(methodName: "supportsWebmVideo"): boolean; + igVideoPlayer(methodName: "paused"): boolean; + igVideoPlayer(methodName: "ended"): boolean; + igVideoPlayer(methodName: "duration"): number; + igVideoPlayer(methodName: "seeking"): boolean; + igVideoPlayer(methodName: "destroy"): void; + + /** + * Gets/Sets a list of video sources to choose from. Best coded/format is automatically detected by the control. Supported types are depending on the browser and could be one of the following mov, mp4, webm, ogg. + * + */ + igVideoPlayer(optionLiteral: 'option', optionName: "sources"): any[]; + + /** + * /Sets a list of video sources to choose from. Best coded/format is automatically detected by the control. Supported types are depending on the browser and could be one of the following mov, mp4, webm, ogg. + * + * + * @optionValue New value to be set. + */ + igVideoPlayer(optionLiteral: 'option', optionName: "sources", optionValue: any[]): void; + + /** + * Gets/Sets the width of the control. By default null will stretch the control to fit data, if no other widths are defined. + * + */ + igVideoPlayer(optionLiteral: 'option', optionName: "width"): string|number; + + /** + * /Sets the width of the control. By default null will stretch the control to fit data, if no other widths are defined. + * + * + * @optionValue New value to be set. + */ + igVideoPlayer(optionLiteral: 'option', optionName: "width", optionValue: string|number): void; + + /** + * Gets/Sets the height of the control. By default null will stretch the control to fit data, if no other heights are defined. + * + */ + igVideoPlayer(optionLiteral: 'option', optionName: "height"): string|number; + + /** + * /Sets the height of the control. By default null will stretch the control to fit data, if no other heights are defined. + * + * + * @optionValue New value to be set. + */ + igVideoPlayer(optionLiteral: 'option', optionName: "height", optionValue: string|number): void; + + /** + * Gets/Sets a URL to an image to show, when no video data is available. + * + */ + igVideoPlayer(optionLiteral: 'option', optionName: "posterUrl"): string; + + /** + * /Sets a URL to an image to show, when no video data is available. + * + * + * @optionValue New value to be set. + */ + igVideoPlayer(optionLiteral: 'option', optionName: "posterUrl", optionValue: string): void; + + /** + * Gets/Sets whether to preload load initial data for duration of video. If true it may start buffering the video, but this highly depends on the specific browser implementation. + * + */ + igVideoPlayer(optionLiteral: 'option', optionName: "preload"): boolean; + + /** + * /Sets whether to preload load initial data for duration of video. If true it may start buffering the video, but this highly depends on the specific browser implementation. + * + * + * @optionValue New value to be set. + */ + igVideoPlayer(optionLiteral: 'option', optionName: "preload", optionValue: boolean): void; + + /** + * Gets/Sets whether the video should start playing immediately after the control is loaded. + * + */ + igVideoPlayer(optionLiteral: 'option', optionName: "autoplay"): boolean; + + /** + * /Sets whether the video should start playing immediately after the control is loaded. + * + * + * @optionValue New value to be set. + */ + igVideoPlayer(optionLiteral: 'option', optionName: "autoplay", optionValue: boolean): void; + + /** + * Gets/Sets whether player controls will auto hide when video is not hovered. This is applicable only when Infragistics playback controls are used. + * + */ + igVideoPlayer(optionLiteral: 'option', optionName: "autohide"): boolean; + + /** + * /Sets whether player controls will auto hide when video is not hovered. This is applicable only when Infragistics playback controls are used. + * + * + * @optionValue New value to be set. + */ + igVideoPlayer(optionLiteral: 'option', optionName: "autohide", optionValue: boolean): void; + + /** + * Gets/Sets volume slider auto hide delay. This is applicable only when Infragistics playback controls are used. + * + */ + igVideoPlayer(optionLiteral: 'option', optionName: "volumeAutohideDelay"): number; + + /** + * /Sets volume slider auto hide delay. This is applicable only when Infragistics playback controls are used. + * + * + * @optionValue New value to be set. + */ + igVideoPlayer(optionLiteral: 'option', optionName: "volumeAutohideDelay", optionValue: number): void; + + /** + * Gets/Sets the center big button hide delay. + * + */ + igVideoPlayer(optionLiteral: 'option', optionName: "centerButtonHideDelay"): number; + + /** + * /Sets the center big button hide delay. + * + * + * @optionValue New value to be set. + */ + igVideoPlayer(optionLiteral: 'option', optionName: "centerButtonHideDelay", optionValue: number): void; + + /** + * Gets/Sets whether the video to start again after it has ended. + * + */ + igVideoPlayer(optionLiteral: 'option', optionName: "loop"): boolean; + + /** + * /Sets whether the video to start again after it has ended. + * + * + * @optionValue New value to be set. + */ + igVideoPlayer(optionLiteral: 'option', optionName: "loop", optionValue: boolean): void; + + /** + * Gets/Sets whether if you want to use the built in browser controls. By default player uses Infragistics playback controls. Note that you may have different look and feel across different browsers if you use the built in browser controls. + * + */ + igVideoPlayer(optionLiteral: 'option', optionName: "browserControls"): boolean; + + /** + * /Sets whether if you want to use the built in browser controls. By default player uses Infragistics playback controls. Note that you may have different look and feel across different browsers if you use the built in browser controls. + * + * + * @optionValue New value to be set. + */ + igVideoPlayer(optionLiteral: 'option', optionName: "browserControls", optionValue: boolean): void; + + /** + * Gets/Sets whether the video player to be in full screen or not. This is not a pure full screen, because browsers do not allow that. It just 100% width and height to the control. + * + */ + igVideoPlayer(optionLiteral: 'option', optionName: "fullscreen"): boolean; + + /** + * /Sets whether the video player to be in full screen or not. This is not a pure full screen, because browsers do not allow that. It just sets 100% width and height to the control. + * + * + * @optionValue New value to be set. + */ + igVideoPlayer(optionLiteral: 'option', optionName: "fullscreen", optionValue: boolean): void; + + /** + * Gets/Sets the video volume. It can be between 0.0 and 1.0. + * + */ + igVideoPlayer(optionLiteral: 'option', optionName: "volume"): number; + + /** + * /Sets the video volume. It can be between 0.0 and 1.0. + * + * + * @optionValue New value to be set. + */ + igVideoPlayer(optionLiteral: 'option', optionName: "volume", optionValue: number): void; + + /** + * Gets/Sets whether the video volume is muted. + * + */ + igVideoPlayer(optionLiteral: 'option', optionName: "muted"): boolean; + + /** + * /Sets whether the video volume is muted. + * + * + * @optionValue New value to be set. + */ + igVideoPlayer(optionLiteral: 'option', optionName: "muted", optionValue: boolean): void; + + /** + * Gets/Sets video title. + * + */ + igVideoPlayer(optionLiteral: 'option', optionName: "title"): string; + + /** + * /Sets video title. + * + * + * @optionValue New value to be set. + */ + igVideoPlayer(optionLiteral: 'option', optionName: "title", optionValue: string): void; + + /** + * Gets/Sets whether the control seek tool tip will be shown when hovering the video progress bar. + * + */ + igVideoPlayer(optionLiteral: 'option', optionName: "showSeekTime"): boolean; + + /** + * /Sets whether the control seek tool tip will be shown when hovering the video progress bar. + * + * + * @optionValue New value to be set. + */ + igVideoPlayer(optionLiteral: 'option', optionName: "showSeekTime", optionValue: boolean): void; + + /** + * Gets/Sets the format of the video progress label. You should use ${currentTime} to represent current playback position and ${duration} to represent video duration. + * + */ + igVideoPlayer(optionLiteral: 'option', optionName: "progressLabelFormat"): string; + + /** + * /Sets the format of the video progress label. You should use ${currentTime} to represent current playback position and ${duration} to represent video duration. + * + * + * @optionValue New value to be set. + */ + igVideoPlayer(optionLiteral: 'option', optionName: "progressLabelFormat", optionValue: string): void; + + /** + * Gets/Sets an array of bookmarks that will be displayed in the video player control. + * + */ + igVideoPlayer(optionLiteral: 'option', optionName: "bookmarks"): IgVideoPlayerBookmark[]; + + /** + * /Sets an array of bookmarks that will be displayed in the video player control. + * + * + * @optionValue New value to be set. + */ + igVideoPlayer(optionLiteral: 'option', optionName: "bookmarks", optionValue: IgVideoPlayerBookmark[]): void; + + /** + * Gets/Sets an array of related videos that will be displayed when video playback has ended. + * + */ + igVideoPlayer(optionLiteral: 'option', optionName: "relatedVideos"): IgVideoPlayerRelatedVideo[]; + + /** + * /Sets an array of related videos that will be displayed when video playback has ended. + * + * + * @optionValue New value to be set. + */ + igVideoPlayer(optionLiteral: 'option', optionName: "relatedVideos", optionValue: IgVideoPlayerRelatedVideo[]): void; + + /** + * Gets/Sets an array of banner objects that will show the banners when the video clip is played. + * + */ + igVideoPlayer(optionLiteral: 'option', optionName: "banners"): IgVideoPlayerBanner[]; + + /** + * /Sets an array of banner objects that will show the banners when the video clip is played. + * + * + * @optionValue New value to be set. + */ + igVideoPlayer(optionLiteral: 'option', optionName: "banners", optionValue: IgVideoPlayerBanner[]): void; + + /** + * Gets/Sets an array of commercials objects that will be displayed when the video is playing. + * + */ + igVideoPlayer(optionLiteral: 'option', optionName: "commercials"): IgVideoPlayerCommercials; + + /** + * /Sets an array of commercials objects that will be displayed when the video is playing. + * + * + * @optionValue New value to be set. + */ + igVideoPlayer(optionLiteral: 'option', optionName: "commercials", optionValue: IgVideoPlayerCommercials): void; + + /** + * Occurs when video has ended. + * + * Function takes arguments evt and ui. + * Use ui.source to get the url of the playing video. + * Use ui.duration to get the video duration in seconds. + */ + igVideoPlayer(optionLiteral: 'option', optionName: "ended"): EndedEvent; + + /** + * Occurs when video has ended. + * + * Function takes arguments evt and ui. + * Use ui.source to get the url of the playing video. + * Use ui.duration to get the video duration in seconds. + * + * @optionValue New value to be set. + */ + igVideoPlayer(optionLiteral: 'option', optionName: "ended", optionValue: EndedEvent): void; + + /** + * Occurs when video gets playing. + * + * Function takes arguments evt and ui. + * Use ui.source to get the url of the playing video. + * Use ui.duration to get the video duration in seconds. + */ + igVideoPlayer(optionLiteral: 'option', optionName: "playing"): PlayingEvent; + + /** + * Occurs when video gets playing. + * + * Function takes arguments evt and ui. + * Use ui.source to get the url of the playing video. + * Use ui.duration to get the video duration in seconds. + * + * @optionValue New value to be set. + */ + igVideoPlayer(optionLiteral: 'option', optionName: "playing", optionValue: PlayingEvent): void; + + /** + * Occurs when video is paused. + * + * Function takes arguments evt and ui. + * Use ui.source to get the url of the playing video. + * Use ui.duration to get the video duration in seconds. + */ + igVideoPlayer(optionLiteral: 'option', optionName: "paused"): PausedEvent; + + /** + * Occurs when video is paused. + * + * Function takes arguments evt and ui. + * Use ui.source to get the url of the playing video. + * Use ui.duration to get the video duration in seconds. + * + * @optionValue New value to be set. + */ + igVideoPlayer(optionLiteral: 'option', optionName: "paused", optionValue: PausedEvent): void; + + /** + * Occurs when a chunk of data is buffered. + * + * Function takes arguments evt and ui. + * Use ui.source to get the url of the playing video. + * Use ui.buffered to get buffered percentage. + */ + igVideoPlayer(optionLiteral: 'option', optionName: "buffering"): BufferingEvent; + + /** + * Occurs when a chunk of data is buffered. + * + * Function takes arguments evt and ui. + * Use ui.source to get the url of the playing video. + * Use ui.buffered to get buffered percentage. + * + * @optionValue New value to be set. + */ + igVideoPlayer(optionLiteral: 'option', optionName: "buffering", optionValue: BufferingEvent): void; + + /** + * Occurs when video has advanced the playback position. + * + * Function takes arguments evt and ui. + * Use ui.source to get the url of the playing video. + * Use ui.currentTime to get current position in the video at which the event was fired. + * Use ui.duration to get the video duration in seconds. + */ + igVideoPlayer(optionLiteral: 'option', optionName: "progress"): ProgressEvent; + + /** + * Occurs when video has advanced the playback position. + * + * Function takes arguments evt and ui. + * Use ui.source to get the url of the playing video. + * Use ui.currentTime to get current position in the video at which the event was fired. + * Use ui.duration to get the video duration in seconds. + * + * @optionValue New value to be set. + */ + igVideoPlayer(optionLiteral: 'option', optionName: "progress", optionValue: ProgressEvent): void; + + /** + * Occurs when igVideoPlayer is waiting for data from the server. + * + * Function takes arguments evt and ui. + * Use ui.source to get the url of the playing video. + * Use ui.currentTime to get current position in the video at which the event was fired. + * Use ui.duration to get the video duration in seconds. + */ + igVideoPlayer(optionLiteral: 'option', optionName: "waiting"): WaitingEvent; + + /** + * Occurs when igVideoPlayer is waiting for data from the server. + * + * Function takes arguments evt and ui. + * Use ui.source to get the url of the playing video. + * Use ui.currentTime to get current position in the video at which the event was fired. + * Use ui.duration to get the video duration in seconds. + * + * @optionValue New value to be set. + */ + igVideoPlayer(optionLiteral: 'option', optionName: "waiting", optionValue: WaitingEvent): void; + + /** + * Occurs when the bookmark is hit. + * + * Function takes arguments evt and ui. + * Use ui.source to get the url of the playing video. + * Use ui.bookmark to get the bookmark object from the bookmarks array. + * Use ui.bookmarkElement to get the html element in the DOM. + */ + igVideoPlayer(optionLiteral: 'option', optionName: "bookmarkHit"): BookmarkHitEvent; + + /** + * Occurs when the bookmark is hit. + * + * Function takes arguments evt and ui. + * Use ui.source to get the url of the playing video. + * Use ui.bookmark to get the bookmark object from the bookmarks array. + * Use ui.bookmarkElement to get the html element in the DOM. + * + * @optionValue New value to be set. + */ + igVideoPlayer(optionLiteral: 'option', optionName: "bookmarkHit", optionValue: BookmarkHitEvent): void; + + /** + * Occurs when the bookmark is clicked. + * + * Function takes arguments evt and ui. + * Use ui.bookmark to get the bookmark object from the bookmarks array. + * Use ui.bookmarkElement to get the html element in the DOM. + */ + igVideoPlayer(optionLiteral: 'option', optionName: "bookmarkClick"): BookmarkClickEvent; + + /** + * Occurs when the bookmark is clicked. + * + * Function takes arguments evt and ui. + * Use ui.bookmark to get the bookmark object from the bookmarks array. + * Use ui.bookmarkElement to get the html element in the DOM. + * + * @optionValue New value to be set. + */ + igVideoPlayer(optionLiteral: 'option', optionName: "bookmarkClick", optionValue: BookmarkClickEvent): void; + + /** + * Occurs when igVideoPlayer enters full screen mode. + * + * Function takes arguments evt and ui. + * Use ui.source to get the url of the playing video. + */ + igVideoPlayer(optionLiteral: 'option', optionName: "enterFullScreen"): EnterFullScreenEvent; + + /** + * Occurs when igVideoPlayer enters full screen mode. + * + * Function takes arguments evt and ui. + * Use ui.source to get the url of the playing video. + * + * @optionValue New value to be set. + */ + igVideoPlayer(optionLiteral: 'option', optionName: "enterFullScreen", optionValue: EnterFullScreenEvent): void; + + /** + * Occurs when igVideoPlayer exits full screen mode. + * + * Function takes arguments evt and ui. + * Use ui.source to get the url of the playing video. + */ + igVideoPlayer(optionLiteral: 'option', optionName: "exitFullScreen"): ExitFullScreenEvent; + + /** + * Occurs when igVideoPlayer exits full screen mode. + * + * Function takes arguments evt and ui. + * Use ui.source to get the url of the playing video. + * + * @optionValue New value to be set. + */ + igVideoPlayer(optionLiteral: 'option', optionName: "exitFullScreen", optionValue: ExitFullScreenEvent): void; + + /** + * Occurs when related video is clicked. + * + * Function takes arguments evt and ui. + * Use ui.relatedVideo to get the relatedVideo object from the relatedVideos array. + * Use ui.relatedVideoElement to get the relatedVideo html element in the DOM. + */ + igVideoPlayer(optionLiteral: 'option', optionName: "relatedVideoClick"): RelatedVideoClickEvent; + + /** + * Occurs when related video is clicked. + * + * Function takes arguments evt and ui. + * Use ui.relatedVideo to get the relatedVideo object from the relatedVideos array. + * Use ui.relatedVideoElement to get the relatedVideo html element in the DOM. + * + * @optionValue New value to be set. + */ + igVideoPlayer(optionLiteral: 'option', optionName: "relatedVideoClick", optionValue: RelatedVideoClickEvent): void; + + /** + * Defines the name of the player banner visible event. Fired when the banner has been displayed. + * + * Function takes arguments evt and ui. + * Use ui.index to get the banner index in the banners array. + * Use ui.banner to get the banner object from the banners array. + * Use ui.bannerElement to get the banner html element in the DOM. + */ + igVideoPlayer(optionLiteral: 'option', optionName: "bannerVisible"): BannerVisibleEvent; + + /** + * Defines the name of the player banner visible event. Fired when the banner has been displayed. + * + * Function takes arguments evt and ui. + * Use ui.index to get the banner index in the banners array. + * Use ui.banner to get the banner object from the banners array. + * Use ui.bannerElement to get the banner html element in the DOM. + * + * @optionValue New value to be set. + */ + igVideoPlayer(optionLiteral: 'option', optionName: "bannerVisible", optionValue: BannerVisibleEvent): void; + + /** + * Occurs when the banner is hidden. + * + * Function takes arguments evt and ui. + * Use ui.index to get the banner index in the banners array. + * Use ui.banner to get the banner object from the banners array. + * Use ui.bannerElement to get the banner html element in the DOM. + */ + igVideoPlayer(optionLiteral: 'option', optionName: "bannerHidden"): BannerHiddenEvent; + + /** + * Occurs when the banner is hidden. + * + * Function takes arguments evt and ui. + * Use ui.index to get the banner index in the banners array. + * Use ui.banner to get the banner object from the banners array. + * Use ui.bannerElement to get the banner html element in the DOM. + * + * @optionValue New value to be set. + */ + igVideoPlayer(optionLiteral: 'option', optionName: "bannerHidden", optionValue: BannerHiddenEvent): void; + + /** + * Occurs when the banner is clicked. + * + * Function takes arguments evt and ui. + * Use ui.bannerElement to get the banner html element in the DOM. + */ + igVideoPlayer(optionLiteral: 'option', optionName: "bannerClick"): BannerClickEvent; + + /** + * Occurs when the banner is clicked. + * + * Function takes arguments evt and ui. + * Use ui.bannerElement to get the banner html element in the DOM. + * + * @optionValue New value to be set. + */ + igVideoPlayer(optionLiteral: 'option', optionName: "bannerClick", optionValue: BannerClickEvent): void; + + /** + * Occurs when browser does not support HTML 5 video. + */ + igVideoPlayer(optionLiteral: 'option', optionName: "browserNotSupported"): BrowserNotSupportedEvent; + + /** + * Occurs when browser does not support HTML 5 video. + * + * @optionValue New value to be set. + */ + igVideoPlayer(optionLiteral: 'option', optionName: "browserNotSupported", optionValue: BrowserNotSupportedEvent): void; + igVideoPlayer(options: IgVideoPlayer): JQuery; + igVideoPlayer(optionLiteral: 'option', optionName: string): any; + igVideoPlayer(optionLiteral: 'option', options: IgVideoPlayer): JQuery; + igVideoPlayer(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igVideoPlayer(methodName: string, ...methodParams: any[]): any; +} +interface IgZoombarDefaultZoomWindow { + /** + * The left component of the zoom window in percentages. + * + */ + left?: number; + + /** + * The width of the zoom window in percentages. + * + */ + width?: string; + + /** + * Option for IgZoombarDefaultZoomWindow + */ + [optionName: string]: any; +} + +interface ZoomChangingEvent { + (event: Event, ui: ZoomChangingEventUIParam): void; +} + +interface ZoomChangingEventUIParam { + /** + * Used to get reference to igZoombar. + */ + owner?: any; +} + +interface ZoomChangedEvent { + (event: Event, ui: ZoomChangedEventUIParam): void; +} + +interface ZoomChangedEventUIParam { + /** + * Used to get reference to igZoombar. + */ + owner?: any; +} + +interface ProviderCreatedEvent { + (event: Event, ui: ProviderCreatedEventUIParam): void; +} + +interface ProviderCreatedEventUIParam { + /** + * Used to get the reference the created provider + */ + provider?: any; + + /** + * Used to get reference to igZoombar + */ + owner?: any; +} + +interface WindowDragStartingEvent { + (event: Event, ui: WindowDragStartingEventUIParam): void; +} + +interface WindowDragStartingEventUIParam { + /** + * Used to get reference to igZoombar. + */ + owner?: any; +} + +interface WindowDragStartedEvent { + (event: Event, ui: WindowDragStartedEventUIParam): void; +} + +interface WindowDragStartedEventUIParam { + /** + * Used to get reference to igZoombar. + */ + owner?: any; +} + +interface WindowDraggingEvent { + (event: Event, ui: WindowDraggingEventUIParam): void; +} + +interface WindowDraggingEventUIParam { + /** + * Used to get reference to igZoombar. + */ + owner?: any; +} + +interface WindowDragEndingEvent { + (event: Event, ui: WindowDragEndingEventUIParam): void; +} + +interface WindowDragEndingEventUIParam { + /** + * Used to get reference to igZoombar. + */ + owner?: any; +} + +interface WindowDragEndedEvent { + (event: Event, ui: WindowDragEndedEventUIParam): void; +} + +interface WindowDragEndedEventUIParam { + /** + * Used to get reference to igZoombar. + */ + owner?: any; +} + +interface WindowResizingEvent { + (event: Event, ui: WindowResizingEventUIParam): void; +} + +interface WindowResizingEventUIParam { + /** + * Used to get reference to igZoombar. + */ + owner?: any; +} + +interface IgZoombar { + /** + * Specifies a provider class which interfaces the widget that is being zoomed. + * object Provider class to use. The provider should implement all methods in the $.ig.ZoombarProviderDefault class and is suggested to be extended from it. + */ + provider?: any; + + /** + * Specifies the element on which the widget the Zoombar is attached to is initialized. + * object A valid jQuery object, the first element of which is that element. + * + */ + target?: string|Object; + + /** + * Specifies how the target widget's clone is rendered inside the Zoombar. + * object A valid set of properties to initialize the clone with. + * + * + * Valid values: + * "auto" Options for initializing the clone will be inferred from the target widget. Certain properties will be altered to make the clone more suitable for using inside the Zoombar. + * "none" No clone of the target widget will be initialized inside the Zoombar. + */ + clone?: string|Object; + + /** + * Specifies the width of the Zoombar. + * + * + * Valid values: + * "auto" The width of the Zoombar will be the same as the widget it is attached to. + * "null" The Zoombar will stretch horizontally to fit its container if it has width set, otherwise assumes auto. + */ + width?: string|number; + + /** + * Specifies the height of the Zoombar. + * + * + * Valid values: + * "null" The Zoombar will stretch vertically to fit its container if it has height set, otherwise assumes 70px. + */ + height?: number|string; + + /** + * Specifies when the zoom effect is applied. + * + * + * Valid values: + * "immediate" The zoom action is applied as the end-user interacts with the zoom window. + * "deferred" The zoom action is applied after the interaction with the zoom window completes. + */ + zoomAction?: string; + + /** + * Specifies the distance (in percents) the zoom window moves when the left or right scroll bar buttons are clicked. + * + */ + zoomWindowMoveDistance?: number; + + /** + * Specifies the default zoom in percentages. + * + */ + defaultZoomWindow?: IgZoombarDefaultZoomWindow; + + /** + * The minimal width the zoom window can have in percentages. + * + */ + zoomWindowMinWidth?: number; + + /** + * Specifies the animation duration (in milliseconds) when hover style is applied or removed from elements. + * + */ + hoverStyleAnimationDuration?: number; + + /** + * Specifies the pan duration (in milliseconds) when the window changes position. Set to 0 for snap. + * + */ + windowPanDuration?: number; + + /** + * Initial tabIndex for the Zoombar container elements. + * + */ + tabIndex?: number; + + /** + * Event fired before a zoom action is applied + * Function takes arguments evt and ui. + * Use ui.previousZoom.left to get the previous zoom window left position as a fraction of the absolute width of the target + * Use ui.previousZoom.width to get the previous zoom window width as a fraction of the absolute width of the target + * Use ui.newZoom.left to get the new zoom window left position as a fraction of the absolute width of the target + * Use ui.newZoom.width to get the new zoom window width as a fraction of the absolute width of the target + * Use ui.owner to get reference to igZoombar. + */ + zoomChanging?: ZoomChangingEvent; + + /** + * Event fired after a zoom action is applied. + * Function takes arguments evt and ui. + * Use ui.previousZoom.left to get the previous zoom window left position as a fraction of the absolute width of the target + * Use ui.previousZoom.width to get the previous zoom window width as a fraction of the absolute width of the target + * Use ui.newZoom.left to get the new zoom window left position as a fraction of the absolute width of the target + * Use ui.newZoom.width to get the new zoom window width as a fraction of the absolute width of the target + * Use ui.owner to get reference to igZoombar. + */ + zoomChanged?: ZoomChangedEvent; + + /** + * Event fired after a provider is created based on the options.provider value. If an instance is passed as a value for the option the event won't fire. + * Use the event when utilizing a custom provider to assign options such as the zoomed widget's instance so that the provider's API is usable when igZoombar initializes its rendering. + * Function takes arguments evt and ui. + * Use ui.provider to get the reference the created provider + * Use ui.owner to get reference to igZoombar + */ + providerCreated?: ProviderCreatedEvent; + + /** + * Event fired when the user attempts to drag the zoom window. + * Function takes arguments evt and ui. + * Use ui.zoomWindow.left to get the current zoom window left position as a fraction of the absolute width of the target + * Use ui.zoomWindow.width to get the current zoom window width as a fraction of the absolute width of the target + * Use ui.owner to get reference to igZoombar. + */ + windowDragStarting?: WindowDragStartingEvent; + + /** + * Event fired when the user starts dragging the zoom window. + * Function takes arguments evt and ui. + * Use ui.zoomWindow.left to get the current zoom window left position as a fraction of the absolute width of the target + * Use ui.zoomWindow.width to get the current zoom window width as a fraction of the absolute width of the target + * Use ui.owner to get reference to igZoombar. + */ + windowDragStarted?: WindowDragStartedEvent; + + /** + * Event fired when the user drags the zoom window. + * Function takes arguments evt and ui. + * Use ui.zoomWindow.left to get the current zoom window left position as a fraction of the absolute width of the target + * Use ui.zoomWindow.width to get the current zoom window width as a fraction of the absolute width of the target + * Use ui.owner to get reference to igZoombar. + */ + windowDragging?: WindowDraggingEvent; + + /** + * Event fired when the user attemtps to stop dragging the zoom window. + * Function takes arguments evt and ui. + * Use ui.zoomWindow.left to get the current zoom window left position as a fraction of the absolute width of the target + * Use ui.zoomWindow.width to get the current zoom window width as a fraction of the absolute width of the target + * Use ui.owner to get reference to igZoombar. + */ + windowDragEnding?: WindowDragEndingEvent; + + /** + * Event fired when the user stops dragging the zoom window. + * Function takes arguments evt and ui. + * Use ui.zoomWindow.left to get the current zoom window left position as a fraction of the absolute width of the target + * Use ui.zoomWindow.width to get the current zoom window width as a fraction of the absolute width of the target + * Use ui.owner to get reference to igZoombar. + */ + windowDragEnded?: WindowDragEndedEvent; + + /** + * Event fired when the user resizes the zoom window with the window"s handles. + * Function takes arguments evt and ui. + * Use ui.zoomWindow.left to get the current zoom window left position as a fraction of the absolute width of the target + * Use ui.zoomWindow.width to get the current zoom window width as a fraction of the absolute width of the target + * Use ui.owner to get reference to igZoombar. + */ + windowResizing?: WindowResizingEvent; + + /** + * Event fired after the user resizes the zoom window with the window"s handles. + * Function takes arguments evt and ui. + * Use ui.zoomWindow.left to get the current zoom window left position as a fraction of the absolute width of the target + * Use ui.zoomWindow.width to get the current zoom window width as a fraction of the absolute width of the target + * Use ui.owner to get reference to igZoombar. + */ + windowResized?: WindowResizedEvent; + + /** + * Option for igZoombar + */ + [optionName: string]: any; +} +interface IgZoombarMethods { + /** + * Destroys the Zoombar widget + */ + destroy(): void; + + /** + * Returns the main zoombar element + */ + widget(): void; + + /** + * Returns the ID of the element the zoombar is initialized on + */ + id(): string; + + /** + * Returns the DIV that is the topmost container of the zoombar widget + */ + container(): Element; + + /** + * Returns the element the clone widget is initialized on + */ + clone(): Element; + + /** + * Gets or sets the current zoom window + * + * @param left The left parameter of the new zoom window in percentages + * @param width The width parameter of the new zoom window in percentages + */ + zoom(left?: number, width?: number): Object; +} +interface JQuery { + data(propertyName: "igZoombar"): IgZoombarMethods; +} + +interface ZoombarProviderDefaultSettings { + /** + * Contains the target component's instance + */ + targetObject?: any; + + /** + * Expects two parameters + * a jQuery Event to pass as original for Zoombar's own zoomChanged event + * an object with the following structure: + * { + * oldLeft: number, + * oldWidth: number, + * newLeft: number, + * newWdith: number + * } + * The values should represent the fractions of the total width of the zoomed component in a number ranging from 0 to 1 + */ + zoomChangedCallback?: any; + + /** + * Option for ZoombarProviderDefaultSettings + */ + [optionName: string]: any; +} + +declare namespace Infragistics { + class ZoombarProviderDefault { + constructor(settings: ZoombarProviderDefaultSettings); + + /** + * Will be called before the provider instance is deleted (to unbind jQuery events, etc.) + */ + clean(): void; + + /** + * Gets basic options for initializing the clone, based on the options the target is initialized with + * + * @param options if the Zoombar has a copy of the options object it'll pass it to the provider + */ + getBaseOpts(options: Object): void; + + /** + * Alters specific options so that the the clone is more suitable for its purpose + * + * @param options the base options of the widget obtained from getBaseOpts + */ + cleanOptsForZoom(options: Object): void; + + /** + * Will be called by the Zoombar if a clone of the target widget should be created + * + * @param container a jQuery wrapped element to create the clone component in + * @param options the options that are obtained from cleanOptsForZoom + */ + createClone(container: Object, options: Object): void; + + /** + * Returns the provider"s widget name + */ + widgetName(): void; + + /** + * Returns the target widget width property + */ + targetWidth(): void; + + /** + * Sets the target widget min window width (to be in sync with the same property of the zoombar) + * + * @param minWidth a number from 0 to 1 representing the minimal width (i.e. maximal zoom) the zoom window can take as a fraction of the total one + */ + syncMinWidth(minWidth: number): void; + + /** + * Sets the width and height of the clone component + * + * @param width The width to set in pixels or string (px or % -affixed). + * @param height The height to set in pixels or string (px or % -affixed). + */ + setSize(width: Object, height: Object): void; + + /** + * Gets/sets the target object + * + * @param obj the new target component instance to set + */ + targetObject(obj?: Object): void; + + /** + * Jshint ignore:line + * + * @param a + * @param b + */ + update(a: Object, b: Object): void; + } +} +interface IgniteUIStatic { + ZoombarProviderDefault: typeof Infragistics.ZoombarProviderDefault; +} + +declare namespace Infragistics { + class ZoombarProviderDataChart { + constructor(settings: ZoombarProviderDefaultSettings); + clean(): void; + getBaseOpts(options: Object): void; + cleanOptsForZoom(options: Object): void; + createClone(container: Object, options: Object): void; + widgetName(): void; + targetWidth(): void; + targetObject(obj: Object): void; + syncMinWidth(minWidth: Object): void; + setSize(width: Object, height: Object): void; + update(a: Object, b: Object): void; + } +} +interface IgniteUIStatic { + ZoombarProviderDataChart: typeof Infragistics.ZoombarProviderDataChart; +} + +interface JQuery { + igZoombar(methodName: "destroy"): void; + igZoombar(methodName: "widget"): void; + igZoombar(methodName: "id"): string; + igZoombar(methodName: "container"): Element; + igZoombar(methodName: "clone"): Element; + igZoombar(methodName: "zoom", left?: number, width?: number): Object; + + /** + * Gets a provider class which interfaces the widget that is being zoomed. + * object Provider class to use. The provider should implement all methods in the $.ig.ZoombarProviderDefault class and is suggested to be extended from it. + */ + igZoombar(optionLiteral: 'option', optionName: "provider"): any; + + /** + * Sets a provider class which interfaces the widget that is being zoomed. + * object Provider class to use. The provider should implement all methods in the $.ig.ZoombarProviderDefault class and is suggested to be extended from it. + * + * @optionValue New value to be set. + */ + igZoombar(optionLiteral: 'option', optionName: "provider", optionValue: any): void; + + /** + * Gets the element on which the widget the Zoombar is attached to is initialized. + * object A valid jQuery object, the first element of which is that element. + * + */ + igZoombar(optionLiteral: 'option', optionName: "target"): string|Object; + + /** + * Sets the element on which the widget the Zoombar is attached to is initialized. + * object A valid jQuery object, the first element of which is that element. + * + * + * @optionValue New value to be set. + */ + igZoombar(optionLiteral: 'option', optionName: "target", optionValue: string|Object): void; + + /** + * Gets how the target widget's clone is rendered inside the Zoombar. + * object A valid set of properties to initialize the clone with. + * + */ + igZoombar(optionLiteral: 'option', optionName: "clone"): string|Object; + + /** + * Sets how the target widget's clone is rendered inside the Zoombar. + * object A valid set of properties to initialize the clone with. + * + * + * @optionValue New value to be set. + */ + igZoombar(optionLiteral: 'option', optionName: "clone", optionValue: string|Object): void; + + /** + * Gets the width of the Zoombar. + * + */ + igZoombar(optionLiteral: 'option', optionName: "width"): string|number; + + /** + * Sets the width of the Zoombar. + * + * + * @optionValue New value to be set. + */ + igZoombar(optionLiteral: 'option', optionName: "width", optionValue: string|number): void; + + /** + * Gets the height of the Zoombar. + * + */ + igZoombar(optionLiteral: 'option', optionName: "height"): number|string; + + /** + * Sets the height of the Zoombar. + * + * + * @optionValue New value to be set. + */ + igZoombar(optionLiteral: 'option', optionName: "height", optionValue: number|string): void; + + /** + * Gets when the zoom effect is applied. + * + */ + igZoombar(optionLiteral: 'option', optionName: "zoomAction"): string; + + /** + * Sets when the zoom effect is applied. + * + * + * @optionValue New value to be set. + */ + igZoombar(optionLiteral: 'option', optionName: "zoomAction", optionValue: string): void; + + /** + * Gets the distance (in percents) the zoom window moves when the left or right scroll bar buttons are clicked. + * + */ + igZoombar(optionLiteral: 'option', optionName: "zoomWindowMoveDistance"): number; + + /** + * Sets the distance (in percents) the zoom window moves when the left or right scroll bar buttons are clicked. + * + * + * @optionValue New value to be set. + */ + igZoombar(optionLiteral: 'option', optionName: "zoomWindowMoveDistance", optionValue: number): void; + + /** + * Gets the default zoom in percentages. + * + */ + igZoombar(optionLiteral: 'option', optionName: "defaultZoomWindow"): IgZoombarDefaultZoomWindow; + + /** + * Sets the default zoom in percentages. + * + * + * @optionValue New value to be set. + */ + igZoombar(optionLiteral: 'option', optionName: "defaultZoomWindow", optionValue: IgZoombarDefaultZoomWindow): void; + + /** + * The minimal width the zoom window can have in percentages. + * + */ + igZoombar(optionLiteral: 'option', optionName: "zoomWindowMinWidth"): number; + + /** + * The minimal width the zoom window can have in percentages. + * + * + * @optionValue New value to be set. + */ + igZoombar(optionLiteral: 'option', optionName: "zoomWindowMinWidth", optionValue: number): void; + + /** + * Gets the animation duration (in milliseconds) when hover style is applied or removed from elements. + * + */ + igZoombar(optionLiteral: 'option', optionName: "hoverStyleAnimationDuration"): number; + + /** + * Sets the animation duration (in milliseconds) when hover style is applied or removed from elements. + * + * + * @optionValue New value to be set. + */ + igZoombar(optionLiteral: 'option', optionName: "hoverStyleAnimationDuration", optionValue: number): void; + + /** + * Gets the pan duration (in milliseconds) when the window changes position. Set to 0 for snap. + * + */ + igZoombar(optionLiteral: 'option', optionName: "windowPanDuration"): number; + + /** + * Sets the pan duration (in milliseconds) when the window changes position. Set to 0 for snap. + * + * + * @optionValue New value to be set. + */ + igZoombar(optionLiteral: 'option', optionName: "windowPanDuration", optionValue: number): void; + + /** + * Initial tabIndex for the Zoombar container elements. + * + */ + igZoombar(optionLiteral: 'option', optionName: "tabIndex"): number; + + /** + * Initial tabIndex for the Zoombar container elements. + * + * + * @optionValue New value to be set. + */ + igZoombar(optionLiteral: 'option', optionName: "tabIndex", optionValue: number): void; + + /** + * Event fired before a zoom action is applied + * Function takes arguments evt and ui. + * Use ui.previousZoom.left to get the previous zoom window left position as a fraction of the absolute width of the target + * Use ui.previousZoom.width to get the previous zoom window width as a fraction of the absolute width of the target + * Use ui.newZoom.left to get the new zoom window left position as a fraction of the absolute width of the target + * Use ui.newZoom.width to get the new zoom window width as a fraction of the absolute width of the target + * Use ui.owner to get reference to igZoombar. + */ + igZoombar(optionLiteral: 'option', optionName: "zoomChanging"): ZoomChangingEvent; + + /** + * Event fired before a zoom action is applied + * Function takes arguments evt and ui. + * Use ui.previousZoom.left to get the previous zoom window left position as a fraction of the absolute width of the target + * Use ui.previousZoom.width to get the previous zoom window width as a fraction of the absolute width of the target + * Use ui.newZoom.left to get the new zoom window left position as a fraction of the absolute width of the target + * Use ui.newZoom.width to get the new zoom window width as a fraction of the absolute width of the target + * Use ui.owner to get reference to igZoombar. + * + * @optionValue Define event handler function. + */ + igZoombar(optionLiteral: 'option', optionName: "zoomChanging", optionValue: ZoomChangingEvent): void; + + /** + * Event fired after a zoom action is applied. + * Function takes arguments evt and ui. + * Use ui.previousZoom.left to get the previous zoom window left position as a fraction of the absolute width of the target + * Use ui.previousZoom.width to get the previous zoom window width as a fraction of the absolute width of the target + * Use ui.newZoom.left to get the new zoom window left position as a fraction of the absolute width of the target + * Use ui.newZoom.width to get the new zoom window width as a fraction of the absolute width of the target + * Use ui.owner to get reference to igZoombar. + */ + igZoombar(optionLiteral: 'option', optionName: "zoomChanged"): ZoomChangedEvent; + + /** + * Event fired after a zoom action is applied. + * Function takes arguments evt and ui. + * Use ui.previousZoom.left to get the previous zoom window left position as a fraction of the absolute width of the target + * Use ui.previousZoom.width to get the previous zoom window width as a fraction of the absolute width of the target + * Use ui.newZoom.left to get the new zoom window left position as a fraction of the absolute width of the target + * Use ui.newZoom.width to get the new zoom window width as a fraction of the absolute width of the target + * Use ui.owner to get reference to igZoombar. + * + * @optionValue Define event handler function. + */ + igZoombar(optionLiteral: 'option', optionName: "zoomChanged", optionValue: ZoomChangedEvent): void; + + /** + * Event fired after a provider is created based on the options.provider value. If an instance is passed as a value for the option the event won't fire. + * Use the event when utilizing a custom provider to assign options such as the zoomed widget's instance so that the provider's API is usable when igZoombar initializes its rendering. + * Function takes arguments evt and ui. + * Use ui.provider to get the reference the created provider + * Use ui.owner to get reference to igZoombar + */ + igZoombar(optionLiteral: 'option', optionName: "providerCreated"): ProviderCreatedEvent; + + /** + * Event fired after a provider is created based on the options.provider value. If an instance is passed as a value for the option the event won't fire. + * Use the event when utilizing a custom provider to assign options such as the zoomed widget's instance so that the provider's API is usable when igZoombar initializes its rendering. + * Function takes arguments evt and ui. + * Use ui.provider to get the reference the created provider + * Use ui.owner to get reference to igZoombar + * + * @optionValue Define event handler function. + */ + igZoombar(optionLiteral: 'option', optionName: "providerCreated", optionValue: ProviderCreatedEvent): void; + + /** + * Event fired when the user attempts to drag the zoom window. + * Function takes arguments evt and ui. + * Use ui.zoomWindow.left to get the current zoom window left position as a fraction of the absolute width of the target + * Use ui.zoomWindow.width to get the current zoom window width as a fraction of the absolute width of the target + * Use ui.owner to get reference to igZoombar. + */ + igZoombar(optionLiteral: 'option', optionName: "windowDragStarting"): WindowDragStartingEvent; + + /** + * Event fired when the user attempts to drag the zoom window. + * Function takes arguments evt and ui. + * Use ui.zoomWindow.left to get the current zoom window left position as a fraction of the absolute width of the target + * Use ui.zoomWindow.width to get the current zoom window width as a fraction of the absolute width of the target + * Use ui.owner to get reference to igZoombar. + * + * @optionValue Define event handler function. + */ + igZoombar(optionLiteral: 'option', optionName: "windowDragStarting", optionValue: WindowDragStartingEvent): void; + + /** + * Event fired when the user starts dragging the zoom window. + * Function takes arguments evt and ui. + * Use ui.zoomWindow.left to get the current zoom window left position as a fraction of the absolute width of the target + * Use ui.zoomWindow.width to get the current zoom window width as a fraction of the absolute width of the target + * Use ui.owner to get reference to igZoombar. + */ + igZoombar(optionLiteral: 'option', optionName: "windowDragStarted"): WindowDragStartedEvent; + + /** + * Event fired when the user starts dragging the zoom window. + * Function takes arguments evt and ui. + * Use ui.zoomWindow.left to get the current zoom window left position as a fraction of the absolute width of the target + * Use ui.zoomWindow.width to get the current zoom window width as a fraction of the absolute width of the target + * Use ui.owner to get reference to igZoombar. + * + * @optionValue Define event handler function. + */ + igZoombar(optionLiteral: 'option', optionName: "windowDragStarted", optionValue: WindowDragStartedEvent): void; + + /** + * Event fired when the user drags the zoom window. + * Function takes arguments evt and ui. + * Use ui.zoomWindow.left to get the current zoom window left position as a fraction of the absolute width of the target + * Use ui.zoomWindow.width to get the current zoom window width as a fraction of the absolute width of the target + * Use ui.owner to get reference to igZoombar. + */ + igZoombar(optionLiteral: 'option', optionName: "windowDragging"): WindowDraggingEvent; + + /** + * Event fired when the user drags the zoom window. + * Function takes arguments evt and ui. + * Use ui.zoomWindow.left to get the current zoom window left position as a fraction of the absolute width of the target + * Use ui.zoomWindow.width to get the current zoom window width as a fraction of the absolute width of the target + * Use ui.owner to get reference to igZoombar. + * + * @optionValue Define event handler function. + */ + igZoombar(optionLiteral: 'option', optionName: "windowDragging", optionValue: WindowDraggingEvent): void; + + /** + * Event fired when the user attemtps to stop dragging the zoom window. + * Function takes arguments evt and ui. + * Use ui.zoomWindow.left to get the current zoom window left position as a fraction of the absolute width of the target + * Use ui.zoomWindow.width to get the current zoom window width as a fraction of the absolute width of the target + * Use ui.owner to get reference to igZoombar. + */ + igZoombar(optionLiteral: 'option', optionName: "windowDragEnding"): WindowDragEndingEvent; + + /** + * Event fired when the user attemtps to stop dragging the zoom window. + * Function takes arguments evt and ui. + * Use ui.zoomWindow.left to get the current zoom window left position as a fraction of the absolute width of the target + * Use ui.zoomWindow.width to get the current zoom window width as a fraction of the absolute width of the target + * Use ui.owner to get reference to igZoombar. + * + * @optionValue Define event handler function. + */ + igZoombar(optionLiteral: 'option', optionName: "windowDragEnding", optionValue: WindowDragEndingEvent): void; + + /** + * Event fired when the user stops dragging the zoom window. + * Function takes arguments evt and ui. + * Use ui.zoomWindow.left to get the current zoom window left position as a fraction of the absolute width of the target + * Use ui.zoomWindow.width to get the current zoom window width as a fraction of the absolute width of the target + * Use ui.owner to get reference to igZoombar. + */ + igZoombar(optionLiteral: 'option', optionName: "windowDragEnded"): WindowDragEndedEvent; + + /** + * Event fired when the user stops dragging the zoom window. + * Function takes arguments evt and ui. + * Use ui.zoomWindow.left to get the current zoom window left position as a fraction of the absolute width of the target + * Use ui.zoomWindow.width to get the current zoom window width as a fraction of the absolute width of the target + * Use ui.owner to get reference to igZoombar. + * + * @optionValue Define event handler function. + */ + igZoombar(optionLiteral: 'option', optionName: "windowDragEnded", optionValue: WindowDragEndedEvent): void; + + /** + * Event fired when the user resizes the zoom window with the window"s handles. + * Function takes arguments evt and ui. + * Use ui.zoomWindow.left to get the current zoom window left position as a fraction of the absolute width of the target + * Use ui.zoomWindow.width to get the current zoom window width as a fraction of the absolute width of the target + * Use ui.owner to get reference to igZoombar. + */ + igZoombar(optionLiteral: 'option', optionName: "windowResizing"): WindowResizingEvent; + + /** + * Event fired when the user resizes the zoom window with the window"s handles. + * Function takes arguments evt and ui. + * Use ui.zoomWindow.left to get the current zoom window left position as a fraction of the absolute width of the target + * Use ui.zoomWindow.width to get the current zoom window width as a fraction of the absolute width of the target + * Use ui.owner to get reference to igZoombar. + * + * @optionValue Define event handler function. + */ + igZoombar(optionLiteral: 'option', optionName: "windowResizing", optionValue: WindowResizingEvent): void; + + /** + * Event fired after the user resizes the zoom window with the window"s handles. + * Function takes arguments evt and ui. + * Use ui.zoomWindow.left to get the current zoom window left position as a fraction of the absolute width of the target + * Use ui.zoomWindow.width to get the current zoom window width as a fraction of the absolute width of the target + * Use ui.owner to get reference to igZoombar. + */ + igZoombar(optionLiteral: 'option', optionName: "windowResized"): WindowResizedEvent; + + /** + * Event fired after the user resizes the zoom window with the window"s handles. + * Function takes arguments evt and ui. + * Use ui.zoomWindow.left to get the current zoom window left position as a fraction of the absolute width of the target + * Use ui.zoomWindow.width to get the current zoom window width as a fraction of the absolute width of the target + * Use ui.owner to get reference to igZoombar. + * + * @optionValue Define event handler function. + */ + igZoombar(optionLiteral: 'option', optionName: "windowResized", optionValue: WindowResizedEvent): void; + igZoombar(options: IgZoombar): JQuery; + igZoombar(optionLiteral: 'option', optionName: string): any; + igZoombar(optionLiteral: 'option', options: IgZoombar): JQuery; + igZoombar(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igZoombar(methodName: string, ...methodParams: any[]): any; +} + +interface IgLoader { + scriptPath: string; + cssPath: string; + resources?: string; + theme?: string; + ready?: Function; + localePath?: string; + locale?: string; + autoDetectLocale?: boolean; + regional?: string; + preinit?: Function; +} + +interface IgniteUIStatic { + tmpl(template: string, data: any, ...args: any[]): string; + loader(options: IgLoader): void; + loader(callback: Function): void; + loader(resources: string, callback: Function): void; + loader(): any; + OlapUtilities: any; +} + +interface JQueryStatic { + ig: IgniteUIStatic; +} diff --git a/types/ignite-ui/tsconfig.json b/types/ignite-ui/tsconfig.json new file mode 100644 index 0000000000..8a67eaf271 --- /dev/null +++ b/types/ignite-ui/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts" + ] +} \ No newline at end of file diff --git a/types/ignite-ui/tslint.json b/types/ignite-ui/tslint.json new file mode 100644 index 0000000000..a04d4ac95d --- /dev/null +++ b/types/ignite-ui/tslint.json @@ -0,0 +1,13 @@ +{ + "extends": "../tslint.json", + "rules": { + "array-type": false, + "dt-header": false, + "ban-types": false, + "callable-types": false, + "no-empty-interface": false, + "unified-signatures": false, + "max-line-length": false, + "whitespace": false + } +} \ No newline at end of file diff --git a/types/inert/index.d.ts b/types/inert/index.d.ts index fdd3d91bcd..9acbd6f1a7 100644 --- a/types/inert/index.d.ts +++ b/types/inert/index.d.ts @@ -12,4 +12,4 @@ /// -export var inert: any; \ No newline at end of file +export const inert: any; diff --git a/types/is-absolute-url/is-absolute-url-tests.ts b/types/is-absolute-url/is-absolute-url-tests.ts index 47c5f007ed..4f8a225dad 100644 --- a/types/is-absolute-url/is-absolute-url-tests.ts +++ b/types/is-absolute-url/is-absolute-url-tests.ts @@ -7,4 +7,4 @@ isAbsoluteUrl('//sindresorhus.com'); // => false isAbsoluteUrl('foo/bar'); -// => false \ No newline at end of file +// => false diff --git a/types/is-root/is-root-tests.ts b/types/is-root/is-root-tests.ts index b53d07a0ac..99be761d74 100644 --- a/types/is-root/is-root-tests.ts +++ b/types/is-root/is-root-tests.ts @@ -2,4 +2,4 @@ import isRoot = require('is-root'); isRoot(); -// => true \ No newline at end of file +// => true diff --git a/types/isbn-utils/index.d.ts b/types/isbn-utils/index.d.ts index fe2ac4dae9..f0e1fe5515 100644 --- a/types/isbn-utils/index.d.ts +++ b/types/isbn-utils/index.d.ts @@ -3,7 +3,6 @@ // Definitions by: Jørgen Elgaard Larsen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - type IGroups = any; export class ISBNcodes { diff --git a/types/isbn-utils/isbn-utils-tests.ts b/types/isbn-utils/isbn-utils-tests.ts index 91f72a0359..24a91ffa6a 100644 --- a/types/isbn-utils/isbn-utils-tests.ts +++ b/types/isbn-utils/isbn-utils-tests.ts @@ -1,6 +1,5 @@ import * as isbn from 'isbn-utils'; - const isbn10a: isbn.ISBN|null = isbn.parse('4873113369'); let b: boolean; let s: string; diff --git a/types/isotope-layout/index.d.ts b/types/isotope-layout/index.d.ts new file mode 100644 index 0000000000..08694f0418 --- /dev/null +++ b/types/isotope-layout/index.d.ts @@ -0,0 +1,374 @@ +// Type definitions for isotope 3.0 +// Project: http://isotope.metafizzy.co/ +// Definitions by: Anže Videnič +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +declare namespace IsotopeLibrary { + + type LayoutModes = 'masonry' | 'fitRows' | 'cellsByRow' | 'vertical' | 'packery' | 'masonryHorizontal' | 'fitColumns' | 'cellsByColumn' | 'horiz'; + type Elements = HTMLElement[] | HTMLElement | JQuery | NodeList; + + interface IsotopeOptions { + /** + * A horizontal grid layout where items are centered inside each cell. The grid is defined by columnWidth and rowHeight options. + */ + cellsByColumn?: CellsByColumn; + /** + * A vertical grid layout where items are centered inside each cell. The grid is defined by columnWidth and rowHeight options. + */ + cellsByRow?: CellsByRow; + /** + * CSS styles that are applied to the container element. + */ + containerStyle?: Style; + /** + * Shows items that match the filter and hides items that do not match. + * If set to a string, that value is used as a selector. + * If filter is set to a function, that function checks each item and returns true or false if the item should be shown or hidden. + */ + filter?: string | (() => boolean); + /** + * Items are arranged into rows. Rows progress vertically. Similar to what you would expect from a layout that uses CSS floats. fitRows works well for items that have the same height. + */ + fitRows?: FitRows; + /** + * Enables layout on initialization. Enabled by default initLayout: true. + * Set initLayout: false to disable layout on initialization, so you can use methods or add events before the initial layout. + * initLayout was previously isInitLayout in Isotope v2. isInitLayout will still work in Isotope v3 + */ + initLayout?: boolean; + /** + * Specifies which child elements will be used as item elements in the layout. + * We recommend always setting itemSelector. itemSelector is useful to exclude sizing elements or other elements that are not part of the layout. + */ + itemSelector?: string; + /** + * Layout modes can have their own separate options. These are set in a corresponding object within the options. + * masonry, fitRows, and vertical are included in Isotope by default. All other layout modes need to installed separately. + */ + layoutMode?: LayoutModes; + /** + * Isotope reads data from HTML with the getSortData option. + * getSortData is set with an object. The object’s keys are keywords used to sort by. Object values are either a shortcut string or function to retrieve the data. + */ + getSortData?: Sorter; + /** + * The styles applied to hide items when filtering. + */ + hiddenStyle?: Style; + /** + * Items are arranged horizontally. + */ + horiz?: Horizontal; + /** + * The default layout mode. Items are arranged in a vertically cascading grid. + */ + masonry?: Masonry; + /** + * Horizontal version of masonry. Items are arranged in a horizontally cascading grid. + */ + masontryHorizontal?: MasonryHorizontal; + /** + * Controls the horizontal flow of the layout. By default, item elements start positioning at the left, with originLeft: true. Set originLeft: false for right-to-left layouts. + */ + originLeft?: boolean; + /** + * Controls the vertical flow of the layout. By default, item elements start positioning at the top. Set to false for bottom-up layouts. It’s like Tetris! + */ + originTop?: boolean; + /** + * The packery layout mode uses a bin-packing algorithm. This is a fancy way of saying “it fills empty gaps.” It works similarly to masonry, except gaps will be filled. + */ + packery?: Packery; + /** + * Sets item positions in percent values, rather than pixel values. percentPosition: true works well with percent-width items, as items will not transition their position on resize. + */ + percentPosition?: boolean; + /** + * Adjusts sizes and positions when window is resized. Enabled by default resize: true. + */ + resize?: boolean; + /** + * Sorts items ascendingly if sortAscending: true “A, B, C…”, “1, 2, 3…”, or descendingly if sortAscending: false, “Z, Y, X…”, “9, 8, 7…”. + * You can set ascending order for each sortBy value by setting sortAscending to an object. + */ + sortAscending?: boolean | SortOrder; + /** + * Sorts items according to which property of getSortData. The value of sortBy needs to match a key name in getSortData. + */ + sortBy?: string; + /** + * Staggers item transitions, so items transition incrementally after one another. Set as a CSS time format, '0.03s', or as a number in milliseconds, 30. + */ + stagger?: number | string; + /** + * Specifies which elements are stamped within the layout. Isotope will layout items around stamped elements. + * The masonry, packery, and masonryHorizontal layout modes support stamping. + * The stamp option stamps elements only when the Isotope instance is first initialized. You can stamp additional elements afterwards with the stamp method. + */ + stamp?: string; + /** + * Duration of the transition when items change position or appearance, set in a CSS time format, or as a number in milliseconds. Default: transitionDuration: '0.4s' + */ + transitionDuration?: number | string; + /** + * Items are stacked vertically. + */ + vertical?: Vertical; + /** + * The styles applied to reveal items when filtering. + */ + visibleStyle?: Style; + } + + interface Isotope { + /** + * Adds item elements to the Isotope instance. addItems does not lay out items like appended, prepended, or insert. + * @param elements Element, jQuery Object, NodeList, or Array of Elements + */ + addItems(elements: Elements): void; + /** + * Adds and lays out newly appended item elements to the end of the layout. + * @param elements Element, jQuery Object, NodeList, or Array of Elements + */ + appended(elements: Elements): void; + /** + * Filters, sorts, and lays out items. arrange is the principle method of Isotope. It is the default method with jQuery .isotope(). Pass in options to apply filtering and sorting. + * @param options All options are optional, but itemSelector is recommended. Layout modes have their own separate options. + */ + arrange(options: IsotopeOptions): void; + /** + * Removes the Isotope functionality completely. destroy will return the element back to its pre-initialized state. + */ + destroy(): void; + /** + * Returns an array of filtered item elements in current sorted order. + */ + getFilteredItemElements(): Element[]; + /** + * Returns an array of all item elements in the Isotope instance. + */ + getItemElements(): Element[]; + /** + * Hide items. + * @param elements Element, jQuery Object, NodeList, or Array of Elements + */ + hideItemElements(elements: Elements): void; + /** + * Appends elements into container element, adds elements as items, and arranges items with filtering and sorting. + * @param elements Element, jQuery Object, NodeList, or Array of Elements + */ + insert(elements: Elements): void; + /** + * Lays out all item elements. layout is useful when an item has changed size, and all items need to be laid out again. layout does not apply filtering or sorting. + */ + layout(): void; + /** + * Lays out specified items. + * @param elements Array of Isotope.Items + * @param isStill Disables transitions + */ + layoutItems(elements: HTMLElement[], isStill: boolean): void; + /** + * Adds and lays out newly prepended item elements at the beginning of layout. + * @param elements Element, jQuery Object, NodeList, or Array of Elements + */ + prepended(elements: Elements): void; + /** + * Recollects all item elements. + * For frameworks like Angular and React, reloadItems may be useful to apply changes to the DOM to Isotope. + */ + reloadItems(): void; + /** + * Removes elements from the Isotope instance and DOM. + * @param elements Element, jQuery Object, NodeList, or Array of Elements + */ + remove(elements: Elements): void; + /** + * Reveals hidden items. + * @param elements Element, jQuery Object, NodeList, or Array of Elements + */ + revealItemElements(elements: Elements): void; + /** + * Shuffles items in a random order. + */ + shuffle(): void; + /** + * Stamps elements in the layout. Isotope will lay out item elements around stamped elements. + * Stamping is only supported by some layout modes: masonry, packery and masonryhorizontal. + * @param elements Element, jQuery Object, NodeList, or Array of Elements + */ + stamp(elements: Elements): void; + /** + * Un-stamps elements in the layout, so that Isotope will no longer layout item elements around them. + * @param elements Element, jQuery Object, NodeList, or Array of Elements + */ + unstamp(elements: Elements): void; + /** + * Updates sort data + * @param elements Element, jQuery Object, NodeList, or Array of Elements + */ + updateSortData(elements: Elements): void; + } + + interface Sorter { + [key: string]: ((itemElm: JQuery) => number | string) | string; + } + + interface SortOrder { + [key: string]: boolean; + } + + interface Style { + [key: string]: number | string; + } + + interface CellsByColumn { + columnWidth?: number | string; + rowHeight?: number | string; + } + + interface CellsByRow { + columnWidth?: number | string; + rowHeight?: number | string; + } + + interface FitRows { + gutter?: number | string; + } + + interface Horizontal { + verticalAligment?: number; + } + + interface Masonry { + columnWidth?: number | string; + fitWidth?: boolean; + gutter?: number | string; + } + + interface MasonryHorizontal { + gutter?: number | string; + rowHeight?: number | string; + } + + interface Packery { + columnWidth?: number | string; + gutter?: number | string; + horizontal?: boolean; + rowHeight?: number; + } + + interface Vertical { + horizontalAlignment?: number; + } +} + +interface Isotope extends IsotopeLibrary.Isotope{ } + +declare var Isotope: { + prototype: IsotopeLibrary.Isotope; + new (selector: string): IsotopeLibrary.Isotope; + /** + * Get the Isotope instance via its element. Isotope.data() is useful for getting the Isotope instance in JavaScript, after it has been initalized in HTML. + */ + data: (element: HTMLElement | string) => IsotopeLibrary.Isotope; +} + +interface JQuery { + // tslint:disable:unified-signatures + /** + * Get the Isotope instance from a jQuery object. Isotope instances are useful to access Isotope properties. + */ + data(methodName: 'isotope'): IsotopeLibrary.Isotope; + /** + * Lays out specified items. + * @param elements Array of Isotope.Items + * @param isStill Disables transitions + */ + isotope(methodName: 'layoutItems', elements: HTMLElement[], isStill: boolean): JQuery; + /** + * Adds item elements to the Isotope instance. addItems does not lay out items like appended, prepended, or insert. + * @param elements Element, jQuery Object, NodeList, or Array of Elements + */ + isotope(methodName: 'addItems', elements: IsotopeLibrary.Elements): JQuery; + /** + * Adds and lays out newly appended item elements to the end of the layout. + * @param elements Element, jQuery Object, NodeList, or Array of Elements + */ + isotope(methodName: 'appended', elements: IsotopeLibrary.Elements): JQuery; + /** + * Hide items. + * @param elements Element, jQuery Object, NodeList, or Array of Elements + */ + isotope(methodName: 'hideItemElements', elements: IsotopeLibrary.Elements): JQuery; + /** + * Appends elements into container element, adds elements as items, and arranges items with filtering and sorting. + * @param elements Element, jQuery Object, NodeList, or Array of Elements + */ + isotope(methodName: 'insert', elements: IsotopeLibrary.Elements): JQuery; + /** + * Adds and lays out newly prepended item elements at the beginning of layout. + * @param elements Element, jQuery Object, NodeList, or Array of Elements + */ + isotope(methodName: 'prepended', elements: IsotopeLibrary.Elements): JQuery; + /** + * Removes elements from the Isotope instance and DOM. + * @param elements Element, jQuery Object, NodeList, or Array of Elements + */ + isotope(methodName: 'remove', elements: IsotopeLibrary.Elements): JQuery; + /** + * Reveals hidden items. + * @param elements Element, jQuery Object, NodeList, or Array of Elements + */ + isotope(methodName: 'revealItemElements', elements: IsotopeLibrary.Elements): JQuery; + /** + * Stamps elements in the layout. Isotope will lay out item elements around stamped elements. + * Stamping is only supported by some layout modes: masonry, packery and masonryhorizontal. + * @param elements Element, jQuery Object, NodeList, or Array of Elements + */ + isotope(methodName: 'stamp', elements: IsotopeLibrary.Elements): JQuery; + /** + * Un-stamps elements in the layout, so that Isotope will no longer layout item elements around them. + * @param elements Element, jQuery Object, NodeList, or Array of Elements + */ + isotope(methodName: 'unstamp', elements: IsotopeLibrary.Elements): JQuery; + /** + * Updates sort data + * @param elements Element, jQuery Object, NodeList, or Array of Elements + */ + isotope(methodName: 'updateSortData', elements: IsotopeLibrary.Elements): JQuery; + /** + * Removes the Isotope functionality completely. destroy will return the element back to its pre-initialized state. + */ + isotope(methodName: 'destroy'): void; + /** + * Returns an array of filtered item elements in current sorted order. + */ + isotope(methodName: 'getFilteredItemElements'): Element[]; + /** + * Returns an array of all item elements in the Isotope instance. + */ + isotope(methodName: 'getItemElements'): Element[]; + /** + * Lays out all item elements. layout is useful when an item has changed size, and all items need to be laid out again. layout does not apply filtering or sorting. + */ + isotope(methodName: 'layout'): JQuery; + /** + * Recollects all item elements. + * For frameworks like Angular and React, reloadItems may be useful to apply changes to the DOM to Isotope. + */ + isotope(methodName: 'reloadItems'): JQuery; + /** + * Shuffles items in a random order. + */ + isotope(methodName: 'shuffle'): JQuery; + /** + * Filters, sorts, and lays out items. Pass in options to apply filtering and sorting. + * @param options All options are optional, but itemSelector is recommended. Layout modes have their own separate options. + */ + isotope(options: IsotopeLibrary.IsotopeOptions): JQuery; + // tslint:enable +} \ No newline at end of file diff --git a/types/isotope-layout/isotope-layout-tests.ts b/types/isotope-layout/isotope-layout-tests.ts new file mode 100644 index 0000000000..c82defa279 --- /dev/null +++ b/types/isotope-layout/isotope-layout-tests.ts @@ -0,0 +1,119 @@ +/* inspired by documentation at http://isotope.metafizzy.co/ */ + +// test all options +let $grid = $('.grid').isotope({ + cellsByColumn: { + columnWidth: 10, + rowHeight: '.height-sizer' + }, + cellsByRow: { + columnWidth: '.width-sizer', + rowHeight: 250 + }, + containerStyle: { + 'display': 'block' + }, + filter: 'filter', + fitRows: { + gutter: 10 + }, + initLayout: true, + itemSelector: '.grid-item', + layoutMode: 'cellsByRow', + getSortData: { + 'value': '.value', + 'key': (itemElm: JQuery): string => { + return '.key'; + }, + 'description': (itemElm: JQuery): number => { + return 1; + } + }, + hiddenStyle: { + 'display': 'none' + }, + horiz: { + verticalAligment: 10 + }, + masonry: { + columnWidth: '.grid-sizer', + fitWidth: true, + gutter: 50 + }, + masontryHorizontal: { + gutter: '.gutter', + rowHeight: 20 + }, + originLeft: true, + originTop: false, + packery: { + columnWidth: 10, + gutter: 'div', + horizontal: true, + rowHeight: 15 + }, + percentPosition: true, + resize: false, + sortAscending: false, + sortBy: 'value', + stagger: 10, + stamp: '.grid', + transitionDuration: '0.5s', + vertical: { + horizontalAlignment: 10 + }, + visibleStyle: { + 'display': 'inline-block' + } +}); + +// test the ones not used in upper test +$grid = $('.grid').isotope({ + filter: (): boolean => { + return true; + }, + sortAscending: { + 'key': true + }, + stagger: 'a', + transitionDuration: 0.4 +}); + +// test methods using jquery +$grid.isotope('addItems', $('.items')); +$grid.isotope('appended', $('.items')[0]) +$grid.isotope('hideItemElements', [ new HTMLElement() ]); +$grid.isotope('insert', new HTMLElement()); +$grid.isotope('prepended', new NodeList()); +$grid.isotope('remove', $('.items')); +$grid.isotope('revealItemElements', $('div')); +$grid.isotope('stamp', new HTMLElement()); +$grid.isotope('unstamp', new HTMLElement()); +$grid.isotope('updateSortData', new HTMLElement()); +$grid.isotope('destroy'); +let elements: Element[] = $grid.isotope('getFilteredItemElements'); +elements = $grid.isotope('getItemElements'); +$grid.isotope('layoutItems', [new HTMLElement()], true); +$grid.isotope('layout').isotope('reloadItems').isotope('shuffle'); +let iso: Isotope = $grid.data('isotope'); + +// test native javascript methods +iso = new Isotope('.grid'); +iso.addItems($('.items')); +iso.appended(new HTMLElement()); +iso.arrange(new HTMLElement()); +iso.destroy(); +elements = iso.getFilteredItemElements(); +elements = iso.getItemElements(); +iso.hideItemElements(new NodeList()); +iso.insert($('div')[0]); +iso.layout(); +iso.layoutItems([new HTMLElement()], true); +iso.prepended(new NodeList()); +iso.reloadItems(); +iso.remove(new HTMLElement()); +iso.revealItemElements([new HTMLElement()]); +iso.shuffle(); +iso.stamp($("div")); +iso.unstamp($("div")); +iso.updateSortData($("div")); diff --git a/types/isotope-layout/tsconfig.json b/types/isotope-layout/tsconfig.json new file mode 100644 index 0000000000..b498c10ce8 --- /dev/null +++ b/types/isotope-layout/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "dom", "es2015" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "isotope-layout-tests.ts" + ] +} \ No newline at end of file diff --git a/types/isotope-layout/tslint.json b/types/isotope-layout/tslint.json new file mode 100644 index 0000000000..606d515fec --- /dev/null +++ b/types/isotope-layout/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "../tslint.json" +} diff --git a/types/ityped/index.d.ts b/types/ityped/index.d.ts index 135ea870ca..ea5c2427a6 100644 --- a/types/ityped/index.d.ts +++ b/types/ityped/index.d.ts @@ -12,4 +12,4 @@ export interface Configuration { export function init(element: string, config: Configuration): void; -export as namespace ityped; \ No newline at end of file +export as namespace ityped; diff --git a/types/ityped/ityped-tests.ts b/types/ityped/ityped-tests.ts index b03d976ec1..cb18814532 100644 --- a/types/ityped/ityped-tests.ts +++ b/types/ityped/ityped-tests.ts @@ -15,4 +15,4 @@ init("#anotherSelector", { loop: false }); -init("#anotherOne", {}); \ No newline at end of file +init("#anotherOne", {}); diff --git a/types/jasmine-ajax/index.d.ts b/types/jasmine-ajax/index.d.ts index 4e227add1b..4762ba085a 100644 --- a/types/jasmine-ajax/index.d.ts +++ b/types/jasmine-ajax/index.d.ts @@ -21,7 +21,7 @@ interface JasmineAjaxRequest extends XMLHttpRequest { password: string; requestHeaders: { [key: string]: string }; overriddenMimeType: string; - data: () => string; + data(): string; respondWith(response: JasmineAjaxResponse): void; } diff --git a/types/jasmine-ajax/tslint.json b/types/jasmine-ajax/tslint.json index fe03bea79d..6e33505955 100644 --- a/types/jasmine-ajax/tslint.json +++ b/types/jasmine-ajax/tslint.json @@ -1,7 +1,7 @@ { "extends": "../tslint.json", "rules": { - "forbidden-types": false, + "ban-types": false, "unified-signatures": false } } diff --git a/types/jasmine/index.d.ts b/types/jasmine/index.d.ts index caa1d12635..11b0d1919c 100644 --- a/types/jasmine/index.d.ts +++ b/types/jasmine/index.d.ts @@ -593,4 +593,5 @@ declare namespace jasmine { export var HtmlReporter: HtmlReporter; export var HtmlSpecFilter: HtmlSpecFilter; export var DEFAULT_TIMEOUT_INTERVAL: number; + export var MAX_PRETTY_PRINT_DEPTH: number; } diff --git a/types/jasmine/jasmine-tests.ts b/types/jasmine/jasmine-tests.ts index 1c9d5366e1..d681d972b0 100644 --- a/types/jasmine/jasmine-tests.ts +++ b/types/jasmine/jasmine-tests.ts @@ -1007,3 +1007,4 @@ describe("Randomize Tests", () => { })(); jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000; +jasmine.MAX_PRETTY_PRINT_DEPTH = 40; \ No newline at end of file diff --git a/types/jimp/index.d.ts b/types/jimp/index.d.ts index b8988e2ad4..4c39f58796 100644 --- a/types/jimp/index.d.ts +++ b/types/jimp/index.d.ts @@ -50,7 +50,6 @@ declare namespace jimp { } } | PresetFont; - class JimpImage { constructor(width: number, height: number, callback?: Callback); constructor(width: number, height: number, initialColor: number, callback?: Callback); diff --git a/types/jimp/jimp-tests.ts b/types/jimp/jimp-tests.ts index a312cd4586..10ee61073e 100644 --- a/types/jimp/jimp-tests.ts +++ b/types/jimp/jimp-tests.ts @@ -36,20 +36,20 @@ Jimp.read("http://www.example.com/path/to/lenna.jpg", (err, image) => { // do stuff with the image (if no exception) }); -var image = new Jimp(1, 2); -var w = 0; -var h = 0; -var x = 0; -var y = 0; -var f = 0; -var src = ''; -var horz = Jimp.HORIZONTAL_ALIGN_CENTER; -var vert = Jimp.VERTICAL_ALIGN_BOTTOM; -var deg = 90; -var val = 0.5; -var hex = 0xFFFFFFFF; -var r = 0; -var n = 1; +let image = new Jimp(1, 2); +const w = 0; +const h = 0; +const x = 0; +const y = 0; +const f = 0; +const src = ''; +const horz = Jimp.HORIZONTAL_ALIGN_CENTER; +const vert = Jimp.VERTICAL_ALIGN_BOTTOM; +const deg = 90; +const val = 0.5; +const hex = 0xFFFFFFFF; +const r = 0; +const n = 1; /* Resize */ image.contain(w, h); // scale the image to the given width and height, some parts of the image may be letter boxed image.cover(w, h); // scale the image to the given width and height, some parts of the image may be clipped @@ -112,15 +112,15 @@ image.resize(250, 250, Jimp.RESIZE_BEZIER); image.contain(250, 250, Jimp.HORIZONTAL_ALIGN_LEFT | Jimp.VERTICAL_ALIGN_TOP); -var path = ''; -var str = ''; -var width = 0; +const path = ''; +const str = ''; +const width = 0; Jimp.loadFont(path).then(font => { // load font from .fnt file image.print(font, x, y, str); // print a message on an image image.print(font, x, y, str, width); // print a message on an image with text wrapped at width }); -var cb = (err: Error, data: any) => {}; +const cb = (err: Error, data: any) => {}; Jimp.loadFont(path, cb); // using a callback pattern Jimp.loadFont(Jimp.FONT_SANS_32_BLACK).then(font => { @@ -129,17 +129,16 @@ Jimp.loadFont(Jimp.FONT_SANS_32_BLACK).then(font => { image.write(path, cb); // Node-style callback will be fired when write is successful -var file = "new_name." + image.getExtension(); +const file = "new_name." + image.getExtension(); image.write(file); - -var mime = 'image/png'; +const mime = 'image/png'; image.getBuffer(mime, cb); // Node-style callback will be fired with result image.getBase64(mime, cb); // Node-style callback will be fired with result image.quality(n); // set the quality of saved JPEG, 0 - 100 -var bool = true; -var number = 0; +const bool = true; +const number = 0; image.rgba(bool); // set whether PNGs are saved as RGBA (true, default) or RGB (false) image.filterType(number); // set the filter type for the saved PNG image.deflateLevel(number); // set the deflate level for the saved PNG @@ -160,10 +159,10 @@ image.scan(0, 0, image.bitmap.width, image.bitmap.height, function(x, y, idx) { // idx is the position start position of this rgba tuple in the bitmap Buffer // this is the image - var red = this.bitmap.data[ idx + 0 ]; - var green = this.bitmap.data[ idx + 1 ]; - var blue = this.bitmap.data[ idx + 2 ]; - var alpha = this.bitmap.data[ idx + 3 ]; + const red = this.bitmap.data[ idx + 0 ]; + const green = this.bitmap.data[ idx + 1 ]; + const blue = this.bitmap.data[ idx + 2 ]; + const alpha = this.bitmap.data[ idx + 3 ]; // rgba values run from 0 - 255 // e.g. this.bitmap.data[idx] = 0; // removes red from this pixel @@ -171,35 +170,34 @@ image.scan(0, 0, image.bitmap.width, image.bitmap.height, function(x, y, idx) { image.getPixelColor(x, y); // returns the colour of that pixel e.g. 0xFFFFFFFF image.setPixelColor(hex, x, y); // sets the colour of that pixel -var g = 0; -var b = 0; -var a = 0; +const g = 0; +const b = 0; +const a = 0; Jimp.rgbaToInt(r, g, b, a); // e.g. converts 255, 255, 255, 255 to 0xFFFFFFFF Jimp.intToRGBA(hex); // e.g. converts 0xFFFFFFFF to {r: 255, g: 255, b: 255, a:255} -var image = new Jimp(256, 256, (err, image) => { +image = new Jimp(256, 256, (err, image) => { // this image is 256 x 256, every pixel is set to 0x00000000 }); -var image = new Jimp(256, 256, 0xFF0000FF, (err, image) => { +image = new Jimp(256, 256, 0xFF0000FF, (err, image) => { // this image is 256 x 256, every pixel is set to 0xFF0000FF }); image.hash(); // aHgG4GgoFjA image.hash(2); // 1010101011010000101010000100101010010000011001001001010011100100 -var image1 = new Jimp(0, 1); -var image2 = new Jimp(0, 1); +const image1 = new Jimp(0, 1); +const image2 = new Jimp(0, 1); Jimp.distance(image1, image2); // returns a number 0-1, where 0 means the two images are perceived to be identical -var threshold = 0; -var diff = Jimp.diff(image1, image2, threshold); // threshold ranges 0-1 (default: 0.1) +const threshold = 0; +let diff = Jimp.diff(image1, image2, threshold); // threshold ranges 0-1 (default: 0.1) diff.image; // a Jimp image showing differences diff.percent; // the proportion of different pixels (0-1), where 0 means the images are pixel identical - -var distance = Jimp.distance(image, image2); // perceived distance -var diff = Jimp.diff(image, image2); // pixel difference +const distance = Jimp.distance(image, image2); // perceived distance +diff = Jimp.diff(image, image2); // pixel difference if (distance < 0.15 || diff.percent < 0.15) { // images match @@ -217,4 +215,4 @@ Jimp.read("lenna.png", (err, image) => { image.write("lena-half-bw.png"); }); }); -}); \ No newline at end of file +}); diff --git a/types/jquery-mask-plugin/tslint.json b/types/jquery-mask-plugin/tslint.json index f05741c59b..b0e7084e94 100644 --- a/types/jquery-mask-plugin/tslint.json +++ b/types/jquery-mask-plugin/tslint.json @@ -1,6 +1,6 @@ { "extends": "../tslint.json", "rules": { - "forbidden-types": false + "ban-types": false } } diff --git a/types/jquery.validation/index.d.ts b/types/jquery.validation/index.d.ts index 2bb690c07e..9b77a80e23 100644 --- a/types/jquery.validation/index.d.ts +++ b/types/jquery.validation/index.d.ts @@ -1,22 +1,21 @@ -// Type definitions for jquery.validation 1.13.1 +// Type definitions for jquery.validation 1.16 // Project: http://jqueryvalidation.org/ -// Definitions by: François de Campredon , John Reilly +// Definitions by: François de Campredon , John Reilly , Anže Videnič // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - /// +declare namespace JQueryValidation { + interface RulesDictionary { [name: string]: any; } -declare namespace JQueryValidation -{ - type RulesDictionary = { [name: string]: any }; + type ValidatePredicate = ((element: HTMLElement, event: JQueryEventObject) => void); - type ShouldValidatePredicate = boolean|((element: HTMLElement, event: JQueryEventObject) => void); + type ShouldValidatePredicate = boolean|ValidatePredicate; - interface ValidationOptions - { + interface ValidationOptions { /** - * Enables debug mode. If true, the form is not submitted and certain errors are displayed on the console (will check if a window.console property exists). Try to enable when a form is just submitted instead of validation stopping the submit. + * Enables debug mode. If true, the form is not submitted and certain errors are displayed on the console + * (will check if a window.console property exists). Try to enable when a form is just submitted instead of validation stopping the submit. * * default: false */ @@ -32,7 +31,8 @@ declare namespace JQueryValidation */ errorContainer?: string; /** - * Use this element type to create error messages and to look for existing error messages. The default, "label", has the advantage of creating a meaningful link between error message and invalid field using the for attribute (which is always used, regardless of element type). + * Use this element type to create error messages and to look for existing error messages. The default, "label", + * has the advantage of creating a meaningful link between error message and invalid field using the for attribute (which is always used, regardless of element type). * * default: "label" */ @@ -46,21 +46,25 @@ declare namespace JQueryValidation * * default: Places the error label after the invalid element */ - errorPlacement?: (error: JQuery, element: JQuery) => void; + errorPlacement?(error: JQuery, element: JQuery): void; /** - * If enabled, removes the errorClass from the invalid elements and hides all error messages whenever the element is focused. Avoid combination with focusInvalid. + * If enabled, removes the errorClass from the invalid elements and hides all error messages whenever the element is focused. + * Avoid combination with focusInvalid. * * default: false */ focusCleanup?: boolean; /** - * Focus the last active or first invalid element on submit via validator.focusInvalid(). The last active element is the one that had focus when the form was submitted, avoiding stealing its focus. If there was no element focused, the first one in the form gets it, unless this option is turned off. + * Focus the last active or first invalid element on submit via validator.focusInvalid(). The last active element is the one + * that had focus when the form was submitted, avoiding stealing its focus. If there was no element focused, the first one + * in the form gets it, unless this option is turned off. * * default: true */ focusInvalid?: boolean; /** - * Specify grouping of error messages. A group consists of an arbitrary group name as the key and a space separated list of element names as the value. Use errorPlacement to control where the group message is placed. + * Specify grouping of error messages. A group consists of an arbitrary group name as the key and a space separated list of + * element names as the value. Use errorPlacement to control where the group message is placed. */ groups?: { [groupName: string]: string }; /** @@ -68,23 +72,30 @@ declare namespace JQueryValidation * * default: Adds errorClass (see the option) to the element */ - highlight?: (element: HTMLElement, errorClass: string, validClass: string) => void; + highlight?(element: HTMLElement, errorClass: string, validClass: string): void; /** - * Elements to ignore when validating, simply filtering them out. jQuery's not-method is used, therefore everything that is accepted by not() can be passed as this option. Inputs of type submit and reset are always ignored, so are disabled elements. + * Elements to ignore when validating, simply filtering them out. jQuery's not-method is used, therefore everything that is + * accepted by not() can be passed as this option. Inputs of type submit and reset are always ignored, so are disabled elements. */ ignore?: string; /** - * Set to skip reading messages from the title attribute, helps to avoid issues with Google Toolbar; default is false for compability, the message-from-title is likely to be completely removed in a future release. + * Set to skip reading messages from the title attribute, helps to avoid issues with Google Toolbar; default is false for compability, + * the message-from-title is likely to be completely removed in a future release. * * default: false */ ignoreTitle?: boolean; /** - * Callback for custom code when an invalid form is submitted. Called with an event object as the first argument, and the validator as the second. + * Callback for custom code when an invalid form is submitted. Called with an event object as the first argument, and the validator + * as the second. */ - invalidHandler?: (event: JQueryEventObject, validator: Validator) => void; + invalidHandler?(event: JQueryEventObject, validator: Validator): void; /** - * Key/value pairs defining custom messages. Key is the name of an element, value the message to display for that element. Instead of a plain message, another map with specific messages for each rule can be used. Overrides the title attribute of an element or the default message for the method (in that order). Each message can be a String or a Callback. The callback is called in the scope of the validator, with the rule's parameters as the first argument and the element as the second, and must return a String to display as the message. + * Key/value pairs defining custom messages. Key is the name of an element, value the message to display for that element. Instead + * of a plain message, another map with specific messages for each rule can be used. Overrides the title attribute of an element or + * the default message for the method (in that order). Each message can be a String or a Callback. The callback is called in the scope + * of the validator, with the rule's parameters as the first argument and the element as the second, and must return a String to display + * as the message. * * default: the default message for the method used */ @@ -97,6 +108,12 @@ declare namespace JQueryValidation * A boolean true is not a valid value. */ onclick?: ShouldValidatePredicate; + /** + * Function. Validate elements when user focuses in. If omitted hides all other fields marked as invalid. + * + * Set to a custom Function to decide for yourself when to run validation. + */ + onfocusin?: ValidatePredicate; /** * Boolean or Function. Validate elements (except checkboxes/radio buttons) on blur. If nothing is entered, all rules are skipped, except when the field was already marked as invalid. * @@ -105,7 +122,8 @@ declare namespace JQueryValidation */ onfocusout?: ShouldValidatePredicate; /** - * Boolean or Function. Validate elements on keyup. As long as the field is not marked as invalid, nothing happens. Otherwise, all rules are checked on each key up event. Set to false to disable. + * Boolean or Function. Validate elements on keyup. As long as the field is not marked as invalid, nothing happens. + * Otherwise, all rules are checked on each key up event. Set to false to disable. * * Set to a Function to decide for yourself when to run validation. * A boolean true is not a valid value. @@ -120,27 +138,36 @@ declare namespace JQueryValidation */ onsubmit?: boolean; /** - * A custom message display handler. Gets the map of errors as the first argument and an array of errors as the second, called in the context of the validator object. The arguments contain only those elements currently validated, which can be a single element when doing validation onblur/keyup. You can trigger (in addition to your own messages) the default behaviour by calling this.defaultShowErrors(). + * A custom message display handler. Gets the map of errors as the first argument and an array of errors as the second, + * called in the context of the validator object. The arguments contain only those elements currently validated, + * which can be a single element when doing validation onblur/keyup. You can trigger (in addition to your own messages) + * the default behaviour by calling this.defaultShowErrors(). */ rules?: RulesDictionary; /** - * A custom message display handler. Gets the map of errors as the first argument and an array of errors as the second, called in the context of the validator object. The arguments contain only those elements currently validated, which can be a single element when doing validation onblur/keyup. You can trigger (in addition to your own messages) the default behaviour by calling this.defaultShowErrors(). + * A custom message display handler. Gets the map of errors as the first argument and an array of errors as the second, + * called in the context of the validator object. The arguments contain only those elements currently validated, which can + * be a single element when doing validation onblur/keyup. You can trigger (in addition to your own messages) the default + * behaviour by calling this.defaultShowErrors(). */ - showErrors?: (errorMap: ErrorDictionary, errorList: ErrorListItem[]) => void; + showErrors?(errorMap: ErrorDictionary, errorList: ErrorListItem[]): void; /** - * Callback for handling the actual submit when the form is valid. Gets the form and the event object. Replaces the default submit. The right place to submit a form via Ajax after it is validated. + * Callback for handling the actual submit when the form is valid. Gets the form and the event object. Replaces the default submit. + * The right place to submit a form via Ajax after it is validated. */ - submitHandler?: (form: HTMLFormElement, event?: JQueryEventObject) => void; + submitHandler?(form: HTMLFormElement, event?: JQueryEventObject): void; /** - * String or Function. If specified, the error label is displayed to show a valid element. If a String is given, it is added as a class to the label. If a Function is given, it is called with the label (as a jQuery object) and the validated input (as a DOM element). The label can be used to add a text like "ok!". + * String or Function. If specified, the error label is displayed to show a valid element. If a String is given, it is added as + * a class to the label. If a Function is given, it is called with the label (as a jQuery object) and the validated input (as a DOM element). + * The label can be used to add a text like "ok!". */ - success?: string|{($label: JQuery, validatedInput: HTMLElement):void}; + success?: string | (($label: JQuery, validatedInput: HTMLElement) => void); /** * Called to revert changes made by option highlight, same arguments as highlight. * * default: Removes the errorClass */ - unhighlight?: (element: HTMLElement, errorClass: string, validClass: string) => void; + unhighlight?(element: HTMLElement, errorClass: string, validClass: string): void; /** * This class is added to an element after it was validated and considered valid. * @@ -155,19 +182,16 @@ declare namespace JQueryValidation wrapper?: string; } - interface ErrorDictionary - { + interface ErrorDictionary { [name: string]: string; } - interface ErrorListItem - { + interface ErrorListItem { message: string; element: HTMLElement; } - interface ValidatorStatic - { + interface ValidatorStatic { /** * Add a compound class method - useful to refactor common combinations of rules into a single class. * @@ -182,20 +206,13 @@ declare namespace JQueryValidation */ addClassRules(rules: RulesDictionary): void; /** - * Add a custom validation method. It must consist of a name (must be a legal javascript identifier), a javascript based function and a default string message. + * Add a custom validation method. It must consist of a name (must be a legal javascript identifier), a javascript based function and a default string message or a message generating function. * * @param name The name of the method used to identify it and referencing it; this must be a valid JavaScript identifier * @param method The actual method implementation, returning true if an element is valid. First argument: Current value. Second argument: Validated element. Third argument: Parameters. + * @param message a default string message or a Message generator. First argument: Parameters. Second argument: Validated element. */ - addMethod(name: string, method: (value: any, element: HTMLElement, params: any) => boolean, message?: string): void; - /** - * Add a custom validation method. It must consist of a name (must be a legal javascript identifier), a predicate function and a message generating function. - * - * @param name The name of the method used to identify it and referencing it; this must be a valid JavaScript identifier - * @param method The actual method implementation, returning true if an element is valid. First argument: Current value. Second argument: Validated element. Third argument: Parameters. - * @param message Message generator. First argument: Parameters. Second argument: Validated element. - */ - addMethod(name: string, method: (value: any, element: HTMLElement, params: any) => boolean, message?: (params: any, element: HTMLElement) => string): void; + addMethod(name: string, method: (value: any, element: HTMLElement, params: any) => boolean, message?: string | ((params: any, element: HTMLElement) => string)): void; /** * Replaces {n} placeholders with arguments. * @@ -214,8 +231,7 @@ declare namespace JQueryValidation methods: { [index: string]: Function }; } - interface Validator - { + interface Validator { element(element: string|JQuery): boolean; checkForm(): boolean; /** @@ -255,42 +271,32 @@ declare namespace JQueryValidation } } -interface JQuery -{ +interface JQuery { /** * Remove the specified attributes from the first matched element and return them. * * @param attributes A space-separated list of attribute names to remove. */ removeAttrs(attributes: string): any; - + // tslint:disable:unified-signatures /** - * Returns the validations rules for the first selected element - */ - rules(): any; - - /** - * Removes the specified rules and returns all rules for the first matched element. + * Adds the specified rules and returns all rules for the first matched element. Requires that the parent form is validated, that is, $( "form" ).validate() is called first. * - * @param command "remove" - * @param rules Removes and returns all rules. Manipulates only rules specified via rules-option or via rules("add"). - */ - rules(command: string): any; - /** - * Removes the specified rules and returns all rules for the first matched element. - * - * @param command "remove" - * @param rules The space-separated names of rules to remove and return. Manipulates only rules specified via rules-option or via rules("add"). - */ - rules(command: string, rules: string): any; - /** - * Adds the specified rules and returns all rules for the first matched element. Requires that the parent form is validated, that is, $("form").validate() is called first - * - * @param command "add" + * @param command "remove" or "add" * @param rules The rules to add. Accepts the same format as the rules-option of the validate-method. */ - rules(command: string, rules: JQueryValidation.RulesDictionary): any; - + rules(command: "add", rules?: JQueryValidation.RulesDictionary): any; + /** + * Removes the specified rules and returns all rules for the first matched element. + * @param command "remove" + * @param rules The space-seperated names of rules to remove and return. If left unspecified, removes and returns all rules. Manipulates only rules specified via rules-option or via rules("add"). + */ + rules(command: "remove", rules?: string): any; + /** + * Returns the validation rules for teh first selected element. + */ + rules(): any; + // tslint:enable /** * Checks whether the selected form is valid or whether all selected elements are valid. */ @@ -304,8 +310,7 @@ interface JQuery validate(options?: JQueryValidation.ValidationOptions): JQueryValidation.Validator; } -interface JQueryStatic -{ +interface JQueryStatic { /** * Replaces {n} placeholders with arguments. * diff --git a/types/jquery.validation/jquery.validation-tests.ts b/types/jquery.validation/jquery.validation-tests.ts index 68062d6e1c..08bc439973 100644 --- a/types/jquery.validation/jquery.validation-tests.ts +++ b/types/jquery.validation/jquery.validation-tests.ts @@ -6,15 +6,15 @@ function test_validate() { debug: true }); $(".selector").validate({ - submitHandler: function (form) { + submitHandler: (form) => { $(form).ajaxSubmit(); } }); $(".selector").validate({ - invalidHandler: function (form, validator) { - var errors = validator.numberOfInvalids(); + invalidHandler: (form, validator) => { + const errors = validator.numberOfInvalids(); if (errors) { - var message = errors == 1 + const message = errors === 1 ? 'You missed 1 field. It has been highlighted' : 'You missed ' + errors + ' fields. They have been highlighted'; $("div.error span").html(message); @@ -54,9 +54,9 @@ function test_validate() { groups: { username: "fname lname" }, - errorPlacement: function (error, element) { - if (element.attr("name") == "fname" - || element.attr("name") == "lname") + errorPlacement: (error, element) => { + if (element.attr("name") === "fname" + || element.attr("name") === "lname") error.insertAfter("#lastname"); else error.insertAfter(element); @@ -66,6 +66,9 @@ function test_validate() { $(".selector").validate({ onsubmit: false }); + $(".selector").validate({ + onfocusin: (elt, event) => { }, + }); $(".selector").validate({ onfocusout: false }); @@ -94,7 +97,7 @@ function test_validate() { }); $("#myform").validate({ meta: "validate", - submitHandler: function () { alert("Submitted!") } + submitHandler: () => { alert("Submitted!"); } }); $(".selector").validate({ errorClass: "invalid" @@ -111,52 +114,52 @@ function test_validate() { $("#myform").validate({ errorLabelContainer: "#messageBox", wrapper: "li", - submitHandler: function () { alert("Submitted!") } + submitHandler: () => { alert("Submitted!"); } }); $("#myform").validate({ errorContainer: "#messageBox1, #messageBox2", errorLabelContainer: "#messageBox1 ul", wrapper: "li", debug: true, - submitHandler: function () { alert("Submitted!") } + submitHandler: () => { alert("Submitted!"); } }); $(".selector").validate({ - showErrors: function (errorMap: JQueryValidation.ErrorDictionary, errorList: JQueryValidation.ErrorListItem[]) { + showErrors: (errorMap: JQueryValidation.ErrorDictionary, errorList: JQueryValidation.ErrorListItem[]) => { $("#summary").html("Your form contains " + this.numberOfInvalids() + " errors, see details below."); this.defaultShowErrors(); } }); $("#myform").validate({ - errorPlacement: function (error, element) { + errorPlacement: (error, element) => { error.appendTo(element.parent("td").next("td")); }, debug: true }); $("#myform").validate({ success: "valid", - submitHandler: function () { alert("Submitted!") } + submitHandler: () => { alert("Submitted!"); } }); $("#myform").validate({ - success: function (label) { - label.addClass("valid").text("Ok!") + success: (label) => { + label.addClass("valid").text("Ok!"); }, - submitHandler: function () { alert("Submitted!") } + submitHandler: () => { alert("Submitted!"); } }); $(".selector").validate({ - highlight: function (element, errorClass) { - $(element).fadeOut(function () { + highlight: (element, errorClass) => { + $(element).fadeOut(() => { $(element).fadeIn(); }); } }); $(".selector").validate({ - highlight: function (element: HTMLInputElement, errorClass, validClass) { + highlight: (element: HTMLInputElement, errorClass, validClass) => { $(element).addClass(errorClass).removeClass(validClass); - $((element).form).find("label[for=" + element.id + "]") + $(( element).form).find("label[for=" + element.id + "]") .addClass(errorClass); }, - unhighlight: function (element: HTMLInputElement, errorClass, validClass) { + unhighlight: (element: HTMLInputElement, errorClass, validClass) => { $(element).removeClass(errorClass).addClass(validClass); - $((element).form).find("label[for=" + element.id + "]") + $(( element).form).find("label[for=" + element.id + "]") .removeClass(errorClass); } }); @@ -173,13 +176,13 @@ function test_validate() { $('.selector').validate({ onfocusout: () => {}, onkeyup: () => {}, - onclick: function(elt) { return 2; } + onclick: elt => 2, }); } function test_methods() { $("#myform").validate(); - $("a.check").click(function () { + $("a.check").click(() => { alert("Valid: " + $("#myform").valid()); return false; }); @@ -201,8 +204,8 @@ function test_methods() { minlength: jQuery.format("Please, at least {0} characters are necessary") } }); - $("#skip").click(function () { - var rules = $("#myinput").removeAttrs("min max"); + $("#skip").click(() => { + const rules = $("#myinput").removeAttrs("min max"); $("#myform").submit(); $("#myinput").attr(rules); }); @@ -210,25 +213,25 @@ function test_methods() { $("#myform").validate().form(); $("#myform").validate().element("#myselect"); $("#myform").validate().element($("#myselect")); - var validator = $("#myform").validate(); + const validator = $("#myform").validate(); validator.resetForm(); - validator.showErrors({ "firstname": "I know that your firstname is Pete, Pete!" }); + validator.showErrors({ firstname: "I know that your firstname is Pete, Pete!" }); validator.hideErrors(); - var isValid: boolean = validator.valid(); - var size: number = validator.size(); - var errorMap: JQueryValidation.ErrorDictionary = validator.errorMap; - var errorList: JQueryValidation.ErrorListItem[] = validator.errorList; + const isValid: boolean = validator.valid(); + const size: number = validator.size(); + const errorMap: JQueryValidation.ErrorDictionary = validator.errorMap; + const errorList: JQueryValidation.ErrorListItem[] = validator.errorList; $("#summary").text(validator.numberOfInvalids() + " field(s) are invalid"); - var invalidElements: HTMLElement[] = validator.invalidElements(); - var validElements: HTMLElement[] = validator.validElements(); + const invalidElements: HTMLElement[] = validator.invalidElements(); + const validElements: HTMLElement[] = validator.validElements(); } function test_static_methods() { jQuery.validator.setDefaults({ debug: true }); - jQuery.validator.addMethod("domain", function (value, element) { + jQuery.validator.addMethod("domain", function(value, element) { return this.optional(element) || /^http:\/\/mycorporatedomain.com/.test(value); }, "Please specify the correct domain for your documents"); jQuery.validator.addClassRules({ diff --git a/types/jquery.validation/tslint.json b/types/jquery.validation/tslint.json new file mode 100644 index 0000000000..b0e7084e94 --- /dev/null +++ b/types/jquery.validation/tslint.json @@ -0,0 +1,6 @@ +{ + "extends": "../tslint.json", + "rules": { + "ban-types": false + } +} diff --git a/types/js-beautify/index.d.ts b/types/js-beautify/index.d.ts index ea67ddbad2..47fdd8292e 100644 --- a/types/js-beautify/index.d.ts +++ b/types/js-beautify/index.d.ts @@ -57,7 +57,7 @@ interface CSSBeautifyOptions { interface jsb{ (js_source_text: string, options?: JsBeautifyOptions) : string ; js:(js_source_text: string, options?: JsBeautifyOptions) => string ; - beautify_js:(js_source_text: string, options?: JsBeautifyOptions) => string ; + js_beautify:(js_source_text: string, options?: JsBeautifyOptions) => string ; css:(js_source_text: string, options?: CSSBeautifyOptions) => string ; css_beautify:(js_source_text: string, options?: CSSBeautifyOptions) => string ; diff --git a/types/js-data-http/index.d.ts b/types/js-data-http/index.d.ts index 2a2fafcedb..62a2c1e25b 100644 --- a/types/js-data-http/index.d.ts +++ b/types/js-data-http/index.d.ts @@ -7,9 +7,9 @@ import * as JSData from 'js-data'; declare module 'js-data' { interface DSHttpAdapterOptions { - serialize?: (resourceName: string, data: any) => any; - deserialize?: (resourceName: string, data: any) => any; - queryTransform?: (resourceName: string, params: DSFilterParams) => any; + serialize?(resourceName: string, data: any): any; + deserialize?(resourceName: string, data: any): any; + queryTransform?(resourceName: string, params: DSFilterParams): any; httpConfig?: any; forceTrailingSlash?: boolean; log?: boolean | ((message?: any, ...optionalParams: any[]) => void); diff --git a/types/js-data-http/tslint.json b/types/js-data-http/tslint.json index 394d3ce319..27b52dc1e1 100644 --- a/types/js-data-http/tslint.json +++ b/types/js-data-http/tslint.json @@ -1,7 +1,7 @@ { "extends": "../tslint.json", "rules": { - "forbidden-types": false, + "ban-types": false, "no-misused-new": false } } diff --git a/types/jsnlog/index.d.ts b/types/jsnlog/index.d.ts index 4d1c707b4f..62a0d355ae 100644 --- a/types/jsnlog/index.d.ts +++ b/types/jsnlog/index.d.ts @@ -9,16 +9,16 @@ // ------------------------------- /** -* Copyright 2016 Mattijs Perdeck. -* -* This project is licensed under the MIT license. -* -* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ + * Copyright 2016 Mattijs Perdeck. + * + * This project is licensed under the MIT license. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ // Declarations of all interfaces and ambient objects, except for JL itself. // Provides strong typing in both jsnlog.ts itself and in TypeScript programs that use @@ -31,8 +31,8 @@ declare namespace JL { defaultAjaxUrl?: string; clientIP?: string; requestId?: string; - defaultBeforeSend?: (xhr: XMLHttpRequest) => void; - serialize?: (obj: any) => string; + defaultBeforeSend?(xhr: XMLHttpRequest): void; + serialize?(obj: any): string; } interface JSNLogFilterOptions { @@ -57,7 +57,7 @@ declare namespace JL { interface JSNLogAjaxAppenderOptions extends JSNLogAppenderOptions { url?: string; - beforeSend?: (xhr: XMLHttpRequest) => void; + beforeSend?(xhr: XMLHttpRequest): void; } interface JSNLogLogger { diff --git a/types/jui-core/index.d.ts b/types/jui-core/index.d.ts index 6d15361d8e..d932198d17 100644 --- a/types/jui-core/index.d.ts +++ b/types/jui-core/index.d.ts @@ -5,14 +5,15 @@ /// -declare var jui: JuiStatic; +export const jui: JuiStatic; interface UtilBase { /** * @property browser check browser agent * @property {Boolean} browser.webkit Webkit 브라우저 체크 * @property {Boolean} browser.mozilla Mozilla 브라우저 체크 - * @property {Boolean} browser.msie IE 브라우저 체크 */ + * @property {Boolean} browser.msie IE 브라우저 체크 + */ browser: { webkit: boolean, mozilla: boolean, @@ -389,11 +390,11 @@ interface JuiStatic { includeAll(): any[]; /** - * @method add - * Adds a component object created - * - * @param {Object} ui UI instance - */ + * @method add + * Adds a component object created + * + * @param {Object} ui UI instance + */ add(uiIns: any): void; /** diff --git a/types/jui-grid/index.d.ts b/types/jui-grid/index.d.ts index 31b3ca2b51..8ced2164e4 100644 --- a/types/jui-grid/index.d.ts +++ b/types/jui-grid/index.d.ts @@ -71,7 +71,7 @@ export interface GridRow { type: "open"|"fold"; /** @property {Function} [type="null"] State value that indicates whether a child row is shown or hidden. */ - tpl?: () => void; + tpl?(): void; setIndex(rownum: number|string): void; reload(columns: GridColumn[], seq: any, xssFilter: any): void; diff --git a/types/jui-grid/jui-grid-tests.ts b/types/jui-grid/jui-grid-tests.ts index 2609e94021..3b5bfa3db8 100644 --- a/types/jui-grid/jui-grid-tests.ts +++ b/types/jui-grid/jui-grid-tests.ts @@ -40,9 +40,9 @@ jui.ready([ "grid.table" ], (table: GridTable) => { ]); const table_3_submit: Function = (index: number) => { - const name = $(table_3.root).find(".name").val(), - age = $(table_3.root).find(".age").val(), - location = $(table_3.root).find(".location").val(); + const name = $(table_3.root).find(".name").val(); + const age = $(table_3.root).find(".age").val(); + const location = $(table_3.root).find(".location").val(); //noinspection TypeScriptValidateTypes table_3.update(index, { name, age, location }); diff --git a/types/jui-grid/tslint.json b/types/jui-grid/tslint.json index f05741c59b..b0e7084e94 100644 --- a/types/jui-grid/tslint.json +++ b/types/jui-grid/tslint.json @@ -1,6 +1,6 @@ { "extends": "../tslint.json", "rules": { - "forbidden-types": false + "ban-types": false } } diff --git a/types/klaw-sync/index.d.ts b/types/klaw-sync/index.d.ts index d344879e1a..e68af63739 100644 --- a/types/klaw-sync/index.d.ts +++ b/types/klaw-sync/index.d.ts @@ -34,4 +34,3 @@ interface Options { } export function klawSync(root: string, options?: Options): ReadonlyArray - diff --git a/types/koa-cache-control/tsconfig.json b/types/koa-cache-control/tsconfig.json index ae4aea7b85..846b5abbae 100644 --- a/types/koa-cache-control/tsconfig.json +++ b/types/koa-cache-control/tsconfig.json @@ -6,7 +6,7 @@ ], "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": false, + "strictNullChecks": true, "baseUrl": "../", "typeRoots": [ "../" diff --git a/types/koa-cache-control/tslint.json b/types/koa-cache-control/tslint.json index eb88e553a5..2221e40e4a 100644 --- a/types/koa-cache-control/tslint.json +++ b/types/koa-cache-control/tslint.json @@ -1,7 +1 @@ -{ - "extends": "../tslint.json", - - "noImplicitAny": "true", - "noImplicitThis": "true", - "strictNullChecks": "true" -} +{ "extends": "../tslint.json" } \ No newline at end of file diff --git a/types/koa-compose/index.d.ts b/types/koa-compose/index.d.ts index a1037f187c..88047abcc9 100644 --- a/types/koa-compose/index.d.ts +++ b/types/koa-compose/index.d.ts @@ -3,7 +3,6 @@ // Definitions by: jKey Lu // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - declare function compose(middleware: Array>): compose.ComposedMiddleware; declare namespace compose { diff --git a/types/koa-compose/koa-compose-tests.ts b/types/koa-compose/koa-compose-tests.ts index cb7b78b397..4c12ca6571 100644 --- a/types/koa-compose/koa-compose-tests.ts +++ b/types/koa-compose/koa-compose-tests.ts @@ -1,15 +1,13 @@ - import compose = require('koa-compose'); -var fn1: compose.Middleware = (context: any, next: () => Promise): Promise => +const fn1: compose.Middleware = (context: any, next: () => Promise): Promise => Promise .resolve(console.log('in fn1')) .then(() => next()); -var fn2: compose.Middleware = (context: any, next: () => Promise): Promise => +const fn2: compose.Middleware = (context: any, next: () => Promise): Promise => Promise .resolve(console.log('in fn2')) .then(() => next()); - -var fn = compose([fn1, fn2]); \ No newline at end of file +const fn = compose([fn1, fn2]); diff --git a/types/koa-json-error/index.d.ts b/types/koa-json-error/index.d.ts index dfe23c26b0..5fc9618edf 100644 --- a/types/koa-json-error/index.d.ts +++ b/types/koa-json-error/index.d.ts @@ -10,17 +10,17 @@ interface JSONErrorOptions { /** * Perform some task before calling `options.format`. Must be a function with the original err as its only argument. */ - preFormat?: (err: Error) => any; + preFormat?(err: Error): any; /** * Runs inmediatly after `options.preFormat`. It receives two arguments: the original `err` and the output of `options.preFormat`. It should `return` a newly formatted error. */ - format?: (err: Error, obj: any) => any; + format?(err: Error, obj: any): any; /** * Runs inmediatly after `options.format`. It receives two arguments: the original `err` and the output of `options.format`. It should `return` a newly formatted error. */ - postFormat?: (err: Error, obj: any) => any; + postFormat?(err: Error, obj: any): any; } /** diff --git a/types/koa-jwt/index.d.ts b/types/koa-jwt/index.d.ts index ba60bd8e61..a355d44ce2 100644 --- a/types/koa-jwt/index.d.ts +++ b/types/koa-jwt/index.d.ts @@ -13,7 +13,7 @@ declare namespace jwt { interface Options { secret: string | Buffer; key?: string; - getToken?: (opts: jwt.Options) => string; + getToken?(opts: jwt.Options): string; passthrough?: boolean; cookie?: string; debug?: boolean; diff --git a/types/koa-views/index.d.ts b/types/koa-views/index.d.ts new file mode 100644 index 0000000000..c06be87dfb --- /dev/null +++ b/types/koa-views/index.d.ts @@ -0,0 +1,56 @@ +// Type definitions for koa-views 2.x +// Project: https://github.com/queckezz/koa-views +// Definitions by: Alex Friedman +// Definitions: https://github.com/brooklyndev/DefinitelyTyped + +/* =================== USAGE =================== + + import * as Koa from 'koa'; + import * as views from 'koa-views'; + + const app = new Koa(); + app.use(views(__dirname + '/views', { + map: { + html: 'underscore' + } + })); + + app.use(async function (ctx, next) { + await ctx.render('user', { + user: 'John' + }); + }); + + =============================================== */ + +import * as Koa from "koa"; + +declare function views(dir: string, opts?: { + /* + * default extension for your views + */ + extension?: string, + /* + * these options will get passed to the view engine + */ + options?: any, + /* + * map a file extension to an engine + */ + map?: any, + /* + * replace consolidate as default engine source + */ + engineSource?: any, +}): Koa.Middleware; +declare namespace views { } + +export = views; + +import * as koa from "koa"; + +declare module 'koa' { + interface Context { + render(viewPath: string, locals?: any): Promise; + } +} diff --git a/types/koa-views/koa-views-tests.ts b/types/koa-views/koa-views-tests.ts new file mode 100644 index 0000000000..65d6be7e1f --- /dev/null +++ b/types/koa-views/koa-views-tests.ts @@ -0,0 +1,19 @@ +import * as Koa from "koa"; +import * as views from "koa-views"; + +const app = new Koa(); + +app.use(views('/views', { + map: { + html: 'underscore' + }, + extension: '.html', + engineSource: {}, + options: {} +})); + +app.use((ctx: Koa.Context) => { + ctx.render('user', { + user: 'John' + }).then(() => console.log('done render call')); +}); diff --git a/types/koa-views/tsconfig.json b/types/koa-views/tsconfig.json new file mode 100644 index 0000000000..69d0c62b8c --- /dev/null +++ b/types/koa-views/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "koa-views-tests.ts" + ] +} \ No newline at end of file diff --git a/types/koa-views/tslint.json b/types/koa-views/tslint.json new file mode 100644 index 0000000000..3bfbe8c142 --- /dev/null +++ b/types/koa-views/tslint.json @@ -0,0 +1,6 @@ +{ + "extends": "../tslint.json", + "rules": { + "ban-types": false + } +} \ No newline at end of file diff --git a/types/kss/index.d.ts b/types/kss/index.d.ts new file mode 100644 index 0000000000..1a7359c1da --- /dev/null +++ b/types/kss/index.d.ts @@ -0,0 +1,149 @@ +// Type definitions for KSS 3.0.0-beta +// Project: https://github.com/kss-node/kss-node +// Definitions by: Gilad Gray +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/** Builds a styleguide given the proper options. */ +declare function kss(options?: kss.KssOptions): Promise; +declare namespace kss { + interface File { + /** bath to source directory */ + base: string; + /** file contents */ + contents: string; + /** full path to file */ + path: string; + } + + interface Source { + /** The name of the file. */ + filename: string; + /** The full path of the file. */ + path: string; + /** The line number where the KSS comment is found. */ + line: number; + } + + interface Options { + /** + * Whether to automatically format Markdown using [marked](https://github.com/chjj/marked). + * Enabled by default. + * @default true + */ + markdown?: boolean; + /** + * Use a regex or string (e.g. `*.less|*.css`) to only parse files matching this value. + * @default *.css|*.less|*.sass|*.scss|*.styl|*.stylus + */ + mask?: string | RegExp; + /** + * kss-node makes the header available separately from the description. To make kss-node + * behave like the Ruby KSS, disable this option and the title will remain a part of the + * description. Enabled by default. + * @default true. + */ + header?: boolean; + } + + interface KssOptions extends Options { + builder?: any; + clone?: boolean; + custom?: any; + logErrorFunction?(...msg: string[]): void; + json?: boolean; + mask?: string | RegExp; + source: string[]; + verbose?: boolean; + } + + type CallbackFn = (error: Error | null, styleguide: KssStyleguide) => void; + + class KssStyleguide { + constructor(data?: any); + autoInit(autoInit: boolean): KssStyleguide; + customPropertyNames(): string[]; + customPropertyNames(names: string | string[]): KssStyleguide; + hasNumericReferences(): boolean; + init(): KssStyleguide; + referenceDelimiter(): string; + sections(): KssSection[]; + sections(query: string | RegExp): false | KssSection | KssSection[]; + sections(sections: KssSection | KssSection[]): KssStyleguide; + toJSON(): any; + } + + class KssSection { + constructor(data?: any); + custom(name: string): any; + custom(name: string, value: any): KssSection; + customPropertyNames(): string[]; + deprecated(): boolean; + deprecated(deprecated: boolean): KssSection; + depth(): number; + depth(depth: number): KssSection; + description(): string; + description(description: string): KssSection; + experimental(): boolean; + experimental(experimental: boolean): KssSection; + header(): string; + header(header: string): KssSection; + markup(): false | string; + markup(markup: string): KssSection; + modifiers(): KssModifier[]; + modifiers(query: number | string): false | KssModifier; + modifiers(modifiers: KssModifier | KssModifier[]): KssSection; + parameters(): KssParameter[]; + parameters(query: number | string): false | KssParameter; + parameters(parameters: KssParameter | KssParameter[]): KssSection; + reference(): string; + reference(reference: string): KssSection; + referenceNumber(): string; + referenceNumber(referenceNumber: string): KssSection; + referenceURI(): string; + referenceURI(referenceURI: string): KssSection; + source(): Source; + source(source: Source): KssSection; + sourceFileName(): string; + sourceLine(): string; + styleGuide(): KssStyleguide; + styleGuide(styleguide: KssStyleguide): KssSection; + toJSON(): any; + weight(): number; + weight(weight: number): KssSection; + } + + class KssModifier { + constructor(data?: any); + className(): string; + className(className: string): KssModifier; + description(): string; + description(description: string): KssModifier; + markup(): string; + markup(markup: string): KssModifier; + name(): string; + name(name: string): KssModifier; + section(): KssSection; + section(section: KssSection): KssModifier; + toJSON(): any; + } + + class KssParameter { + constructor(data?: any); + defaultValue(): string; + description(): string; + description(description: string): KssParameter; + name(): string; + name(name: string): KssParameter; + section(): KssSection; + section(section: KssSection): KssParameter; + toJSON(): any; + } + + /** Parse a string of documented CSS, or an array of file anys with their content. */ + function parse(input: string | File[], options: Options): KssStyleguide; + + /** Traverse a directory, parse its contents, and create a `KssStyleGuide`. */ + function traverse(directory: string | string[], options: Options): Promise; +} + +export = kss; diff --git a/types/kss/kss-tests.ts b/types/kss/kss-tests.ts new file mode 100644 index 0000000000..1ad03a785b --- /dev/null +++ b/types/kss/kss-tests.ts @@ -0,0 +1,10 @@ +import kss = require("kss"); + +kss.traverse("src", { markdown: false }) + .then((styleguide) => styleguide.sections()) + .then((sections) => sections.map((s) => s.toJSON())) + .then((json) => console.log(json)); + +const json = kss.parse("file contents", { header: false }).sections().map((s) => s.toJSON()); + +// both json vars should be the same type diff --git a/types/kss/tsconfig.json b/types/kss/tsconfig.json new file mode 100644 index 0000000000..30cdd58f41 --- /dev/null +++ b/types/kss/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "kss-tests.ts" + ] +} diff --git a/types/kss/tslint.json b/types/kss/tslint.json new file mode 100644 index 0000000000..f9e30021f4 --- /dev/null +++ b/types/kss/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "../tslint.json" +} diff --git a/types/later/index.d.ts b/types/later/index.d.ts index 5dd68ec90a..2e0d4de386 100644 --- a/types/later/index.d.ts +++ b/types/later/index.d.ts @@ -4,9 +4,7 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace later { - interface ScheduleData { - /** * A list of recurrence information as a composite schedule. */ @@ -25,7 +23,6 @@ declare namespace later { } interface Recurrence { - /** Time in seconds from midnight. */ t?: number[]; @@ -142,11 +139,10 @@ declare namespace later { * For acces to custom time periods created as extension to the later static type * and modifiers created on the later modifier static type. */ - [ timeperiodAndModifierName: string ]: number[] | undefined; + [timeperiodAndModifierName: string]: number[] | undefined; } interface ParseStatic { - /** * Create a recurrence builder for building schedule data. */ @@ -168,7 +164,6 @@ declare namespace later { } interface Timer { - /** * Clear the timer and end execution. */ @@ -176,58 +171,56 @@ declare namespace later { } interface Schedule { - /** - * Finds the next valid instance or instances of the current schedule, - * optionally between a specified start and end date. Start date is - * Date.now() by default, end date is unspecified. Start date must be - * smaller than end date. - * - * @param {number} numberOfInst: The number of instances to return - * @param {Date} dateFrom: The earliest a valid instance can occur - * @param {Date} dateTo: The latest a valid instance can occur - */ + * Finds the next valid instance or instances of the current schedule, + * optionally between a specified start and end date. Start date is + * Date.now() by default, end date is unspecified. Start date must be + * smaller than end date. + * + * @param {number} numberOfInst: The number of instances to return + * @param {Date} dateFrom: The earliest a valid instance can occur + * @param {Date} dateTo: The latest a valid instance can occur + */ next(numberOfInst: number, dateFrom?: Date, dateTo?: Date): Date[]; /** - * Finds the next valid range or ranges of the current schedule, - * optionally between a specified start and end date. Start date is - * Date.now() by default, end date is unspecified. Start date must be - * greater than end date. - * - * @param {number} numberOfInst: The number of ranges to return - * @param {Date} dateFrom: The earliest a valid range can occur - * @param {Date} dateTo: The latest a valid range can occur - */ + * Finds the next valid range or ranges of the current schedule, + * optionally between a specified start and end date. Start date is + * Date.now() by default, end date is unspecified. Start date must be + * greater than end date. + * + * @param {number} numberOfInst: The number of ranges to return + * @param {Date} dateFrom: The earliest a valid range can occur + * @param {Date} dateTo: The latest a valid range can occur + */ nextRange(numberOfInst: number, dateFrom?: Date, dateTo?: Date): Date[]; /** - * Finds the previous valid instance or instances of the current schedule, - * optionally between a specified start and end date. Start date is - * Date.now() by default, end date is unspecified. Start date must be - * greater than end date. - * - * @param {number} numberOfInst: The number of instances to return - * @param {Date} dateFrom: The earliest a valid instance can occur - * @param {Date} dateTo: The latest a valid instance can occur - */ + * Finds the previous valid instance or instances of the current schedule, + * optionally between a specified start and end date. Start date is + * Date.now() by default, end date is unspecified. Start date must be + * greater than end date. + * + * @param {number} numberOfInst: The number of instances to return + * @param {Date} dateFrom: The earliest a valid instance can occur + * @param {Date} dateTo: The latest a valid instance can occur + */ prev(numberOfInst: number, dateFrom?: Date, dateTo?: Date): Date[]; /** - * Finds the previous valid range or ranges of the current schedule, - * optionally between a specified start and end date. Start date is - * Date.now() by default, end date is unspecified. Start date must be - * greater than end date. - * - * @param {number} numberOfInst: The number of ranges to return - * @param {Date} dateFrom: The earliest a valid range can occur - * @param {Date} dateTo: The latest a valid range can occur - */ + * Finds the previous valid range or ranges of the current schedule, + * optionally between a specified start and end date. Start date is + * Date.now() by default, end date is unspecified. Start date must be + * greater than end date. + * + * @param {number} numberOfInst: The number of ranges to return + * @param {Date} dateFrom: The earliest a valid range can occur + * @param {Date} dateTo: The latest a valid range can occur + */ prevRange(numberOfInst: number, dateFrom?: Date, dateTo?: Date): Date[]; } interface RecurrenceBuilder extends ScheduleData { - /** a time period */ second(): RecurrenceBuilder; @@ -268,7 +261,6 @@ declare namespace later { /** a time period */ fullDate(): RecurrenceBuilder; - /** * Specifies one or more specific vals of a time period information provider. * When used to specify a time, a string indicating the 24-hour time may be used. @@ -371,7 +363,6 @@ declare namespace later { } interface DateProvider { - /** * Set later to use UTC time. */ @@ -434,7 +425,6 @@ declare namespace later { } interface TimePeriod { - /** * The name of the time period information provider. */ @@ -515,7 +505,6 @@ declare namespace later { } interface ModifierStatic { - /** * After Modifier */ @@ -528,7 +517,6 @@ declare namespace later { } interface Static { - /** * Schedule * Generates instances from schedule data. diff --git a/types/later/later-tests.ts b/types/later/later-tests.ts index 1ecd1d6d0e..ea21977c5b 100644 --- a/types/later/later-tests.ts +++ b/types/later/later-tests.ts @@ -1,16 +1,15 @@ import later = require("later"); namespace LaterTest_DefineSchedule { - // define a new schedule - var textSched = later.parse.text('at 10:15am every weekday'); - var cronSched = later.parse.cron('0 0/5 14,18 * * ?'); - var recurSched = later.parse.recur().last().dayOfMonth(); - var manualSched = { schedules: [ { M: [ 3 ], D: [ 21 ] } ] }; + const textSched = later.parse.text('at 10:15am every weekday'); + const cronSched = later.parse.cron('0 0/5 14,18 * * ?'); + const recurSched = later.parse.recur().last().dayOfMonth(); + const manualSched = { schedules: [ { M: [ 3 ], D: [ 21 ] } ] }; // this schedule will fire on the closest weekday to the 15th // every month at 2:00 am except in March - var complexSched = later.parse.recur() + const complexSched = later.parse.recur() .on(15).dayOfMonth().onWeekday().on(2).hour() .and() .on(14).dayOfMonth().on(6).dayOfWeek().on(2).hour() @@ -21,7 +20,6 @@ namespace LaterTest_DefineSchedule { } namespace LaterTest_ConfigureTimezone { - // set later to use UTC (the default) later.date.UTC(); @@ -31,7 +29,7 @@ namespace LaterTest_ConfigureTimezone { namespace LaterTest_TimePeriods { export function second() { - var d = new Date('2013-03-22T10:02:05Z'); + const d = new Date('2013-03-22T10:02:05Z'); later.second.name; // 'second' @@ -62,7 +60,7 @@ namespace LaterTest_TimePeriods { } export function minute() { - var d = new Date('2013-03-22T10:02:05Z'); + const d = new Date('2013-03-22T10:02:05Z'); later.minute.name; // 'minute' @@ -93,7 +91,7 @@ namespace LaterTest_TimePeriods { } export function hour() { - var d = new Date('2013-03-22T10:02:05Z'); + const d = new Date('2013-03-22T10:02:05Z'); later.hour.name; // 'hour' @@ -124,7 +122,7 @@ namespace LaterTest_TimePeriods { } export function time() { - var d = new Date('2013-03-22T10:02:05Z'); + const d = new Date('2013-03-22T10:02:05Z'); later.time.name; // 'time' @@ -155,7 +153,7 @@ namespace LaterTest_TimePeriods { } export function day() { - var d = new Date('2013-03-22T10:02:05Z'); + const d = new Date('2013-03-22T10:02:05Z'); later.day.name; // 'day' @@ -186,7 +184,7 @@ namespace LaterTest_TimePeriods { } export function day_of_week() { - var d = new Date('2013-03-22T10:02:05Z'); + const d = new Date('2013-03-22T10:02:05Z'); later.dayOfWeek.name; // 'day of week' @@ -217,7 +215,7 @@ namespace LaterTest_TimePeriods { } export function day_of_week_count() { - var d = new Date('2013-03-22T10:02:05Z'); + const d = new Date('2013-03-22T10:02:05Z'); later.dayOfWeekCount.name; // 'day of week count' @@ -252,7 +250,7 @@ namespace LaterTest_TimePeriods { } export function day_of_year() { - var d = new Date('2013-03-22T10:02:05Z'); + const d = new Date('2013-03-22T10:02:05Z'); later.dayOfYear.name; // 'day of year' @@ -283,7 +281,7 @@ namespace LaterTest_TimePeriods { } export function week_of_month() { - var d = new Date('2013-03-22T10:02:05Z'); + const d = new Date('2013-03-22T10:02:05Z'); later.weekOfMonth.name; // 'week of month' @@ -314,7 +312,7 @@ namespace LaterTest_TimePeriods { } export function week_of_year() { - var d = new Date('2013-03-22T10:02:05Z'); + const d = new Date('2013-03-22T10:02:05Z'); later.weekOfYear.name; // 'week of year' @@ -345,7 +343,7 @@ namespace LaterTest_TimePeriods { } export function month() { - var d = new Date('2013-03-22T10:02:05Z'); + const d = new Date('2013-03-22T10:02:05Z'); later.month.name; // 'month' @@ -376,7 +374,7 @@ namespace LaterTest_TimePeriods { } export function year() { - var d = new Date('2013-03-22T10:02:05Z'); + const d = new Date('2013-03-22T10:02:05Z'); later.year.name; // 'year' @@ -411,11 +409,9 @@ namespace LaterTest_TimePeriods { } export function custom() { - - var customLater = later; + const customLater = later; customLater.partOfDay = { - name: 'part of day', range: later.hour.range * 6, @@ -437,7 +433,7 @@ namespace LaterTest_TimePeriods { }, start(date: Date) { - var hour = customLater.partOfDay.val(date) === 0 + const hour = customLater.partOfDay.val(date) === 0 ? 0 : customLater.partOfDay.val(date) === 1 ? 12 @@ -452,7 +448,7 @@ namespace LaterTest_TimePeriods { }, end(date: Date) { - var hour = customLater.partOfDay.val(date) === 0 + const hour = customLater.partOfDay.val(date) === 0 ? 11 : customLater.partOfDay.val(date) === 1 ? 5 @@ -467,7 +463,7 @@ namespace LaterTest_TimePeriods { }, next(date: Date, val: any) { - var hour = val === 0 + const hour = val === 0 ? 0 : val === 1 ? 12 @@ -483,7 +479,7 @@ namespace LaterTest_TimePeriods { }, prev(date: Date, val: any) { - var hour = val === 0 + const hour = val === 0 ? 11 : val === 1 ? 5 @@ -502,7 +498,6 @@ namespace LaterTest_TimePeriods { } namespace LaterTest_GenerateRecurences { - export function on_method() { // fires on the 2nd minute every hour later.parse.recur().on(2).minute(); @@ -575,7 +570,7 @@ namespace LaterTest_GenerateRecurences { export function and_method() { // fires every 2 hours on the first day of every month // and 8:00am and 8:00pm on the last day of every month - var sched = later.parse.recur() + const sched = later.parse.recur() .every(2).hour().first().dayOfMonth() .and() .on(8, 20).hour().last().dayOfMonth(); @@ -583,42 +578,39 @@ namespace LaterTest_GenerateRecurences { export function except_method() { // fires every minute of every hour except on multiples of 2 and 3 - var sched = later.parse.recur() + const sched = later.parse.recur() .every().minute() .except() .every(2).minute().between(2, 59) .and() .every(3).minute().between(3, 59); } - } namespace LaterTest_CalculateOccurences { - // Initialise next variable. - var next: Date[] = []; + let next: Date[] = []; // calculate the next 10 occurrences of a recur schedule - var recurSched = later.parse.recur().last().dayOfMonth(); + const recurSched = later.parse.recur().last().dayOfMonth(); next = later.schedule(recurSched).next(10); // calculate the previous occurrence starting from March 21, 2013 - var cronSched = later.parse.cron('0 0/5 14,18 * * ?'); + const cronSched = later.parse.cron('0 0/5 14,18 * * ?'); next = later.schedule(cronSched).prev(1, new Date(2013, 2, 21)); } namespace LaterTest_ExecuteCodeUsingSchedule { - // will fire every 5 minutes - var textSched = later.parse.text('every 5 min'); + const textSched = later.parse.text('every 5 min'); // execute logTime one time on the next occurrence of the text schedule - var timer = later.setTimeout(logTime, textSched); + const timer = later.setTimeout(logTime, textSched); // execute logTime for each successive occurrence of the text schedule - var timer2 = later.setInterval(logTime, textSched); + const timer2 = later.setInterval(logTime, textSched); // function to execute function logTime() { diff --git a/types/leaflet-curve/package.json b/types/leaflet-curve/package.json deleted file mode 100644 index 711ba15e43..0000000000 --- a/types/leaflet-curve/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "@types/leaflet": "^0.7" - } -} \ No newline at end of file diff --git a/types/leaflet-curve/tsconfig.json b/types/leaflet-curve/tsconfig.json index b093c40509..06ed09cdd1 100644 --- a/types/leaflet-curve/tsconfig.json +++ b/types/leaflet-curve/tsconfig.json @@ -9,6 +9,9 @@ "noImplicitThis": true, "strictNullChecks": false, "baseUrl": "../", + "typeRoots": [ + "../" + ], "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/types/leaflet-editable/index.d.ts b/types/leaflet-editable/index.d.ts index 3d8c84d93f..f66b45a9b8 100644 --- a/types/leaflet-editable/index.d.ts +++ b/types/leaflet-editable/index.d.ts @@ -3,9 +3,9 @@ // Definitions by: Dominic Alie // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +import * as Leaflet from "leaflet"; -declare namespace L { +declare global { namespace L { /** * Make geometries editable in Leaflet. * @@ -43,12 +43,12 @@ declare namespace L { /** * Layer used to store edit tools (vertex, line guide…). */ - editLayer?: L.LayerGroup; + editLayer?: Leaflet.LayerGroup; /** * Default layer used to store drawn features (marker, polyline…). */ - featuresLayer?: L.LayerGroup; + featuresLayer?: Leaflet.LayerGroup; /** * Class to be used as vertex, for path editing. @@ -104,20 +104,20 @@ declare namespace L { * Start drawing a polyline. If latlng is given, a first point will be added. In any case, continuing on user * click. If options is given, it will be passed to the polyline class constructor. */ - startPolyline(latLng?: LatLng, options?: L.PolylineOptions): L.Polyline; + startPolyline(latLng?: LatLng, options?: Leaflet.PolylineOptions): L.Polyline; /** * Start drawing a polygon. If latlng is given, a first point will be added. In any case, continuing on user * click. If options is given, it will be passed to the polygon class constructor. */ - startPolygon(latLng?: LatLng, options?: L.PolylineOptions): L.Polygon; + startPolygon(latLng?: LatLng, options?: Leaflet.PolylineOptions): L.Polygon; /** * Start adding a marker. If latlng is given, the marker will be shown first at this point. In any case, it * will follow the user mouse, and will have a final latlng on next click (or touch). If options is given, * it will be passed to the marker class constructor. */ - startMarker(latLng?: LatLng, options?: L.MarkerOptions): L.Marker; + startMarker(latLng?: LatLng, options?: Leaflet.MarkerOptions): L.Marker; /** * When you need to stop any ongoing drawing, without needing to know which editor is active. @@ -255,4 +255,4 @@ declare namespace L { export interface Polygon extends EditableMixin, PolygonEditor { } -} +} } diff --git a/types/leaflet-editable/leaflet-editable-tests.ts b/types/leaflet-editable/leaflet-editable-tests.ts index b8ff8744db..09728add47 100644 --- a/types/leaflet-editable/leaflet-editable-tests.ts +++ b/types/leaflet-editable/leaflet-editable-tests.ts @@ -1,4 +1,11 @@ - +class MarkerClass { } +class MarkerEditorClass { } +class MiddleMarkerClass { } +class PolygonClass { } +class PolygonEditorClass { } +class PolylineClass { } +class PolylineEditorClass { } +class VertexMarkerClass { } var map: L.Map = L.map('div', { editable: true, @@ -46,12 +53,3 @@ enabled = polygon.editEnabled(); polygon.newHole(L.latLng(0, 0)); polygon.reset(); polygon.toggleEdit(); - -class MarkerClass { } -class MarkerEditorClass { } -class MiddleMarkerClass { } -class PolygonClass { } -class PolygonEditorClass { } -class PolylineClass { } -class PolylineEditorClass { } -class VertexMarkerClass { } \ No newline at end of file diff --git a/types/leaflet-editable/package.json b/types/leaflet-editable/package.json deleted file mode 100644 index 711ba15e43..0000000000 --- a/types/leaflet-editable/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "@types/leaflet": "^0.7" - } -} \ No newline at end of file diff --git a/types/leaflet-editable/tsconfig.json b/types/leaflet-editable/tsconfig.json index 264f610f6e..4ae40d6774 100644 --- a/types/leaflet-editable/tsconfig.json +++ b/types/leaflet-editable/tsconfig.json @@ -9,7 +9,15 @@ "noImplicitThis": true, "strictNullChecks": false, "baseUrl": "../", + "typeRoots": [ + "../" + ], "types": [], + "paths": { + "leaflet": [ + "leaflet/v0" + ] + }, "noEmit": true, "forceConsistentCasingInFileNames": true }, diff --git a/types/leaflet-fullscreen/index.d.ts b/types/leaflet-fullscreen/index.d.ts new file mode 100644 index 0000000000..5051af1f60 --- /dev/null +++ b/types/leaflet-fullscreen/index.d.ts @@ -0,0 +1,12 @@ +// Type definitions for leaflet-fullscreen 1.0 +// Project: https://github.com/Leaflet/Leaflet.fullscreen +// Definitions by: Denis Carriere +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +declare namespace L { + interface MapOptions { + fullscreenControl?: true | {pseudoFullscreen: boolean} + } +} diff --git a/types/leaflet-fullscreen/leaflet-fullscreen-tests.ts b/types/leaflet-fullscreen/leaflet-fullscreen-tests.ts new file mode 100644 index 0000000000..d016d2eea5 --- /dev/null +++ b/types/leaflet-fullscreen/leaflet-fullscreen-tests.ts @@ -0,0 +1,5 @@ +var map = L.map('map', { + center: [51.505, -0.09], + zoom: 13, + fullscreenControl: true, +}); \ No newline at end of file diff --git a/types/leaflet-fullscreen/tsconfig.json b/types/leaflet-fullscreen/tsconfig.json new file mode 100644 index 0000000000..0da8d35169 --- /dev/null +++ b/types/leaflet-fullscreen/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "leaflet-fullscreen-tests.ts" + ] +} \ No newline at end of file diff --git a/types/leaflet-fullscreen/tslint.json b/types/leaflet-fullscreen/tslint.json new file mode 100644 index 0000000000..192203ab54 --- /dev/null +++ b/types/leaflet-fullscreen/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "../tslint.json" +} \ No newline at end of file diff --git a/types/leaflet-geocoder-mapzen/index.d.ts b/types/leaflet-geocoder-mapzen/index.d.ts index 934c67b563..390a751360 100644 --- a/types/leaflet-geocoder-mapzen/index.d.ts +++ b/types/leaflet-geocoder-mapzen/index.d.ts @@ -3,18 +3,18 @@ // Definitions by: Leonard Lausen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +import * as Leaflet from "leaflet"; -declare namespace L { +declare global { namespace L { namespace Control { - export interface GeocoderStatic extends ClassStatic { + export interface GeocoderStatic extends Leaflet.ClassStatic { /** * Creates a geocoder control. */ new (options?: GeocoderOptions): Geocoder; } - export interface Geocoder extends L.Control { + export interface Geocoder extends Leaflet.Control { } export interface GeocoderOptions { @@ -32,7 +32,7 @@ declare namespace L { * * Default value: false. */ - bounds?: LatLngBounds | boolean; + bounds?: Leaflet.LatLngBounds | boolean; /** * If true, search and autocomplete prioritizes results near the center @@ -42,7 +42,7 @@ declare namespace L { * * Default value: 'true'. */ - focus?: LatLng | boolean; + focus?: Leaflet.LatLng | boolean; /** * Filters results by layers (documentation). @@ -77,7 +77,7 @@ declare namespace L { * * Default value: 'topleft'. */ - position?: L.PositionString; + position?: Leaflet.PositionString; /** * Attribution text to include. @@ -126,7 +126,7 @@ declare namespace L { * * Default value: true */ - markers?: MarkerOptions | boolean; + markers?: Leaflet.MarkerOptions | boolean; /** * If true, the input box will expand to take up the full width of the map container. @@ -173,4 +173,4 @@ declare namespace L { */ export function geocoder(api_key: string, options?: Control.GeocoderOptions): L.Control.Geocoder; } -} +} } diff --git a/types/leaflet-geocoder-mapzen/package.json b/types/leaflet-geocoder-mapzen/package.json deleted file mode 100644 index 711ba15e43..0000000000 --- a/types/leaflet-geocoder-mapzen/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "@types/leaflet": "^0.7" - } -} \ No newline at end of file diff --git a/types/leaflet-geocoder-mapzen/tsconfig.json b/types/leaflet-geocoder-mapzen/tsconfig.json index 1737c5b81c..b5786e4cda 100644 --- a/types/leaflet-geocoder-mapzen/tsconfig.json +++ b/types/leaflet-geocoder-mapzen/tsconfig.json @@ -9,7 +9,15 @@ "noImplicitThis": true, "strictNullChecks": false, "baseUrl": "../", + "typeRoots": [ + "../" + ], "types": [], + "paths": { + "leaflet": [ + "leaflet/v0" + ] + }, "noEmit": true, "forceConsistentCasingInFileNames": true }, diff --git a/types/leaflet-label/index.d.ts b/types/leaflet-label/index.d.ts index da3fafd1a1..e1e96b717a 100644 --- a/types/leaflet-label/index.d.ts +++ b/types/leaflet-label/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Wim Looman // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +import * as Leaflet from "leaflet"; declare global { namespace L { diff --git a/types/leaflet-label/package.json b/types/leaflet-label/package.json deleted file mode 100644 index 711ba15e43..0000000000 --- a/types/leaflet-label/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "@types/leaflet": "^0.7" - } -} \ No newline at end of file diff --git a/types/leaflet-label/tsconfig.json b/types/leaflet-label/tsconfig.json index c9232660a0..a3e17b8d51 100644 --- a/types/leaflet-label/tsconfig.json +++ b/types/leaflet-label/tsconfig.json @@ -9,7 +9,15 @@ "noImplicitThis": true, "strictNullChecks": false, "baseUrl": "../", + "typeRoots": [ + "../" + ], "types": [], + "paths": { + "leaflet": [ + "leaflet/v0" + ] + }, "noEmit": true, "forceConsistentCasingInFileNames": true }, diff --git a/types/leaflet-markercluster/package.json b/types/leaflet-markercluster/package.json deleted file mode 100644 index b06daabe04..0000000000 --- a/types/leaflet-markercluster/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "@types/leaflet": "^1.0" - } -} \ No newline at end of file diff --git a/types/leaflet.awesome-markers/index.d.ts b/types/leaflet.awesome-markers/index.d.ts index 1c2762f672..ee6b65eaa4 100644 --- a/types/leaflet.awesome-markers/index.d.ts +++ b/types/leaflet.awesome-markers/index.d.ts @@ -3,15 +3,15 @@ // Definitions by: Egor Komarov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +import * as Leaflet from "leaflet"; -declare module L { +declare global { namespace L { module AwesomeMarkers { var version: string; function icon(options: AwesomeMarkers.IconOptions): AwesomeMarkers.Icon; - interface IconStatic extends L.IconStatic { + interface IconStatic extends Leaflet.IconStatic { /** * Creates an icon instance with the given options. */ @@ -27,11 +27,11 @@ declare module L { }; } - interface Icon extends L.Icon { + interface Icon extends Leaflet.Icon { options: AwesomeMarkers.IconOptions; } - interface IconOptions extends L.IconOptions { + interface IconOptions extends Leaflet.IconOptions { /** * Name of the icon. See glyphicons or font-awesome. */ @@ -65,4 +65,4 @@ declare module L { var Icon: AwesomeMarkers.IconStatic; } -} +} } diff --git a/types/leaflet.awesome-markers/package.json b/types/leaflet.awesome-markers/package.json deleted file mode 100644 index 711ba15e43..0000000000 --- a/types/leaflet.awesome-markers/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "@types/leaflet": "^0.7" - } -} \ No newline at end of file diff --git a/types/leaflet.awesome-markers/tsconfig.json b/types/leaflet.awesome-markers/tsconfig.json index a58d69863e..74df02c260 100644 --- a/types/leaflet.awesome-markers/tsconfig.json +++ b/types/leaflet.awesome-markers/tsconfig.json @@ -9,7 +9,15 @@ "noImplicitThis": true, "strictNullChecks": false, "baseUrl": "../", + "typeRoots": [ + "../" + ], "types": [], + "paths": { + "leaflet": [ + "leaflet/v0" + ] + }, "noEmit": true, "forceConsistentCasingInFileNames": true }, diff --git a/types/leaflet.fullscreen/package.json b/types/leaflet.fullscreen/package.json deleted file mode 100644 index 711ba15e43..0000000000 --- a/types/leaflet.fullscreen/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "@types/leaflet": "^0.7" - } -} \ No newline at end of file diff --git a/types/leaflet.fullscreen/tsconfig.json b/types/leaflet.fullscreen/tsconfig.json index c877e598cf..3ca1cc4de7 100644 --- a/types/leaflet.fullscreen/tsconfig.json +++ b/types/leaflet.fullscreen/tsconfig.json @@ -9,6 +9,9 @@ "noImplicitThis": true, "strictNullChecks": false, "baseUrl": "../", + "typeRoots": [ + "../" + ], "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/types/leaflet.locatecontrol/index.d.ts b/types/leaflet.locatecontrol/index.d.ts new file mode 100644 index 0000000000..3f4d94e9ce --- /dev/null +++ b/types/leaflet.locatecontrol/index.d.ts @@ -0,0 +1,45 @@ +// Type definitions for Leaflet.locate 0.60 +// Project: https://github.com/domoritz/leaflet-locatecontrol +// Definitions by: Denis Carriere +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +declare namespace L { + namespace Control { + export interface Locate extends L.Control {} + export interface LocateOptions { + position?: string + layer?: L.Layer + setView?: boolean | string + flyTo?: boolean + keepCurrentZoomLevel?: boolean + clickBehavior?: any + returnToPrevBounds?: boolean + cacheLocation?: boolean + drawCircle?: boolean + drawMarker?: boolean + markerClass?: any + circleStyle?: L.PathOptions + markerStyle?: L.PathOptions + followCircleStyle?: L.PathOptions + followMarkerStyle?: L.PathOptions + icon?: string + iconLoading?: string + iconElementTag?: string + circlePadding?: number[] + onLocationError?: any + onLocationOutsideMapBounds?: any + showPopup?: boolean + strings?: any + locateOptions?: L.LocateOptions + } + } + + namespace control { + /** + * Creates a Leaflet.Locate control + */ + export function locate(options?: Control.LocateOptions): L.Control.Locate; + } +} diff --git a/types/leaflet.locatecontrol/leaflet.locatecontrol-tests.ts b/types/leaflet.locatecontrol/leaflet.locatecontrol-tests.ts new file mode 100644 index 0000000000..40fc41142f --- /dev/null +++ b/types/leaflet.locatecontrol/leaflet.locatecontrol-tests.ts @@ -0,0 +1,22 @@ +var map = L.map('map', { + center: [51.505, -0.09], + zoom: 13 +}); + +// Defaults +L.control.locate().addTo(map); + +// Simple +var lc = L.control.locate({ + position: 'topright', + strings: { + title: "Show me where I am, yo!" + } +}).addTo(map); + +// Locate Options +map.addControl(L.control.locate({ + locateOptions: { + maxZoom: 10, + enableHighAccuracy: true +}})); \ No newline at end of file diff --git a/types/leaflet.locatecontrol/tsconfig.json b/types/leaflet.locatecontrol/tsconfig.json new file mode 100644 index 0000000000..0ccab11228 --- /dev/null +++ b/types/leaflet.locatecontrol/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "leaflet.locatecontrol-tests.ts" + ] +} \ No newline at end of file diff --git a/types/leaflet.locatecontrol/tslint.json b/types/leaflet.locatecontrol/tslint.json new file mode 100644 index 0000000000..fdc7cdc370 --- /dev/null +++ b/types/leaflet.locatecontrol/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "../tslint.json" +} \ No newline at end of file diff --git a/types/leaflet/index.d.ts b/types/leaflet/index.d.ts index 21b8664e97..0efffe8f9e 100644 --- a/types/leaflet/index.d.ts +++ b/types/leaflet/index.d.ts @@ -38,60 +38,60 @@ declare namespace L { } namespace LineUtil { - function simplify(points: PointExpression[], tolerance: number): Point[]; + function simplify(points: Point[], tolerance: number): Point[]; - function pointToSegmentDistance(p: PointExpression, p1: PointExpression, p2: PointExpression): number; + function pointToSegmentDistance(p: Point, p1: Point, p2: Point): number; - function closestPointOnSegment(p: PointExpression, p1: PointExpression, p2: PointExpression): Point; + function closestPointOnSegment(p: Point, p1: Point, p2: Point): Point; } namespace PolyUtil { - function clipPolygon(points: PointExpression[], bounds: BoundsExpression, round?: boolean): Point[]; + function clipPolygon(points: Point[], bounds: BoundsExpression, round?: boolean): Point[]; } - class DomUtil { + module DomUtil { /** * Get Element by its ID or with the given HTML-Element */ - static get(element: string | HTMLElement): HTMLElement; - static getStyle(el: HTMLElement, styleAttrib: string): string; - static create(tagName: string, className?: string, container?: HTMLElement): HTMLElement; - static remove(el: HTMLElement): void; - static empty(el: HTMLElement): void; - static toFront(el: HTMLElement): void; - static toBack(el: HTMLElement): void; - static hasClass(el: HTMLElement, name: string): boolean; - static addClass(el: HTMLElement, name: string): void; - static removeClass(el: HTMLElement, name: string): void; - static setClass(el: HTMLElement, name: string): void; - static getClass(el: HTMLElement): string; - static setOpacity(el: HTMLElement, opacity: number): void; - static testProp(props: string[]): string | boolean/*=false*/; - static setTransform(el: HTMLElement, offset: Point, scale?: number): void; - static setPosition(el: HTMLElement, position: Point): void; - static getPosition(el: HTMLElement): Point; - static disableTextSelection(): void; - static enableTextSelection(): void; - static disableImageDrag(): void; - static enableImageDrag(): void; - static preventOutline(el: HTMLElement): void; - static restoreOutline(): void; + function get(element: string | HTMLElement): HTMLElement | null; + function getStyle(el: HTMLElement, styleAttrib: string): string | null; + function create(tagName: string, className?: string, container?: HTMLElement): HTMLElement; + function remove(el: HTMLElement): void; + function empty(el: HTMLElement): void; + function toFront(el: HTMLElement): void; + function toBack(el: HTMLElement): void; + function hasClass(el: HTMLElement, name: string): boolean; + function addClass(el: HTMLElement, name: string): void; + function removeClass(el: HTMLElement, name: string): void; + function setClass(el: HTMLElement, name: string): void; + function getClass(el: HTMLElement): string; + function setOpacity(el: HTMLElement, opacity: number): void; + function testProp(props: string[]): string | false; + function setTransform(el: HTMLElement, offset: Point, scale?: number): void; + function setPosition(el: HTMLElement, position: Point): void; + function getPosition(el: HTMLElement): Point; + function disableTextSelection(): void; + function enableTextSelection(): void; + function disableImageDrag(): void; + function enableImageDrag(): void; + function preventOutline(el: HTMLElement): void; + function restoreOutline(): void; } - abstract class CRS { + interface CRS { latLngToPoint(latlng: LatLngExpression, zoom: number): Point; pointToLatLng(point: PointExpression, zoom: number): LatLng; - project(latlng: LatLngExpression): Point; + project(latlng: LatLng | LatLngLiteral): Point; unproject(point: PointExpression): LatLng; scale(zoom: number): number; zoom(scale: number): number; getProjectedBounds(zoom: number): Bounds; distance(latlng1: LatLngExpression, latlng2: LatLngExpression): number; - wrapLatLng(latlng: LatLngExpression): LatLng; + wrapLatLng(latlng: LatLng | LatLngLiteral): LatLng; - code: string; - wrapLng: [number, number]; - wrapLat: [number, number]; + code?: string; + wrapLng?: [number, number]; + wrapLat?: [number, number]; infinite: boolean; } @@ -104,10 +104,10 @@ declare namespace L { } interface Projection { - project(latlng: LatLngExpression): Point; + project(latlng: LatLng | LatLngLiteral): Point; unproject(point: PointExpression): LatLng; - bounds: LatLngBounds; + bounds: Bounds; } namespace Projection { @@ -118,7 +118,6 @@ declare namespace L { class LatLng { constructor(latitude: number, longitude: number, altitude?: number); - constructor(coords: LatLngTuple | [number, number, number] | LatLngLiteral | {lat: number, lng: number, alt?: number}); equals(otherLatLng: LatLngExpression, maxMargin?: number): boolean; toString(): string; distanceTo(otherLatLng: LatLngExpression): number; @@ -127,7 +126,7 @@ declare namespace L { lat: number; lng: number; - alt: number; + alt?: number; } interface LatLngLiteral { @@ -177,9 +176,8 @@ declare namespace L { class Point { constructor(x: number, y: number, round?: boolean); - constructor(coords: PointTuple | {x: number, y: number}); clone(): Point; - add(otherPoint: PointExpression): Point; // investigate if this mutates or returns a new instance + add(otherPoint: PointExpression): Point; // non-destructive, returns a new point subtract(otherPoint: PointExpression): Point; divideBy(num: number): Point; multiplyBy(num: number): Point; @@ -216,8 +214,8 @@ declare namespace L { intersects(otherBounds: BoundsExpression): boolean; overlaps(otherBounds: BoundsExpression): boolean; - min: Point; - max: Point; + min?: Point; + max?: Point; } type BoundsExpression = Bounds | BoundsLiteral; @@ -403,7 +401,7 @@ declare namespace L { addTo(map: Map): this; remove(): this; removeFrom(map: Map): this; - getPane(name?: string): HTMLElement; + getPane(name?: string): HTMLElement | undefined; // Popup methods bindPopup(content: ((layer: Layer) => Content) | Content | Popup, options?: PopupOptions): this; @@ -413,7 +411,7 @@ declare namespace L { togglePopup(): this; isPopupOpen(): boolean; setPopupContent(content: Content | Popup): this; - getPopup(): Popup; + getPopup(): Popup | undefined; // Tooltip methods bindTooltip(content: ((layer: Layer) => Content) | Tooltip | Content, options?: TooltipOptions): this; @@ -423,14 +421,14 @@ declare namespace L { toggleTooltip(): this; isTooltipOpen(): boolean; setTooltipContent(content: Content | Tooltip): this; - getTooltip(): Tooltip; + getTooltip(): Tooltip | undefined; // Extension methods - onAdd(map: Map): this; - onRemove(map: Map): this; - getEvents(): {[name: string]: (event: Event) => void}; - getAttribution(): string; - beforeAdd(map: Map): this; + onAdd?: (map: Map) => this; + onRemove?: (map: Map) => this; + getEvents?: () => {[name: string]: (event: Event) => void}; + getAttribution?: () => string | null; + beforeAdd?: (map: Map) => this; } interface GridLayerOptions { @@ -454,8 +452,7 @@ declare namespace L { constructor(options?: GridLayerOptions); bringToFront(): this; bringToBack(): this; - getAttribution(): string; - getContainer(): HTMLElement; + getContainer(): HTMLElement | null; setOpacity(opacity: number): this; setZIndex(zIndex: number): this; isLoading(): boolean; @@ -500,7 +497,7 @@ declare namespace L { } interface WMSOptions extends TileLayerOptions { - layers: string; + layers?: string; styles?: string; format?: string; transparent?: boolean; @@ -547,7 +544,7 @@ declare namespace L { getBounds(): LatLngBounds; /** Get the img element that represents the ImageOverlay on the map */ - getElement(): HTMLImageElement; + getElement(): HTMLImageElement | undefined; options: ImageOverlayOptions; } @@ -582,7 +579,7 @@ declare namespace L { setStyle(style: PathOptions): this; bringToFront(): this; bringToBack(): this; - getElement(): HTMLElement; + getElement(): Element | undefined; options: PathOptions; } @@ -607,7 +604,7 @@ declare namespace L { constructor(latlngs: LatLngExpression[], options?: PolylineOptions); toGeoJSON(): GeoJSONFeature; - feature: GeoJSONFeature; + feature?: GeoJSONFeature; } function polyline(latlngs: LatLngExpression[], options?: PolylineOptions): Polyline; @@ -616,7 +613,7 @@ declare namespace L { constructor(latlngs: LatLngExpression[], options?: PolylineOptions); toGeoJSON(): GeoJSONFeature; - feature: GeoJSONFeature; + feature?: GeoJSONFeature; } function polygon(latlngs: LatLngExpression[], options?: PolylineOptions): Polygon; @@ -641,7 +638,7 @@ declare namespace L { getRadius(): number; options: CircleMarkerOptions; - feature: GeoJSONFeature; + feature?: GeoJSONFeature; } function circleMarker(latlng: LatLngExpression, options?: CircleMarkerOptions): CircleMarker; @@ -726,7 +723,7 @@ declare namespace L { /** * Returns the layer with the given internal ID. */ - getLayer(id: number): Layer; + getLayer(id: number): Layer | undefined; /** * Returns an array of all the layers added to the group. @@ -743,7 +740,7 @@ declare namespace L { */ getLayerId(layer: Layer): number; - feature: GeoJSONFeatureCollection | GeoJSONFeature | GeoJSONGeometryCollection; + feature?: GeoJSONFeatureCollection | GeoJSONFeature | GeoJSONGeometryCollection; } /** @@ -783,7 +780,7 @@ declare namespace L { */ function featureGroup(layers?: Layer[]): FeatureGroup; - type StyleFunction = (feature: GeoJSONFeature) => PathOptions; + type StyleFunction = (feature?: GeoJSONFeature) => PathOptions; interface GeoJSONOptions extends LayerOptions { /** @@ -878,7 +875,7 @@ declare namespace L { /** * Reverse of coordsToLatLng */ - static latLngToCoords(latlng: LatLng): [number, number, number]; // A three tuple can be assigned to a two or three tuple + static latLngToCoords(latlng: LatLng): [number, number] | [number, number, number]; /** * Reverse of coordsToLatLngs closed determines whether the first point should be @@ -990,13 +987,13 @@ declare namespace L { constructor(options?: ControlOptions); getPosition(): ControlPosition; setPosition(position: ControlPosition): this; - getContainer(): HTMLElement; + getContainer(): HTMLElement | undefined; addTo(map: Map): this; remove(): this; // Extension methods - onAdd(map: Map): HTMLElement; - onRemove(map: Map): void; + onAdd?: (map: Map) => HTMLElement; + onRemove?: (map: Map) => void; options: ControlOptions; } @@ -1094,11 +1091,11 @@ declare namespace L { class Popup extends Layer { constructor(options?: PopupOptions, source?: Layer); - getLatLng(): LatLng; + getLatLng(): LatLng | undefined; setLatLng(latlng: LatLngExpression): this; - getContent(): Content; + getContent(): Content | ((source: Layer) => Content) | undefined; setContent(htmlContent: ((source: Layer) => Content) | Content): this; - getElement(): HTMLElement; + getElement(): HTMLElement | undefined; update(): void; isOpen(): boolean; bringToFront(): this; @@ -1125,11 +1122,11 @@ declare namespace L { class Tooltip extends Layer { constructor(options?: TooltipOptions, source?: Layer); setOpacity(val: number): void; - getLatLng(): LatLng; + getLatLng(): LatLng | undefined; setLatLng(latlng: LatLngExpression): this; - getContent(): Content; + getContent(): Content | undefined; setContent(htmlContent: ((source: Layer) => Content) | Content): this; - getElement(): HTMLElement; + getElement(): HTMLElement | undefined; update(): void; isOpen(): boolean; bringToFront(): this; @@ -1178,8 +1175,8 @@ declare namespace L { enabled(): boolean; // Extension methods - addHooks(): void; - removeHooks(): void; + addHooks?: () => void; + removeHooks?: () => void; } interface Event { @@ -1280,7 +1277,7 @@ declare namespace L { function stop(ev: Event): typeof DomEvent; - function getMousePosition(ev: Event, container?: HTMLElement): Point; + function getMousePosition(ev: {clientX: number, clientY: number} /*MouseEvent from lib.d.ts*/, container?: HTMLElement): Point; function getWheelDelta(ev: Event): number; @@ -1350,7 +1347,7 @@ declare namespace L { /** * Name of the pane or the pane as HTML-Element */ - getPane(pane: string | HTMLElement): HTMLElement; + getPane(pane: string | HTMLElement): HTMLElement | undefined; getPanes(): {[name: string]: HTMLElement} & DefaultMapPanes; getContainer(): HTMLElement; whenReady(fn: () => void, context?: any): this; @@ -1393,7 +1390,7 @@ declare namespace L { dragging: Handler; keyboard: Handler; scrollWheelZoom: Handler; - tap: Handler; + tap?: Handler; touchZoom: Handler; options: MapOptions; @@ -1449,7 +1446,7 @@ declare namespace L { function icon(options: IconOptions): Icon; interface DivIconOptions extends BaseIconOptions { - html?: string; + html?: string | false; bgPos?: PointExpression; iconSize?: PointExpression; iconAnchor?: PointExpression; @@ -1484,11 +1481,11 @@ declare namespace L { setZIndexOffset(offset: number): this; setIcon(icon: Icon | DivIcon): this; setOpacity(opacity: number): this; - getElement(): HTMLElement; + getElement(): HTMLElement | undefined; // Properties options: MarkerOptions; - dragging: Handler; + dragging?: Handler; } function marker(latlng: LatLngExpression, options?: MarkerOptions): Marker; @@ -1511,7 +1508,7 @@ declare namespace L { const any3d: boolean; const mobile: boolean; const mobileWebkit: boolean; - const mobiWebkit3d: boolean; + const mobileWebkit3d: boolean; const mobileOpera: boolean; const mobileGecko: boolean; const touch: boolean; @@ -1530,7 +1527,7 @@ declare namespace L { function stamp(obj: any): number; function throttle(fn: () => void, time: number, context: any): () => void; function wrapNum(num: number, range: number[], includeMax?: boolean): number; - function falseFn(): () => false; + function falseFn(): false; function formatNum(num: number, digits?: number): number; function trim(str: string): string; function splitWords(str: string): string[]; @@ -1541,7 +1538,7 @@ declare namespace L { function indexOf(array: any[], el: any): number; function requestAnimFrame(fn: () => void, context?: any, immediate?: boolean): number; function cancelAnimFrame(id: number): void; - let lastId: string; + let lastId: number; let emptyImageUrl: string; } } diff --git a/types/leaflet/leaflet-tests.ts b/types/leaflet/leaflet-tests.ts index b7107c55fa..5936742a13 100644 --- a/types/leaflet/leaflet-tests.ts +++ b/types/leaflet/leaflet-tests.ts @@ -13,10 +13,6 @@ latLng = L.latLng([12, 13, 0]); latLng = new L.LatLng(12, 13); latLng = new L.LatLng(12, 13, 0); -latLng = new L.LatLng(latLngLiteral); -latLng = new L.LatLng({lat: 12, lng: 13, alt: 0}); -latLng = new L.LatLng(latLngTuple); -latLng = new L.LatLng([12, 13, 0]); const latLngBoundsLiteral: L.LatLngBoundsLiteral = [[12, 13], latLngTuple]; @@ -39,8 +35,6 @@ point = L.point({x: 12, y: 13}); point = new L.Point(12, 13); point = new L.Point(12, 13, true); -point = new L.Point(pointTuple); -point = new L.Point({x: 12, y: 13}); let distance: number; point.distanceTo(point); @@ -67,18 +61,13 @@ bounds = new L.Bounds(boundsLiteral); let points: L.Point[]; points = L.LineUtil.simplify([point, point], 1); -points = L.LineUtil.simplify([pointTuple, pointTuple], 2); distance = L.LineUtil.pointToSegmentDistance(point, point, point); -distance = L.LineUtil.pointToSegmentDistance(pointTuple, pointTuple, pointTuple); point = L.LineUtil.closestPointOnSegment(point, point, point); -point = L.LineUtil.closestPointOnSegment(pointTuple, pointTuple, pointTuple); points = L.PolyUtil.clipPolygon(points, bounds); points = L.PolyUtil.clipPolygon(points, bounds, true); -points = L.PolyUtil.clipPolygon([pointTuple, pointTuple], boundsLiteral); -points = L.PolyUtil.clipPolygon([pointTuple, pointTuple], boundsLiteral, true); let mapOptions: L.MapOptions = {}; mapOptions = { @@ -275,8 +264,8 @@ L.DomEvent .disableClickPropagation(htmlElement) .preventDefault(domEvent) .stop(domEvent); -point = L.DomEvent.getMousePosition(domEvent); -point = L.DomEvent.getMousePosition(domEvent, htmlElement); +point = L.DomEvent.getMousePosition(domEvent as MouseEvent); +point = L.DomEvent.getMousePosition(domEvent as MouseEvent, htmlElement); const wheelDelta: number = L.DomEvent.getWheelDelta(domEvent); map = map @@ -391,7 +380,7 @@ let twoCoords: [number, number] = [1, 2]; latLng = L.GeoJSON.coordsToLatLng(twoCoords); twoCoords = L.GeoJSON.latLngToCoords(latLng); -let threeCoords: [number, number, number] = [1, 2, 3]; +let threeCoords: [number, number] = [1, 2]; latLng = L.GeoJSON.coordsToLatLng(threeCoords); threeCoords = L.GeoJSON.latLngToCoords(latLng); diff --git a/types/left-pad/index.d.ts b/types/left-pad/index.d.ts index 86996ccd47..ce8bc5237d 100644 --- a/types/left-pad/index.d.ts +++ b/types/left-pad/index.d.ts @@ -5,4 +5,4 @@ declare function leftPad(str: string|number, len: number, ch?: string|number): string; -export = leftPad; \ No newline at end of file +export = leftPad; diff --git a/types/left-pad/left-pad-tests.ts b/types/left-pad/left-pad-tests.ts index 53a08d1a9a..a3749feb16 100644 --- a/types/left-pad/left-pad-tests.ts +++ b/types/left-pad/left-pad-tests.ts @@ -12,4 +12,4 @@ leftPad(1, 2, "0"); // => "01" leftPad(17, 5, 0); -// => "00017" \ No newline at end of file +// => "00017" diff --git a/types/leven/leven-tests.ts b/types/leven/leven-tests.ts index 4e87d3d90e..4ca0406529 100644 --- a/types/leven/leven-tests.ts +++ b/types/leven/leven-tests.ts @@ -1,8 +1,7 @@ - import leven = require('leven'); leven('baz', 'bar'); // => "1" leven('foo', 'bar'); -// => "3" \ No newline at end of file +// => "3" diff --git a/types/libpq/index.d.ts b/types/libpq/index.d.ts index 76bfb40935..49c00db818 100644 --- a/types/libpq/index.d.ts +++ b/types/libpq/index.d.ts @@ -102,7 +102,7 @@ declare class Libpq extends EventEmitter { * @returns {boolean} true if data was read; false if there was an error. You can access * error details with [[Libpq.errorMessage]]. */ - consumeInput(): boolean + consumeInput(): boolean; /** * Retrieves the last error message from the connection. This is intended to be used after most diff --git a/types/libpq/tslint.json b/types/libpq/tslint.json index f05741c59b..b0e7084e94 100644 --- a/types/libpq/tslint.json +++ b/types/libpq/tslint.json @@ -1,6 +1,6 @@ { "extends": "../tslint.json", "rules": { - "forbidden-types": false + "ban-types": false } } diff --git a/types/linkify-it/index.d.ts b/types/linkify-it/index.d.ts new file mode 100644 index 0000000000..00b564bff6 --- /dev/null +++ b/types/linkify-it/index.d.ts @@ -0,0 +1,50 @@ +// Type definitions for tweezer.js 2.0 +// Project: https://github.com/markdown-it/linkify-it +// Definitions by: Lindsey Smith , Robert Coie +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare const LinkifyIt: { + (schemas?: LinkifyIt.SchemaRules, options?: LinkifyIt.Options): LinkifyIt.LinkifyIt; + new (schemas?: LinkifyIt.SchemaRules, options?: LinkifyIt.Options): LinkifyIt.LinkifyIt; +}; + +declare namespace LinkifyIt { + export interface FullRule { + validate: (text: string, pos: number, self: LinkifyIt) => number; + normalize?: (match: string) => string; + } + + export type Rule = string | RegExp | FullRule; + + export interface SchemaRules { + [schema: string]: Rule; + } + + export interface Options { + fuzzyLink?: boolean; + fuzzyIP?: boolean; + fuzzyEmail?: boolean; + } + + export interface Match { + index: number; + lastIndex: number; + raw: string; + schema: string; + text: string; + url: string; + } + + export interface LinkifyIt { + add(schema: string, rule: Rule): LinkifyIt; + match(text: string): Match[]; + normalize(raw: string): string; + pretest(text: string): boolean; + set(options: Options): LinkifyIt; + test(text: string): boolean; + testSchemaAt(text: string, schemaName: string, pos: number): number; + tlds(list: string | string[], keepOld?: boolean): LinkifyIt; + } +} + +export = LinkifyIt; diff --git a/types/linkify-it/linkify-it-tests.ts b/types/linkify-it/linkify-it-tests.ts new file mode 100644 index 0000000000..c4366321cf --- /dev/null +++ b/types/linkify-it/linkify-it-tests.ts @@ -0,0 +1,24 @@ +import LinkifyIt = require('linkify-it'); + +// fluent interface +const linkifier = new LinkifyIt(); + +linkifier + .add('git:', 'http:') + .set({ fuzzyIP: true }) + .tlds('onion', true) + .test("https://github.com/DefinitelyTyped/DefinitelyTyped/"); + +// match +const matches = linkifier.match("https://github.com/DefinitelyTyped/DefinitelyTyped/"); +matches.forEach(({index, lastIndex, raw, schema, text, url}) => {}); + +// complex rule +linkifier.add('@', { + validate: (text, pos, self) => { + return 42; + }, + normalize: (match) => { + return 'forty-two'; + } +}); diff --git a/types/linkify-it/tsconfig.json b/types/linkify-it/tsconfig.json new file mode 100644 index 0000000000..d773912f34 --- /dev/null +++ b/types/linkify-it/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "linkify-it-tests.ts" + ] +} diff --git a/types/linkify-it/tslint.json b/types/linkify-it/tslint.json new file mode 100644 index 0000000000..2221e40e4a --- /dev/null +++ b/types/linkify-it/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } \ No newline at end of file diff --git a/types/localforage-cordovasqlitedriver/localforage-cordovasqlitedriver-tests.ts b/types/localforage-cordovasqlitedriver/localforage-cordovasqlitedriver-tests.ts index 5b678beeb7..22b550da0b 100644 --- a/types/localforage-cordovasqlitedriver/localforage-cordovasqlitedriver-tests.ts +++ b/types/localforage-cordovasqlitedriver/localforage-cordovasqlitedriver-tests.ts @@ -1,4 +1,3 @@ - declare const cordovaSQLiteDriver: LocalForageDriver; () => { diff --git a/types/lodash.nth/index.d.ts b/types/lodash.nth/index.d.ts new file mode 100644 index 0000000000..9576fa5a4e --- /dev/null +++ b/types/lodash.nth/index.d.ts @@ -0,0 +1,8 @@ +// Type definitions for lodash.nth 4.0 +// Project: http://lodash.com/ +// Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +import { nth } from "lodash"; +export = nth; diff --git a/types/lodash.nth/tsconfig.json b/types/lodash.nth/tsconfig.json new file mode 100644 index 0000000000..92ebbc6458 --- /dev/null +++ b/types/lodash.nth/tsconfig.json @@ -0,0 +1,21 @@ +{ + "files": [ + "index.d.ts" + ], + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + } +} \ No newline at end of file diff --git a/types/lodash.nth/tslint.json b/types/lodash.nth/tslint.json new file mode 100644 index 0000000000..377cc837d4 --- /dev/null +++ b/types/lodash.nth/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } diff --git a/types/lodash.zipobjectdeep/index.d.ts b/types/lodash.zipobjectdeep/index.d.ts new file mode 100644 index 0000000000..1944588188 --- /dev/null +++ b/types/lodash.zipobjectdeep/index.d.ts @@ -0,0 +1,8 @@ +// Type definitions for lodash.zipObjectDeep 4.1 +// Project: http://lodash.com/ +// Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +import { zipObjectDeep } from "lodash"; +export = zipObjectDeep; diff --git a/types/lodash.zipobjectdeep/tsconfig.json b/types/lodash.zipobjectdeep/tsconfig.json new file mode 100644 index 0000000000..92ebbc6458 --- /dev/null +++ b/types/lodash.zipobjectdeep/tsconfig.json @@ -0,0 +1,21 @@ +{ + "files": [ + "index.d.ts" + ], + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + } +} \ No newline at end of file diff --git a/types/lodash.zipobjectdeep/tslint.json b/types/lodash.zipobjectdeep/tslint.json new file mode 100644 index 0000000000..377cc837d4 --- /dev/null +++ b/types/lodash.zipobjectdeep/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } diff --git a/types/lodash/add/index.d.ts b/types/lodash/add/index.d.ts index f6b8ffe169..bfe1d46805 100644 --- a/types/lodash/add/index.d.ts +++ b/types/lodash/add/index.d.ts @@ -1,2 +1,2 @@ import { add } from "../index"; -export = add; \ No newline at end of file +export = add; diff --git a/types/lodash/after/index.d.ts b/types/lodash/after/index.d.ts index 646ac91611..eea017f6fd 100644 --- a/types/lodash/after/index.d.ts +++ b/types/lodash/after/index.d.ts @@ -1,2 +1,2 @@ import { after } from "../index"; -export = after; \ No newline at end of file +export = after; diff --git a/types/lodash/ary/index.d.ts b/types/lodash/ary/index.d.ts index c5281575ea..2b86cf6d4e 100644 --- a/types/lodash/ary/index.d.ts +++ b/types/lodash/ary/index.d.ts @@ -1,2 +1,2 @@ import { ary } from "../index"; -export = ary; \ No newline at end of file +export = ary; diff --git a/types/lodash/assign/index.d.ts b/types/lodash/assign/index.d.ts index 204edbb182..b38bbc5bb6 100644 --- a/types/lodash/assign/index.d.ts +++ b/types/lodash/assign/index.d.ts @@ -1,2 +1,2 @@ import { assign } from "../index"; -export = assign; \ No newline at end of file +export = assign; diff --git a/types/lodash/assignIn/index.d.ts b/types/lodash/assignIn/index.d.ts index da3f4f123b..2f182e7e90 100644 --- a/types/lodash/assignIn/index.d.ts +++ b/types/lodash/assignIn/index.d.ts @@ -1,2 +1,2 @@ import { assignIn } from "../index"; -export = assignIn; \ No newline at end of file +export = assignIn; diff --git a/types/lodash/assignInWith/index.d.ts b/types/lodash/assignInWith/index.d.ts index 1159a8d998..5b092fa13c 100644 --- a/types/lodash/assignInWith/index.d.ts +++ b/types/lodash/assignInWith/index.d.ts @@ -1,2 +1,2 @@ import { assignInWith } from "../index"; -export = assignInWith; \ No newline at end of file +export = assignInWith; diff --git a/types/lodash/assignWith/index.d.ts b/types/lodash/assignWith/index.d.ts index 29c0c36681..9424c4e75a 100644 --- a/types/lodash/assignWith/index.d.ts +++ b/types/lodash/assignWith/index.d.ts @@ -1,2 +1,2 @@ import { assignWith } from "../index"; -export = assignWith; \ No newline at end of file +export = assignWith; diff --git a/types/lodash/at/index.d.ts b/types/lodash/at/index.d.ts index e613328596..fc009ef6c8 100644 --- a/types/lodash/at/index.d.ts +++ b/types/lodash/at/index.d.ts @@ -1,2 +1,2 @@ import { at } from "../index"; -export = at; \ No newline at end of file +export = at; diff --git a/types/lodash/attempt/index.d.ts b/types/lodash/attempt/index.d.ts index 26849500cb..991d4605cf 100644 --- a/types/lodash/attempt/index.d.ts +++ b/types/lodash/attempt/index.d.ts @@ -1,2 +1,2 @@ import { attempt } from "../index"; -export = attempt; \ No newline at end of file +export = attempt; diff --git a/types/lodash/before/index.d.ts b/types/lodash/before/index.d.ts index 6595204ea2..c9ccdbbb41 100644 --- a/types/lodash/before/index.d.ts +++ b/types/lodash/before/index.d.ts @@ -1,2 +1,2 @@ import { before } from "../index"; -export = before; \ No newline at end of file +export = before; diff --git a/types/lodash/bind/index.d.ts b/types/lodash/bind/index.d.ts index 61ac4bb6fd..bfae1efa26 100644 --- a/types/lodash/bind/index.d.ts +++ b/types/lodash/bind/index.d.ts @@ -1,2 +1,2 @@ import { bind } from "../index"; -export = bind; \ No newline at end of file +export = bind; diff --git a/types/lodash/bindAll/index.d.ts b/types/lodash/bindAll/index.d.ts index 4b54d76b2e..90b7f67bcc 100644 --- a/types/lodash/bindAll/index.d.ts +++ b/types/lodash/bindAll/index.d.ts @@ -1,2 +1,2 @@ import { bindAll } from "../index"; -export = bindAll; \ No newline at end of file +export = bindAll; diff --git a/types/lodash/bindKey/index.d.ts b/types/lodash/bindKey/index.d.ts index d5c6217cc0..711b02f0e1 100644 --- a/types/lodash/bindKey/index.d.ts +++ b/types/lodash/bindKey/index.d.ts @@ -1,2 +1,2 @@ import { bindKey } from "../index"; -export = bindKey; \ No newline at end of file +export = bindKey; diff --git a/types/lodash/camelCase/index.d.ts b/types/lodash/camelCase/index.d.ts index 8dbf939e8a..99cc4f8b36 100644 --- a/types/lodash/camelCase/index.d.ts +++ b/types/lodash/camelCase/index.d.ts @@ -1,2 +1,2 @@ import { camelCase } from "../index"; -export = camelCase; \ No newline at end of file +export = camelCase; diff --git a/types/lodash/capitalize/index.d.ts b/types/lodash/capitalize/index.d.ts index c8da4286b7..035d00ce94 100644 --- a/types/lodash/capitalize/index.d.ts +++ b/types/lodash/capitalize/index.d.ts @@ -1,2 +1,2 @@ import { capitalize } from "../index"; -export = capitalize; \ No newline at end of file +export = capitalize; diff --git a/types/lodash/castArray/index.d.ts b/types/lodash/castArray/index.d.ts index 6b508b8a98..f278e73a40 100644 --- a/types/lodash/castArray/index.d.ts +++ b/types/lodash/castArray/index.d.ts @@ -1,2 +1,2 @@ import { castArray } from "../index"; -export = castArray; \ No newline at end of file +export = castArray; diff --git a/types/lodash/ceil/index.d.ts b/types/lodash/ceil/index.d.ts index 5e048b3d1d..732861a411 100644 --- a/types/lodash/ceil/index.d.ts +++ b/types/lodash/ceil/index.d.ts @@ -1,2 +1,2 @@ import { ceil } from "../index"; -export = ceil; \ No newline at end of file +export = ceil; diff --git a/types/lodash/chain/index.d.ts b/types/lodash/chain/index.d.ts index 4b73db1c6c..2be62c817e 100644 --- a/types/lodash/chain/index.d.ts +++ b/types/lodash/chain/index.d.ts @@ -1,2 +1,2 @@ import { chain } from "../index"; -export = chain; \ No newline at end of file +export = chain; diff --git a/types/lodash/chunk/index.d.ts b/types/lodash/chunk/index.d.ts index 732721395b..27254c0cce 100644 --- a/types/lodash/chunk/index.d.ts +++ b/types/lodash/chunk/index.d.ts @@ -1,2 +1,2 @@ import { chunk } from "../index"; -export = chunk; \ No newline at end of file +export = chunk; diff --git a/types/lodash/clamp/index.d.ts b/types/lodash/clamp/index.d.ts index 4d42abd905..a14ebc3edd 100644 --- a/types/lodash/clamp/index.d.ts +++ b/types/lodash/clamp/index.d.ts @@ -1,2 +1,2 @@ import { clamp } from "../index"; -export = clamp; \ No newline at end of file +export = clamp; diff --git a/types/lodash/clone/index.d.ts b/types/lodash/clone/index.d.ts index ba68623796..7ec6d46f62 100644 --- a/types/lodash/clone/index.d.ts +++ b/types/lodash/clone/index.d.ts @@ -1,2 +1,2 @@ import { clone } from "../index"; -export = clone; \ No newline at end of file +export = clone; diff --git a/types/lodash/cloneDeep/index.d.ts b/types/lodash/cloneDeep/index.d.ts index 4e416a08f7..7ec0d7cc22 100644 --- a/types/lodash/cloneDeep/index.d.ts +++ b/types/lodash/cloneDeep/index.d.ts @@ -1,2 +1,2 @@ import { cloneDeep } from "../index"; -export = cloneDeep; \ No newline at end of file +export = cloneDeep; diff --git a/types/lodash/cloneDeepWith/index.d.ts b/types/lodash/cloneDeepWith/index.d.ts index 795155856f..387559395b 100644 --- a/types/lodash/cloneDeepWith/index.d.ts +++ b/types/lodash/cloneDeepWith/index.d.ts @@ -1,2 +1,2 @@ import { cloneDeepWith } from "../index"; -export = cloneDeepWith; \ No newline at end of file +export = cloneDeepWith; diff --git a/types/lodash/cloneWith/index.d.ts b/types/lodash/cloneWith/index.d.ts index d1fa9863cd..070f583fc7 100644 --- a/types/lodash/cloneWith/index.d.ts +++ b/types/lodash/cloneWith/index.d.ts @@ -1,2 +1,2 @@ import { cloneWith } from "../index"; -export = cloneWith; \ No newline at end of file +export = cloneWith; diff --git a/types/lodash/compact/index.d.ts b/types/lodash/compact/index.d.ts index 9d7b1fade1..e1617e88da 100644 --- a/types/lodash/compact/index.d.ts +++ b/types/lodash/compact/index.d.ts @@ -1,2 +1,2 @@ import { compact } from "../index"; -export = compact; \ No newline at end of file +export = compact; diff --git a/types/lodash/concat/index.d.ts b/types/lodash/concat/index.d.ts index 26e6c184cc..309b54cc8f 100644 --- a/types/lodash/concat/index.d.ts +++ b/types/lodash/concat/index.d.ts @@ -1,2 +1,2 @@ import { concat } from "../index"; -export = concat; \ No newline at end of file +export = concat; diff --git a/types/lodash/constant/index.d.ts b/types/lodash/constant/index.d.ts index 16adcbe902..e812062c91 100644 --- a/types/lodash/constant/index.d.ts +++ b/types/lodash/constant/index.d.ts @@ -1,2 +1,2 @@ import { constant } from "../index"; -export = constant; \ No newline at end of file +export = constant; diff --git a/types/lodash/countBy/index.d.ts b/types/lodash/countBy/index.d.ts index 062ea86901..d44affd3b1 100644 --- a/types/lodash/countBy/index.d.ts +++ b/types/lodash/countBy/index.d.ts @@ -1,2 +1,2 @@ import { countBy } from "../index"; -export = countBy; \ No newline at end of file +export = countBy; diff --git a/types/lodash/create/index.d.ts b/types/lodash/create/index.d.ts index 4040edabf3..54cec6e4cb 100644 --- a/types/lodash/create/index.d.ts +++ b/types/lodash/create/index.d.ts @@ -1,2 +1,2 @@ import { create } from "../index"; -export = create; \ No newline at end of file +export = create; diff --git a/types/lodash/curry/index.d.ts b/types/lodash/curry/index.d.ts index b5132423ba..a6ab8c799c 100644 --- a/types/lodash/curry/index.d.ts +++ b/types/lodash/curry/index.d.ts @@ -1,2 +1,2 @@ import { curry } from "../index"; -export = curry; \ No newline at end of file +export = curry; diff --git a/types/lodash/curryRight/index.d.ts b/types/lodash/curryRight/index.d.ts index 999330fa63..c179a26dbd 100644 --- a/types/lodash/curryRight/index.d.ts +++ b/types/lodash/curryRight/index.d.ts @@ -1,2 +1,2 @@ import { curryRight } from "../index"; -export = curryRight; \ No newline at end of file +export = curryRight; diff --git a/types/lodash/debounce/index.d.ts b/types/lodash/debounce/index.d.ts index 2817fce4e1..98fc36743a 100644 --- a/types/lodash/debounce/index.d.ts +++ b/types/lodash/debounce/index.d.ts @@ -1,2 +1,2 @@ import { debounce } from "../index"; -export = debounce; \ No newline at end of file +export = debounce; diff --git a/types/lodash/deburr/index.d.ts b/types/lodash/deburr/index.d.ts index 8bcee7b151..4b5fdbf028 100644 --- a/types/lodash/deburr/index.d.ts +++ b/types/lodash/deburr/index.d.ts @@ -1,2 +1,2 @@ import { deburr } from "../index"; -export = deburr; \ No newline at end of file +export = deburr; diff --git a/types/lodash/defaults/index.d.ts b/types/lodash/defaults/index.d.ts index 9a93890329..c80d5d318d 100644 --- a/types/lodash/defaults/index.d.ts +++ b/types/lodash/defaults/index.d.ts @@ -1,2 +1,2 @@ import { defaults } from "../index"; -export = defaults; \ No newline at end of file +export = defaults; diff --git a/types/lodash/defaultsDeep/index.d.ts b/types/lodash/defaultsDeep/index.d.ts index 35ca6cc3bc..5ee0aa1854 100644 --- a/types/lodash/defaultsDeep/index.d.ts +++ b/types/lodash/defaultsDeep/index.d.ts @@ -1,2 +1,2 @@ import { defaultsDeep } from "../index"; -export = defaultsDeep; \ No newline at end of file +export = defaultsDeep; diff --git a/types/lodash/defer/index.d.ts b/types/lodash/defer/index.d.ts index a3dab9837a..4e0bffe6d0 100644 --- a/types/lodash/defer/index.d.ts +++ b/types/lodash/defer/index.d.ts @@ -1,2 +1,2 @@ import { defer } from "../index"; -export = defer; \ No newline at end of file +export = defer; diff --git a/types/lodash/delay/index.d.ts b/types/lodash/delay/index.d.ts index e5569f3b67..1aecd0124c 100644 --- a/types/lodash/delay/index.d.ts +++ b/types/lodash/delay/index.d.ts @@ -1,2 +1,2 @@ import { delay } from "../index"; -export = delay; \ No newline at end of file +export = delay; diff --git a/types/lodash/difference/index.d.ts b/types/lodash/difference/index.d.ts index 2d9e1d1569..f188c1695c 100644 --- a/types/lodash/difference/index.d.ts +++ b/types/lodash/difference/index.d.ts @@ -1,2 +1,2 @@ import { difference } from "../index"; -export = difference; \ No newline at end of file +export = difference; diff --git a/types/lodash/differenceBy/index.d.ts b/types/lodash/differenceBy/index.d.ts index 35cc4325ad..fc4fbb97cd 100644 --- a/types/lodash/differenceBy/index.d.ts +++ b/types/lodash/differenceBy/index.d.ts @@ -1,2 +1,2 @@ import { differenceBy } from "../index"; -export = differenceBy; \ No newline at end of file +export = differenceBy; diff --git a/types/lodash/differenceWith/index.d.ts b/types/lodash/differenceWith/index.d.ts index 37fe7fd014..c13a1a5356 100644 --- a/types/lodash/differenceWith/index.d.ts +++ b/types/lodash/differenceWith/index.d.ts @@ -1,2 +1,2 @@ import { differenceWith } from "../index"; -export = differenceWith; \ No newline at end of file +export = differenceWith; diff --git a/types/lodash/drop/index.d.ts b/types/lodash/drop/index.d.ts index b6e3653747..a20de1c85e 100644 --- a/types/lodash/drop/index.d.ts +++ b/types/lodash/drop/index.d.ts @@ -1,2 +1,2 @@ import { drop } from "../index"; -export = drop; \ No newline at end of file +export = drop; diff --git a/types/lodash/dropRight/index.d.ts b/types/lodash/dropRight/index.d.ts index 12d8f9a466..eddbac88af 100644 --- a/types/lodash/dropRight/index.d.ts +++ b/types/lodash/dropRight/index.d.ts @@ -1,2 +1,2 @@ import { dropRight } from "../index"; -export = dropRight; \ No newline at end of file +export = dropRight; diff --git a/types/lodash/dropRightWhile/index.d.ts b/types/lodash/dropRightWhile/index.d.ts index 913a3d2264..e7b0bb4855 100644 --- a/types/lodash/dropRightWhile/index.d.ts +++ b/types/lodash/dropRightWhile/index.d.ts @@ -1,2 +1,2 @@ import { dropRightWhile } from "../index"; -export = dropRightWhile; \ No newline at end of file +export = dropRightWhile; diff --git a/types/lodash/dropWhile/index.d.ts b/types/lodash/dropWhile/index.d.ts index 758a605fd7..4ffa087cc5 100644 --- a/types/lodash/dropWhile/index.d.ts +++ b/types/lodash/dropWhile/index.d.ts @@ -1,2 +1,2 @@ import { dropWhile } from "../index"; -export = dropWhile; \ No newline at end of file +export = dropWhile; diff --git a/types/lodash/each/index.d.ts b/types/lodash/each/index.d.ts index f7408a03ba..4a6ea0af51 100644 --- a/types/lodash/each/index.d.ts +++ b/types/lodash/each/index.d.ts @@ -1,2 +1,2 @@ import { each } from "../index"; -export = each; \ No newline at end of file +export = each; diff --git a/types/lodash/eachRight/index.d.ts b/types/lodash/eachRight/index.d.ts index 976747a4fe..2e04a5c9f8 100644 --- a/types/lodash/eachRight/index.d.ts +++ b/types/lodash/eachRight/index.d.ts @@ -1,2 +1,2 @@ import { eachRight } from "../index"; -export = eachRight; \ No newline at end of file +export = eachRight; diff --git a/types/lodash/endsWith/index.d.ts b/types/lodash/endsWith/index.d.ts index 96a03e5e2d..6fb61e7f4b 100644 --- a/types/lodash/endsWith/index.d.ts +++ b/types/lodash/endsWith/index.d.ts @@ -1,2 +1,2 @@ import { endsWith } from "../index"; -export = endsWith; \ No newline at end of file +export = endsWith; diff --git a/types/lodash/eq/index.d.ts b/types/lodash/eq/index.d.ts index 70fc8dcc9b..87d4de60ed 100644 --- a/types/lodash/eq/index.d.ts +++ b/types/lodash/eq/index.d.ts @@ -1,2 +1,2 @@ import { eq } from "../index"; -export = eq; \ No newline at end of file +export = eq; diff --git a/types/lodash/escape/index.d.ts b/types/lodash/escape/index.d.ts index 462727c1dd..3766a06712 100644 --- a/types/lodash/escape/index.d.ts +++ b/types/lodash/escape/index.d.ts @@ -1,2 +1,2 @@ import { escape } from "../index"; -export = escape; \ No newline at end of file +export = escape; diff --git a/types/lodash/escapeRegExp/index.d.ts b/types/lodash/escapeRegExp/index.d.ts index edd6c1f5f2..6419043fb3 100644 --- a/types/lodash/escapeRegExp/index.d.ts +++ b/types/lodash/escapeRegExp/index.d.ts @@ -1,2 +1,2 @@ import { escapeRegExp } from "../index"; -export = escapeRegExp; \ No newline at end of file +export = escapeRegExp; diff --git a/types/lodash/every/index.d.ts b/types/lodash/every/index.d.ts index 71a4c3d65b..a6cc43aa14 100644 --- a/types/lodash/every/index.d.ts +++ b/types/lodash/every/index.d.ts @@ -1,2 +1,2 @@ import { every } from "../index"; -export = every; \ No newline at end of file +export = every; diff --git a/types/lodash/extend/index.d.ts b/types/lodash/extend/index.d.ts index d86ec7d7b3..0f46cd5b85 100644 --- a/types/lodash/extend/index.d.ts +++ b/types/lodash/extend/index.d.ts @@ -1,2 +1,2 @@ import { extend } from "../index"; -export = extend; \ No newline at end of file +export = extend; diff --git a/types/lodash/extendWith/index.d.ts b/types/lodash/extendWith/index.d.ts index c4c3383e12..0274ebff23 100644 --- a/types/lodash/extendWith/index.d.ts +++ b/types/lodash/extendWith/index.d.ts @@ -1,2 +1,2 @@ import { extendWith } from "../index"; -export = extendWith; \ No newline at end of file +export = extendWith; diff --git a/types/lodash/fill/index.d.ts b/types/lodash/fill/index.d.ts index 06cade9a02..06dc85a9d9 100644 --- a/types/lodash/fill/index.d.ts +++ b/types/lodash/fill/index.d.ts @@ -1,2 +1,2 @@ import { fill } from "../index"; -export = fill; \ No newline at end of file +export = fill; diff --git a/types/lodash/filter/index.d.ts b/types/lodash/filter/index.d.ts index 164a9ccfa5..0b257c4dfc 100644 --- a/types/lodash/filter/index.d.ts +++ b/types/lodash/filter/index.d.ts @@ -1,2 +1,2 @@ import { filter } from "../index"; -export = filter; \ No newline at end of file +export = filter; diff --git a/types/lodash/find/index.d.ts b/types/lodash/find/index.d.ts index 6a22162c86..5dacac0168 100644 --- a/types/lodash/find/index.d.ts +++ b/types/lodash/find/index.d.ts @@ -1,2 +1,2 @@ import { find } from "../index"; -export = find; \ No newline at end of file +export = find; diff --git a/types/lodash/findIndex/index.d.ts b/types/lodash/findIndex/index.d.ts index e716bfd130..3c973bdfc5 100644 --- a/types/lodash/findIndex/index.d.ts +++ b/types/lodash/findIndex/index.d.ts @@ -1,2 +1,2 @@ import { findIndex } from "../index"; -export = findIndex; \ No newline at end of file +export = findIndex; diff --git a/types/lodash/findKey/index.d.ts b/types/lodash/findKey/index.d.ts index 503e047fb5..faca19e1cc 100644 --- a/types/lodash/findKey/index.d.ts +++ b/types/lodash/findKey/index.d.ts @@ -1,2 +1,2 @@ import { findKey } from "../index"; -export = findKey; \ No newline at end of file +export = findKey; diff --git a/types/lodash/findLast/index.d.ts b/types/lodash/findLast/index.d.ts index 91e5b6a3d9..f4f896790c 100644 --- a/types/lodash/findLast/index.d.ts +++ b/types/lodash/findLast/index.d.ts @@ -1,2 +1,2 @@ import { findLast } from "../index"; -export = findLast; \ No newline at end of file +export = findLast; diff --git a/types/lodash/findLastIndex/index.d.ts b/types/lodash/findLastIndex/index.d.ts index 8a24b5e8c3..122be1450f 100644 --- a/types/lodash/findLastIndex/index.d.ts +++ b/types/lodash/findLastIndex/index.d.ts @@ -1,2 +1,2 @@ import { findLastIndex } from "../index"; -export = findLastIndex; \ No newline at end of file +export = findLastIndex; diff --git a/types/lodash/findLastKey/index.d.ts b/types/lodash/findLastKey/index.d.ts index ce65fa5b51..52d9f8adde 100644 --- a/types/lodash/findLastKey/index.d.ts +++ b/types/lodash/findLastKey/index.d.ts @@ -1,2 +1,2 @@ import { findLastKey } from "../index"; -export = findLastKey; \ No newline at end of file +export = findLastKey; diff --git a/types/lodash/first/index.d.ts b/types/lodash/first/index.d.ts index cb8d284bf2..b743ed962d 100644 --- a/types/lodash/first/index.d.ts +++ b/types/lodash/first/index.d.ts @@ -1,2 +1,2 @@ import { first } from "../index"; -export = first; \ No newline at end of file +export = first; diff --git a/types/lodash/flatMap/index.d.ts b/types/lodash/flatMap/index.d.ts index 7d7f65be20..7ac8502c20 100644 --- a/types/lodash/flatMap/index.d.ts +++ b/types/lodash/flatMap/index.d.ts @@ -1,2 +1,2 @@ import { flatMap } from "../index"; -export = flatMap; \ No newline at end of file +export = flatMap; diff --git a/types/lodash/flatten/index.d.ts b/types/lodash/flatten/index.d.ts index 33f1490358..708c89ad86 100644 --- a/types/lodash/flatten/index.d.ts +++ b/types/lodash/flatten/index.d.ts @@ -1,2 +1,2 @@ import { flatten } from "../index"; -export = flatten; \ No newline at end of file +export = flatten; diff --git a/types/lodash/flattenDeep/index.d.ts b/types/lodash/flattenDeep/index.d.ts index 7da0a2b110..8bf39277bd 100644 --- a/types/lodash/flattenDeep/index.d.ts +++ b/types/lodash/flattenDeep/index.d.ts @@ -1,2 +1,2 @@ import { flattenDeep } from "../index"; -export = flattenDeep; \ No newline at end of file +export = flattenDeep; diff --git a/types/lodash/flattenDepth/index.d.ts b/types/lodash/flattenDepth/index.d.ts index 0a619cc924..38491c47fe 100644 --- a/types/lodash/flattenDepth/index.d.ts +++ b/types/lodash/flattenDepth/index.d.ts @@ -1,2 +1,2 @@ import { flattenDepth } from "../index"; -export = flattenDepth; \ No newline at end of file +export = flattenDepth; diff --git a/types/lodash/flip/index.d.ts b/types/lodash/flip/index.d.ts index b13716ca19..e5fd68e0e8 100644 --- a/types/lodash/flip/index.d.ts +++ b/types/lodash/flip/index.d.ts @@ -1,2 +1,2 @@ import { flip } from "../index"; -export = flip; \ No newline at end of file +export = flip; diff --git a/types/lodash/floor/index.d.ts b/types/lodash/floor/index.d.ts index 39e00a9eee..da725ee51d 100644 --- a/types/lodash/floor/index.d.ts +++ b/types/lodash/floor/index.d.ts @@ -1,2 +1,2 @@ import { floor } from "../index"; -export = floor; \ No newline at end of file +export = floor; diff --git a/types/lodash/flow/index.d.ts b/types/lodash/flow/index.d.ts index 681601a616..31bd309be5 100644 --- a/types/lodash/flow/index.d.ts +++ b/types/lodash/flow/index.d.ts @@ -1,2 +1,2 @@ import { flow } from "../index"; -export = flow; \ No newline at end of file +export = flow; diff --git a/types/lodash/flowRight/index.d.ts b/types/lodash/flowRight/index.d.ts index d787765c55..65fe107bde 100644 --- a/types/lodash/flowRight/index.d.ts +++ b/types/lodash/flowRight/index.d.ts @@ -1,2 +1,2 @@ import { flowRight } from "../index"; -export = flowRight; \ No newline at end of file +export = flowRight; diff --git a/types/lodash/forEach/index.d.ts b/types/lodash/forEach/index.d.ts index cd50458a13..bdcae5ac8a 100644 --- a/types/lodash/forEach/index.d.ts +++ b/types/lodash/forEach/index.d.ts @@ -1,2 +1,2 @@ import { forEach } from "../index"; -export = forEach; \ No newline at end of file +export = forEach; diff --git a/types/lodash/forEachRight/index.d.ts b/types/lodash/forEachRight/index.d.ts index 3c579e867d..16bfc91bd8 100644 --- a/types/lodash/forEachRight/index.d.ts +++ b/types/lodash/forEachRight/index.d.ts @@ -1,2 +1,2 @@ import { forEachRight } from "../index"; -export = forEachRight; \ No newline at end of file +export = forEachRight; diff --git a/types/lodash/forIn/index.d.ts b/types/lodash/forIn/index.d.ts index 8ce44be7b3..176b0bc3c4 100644 --- a/types/lodash/forIn/index.d.ts +++ b/types/lodash/forIn/index.d.ts @@ -1,2 +1,2 @@ import { forIn } from "../index"; -export = forIn; \ No newline at end of file +export = forIn; diff --git a/types/lodash/forInRight/index.d.ts b/types/lodash/forInRight/index.d.ts index c8a8b63da3..791c1ae43a 100644 --- a/types/lodash/forInRight/index.d.ts +++ b/types/lodash/forInRight/index.d.ts @@ -1,2 +1,2 @@ import { forInRight } from "../index"; -export = forInRight; \ No newline at end of file +export = forInRight; diff --git a/types/lodash/forOwn/index.d.ts b/types/lodash/forOwn/index.d.ts index 5a8fb41203..41230e4df0 100644 --- a/types/lodash/forOwn/index.d.ts +++ b/types/lodash/forOwn/index.d.ts @@ -1,2 +1,2 @@ import { forOwn } from "../index"; -export = forOwn; \ No newline at end of file +export = forOwn; diff --git a/types/lodash/forOwnRight/index.d.ts b/types/lodash/forOwnRight/index.d.ts index c50c88ffcb..cf09aaea78 100644 --- a/types/lodash/forOwnRight/index.d.ts +++ b/types/lodash/forOwnRight/index.d.ts @@ -1,2 +1,2 @@ import { forOwnRight } from "../index"; -export = forOwnRight; \ No newline at end of file +export = forOwnRight; diff --git a/types/lodash/fromPairs/index.d.ts b/types/lodash/fromPairs/index.d.ts index 0a9528aa6e..007dd84c4f 100644 --- a/types/lodash/fromPairs/index.d.ts +++ b/types/lodash/fromPairs/index.d.ts @@ -1,2 +1,2 @@ import { fromPairs } from "../index"; -export = fromPairs; \ No newline at end of file +export = fromPairs; diff --git a/types/lodash/functions/index.d.ts b/types/lodash/functions/index.d.ts index 1d85c6d363..ecb9881d1f 100644 --- a/types/lodash/functions/index.d.ts +++ b/types/lodash/functions/index.d.ts @@ -1,2 +1,2 @@ import { functions } from "../index"; -export = functions; \ No newline at end of file +export = functions; diff --git a/types/lodash/functionsIn/index.d.ts b/types/lodash/functionsIn/index.d.ts index 93e45415db..e3d733ae40 100644 --- a/types/lodash/functionsIn/index.d.ts +++ b/types/lodash/functionsIn/index.d.ts @@ -1,2 +1,2 @@ import { functionsIn } from "../index"; -export = functionsIn; \ No newline at end of file +export = functionsIn; diff --git a/types/lodash/get/index.d.ts b/types/lodash/get/index.d.ts index 435d3df99d..d38d6753aa 100644 --- a/types/lodash/get/index.d.ts +++ b/types/lodash/get/index.d.ts @@ -1,2 +1,2 @@ import { get } from "../index"; -export = get; \ No newline at end of file +export = get; diff --git a/types/lodash/groupBy/index.d.ts b/types/lodash/groupBy/index.d.ts index e04afa237b..2d09926b8f 100644 --- a/types/lodash/groupBy/index.d.ts +++ b/types/lodash/groupBy/index.d.ts @@ -1,2 +1,2 @@ import { groupBy } from "../index"; -export = groupBy; \ No newline at end of file +export = groupBy; diff --git a/types/lodash/gt/index.d.ts b/types/lodash/gt/index.d.ts index 9601fc765b..842d6c11f2 100644 --- a/types/lodash/gt/index.d.ts +++ b/types/lodash/gt/index.d.ts @@ -1,2 +1,2 @@ import { gt } from "../index"; -export = gt; \ No newline at end of file +export = gt; diff --git a/types/lodash/gte/index.d.ts b/types/lodash/gte/index.d.ts index c329cb2544..ffdf651d58 100644 --- a/types/lodash/gte/index.d.ts +++ b/types/lodash/gte/index.d.ts @@ -1,2 +1,2 @@ import { gte } from "../index"; -export = gte; \ No newline at end of file +export = gte; diff --git a/types/lodash/has/index.d.ts b/types/lodash/has/index.d.ts index ef4607fd00..56a5f39b91 100644 --- a/types/lodash/has/index.d.ts +++ b/types/lodash/has/index.d.ts @@ -1,2 +1,2 @@ import { has } from "../index"; -export = has; \ No newline at end of file +export = has; diff --git a/types/lodash/hasIn/index.d.ts b/types/lodash/hasIn/index.d.ts index 28e46e8d42..bcacce21c1 100644 --- a/types/lodash/hasIn/index.d.ts +++ b/types/lodash/hasIn/index.d.ts @@ -1,2 +1,2 @@ import { hasIn } from "../index"; -export = hasIn; \ No newline at end of file +export = hasIn; diff --git a/types/lodash/head/index.d.ts b/types/lodash/head/index.d.ts index f9cdf839d6..686e6372a8 100644 --- a/types/lodash/head/index.d.ts +++ b/types/lodash/head/index.d.ts @@ -1,2 +1,2 @@ import { head } from "../index"; -export = head; \ No newline at end of file +export = head; diff --git a/types/lodash/identity/index.d.ts b/types/lodash/identity/index.d.ts index 26894a8e4e..92a3e32afb 100644 --- a/types/lodash/identity/index.d.ts +++ b/types/lodash/identity/index.d.ts @@ -1,2 +1,2 @@ import { identity } from "../index"; -export = identity; \ No newline at end of file +export = identity; diff --git a/types/lodash/inRange/index.d.ts b/types/lodash/inRange/index.d.ts index 128b554abc..873efdaef4 100644 --- a/types/lodash/inRange/index.d.ts +++ b/types/lodash/inRange/index.d.ts @@ -1,2 +1,2 @@ import { inRange } from "../index"; -export = inRange; \ No newline at end of file +export = inRange; diff --git a/types/lodash/includes/index.d.ts b/types/lodash/includes/index.d.ts index d1c5d94e90..c78736dc58 100644 --- a/types/lodash/includes/index.d.ts +++ b/types/lodash/includes/index.d.ts @@ -1,2 +1,2 @@ import { includes } from "../index"; -export = includes; \ No newline at end of file +export = includes; diff --git a/types/lodash/index.d.ts b/types/lodash/index.d.ts index 6326773899..f3dac0b006 100644 --- a/types/lodash/index.d.ts +++ b/types/lodash/index.d.ts @@ -1,6 +1,6 @@ // Type definitions for Lo-Dash 4.14 // Project: http://lodash.com/ -// Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk +// Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk , Eric L Anderson // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 @@ -43,7 +43,6 @@ changes: - [x] Made _.capitalize uppercase the first character & lowercase the rest - [x] Made _.functions return only own method names - added 23 array methods: - [x] _.concat - [x] _.differenceBy @@ -101,7 +100,6 @@ added 13 object methods: - [x] _.omitBy - [x] _.pickBy - added 8 string methods: - [x] _.lowerCase - [x] _.lowerFirst @@ -237,7 +235,6 @@ Methods: - [ ] _.next */ - export = _; export as namespace _; @@ -246,7 +243,6 @@ declare var _: _.LoDashStatic; type PartialObject = Partial; declare namespace _ { - type Many = T | T[]; interface LoDashStatic { @@ -468,7 +464,7 @@ declare namespace _ { * @param array The array to compact. * @return (Array) Returns the new array of filtered values. */ - compact(array?: List): T[]; + compact(array?: List): T[]; } interface LoDashImplicitArrayWrapper { @@ -3202,11 +3198,9 @@ declare namespace _ { sortedIndex( value: T ): LoDashExplicitWrapper; - - } - //_.sortedIndexBy + // _.sortedIndexBy interface LoDashStatic { /** * This method is like `_.sortedIndex` except that it accepts `iteratee` @@ -5660,9 +5654,8 @@ declare namespace _ { //_.zipObject interface LoDashStatic { /** - * The inverse of _.pairs; this method returns an object composed from arrays of property names and values. - * Provide either a single two dimensional array, e.g. [[key1, value1], [key2, value2]] or two arrays, one of - * property names and one of corresponding values. + * This method is like _.fromPairs except that it accepts two arrays, one of property + * identifiers and one of corresponding values. * * @param props The property names. * @param values The property values. @@ -5672,6 +5665,17 @@ declare namespace _ { props: List|List>, values?: List ): TResult; + /** + * This method is like _.zipObject except that it supports property paths. + * + * @param props The property names. + * @param values The property values. + * @return Returns the new object. + */ + zipObjectDeep( + props: List|List>, + values?: List + ): TResult; /** * @see _.zipObject @@ -5680,6 +5684,13 @@ declare namespace _ { props: List|List>, values?: List ): TResult; + /** + * @see _.zipObjectDeep + */ + zipObjectDeep( + props: List|List>, + values?: List + ): TResult; /** * @see _.zipObject @@ -5688,6 +5699,13 @@ declare namespace _ { props: List|List>, values?: List ): _.Dictionary; + /** + * @see _.zipObjectDeep + */ + zipObjectDepp( + props: List|List>, + values?: List + ): _.Dictionary; } interface LoDashImplicitArrayWrapper { @@ -5697,6 +5715,12 @@ declare namespace _ { zipObject( values?: List ): _.LoDashImplicitObjectWrapper; + /** + * @see _.zipObjectDeep + */ + zipObjectDeep( + values?: List + ): _.LoDashImplicitObjectWrapper; /** * @see _.zipObject @@ -5704,6 +5728,12 @@ declare namespace _ { zipObject( values?: List ): _.LoDashImplicitObjectWrapper; + /** + * @see _.zipObjectDeep + */ + zipObjectDeep( + values?: List + ): _.LoDashImplicitObjectWrapper; /** * @see _.zipObject @@ -5711,6 +5741,12 @@ declare namespace _ { zipObject( values?: List ): _.LoDashImplicitObjectWrapper<_.Dictionary>; + /** + * @see _.zipObjectDeep + */ + zipObjectDeep( + values?: List + ): _.LoDashImplicitObjectWrapper<_.Dictionary>; } interface LoDashImplicitObjectWrapper { @@ -5720,6 +5756,12 @@ declare namespace _ { zipObject( values?: List ): _.LoDashImplicitObjectWrapper; + /** + * @see _.zipObjectDeep + */ + zipObjectDeep( + values?: List + ): _.LoDashImplicitObjectWrapper; /** * @see _.zipObject @@ -5727,6 +5769,12 @@ declare namespace _ { zipObject( values?: List ): _.LoDashImplicitObjectWrapper; + /** + * @see _.zipObjectDeep + */ + zipObjectDeep( + values?: List + ): _.LoDashImplicitObjectWrapper; /** * @see _.zipObject @@ -5734,6 +5782,12 @@ declare namespace _ { zipObject( values?: List ): _.LoDashImplicitObjectWrapper<_.Dictionary>; + /** + * @see _.zipObjectDeep + */ + zipObjectDeep( + values?: List + ): _.LoDashImplicitObjectWrapper<_.Dictionary>; } interface LoDashExplicitArrayWrapper { @@ -5743,6 +5797,12 @@ declare namespace _ { zipObject( values?: List ): _.LoDashExplicitObjectWrapper; + /** + * @see _.zipObjectDeep + */ + zipObjectDeep( + values?: List + ): _.LoDashExplicitObjectWrapper; /** * @see _.zipObject @@ -5750,6 +5810,12 @@ declare namespace _ { zipObject( values?: List ): _.LoDashExplicitObjectWrapper; + /** + * @see _.zipObjectDeep + */ + zipObjectDeep( + values?: List + ): _.LoDashExplicitObjectWrapper; /** * @see _.zipObject @@ -5757,6 +5823,12 @@ declare namespace _ { zipObject( values?: List ): _.LoDashExplicitObjectWrapper<_.Dictionary>; + /** + * @see _.zipObjectDeep + */ + zipObjectDeep( + values?: List + ): _.LoDashExplicitObjectWrapper<_.Dictionary>; } interface LoDashExplicitObjectWrapper { @@ -5766,6 +5838,12 @@ declare namespace _ { zipObject( values?: List ): _.LoDashExplicitObjectWrapper; + /** + * @see _.zipObjectDeep + */ + zipObjectDeep( + values?: List + ): _.LoDashExplicitObjectWrapper; /** * @see _.zipObject @@ -5773,6 +5851,12 @@ declare namespace _ { zipObject( values?: List ): _.LoDashExplicitObjectWrapper; + /** + * @see _.zipObjectDeep + */ + zipObjectDeep( + values?: List + ): _.LoDashExplicitObjectWrapper; /** * @see _.zipObject @@ -5780,6 +5864,12 @@ declare namespace _ { zipObject( values?: List ): _.LoDashExplicitObjectWrapper<_.Dictionary>; + /** + * @see _.zipObjectDeep + */ + zipObjectDeep( + values?: List + ): _.LoDashExplicitObjectWrapper<_.Dictionary>; } //_.zipWith @@ -8662,7 +8752,6 @@ declare namespace _ { reduce( collection: NumericDictionary, callback: MemoIterator): TResult; - } interface LoDashImplicitArrayWrapper { @@ -9248,7 +9337,6 @@ declare namespace _ { predicate?: string|[string, any] ): boolean; - /** * @see _.some */ @@ -10517,7 +10605,6 @@ declare namespace _ { flowRight(...funcs: Function[]): LoDashExplicitObjectWrapper; } - //_.memoize interface MemoizedFunction extends Function { cache: MapCache; @@ -11163,7 +11250,6 @@ declare namespace _ { } interface LoDashImplicitArrayWrapper { - /** * @see _.clone */ @@ -11185,7 +11271,6 @@ declare namespace _ { } interface LoDashExplicitArrayWrapper { - /** * @see _.clone */ @@ -13875,7 +13960,6 @@ declare namespace _ { end: number ): boolean; - /** * @see _.inRange */ @@ -14720,7 +14804,6 @@ declare namespace _ { create(properties?: U): LoDashExplicitObjectWrapper; } - //_.defaults interface LoDashStatic { /** @@ -16593,7 +16676,6 @@ declare namespace _ { } interface LoDashImplicitObjectWrapper { - /** * @see _.omit */ @@ -16603,7 +16685,6 @@ declare namespace _ { } interface LoDashExplicitObjectWrapper { - /** * @see _.omit */ @@ -16993,23 +17074,23 @@ declare namespace _ { * @param object The object to query. * @return Returns the new array of key-value pairs. */ - toPairs(object?: T): any[][]; + toPairs(object?: T): [string, any][]; - toPairs(object?: T): TResult[][]; + toPairs(object?: T): [string, TResult][]; } interface LoDashImplicitObjectWrapper { /** * @see _.toPairs */ - toPairs(): LoDashImplicitArrayWrapper; + toPairs(): LoDashImplicitArrayWrapper<[string, TResult]>; } interface LoDashExplicitObjectWrapper { /** * @see _.toPairs */ - toPairs(): LoDashExplicitArrayWrapper; + toPairs(): LoDashExplicitArrayWrapper<[string, TResult]>; } //_.toPairsIn @@ -17020,23 +17101,23 @@ declare namespace _ { * @param object The object to query. * @return Returns the new array of key-value pairs. */ - toPairsIn(object?: T): any[][]; + toPairsIn(object?: T): [string, any][]; - toPairsIn(object?: T): TResult[][]; + toPairsIn(object?: T): [string, TResult][]; } interface LoDashImplicitObjectWrapper { /** * @see _.toPairsIn */ - toPairsIn(): LoDashImplicitArrayWrapper; + toPairsIn(): LoDashImplicitArrayWrapper<[string, TResult]>; } interface LoDashExplicitObjectWrapper { /** * @see _.toPairsIn */ - toPairsIn(): LoDashExplicitArrayWrapper; + toPairsIn(): LoDashExplicitArrayWrapper<[string, TResult]>; } //_.transform @@ -19498,7 +19579,6 @@ declare namespace _ { } } - // Backward compatibility with --target es5 declare global { interface Set { } diff --git a/types/lodash/indexOf/index.d.ts b/types/lodash/indexOf/index.d.ts index ab5c82d8ed..d2f21b9864 100644 --- a/types/lodash/indexOf/index.d.ts +++ b/types/lodash/indexOf/index.d.ts @@ -1,2 +1,2 @@ import { indexOf } from "../index"; -export = indexOf; \ No newline at end of file +export = indexOf; diff --git a/types/lodash/initial/index.d.ts b/types/lodash/initial/index.d.ts index 800c0a6ca2..459fa17ade 100644 --- a/types/lodash/initial/index.d.ts +++ b/types/lodash/initial/index.d.ts @@ -1,2 +1,2 @@ import { initial } from "../index"; -export = initial; \ No newline at end of file +export = initial; diff --git a/types/lodash/intersection/index.d.ts b/types/lodash/intersection/index.d.ts index b44a84ac45..d186c26fc9 100644 --- a/types/lodash/intersection/index.d.ts +++ b/types/lodash/intersection/index.d.ts @@ -1,2 +1,2 @@ import { intersection } from "../index"; -export = intersection; \ No newline at end of file +export = intersection; diff --git a/types/lodash/intersectionBy/index.d.ts b/types/lodash/intersectionBy/index.d.ts index 82df722083..430bf52bbf 100644 --- a/types/lodash/intersectionBy/index.d.ts +++ b/types/lodash/intersectionBy/index.d.ts @@ -1,2 +1,2 @@ import { intersectionBy } from "../index"; -export = intersectionBy; \ No newline at end of file +export = intersectionBy; diff --git a/types/lodash/intersectionWith/index.d.ts b/types/lodash/intersectionWith/index.d.ts index 6c69b5323b..f6a3ec0dd8 100644 --- a/types/lodash/intersectionWith/index.d.ts +++ b/types/lodash/intersectionWith/index.d.ts @@ -1,2 +1,2 @@ import { intersectionWith } from "../index"; -export = intersectionWith; \ No newline at end of file +export = intersectionWith; diff --git a/types/lodash/invert/index.d.ts b/types/lodash/invert/index.d.ts index 21e2a38243..525a57d57e 100644 --- a/types/lodash/invert/index.d.ts +++ b/types/lodash/invert/index.d.ts @@ -1,2 +1,2 @@ import { invert } from "../index"; -export = invert; \ No newline at end of file +export = invert; diff --git a/types/lodash/invertBy/index.d.ts b/types/lodash/invertBy/index.d.ts index c489f376a2..5e87b4d801 100644 --- a/types/lodash/invertBy/index.d.ts +++ b/types/lodash/invertBy/index.d.ts @@ -1,2 +1,2 @@ import { invertBy } from "../index"; -export = invertBy; \ No newline at end of file +export = invertBy; diff --git a/types/lodash/invoke/index.d.ts b/types/lodash/invoke/index.d.ts index a8ecc5713e..b4457e8b25 100644 --- a/types/lodash/invoke/index.d.ts +++ b/types/lodash/invoke/index.d.ts @@ -1,2 +1,2 @@ import { invoke } from "../index"; -export = invoke; \ No newline at end of file +export = invoke; diff --git a/types/lodash/invokeMap/index.d.ts b/types/lodash/invokeMap/index.d.ts index d4d4ecd4f5..7b2f232247 100644 --- a/types/lodash/invokeMap/index.d.ts +++ b/types/lodash/invokeMap/index.d.ts @@ -1,2 +1,2 @@ import { invokeMap } from "../index"; -export = invokeMap; \ No newline at end of file +export = invokeMap; diff --git a/types/lodash/isArguments/index.d.ts b/types/lodash/isArguments/index.d.ts index c340e2213b..1eab52baf4 100644 --- a/types/lodash/isArguments/index.d.ts +++ b/types/lodash/isArguments/index.d.ts @@ -1,2 +1,2 @@ import { isArguments } from "../index"; -export = isArguments; \ No newline at end of file +export = isArguments; diff --git a/types/lodash/isArray/index.d.ts b/types/lodash/isArray/index.d.ts index cf6bccc392..d25e63b785 100644 --- a/types/lodash/isArray/index.d.ts +++ b/types/lodash/isArray/index.d.ts @@ -1,2 +1,2 @@ import { isArray } from "../index"; -export = isArray; \ No newline at end of file +export = isArray; diff --git a/types/lodash/isArrayBuffer/index.d.ts b/types/lodash/isArrayBuffer/index.d.ts index d7f1adfc48..503f3fffdb 100644 --- a/types/lodash/isArrayBuffer/index.d.ts +++ b/types/lodash/isArrayBuffer/index.d.ts @@ -1,2 +1,2 @@ import { isArrayBuffer } from "../index"; -export = isArrayBuffer; \ No newline at end of file +export = isArrayBuffer; diff --git a/types/lodash/isArrayLike/index.d.ts b/types/lodash/isArrayLike/index.d.ts index 40bfb93a16..706e959347 100644 --- a/types/lodash/isArrayLike/index.d.ts +++ b/types/lodash/isArrayLike/index.d.ts @@ -1,2 +1,2 @@ import { isArrayLike } from "../index"; -export = isArrayLike; \ No newline at end of file +export = isArrayLike; diff --git a/types/lodash/isArrayLikeObject/index.d.ts b/types/lodash/isArrayLikeObject/index.d.ts index 1d0fae7cd8..2336469e2e 100644 --- a/types/lodash/isArrayLikeObject/index.d.ts +++ b/types/lodash/isArrayLikeObject/index.d.ts @@ -1,2 +1,2 @@ import { isArrayLikeObject } from "../index"; -export = isArrayLikeObject; \ No newline at end of file +export = isArrayLikeObject; diff --git a/types/lodash/isBoolean/index.d.ts b/types/lodash/isBoolean/index.d.ts index 641d0a3e24..348c40747c 100644 --- a/types/lodash/isBoolean/index.d.ts +++ b/types/lodash/isBoolean/index.d.ts @@ -1,2 +1,2 @@ import { isBoolean } from "../index"; -export = isBoolean; \ No newline at end of file +export = isBoolean; diff --git a/types/lodash/isBuffer/index.d.ts b/types/lodash/isBuffer/index.d.ts index 96260453e7..2e3f555fbf 100644 --- a/types/lodash/isBuffer/index.d.ts +++ b/types/lodash/isBuffer/index.d.ts @@ -1,2 +1,2 @@ import { isBuffer } from "../index"; -export = isBuffer; \ No newline at end of file +export = isBuffer; diff --git a/types/lodash/isDate/index.d.ts b/types/lodash/isDate/index.d.ts index 671f2f0111..23abc5b9e2 100644 --- a/types/lodash/isDate/index.d.ts +++ b/types/lodash/isDate/index.d.ts @@ -1,2 +1,2 @@ import { isDate } from "../index"; -export = isDate; \ No newline at end of file +export = isDate; diff --git a/types/lodash/isElement/index.d.ts b/types/lodash/isElement/index.d.ts index c533c31990..ccf79d3ad4 100644 --- a/types/lodash/isElement/index.d.ts +++ b/types/lodash/isElement/index.d.ts @@ -1,2 +1,2 @@ import { isElement } from "../index"; -export = isElement; \ No newline at end of file +export = isElement; diff --git a/types/lodash/isEmpty/index.d.ts b/types/lodash/isEmpty/index.d.ts index 8953bc88a5..593a4af122 100644 --- a/types/lodash/isEmpty/index.d.ts +++ b/types/lodash/isEmpty/index.d.ts @@ -1,2 +1,2 @@ import { isEmpty } from "../index"; -export = isEmpty; \ No newline at end of file +export = isEmpty; diff --git a/types/lodash/isEqual/index.d.ts b/types/lodash/isEqual/index.d.ts index 57b5e8eac5..732f1db607 100644 --- a/types/lodash/isEqual/index.d.ts +++ b/types/lodash/isEqual/index.d.ts @@ -1,2 +1,2 @@ import { isEqual } from "../index"; -export = isEqual; \ No newline at end of file +export = isEqual; diff --git a/types/lodash/isEqualWith/index.d.ts b/types/lodash/isEqualWith/index.d.ts index d43f81c209..3f3ffb8d61 100644 --- a/types/lodash/isEqualWith/index.d.ts +++ b/types/lodash/isEqualWith/index.d.ts @@ -1,2 +1,2 @@ import { isEqualWith } from "../index"; -export = isEqualWith; \ No newline at end of file +export = isEqualWith; diff --git a/types/lodash/isError/index.d.ts b/types/lodash/isError/index.d.ts index b56665a1ca..ba36080a20 100644 --- a/types/lodash/isError/index.d.ts +++ b/types/lodash/isError/index.d.ts @@ -1,2 +1,2 @@ import { isError } from "../index"; -export = isError; \ No newline at end of file +export = isError; diff --git a/types/lodash/isFinite/index.d.ts b/types/lodash/isFinite/index.d.ts index bc1dcd04ef..55e07fe26b 100644 --- a/types/lodash/isFinite/index.d.ts +++ b/types/lodash/isFinite/index.d.ts @@ -1,2 +1,2 @@ import { isFinite } from "../index"; -export = isFinite; \ No newline at end of file +export = isFinite; diff --git a/types/lodash/isFunction/index.d.ts b/types/lodash/isFunction/index.d.ts index b67b30d201..3a0f17bae3 100644 --- a/types/lodash/isFunction/index.d.ts +++ b/types/lodash/isFunction/index.d.ts @@ -1,2 +1,2 @@ import { isFunction } from "../index"; -export = isFunction; \ No newline at end of file +export = isFunction; diff --git a/types/lodash/isInteger/index.d.ts b/types/lodash/isInteger/index.d.ts index bdc8732dc6..271a02cbc9 100644 --- a/types/lodash/isInteger/index.d.ts +++ b/types/lodash/isInteger/index.d.ts @@ -1,2 +1,2 @@ import { isInteger } from "../index"; -export = isInteger; \ No newline at end of file +export = isInteger; diff --git a/types/lodash/isLength/index.d.ts b/types/lodash/isLength/index.d.ts index 7d3044c7a7..d930fb357f 100644 --- a/types/lodash/isLength/index.d.ts +++ b/types/lodash/isLength/index.d.ts @@ -1,2 +1,2 @@ import { isLength } from "../index"; -export = isLength; \ No newline at end of file +export = isLength; diff --git a/types/lodash/isMap/index.d.ts b/types/lodash/isMap/index.d.ts index 55fa964b92..579632c190 100644 --- a/types/lodash/isMap/index.d.ts +++ b/types/lodash/isMap/index.d.ts @@ -1,2 +1,2 @@ import { isMap } from "../index"; -export = isMap; \ No newline at end of file +export = isMap; diff --git a/types/lodash/isMatch/index.d.ts b/types/lodash/isMatch/index.d.ts index e0fe216b20..d0ad2c8f4d 100644 --- a/types/lodash/isMatch/index.d.ts +++ b/types/lodash/isMatch/index.d.ts @@ -1,2 +1,2 @@ import { isMatch } from "../index"; -export = isMatch; \ No newline at end of file +export = isMatch; diff --git a/types/lodash/isMatchWith/index.d.ts b/types/lodash/isMatchWith/index.d.ts index 826b89a9d5..07e83bfe93 100644 --- a/types/lodash/isMatchWith/index.d.ts +++ b/types/lodash/isMatchWith/index.d.ts @@ -1,2 +1,2 @@ import { isMatchWith } from "../index"; -export = isMatchWith; \ No newline at end of file +export = isMatchWith; diff --git a/types/lodash/isNaN/index.d.ts b/types/lodash/isNaN/index.d.ts index c3aac0325a..e2c48a8f47 100644 --- a/types/lodash/isNaN/index.d.ts +++ b/types/lodash/isNaN/index.d.ts @@ -1,2 +1,2 @@ import { isNaN } from "../index"; -export = isNaN; \ No newline at end of file +export = isNaN; diff --git a/types/lodash/isNative/index.d.ts b/types/lodash/isNative/index.d.ts index 5ebd0dd433..6f32bd4138 100644 --- a/types/lodash/isNative/index.d.ts +++ b/types/lodash/isNative/index.d.ts @@ -1,2 +1,2 @@ import { isNative } from "../index"; -export = isNative; \ No newline at end of file +export = isNative; diff --git a/types/lodash/isNil/index.d.ts b/types/lodash/isNil/index.d.ts index eb45696d78..46f4928dda 100644 --- a/types/lodash/isNil/index.d.ts +++ b/types/lodash/isNil/index.d.ts @@ -1,2 +1,2 @@ import { isNil } from "../index"; -export = isNil; \ No newline at end of file +export = isNil; diff --git a/types/lodash/isNull/index.d.ts b/types/lodash/isNull/index.d.ts index 534886638c..a8ff0aa678 100644 --- a/types/lodash/isNull/index.d.ts +++ b/types/lodash/isNull/index.d.ts @@ -1,2 +1,2 @@ import { isNull } from "../index"; -export = isNull; \ No newline at end of file +export = isNull; diff --git a/types/lodash/isNumber/index.d.ts b/types/lodash/isNumber/index.d.ts index 5a8b9d82a9..13dd5e71df 100644 --- a/types/lodash/isNumber/index.d.ts +++ b/types/lodash/isNumber/index.d.ts @@ -1,2 +1,2 @@ import { isNumber } from "../index"; -export = isNumber; \ No newline at end of file +export = isNumber; diff --git a/types/lodash/isObject/index.d.ts b/types/lodash/isObject/index.d.ts index 8ffd829177..782c639180 100644 --- a/types/lodash/isObject/index.d.ts +++ b/types/lodash/isObject/index.d.ts @@ -1,2 +1,2 @@ import { isObject } from "../index"; -export = isObject; \ No newline at end of file +export = isObject; diff --git a/types/lodash/isObjectLike/index.d.ts b/types/lodash/isObjectLike/index.d.ts index d8ccba7e88..1f3e27b9e3 100644 --- a/types/lodash/isObjectLike/index.d.ts +++ b/types/lodash/isObjectLike/index.d.ts @@ -1,2 +1,2 @@ import { isObjectLike } from "../index"; -export = isObjectLike; \ No newline at end of file +export = isObjectLike; diff --git a/types/lodash/isPlainObject/index.d.ts b/types/lodash/isPlainObject/index.d.ts index c475c55813..5f474f0259 100644 --- a/types/lodash/isPlainObject/index.d.ts +++ b/types/lodash/isPlainObject/index.d.ts @@ -1,2 +1,2 @@ import { isPlainObject } from "../index"; -export = isPlainObject; \ No newline at end of file +export = isPlainObject; diff --git a/types/lodash/isRegExp/index.d.ts b/types/lodash/isRegExp/index.d.ts index ec98ecb1c5..aa85288df5 100644 --- a/types/lodash/isRegExp/index.d.ts +++ b/types/lodash/isRegExp/index.d.ts @@ -1,2 +1,2 @@ import { isRegExp } from "../index"; -export = isRegExp; \ No newline at end of file +export = isRegExp; diff --git a/types/lodash/isSafeInteger/index.d.ts b/types/lodash/isSafeInteger/index.d.ts index d01b370acc..e3002bd6b9 100644 --- a/types/lodash/isSafeInteger/index.d.ts +++ b/types/lodash/isSafeInteger/index.d.ts @@ -1,2 +1,2 @@ import { isSafeInteger } from "../index"; -export = isSafeInteger; \ No newline at end of file +export = isSafeInteger; diff --git a/types/lodash/isSet/index.d.ts b/types/lodash/isSet/index.d.ts index c08ee683ba..e7f1b52379 100644 --- a/types/lodash/isSet/index.d.ts +++ b/types/lodash/isSet/index.d.ts @@ -1,2 +1,2 @@ import { isSet } from "../index"; -export = isSet; \ No newline at end of file +export = isSet; diff --git a/types/lodash/isString/index.d.ts b/types/lodash/isString/index.d.ts index 2413f17435..1f791b7d92 100644 --- a/types/lodash/isString/index.d.ts +++ b/types/lodash/isString/index.d.ts @@ -1,2 +1,2 @@ import { isString } from "../index"; -export = isString; \ No newline at end of file +export = isString; diff --git a/types/lodash/isSymbol/index.d.ts b/types/lodash/isSymbol/index.d.ts index eba542157f..15c9097d3f 100644 --- a/types/lodash/isSymbol/index.d.ts +++ b/types/lodash/isSymbol/index.d.ts @@ -1,2 +1,2 @@ import { isSymbol } from "../index"; -export = isSymbol; \ No newline at end of file +export = isSymbol; diff --git a/types/lodash/isTypedArray/index.d.ts b/types/lodash/isTypedArray/index.d.ts index 0320879333..8856310cd6 100644 --- a/types/lodash/isTypedArray/index.d.ts +++ b/types/lodash/isTypedArray/index.d.ts @@ -1,2 +1,2 @@ import { isTypedArray } from "../index"; -export = isTypedArray; \ No newline at end of file +export = isTypedArray; diff --git a/types/lodash/isUndefined/index.d.ts b/types/lodash/isUndefined/index.d.ts index 8efbb37b1f..dbb326461e 100644 --- a/types/lodash/isUndefined/index.d.ts +++ b/types/lodash/isUndefined/index.d.ts @@ -1,2 +1,2 @@ import { isUndefined } from "../index"; -export = isUndefined; \ No newline at end of file +export = isUndefined; diff --git a/types/lodash/isWeakMap/index.d.ts b/types/lodash/isWeakMap/index.d.ts index 69caa4c956..954f587ecf 100644 --- a/types/lodash/isWeakMap/index.d.ts +++ b/types/lodash/isWeakMap/index.d.ts @@ -1,2 +1,2 @@ import { isWeakMap } from "../index"; -export = isWeakMap; \ No newline at end of file +export = isWeakMap; diff --git a/types/lodash/isWeakSet/index.d.ts b/types/lodash/isWeakSet/index.d.ts index d0cf33fdd6..28a84390d8 100644 --- a/types/lodash/isWeakSet/index.d.ts +++ b/types/lodash/isWeakSet/index.d.ts @@ -1,2 +1,2 @@ import { isWeakSet } from "../index"; -export = isWeakSet; \ No newline at end of file +export = isWeakSet; diff --git a/types/lodash/iteratee/index.d.ts b/types/lodash/iteratee/index.d.ts index 81764d4ad2..2969a1f3e4 100644 --- a/types/lodash/iteratee/index.d.ts +++ b/types/lodash/iteratee/index.d.ts @@ -1,2 +1,2 @@ import { iteratee } from "../index"; -export = iteratee; \ No newline at end of file +export = iteratee; diff --git a/types/lodash/join/index.d.ts b/types/lodash/join/index.d.ts index 2c2bd4f91e..ba5a4a26a7 100644 --- a/types/lodash/join/index.d.ts +++ b/types/lodash/join/index.d.ts @@ -1,2 +1,2 @@ import { join } from "../index"; -export = join; \ No newline at end of file +export = join; diff --git a/types/lodash/kebabCase/index.d.ts b/types/lodash/kebabCase/index.d.ts index 73576c0249..875a153635 100644 --- a/types/lodash/kebabCase/index.d.ts +++ b/types/lodash/kebabCase/index.d.ts @@ -1,2 +1,2 @@ import { kebabCase } from "../index"; -export = kebabCase; \ No newline at end of file +export = kebabCase; diff --git a/types/lodash/keyBy/index.d.ts b/types/lodash/keyBy/index.d.ts index 80a0a4d7c9..93f370b5a7 100644 --- a/types/lodash/keyBy/index.d.ts +++ b/types/lodash/keyBy/index.d.ts @@ -1,2 +1,2 @@ import { keyBy } from "../index"; -export = keyBy; \ No newline at end of file +export = keyBy; diff --git a/types/lodash/keys/index.d.ts b/types/lodash/keys/index.d.ts index 53693b5705..3a19ec5b7a 100644 --- a/types/lodash/keys/index.d.ts +++ b/types/lodash/keys/index.d.ts @@ -1,2 +1,2 @@ import { keys } from "../index"; -export = keys; \ No newline at end of file +export = keys; diff --git a/types/lodash/keysIn/index.d.ts b/types/lodash/keysIn/index.d.ts index e0747ccc46..159a7e9b8c 100644 --- a/types/lodash/keysIn/index.d.ts +++ b/types/lodash/keysIn/index.d.ts @@ -1,2 +1,2 @@ import { keysIn } from "../index"; -export = keysIn; \ No newline at end of file +export = keysIn; diff --git a/types/lodash/last/index.d.ts b/types/lodash/last/index.d.ts index 2590a6ac4f..8b56dda8bf 100644 --- a/types/lodash/last/index.d.ts +++ b/types/lodash/last/index.d.ts @@ -1,2 +1,2 @@ import { last } from "../index"; -export = last; \ No newline at end of file +export = last; diff --git a/types/lodash/lastIndexOf/index.d.ts b/types/lodash/lastIndexOf/index.d.ts index 8e83b85f3b..47a9e1fef9 100644 --- a/types/lodash/lastIndexOf/index.d.ts +++ b/types/lodash/lastIndexOf/index.d.ts @@ -1,2 +1,2 @@ import { lastIndexOf } from "../index"; -export = lastIndexOf; \ No newline at end of file +export = lastIndexOf; diff --git a/types/lodash/lodash-tests.ts b/types/lodash/lodash-tests.ts index b260df8ee5..470bb1338c 100644 --- a/types/lodash/lodash-tests.ts +++ b/types/lodash/lodash-tests.ts @@ -1,4 +1,4 @@ -declare var $: any, jQuery: any; +declare const $: any, jQuery: any; interface IFoodOrganic { name: string; @@ -41,38 +41,38 @@ interface IDictionary { [index: string]: T; } -var foodsOrganic: IFoodOrganic[] = [ +const foodsOrganic: IFoodOrganic[] = [ { name: 'banana', organic: true }, { name: 'beet', organic: false }, ]; -var foodsType: IFoodType[] = [ +const foodsType: IFoodType[] = [ { name: 'apple', type: 'fruit' }, { name: 'banana', type: 'fruit' }, { name: 'beet', type: 'vegetable' } ]; -var foodsCombined: IFoodCombined[] = [ +const foodsCombined: IFoodCombined[] = [ { 'name': 'apple', 'organic': false, 'type': 'fruit' }, { 'name': 'carrot', 'organic': true, 'type': 'vegetable' } ]; -var stoogesQuotes: IStoogesQuote[] = [ +const stoogesQuotes: IStoogesQuote[] = [ { 'name': 'curly', 'quotes': ['Oh, a wise guy, eh?', 'Poifect!'] }, { 'name': 'moe', 'quotes': ['Spread out!', 'You knucklehead!'] } ]; -var stoogesAges: IStoogesAge[] = [ +const stoogesAges: IStoogesAge[] = [ { 'name': 'moe', 'age': 40 }, { 'name': 'larry', 'age': 50 } ]; -var stoogesAgesDict: IDictionary = { +const stoogesAgesDict: IDictionary = { first: { 'name': 'moe', 'age': 40 }, second: { 'name': 'larry', 'age': 50 } }; -var stoogesCombined: IStoogesCombined[] = [ +const stoogesCombined: IStoogesCombined[] = [ { 'name': 'curly', 'age': 30, 'quotes': ['Oh, a wise guy, eh?', 'Poifect!'] }, { 'name': 'moe', 'age': 40, 'quotes': ['Spread out!', 'You knucklehead!'] } ]; -var keys: IKey[] = [ +const keys: IKey[] = [ { 'dir': 'left', 'code': 97 }, { 'dir': 'right', 'code': 100 } ]; @@ -85,9 +85,9 @@ class Dog { } } -var result: any; +let result: any; -var any: any; +let any: any; interface TResult { a: number; @@ -96,7 +96,7 @@ interface TResult { } // _.MapCache -var testMapCache: _.MapCache; +let testMapCache: _.MapCache; result = <(key: string) => boolean>testMapCache.delete; result = <(key: string) => any>testMapCache.get; result = <(key: string) => boolean>testMapCache.has; @@ -498,7 +498,6 @@ namespace TestDropRight { result = _.dropRight(list); result = _.dropRight(list, 42); - } { @@ -1488,7 +1487,6 @@ namespace TestTail { result = _.tail(array); result = _.tail(list); - } { @@ -1562,7 +1560,6 @@ namespace TestSortedIndex { result = _(array).sortedIndex(value); result = _(list).sortedIndex(value); - } { @@ -1573,7 +1570,6 @@ namespace TestSortedIndex { result = _(array).chain().sortedIndex(value); result = _(list).chain().sortedIndex(value); - } } @@ -1749,7 +1745,6 @@ namespace TestTail { result = _.tail(array); result = _.tail(list); - } { @@ -2197,11 +2192,9 @@ namespace TestUniq { result = _(array).chain().uniq(); result = _(list).chain().uniq(); - } } - // _.uniqBy namespace TestUniqBy { type SampleObject = {a: number; b: string; c: boolean}; @@ -2608,12 +2601,18 @@ namespace TestZipObject { let result: _.Dictionary; result = _.zipObject(arrayOfKeys); + result = _.zipObjectDeep(arrayOfKeys); result = _.zipObject(arrayOfKeys, arrayOfValues); + result = _.zipObjectDeep(arrayOfKeys, arrayOfValues); result = _.zipObject(arrayOfKeys, listOfValues); + result = _.zipObjectDeep(arrayOfKeys, listOfValues); result = _.zipObject(listOfKeys); + result = _.zipObjectDeep(listOfKeys); result = _.zipObject(listOfKeys, listOfValues); + result = _.zipObjectDeep(listOfKeys, listOfValues); result = _.zipObject(listOfKeys, arrayOfValues); + result = _.zipObjectDeep(listOfKeys, arrayOfValues); result = _.zipObject<_.Dictionary>(arrayOfKeyValuePairs); result = _.zipObject<_.Dictionary>(listOfKeyValuePairs); @@ -2647,15 +2646,23 @@ namespace TestZipObject { let result: _.LoDashImplicitObjectWrapper<_.Dictionary>; result = _(arrayOfKeys).zipObject(); + result = _(arrayOfKeys).zipObjectDeep(); result = _(arrayOfKeys).zipObject(arrayOfValues); + result = _(arrayOfKeys).zipObjectDeep(arrayOfValues); result = _(arrayOfKeys).zipObject(listOfValues); + result = _(arrayOfKeys).zipObjectDeep(listOfValues); result = _(listOfKeys).zipObject(); + result = _(listOfKeys).zipObjectDeep(); result = _(listOfKeys).zipObject(listOfValues); + result = _(listOfKeys).zipObjectDeep(listOfValues); result = _(listOfKeys).zipObject(arrayOfValues); + result = _(listOfKeys).zipObjectDeep(arrayOfValues); result = _(listOfKeys).zipObject(arrayOfKeyValuePairs); + result = _(listOfKeys).zipObjectDeep(arrayOfKeyValuePairs); result = _(listOfKeys).zipObject(listOfKeyValuePairs); + result = _(listOfKeys).zipObjectDeep(listOfKeyValuePairs); } { @@ -2686,15 +2693,23 @@ namespace TestZipObject { let result: _.LoDashExplicitObjectWrapper<_.Dictionary>; result = _(arrayOfKeys).chain().zipObject(); + result = _(arrayOfKeys).chain().zipObjectDeep(); result = _(arrayOfKeys).chain().zipObject(arrayOfValues); + result = _(arrayOfKeys).chain().zipObjectDeep(arrayOfValues); result = _(arrayOfKeys).chain().zipObject(listOfValues); + result = _(arrayOfKeys).chain().zipObjectDeep(listOfValues); result = _(listOfKeys).chain().zipObject(); + result = _(listOfKeys).chain().zipObjectDeep(); result = _(listOfKeys).chain().zipObject(listOfValues); + result = _(listOfKeys).chain().zipObjectDeep(listOfValues); result = _(listOfKeys).chain().zipObject(arrayOfValues); + result = _(listOfKeys).chain().zipObjectDeep(arrayOfValues); result = _(listOfKeys).chain().zipObject(arrayOfKeyValuePairs); + result = _(listOfKeys).chain().zipObjectDeep(arrayOfKeyValuePairs); result = _(listOfKeys).chain().zipObject(listOfKeyValuePairs); + result = _(listOfKeys).chain().zipObjectDeep(listOfKeyValuePairs); } } @@ -2702,7 +2717,7 @@ namespace TestZipObject { interface TestZipWithFn { (a1: number, a2: number): number; } -var testZipWithFn: TestZipWithFn; +let testZipWithFn: TestZipWithFn; result = _.zipWith([1, 2]); result = _.zipWith([1, 2], testZipWithFn); result = _.zipWith([1, 2], [1, 2], testZipWithFn); @@ -5209,7 +5224,6 @@ result = _.sortBy(stoogesAges, 'name', stooge => Math.sin(stooge. result = _(foodsOrganic).sortBy('organic', (food) => food.name, { organic: true }).value(); - // _.orderBy namespace TestorderBy { type SampleObject = {a: number; b: string; c: boolean}; @@ -5533,7 +5547,7 @@ namespace TestBindAll { // _.bindKey namespace TestBindKey { let object: { - foo: (a: number, b: string) => boolean; + foo(a: number, b: string): boolean; } { @@ -5612,14 +5626,14 @@ namespace TestBindKey { } } -var createCallbackObj: { [index: string]: string; } = { name: 'Joe' }; +const createCallbackObj: { [index: string]: string; } = { name: 'Joe' }; result = <() => any>_.createCallback('name'); result = <() => boolean>_.createCallback(createCallbackObj); result = <_.LoDashImplicitObjectWrapper<() => any>>_('name').createCallback(); result = <_.LoDashImplicitObjectWrapper<() => boolean>>_(createCallbackObj).createCallback(); // _.curry -var testCurryFn = (a: number, b: number, c: number) => [a, b, c]; +const testCurryFn = (a: number, b: number, c: number) => [a, b, c]; let curryResult0: number[] let curryResult1: _.CurriedFunction1 let curryResult2: _.CurriedFunction2 @@ -5650,7 +5664,7 @@ curryResult5 = _.curry(testCurry2)("1"); curryResult6 = _.curry(testCurry2); // _.curryRight -var testCurryRightFn = (a: number, b: number, c: number) => [a, b, c]; +const testCurryRightFn = (a: number, b: number, c: number) => [a, b, c]; curryResult0 = _.curryRight(testCurryRightFn)(1, 2, 3); curryResult2 = _.curryRight(testCurryRightFn)(1); curryResult0 = _(testCurryRightFn).curryRight().value()(1, 2, 3); @@ -5996,7 +6010,7 @@ namespace TestNegate { (a1: number, a2: number): boolean; } - var predicate = (a1: number, a2: number) => a1 > a2; + const predicate = (a1: number, a2: number) => a1 > a2; { let result: ResultFn; @@ -6047,14 +6061,13 @@ namespace TestOnce { } } -var greetPartial = (greeting: string, name: string) => greeting + ' ' + name; -var hi = _.partial(greetPartial, 'hi'); +const greetPartial = (greeting: string, name: string) => greeting + ' ' + name; +const hi = _.partial(greetPartial, 'hi'); hi('moe'); +const defaultsDeep = _.partialRight(_.merge, _.defaults); -var defaultsDeep = _.partialRight(_.merge, _.defaults); - -var optionsPartialRight = { +const optionsPartialRight = { 'variable': 'data', 'imports': { 'jq': $ } }; @@ -6062,7 +6075,7 @@ var optionsPartialRight = { defaultsDeep(optionsPartialRight, _.templateSettings); //_.rearg -var testReargFn = (a: string, b: string, c: string) => [a, b, c]; +const testReargFn = (a: string, b: string, c: string) => [a, b, c]; interface TestReargResultFn { (b: string, c: string, a: string): string[]; } @@ -7102,7 +7115,6 @@ namespace TestIsMatch { result = _({}).isMatch({}); } - // _.isMatchWith namespace TestIsMatchWith { let testIsMatchCustiomizerFn: (value: any, other: any, indexOrKey: number|string) => boolean; @@ -7111,7 +7123,6 @@ namespace TestIsMatchWith { result = _.isMatchWith({}, {}, testIsMatchCustiomizerFn); result = _({}).isMatchWith({}, testIsMatchCustiomizerFn); - } // _.isNaN @@ -7634,7 +7645,6 @@ namespace TestToArray { // _.toPlainObject namespace TestToPlainObject { - { let result: TResult; result = _.toPlainObject(); @@ -7877,7 +7887,6 @@ namespace TestMean { result = _.mean(array); result = _(array).mean(); - } // _.min @@ -7892,7 +7901,6 @@ namespace TestMin { result = _(array).min(); result = _(list).min(); - } // _.minBy @@ -8634,7 +8642,6 @@ namespace TestCreate { } } - // _.defaults namespace TestDefaults { interface Obj { a: string }; @@ -8767,12 +8774,11 @@ interface DefaultsDeepResult { age: number; } } -var TestDefaultsDeepObject = { 'user': { 'name': 'barney' } }; -var TestDefaultsDeepSource = { 'user': { 'name': 'fred', 'age': 36 } }; +const TestDefaultsDeepObject = { 'user': { 'name': 'barney' } }; +const TestDefaultsDeepSource = { 'user': { 'name': 'fred', 'age': 36 } }; result = _.defaultsDeep(TestDefaultsDeepObject, TestDefaultsDeepSource); result = _(TestDefaultsDeepObject).defaultsDeep(TestDefaultsDeepSource).value(); - // _.extend namespace TestExtend { type Obj = { a: string }; @@ -8900,7 +8906,6 @@ namespace TestExtend { } } - // _.extendWith namespace TestExtendWith { type Obj = { a: string }; @@ -9038,7 +9043,6 @@ namespace TestFindKey { result = _.findKey<{a: string;}>({a: ''}, predicateFn); - result = _.findKey<{a: string;}>({a: ''}, ''); result = _.findKey<{a: number;}, {a: string;}>({a: ''}, {a: 42}); @@ -9047,7 +9051,6 @@ namespace TestFindKey { result = _<{a: string;}>({a: ''}).findKey(predicateFn); - result = _<{a: string;}>({a: ''}).findKey(''); result = _<{a: string;}>({a: ''}).findKey<{a: number;}>({a: 42}); @@ -9070,7 +9073,6 @@ namespace TestFindKey { result = _<{a: string;}>({a: ''}).chain().findKey(predicateFn); - result = _<{a: string;}>({a: ''}).chain().findKey(''); result = _<{a: string;}>({a: ''}).chain().findKey<{a: number;}>({a: 42}); @@ -9094,7 +9096,6 @@ namespace TestFindLastKey { result = _.findLastKey<{a: string;}>({a: ''}, predicateFn); - result = _.findLastKey<{a: string;}>({a: ''}, ''); result = _.findLastKey<{a: number;}, {a: string;}>({a: ''}, {a: 42}); @@ -9103,7 +9104,6 @@ namespace TestFindLastKey { result = _<{a: string;}>({a: ''}).findLastKey(predicateFn); - result = _<{a: string;}>({a: ''}).findLastKey(''); result = _<{a: string;}>({a: ''}).findLastKey<{a: number;}>({a: 42}); @@ -9126,7 +9126,6 @@ namespace TestFindLastKey { result = _<{a: string;}>({a: ''}).chain().findLastKey(predicateFn); - result = _<{a: string;}>({a: ''}).chain().findLastKey(''); result = _<{a: string;}>({a: ''}).chain().findLastKey<{a: number;}>({a: 42}); @@ -9733,8 +9732,8 @@ namespace TestMerge { type InitialValue = { a : number }; type MergingValue = { b : string }; - var initialValue = { a : 1 }; - var mergingValue = { b : "hi" }; + const initialValue = { a : 1 }; + const mergingValue = { b : "hi" }; type ExpectedResult = { a: number, b: string }; let result: ExpectedResult; @@ -9752,10 +9751,9 @@ namespace TestMerge { // Once we get to the varargs version, you have to specify the result explicitly result = _.merge(initialValue, {}, {}, {}, {}, mergingValue); - type ComplicatedExpectedType = { a: number, b: string, c: {}, d: number[], e: boolean }; - var complicatedResult: ComplicatedExpectedType = _.merge({ a: 1 }, + let complicatedResult: ComplicatedExpectedType = _.merge({ a: 1 }, { b: "string" }, { c: {} }, { d: [1] }, @@ -9764,7 +9762,7 @@ namespace TestMerge { type ExpectedTypeAfterOverriding = { a: boolean }; - var overriddenResult: ExpectedTypeAfterOverriding = _.merge({ a: 1 }, + let overriddenResult: ExpectedTypeAfterOverriding = _.merge({ a: 1 }, { a: "string" }, { a: {} }, { a: [1] }, @@ -9785,14 +9783,14 @@ namespace TestMerge { // Test complex multiple combinations with chaining - var complicatedResult: ComplicatedExpectedType = _({ a: 1 }).merge({ b: "string" }, + complicatedResult = _({ a: 1 }).merge({ b: "string" }, { c: {} }, { d: [1] }, { e: true }).value(); // Test for type overriding with chaining - var overriddenResult: ExpectedTypeAfterOverriding = _({ a: 1 }).merge({ a: "string" }, + overriddenResult = _({ a: 1 }).merge({ a: "string" }, { a: {} }, { a: [1] }, { a: true }).value(); @@ -9824,8 +9822,8 @@ namespace TestMergeWith { type InitialValue = { a : number }; type MergingValue = { b : string }; - var initialValue = { a : 1 }; - var mergingValue = { b : "hi" }; + const initialValue = { a : 1 }; + const mergingValue = { b : "hi" }; type ExpectedResult = { a: number, b: string }; let result: ExpectedResult; @@ -10176,37 +10174,37 @@ namespace TestToPairs { let object: _.Dictionary; { - let result: any[][]; + let result: [string, any][]; result = _.toPairs<_.Dictionary>(object); } { - let result: string[][]; + let result: [string, string][]; result = _.toPairs<_.Dictionary, string>(object); } { - let result: _.LoDashImplicitArrayWrapper; + let result: _.LoDashImplicitArrayWrapper<[string, string]>; result = _(object).toPairs(); } { - let result: _.LoDashImplicitArrayWrapper; + let result: _.LoDashImplicitArrayWrapper<[string, any]>; result = _(object).toPairs(); } { - let result: _.LoDashExplicitArrayWrapper; + let result: _.LoDashExplicitArrayWrapper<[string, string]>; result = _(object).chain().toPairs(); } { - let result: _.LoDashExplicitArrayWrapper; + let result: _.LoDashExplicitArrayWrapper<[string, any]>; result = _(object).chain().toPairs(); } @@ -10217,37 +10215,37 @@ namespace TestToPairsIn { let object: _.Dictionary; { - let result: any[][]; + let result: [string, any][]; result = _.toPairsIn<_.Dictionary>(object); } { - let result: string[][]; + let result: [string, string][]; result = _.toPairsIn<_.Dictionary, string>(object); } { - let result: _.LoDashImplicitArrayWrapper; + let result: _.LoDashImplicitArrayWrapper<[string, string]>; result = _(object).toPairsIn(); } { - let result: _.LoDashImplicitArrayWrapper; + let result: _.LoDashImplicitArrayWrapper<[string, any]>; result = _(object).toPairsIn(); } { - let result: _.LoDashExplicitArrayWrapper; + let result: _.LoDashExplicitArrayWrapper<[string, string]>; result = _(object).chain().toPairsIn(); } { - let result: _.LoDashExplicitArrayWrapper; + let result: _.LoDashExplicitArrayWrapper<[string, any]>; result = _(object).chain().toPairs(); } @@ -11115,7 +11113,6 @@ namespace TestUnescape { } } - // _.upperCase namespace TestUpperCase { { @@ -11387,7 +11384,6 @@ namespace TestDefaultTo { result = _(null).chain().defaultTo({a : 'a'}); result = _(NaN).chain().defaultTo({a : 'a'}); } - } // _.identity @@ -11643,7 +11639,7 @@ namespace TestMethod { // _.methodOf namespace TestMethodOf { - type SampleObject = {a: {b: () => TResult}[]}; + type SampleObject = { a: { b(): TResult }[] }; type ResultFn = (path: _.StringRepresentable|_.StringRepresentable[]) => TResult; let object: SampleObject; diff --git a/types/lodash/lowerCase/index.d.ts b/types/lodash/lowerCase/index.d.ts index 0f949d854d..792ecb2fca 100644 --- a/types/lodash/lowerCase/index.d.ts +++ b/types/lodash/lowerCase/index.d.ts @@ -1,2 +1,2 @@ import { lowerCase } from "../index"; -export = lowerCase; \ No newline at end of file +export = lowerCase; diff --git a/types/lodash/lowerFirst/index.d.ts b/types/lodash/lowerFirst/index.d.ts index ef7f89f0ad..57d5a9c60e 100644 --- a/types/lodash/lowerFirst/index.d.ts +++ b/types/lodash/lowerFirst/index.d.ts @@ -1,2 +1,2 @@ import { lowerFirst } from "../index"; -export = lowerFirst; \ No newline at end of file +export = lowerFirst; diff --git a/types/lodash/lt/index.d.ts b/types/lodash/lt/index.d.ts index 827f2ea49a..483de251ea 100644 --- a/types/lodash/lt/index.d.ts +++ b/types/lodash/lt/index.d.ts @@ -1,2 +1,2 @@ import { lt } from "../index"; -export = lt; \ No newline at end of file +export = lt; diff --git a/types/lodash/lte/index.d.ts b/types/lodash/lte/index.d.ts index 095b471f0b..62e11824f5 100644 --- a/types/lodash/lte/index.d.ts +++ b/types/lodash/lte/index.d.ts @@ -1,2 +1,2 @@ import { lte } from "../index"; -export = lte; \ No newline at end of file +export = lte; diff --git a/types/lodash/map/index.d.ts b/types/lodash/map/index.d.ts index caf04d4309..055e43250f 100644 --- a/types/lodash/map/index.d.ts +++ b/types/lodash/map/index.d.ts @@ -1,2 +1,2 @@ import { map } from "../index"; -export = map; \ No newline at end of file +export = map; diff --git a/types/lodash/mapKeys/index.d.ts b/types/lodash/mapKeys/index.d.ts index c30ea40d4a..b830255f5e 100644 --- a/types/lodash/mapKeys/index.d.ts +++ b/types/lodash/mapKeys/index.d.ts @@ -1,2 +1,2 @@ import { mapKeys } from "../index"; -export = mapKeys; \ No newline at end of file +export = mapKeys; diff --git a/types/lodash/mapValues/index.d.ts b/types/lodash/mapValues/index.d.ts index 01d43efac4..60df8d2502 100644 --- a/types/lodash/mapValues/index.d.ts +++ b/types/lodash/mapValues/index.d.ts @@ -1,2 +1,2 @@ import { mapValues } from "../index"; -export = mapValues; \ No newline at end of file +export = mapValues; diff --git a/types/lodash/matches/index.d.ts b/types/lodash/matches/index.d.ts index 320bcb1a15..bd88217869 100644 --- a/types/lodash/matches/index.d.ts +++ b/types/lodash/matches/index.d.ts @@ -1,2 +1,2 @@ import { matches } from "../index"; -export = matches; \ No newline at end of file +export = matches; diff --git a/types/lodash/matchesProperty/index.d.ts b/types/lodash/matchesProperty/index.d.ts index 58a98d9619..342aa1c70f 100644 --- a/types/lodash/matchesProperty/index.d.ts +++ b/types/lodash/matchesProperty/index.d.ts @@ -1,2 +1,2 @@ import { matchesProperty } from "../index"; -export = matchesProperty; \ No newline at end of file +export = matchesProperty; diff --git a/types/lodash/max/index.d.ts b/types/lodash/max/index.d.ts index d532530e30..8bce255b0e 100644 --- a/types/lodash/max/index.d.ts +++ b/types/lodash/max/index.d.ts @@ -1,2 +1,2 @@ import { max } from "../index"; -export = max; \ No newline at end of file +export = max; diff --git a/types/lodash/maxBy/index.d.ts b/types/lodash/maxBy/index.d.ts index 2a8f023c94..2a3f4f9e18 100644 --- a/types/lodash/maxBy/index.d.ts +++ b/types/lodash/maxBy/index.d.ts @@ -1,2 +1,2 @@ import { maxBy } from "../index"; -export = maxBy; \ No newline at end of file +export = maxBy; diff --git a/types/lodash/mean/index.d.ts b/types/lodash/mean/index.d.ts index 21e660ab51..0265e22a76 100644 --- a/types/lodash/mean/index.d.ts +++ b/types/lodash/mean/index.d.ts @@ -1,2 +1,2 @@ import { mean } from "../index"; -export = mean; \ No newline at end of file +export = mean; diff --git a/types/lodash/meanBy/index.d.ts b/types/lodash/meanBy/index.d.ts index e4651a4412..58b90c7694 100644 --- a/types/lodash/meanBy/index.d.ts +++ b/types/lodash/meanBy/index.d.ts @@ -1,2 +1,2 @@ import { meanBy } from "../index"; -export = meanBy; \ No newline at end of file +export = meanBy; diff --git a/types/lodash/memoize/index.d.ts b/types/lodash/memoize/index.d.ts index 676d3c7884..ce92f6eba1 100644 --- a/types/lodash/memoize/index.d.ts +++ b/types/lodash/memoize/index.d.ts @@ -1,2 +1,2 @@ import { memoize } from "../index"; -export = memoize; \ No newline at end of file +export = memoize; diff --git a/types/lodash/merge/index.d.ts b/types/lodash/merge/index.d.ts index 5e3ac2b3e1..a2d07fa045 100644 --- a/types/lodash/merge/index.d.ts +++ b/types/lodash/merge/index.d.ts @@ -1,2 +1,2 @@ import { merge } from "../index"; -export = merge; \ No newline at end of file +export = merge; diff --git a/types/lodash/mergeWith/index.d.ts b/types/lodash/mergeWith/index.d.ts index 3141da1f87..bd7b7b2be7 100644 --- a/types/lodash/mergeWith/index.d.ts +++ b/types/lodash/mergeWith/index.d.ts @@ -1,2 +1,2 @@ import { mergeWith } from "../index"; -export = mergeWith; \ No newline at end of file +export = mergeWith; diff --git a/types/lodash/method/index.d.ts b/types/lodash/method/index.d.ts index a2efc6992c..38b265b19a 100644 --- a/types/lodash/method/index.d.ts +++ b/types/lodash/method/index.d.ts @@ -1,2 +1,2 @@ import { method } from "../index"; -export = method; \ No newline at end of file +export = method; diff --git a/types/lodash/methodOf/index.d.ts b/types/lodash/methodOf/index.d.ts index 74c092ea97..817f1518b2 100644 --- a/types/lodash/methodOf/index.d.ts +++ b/types/lodash/methodOf/index.d.ts @@ -1,2 +1,2 @@ import { methodOf } from "../index"; -export = methodOf; \ No newline at end of file +export = methodOf; diff --git a/types/lodash/min/index.d.ts b/types/lodash/min/index.d.ts index 9289b95bbc..1b51b9d6de 100644 --- a/types/lodash/min/index.d.ts +++ b/types/lodash/min/index.d.ts @@ -1,2 +1,2 @@ import { min } from "../index"; -export = min; \ No newline at end of file +export = min; diff --git a/types/lodash/minBy/index.d.ts b/types/lodash/minBy/index.d.ts index 703e8cbf58..4c4b8fb3ae 100644 --- a/types/lodash/minBy/index.d.ts +++ b/types/lodash/minBy/index.d.ts @@ -1,2 +1,2 @@ import { minBy } from "../index"; -export = minBy; \ No newline at end of file +export = minBy; diff --git a/types/lodash/mixin/index.d.ts b/types/lodash/mixin/index.d.ts index fedace0795..7bd81f8005 100644 --- a/types/lodash/mixin/index.d.ts +++ b/types/lodash/mixin/index.d.ts @@ -1,2 +1,2 @@ import { mixin } from "../index"; -export = mixin; \ No newline at end of file +export = mixin; diff --git a/types/lodash/negate/index.d.ts b/types/lodash/negate/index.d.ts index 7020b8f0b1..e538c5cd67 100644 --- a/types/lodash/negate/index.d.ts +++ b/types/lodash/negate/index.d.ts @@ -1,2 +1,2 @@ import { negate } from "../index"; -export = negate; \ No newline at end of file +export = negate; diff --git a/types/lodash/noConflict/index.d.ts b/types/lodash/noConflict/index.d.ts index 1b38b9d530..228f39cae5 100644 --- a/types/lodash/noConflict/index.d.ts +++ b/types/lodash/noConflict/index.d.ts @@ -1,2 +1,2 @@ import { noConflict } from "../index"; -export = noConflict; \ No newline at end of file +export = noConflict; diff --git a/types/lodash/noop/index.d.ts b/types/lodash/noop/index.d.ts index 0ce69cbefa..eb4a36bb7c 100644 --- a/types/lodash/noop/index.d.ts +++ b/types/lodash/noop/index.d.ts @@ -1,2 +1,2 @@ import { noop } from "../index"; -export = noop; \ No newline at end of file +export = noop; diff --git a/types/lodash/now/index.d.ts b/types/lodash/now/index.d.ts index 8f81c014af..b603059fb5 100644 --- a/types/lodash/now/index.d.ts +++ b/types/lodash/now/index.d.ts @@ -1,2 +1,2 @@ import { now } from "../index"; -export = now; \ No newline at end of file +export = now; diff --git a/types/lodash/nth/index.d.ts b/types/lodash/nth/index.d.ts index afbe952398..709c6df8b5 100644 --- a/types/lodash/nth/index.d.ts +++ b/types/lodash/nth/index.d.ts @@ -1,2 +1,2 @@ import { nth } from "../index"; -export = nth; \ No newline at end of file +export = nth; diff --git a/types/lodash/nthArg/index.d.ts b/types/lodash/nthArg/index.d.ts index d2b699e32a..9fd0b4540c 100644 --- a/types/lodash/nthArg/index.d.ts +++ b/types/lodash/nthArg/index.d.ts @@ -1,2 +1,2 @@ import { nthArg } from "../index"; -export = nthArg; \ No newline at end of file +export = nthArg; diff --git a/types/lodash/omit/index.d.ts b/types/lodash/omit/index.d.ts index c474c36895..3c92d6293e 100644 --- a/types/lodash/omit/index.d.ts +++ b/types/lodash/omit/index.d.ts @@ -1,2 +1,2 @@ import { omit } from "../index"; -export = omit; \ No newline at end of file +export = omit; diff --git a/types/lodash/omitBy/index.d.ts b/types/lodash/omitBy/index.d.ts index f91e134545..d92d14852e 100644 --- a/types/lodash/omitBy/index.d.ts +++ b/types/lodash/omitBy/index.d.ts @@ -1,2 +1,2 @@ import { omitBy } from "../index"; -export = omitBy; \ No newline at end of file +export = omitBy; diff --git a/types/lodash/once/index.d.ts b/types/lodash/once/index.d.ts index eca2c3fbc0..369fcc08ac 100644 --- a/types/lodash/once/index.d.ts +++ b/types/lodash/once/index.d.ts @@ -1,2 +1,2 @@ import { once } from "../index"; -export = once; \ No newline at end of file +export = once; diff --git a/types/lodash/orderBy/index.d.ts b/types/lodash/orderBy/index.d.ts index 9283bbba9e..57dc0723d8 100644 --- a/types/lodash/orderBy/index.d.ts +++ b/types/lodash/orderBy/index.d.ts @@ -1,2 +1,2 @@ import { orderBy } from "../index"; -export = orderBy; \ No newline at end of file +export = orderBy; diff --git a/types/lodash/over/index.d.ts b/types/lodash/over/index.d.ts index 631a2a3cc3..0f92ad9429 100644 --- a/types/lodash/over/index.d.ts +++ b/types/lodash/over/index.d.ts @@ -1,2 +1,2 @@ import { over } from "../index"; -export = over; \ No newline at end of file +export = over; diff --git a/types/lodash/overArgs/index.d.ts b/types/lodash/overArgs/index.d.ts index aa8cf236e8..07f93f9698 100644 --- a/types/lodash/overArgs/index.d.ts +++ b/types/lodash/overArgs/index.d.ts @@ -1,2 +1,2 @@ import { overArgs } from "../index"; -export = overArgs; \ No newline at end of file +export = overArgs; diff --git a/types/lodash/overEvery/index.d.ts b/types/lodash/overEvery/index.d.ts index d0fa45c9d3..8533d45602 100644 --- a/types/lodash/overEvery/index.d.ts +++ b/types/lodash/overEvery/index.d.ts @@ -1,2 +1,2 @@ import { overEvery } from "../index"; -export = overEvery; \ No newline at end of file +export = overEvery; diff --git a/types/lodash/overSome/index.d.ts b/types/lodash/overSome/index.d.ts index 3bc6bfff2b..5d27576568 100644 --- a/types/lodash/overSome/index.d.ts +++ b/types/lodash/overSome/index.d.ts @@ -1,2 +1,2 @@ import { overSome } from "../index"; -export = overSome; \ No newline at end of file +export = overSome; diff --git a/types/lodash/pad/index.d.ts b/types/lodash/pad/index.d.ts index 331e55c5cf..00cd386111 100644 --- a/types/lodash/pad/index.d.ts +++ b/types/lodash/pad/index.d.ts @@ -1,2 +1,2 @@ import { pad } from "../index"; -export = pad; \ No newline at end of file +export = pad; diff --git a/types/lodash/padEnd/index.d.ts b/types/lodash/padEnd/index.d.ts index 2223f7a60e..6cc4425148 100644 --- a/types/lodash/padEnd/index.d.ts +++ b/types/lodash/padEnd/index.d.ts @@ -1,2 +1,2 @@ import { padEnd } from "../index"; -export = padEnd; \ No newline at end of file +export = padEnd; diff --git a/types/lodash/padStart/index.d.ts b/types/lodash/padStart/index.d.ts index 1c3da5ff91..e2d9f9bf86 100644 --- a/types/lodash/padStart/index.d.ts +++ b/types/lodash/padStart/index.d.ts @@ -1,2 +1,2 @@ import { padStart } from "../index"; -export = padStart; \ No newline at end of file +export = padStart; diff --git a/types/lodash/parseInt/index.d.ts b/types/lodash/parseInt/index.d.ts index 47ec8282b4..8efd3cb6fc 100644 --- a/types/lodash/parseInt/index.d.ts +++ b/types/lodash/parseInt/index.d.ts @@ -1,2 +1,2 @@ import { parseInt } from "../index"; -export = parseInt; \ No newline at end of file +export = parseInt; diff --git a/types/lodash/partial/index.d.ts b/types/lodash/partial/index.d.ts index 3b32f1d962..8c7ee10740 100644 --- a/types/lodash/partial/index.d.ts +++ b/types/lodash/partial/index.d.ts @@ -1,2 +1,2 @@ import { partial } from "../index"; -export = partial; \ No newline at end of file +export = partial; diff --git a/types/lodash/partialRight/index.d.ts b/types/lodash/partialRight/index.d.ts index d13a6c73d3..c6f1c8acde 100644 --- a/types/lodash/partialRight/index.d.ts +++ b/types/lodash/partialRight/index.d.ts @@ -1,2 +1,2 @@ import { partialRight } from "../index"; -export = partialRight; \ No newline at end of file +export = partialRight; diff --git a/types/lodash/partition/index.d.ts b/types/lodash/partition/index.d.ts index 3bd1cd7715..1cd0cc12b3 100644 --- a/types/lodash/partition/index.d.ts +++ b/types/lodash/partition/index.d.ts @@ -1,2 +1,2 @@ import { partition } from "../index"; -export = partition; \ No newline at end of file +export = partition; diff --git a/types/lodash/pick/index.d.ts b/types/lodash/pick/index.d.ts index 287e6bfd66..33d5b2fbe0 100644 --- a/types/lodash/pick/index.d.ts +++ b/types/lodash/pick/index.d.ts @@ -1,2 +1,2 @@ import { pick } from "../index"; -export = pick; \ No newline at end of file +export = pick; diff --git a/types/lodash/pickBy/index.d.ts b/types/lodash/pickBy/index.d.ts index 92da32054a..7b4da3a299 100644 --- a/types/lodash/pickBy/index.d.ts +++ b/types/lodash/pickBy/index.d.ts @@ -1,2 +1,2 @@ import { pickBy } from "../index"; -export = pickBy; \ No newline at end of file +export = pickBy; diff --git a/types/lodash/property/index.d.ts b/types/lodash/property/index.d.ts index d57f4d0775..99d8057c4f 100644 --- a/types/lodash/property/index.d.ts +++ b/types/lodash/property/index.d.ts @@ -1,2 +1,2 @@ import { property } from "../index"; -export = property; \ No newline at end of file +export = property; diff --git a/types/lodash/propertyOf/index.d.ts b/types/lodash/propertyOf/index.d.ts index b10c8ebd0c..68e4a6ae85 100644 --- a/types/lodash/propertyOf/index.d.ts +++ b/types/lodash/propertyOf/index.d.ts @@ -1,2 +1,2 @@ import { propertyOf } from "../index"; -export = propertyOf; \ No newline at end of file +export = propertyOf; diff --git a/types/lodash/pull/index.d.ts b/types/lodash/pull/index.d.ts index 7716f98234..69696c43e1 100644 --- a/types/lodash/pull/index.d.ts +++ b/types/lodash/pull/index.d.ts @@ -1,2 +1,2 @@ import { pull } from "../index"; -export = pull; \ No newline at end of file +export = pull; diff --git a/types/lodash/pullAll/index.d.ts b/types/lodash/pullAll/index.d.ts index f39bbd2db7..32aa606b03 100644 --- a/types/lodash/pullAll/index.d.ts +++ b/types/lodash/pullAll/index.d.ts @@ -1,2 +1,2 @@ import { pullAll } from "../index"; -export = pullAll; \ No newline at end of file +export = pullAll; diff --git a/types/lodash/pullAllBy/index.d.ts b/types/lodash/pullAllBy/index.d.ts index acd205768b..4b8ff6da5b 100644 --- a/types/lodash/pullAllBy/index.d.ts +++ b/types/lodash/pullAllBy/index.d.ts @@ -1,2 +1,2 @@ import { pullAllBy } from "../index"; -export = pullAllBy; \ No newline at end of file +export = pullAllBy; diff --git a/types/lodash/pullAt/index.d.ts b/types/lodash/pullAt/index.d.ts index a036de7324..3019515a8e 100644 --- a/types/lodash/pullAt/index.d.ts +++ b/types/lodash/pullAt/index.d.ts @@ -1,2 +1,2 @@ import { pullAt } from "../index"; -export = pullAt; \ No newline at end of file +export = pullAt; diff --git a/types/lodash/random/index.d.ts b/types/lodash/random/index.d.ts index 5d9cfe9102..7116b7df74 100644 --- a/types/lodash/random/index.d.ts +++ b/types/lodash/random/index.d.ts @@ -1,2 +1,2 @@ import { random } from "../index"; -export = random; \ No newline at end of file +export = random; diff --git a/types/lodash/range/index.d.ts b/types/lodash/range/index.d.ts index 3cbc7f9937..ba9ec7c4e2 100644 --- a/types/lodash/range/index.d.ts +++ b/types/lodash/range/index.d.ts @@ -1,2 +1,2 @@ import { range } from "../index"; -export = range; \ No newline at end of file +export = range; diff --git a/types/lodash/rangeRight/index.d.ts b/types/lodash/rangeRight/index.d.ts index 19d62a7b10..7cead2895f 100644 --- a/types/lodash/rangeRight/index.d.ts +++ b/types/lodash/rangeRight/index.d.ts @@ -1,2 +1,2 @@ import { rangeRight } from "../index"; -export = rangeRight; \ No newline at end of file +export = rangeRight; diff --git a/types/lodash/rearg/index.d.ts b/types/lodash/rearg/index.d.ts index 2553b2243a..9fd61a68e0 100644 --- a/types/lodash/rearg/index.d.ts +++ b/types/lodash/rearg/index.d.ts @@ -1,2 +1,2 @@ import { rearg } from "../index"; -export = rearg; \ No newline at end of file +export = rearg; diff --git a/types/lodash/reduce/index.d.ts b/types/lodash/reduce/index.d.ts index 3e4af8bdc1..0137ae329d 100644 --- a/types/lodash/reduce/index.d.ts +++ b/types/lodash/reduce/index.d.ts @@ -1,2 +1,2 @@ import { reduce } from "../index"; -export = reduce; \ No newline at end of file +export = reduce; diff --git a/types/lodash/reduceRight/index.d.ts b/types/lodash/reduceRight/index.d.ts index f0dbae92a0..4853cbd33f 100644 --- a/types/lodash/reduceRight/index.d.ts +++ b/types/lodash/reduceRight/index.d.ts @@ -1,2 +1,2 @@ import { reduceRight } from "../index"; -export = reduceRight; \ No newline at end of file +export = reduceRight; diff --git a/types/lodash/reject/index.d.ts b/types/lodash/reject/index.d.ts index 6088450a69..a3829a3781 100644 --- a/types/lodash/reject/index.d.ts +++ b/types/lodash/reject/index.d.ts @@ -1,2 +1,2 @@ import { reject } from "../index"; -export = reject; \ No newline at end of file +export = reject; diff --git a/types/lodash/remove/index.d.ts b/types/lodash/remove/index.d.ts index 7b5726e971..75f0141175 100644 --- a/types/lodash/remove/index.d.ts +++ b/types/lodash/remove/index.d.ts @@ -1,2 +1,2 @@ import { remove } from "../index"; -export = remove; \ No newline at end of file +export = remove; diff --git a/types/lodash/repeat/index.d.ts b/types/lodash/repeat/index.d.ts index 9cd920ba5d..9c8b314c7d 100644 --- a/types/lodash/repeat/index.d.ts +++ b/types/lodash/repeat/index.d.ts @@ -1,2 +1,2 @@ import { repeat } from "../index"; -export = repeat; \ No newline at end of file +export = repeat; diff --git a/types/lodash/replace/index.d.ts b/types/lodash/replace/index.d.ts index ba0c9e6a96..7ca7a89276 100644 --- a/types/lodash/replace/index.d.ts +++ b/types/lodash/replace/index.d.ts @@ -1,2 +1,2 @@ import { replace } from "../index"; -export = replace; \ No newline at end of file +export = replace; diff --git a/types/lodash/rest/index.d.ts b/types/lodash/rest/index.d.ts index f8a93de5d8..482d23ae13 100644 --- a/types/lodash/rest/index.d.ts +++ b/types/lodash/rest/index.d.ts @@ -1,2 +1,2 @@ import { rest } from "../index"; -export = rest; \ No newline at end of file +export = rest; diff --git a/types/lodash/result/index.d.ts b/types/lodash/result/index.d.ts index a2d1f8b511..86677691e2 100644 --- a/types/lodash/result/index.d.ts +++ b/types/lodash/result/index.d.ts @@ -1,2 +1,2 @@ import { result } from "../index"; -export = result; \ No newline at end of file +export = result; diff --git a/types/lodash/reverse/index.d.ts b/types/lodash/reverse/index.d.ts index e689c4b0eb..47783137c1 100644 --- a/types/lodash/reverse/index.d.ts +++ b/types/lodash/reverse/index.d.ts @@ -1,2 +1,2 @@ import { reverse } from "../index"; -export = reverse; \ No newline at end of file +export = reverse; diff --git a/types/lodash/round/index.d.ts b/types/lodash/round/index.d.ts index e369276c67..84d6bb4646 100644 --- a/types/lodash/round/index.d.ts +++ b/types/lodash/round/index.d.ts @@ -1,2 +1,2 @@ import { round } from "../index"; -export = round; \ No newline at end of file +export = round; diff --git a/types/lodash/runInContext/index.d.ts b/types/lodash/runInContext/index.d.ts index b6b9ca8883..4d14f9de1f 100644 --- a/types/lodash/runInContext/index.d.ts +++ b/types/lodash/runInContext/index.d.ts @@ -1,2 +1,2 @@ import { runInContext } from "../index"; -export = runInContext; \ No newline at end of file +export = runInContext; diff --git a/types/lodash/sample/index.d.ts b/types/lodash/sample/index.d.ts index c3097d2b67..9c73951cb9 100644 --- a/types/lodash/sample/index.d.ts +++ b/types/lodash/sample/index.d.ts @@ -1,2 +1,2 @@ import { sample } from "../index"; -export = sample; \ No newline at end of file +export = sample; diff --git a/types/lodash/sampleSize/index.d.ts b/types/lodash/sampleSize/index.d.ts index 77208b933c..0f4b02cd60 100644 --- a/types/lodash/sampleSize/index.d.ts +++ b/types/lodash/sampleSize/index.d.ts @@ -1,2 +1,2 @@ import { sampleSize } from "../index"; -export = sampleSize; \ No newline at end of file +export = sampleSize; diff --git a/types/lodash/scripts/generate-modules.ts b/types/lodash/scripts/generate-modules.ts index 3bc3190f85..69b8e178b0 100644 --- a/types/lodash/scripts/generate-modules.ts +++ b/types/lodash/scripts/generate-modules.ts @@ -23,7 +23,7 @@ async function main() { // Generate local module const localDir = path.join("..", module); ensureDir(localDir); - fs.writeFileSync(path.join(localDir, "index.d.ts"), `import { ${module} } from "../index";\nexport = ${module};`); + fs.writeFileSync(path.join(localDir, "index.d.ts"), `import { ${module} } from "../index";\nexport = ${module};\n`); // Generate non-local module if (!notOnNpm.has(module)) { diff --git a/types/lodash/set/index.d.ts b/types/lodash/set/index.d.ts index d5b68f01d8..8a61f06eaa 100644 --- a/types/lodash/set/index.d.ts +++ b/types/lodash/set/index.d.ts @@ -1,2 +1,2 @@ import { set } from "../index"; -export = set; \ No newline at end of file +export = set; diff --git a/types/lodash/setWith/index.d.ts b/types/lodash/setWith/index.d.ts index 8c4353054c..358eab644e 100644 --- a/types/lodash/setWith/index.d.ts +++ b/types/lodash/setWith/index.d.ts @@ -1,2 +1,2 @@ import { setWith } from "../index"; -export = setWith; \ No newline at end of file +export = setWith; diff --git a/types/lodash/shuffle/index.d.ts b/types/lodash/shuffle/index.d.ts index 50f7fafddd..161b303cc6 100644 --- a/types/lodash/shuffle/index.d.ts +++ b/types/lodash/shuffle/index.d.ts @@ -1,2 +1,2 @@ import { shuffle } from "../index"; -export = shuffle; \ No newline at end of file +export = shuffle; diff --git a/types/lodash/size/index.d.ts b/types/lodash/size/index.d.ts index cec775d6b4..8880bf0192 100644 --- a/types/lodash/size/index.d.ts +++ b/types/lodash/size/index.d.ts @@ -1,2 +1,2 @@ import { size } from "../index"; -export = size; \ No newline at end of file +export = size; diff --git a/types/lodash/slice/index.d.ts b/types/lodash/slice/index.d.ts index 326dbd4235..0a01a3b37b 100644 --- a/types/lodash/slice/index.d.ts +++ b/types/lodash/slice/index.d.ts @@ -1,2 +1,2 @@ import { slice } from "../index"; -export = slice; \ No newline at end of file +export = slice; diff --git a/types/lodash/snakeCase/index.d.ts b/types/lodash/snakeCase/index.d.ts index 9248ebcb68..83a69eed7d 100644 --- a/types/lodash/snakeCase/index.d.ts +++ b/types/lodash/snakeCase/index.d.ts @@ -1,2 +1,2 @@ import { snakeCase } from "../index"; -export = snakeCase; \ No newline at end of file +export = snakeCase; diff --git a/types/lodash/some/index.d.ts b/types/lodash/some/index.d.ts index 5f687f85a5..737e5026a0 100644 --- a/types/lodash/some/index.d.ts +++ b/types/lodash/some/index.d.ts @@ -1,2 +1,2 @@ import { some } from "../index"; -export = some; \ No newline at end of file +export = some; diff --git a/types/lodash/sortBy/index.d.ts b/types/lodash/sortBy/index.d.ts index ccfb52f54d..f25a80ef63 100644 --- a/types/lodash/sortBy/index.d.ts +++ b/types/lodash/sortBy/index.d.ts @@ -1,2 +1,2 @@ import { sortBy } from "../index"; -export = sortBy; \ No newline at end of file +export = sortBy; diff --git a/types/lodash/sortedIndex/index.d.ts b/types/lodash/sortedIndex/index.d.ts index 82619b92b3..752e42308c 100644 --- a/types/lodash/sortedIndex/index.d.ts +++ b/types/lodash/sortedIndex/index.d.ts @@ -1,2 +1,2 @@ import { sortedIndex } from "../index"; -export = sortedIndex; \ No newline at end of file +export = sortedIndex; diff --git a/types/lodash/sortedIndexBy/index.d.ts b/types/lodash/sortedIndexBy/index.d.ts index 201307f855..de6c51ad0f 100644 --- a/types/lodash/sortedIndexBy/index.d.ts +++ b/types/lodash/sortedIndexBy/index.d.ts @@ -1,2 +1,2 @@ import { sortedIndexBy } from "../index"; -export = sortedIndexBy; \ No newline at end of file +export = sortedIndexBy; diff --git a/types/lodash/sortedIndexOf/index.d.ts b/types/lodash/sortedIndexOf/index.d.ts index fd3d7e7bcd..4ee1da9b33 100644 --- a/types/lodash/sortedIndexOf/index.d.ts +++ b/types/lodash/sortedIndexOf/index.d.ts @@ -1,2 +1,2 @@ import { sortedIndexOf } from "../index"; -export = sortedIndexOf; \ No newline at end of file +export = sortedIndexOf; diff --git a/types/lodash/sortedLastIndex/index.d.ts b/types/lodash/sortedLastIndex/index.d.ts index 8ec4d0e9e9..5a2d225624 100644 --- a/types/lodash/sortedLastIndex/index.d.ts +++ b/types/lodash/sortedLastIndex/index.d.ts @@ -1,2 +1,2 @@ import { sortedLastIndex } from "../index"; -export = sortedLastIndex; \ No newline at end of file +export = sortedLastIndex; diff --git a/types/lodash/sortedLastIndexBy/index.d.ts b/types/lodash/sortedLastIndexBy/index.d.ts index d0846cb4e4..18b961a312 100644 --- a/types/lodash/sortedLastIndexBy/index.d.ts +++ b/types/lodash/sortedLastIndexBy/index.d.ts @@ -1,2 +1,2 @@ import { sortedLastIndexBy } from "../index"; -export = sortedLastIndexBy; \ No newline at end of file +export = sortedLastIndexBy; diff --git a/types/lodash/sortedLastIndexOf/index.d.ts b/types/lodash/sortedLastIndexOf/index.d.ts index e65393da6c..84970275ed 100644 --- a/types/lodash/sortedLastIndexOf/index.d.ts +++ b/types/lodash/sortedLastIndexOf/index.d.ts @@ -1,2 +1,2 @@ import { sortedLastIndexOf } from "../index"; -export = sortedLastIndexOf; \ No newline at end of file +export = sortedLastIndexOf; diff --git a/types/lodash/sortedUniq/index.d.ts b/types/lodash/sortedUniq/index.d.ts index af5960f98d..d4a19d27cb 100644 --- a/types/lodash/sortedUniq/index.d.ts +++ b/types/lodash/sortedUniq/index.d.ts @@ -1,2 +1,2 @@ import { sortedUniq } from "../index"; -export = sortedUniq; \ No newline at end of file +export = sortedUniq; diff --git a/types/lodash/sortedUniqBy/index.d.ts b/types/lodash/sortedUniqBy/index.d.ts index 5ce03e8e78..a8e310ad3f 100644 --- a/types/lodash/sortedUniqBy/index.d.ts +++ b/types/lodash/sortedUniqBy/index.d.ts @@ -1,2 +1,2 @@ import { sortedUniqBy } from "../index"; -export = sortedUniqBy; \ No newline at end of file +export = sortedUniqBy; diff --git a/types/lodash/split/index.d.ts b/types/lodash/split/index.d.ts index cdf59fb9a7..15e23e48d9 100644 --- a/types/lodash/split/index.d.ts +++ b/types/lodash/split/index.d.ts @@ -1,2 +1,2 @@ import { split } from "../index"; -export = split; \ No newline at end of file +export = split; diff --git a/types/lodash/spread/index.d.ts b/types/lodash/spread/index.d.ts index 49214fa68d..eb27ed2f74 100644 --- a/types/lodash/spread/index.d.ts +++ b/types/lodash/spread/index.d.ts @@ -1,2 +1,2 @@ import { spread } from "../index"; -export = spread; \ No newline at end of file +export = spread; diff --git a/types/lodash/startCase/index.d.ts b/types/lodash/startCase/index.d.ts index f46a84c55a..8a6b629293 100644 --- a/types/lodash/startCase/index.d.ts +++ b/types/lodash/startCase/index.d.ts @@ -1,2 +1,2 @@ import { startCase } from "../index"; -export = startCase; \ No newline at end of file +export = startCase; diff --git a/types/lodash/startsWith/index.d.ts b/types/lodash/startsWith/index.d.ts index d0bc2d6110..96410734dd 100644 --- a/types/lodash/startsWith/index.d.ts +++ b/types/lodash/startsWith/index.d.ts @@ -1,2 +1,2 @@ import { startsWith } from "../index"; -export = startsWith; \ No newline at end of file +export = startsWith; diff --git a/types/lodash/subtract/index.d.ts b/types/lodash/subtract/index.d.ts index d802dccc59..30e5c0f374 100644 --- a/types/lodash/subtract/index.d.ts +++ b/types/lodash/subtract/index.d.ts @@ -1,2 +1,2 @@ import { subtract } from "../index"; -export = subtract; \ No newline at end of file +export = subtract; diff --git a/types/lodash/sum/index.d.ts b/types/lodash/sum/index.d.ts index 011a16d554..d861fe54b4 100644 --- a/types/lodash/sum/index.d.ts +++ b/types/lodash/sum/index.d.ts @@ -1,2 +1,2 @@ import { sum } from "../index"; -export = sum; \ No newline at end of file +export = sum; diff --git a/types/lodash/sumBy/index.d.ts b/types/lodash/sumBy/index.d.ts index 642b734092..edfadab963 100644 --- a/types/lodash/sumBy/index.d.ts +++ b/types/lodash/sumBy/index.d.ts @@ -1,2 +1,2 @@ import { sumBy } from "../index"; -export = sumBy; \ No newline at end of file +export = sumBy; diff --git a/types/lodash/tail/index.d.ts b/types/lodash/tail/index.d.ts index ab8b30bba0..7c16421431 100644 --- a/types/lodash/tail/index.d.ts +++ b/types/lodash/tail/index.d.ts @@ -1,2 +1,2 @@ import { tail } from "../index"; -export = tail; \ No newline at end of file +export = tail; diff --git a/types/lodash/take/index.d.ts b/types/lodash/take/index.d.ts index b9de51879b..09acc7cc67 100644 --- a/types/lodash/take/index.d.ts +++ b/types/lodash/take/index.d.ts @@ -1,2 +1,2 @@ import { take } from "../index"; -export = take; \ No newline at end of file +export = take; diff --git a/types/lodash/takeRight/index.d.ts b/types/lodash/takeRight/index.d.ts index ddc1dab3f2..f5f0829506 100644 --- a/types/lodash/takeRight/index.d.ts +++ b/types/lodash/takeRight/index.d.ts @@ -1,2 +1,2 @@ import { takeRight } from "../index"; -export = takeRight; \ No newline at end of file +export = takeRight; diff --git a/types/lodash/takeRightWhile/index.d.ts b/types/lodash/takeRightWhile/index.d.ts index ff42088754..3b3a4c5264 100644 --- a/types/lodash/takeRightWhile/index.d.ts +++ b/types/lodash/takeRightWhile/index.d.ts @@ -1,2 +1,2 @@ import { takeRightWhile } from "../index"; -export = takeRightWhile; \ No newline at end of file +export = takeRightWhile; diff --git a/types/lodash/takeWhile/index.d.ts b/types/lodash/takeWhile/index.d.ts index 4b6548a649..2cd57257e2 100644 --- a/types/lodash/takeWhile/index.d.ts +++ b/types/lodash/takeWhile/index.d.ts @@ -1,2 +1,2 @@ import { takeWhile } from "../index"; -export = takeWhile; \ No newline at end of file +export = takeWhile; diff --git a/types/lodash/tap/index.d.ts b/types/lodash/tap/index.d.ts index 1af8eccefd..26c6c1dfd8 100644 --- a/types/lodash/tap/index.d.ts +++ b/types/lodash/tap/index.d.ts @@ -1,2 +1,2 @@ import { tap } from "../index"; -export = tap; \ No newline at end of file +export = tap; diff --git a/types/lodash/template/index.d.ts b/types/lodash/template/index.d.ts index 465b01d7f8..898eb4b44e 100644 --- a/types/lodash/template/index.d.ts +++ b/types/lodash/template/index.d.ts @@ -1,2 +1,2 @@ import { template } from "../index"; -export = template; \ No newline at end of file +export = template; diff --git a/types/lodash/throttle/index.d.ts b/types/lodash/throttle/index.d.ts index dee71aae98..ba7f353aeb 100644 --- a/types/lodash/throttle/index.d.ts +++ b/types/lodash/throttle/index.d.ts @@ -1,2 +1,2 @@ import { throttle } from "../index"; -export = throttle; \ No newline at end of file +export = throttle; diff --git a/types/lodash/thru/index.d.ts b/types/lodash/thru/index.d.ts index 70245825d9..c23ea4f7f8 100644 --- a/types/lodash/thru/index.d.ts +++ b/types/lodash/thru/index.d.ts @@ -1,2 +1,2 @@ import { thru } from "../index"; -export = thru; \ No newline at end of file +export = thru; diff --git a/types/lodash/times/index.d.ts b/types/lodash/times/index.d.ts index 7da9c6763f..53ce4b64da 100644 --- a/types/lodash/times/index.d.ts +++ b/types/lodash/times/index.d.ts @@ -1,2 +1,2 @@ import { times } from "../index"; -export = times; \ No newline at end of file +export = times; diff --git a/types/lodash/toArray/index.d.ts b/types/lodash/toArray/index.d.ts index 5f1b4b5e89..a78ca2b2cd 100644 --- a/types/lodash/toArray/index.d.ts +++ b/types/lodash/toArray/index.d.ts @@ -1,2 +1,2 @@ import { toArray } from "../index"; -export = toArray; \ No newline at end of file +export = toArray; diff --git a/types/lodash/toInteger/index.d.ts b/types/lodash/toInteger/index.d.ts index cb600f94f2..90415a1155 100644 --- a/types/lodash/toInteger/index.d.ts +++ b/types/lodash/toInteger/index.d.ts @@ -1,2 +1,2 @@ import { toInteger } from "../index"; -export = toInteger; \ No newline at end of file +export = toInteger; diff --git a/types/lodash/toLength/index.d.ts b/types/lodash/toLength/index.d.ts index 04080ab623..1efae9b628 100644 --- a/types/lodash/toLength/index.d.ts +++ b/types/lodash/toLength/index.d.ts @@ -1,2 +1,2 @@ import { toLength } from "../index"; -export = toLength; \ No newline at end of file +export = toLength; diff --git a/types/lodash/toLower/index.d.ts b/types/lodash/toLower/index.d.ts index d264d11bb2..9a8690312f 100644 --- a/types/lodash/toLower/index.d.ts +++ b/types/lodash/toLower/index.d.ts @@ -1,2 +1,2 @@ import { toLower } from "../index"; -export = toLower; \ No newline at end of file +export = toLower; diff --git a/types/lodash/toNumber/index.d.ts b/types/lodash/toNumber/index.d.ts index 0f706b4373..59c0521e63 100644 --- a/types/lodash/toNumber/index.d.ts +++ b/types/lodash/toNumber/index.d.ts @@ -1,2 +1,2 @@ import { toNumber } from "../index"; -export = toNumber; \ No newline at end of file +export = toNumber; diff --git a/types/lodash/toPairs/index.d.ts b/types/lodash/toPairs/index.d.ts index a0b3265c0c..500242710c 100644 --- a/types/lodash/toPairs/index.d.ts +++ b/types/lodash/toPairs/index.d.ts @@ -1,2 +1,2 @@ import { toPairs } from "../index"; -export = toPairs; \ No newline at end of file +export = toPairs; diff --git a/types/lodash/toPairsIn/index.d.ts b/types/lodash/toPairsIn/index.d.ts index d0193b6847..4d7f61b9dd 100644 --- a/types/lodash/toPairsIn/index.d.ts +++ b/types/lodash/toPairsIn/index.d.ts @@ -1,2 +1,2 @@ import { toPairsIn } from "../index"; -export = toPairsIn; \ No newline at end of file +export = toPairsIn; diff --git a/types/lodash/toPath/index.d.ts b/types/lodash/toPath/index.d.ts index 0c0f16d60c..23912d9437 100644 --- a/types/lodash/toPath/index.d.ts +++ b/types/lodash/toPath/index.d.ts @@ -1,2 +1,2 @@ import { toPath } from "../index"; -export = toPath; \ No newline at end of file +export = toPath; diff --git a/types/lodash/toPlainObject/index.d.ts b/types/lodash/toPlainObject/index.d.ts index 0bf86dae50..3a9298e1e3 100644 --- a/types/lodash/toPlainObject/index.d.ts +++ b/types/lodash/toPlainObject/index.d.ts @@ -1,2 +1,2 @@ import { toPlainObject } from "../index"; -export = toPlainObject; \ No newline at end of file +export = toPlainObject; diff --git a/types/lodash/toSafeInteger/index.d.ts b/types/lodash/toSafeInteger/index.d.ts index e7237d1ff9..4838cd8eba 100644 --- a/types/lodash/toSafeInteger/index.d.ts +++ b/types/lodash/toSafeInteger/index.d.ts @@ -1,2 +1,2 @@ import { toSafeInteger } from "../index"; -export = toSafeInteger; \ No newline at end of file +export = toSafeInteger; diff --git a/types/lodash/toString/index.d.ts b/types/lodash/toString/index.d.ts index f2cea86234..bfc2d699df 100644 --- a/types/lodash/toString/index.d.ts +++ b/types/lodash/toString/index.d.ts @@ -1,2 +1,2 @@ import { toString } from "../index"; -export = toString; \ No newline at end of file +export = toString; diff --git a/types/lodash/toUpper/index.d.ts b/types/lodash/toUpper/index.d.ts index c5b1ec212d..d191b6cb23 100644 --- a/types/lodash/toUpper/index.d.ts +++ b/types/lodash/toUpper/index.d.ts @@ -1,2 +1,2 @@ import { toUpper } from "../index"; -export = toUpper; \ No newline at end of file +export = toUpper; diff --git a/types/lodash/transform/index.d.ts b/types/lodash/transform/index.d.ts index ffa0169325..266d50f504 100644 --- a/types/lodash/transform/index.d.ts +++ b/types/lodash/transform/index.d.ts @@ -1,2 +1,2 @@ import { transform } from "../index"; -export = transform; \ No newline at end of file +export = transform; diff --git a/types/lodash/trim/index.d.ts b/types/lodash/trim/index.d.ts index 86117b38d2..0a6e07d1c3 100644 --- a/types/lodash/trim/index.d.ts +++ b/types/lodash/trim/index.d.ts @@ -1,2 +1,2 @@ import { trim } from "../index"; -export = trim; \ No newline at end of file +export = trim; diff --git a/types/lodash/trimEnd/index.d.ts b/types/lodash/trimEnd/index.d.ts index 83f6445934..c01d487ffa 100644 --- a/types/lodash/trimEnd/index.d.ts +++ b/types/lodash/trimEnd/index.d.ts @@ -1,2 +1,2 @@ import { trimEnd } from "../index"; -export = trimEnd; \ No newline at end of file +export = trimEnd; diff --git a/types/lodash/trimStart/index.d.ts b/types/lodash/trimStart/index.d.ts index ed7e9afb33..478d4f8fb5 100644 --- a/types/lodash/trimStart/index.d.ts +++ b/types/lodash/trimStart/index.d.ts @@ -1,2 +1,2 @@ import { trimStart } from "../index"; -export = trimStart; \ No newline at end of file +export = trimStart; diff --git a/types/lodash/truncate/index.d.ts b/types/lodash/truncate/index.d.ts index e152c53d3b..0d8b7d96a2 100644 --- a/types/lodash/truncate/index.d.ts +++ b/types/lodash/truncate/index.d.ts @@ -1,2 +1,2 @@ import { truncate } from "../index"; -export = truncate; \ No newline at end of file +export = truncate; diff --git a/types/lodash/tsconfig.json b/types/lodash/tsconfig.json index 419b6142b1..c0730d6661 100644 --- a/types/lodash/tsconfig.json +++ b/types/lodash/tsconfig.json @@ -288,6 +288,7 @@ "xorWith/index.d.ts", "zip/index.d.ts", "zipObject/index.d.ts", + "zipObjectDeep/index.d.ts", "zipWith/index.d.ts" ], "compilerOptions": { diff --git a/types/lodash/tslint.json b/types/lodash/tslint.json index 62d13dc883..7805e0387d 100644 --- a/types/lodash/tslint.json +++ b/types/lodash/tslint.json @@ -4,7 +4,7 @@ "array-type": false, "callable-types": false, "comment-format": false, - "forbidden-types": false, + "ban-types": false, "interface-name": false, "interface-over-type-literal": false, "max-line-length": false, diff --git a/types/lodash/unary/index.d.ts b/types/lodash/unary/index.d.ts index d7c0bd0558..2ffc81ae86 100644 --- a/types/lodash/unary/index.d.ts +++ b/types/lodash/unary/index.d.ts @@ -1,2 +1,2 @@ import { unary } from "../index"; -export = unary; \ No newline at end of file +export = unary; diff --git a/types/lodash/unescape/index.d.ts b/types/lodash/unescape/index.d.ts index 1af1f917b7..a830cd17b6 100644 --- a/types/lodash/unescape/index.d.ts +++ b/types/lodash/unescape/index.d.ts @@ -1,2 +1,2 @@ import { unescape } from "../index"; -export = unescape; \ No newline at end of file +export = unescape; diff --git a/types/lodash/union/index.d.ts b/types/lodash/union/index.d.ts index 03bb0d6a9c..4372f5b359 100644 --- a/types/lodash/union/index.d.ts +++ b/types/lodash/union/index.d.ts @@ -1,2 +1,2 @@ import { union } from "../index"; -export = union; \ No newline at end of file +export = union; diff --git a/types/lodash/unionBy/index.d.ts b/types/lodash/unionBy/index.d.ts index 6ec5957241..92e877b02a 100644 --- a/types/lodash/unionBy/index.d.ts +++ b/types/lodash/unionBy/index.d.ts @@ -1,2 +1,2 @@ import { unionBy } from "../index"; -export = unionBy; \ No newline at end of file +export = unionBy; diff --git a/types/lodash/unionWith/index.d.ts b/types/lodash/unionWith/index.d.ts index 16f5cfe660..cc13611e47 100644 --- a/types/lodash/unionWith/index.d.ts +++ b/types/lodash/unionWith/index.d.ts @@ -1,2 +1,2 @@ import { unionWith } from "../index"; -export = unionWith; \ No newline at end of file +export = unionWith; diff --git a/types/lodash/uniq/index.d.ts b/types/lodash/uniq/index.d.ts index 4d10a58c54..2a900a0547 100644 --- a/types/lodash/uniq/index.d.ts +++ b/types/lodash/uniq/index.d.ts @@ -1,2 +1,2 @@ import { uniq } from "../index"; -export = uniq; \ No newline at end of file +export = uniq; diff --git a/types/lodash/uniqBy/index.d.ts b/types/lodash/uniqBy/index.d.ts index afca1fccb8..849bf7c291 100644 --- a/types/lodash/uniqBy/index.d.ts +++ b/types/lodash/uniqBy/index.d.ts @@ -1,2 +1,2 @@ import { uniqBy } from "../index"; -export = uniqBy; \ No newline at end of file +export = uniqBy; diff --git a/types/lodash/uniqWith/index.d.ts b/types/lodash/uniqWith/index.d.ts index 4df7c0934d..a889f887e9 100644 --- a/types/lodash/uniqWith/index.d.ts +++ b/types/lodash/uniqWith/index.d.ts @@ -1,2 +1,2 @@ import { uniqWith } from "../index"; -export = uniqWith; \ No newline at end of file +export = uniqWith; diff --git a/types/lodash/uniqueId/index.d.ts b/types/lodash/uniqueId/index.d.ts index 0aae44d724..6ce0280474 100644 --- a/types/lodash/uniqueId/index.d.ts +++ b/types/lodash/uniqueId/index.d.ts @@ -1,2 +1,2 @@ import { uniqueId } from "../index"; -export = uniqueId; \ No newline at end of file +export = uniqueId; diff --git a/types/lodash/unset/index.d.ts b/types/lodash/unset/index.d.ts index 8e526713d7..b06997a103 100644 --- a/types/lodash/unset/index.d.ts +++ b/types/lodash/unset/index.d.ts @@ -1,2 +1,2 @@ import { unset } from "../index"; -export = unset; \ No newline at end of file +export = unset; diff --git a/types/lodash/unzip/index.d.ts b/types/lodash/unzip/index.d.ts index 57a50c8aa6..4900372c9e 100644 --- a/types/lodash/unzip/index.d.ts +++ b/types/lodash/unzip/index.d.ts @@ -1,2 +1,2 @@ import { unzip } from "../index"; -export = unzip; \ No newline at end of file +export = unzip; diff --git a/types/lodash/unzipWith/index.d.ts b/types/lodash/unzipWith/index.d.ts index 64c2b43089..28aad1a417 100644 --- a/types/lodash/unzipWith/index.d.ts +++ b/types/lodash/unzipWith/index.d.ts @@ -1,2 +1,2 @@ import { unzipWith } from "../index"; -export = unzipWith; \ No newline at end of file +export = unzipWith; diff --git a/types/lodash/update/index.d.ts b/types/lodash/update/index.d.ts index 141993229f..cba70b1b80 100644 --- a/types/lodash/update/index.d.ts +++ b/types/lodash/update/index.d.ts @@ -1,2 +1,2 @@ import { update } from "../index"; -export = update; \ No newline at end of file +export = update; diff --git a/types/lodash/upperCase/index.d.ts b/types/lodash/upperCase/index.d.ts index 25eb774983..6ff442cc20 100644 --- a/types/lodash/upperCase/index.d.ts +++ b/types/lodash/upperCase/index.d.ts @@ -1,2 +1,2 @@ import { upperCase } from "../index"; -export = upperCase; \ No newline at end of file +export = upperCase; diff --git a/types/lodash/upperFirst/index.d.ts b/types/lodash/upperFirst/index.d.ts index 05acb0f6d8..b8d53837aa 100644 --- a/types/lodash/upperFirst/index.d.ts +++ b/types/lodash/upperFirst/index.d.ts @@ -1,2 +1,2 @@ import { upperFirst } from "../index"; -export = upperFirst; \ No newline at end of file +export = upperFirst; diff --git a/types/lodash/values/index.d.ts b/types/lodash/values/index.d.ts index e4cee9048b..fb10161bb7 100644 --- a/types/lodash/values/index.d.ts +++ b/types/lodash/values/index.d.ts @@ -1,2 +1,2 @@ import { values } from "../index"; -export = values; \ No newline at end of file +export = values; diff --git a/types/lodash/valuesIn/index.d.ts b/types/lodash/valuesIn/index.d.ts index c2ae64e353..11fcc6500d 100644 --- a/types/lodash/valuesIn/index.d.ts +++ b/types/lodash/valuesIn/index.d.ts @@ -1,2 +1,2 @@ import { valuesIn } from "../index"; -export = valuesIn; \ No newline at end of file +export = valuesIn; diff --git a/types/lodash/without/index.d.ts b/types/lodash/without/index.d.ts index f6c3026a03..0fa415a090 100644 --- a/types/lodash/without/index.d.ts +++ b/types/lodash/without/index.d.ts @@ -1,2 +1,2 @@ import { without } from "../index"; -export = without; \ No newline at end of file +export = without; diff --git a/types/lodash/words/index.d.ts b/types/lodash/words/index.d.ts index e69803e9cb..6a76947ca1 100644 --- a/types/lodash/words/index.d.ts +++ b/types/lodash/words/index.d.ts @@ -1,2 +1,2 @@ import { words } from "../index"; -export = words; \ No newline at end of file +export = words; diff --git a/types/lodash/wrap/index.d.ts b/types/lodash/wrap/index.d.ts index 07c7914c4e..63f068b94d 100644 --- a/types/lodash/wrap/index.d.ts +++ b/types/lodash/wrap/index.d.ts @@ -1,2 +1,2 @@ import { wrap } from "../index"; -export = wrap; \ No newline at end of file +export = wrap; diff --git a/types/lodash/xor/index.d.ts b/types/lodash/xor/index.d.ts index 4804fb322f..9c2e0ea17b 100644 --- a/types/lodash/xor/index.d.ts +++ b/types/lodash/xor/index.d.ts @@ -1,2 +1,2 @@ import { xor } from "../index"; -export = xor; \ No newline at end of file +export = xor; diff --git a/types/lodash/xorBy/index.d.ts b/types/lodash/xorBy/index.d.ts index d468896792..4a2621d592 100644 --- a/types/lodash/xorBy/index.d.ts +++ b/types/lodash/xorBy/index.d.ts @@ -1,2 +1,2 @@ import { xorBy } from "../index"; -export = xorBy; \ No newline at end of file +export = xorBy; diff --git a/types/lodash/xorWith/index.d.ts b/types/lodash/xorWith/index.d.ts index 48337ca060..33e897a1f2 100644 --- a/types/lodash/xorWith/index.d.ts +++ b/types/lodash/xorWith/index.d.ts @@ -1,2 +1,2 @@ import { xorWith } from "../index"; -export = xorWith; \ No newline at end of file +export = xorWith; diff --git a/types/lodash/zip/index.d.ts b/types/lodash/zip/index.d.ts index a39e3d3099..ea074ac268 100644 --- a/types/lodash/zip/index.d.ts +++ b/types/lodash/zip/index.d.ts @@ -1,2 +1,2 @@ import { zip } from "../index"; -export = zip; \ No newline at end of file +export = zip; diff --git a/types/lodash/zipObject/index.d.ts b/types/lodash/zipObject/index.d.ts index 5ea9f4323f..b1577579b1 100644 --- a/types/lodash/zipObject/index.d.ts +++ b/types/lodash/zipObject/index.d.ts @@ -1,2 +1,2 @@ import { zipObject } from "../index"; -export = zipObject; \ No newline at end of file +export = zipObject; diff --git a/types/lodash/zipObjectDeep/index.d.ts b/types/lodash/zipObjectDeep/index.d.ts new file mode 100644 index 0000000000..a155901bb5 --- /dev/null +++ b/types/lodash/zipObjectDeep/index.d.ts @@ -0,0 +1,2 @@ +import { zipObjectDeep } from "../index"; +export = zipObjectDeep; \ No newline at end of file diff --git a/types/lodash/zipWith/index.d.ts b/types/lodash/zipWith/index.d.ts index c3b006c65e..bf808f690b 100644 --- a/types/lodash/zipWith/index.d.ts +++ b/types/lodash/zipWith/index.d.ts @@ -1,2 +1,2 @@ import { zipWith } from "../index"; -export = zipWith; \ No newline at end of file +export = zipWith; diff --git a/types/loopback/index.d.ts b/types/loopback/index.d.ts index 2d4af5caa9..5eadbb871f 100644 --- a/types/loopback/index.d.ts +++ b/types/loopback/index.d.ts @@ -14,7 +14,6 @@ import * as core from "express-serve-static-core"; declare function l(): l.LoopBackApplication; declare namespace l { - /** * The `App` object represents a Loopback application * The App object extends [Express](expressjs.com/api.html#express) and @@ -35,7 +34,6 @@ declare namespace l { // interface ILoopbackAplication extends express.Application { }; interface LoopBackApplication extends core.Application { - start(): void; /** @@ -49,7 +47,6 @@ declare namespace l { * @param {any} connector Connector object as returne * by `require('loopback-connector-{name}')` */ - connector(name: string, connector: any): void; /** @@ -57,13 +54,11 @@ declare namespace l { * @param {string} name The data source name * @param {any} config The data source confi */ - dataSource(name: string, config: any): void; /** * Enable app wide authentication */ - enableAuth(): void; /** @@ -90,7 +85,6 @@ declare namespace l { * listen(cb?: () => void):http.Serve * */ - // listen(port?: number, cb?: () => void): any; /** @@ -114,7 +108,6 @@ declare namespace l { * @en * @returns {any} the model clas */ - model(Model: any|string, config: {dataSource: string|any, public?: boolean, relations?: any}): any; /** @@ -152,14 +145,12 @@ declare namespace l { * `` * @returns {Array} Array of model classes */ - models(): any[]; /** * Get all remote objects. * @returns {any} [Remote objects](apidocs.strongloop.com/strong-remoting/#remoteObjectsoptions). */ - remoteObjects(): any; /** @@ -168,7 +159,6 @@ declare namespace l { * *NOTE:** Calling `app.remotes()` more than once returns only a single set of remote objects. * @returns {any} remoteObjects */ - remotes(): any; /** @@ -198,7 +188,6 @@ declare namespace l { * @returns {any} this (fluent API * @header app.middlewareFromConfig(factory, config */ - middlewareFromConfig(factory: () => void, config: {phase: string, enabled?: boolean, params?: any[]|any, paths?: any[]|string|RegExp}): any; /** @@ -228,7 +217,6 @@ declare namespace l { * @returns {any} this (fluent API * @header app.defineMiddlewarePhases(nameOrArray */ - defineMiddlewarePhases(nameOrArray: string|string[]): any; /** @@ -244,7 +232,6 @@ declare namespace l { * @returns {any} this (fluent API * @header app.middleware(name, handler */ - middleware(name: string, paths?: any[]|string|RegExp, handler?: core.Handler): any; } @@ -265,7 +252,6 @@ declare namespace l { // interface Router extends core.Router { } // interface Send extends core.Send { } - /** * LoopBack core module. It provides static properties and * methods to create models and data sources. The module itself is a function @@ -286,9 +272,7 @@ declare namespace l { * @class loopback * @header loopback */ - class loopback { - /** Version of LoopBack framework. Static read-only property. */ version: string; @@ -385,7 +369,6 @@ declare namespace l { * @param {any} options (optional * @header loopback.createMode */ - static createModel(name: string, properties: any, options: any): void; /** @@ -395,7 +378,6 @@ declare namespace l { * @returns {Model} The model clas * @header loopback.findModel(modelName */ - static findModel(modelName: string): Model; /** @@ -405,7 +387,6 @@ declare namespace l { * @returns {Model} The model clas * @header loopback.getModel(modelName */ - static getModel(modelName: string): Model; /** @@ -416,7 +397,6 @@ declare namespace l { * @returns {Model} The subclass if found or the base clas * @header loopback.getModelByType(modelType */ - static getModelByType(modelType: Model): Model; /** @@ -424,16 +404,13 @@ declare namespace l { * @param {string} [name] The name of the data source. * If not provided, the `'default'` is used */ - static memory(name?: string): void; - /** * Add a remote method to a model. * @param {() => void} fn * @param {any} options (optional */ - static remoteMethod(fn: () => void, options: any): void; /** @@ -443,7 +420,6 @@ declare namespace l { * @param {string} path Path to the template file. * @returns {() => void */ - static template(path: string): void; // NOTE*** DEPRECATE in 3.0 @@ -455,7 +431,6 @@ declare namespace l { // * // * @header loopback.setDefaultDataSourceForType(type, dataSource) // */ - // setDefaultDataSourceForType(type: string, dataSource: any|DataSource): DataSource; // /** @@ -463,16 +438,13 @@ declare namespace l { // * @param {string} type The datasource type. // * @returns {DataSource} The data source instance // */ - // getDefaultDataSourceForType(type: string): DataSource; // /** // * Attach any model that does not have a dataSource to // * the default dataSource for the type the Model requests // */ - // autoAttach(): void; - } /** @@ -481,7 +453,6 @@ declare namespace l { */ class Registry { - static addACL(acls: any[], acl: any): void; /** @@ -492,7 +463,6 @@ declare namespace l { * @property {any} [relations] Model relations to add/update * @header loopback.configureModel(ModelCtor, config */ - configureModel(ModelCtor: Model, config: {dataSource: any, relations?: any}): void; /** @@ -503,7 +473,6 @@ declare namespace l { * @property {*} [*] Other connector properties. * See the relevant connector documentation */ - createDataSource(name: string, options: {connector: any, properties?: any}): void; /** @@ -559,7 +528,6 @@ declare namespace l { * @param {any} options (optional * @header loopback.createMode */ - createModel(name: string, properties: any, options: any): void; /** @@ -569,7 +537,6 @@ declare namespace l { * @returns {Model} The model clas * @header loopback.findModel(modelName */ - findModel(modelOrName: string ): Model; /** @@ -579,7 +546,6 @@ declare namespace l { * @returns {Model} The model clas * @header loopback.getModel(modelName */ - getModel(modelOrName: string): Model; /** @@ -590,7 +556,6 @@ declare namespace l { * @returns {Model} The subclass if found or the base clas * @header loopback.getModelByType(modelType */ - getModelByType(modelType: Model): Model; /** @@ -598,7 +563,6 @@ declare namespace l { * @param {string} [name] The name of the data source. * If not provided, the `'default'` is used */ - memory(name?: string): void; // **NOTE** DEPRECATE ON 3.x @@ -610,7 +574,6 @@ declare namespace l { // * // * @header loopback.setDefaultDataSourceForType(type, dataSource) // */ - // setDefaultDataSourceForType(type: string, dataSource: any|DataSource): DataSource; // /** @@ -618,14 +581,12 @@ declare namespace l { // * @param {string} type The datasource type. // * @returns {DataSource} The data source instance // */ - // getDefaultDataSourceForType(type: string): DataSource; // /** // * Attach any model that does not have a dataSource to // * the default dataSource for the type the Model requests // */ - // autoAttach(): void; } @@ -636,7 +597,6 @@ declare namespace l { * @options {Context} context The context object * @constructor */ - class AccessContext { /** context The context object */ constructor(context: Context); @@ -648,28 +608,24 @@ declare namespace l { * @param {string} [principalName] The principal name * @returns {boolean} */ - addPrincipal(principalType: string, principalId: any, principalName?: string): boolean; /** * Get the user id * @returns {*} */ - getUserId(): any; /** * Get the application id * @returns {*} */ - getAppId(): any; /** * Check if the access context has authenticated principals * @returns {boolean} */ - isAuthenticated(): boolean; } @@ -723,7 +679,6 @@ declare namespace l { * @class * @constructor */ - class AccessRequest { constructor(model: string, property: string, accessType: string, permission: string); @@ -731,21 +686,18 @@ declare namespace l { * Does the given `ACL` apply to this `AccessRequest` * @param {ACL} acl */ - exactlyMatches(acl: ACL): void; /** * Is the request for access allowed * @returns {boolean} */ - isAllowed(): boolean; /** * Does the request contain any wildcards * @returns {boolean} */ - isWildcard(): boolean; } @@ -758,7 +710,6 @@ declare namespace l { * @returns {Principal} * @class */ - class Principal { constructor(type: string, id: any, name: string); @@ -767,7 +718,6 @@ declare namespace l { * Returns true if argument principal is equal to this principal. * @param {any} p The other principa */ - equals(p: any): void; } @@ -841,9 +791,7 @@ declare namespace l { * @class * @constructor */ - class Model { - /** The name of the model. */ static modelName: string; @@ -868,7 +816,6 @@ declare namespace l { * @param {string|Error} err The error object. * @param {boolean} allowed True if the request is allowed; false otherwise */ - static checkAccess(token: AccessToken, modelId: any, sharedMethod: any, ctx: any, callback: (err: string|Error, allowed: boolean) => void): void; /** @@ -878,7 +825,6 @@ declare namespace l { * `false` if the method defined on the prototype (eg. * `MyModel.prototype.myMethod`) */ - static disableRemoteMethod(name: string, isStatic: boolean): void; /** @@ -886,7 +832,6 @@ declare namespace l { * @param {string} name The name of the method. * The name of the method (include "prototype." if the method is defined on the prototype). */ - static disableRemoteMethodByName(name: string): void; /** @@ -896,7 +841,6 @@ declare namespace l { * @param {Application} app Attached application object. * @end */ - static getApp(callback: (err: Error, app: Application) => void): void; /** @@ -934,7 +878,6 @@ declare namespace l { * @param {any} options The remoting options. * See [Remote methods - Options](docs.strongloop.com/display/LB/Remote+methods#Remotemethods-Options) */ - remoteMethod(name: string, options: any): void; /** @@ -942,7 +885,6 @@ declare namespace l { * Add any setup or configuration code you want executed when the model is created. * See [Setting up a custom model](docs.strongloop.com/display/LB/Extending+built-in+models#Extendingbuilt-inmodels-Settingupacustommodel) */ - static setup(): void; } @@ -957,7 +899,6 @@ declare namespace l { * @property {() => void } ctor The constructor * @property {any} http The HTTP settings */ - class SharedClass { /** The SharedClass name */ ctor: () => void; @@ -975,7 +916,6 @@ declare namespace l { * @param {string} name The method name * @param {any} options Set of options used to create a SharedMethod. See the full set of options https://apidocs.strongloop.com/strong-remoting/#sharedmethod */ - defineMethod(name: string, options: any): void; /** @@ -983,14 +923,12 @@ declare namespace l { * @param {string} fn The function or method name * @param {boolean} isStatic Disable a static or prototype method */ - disableMethod(fn: string, isStatic: boolean): void; /** * Disable a sharedMethod with the given static or prototype method name. * @param {string} methodName The method name */ - disableMethodByName(methodName: string): void; /** @@ -999,7 +937,6 @@ declare namespace l { * @param {boolean} isStatic Required if fn is a String. Only find a static method with the given name. * @return {any} SharedMethod https://apidocs.strongloop.com/strong-remoting/#sharedmethod */ - find(fn: () => void|string, isStatic: boolean ): any; /** @@ -1007,7 +944,6 @@ declare namespace l { * @param {string} methodName the method name Find a static or prototype method with the given name. * @return {any} SharedMethod */ - findMethodByName(methodName: string): any; /** @@ -1015,7 +951,6 @@ declare namespace l { * @param {string} fn The function or method name * @param {boolean} isStatic Disable a static or prototype method */ - getKeyFromMethodNameAndTarget(fn: string, isStatic: boolean): void; /** @@ -1023,7 +958,6 @@ declare namespace l { * @param {any} options * @return {any[]} An array of shared methods SharedMethod[] */ - methods(options: {includeDisabled: boolean}): any[]; /** @@ -1044,7 +978,6 @@ declare namespace l { * * @param {() => void} resolver The resolver function. */ - resolve(resolver: () => void): void; } @@ -1066,9 +999,7 @@ declare namespace l { * ``` * @class PersistedModel */ - class PersistedModel extends Model { - /** * Apply an update list * **Note: this is not atomic* @@ -1076,7 +1007,6 @@ declare namespace l { * @param {any} options An optional options object to pass to underlying data-access calls. * @param {() => void} callback Callback function */ - static bulkUpdate(updates: any[], options: any, callback: () => void): void; /** @@ -1088,14 +1018,12 @@ declare namespace l { * @param {Error} err Error object; see [Error object](docs.strongloop.com/display/LB/Error+object). * @param {Array} changes An Array of [Change](#change) objects */ - static changes(since: number, filter: any, callback: (err: Error, changes: any[]) => void): void; /** * Create a checkpoint * @param {() => void} callback */ - static checkpoint(callback: () => void): void; /** @@ -1110,7 +1038,6 @@ declare namespace l { * @param {Error} err Error object; see [Error object](docs.strongloop.com/display/LB/Error+object). * @param {number} count number of instances updated */ - static count(where?: any, callback?: (err: Error, count: number) => void): void; /** @@ -1120,7 +1047,6 @@ declare namespace l { * @param {Error} err Error object; see [Error object](docs.strongloop.com/display/LB/Error+object). * @param {any} models Model instances or null */ - static create(data?: any|any[], callback?: (err: Error, models: any) => void): void; /** @@ -1128,7 +1054,6 @@ declare namespace l { * @param {any} options Only changes to models matching this where filter will be included in the ChangeStream. * @param {() => void} callback */ - static createChangeStream(options: {where: any}, callback: (err: Error, changes: any) => void): void; /** @@ -1137,7 +1062,6 @@ declare namespace l { * @param {Array} deltas * @param {() => void} callback */ - static createUpdates(deltas: any[], callback: () => void): void; /** @@ -1146,7 +1070,6 @@ declare namespace l { * @param {Error} err Error object; see [Error object](docs.strongloop.com/display/LB/Error+object). * @param {number} currentCheckpointId Current checkpoint ID */ - static currentCheckpoint(callback: (err: Error, currentCheckpointId: number) => void): void; /** @@ -1163,7 +1086,6 @@ declare namespace l { * @param {any} info Additional information about the command outcome. * @param {number} info.count number of instances (rows, documents) destroyed */ - static destroyAll(where?: any, callback?: (err: Error, info: any, infoCount: number) => void): void; /** @@ -1172,7 +1094,6 @@ declare namespace l { * @callback {() => void} callback Callback function called with `(err)` arguments. Required. * @param {Error} err Error object; see [Error object](docs.strongloop.com/display/LB/Error+object) */ - static destroyById(id: any, callback: (err: Error) => void): void; /** @@ -1184,13 +1105,11 @@ declare namespace l { * @param {Error} err Error object; see [Error object](docs.strongloop.com/display/LB/Error+object). * @param {any} result any with `deltas` and `conflicts` properties; see [Change.diff()](#change-diff) for details */ - static diff(since: number, remoteChanges: any[], callback: (err: Error, result: any) => void): void; /** * Enable the tracking of changes made to the model. Usually for replication. */ - static enableChangeTracking(): void; /** @@ -1200,7 +1119,6 @@ declare namespace l { * @param {Error} err Error object; see [Error object](docs.strongloop.com/display/LB/Error+object). * @param {boolean} exists True if the instance with the specified ID exists; false otherwise */ - static exists(id: any, callback: (err: Error, exists: boolean) => void): void; /** @@ -1243,7 +1161,6 @@ declare namespace l { * @param {Error} err Error object; see [Error object](docs.strongloop.com/display/LB/Error+object). * @param {any} instance Model instance matching the specified ID or null if no instance matches */ - static findById(id: any, filter?: {fields?: string|any|any[]; include?: string|any|any[]; }, callback?: (err: Error, instance: any) => void): void; /** @@ -1269,7 +1186,6 @@ declare namespace l { * @param {Error} err Error object; see [Error object](docs.strongloop.com/display/LB/Error+object). * @param {Array} model First model instance that matches the filter or null if none found */ - static findOne(filter?: {fields?: string|any|any[]; include?: string|any|any[]; order?: string; skip?: number; where?: any; }, callback?: (err: Error, model: any) => void): void; /** @@ -1302,7 +1218,6 @@ declare namespace l { * @param {any} instance Model instance matching the `where` filter, if found. * @param {boolean} created True if the instance matching the `where` filter was created */ - static findOrCreate( data: any, filter?: { @@ -1319,14 +1234,12 @@ declare namespace l { * Get the `Change` model. * Throws an error if the change model is not correctly setup. */ - static getChangeModel(): void; /** * Get the `id` property name of the constructor * @returns {string} The `id` property nam */ - static getIdName(): string; /** @@ -1335,7 +1248,6 @@ declare namespace l { * @param {Error} err Error object; see [Error object](docs.strongloop.com/display/LB/Error+object). * @param {string} sourceId Source identifier for the model or dataSource */ - static getSourceId(callback: (err: Error, sourceId: string) => void): void; /** @@ -1343,7 +1255,6 @@ declare namespace l { * change error handling * @param {Error} err Error object; see [Error object](docs.strongloop.com/display/LB/Error+object) */ - static handleChangeError(err: Error): void; /** @@ -1352,7 +1263,6 @@ declare namespace l { * @callback {() => void} callback * @param {Error} er */ - static rectifyChange(id: any, callback: (err: Error) => void): void; /** @@ -1367,7 +1277,6 @@ declare namespace l { * @param {Error} err Error object; see [Error object](docs.strongloop.com/display/LB/Error+object). * @param {any} instance Replaced instance */ - static replaceById(id: any, data: any, options?: {validate: boolean; }, callback?: (err: Error, instance: any) => void): void; /** @@ -1381,7 +1290,6 @@ declare namespace l { * @param {Error} err Error object; see [Error object](docs.strongloop.com/display/LB/Error+object). * @param {any} model Replaced model instance. */ - static replaceOrCreate(data: any, options?: {validate: boolean; }, callback?: (err: Error, model: any) => void): void; /** @@ -1396,7 +1304,6 @@ declare namespace l { * @param {any] checkpoints The new checkpoints to use as the "since" * argument for the next replication */ - static replicate(since?: number, targetModel?: Model, options?: any, optionsFilter?: any, callback?: (err: Error, conflicts: Conflict[], param: any) => void): void; /** @@ -1424,7 +1331,6 @@ declare namespace l { * @param {number} info.count number of instances (rows, documents) updated. * */ - static updateAll(where?: any, data?: any, callback?: (err: Error, info: any, infoCount: number) => void): void; /** @@ -1434,7 +1340,6 @@ declare namespace l { * @param {Error} err Error object; see [Error object](docs.strongloop.com/display/LB/Error+object). * @param {any} model Updated model instance */ - static upsert(data: any, callback: (err: Error, model: any) => void): void; /** @@ -1453,7 +1358,6 @@ declare namespace l { * @param {Error} err Error object; see [Error object](docs.strongloop.com/display/LB/Error+object). * @param {any} model Updated model instance */ - static upsertWithWhere(data: any, callback: (err: Error, model: any) => void): void; /** @@ -1461,28 +1365,24 @@ declare namespace l { * Triggers `destroy` hook (async) before and after destroying object. * @param {() => void} callback Callback function */ - destroy(callback: () => void): void; /** * Get the `id` value for the `PersistedModel` * @returns {*} The `id` valu */ - getId(): any; /** * Get the `id` property name of the constructor * @returns {string} The `id` property nam */ - getIdName(): string; /** * Determine if the data model is new. * @returns {boolean} Returns true if the data model is new; false otherwise */ - isNewRecord(): boolean; /** @@ -1491,7 +1391,6 @@ declare namespace l { * @param {Error} err Error object; see [Error object](docs.strongloop.com/display/LB/Error+object). * @param {any} instance Model instance */ - reload(callback: (err: Error, instance: any) => void): void; /** @@ -1504,7 +1403,6 @@ declare namespace l { * @param {Error} err Error object; see [Error object](docs.strongloop.com/display/LB/Error+object). * @param {any} instance Replaced instance */ - replaceAttributes(data: any, options?: {validate: boolean}, callback?: (err: Error, instance: any) => void): void; /** @@ -1518,7 +1416,6 @@ declare namespace l { * @param {Error} err Error object; see [Error object](docs.strongloop.com/display/LB/Error+object). * @param {any} instance Model instance saved or created */ - save(options?: {validate: boolean; throws: boolean}, callback?: (err: Error, instance: any) => void): void; /** @@ -1527,7 +1424,6 @@ declare namespace l { * Override this method to handle complex IDs * @param {*} val The `id` value. Will be converted to the type that the `id` property specifies */ - setId(val: any): void; /** @@ -1539,7 +1435,6 @@ declare namespace l { * @param {Error} err Error object; see [Error object](docs.strongloop.com/display/LB/Error+object). * @param {any} instance Updated instance */ - updateAttribute(name: string, value: any, callback: (err: Error, instance: any) => void): void; /** @@ -1550,14 +1445,12 @@ declare namespace l { * @param {Error} err Error object; see [Error object](docs.strongloop.com/display/LB/Error+object). * @param {any} instance Updated instance */ - updateAttributes(data: any, callback: (err: Error, instance: any) => void): void; // **NOTE** Deprecate for v3.x // /** // * Alias for `destroyAll` // */ - // **NOTE** Deprecate for v3.x // deleteAll(): void; @@ -1565,21 +1458,18 @@ declare namespace l { // /** // * Alias for updateAll. // */ - // update(): void; // **NOTE** Deprecate for v3.x // /** // * Alias for destroyById. // */ - // removeById(): void; // **NOTE** Deprecate for v3.x // /** // * Alias for destroyById. // */ - // deleteById(): void; // **NOTE** Deprecate for v3.x @@ -1587,7 +1477,6 @@ declare namespace l { // * Alias for destroy. // * @header PersistedModel.remove // */ - // remove(): void; // **NOTE** Deprecate for v3.x @@ -1595,7 +1484,6 @@ declare namespace l { // * Alias for destroy. // * @header PersistedModel.delete // */ - // delete(): void; // **NOTE** Deprecate for v3.x @@ -1608,16 +1496,13 @@ declare namespace l { // * @param {Error} err // * @param {any} changes // */ - // createany(options: any, optionsWhere: any, callback: (err: Error, changes: any) => void): void; - } /** * Serve the LoopBack favicon. * @header loopback.favicon( */ - function favicon(): void; /** @@ -1629,7 +1514,6 @@ declare namespace l { * For more information, see [Exposing models over a REST API](docs.strongloop.com/display/DOC/Exposing+models+over+a+REST+API). * @header loopback.rest( */ - function rest(): void; /** @@ -1641,7 +1525,6 @@ declare namespace l { * for the full list of available options. * @header loopback.static(root, [options]) */ - function static(root: string, options: any): void; /** @@ -1654,13 +1537,11 @@ declare namespace l { * } * ``` */ - function status(): void; /** * Rewrite the url to replace current user literal with the logged in user id */ - function rewriteUserLiteral(): void; /** @@ -1711,7 +1592,6 @@ declare namespace l { * to be handled by error-handling middleware. * @header loopback.urlNotFound( */ - function urlNotFound(): void; /** @@ -1728,9 +1608,7 @@ declare namespace l { * @class AccessToken * @inherits {PersistedModel} */ - class AccessToken extends PersistedModel { - /** Generated token ID */ id: string; @@ -1749,7 +1627,6 @@ declare namespace l { * @param {Error} err * @param {string} toke */ - static createAccessTokenId(callback: (err: Error, token: string) => void): void; /** @@ -1760,7 +1637,6 @@ declare namespace l { * @param {Error} err * @param {AccessToken} toke */ - static findForRequest(req: any, options?: any, callback?: (err: Error, token: AccessToken) => void): void; /** @@ -1770,7 +1646,6 @@ declare namespace l { * @param {Error} err * @param {boolean} isValid */ - validate(callback: (err: Error, isValid: boolean) => void): void; // **NOTE** Deprecate for 3.x @@ -1781,9 +1656,7 @@ declare namespace l { // * assert(AccessToken.ANONYMOUS.id === '$anonymous'); // * ``` // */ - // ANONYMOUS(): void; - } /** @@ -1812,7 +1685,6 @@ declare namespace l { * @class ACL * @inherits PersistedMode */ - class ACL extends PersistedModel { /** model Name of the model. */ model: string; @@ -1851,7 +1723,6 @@ declare namespace l { * READ, REPLICATE, WRITE, or EXECUTE. * @param {() => void} callback Callback functio */ - static checkAccessForContext(context: {principals: any[]; model: string|Model; id: any; property: string; accessType: string; }, callback: () => void): void; /** @@ -1864,7 +1735,6 @@ declare namespace l { * @param {string|Error} err The error object * @param {boolean} allowed is the request allow */ - static checkAccessForToken(token: AccessToken, model: string, modelId: any, method: string, callback: (err: string|Error, allowed: boolean) => void): void; /** @@ -1878,7 +1748,6 @@ declare namespace l { * @param {string|Error} err The error object * @param {AccessRequest} result The access permissio */ - static checkPermission(principalType: string, principalId: string, model: string, property: string, accessType: string, callback: (err: string|Error, result: AccessRequest) => void): void; /** @@ -1887,7 +1756,6 @@ declare namespace l { * @param {AccessRequest} req The request * @returns {number} */ - static getMatchingScore(rule: ACL, req: AccessRequest): number; /** @@ -1897,7 +1765,6 @@ declare namespace l { * @param {string|*} role Role id/name * @param {() => void} cb Callback functio */ - static isMappedToRole(principalType: string, principalId: string|any, role: string|any, cb: () => void): void; /** @@ -1906,7 +1773,6 @@ declare namespace l { * @param {string|number} id Principal id or name * @param {() => void} cb Callback function */ - static resolvePrincipal(type: string, id: string|number, cb: () => void): void; /** @@ -1914,7 +1780,6 @@ declare namespace l { * @param {AccessRequest} req The request * @returns {number} scor */ - score(req: AccessRequest): number; } @@ -1959,7 +1824,6 @@ declare namespace l { * @class Application * @inherits {PersistedModel} */ - class Application extends PersistedModel { /** Generated ID. */ id: string; @@ -2099,7 +1963,6 @@ declare namespace l { * @class Change * @inherits {PersistedModel} */ - class Change extends PersistedModel { /** Hash of the modelName and ID. */ id: string; @@ -2107,7 +1970,6 @@ declare namespace l { /** The current model revision. */ rev: string; - prev: string; checkpoint: number; @@ -2164,7 +2026,6 @@ declare namespace l { * @param {Error} err * @param {any} result See above. */ - // static diff(modelName: string, since: number, remoteChanges: Change[], callback: (err: Error, result: any) => void): void; /** @@ -2176,13 +2037,11 @@ declare namespace l { * @param {Change} change * @end */ - static findOrCreateChange(modelName: string, modelId: string, callback: (err: Error, change: Change) => void): void; /** * Get the checkpoint model. */ - static getCheckpointModel(): void; /** @@ -2190,7 +2049,6 @@ declare namespace l { * **Default: `sha1`* * @param {string} str The string to be hashed */ - static hash(str: string): void; /** @@ -2198,14 +2056,12 @@ declare namespace l { * @param {string} modelName * @param {string} modelId */ - static idForModel(modelName: string, modelId: string): void; /** * Correct all change list entries. * @param {() => void} c */ - static rectifyAll(cb: () => void): void; /** @@ -2216,14 +2072,12 @@ declare namespace l { * @param {Error} err * @param {Array} changes Changes that were tracke */ - static rectifyModelChanges(modelName: string, modelIds: any[], callback: (err: Error, changes: any[]) => void): void; /** * Get the revision string for the given object * @param {any} inst The data to get the revision string for */ - static revisionForInst(inst: any): void; /** @@ -2231,7 +2085,6 @@ declare namespace l { * @param {Change} change * @return {boolean */ - conflictsWith(change: Change): void; /** @@ -2240,20 +2093,17 @@ declare namespace l { * @param {Error} err * @param {string} rev The current revisio */ - currentRevision(callback: (err: Error, rev: string) => void): void; /** * Compare two changes. * @param {Change} change */ - equals(change: Change): void; /** * Get the `Model` class for `change.modelName`. */ - getModelCtor(): void; /** @@ -2261,7 +2111,6 @@ declare namespace l { * @param {Change} change * @return {boolean */ - isBasedOn(change: Change): void; /** @@ -2270,7 +2119,6 @@ declare namespace l { * @param {Error} err * @param {Change} chang */ - rectify(callback: (err: Error, change: Change) => void): void; /** @@ -2280,7 +2128,6 @@ declare namespace l { * - `Change.DELETE` * - `Change.UNKNOWN */ - type(): void; } @@ -2295,7 +2142,6 @@ declare namespace l { * @property {ModelClass} target The target model instance * @class Change.Conflic */ - class Conflict { source: any; target: any; @@ -2308,7 +2154,6 @@ declare namespace l { * @param {Change} sourceChange * @param {Change} targetChang */ - changes(callback: (err: Error, sourceChange: Change, targetChange: Change) => void): void; /** @@ -2318,7 +2163,6 @@ declare namespace l { * @param {PersistedModel} source * @param {PersistedModel} targe */ - models(callback: (err: Error, source: PersistedModel, target: PersistedModel) => void): void; /** @@ -2331,7 +2175,6 @@ declare namespace l { * @callback {() => void} callback * @param {Error} err */ - resolve(callback: (err: Error) => void): void; /** @@ -2341,7 +2184,6 @@ declare namespace l { * @callback {() => void} callback * @param {Error} err */ - resolveManually(data: any, callback: (err: Error) => void): void; /** @@ -2349,7 +2191,6 @@ declare namespace l { * @callback {() => void} callback * @param {Error} err */ - resolveUsingSource(callback: (err: Error) => void): void; /** @@ -2357,7 +2198,6 @@ declare namespace l { * @callback {() => void} callback * @param {Error} err */ - resolveUsingTarget(callback: (err: Error) => void): void; /** @@ -2370,7 +2210,6 @@ declare namespace l { * ``` * @returns {Conflict} A new Conflict instance */ - swapParties(): Conflict; /** @@ -2385,7 +2224,6 @@ declare namespace l { * @param {Error} err * @param {string} type The conflict type */ - type(callback: (err: Error, type: string) => void): void; } @@ -2399,7 +2237,6 @@ declare namespace l { * @class Email * @inherits {Model} */ - class Email extends Model { /** Email addressee. Required. */ to: string; @@ -2438,15 +2275,12 @@ declare namespace l { * @prop {string} html Body HTML (optional) * @param {() => void} callback Called after the e-mail is sent or the sending faile */ - static send(callback: () => void, options: { from: string; to: string; subject: string; text: string; html: string; }): void; /** * A shortcut for Email.send(this). */ - send(): void; - } /** @@ -2454,7 +2288,6 @@ declare namespace l { * @class */ class KeyValueModel { - /** * Set the TTL (time to live) in ms (milliseconds) for a given key. * TTL is the remaining time before a key-value pair is discarded from the database. @@ -2470,7 +2303,6 @@ declare namespace l { * @param {any} options * @param {() => void} callback */ - static expire(key: string, ttl: number, options: any, callback: () => void): PromiseLike; /** @@ -2487,7 +2319,6 @@ declare namespace l { * @param {any} options * @param {() => void} callback */ - static get(key: string, option?: any, callback?: (err: Error, result: any) => void): PromiseLike; /** @@ -2529,7 +2360,6 @@ declare namespace l { * @param {any} filter.options * @return {any} result AsyncIterator An Object implementing next(cb) -> Promise function that can be used to iterate all keys. */ - static iterateKeys(filter: {match: string; options: any}): any; /** @@ -2550,7 +2380,6 @@ declare namespace l { * @param {() => void} callback * @return {PromiseLike} */ - static keys(filter: {match: string; options: any}, callback: () => void): PromiseLike; /** @@ -2568,7 +2397,6 @@ declare namespace l { * @param {number|any} Optional settings for the key-value pair. If a Number is provided, it is set as the TTL (time to live) in ms (milliseconds) for the key-value pair. * @param {() => void} callback */ - static set(key: string, value: any, options?: number|any, callback?: (err: Error) => void): PromiseLike; /** @@ -2583,7 +2411,6 @@ declare namespace l { * @param {any} options * @param {() => void} callback */ - static ttl(key: string, options?: any, cb?: (error: Error) => void): PromiseLike; } @@ -2592,7 +2419,6 @@ declare namespace l { * @class Role * @header Role objec */ - class Role { /** * List roles for a given principal. @@ -2601,7 +2427,6 @@ declare namespace l { * @param {Error} err Error object. * @param {string[]} roles An Array of role IDs */ - static getRoles(context: any, callback: (err: Error, roles: string[]) => void): void; /** @@ -2610,7 +2435,6 @@ declare namespace l { * @param {Error} err Error object. * @param {boolean} isAuthenticated True if the user is authenticated. */ - static isAuthenticated(context: any, callback: (err: Error, isAuthenticated: boolean) => void): void; /** @@ -2621,7 +2445,6 @@ declare namespace l { * @param {Error} err Error object. * @param {boolean} isInRole True if the principal is in the specified role. */ - static isInRole(role: string, context: any, callback: (err: Error, isInRole: boolean) => void): void; /** @@ -2631,7 +2454,6 @@ declare namespace l { * @param {*} userId The user ID * @param {() => void} callback Callback function */ - static isOwner(modelClass: () => void, modelId: any, userId: any, callback: () => void): void; /** @@ -2641,7 +2463,6 @@ declare namespace l { * if a principal is in the specified role. * Should provide a callback or return a promise. */ - static registerResolver(role: string, resolver: () => void): void; } @@ -2653,9 +2474,7 @@ declare namespace l { * @class RoleMapping * @inherits {PersistedModel} */ - class RoleMapping extends PersistedModel { - /** Generated ID. */ id: string; @@ -2671,7 +2490,6 @@ declare namespace l { * @param {Error} err * @param {Application} application */ - application(callback: (err: Error, application: Application) => void): void; /** @@ -2680,7 +2498,6 @@ declare namespace l { * @param {Error} err * @param {User} childUser */ - childRole(callback: (err: Error, childUser: User) => void): void; /** @@ -2689,7 +2506,6 @@ declare namespace l { * @param {Error} err * @param {User} user */ - user(callback: (err: Error, user: User) => void): void; } @@ -2700,9 +2516,7 @@ declare namespace l { * Scope has many resource access entrie * @class scope */ - class Scope { - /** * Check if the given scope is allowed to access the model/property * @param {string} scope The scope name @@ -2713,9 +2527,7 @@ declare namespace l { * @param {string|Error} err The error object * @param {AccessRequest} result The access permission */ - static checkPermission(scope: string, model: string, property: string, accessType: string, callback: (err: string|Error, result: AccessRequest) => void): void; - } /** @@ -2755,9 +2567,7 @@ declare namespace l { * @class User * @inherits {PersistedModel} */ - class User extends PersistedModel { - /** Must be unique. */ username: string; @@ -2819,7 +2629,6 @@ declare namespace l { * @callback {() => void} callback * @param {Error} er */ - static confirm(userId: any, token: string, redirect: string, callback: (err: Error) => void): void; /** @@ -2831,7 +2640,6 @@ declare namespace l { * @param {any} user The User this token is being generated for. * @param {() => void} cb The generator must pass back the new token with this function cal */ - static generateVerificationToken(user: any, cb: () => void): void; /** @@ -2850,7 +2658,6 @@ declare namespace l { * @param {Error} err Error object * @param {AccessToken} token Access token if login is successfu */ - static login(credentials: any, include?: string[]|string, callback?: (err: Error, token: AccessToken) => void): void; /** @@ -2866,7 +2673,6 @@ declare namespace l { * @callback {() => void} callback * @param {Error} er */ - static logout(accessTokenID: string, callback: (err: Error) => void): void; /** @@ -2876,7 +2682,6 @@ declare namespace l { * @param {string} realmDelimiter The realm delimiter, if not set, no realm is needed * @returns {any} The normalized credential objec */ - static normalizeCredentials(credentials: any, realmRequired: boolean, realmDelimiter: string): any; /** @@ -2887,7 +2692,6 @@ declare namespace l { * @callback {() => void} callback * @param {Error} er */ - static resetPassword(options: {}, callback: (err: Error) => void): void; /** @@ -2899,7 +2703,6 @@ declare namespace l { * @param {string|Error} err The error string or object * @param {AccessToken} token The generated access token object */ - createAccessToken(ttl: number, options?: any, cb?: (err: string|Error, token: AccessToken) => void): void; /** @@ -2909,7 +2712,6 @@ declare namespace l { * @param {Error} err Error object * @param {boolean} isMatch Returns true if the given `password` matches recor */ - hasPassword(password: string, callback: (err: Error, isMatch: boolean) => void): void; /** @@ -2943,10 +2745,8 @@ declare namespace l { * object, instead simply execute the callback with the token! User saving * and email sending will be handled in the `verify()` method */ - verify(options: {type: string, to: string, from: string, subject: string, text: string, template: string, redirect: string, generateVerificationToken: () => void}): void; } } export = l; - diff --git a/types/loopback/loopback-tests.ts b/types/loopback/loopback-tests.ts index b21bf8c759..938891912a 100644 --- a/types/loopback/loopback-tests.ts +++ b/types/loopback/loopback-tests.ts @@ -16,4 +16,4 @@ class Server { // start the web server }; } -} \ No newline at end of file +} diff --git a/types/lz-string/lz-string-tests.ts b/types/lz-string/lz-string-tests.ts index e9bffed120..0ad913265d 100644 --- a/types/lz-string/lz-string-tests.ts +++ b/types/lz-string/lz-string-tests.ts @@ -1,9 +1,7 @@ - - -var input = "Someting to compress"; -var encoded: string; -var decoded: string; -var encodedU8: Uint8Array; +const input = "Someting to compress"; +let encoded: string; +let decoded: string; +let encodedU8: Uint8Array; encoded = LZString.compress(input); decoded = LZString.decompress(encoded); @@ -14,4 +12,4 @@ decoded = LZString.decompressFromBase64(encoded); encoded = LZString.compressToEncodedURIComponent(input); decoded = LZString.compressToEncodedURIComponent(encoded); encodedU8 = LZString.compressToUint8Array(input); -decoded = LZString.decompressFromUint8Array(encodedU8); \ No newline at end of file +decoded = LZString.decompressFromUint8Array(encodedU8); diff --git a/types/mapbox/index.d.ts b/types/mapbox/index.d.ts index 594f00523f..87a34e4823 100644 --- a/types/mapbox/index.d.ts +++ b/types/mapbox/index.d.ts @@ -3,397 +3,375 @@ // Definitions by: Maxime Fabre // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +import * as Leaflet from "leaflet"; -////////////////////////////////////////////////////////////////////// -///////////////////////////// MAP OBJECT ///////////////////////////// -////////////////////////////////////////////////////////////////////// +declare global { + namespace L.mapbox { + ////////////////////////////////////////////////////////////////////// + ///////////////////////////// MAP OBJECT ///////////////////////////// + ////////////////////////////////////////////////////////////////////// -// Map -////////////////////////////////////////////////////////////////////// + // Map + ////////////////////////////////////////////////////////////////////// -declare namespace L.mapbox { - const accessToken: string; + const accessToken: string; - /** - * Create and automatically configure a map with layers, markers, and interactivity. - */ - function map(element: string|Element, idOrTileJson: any, options?: MapOptions): L.mapbox.Map; + /** + * Create and automatically configure a map with layers, markers, and interactivity. + */ + function map(element: string|Element, idOrTileJson: any, options?: MapOptions): L.mapbox.Map; - interface MapOptions extends L.Map.MapOptions { - featureLayer?: FeatureLayerOptions; - gridLayer?: any; - tileLayer?: TileLayerOptions; - infoControl?: ControlOptions; - legendControl?: ControlOptions; - shareControl?: ShareControlOptions; - } + interface MapOptions extends Leaflet.Map.MapOptions { + featureLayer?: FeatureLayerOptions; + gridLayer?: any; + tileLayer?: TileLayerOptions; + infoControl?: ControlOptions; + legendControl?: ControlOptions; + shareControl?: ShareControlOptions; + } - type FilterFunction = (feature: any) => boolean; + type FilterFunction = (feature: any) => boolean; - interface Map extends L.Map { - tileLayer: L.mapbox.TileLayer; - gridLayer: L.mapbox.GridLayer; - featureLayer: L.mapbox.FeatureLayer; + interface Map extends Leaflet.Map { + tileLayer: L.mapbox.TileLayer; + gridLayer: L.mapbox.GridLayer; + featureLayer: L.mapbox.FeatureLayer; - gridControl: L.mapbox.GridControl; - infoControl: L.mapbox.InfoControl; - legendControl: L.mapbox.LegendControl; - shareControl: L.mapbox.ShareControl; + gridControl: L.mapbox.GridControl; + infoControl: L.mapbox.InfoControl; + legendControl: L.mapbox.LegendControl; + shareControl: L.mapbox.ShareControl; - getTileJSON(): any; - } -} - -////////////////////////////////////////////////////////////////////// -/////////////////////////////// LAYERS /////////////////////////////// -////////////////////////////////////////////////////////////////////// - -// TileLayer -////////////////////////////////////////////////////////////////////// - -declare namespace L.mapbox { - /** - * You can add a tiled layer to your map with L.mapbox.tileLayer(), a simple interface to layers from Mapbox and elsewhere. - */ - function tileLayer(idOrTileJson: string, options?: TileLayerOptions): L.mapbox.TileLayer; - - interface TileLayerOptions extends L.TileLayerOptions { - retinaVersion?: string; - } - - interface TileLayer extends L.TileLayer { - /** - * Returns this layer's TileJSON object which determines its tile source, zoom bounds and other metadata. - */ - getTileJSON(): any; - - /** - * Set the image format of tiles in this layer. You can use lower-quality tiles in order to load maps faster - */ - setFormat(format: string): TileLayer; - } -} - -// GridLayer -////////////////////////////////////////////////////////////////////// - -declare namespace L.mapbox { - /** - * An L.mapbox.gridLayer loads UTFGrid tiles of interactivity into your map, which you can easily access with L.mapbox.gridControl. - */ - function gridLayer(idOrTileJson: any): L.mapbox.GridLayer; - - interface GridLayer { - active(): boolean; - addTo(map: L.mapbox.Map): any; - onAdd(map: L.mapbox.Map): any; - onRemove(): any; - - /** - * Bind an event handler to a given event on this L.mapbox.gridLayer instance. GridLayers expose a number of useful events that give you access to UTFGrid data as the user interacts with the map. - */ - on(event: string, handler: Function, context?: any): any; - - /** - * Returns this layer's TileJSON object which determines its tile source, zoom bounds and other metadata. - */ - getTileJSON(): any; - - /** - * Load data for a given latitude, longitude point on the map, and call the callback function with that data, if any. - */ - getData(latlng: L.LatLng, callback: Function): any; - } -} - -// FeatureLayer -////////////////////////////////////////////////////////////////////// - -declare namespace L.mapbox { - /** - * L.mapbox.featureLayer provides an easy way to integrate GeoJSON from Mapbox and elsewhere into your map. - */ - function featureLayer(idOrGeoJson?: any, options?: FeatureLayerOptions): L.mapbox.FeatureLayer; - - interface FeatureLayerOptions { - filter?: FilterFunction; - sanitizer?: (template: string) => string; - } - - interface FeatureLayer extends L.FeatureGroup { - /** - * Load GeoJSON data for this layer from the URL given by url. - */ - loadURL(url: string): any; - - /** - * Load marker GeoJSON data from a map with the given id on Mapbox. - */ - loadID(id: string): any; - - /** - * Sets the filter function for this data layer. - */ - setFilter(filter: FilterFunction): any; - - /** - * Gets the filter function for this data layer. - */ - getFilter(): FilterFunction; - - /** - * Set the contents of a markers layer: run the provided features through - * the filter function and then through the factory function to create - * elements for the map. If the layer already has features, they are - * replaced with the new features. An empty array will clear the - * layer of all features. - */ - setGeoJSON(geojson: any): L.mapbox.FeatureLayer; - - /** - * Get the contents of this layer as GeoJSON data. - */ - getGeoJSON(): any; - } -} - -////////////////////////////////////////////////////////////////////// -////////////////////////////// GEOCODING ///////////////////////////// -////////////////////////////////////////////////////////////////////// - -// Geocoder -////////////////////////////////////////////////////////////////////// - -declare namespace L.mapbox { - /** - * A low-level interface to geocoding, useful for more complex uses and reverse-geocoding. - */ - function geocoder(id: string): L.mapbox.Geocoder; - - interface Geocoder { - getURL(): string; - setURL(url: string): any; - setID(id: string): any; - setTileJSON(tilejson: any): any; - queryURL(url: string): string; - - /** - * Queries the geocoder with a query string, and returns its result, if any. - */ - query(queryString: string, callback: Function): any; - - /** - * Queries the geocoder with a location, and returns its result, if any. - */ - reverseQuery(location: any, callback: Function): any; - } -} - -////////////////////////////////////////////////////////////////////// -//////////////////////////////// CONTROLS //////////////////////////// -////////////////////////////////////////////////////////////////////// - -declare namespace L.mapbox { - interface ControlOptions extends L.ControlOptions { - sanitizer?: (template: string) => string; - } -} - -// InfoControl -////////////////////////////////////////////////////////////////////// - -declare namespace L.mapbox { - /** - * A map control that shows a toggleable info container. If set, attribution is auto-detected from active layers and added to the info container. - */ - function infoControl(options?: ControlOptions): InfoControl; - - interface InfoControl extends L.Control { - onAdd(map: L.mapbox.Map): any; - onRemove(map: L.mapbox.Map): any; - - /** - * Adds an info string to infoControl. - */ - addInfo(info: string): any; - - /** - * Removes an info string from infoControl - */ - removeInfo(info: string): any; - } -} - -// LegendControl -////////////////////////////////////////////////////////////////////// - -declare namespace L.mapbox { - /** - * A map control that shows legends added to maps in Mapbox. - * Legends are auto-detected from active layers. - */ - function legendControl(options?: ControlOptions): LegendControl; - - interface LegendControl extends L.Control { - onAdd(map: L.mapbox.Map): any; - - /** - * Adds a legend to the legendControl. - */ - addLegend(legend: string): any; - - /** - * Removes a legend from the legendControl. - */ - removeLegend(legend: string): any; - } -} - -// GridControl -////////////////////////////////////////////////////////////////////// - -declare namespace L.mapbox { - /** - * Interaction is what we call interactive parts of maps that are created with - * the powerful tooltips & regions system in TileMill. Under the hood, it's powered by the open UTFGrid specification. - */ - function gridControl(layer: string, options?: GridControlOptions): GridControl; - - interface GridControlOptions extends ControlOptions { - template?: string; - follow?: boolean; - pinnable?: boolean; - touchTeaser?: boolean; - location?: boolean; - } - - interface GridControl extends L.Control { - onAdd(map: L.mapbox.Map): any; - onRemove(map: L.mapbox.Map): any; - - /** - * If a tooltip is currently shown by the gridControl, hide and close it. - */ - hide(): any; - - /** - * Change the Mustache template used to transform the UTFGrid data in the map's interactivity into HTML for display. - */ - setTemplate(template: string): any; - } -} - -// GeocoderControl -////////////////////////////////////////////////////////////////////// - -declare namespace L.mapbox { - /** - * Adds geocoder functionality as well as a UI element to a map. This uses the Mapbox Geocoding API. - */ - function geocoderControl(id: string, options?: GeocoderControlOptions): GeocoderControl; - - interface GeocoderControlOptions extends L.ControlOptions { - keepOpen?: boolean; - } - - interface GeocoderControl { - getURL(): string; - onAdd(map: L.mapbox.Map): any; - - /** - * Set the url used for geocoding. - */ - setURL(url: string): any; - - /** - * Set the map id used for geocoding. - */ - setID(id: string): any; - - /** - * Set the TileJSON used for geocoding. - */ - setTileJSON(tilejson: any): any; - - /** - * Bind a listener to an event emitted by the geocoder control. Supported additional events are - */ - on(event: string, callback: Function): any; - } -} - -// ShareControl -////////////////////////////////////////////////////////////////////// - -declare namespace L.mapbox { - /** - * Adds a "Share" button to the map, which can be used to share the map to Twitter or Facebook, or generate HTML for a map embed. - */ - function shareControl(id: string, options?: ShareControlOptions): ShareControl; - - interface ShareControlOptions extends L.ControlOptions { - url?: string; - } - - interface ShareControl extends L.Control { - onAdd(map: L.mapbox.Map): any; - } -} - -////////////////////////////////////////////////////////////////////// -////////////////////////////// MARKERS /////////////////////////////// -////////////////////////////////////////////////////////////////////// - -declare namespace L.mapbox.marker { - /** - * A core icon generator used in L.mapbox.marker.style - */ - function icon(feature: any): L.Icon; - - /** - * An icon generator for use in conjunction with pointToLayer to generate markers from the Mapbox Markers API and support the simplestyle-spec for features. - */ - function style(feature: any, latlng: any): L.Marker; -} - -////////////////////////////////////////////////////////////////////// -////////////////////////////// SIMPLESTYLE /////////////////////////// -////////////////////////////////////////////////////////////////////// - -declare namespace L.mapbox.simplestyle { - /** - * Given a GeoJSON Feature with optional simplestyle-spec properties, return an options object formatted to be used as Leaflet Path options. - */ - function style(feature: any): L.PathOptions; -} - -////////////////////////////////////////////////////////////////////// -/////////////////////////////// UTILITY ////////////////////////////// -////////////////////////////////////////////////////////////////////// - -declare namespace L.mapbox { - /** - * A HTML sanitization function, with the same effect as the default value of the sanitizer option of L.mapbox.featureLayer, L.mapbox.gridControl, and L.mapbox.legendControl. - */ - function sanitize(text: string): string; - - /** - * A mustache template rendering function, as used by the templating feature provided by L.mapbox.gridControl. - */ - function template(template: string, data?: any): string; -} - -////////////////////////////////////////////////////////////////////// -///////////////////////////// CONFIGURATION ////////////////////////// -////////////////////////////////////////////////////////////////////// - -declare namespace L.mapbox { - class config { - static FORCE_HTTPS: boolean; - - static HTTP_URLS: string[]; - - static HTTPS_URLS: string[]; + getTileJSON(): any; + } + + ////////////////////////////////////////////////////////////////////// + /////////////////////////////// LAYERS /////////////////////////////// + ////////////////////////////////////////////////////////////////////// + + // TileLayer + ////////////////////////////////////////////////////////////////////// + + /** + * You can add a tiled layer to your map with L.mapbox.tileLayer(), a simple interface to layers from Mapbox and elsewhere. + */ + function tileLayer(idOrTileJson: string, options?: TileLayerOptions): L.mapbox.TileLayer; + + interface TileLayerOptions extends Leaflet.TileLayerOptions { + retinaVersion?: string; + } + + interface TileLayer extends Leaflet.TileLayer { + /** + * Returns this layer's TileJSON object which determines its tile source, zoom bounds and other metadata. + */ + getTileJSON(): any; + + /** + * Set the image format of tiles in this layer. You can use lower-quality tiles in order to load maps faster + */ + setFormat(format: string): TileLayer; + } + + // GridLayer + ////////////////////////////////////////////////////////////////////// + + /** + * An L.mapbox.gridLayer loads UTFGrid tiles of interactivity into your map, which you can easily access with L.mapbox.gridControl. + */ + function gridLayer(idOrTileJson: any): L.mapbox.GridLayer; + + interface GridLayer { + active(): boolean; + addTo(map: L.mapbox.Map): any; + onAdd(map: L.mapbox.Map): any; + onRemove(): any; + + /** + * Bind an event handler to a given event on this L.mapbox.gridLayer instance. GridLayers expose a number of useful events that give you access to UTFGrid data as the user interacts with the map. + */ + on(event: string, handler: Function, context?: any): any; + + /** + * Returns this layer's TileJSON object which determines its tile source, zoom bounds and other metadata. + */ + getTileJSON(): any; + + /** + * Load data for a given latitude, longitude point on the map, and call the callback function with that data, if any. + */ + getData(latlng: Leaflet.LatLng, callback: Function): any; + } + + // FeatureLayer + ////////////////////////////////////////////////////////////////////// + + /** + * L.mapbox.featureLayer provides an easy way to integrate GeoJSON from Mapbox and elsewhere into your map. + */ + function featureLayer(idOrGeoJson?: any, options?: FeatureLayerOptions): L.mapbox.FeatureLayer; + + interface FeatureLayerOptions { + filter?: FilterFunction; + sanitizer?(template: string): string; + } + + interface FeatureLayer extends Leaflet.FeatureGroup { + /** + * Load GeoJSON data for this layer from the URL given by url. + */ + loadURL(url: string): any; + + /** + * Load marker GeoJSON data from a map with the given id on Mapbox. + */ + loadID(id: string): any; + + /** + * Sets the filter function for this data layer. + */ + setFilter(filter: FilterFunction): any; + + /** + * Gets the filter function for this data layer. + */ + getFilter(): FilterFunction; + + /** + * Set the contents of a markers layer: run the provided features through + * the filter function and then through the factory function to create + * elements for the map. If the layer already has features, they are + * replaced with the new features. An empty array will clear the + * layer of all features. + */ + setGeoJSON(geojson: any): L.mapbox.FeatureLayer; + + /** + * Get the contents of this layer as GeoJSON data. + */ + getGeoJSON(): any; + } + + ////////////////////////////////////////////////////////////////////// + ////////////////////////////// GEOCODING ///////////////////////////// + ////////////////////////////////////////////////////////////////////// + + // Geocoder + ////////////////////////////////////////////////////////////////////// + + /** + * A low-level interface to geocoding, useful for more complex uses and reverse-geocoding. + */ + function geocoder(id: string): L.mapbox.Geocoder; + + interface Geocoder { + getURL(): string; + setURL(url: string): any; + setID(id: string): any; + setTileJSON(tilejson: any): any; + queryURL(url: string): string; + + /** + * Queries the geocoder with a query string, and returns its result, if any. + */ + query(queryString: string, callback: Function): any; + + /** + * Queries the geocoder with a location, and returns its result, if any. + */ + reverseQuery(location: any, callback: Function): any; + } + + ////////////////////////////////////////////////////////////////////// + //////////////////////////////// CONTROLS //////////////////////////// + ////////////////////////////////////////////////////////////////////// + + interface ControlOptions extends Leaflet.ControlOptions { + sanitizer?(template: string): string; + } + + // InfoControl + ////////////////////////////////////////////////////////////////////// + + /** + * A map control that shows a toggleable info container. If set, attribution is auto-detected from active layers and added to the info container. + */ + function infoControl(options?: ControlOptions): InfoControl; + + interface InfoControl extends Leaflet.Control { + onAdd(map: L.mapbox.Map): any; + onRemove(map: L.mapbox.Map): any; + + /** + * Adds an info string to infoControl. + */ + addInfo(info: string): any; + + /** + * Removes an info string from infoControl + */ + removeInfo(info: string): any; + } + + // LegendControl + ////////////////////////////////////////////////////////////////////// + + /** + * A map control that shows legends added to maps in Mapbox. + * Legends are auto-detected from active layers. + */ + function legendControl(options?: ControlOptions): LegendControl; + + interface LegendControl extends Leaflet.Control { + onAdd(map: L.mapbox.Map): any; + + /** + * Adds a legend to the legendControl. + */ + addLegend(legend: string): any; + + /** + * Removes a legend from the legendControl. + */ + removeLegend(legend: string): any; + } + + // GridControl + ////////////////////////////////////////////////////////////////////// + + /** + * Interaction is what we call interactive parts of maps that are created with + * the powerful tooltips & regions system in TileMill. Under the hood, it's powered by the open UTFGrid specification. + */ + function gridControl(layer: string, options?: GridControlOptions): GridControl; + + interface GridControlOptions extends ControlOptions { + template?: string; + follow?: boolean; + pinnable?: boolean; + touchTeaser?: boolean; + location?: boolean; + } + + interface GridControl extends Leaflet.Control { + onAdd(map: L.mapbox.Map): any; + onRemove(map: L.mapbox.Map): any; + + /** + * If a tooltip is currently shown by the gridControl, hide and close it. + */ + hide(): any; + + /** + * Change the Mustache template used to transform the UTFGrid data in the map's interactivity into HTML for display. + */ + setTemplate(template: string): any; + } + + // GeocoderControl + ////////////////////////////////////////////////////////////////////// + + /** + * Adds geocoder functionality as well as a UI element to a map. This uses the Mapbox Geocoding API. + */ + function geocoderControl(id: string, options?: GeocoderControlOptions): GeocoderControl; + + interface GeocoderControlOptions extends Leaflet.ControlOptions { + keepOpen?: boolean; + } + + interface GeocoderControl { + getURL(): string; + onAdd(map: L.mapbox.Map): any; + + /** + * Set the url used for geocoding. + */ + setURL(url: string): any; + + /** + * Set the map id used for geocoding. + */ + setID(id: string): any; + + /** + * Set the TileJSON used for geocoding. + */ + setTileJSON(tilejson: any): any; + + /** + * Bind a listener to an event emitted by the geocoder control. Supported additional events are + */ + on(event: string, callback: Function): any; + } + + // ShareControl + ////////////////////////////////////////////////////////////////////// + + /** + * Adds a "Share" button to the map, which can be used to share the map to Twitter or Facebook, or generate HTML for a map embed. + */ + function shareControl(id: string, options?: ShareControlOptions): ShareControl; + + interface ShareControlOptions extends Leaflet.ControlOptions { + url?: string; + } + + interface ShareControl extends Leaflet.Control { + onAdd(map: L.mapbox.Map): any; + } + + ////////////////////////////////////////////////////////////////////// + ////////////////////////////// MARKERS /////////////////////////////// + ////////////////////////////////////////////////////////////////////// + + namespace marker { + /** + * A core icon generator used in L.mapbox.marker.style + */ + function icon(feature: any): Leaflet.Icon; + + /** + * An icon generator for use in conjunction with pointToLayer to generate markers from the Mapbox Markers API and support the simplestyle-spec for features. + */ + function style(feature: any, latlng: any): Leaflet.Marker; + } + + ////////////////////////////////////////////////////////////////////// + ////////////////////////////// SIMPLESTYLE /////////////////////////// + ////////////////////////////////////////////////////////////////////// + + namespace simplestyle { + /** + * Given a GeoJSON Feature with optional simplestyle-spec properties, return an options object formatted to be used as Leaflet Path options. + */ + function style(feature: any): Leaflet.PathOptions; + } + + ////////////////////////////////////////////////////////////////////// + /////////////////////////////// UTILITY ////////////////////////////// + ////////////////////////////////////////////////////////////////////// + + /** + * A HTML sanitization function, with the same effect as the default value of the sanitizer option of L.mapbox.featureLayer, L.mapbox.gridControl, and L.mapbox.legendControl. + */ + function sanitize(text: string): string; + + /** + * A mustache template rendering function, as used by the templating feature provided by L.mapbox.gridControl. + */ + function template(template: string, data?: any): string; + + ////////////////////////////////////////////////////////////////////// + ///////////////////////////// CONFIGURATION ////////////////////////// + ////////////////////////////////////////////////////////////////////// + + class config { + static FORCE_HTTPS: boolean; + + static HTTP_URLS: string[]; + + static HTTPS_URLS: string[]; + } } } diff --git a/types/mapbox/package.json b/types/mapbox/package.json deleted file mode 100644 index 711ba15e43..0000000000 --- a/types/mapbox/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "@types/leaflet": "^0.7" - } -} \ No newline at end of file diff --git a/types/mapbox/tsconfig.json b/types/mapbox/tsconfig.json index 0fdf82e942..a469b979bf 100644 --- a/types/mapbox/tsconfig.json +++ b/types/mapbox/tsconfig.json @@ -9,7 +9,15 @@ "noImplicitThis": true, "strictNullChecks": false, "baseUrl": "../", + "typeRoots": [ + "../" + ], "types": [], + "paths": { + "leaflet": [ + "leaflet/v0" + ] + }, "noEmit": true, "forceConsistentCasingInFileNames": true }, diff --git a/types/mapbox/tslint.json b/types/mapbox/tslint.json index f05741c59b..b0e7084e94 100644 --- a/types/mapbox/tslint.json +++ b/types/mapbox/tslint.json @@ -1,6 +1,6 @@ { "extends": "../tslint.json", "rules": { - "forbidden-types": false + "ban-types": false } } diff --git a/types/memcached/memcached-tests.ts b/types/memcached/memcached-tests.ts index fc11bd9d27..9101471a8a 100644 --- a/types/memcached/memcached-tests.ts +++ b/types/memcached/memcached-tests.ts @@ -6,32 +6,32 @@ namespace main { if (expected !== undefined && typeof expected !== 'string') { throw new Error(); } - }; + } function isArray(expected?: any[]): void { if (expected !== undefined && !Array.isArray(expected)) { throw new Error(); } - }; + } function isNumber(expected?: number): void { if (expected !== undefined && typeof expected !== 'number') { throw new Error(); } - }; + } function isBoolean(expected?: boolean): void { if (expected !== undefined && typeof expected !== 'boolean') { throw new Error(); } - }; + } function isFunction(expected?: (...args: any[]) => void): void { if (expected !== undefined && typeof expected !== 'function') { throw new Error(); } - }; + } function isVoid(expected?: undefined): void { if (expected !== undefined) { throw new Error(); } - }; + } namespace test_global_options { Memcached.config.maxKeySize = 250; @@ -116,11 +116,11 @@ namespace main { isNumber(expected.totalReconnectsFailed); isNumber(expected.totalDownTime); } - memcached.on('issue', err => isIssue(err)); - memcached.on('failure', err => isIssue(err)); - memcached.on('reconnecting', err => isIssue(err)); - memcached.on('reconnect', err => isIssue(err)); - memcached.on('remove', err => isIssue(err)); + memcached.on('issue', isIssue); + memcached.on('failure', isIssue); + memcached.on('reconnecting', isIssue); + memcached.on('reconnect', isIssue); + memcached.on('remove', isIssue); } function isCommandData(expected: Memcached.CommandData) { @@ -372,7 +372,7 @@ namespace main { isString(stat.server); } }); - }; + } namespace test_settings { memcached.settings((err: any, data: Memcached.StatusData[]) => { isArray(data); @@ -380,7 +380,7 @@ namespace main { isString(setting.server); } }); - }; + } namespace test_slabs { memcached.slabs((err: any, data: Memcached.StatusData[]) => { isArray(data); @@ -388,7 +388,7 @@ namespace main { isString(setting.server); } }); - }; + } let promise: Promise; namespace test_items { promise = new Promise(resolve => { @@ -400,7 +400,7 @@ namespace main { resolve(data); }); }); - }; + } namespace test_cachedump { promise.then(data => { for (const node of data) { @@ -418,12 +418,12 @@ namespace main { }); } }); - }; + } namespace test_flush { memcached.flush(function(err, results) { isVoid(this); isArray(results); }); - }; + } } diff --git a/types/merge-descriptors/tslint.json b/types/merge-descriptors/tslint.json index f05741c59b..b0e7084e94 100644 --- a/types/merge-descriptors/tslint.json +++ b/types/merge-descriptors/tslint.json @@ -1,6 +1,6 @@ { "extends": "../tslint.json", "rules": { - "forbidden-types": false + "ban-types": false } } diff --git a/types/mock-raf/index.d.ts b/types/mock-raf/index.d.ts index bbcbe5e444..9c8ab664bd 100644 --- a/types/mock-raf/index.d.ts +++ b/types/mock-raf/index.d.ts @@ -4,9 +4,7 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace MockRaf { - interface Options { - /** The time that should pass during each requestAnimationFrame step in milliseconds. Default is roughly equivalent to default browser behavior. */ time?: number; @@ -16,7 +14,6 @@ declare namespace MockRaf { /** Creates a mockRaf instance, exposing the functions you'll use to interact with the mock. */ interface Creator { - /** * Returns the current now value of the mock. Starts at 0 and increases with each step() taken. * Useful for stubbing out performance.now() or a polyfill when using requestAnimationFrame with timers. @@ -32,9 +29,8 @@ declare namespace MockRaf { /** Takes requestAnimationFrame steps. Fires currently queued callbacks for each step and increments now time for each step. The primary way to interact with a mockRaf instance for testing. */ step(options?: Options): void; } - } declare function MockRaf(): MockRaf.Creator; -export = MockRaf; \ No newline at end of file +export = MockRaf; diff --git a/types/mock-raf/mock-raf-tests.ts b/types/mock-raf/mock-raf-tests.ts index 96ba9531d5..d773d1c760 100644 --- a/types/mock-raf/mock-raf-tests.ts +++ b/types/mock-raf/mock-raf-tests.ts @@ -6,4 +6,4 @@ const id = mockRaf.raf(() => { }); mockRaf.step({ count: 10 }); mockRaf.cancel(id); -console.log(mockRaf.now()); \ No newline at end of file +console.log(mockRaf.now()); diff --git a/types/modernizr/modernizr-tests.ts b/types/modernizr/modernizr-tests.ts index 3e62ae478e..ece0cecb5d 100644 --- a/types/modernizr/modernizr-tests.ts +++ b/types/modernizr/modernizr-tests.ts @@ -1,13 +1,11 @@ - - -declare var $: any; +declare const $: any; window.alert = (thing?: string) => { $('#content').append('
' + thing + '
'); }; $(() => { - var audio = new Audio(); + const audio = new Audio(); audio.src = Modernizr.audio.ogg ? 'background.ogg' : Modernizr.audio.mp3 ? 'background.mp3' : 'background.m4a'; @@ -15,13 +13,13 @@ $(() => { if (Modernizr.webgl) { // loadAllWebGLScripts(); } else { - var msg = 'With a different browser you’ll get to see the WebGL experience here: get.webgl.org.'; + const msg = 'With a different browser you’ll get to see the WebGL experience here: get.webgl.org.'; document.getElementById('#notice').innerHTML = msg; } Modernizr.prefixed('boxSizing'); Modernizr.prefixed('requestAnimationFrame', window); - var ms = Modernizr.prefixed("matchesSelector", HTMLElement.prototype, true); + const ms = Modernizr.prefixed("matchesSelector", HTMLElement.prototype, true); Modernizr.prefixed('requestAnimationFrame', window, false); Modernizr.mq('only all and (max-width: 400px)'); @@ -29,7 +27,7 @@ $(() => { Modernizr.mq('only screen and (max-width: 768px)'); Modernizr.addTest('track', () => { - var video = document.createElement('video'); + const video = document.createElement('video'); return typeof video.addTextTrack === 'function'; }); @@ -45,7 +43,7 @@ $(() => { Modernizr.testAllProps('boxSizing'); - var elem: Element; + const elem: Element = null as any; Modernizr.hasEvent('gesturestart', elem); if (!Modernizr.input.autofocus) { @@ -53,7 +51,6 @@ $(() => { } }); - Modernizr.on('flash', result => { if (result) { // the browser has flash @@ -63,22 +60,22 @@ Modernizr.on('flash', result => { }); Modernizr.addTest('itsTuesday', () => { - var d = new Date(); + const d = new Date(); return d.getDay() === 2; }); Modernizr.addTest('hasJquery', 'jQuery' in window); -var detects = { +const detects = { hasjquery: 'jQuery' in window, itstuesday: () => { - var d = new Date(); + const d = new Date(); return d.getDay() === 2; } }; Modernizr.addTest(detects); -var keyframes = Modernizr.atRule('@keyframes'); +const keyframes = Modernizr.atRule('@keyframes'); if (keyframes) { // keyframes are supported // could be `@-webkit-keyframes` or `@keyframes` @@ -92,25 +89,25 @@ Modernizr.hasEvent('blur'); // true; Modernizr.hasEvent('devicelight', window); // true; -var query = Modernizr.mq('(min-width: 900px)'); +const query = Modernizr.mq('(min-width: 900px)'); if (query) { // the browser window is larger than 900px } Modernizr.prefixed('boxSizing'); -var raf = Modernizr.prefixed('requestAnimationFrame', window); +const raf = Modernizr.prefixed('requestAnimationFrame', window); raf(() => { }); -var rAFProp = Modernizr.prefixed('requestAnimationFrame', window, false); +const rAFProp = Modernizr.prefixed('requestAnimationFrame', window, false); rAFProp === 'WebkitRequestAnimationFrame'; // in older webkit Modernizr.prefixedCSS('transition'); // '-moz-transition' in old Firefox Modernizr.prefixedCSSValue('background', 'linear-gradient(left, red, red)'); -var rule = Modernizr._prefixes.join('transform: rotate(20deg); '); +let rule = Modernizr._prefixes.join('transform: rotate(20deg); '); rule === 'transform: rotate(20deg); webkit-transform: rotate(20deg); moz-transform: rotate(20deg); o-transform: rotate(20deg); ms-transform: rotate(20deg);'; rule = 'display:' + Modernizr._prefixes.join('flex; display:') + 'flex'; diff --git a/types/modesl/index.d.ts b/types/modesl/index.d.ts index 6b1c532bd3..95d34599f6 100644 --- a/types/modesl/index.d.ts +++ b/types/modesl/index.d.ts @@ -104,4 +104,3 @@ export class Server extends EventEmitter { export function eslSetLogLevel(level: any): void; export function setLogLevel(level: any): void; - diff --git a/types/modesl/modesl-tests.ts b/types/modesl/modesl-tests.ts index c3788833d0..6b40281f95 100644 --- a/types/modesl/modesl-tests.ts +++ b/types/modesl/modesl-tests.ts @@ -4,7 +4,6 @@ const freeswitchListener = new modesl.Server(() => { // console.log('Server listening on localhost at port 8022'); }); - const freeswitchConnection = new modesl.Connection("freeswitch-host", 8021, 'password', () => { // console.log('connection initialized'); @@ -31,4 +30,3 @@ const freeswitchConnection = new modesl.Connection("freeswitch-host", 8021, 'pas }); }); }); - diff --git a/types/moment-business/index.d.ts b/types/moment-business/index.d.ts index 90ff725c63..9d400c62dd 100644 --- a/types/moment-business/index.d.ts +++ b/types/moment-business/index.d.ts @@ -2,14 +2,12 @@ // Project: https://github.com/jmeas/moment-business // Definitions by: Greg Sieranski // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - + import * as moment from "moment"; - -declare module "moment-business" { - export function weekDays(startMoment: moment.Moment, endMoment: moment.Moment): number - export function weekendDays(startMoment: moment.Moment, endMoment: moment.Moment): number - export function addWeekDays(moment: moment.Moment, amount: number): moment.Moment - export function subtractWeekDays(moment: moment.Moment, amount: number): moment.Moment - export function isWeekDay(moment: moment.Moment): boolean - export function isWeekendDay(moment: moment.Moment): boolean -} + +export function weekDays(startMoment: moment.Moment, endMoment: moment.Moment): number; +export function weekendDays(startMoment: moment.Moment, endMoment: moment.Moment): number; +export function addWeekDays(moment: moment.Moment, amount: number): moment.Moment; +export function subtractWeekDays(moment: moment.Moment, amount: number): moment.Moment; +export function isWeekDay(moment: moment.Moment): boolean; +export function isWeekendDay(moment: moment.Moment): boolean; diff --git a/types/moment-business/moment-business-tests.ts b/types/moment-business/moment-business-tests.ts index 75f5c23b84..4f8ae296df 100644 --- a/types/moment-business/moment-business-tests.ts +++ b/types/moment-business/moment-business-tests.ts @@ -1,9 +1,9 @@ import * as moment from "moment"; import * as mb from "moment-business"; - -let a = mb.isWeekDay(moment()) -let b = mb.isWeekendDay(moment()); -let c = mb.addWeekDays(moment(), 1); -let d = mb.subtractWeekDays(moment(), 1); -let e = mb.weekDays(moment(), moment()); -let f = mb.weekendDays(moment(), moment()); + +mb.isWeekDay(moment()); +mb.isWeekendDay(moment()); +mb.addWeekDays(moment(), 1); +mb.subtractWeekDays(moment(), 1); +mb.weekDays(moment(), moment()); +mb.weekendDays(moment(), moment()); diff --git a/types/moment-timezone/moment-timezone-tests.ts b/types/moment-timezone/moment-timezone-tests.ts index 2d728fc70e..7355142466 100644 --- a/types/moment-timezone/moment-timezone-tests.ts +++ b/types/moment-timezone/moment-timezone-tests.ts @@ -1,18 +1,16 @@ - - import moment = require('moment-timezone'); -var june = moment("2014-06-01T12:00:00Z"); +const june = moment("2014-06-01T12:00:00Z"); june.tz('America/Los_Angeles').format('ha z'); -var a = moment.tz("2013-11-18 11:55", "America/Toronto"); -var b = moment.tz("May 12th 2014 8PM", "MMM Do YYYY hA", "America/Toronto"); -var c = moment.tz(1403454068850, "America/Toronto"); -var d = moment.tz("May 12th 2014 8PM", "MMM Do YYYY hA", true, "America/Toronto"); +const a = moment.tz("2013-11-18 11:55", "America/Toronto"); +const b = moment.tz("May 12th 2014 8PM", "MMM Do YYYY hA", "America/Toronto"); +const c = moment.tz(1403454068850, "America/Toronto"); +const d = moment.tz("May 12th 2014 8PM", "MMM Do YYYY hA", true, "America/Toronto"); a.tz(); -var num = 1367337600000, +const num = 1367337600000, arr = [2013, 5, 1], str = "2013-12-01", date = new Date(2013, 4, 1), @@ -53,7 +51,7 @@ moment.tz(obj, "America/Los_Angeles"); moment.tz.zone('America/Los_Angeles').abbr(1403465838805); moment.tz.zone('America/Los_Angeles').offset(1403465838805); -var zone = moment.tz.zone('America/New_York'); +const zone = moment.tz.zone('America/New_York'); zone.parse(Date.UTC(2012, 2, 19, 8, 30)); // 240 moment.tz.add('America/Los_Angeles|PST PDT|80 70|0101|1Lzm0 1zb0 Op0'); @@ -80,7 +78,6 @@ moment.tz.setDefault('America/Los_Angeles'); moment.tz.guess(); -var zoneAbbr: string = moment.tz('America/Los_Angeles').zoneAbbr(); - -var zoneName: string = moment.tz('America/Los_Angeles').zoneName(); +const zoneAbbr: string = moment.tz('America/Los_Angeles').zoneAbbr(); +const zoneName: string = moment.tz('America/Los_Angeles').zoneName(); diff --git a/types/mqtt/index.d.ts b/types/mqtt/index.d.ts index f52aede457..09c04f6236 100644 --- a/types/mqtt/index.d.ts +++ b/types/mqtt/index.d.ts @@ -11,7 +11,7 @@ declare namespace mqtt { import EventEmitter = NodeJS.EventEmitter; interface Packet { - messageId: string; + messageId: number; [key: string]: any; } diff --git a/types/msgpack/index.d.ts b/types/msgpack/index.d.ts index 7d15442ce3..9d318641ae 100644 --- a/types/msgpack/index.d.ts +++ b/types/msgpack/index.d.ts @@ -3,81 +3,86 @@ // Definitions by: Shinya Mochizuki // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -interface MsgPackStatic { - /** - * @param data string or ByteArray. - * @param toString return string value if true. - * - * @return string or ByteArray or false. pack failed if false. - */ - pack(data: any, toString?: boolean): any; +declare namespace msgpack { + interface MsgPackStatic { + /** + * @param data string or ByteArray. + * @param toString return string value if true. + * + * @return string or ByteArray or false. pack failed if false. + */ + pack(data: any, toString?: boolean): any; - /** - * @param data string or ByteArray. - * - * @return string or ByteArray or undefined. unpack failed if undefined. - */ - unpack(data: any): any; + /** + * @param data string or ByteArray. + * + * @return string or ByteArray or undefined. unpack failed if undefined. + */ + unpack(data: any): any; - worker: string; + worker: string; - upload(url: string, option: MsgPackUploadOption, callback: MsgPackUploadCallback): void; + upload(url: string, option: MsgPackUploadOption, callback: MsgPackUploadCallback): void; - download(url: string, option: MsgPackDownloadOption, callback: MsgPackDownloadCallback): void; + download(url: string, option: MsgPackDownloadOption, callback: MsgPackDownloadCallback): void; + } + + interface MsgPackUploadOption { + /** + * string or ByteArray + */ + data: any; + + /** + * use WebWorker if true. + */ + worker?: boolean; + + /** + * timeout sec. + */ + timeout?: number; + + before?: (xhr: XMLHttpRequest, option: MsgPackUploadOption) => void; + + after?: (xhr: XMLHttpRequest, option: MsgPackUploadOption, result: MsgPackCallbackResult) => void; + } + + interface MsgPackUploadCallback { + (data: string, option: MsgPackUploadOption, result: MsgPackCallbackResult): void; + } + + interface MsgPackDownloadOption { + /** + * use WebWorker if true. + */ + worker?: boolean; + + /** + * timeout sec. + */ + timeout?: number; + + before?: (xhr: XMLHttpRequest, option: MsgPackDownloadOption) => void; + + after?: (xhr: XMLHttpRequest, option: MsgPackDownloadOption, result: MsgPackCallbackResult) => void; + } + + interface MsgPackDownloadCallback { + /** + * @param data string or ByteArray + */ + (data: any, option: MsgPackDownloadCallback, result: MsgPackCallbackResult): void; + } + + interface MsgPackCallbackResult { + status: number; + + ok: boolean; + } } -interface MsgPackUploadOption { - /** - * string or ByteArray - */ - data: any; +declare var msgpack: msgpack.MsgPackStatic; - /** - * use WebWorker if true. - */ - worker?: boolean; - - /** - * timeout sec. - */ - timeout?: number; - - before?: (xhr: XMLHttpRequest, option: MsgPackUploadOption) => void; - - after?: (xhr: XMLHttpRequest, option: MsgPackUploadOption, result: MsgPackCallbackResult) => void; -} - -interface MsgPackUploadCallback { - (data: string, option: MsgPackUploadOption, result: MsgPackCallbackResult): void; -} - -interface MsgPackDownloadOption { - /** - * use WebWorker if true. - */ - worker?: boolean; - - /** - * timeout sec. - */ - timeout?: number; - - before?: (xhr: XMLHttpRequest, option: MsgPackDownloadOption) => void; - - after?: (xhr: XMLHttpRequest, option: MsgPackDownloadOption, result: MsgPackCallbackResult) => void; -} - -interface MsgPackDownloadCallback { - /** - * @param data string or ByteArray - */ - (data: any, option: MsgPackDownloadCallback, result: MsgPackCallbackResult): void; -} - -interface MsgPackCallbackResult { - status: number; - - ok: boolean; -} - -declare var msgpack: MsgPackStatic; +export = msgpack; +export as namespace msgpack; diff --git a/types/msgpack/msgpack-tests.ts b/types/msgpack/msgpack-tests.ts index da0d12b926..b0b9a716a0 100644 --- a/types/msgpack/msgpack-tests.ts +++ b/types/msgpack/msgpack-tests.ts @@ -1,5 +1,3 @@ - - var packed = msgpack.pack(""); msgpack.unpack(packed); @@ -12,17 +10,17 @@ var uploadOption = { data: "", worker: false, timeout: 10, - before: (xhr: XMLHttpRequest, option: MsgPackUploadOption) => { }, - after: (xhr: XMLHttpRequest, option: MsgPackUploadOption, result: MsgPackCallbackResult) => { } + before: (xhr: XMLHttpRequest, option: msgpack.MsgPackUploadOption) => { }, + after: (xhr: XMLHttpRequest, option: msgpack.MsgPackUploadOption, result: msgpack.MsgPackCallbackResult) => { } }; -var uploadCallback = (data: string, option: MsgPackUploadOption, result: MsgPackCallbackResult) => { }; +var uploadCallback = (data: string, option: msgpack.MsgPackUploadOption, result: msgpack.MsgPackCallbackResult) => { }; msgpack.upload(url, uploadOption, uploadCallback); var downloadOption = { worker: false, timeout: 10, - before: (xhr: XMLHttpRequest, option: MsgPackDownloadOption) => { }, - after: (xhr: XMLHttpRequest, option: MsgPackDownloadOption, result: MsgPackCallbackResult) => { } + before: (xhr: XMLHttpRequest, option: msgpack.MsgPackDownloadOption) => { }, + after: (xhr: XMLHttpRequest, option: msgpack.MsgPackDownloadOption, result: msgpack.MsgPackCallbackResult) => { } }; -var downloadCallback = (data: any, option: MsgPackDownloadOption, result: MsgPackCallbackResult) => { }; +var downloadCallback = (data: any, option: msgpack.MsgPackDownloadOption, result: msgpack.MsgPackCallbackResult) => { }; msgpack.download(url, downloadOption, downloadCallback); diff --git a/types/multimatch/index.d.ts b/types/multimatch/index.d.ts new file mode 100644 index 0000000000..7130cafbd0 --- /dev/null +++ b/types/multimatch/index.d.ts @@ -0,0 +1,73 @@ +// Type definitions for multimatch 2.1 +// Project: https://github.com/sindresorhus/multimatch +// Definitions by: Stephen Lautier +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/** + * Match utility function which supports multiple pattern globbing. + * + * @param {string[]} paths list to match against. + * @param {string[]} patterns globbing patterns to use. e.g. `[*, "!cake"]`. + * @param {multimatch.MultimatchOptions} [options] + * @returns {string[]} + */ +declare function multimatch(paths: string[], patterns: string | string[], options?: multimatch.MultimatchOptions): string[]; + +declare namespace multimatch { + + /** + * Options based on [minimatch](https://github.com/isaacs/minimatch#minimatchmatchlist-pattern-options) + */ + interface MultimatchOptions { + /** Dump a ton of stuff to stderr. */ + debug?: boolean; + + /** Do not expand `{a,b}` and `{1..3}` brace sets. */ + nobrace?: boolean; + + /** Disable `**` matching against multiple folder names. */ + noglobstar?: boolean; + + /** + * Allow patterns to match filenames starting with a period, even if + * the pattern does not explicitly have a period in that spot. + * + * Note that by default, `a/** /b` will **not** match `a/.d/b`, unless `dot` is set. + */ + dot?: boolean; + + /** Disable "extglob" style patterns like `+(a|b)`. */ + noext?: boolean; + + /** Perform a case-insensitive match. */ + nocase?: boolean; + + /** + * When a match is not found by `minimatch.match`, return a list containing + * the pattern itself if this option is set. When not set, an empty list + * is returned if there are no matches. + */ + nonull?: boolean; + + /** + * If set, then patterns without slashes will be matched + * against the basename of the path if it contains slashes. For example, + * `a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`. + */ + matchBase?: boolean; + + /** Suppress the behavior of treating `#` at the start of a pattern as a comment. */ + nocomment?: boolean; + + /** Suppress the behavior of treating a leading `!` character as negation. */ + nonegate?: boolean; + + /** Returns from negate expressions the same as if they were not negated. + * (Ie, true on a hit, false on a miss.) + */ + flipNegate?: boolean; + } + +} + +export = multimatch; diff --git a/types/multimatch/multimatch-tests.ts b/types/multimatch/multimatch-tests.ts new file mode 100644 index 0000000000..b8c9cac658 --- /dev/null +++ b/types/multimatch/multimatch-tests.ts @@ -0,0 +1,9 @@ +import * as multimatch from "multimatch"; + +const options: multimatch.MultimatchOptions = { + debug: true +}; + +multimatch(["unicorn", "cake", "rainbows"], "!cake"); +multimatch(["unicorn", "cake", "rainbows"], ["*", "!cake"]); +multimatch(["unicorn", "cake", "rainbows"], ["*", "!cake"], options); diff --git a/types/multimatch/tsconfig.json b/types/multimatch/tsconfig.json new file mode 100644 index 0000000000..3f5a4db2ac --- /dev/null +++ b/types/multimatch/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "multimatch-tests.ts" + ] +} diff --git a/types/multimatch/tslint.json b/types/multimatch/tslint.json new file mode 100644 index 0000000000..377cc837d4 --- /dev/null +++ b/types/multimatch/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } diff --git a/types/navigation-react/index.d.ts b/types/navigation-react/index.d.ts index 32ee6570f3..106b14bf43 100644 --- a/types/navigation-react/index.d.ts +++ b/types/navigation-react/index.d.ts @@ -22,7 +22,7 @@ interface LinkProps extends HTMLProps { /** * Handles Link click events */ - navigating?: (e: MouseEvent, domId: string, link: string) => boolean; + navigating?(e: MouseEvent, domId: string, link: string): boolean; /** * The State Navigator */ diff --git a/types/nedb/index.d.ts b/types/nedb/index.d.ts index ea5a9e8d4e..d85016493e 100644 --- a/types/nedb/index.d.ts +++ b/types/nedb/index.d.ts @@ -181,11 +181,11 @@ declare namespace Nedb { nodeWebkitAppName?: boolean; // Optional, specify the name of your NW app if you want options.filename to be relative to the directory where autoload?: boolean; // Optional, defaults to false // Optional, if autoload is used this will be called after the load database with the error object as parameter. If you don't pass it the error will be thrown - onload?: (error: Error) => any; + onload?(error: Error): any; // (optional): hook you can use to transform data after it was serialized and before it is written to disk. // Can be used for example to encrypt data before writing database to disk. // This function takes a string as parameter (one line of an NeDB data file) and outputs the transformed string, which must absolutely not contain a \n character (or data will be lost) - afterSerialization?: (line: string) => string; + afterSerialization?(line: string): string; // (optional): reverse of afterSerialization. // Make sure to include both and not just one or you risk data loss. // For the same reason, make sure both functions are inverses of one another. @@ -193,7 +193,7 @@ declare namespace Nedb { // NeDB checks that never one is declared without the other, and checks that they are reverse of one another by testing on random strings of various lengths. // In addition, if too much data is detected as corrupt, // NeDB will refuse to start as it could mean you're not using the deserialization hook corresponding to the serialization hook used before (see below) - beforeDeserialization?: (line: string) => string; + beforeDeserialization?(line: string): string; // (optional): between 0 and 1, defaults to 10%. NeDB will refuse to start if more than this percentage of the datafile is corrupt. // 0 means you don't tolerate any corruption, 1 means you don't care corruptAlertThreshold?: number; diff --git a/types/ng-stomp/tslint.json b/types/ng-stomp/tslint.json index 2ab0c36fa8..867dfe94d3 100644 --- a/types/ng-stomp/tslint.json +++ b/types/ng-stomp/tslint.json @@ -1,6 +1,6 @@ { "extends": "../tslint.json", "rules": { - "forbidden-types": false + "ban-types": false } } \ No newline at end of file diff --git a/types/node-waves/index.d.ts b/types/node-waves/index.d.ts index ce5c63da2e..60114e79e8 100644 --- a/types/node-waves/index.d.ts +++ b/types/node-waves/index.d.ts @@ -21,7 +21,6 @@ export interface WavesConfig { } export interface RippleOptions { - /** * Specify how long to wait between starting and stopping the ripple. * diff --git a/types/node-waves/node-waves-tests.ts b/types/node-waves/node-waves-tests.ts index adfb59703a..b9eac6682e 100644 --- a/types/node-waves/node-waves-tests.ts +++ b/types/node-waves/node-waves-tests.ts @@ -1,4 +1,3 @@ - import { init, ripple, attach, calm } from "node-waves"; init({ delay: 300 }); diff --git a/types/node-xmpp-client/index.d.ts b/types/node-xmpp-client/index.d.ts index 1747740be7..02f8a64e59 100644 --- a/types/node-xmpp-client/index.d.ts +++ b/types/node-xmpp-client/index.d.ts @@ -67,5 +67,5 @@ interface XmppOptions { interface Bosh { url?: string; - prebind?: (error: any, data: any) => void; + prebind?(error: any, data: any): void; } diff --git a/types/node-xmpp-core/index.d.ts b/types/node-xmpp-core/index.d.ts index 68d985b666..8c552c08f2 100644 --- a/types/node-xmpp-core/index.d.ts +++ b/types/node-xmpp-core/index.d.ts @@ -66,17 +66,17 @@ export class JID { /** * Convenience method to distinguish users - **/ + */ bare(): JID; /** * Comparison function - **/ + */ equals(other: JID): boolean; /** * http://xmpp.org/rfcs/rfc6122.html#addressing-localpart - **/ + */ setLocal(local: string, escape?: any): void; getLocal(unescape?: any): string; diff --git a/types/node/index.d.ts b/types/node/index.d.ts index e7dbe3c1a7..f132b2e64f 100644 --- a/types/node/index.d.ts +++ b/types/node/index.d.ts @@ -1209,7 +1209,7 @@ declare module "os" { export function userInfo(options?: { encoding: string }): { username: string, uid: number, gid: number, shell: any, homedir: string } export var constants: { UV_UDP_REUSEADDR: number, - errno: { + signals: { SIGHUP: number; SIGINT: number; SIGQUIT: number; @@ -1245,7 +1245,7 @@ declare module "os" { SIGSYS: number; SIGUNUSED: number; }, - signals: { + errno: { E2BIG: number; EACCES: number; EADDRINUSE: number; diff --git a/types/node/node-tests.ts b/types/node/node-tests.ts index 63067a9305..568d15d096 100644 --- a/types/node/node-tests.ts +++ b/types/node/node-tests.ts @@ -1591,6 +1591,129 @@ namespace os_tests { result = os.networkInterfaces(); } + + { + let result: number; + + result = os.constants.signals.SIGHUP; + result = os.constants.signals.SIGINT; + result = os.constants.signals.SIGQUIT; + result = os.constants.signals.SIGILL; + result = os.constants.signals.SIGTRAP; + result = os.constants.signals.SIGABRT; + result = os.constants.signals.SIGIOT; + result = os.constants.signals.SIGBUS; + result = os.constants.signals.SIGFPE; + result = os.constants.signals.SIGKILL; + result = os.constants.signals.SIGUSR1; + result = os.constants.signals.SIGSEGV; + result = os.constants.signals.SIGUSR2; + result = os.constants.signals.SIGPIPE; + result = os.constants.signals.SIGALRM; + result = os.constants.signals.SIGTERM; + result = os.constants.signals.SIGCHLD; + result = os.constants.signals.SIGSTKFLT; + result = os.constants.signals.SIGCONT; + result = os.constants.signals.SIGSTOP; + result = os.constants.signals.SIGTSTP; + result = os.constants.signals.SIGTTIN; + result = os.constants.signals.SIGTTOU; + result = os.constants.signals.SIGURG; + result = os.constants.signals.SIGXCPU; + result = os.constants.signals.SIGXFSZ; + result = os.constants.signals.SIGVTALRM; + result = os.constants.signals.SIGPROF; + result = os.constants.signals.SIGWINCH; + result = os.constants.signals.SIGIO; + result = os.constants.signals.SIGPOLL; + result = os.constants.signals.SIGPWR; + result = os.constants.signals.SIGSYS; + result = os.constants.signals.SIGUNUSED; + } + + { + let result: number; + + result = os.constants.errno.E2BIG; + result = os.constants.errno.EACCES; + result = os.constants.errno.EADDRINUSE; + result = os.constants.errno.EADDRNOTAVAIL; + result = os.constants.errno.EAFNOSUPPORT; + result = os.constants.errno.EAGAIN; + result = os.constants.errno.EALREADY; + result = os.constants.errno.EBADF; + result = os.constants.errno.EBADMSG; + result = os.constants.errno.EBUSY; + result = os.constants.errno.ECANCELED; + result = os.constants.errno.ECHILD; + result = os.constants.errno.ECONNABORTED; + result = os.constants.errno.ECONNREFUSED; + result = os.constants.errno.ECONNRESET; + result = os.constants.errno.EDEADLK; + result = os.constants.errno.EDESTADDRREQ; + result = os.constants.errno.EDOM; + result = os.constants.errno.EDQUOT; + result = os.constants.errno.EEXIST; + result = os.constants.errno.EFAULT; + result = os.constants.errno.EFBIG; + result = os.constants.errno.EHOSTUNREACH; + result = os.constants.errno.EIDRM; + result = os.constants.errno.EILSEQ; + result = os.constants.errno.EINPROGRESS; + result = os.constants.errno.EINTR; + result = os.constants.errno.EINVAL; + result = os.constants.errno.EIO; + result = os.constants.errno.EISCONN; + result = os.constants.errno.EISDIR; + result = os.constants.errno.ELOOP; + result = os.constants.errno.EMFILE; + result = os.constants.errno.EMLINK; + result = os.constants.errno.EMSGSIZE; + result = os.constants.errno.EMULTIHOP; + result = os.constants.errno.ENAMETOOLONG; + result = os.constants.errno.ENETDOWN; + result = os.constants.errno.ENETRESET; + result = os.constants.errno.ENETUNREACH; + result = os.constants.errno.ENFILE; + result = os.constants.errno.ENOBUFS; + result = os.constants.errno.ENODATA; + result = os.constants.errno.ENODEV; + result = os.constants.errno.ENOENT; + result = os.constants.errno.ENOEXEC; + result = os.constants.errno.ENOLCK; + result = os.constants.errno.ENOLINK; + result = os.constants.errno.ENOMEM; + result = os.constants.errno.ENOMSG; + result = os.constants.errno.ENOPROTOOPT; + result = os.constants.errno.ENOSPC; + result = os.constants.errno.ENOSR; + result = os.constants.errno.ENOSTR; + result = os.constants.errno.ENOSYS; + result = os.constants.errno.ENOTCONN; + result = os.constants.errno.ENOTDIR; + result = os.constants.errno.ENOTEMPTY; + result = os.constants.errno.ENOTSOCK; + result = os.constants.errno.ENOTSUP; + result = os.constants.errno.ENOTTY; + result = os.constants.errno.ENXIO; + result = os.constants.errno.EOPNOTSUPP; + result = os.constants.errno.EOVERFLOW; + result = os.constants.errno.EPERM; + result = os.constants.errno.EPIPE; + result = os.constants.errno.EPROTO; + result = os.constants.errno.EPROTONOSUPPORT; + result = os.constants.errno.EPROTOTYPE; + result = os.constants.errno.ERANGE; + result = os.constants.errno.EROFS; + result = os.constants.errno.ESPIPE; + result = os.constants.errno.ESRCH; + result = os.constants.errno.ESTALE; + result = os.constants.errno.ETIME; + result = os.constants.errno.ETIMEDOUT; + result = os.constants.errno.ETXTBSY; + result = os.constants.errno.EWOULDBLOCK; + result = os.constants.errno.EXDEV; + } } //////////////////////////////////////////////////// diff --git a/types/node/v6/index.d.ts b/types/node/v6/index.d.ts index da214056fc..f18f006e0c 100644 --- a/types/node/v6/index.d.ts +++ b/types/node/v6/index.d.ts @@ -1152,7 +1152,7 @@ declare module "os" { export function userInfo(options?: { encoding: string }): { username: string, uid: number, gid: number, shell: any, homedir: string } export var constants: { UV_UDP_REUSEADDR: number, - errno: { + signals: { SIGHUP: number; SIGINT: number; SIGQUIT: number; @@ -1188,7 +1188,7 @@ declare module "os" { SIGSYS: number; SIGUNUSED: number; }, - signals: { + errno: { E2BIG: number; EACCES: number; EADDRINUSE: number; diff --git a/types/node/v6/node-tests.ts b/types/node/v6/node-tests.ts index 8711d60974..2348bd2dd6 100644 --- a/types/node/v6/node-tests.ts +++ b/types/node/v6/node-tests.ts @@ -1508,6 +1508,129 @@ namespace os_tests { result = os.networkInterfaces(); } + + { + let result: number; + + result = os.constants.signals.SIGHUP; + result = os.constants.signals.SIGINT; + result = os.constants.signals.SIGQUIT; + result = os.constants.signals.SIGILL; + result = os.constants.signals.SIGTRAP; + result = os.constants.signals.SIGABRT; + result = os.constants.signals.SIGIOT; + result = os.constants.signals.SIGBUS; + result = os.constants.signals.SIGFPE; + result = os.constants.signals.SIGKILL; + result = os.constants.signals.SIGUSR1; + result = os.constants.signals.SIGSEGV; + result = os.constants.signals.SIGUSR2; + result = os.constants.signals.SIGPIPE; + result = os.constants.signals.SIGALRM; + result = os.constants.signals.SIGTERM; + result = os.constants.signals.SIGCHLD; + result = os.constants.signals.SIGSTKFLT; + result = os.constants.signals.SIGCONT; + result = os.constants.signals.SIGSTOP; + result = os.constants.signals.SIGTSTP; + result = os.constants.signals.SIGTTIN; + result = os.constants.signals.SIGTTOU; + result = os.constants.signals.SIGURG; + result = os.constants.signals.SIGXCPU; + result = os.constants.signals.SIGXFSZ; + result = os.constants.signals.SIGVTALRM; + result = os.constants.signals.SIGPROF; + result = os.constants.signals.SIGWINCH; + result = os.constants.signals.SIGIO; + result = os.constants.signals.SIGPOLL; + result = os.constants.signals.SIGPWR; + result = os.constants.signals.SIGSYS; + result = os.constants.signals.SIGUNUSED; + } + + { + let result: number; + + result = os.constants.errno.E2BIG; + result = os.constants.errno.EACCES; + result = os.constants.errno.EADDRINUSE; + result = os.constants.errno.EADDRNOTAVAIL; + result = os.constants.errno.EAFNOSUPPORT; + result = os.constants.errno.EAGAIN; + result = os.constants.errno.EALREADY; + result = os.constants.errno.EBADF; + result = os.constants.errno.EBADMSG; + result = os.constants.errno.EBUSY; + result = os.constants.errno.ECANCELED; + result = os.constants.errno.ECHILD; + result = os.constants.errno.ECONNABORTED; + result = os.constants.errno.ECONNREFUSED; + result = os.constants.errno.ECONNRESET; + result = os.constants.errno.EDEADLK; + result = os.constants.errno.EDESTADDRREQ; + result = os.constants.errno.EDOM; + result = os.constants.errno.EDQUOT; + result = os.constants.errno.EEXIST; + result = os.constants.errno.EFAULT; + result = os.constants.errno.EFBIG; + result = os.constants.errno.EHOSTUNREACH; + result = os.constants.errno.EIDRM; + result = os.constants.errno.EILSEQ; + result = os.constants.errno.EINPROGRESS; + result = os.constants.errno.EINTR; + result = os.constants.errno.EINVAL; + result = os.constants.errno.EIO; + result = os.constants.errno.EISCONN; + result = os.constants.errno.EISDIR; + result = os.constants.errno.ELOOP; + result = os.constants.errno.EMFILE; + result = os.constants.errno.EMLINK; + result = os.constants.errno.EMSGSIZE; + result = os.constants.errno.EMULTIHOP; + result = os.constants.errno.ENAMETOOLONG; + result = os.constants.errno.ENETDOWN; + result = os.constants.errno.ENETRESET; + result = os.constants.errno.ENETUNREACH; + result = os.constants.errno.ENFILE; + result = os.constants.errno.ENOBUFS; + result = os.constants.errno.ENODATA; + result = os.constants.errno.ENODEV; + result = os.constants.errno.ENOENT; + result = os.constants.errno.ENOEXEC; + result = os.constants.errno.ENOLCK; + result = os.constants.errno.ENOLINK; + result = os.constants.errno.ENOMEM; + result = os.constants.errno.ENOMSG; + result = os.constants.errno.ENOPROTOOPT; + result = os.constants.errno.ENOSPC; + result = os.constants.errno.ENOSR; + result = os.constants.errno.ENOSTR; + result = os.constants.errno.ENOSYS; + result = os.constants.errno.ENOTCONN; + result = os.constants.errno.ENOTDIR; + result = os.constants.errno.ENOTEMPTY; + result = os.constants.errno.ENOTSOCK; + result = os.constants.errno.ENOTSUP; + result = os.constants.errno.ENOTTY; + result = os.constants.errno.ENXIO; + result = os.constants.errno.EOPNOTSUPP; + result = os.constants.errno.EOVERFLOW; + result = os.constants.errno.EPERM; + result = os.constants.errno.EPIPE; + result = os.constants.errno.EPROTO; + result = os.constants.errno.EPROTONOSUPPORT; + result = os.constants.errno.EPROTOTYPE; + result = os.constants.errno.ERANGE; + result = os.constants.errno.EROFS; + result = os.constants.errno.ESPIPE; + result = os.constants.errno.ESRCH; + result = os.constants.errno.ESTALE; + result = os.constants.errno.ETIME; + result = os.constants.errno.ETIMEDOUT; + result = os.constants.errno.ETXTBSY; + result = os.constants.errno.EWOULDBLOCK; + result = os.constants.errno.EXDEV; + } } //////////////////////////////////////////////////// diff --git a/types/ns-api/ns-api-tests.ts b/types/ns-api/ns-api-tests.ts index 129e54d6b9..5063a97e48 100644 --- a/types/ns-api/ns-api-tests.ts +++ b/types/ns-api/ns-api-tests.ts @@ -55,4 +55,4 @@ ns.storingen({}, (err, data) => { } else { console.log(data); } -}); \ No newline at end of file +}); diff --git a/types/numeral/index.d.ts b/types/numeral/index.d.ts index e48cfa6f3d..f08f46b8c2 100644 --- a/types/numeral/index.d.ts +++ b/types/numeral/index.d.ts @@ -71,6 +71,7 @@ interface Numeral { multiply(value: any): Numeral; divide(value: any): Numeral; difference(value: any): number; + validate(value: any, culture: any): boolean; } declare var numeral: Numeral; diff --git a/types/oauth2orize/index.d.ts b/types/oauth2orize/index.d.ts index 2c4b0a7601..a8fbf9c41b 100644 --- a/types/oauth2orize/index.d.ts +++ b/types/oauth2orize/index.d.ts @@ -1,46 +1,143 @@ -// Type definitions for oauth2orize v1.5.1 +// Type definitions for oauth2orize 1.8 // Project: https://github.com/jaredhanson/oauth2orize/ -// Definitions by: Wonshik Kim , Kei Son -// Definitions: https://github.com/borisyankov/DefinitelyTyped +// Definitions by: Wonshik Kim , Kei Son , Steve Hipwell +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// +/// -import * as http from "http"; +import { ServerRequest, ServerResponse } from "http"; -interface ServerOptions { +interface OAuth2 { + client: any; + + user: any; + + transactionID: string; + + redirectURI: string; + + req: OAuth2Req; + + info: OAuth2Info; +} + +interface OAuth2Req { + clientID: string; + + redirectURI: string; + + scope: string; + + state: string; + + type: string; + + transactionID: string; +} + +interface OAuth2Info { + scope: string; +} + +export interface MiddlewareRequest extends ServerRequest { + oauth2?: OAuth2; + + user?: any; +} + +export interface ServerOptions { store: any; loadTransaction: boolean; } -export function createServer(options?: ServerOptions): OAuth2Server; + +export const createServer: (options?: ServerOptions) => OAuth2Server; export interface AuthorizeOptions { idLength?: number; sessionKey?: string; } +export interface DecisionOptions { + cancelField: string; + userProperty: string; + sessionKey: string; +} + export interface ErrorHandlerOptions { mode?: string; } -type MiddlewareFunction = (req: http.IncomingMessage, res: http.ServerResponse, next: Function) => void; -type ValidatedFunction = (err: Error | null, client?: any, redirectURI?: string) => void; -type IssuedFunction = (err: Error | null, accessToken?: string | boolean, refreshToken?: string, params?: any) => void; +type MiddlewareFunction = (req: MiddlewareRequest, res: ServerResponse, next: MiddlewareNextFunction) => void; + +type MiddlewareErrorFunction = (err: Error, req: MiddlewareRequest, res: ServerResponse, next: MiddlewareNextFunction) => void; + +type MiddlewareNextFunction = (err?: Error) => void; + +type ValidateFunction = (clientId: string, redirectURI: string, validated: (err: Error | null, client?: any, redirectURI?: string) => void) => void; + +type ImmediateFunction = (client: any, user: any, scope: string[], type: string, areq: any, done: (err: Error | null, allow: boolean, info: any, locals: any) => void) => void; + +type DecisionParseFunction = (req: MiddlewareRequest, done: (err: Error | null, params: any) => void) => void; + +type SerializeClientFunction = (client: any, done: SerializeClientDoneFunction) => void; +type SerializeClientDoneFunction = (err: Error | null, id: string) => void; + +type DeserializeClientFunction = (id: string, done: DeserializeClientDoneFunction) => void; +type DeserializeClientDoneFunction = (err: Error | null, client?: any | boolean) => void; + +type IssueGrantCodeFunction = (client: any, redirectUri: string, user: any, res: any, issued: (err: Error | null, code?: string) => void) => void; + +type IssueGrantTokenFunction = (client: any, user: any, ares: any, issued: (err: Error | null, code?: string, params?: any) => void) => void; + + +type IssueExchangeCodeFunction = (client: any, code: string, redirectURI: string, issued: ExchangeDoneFunction) => void; + +type ExchangeDoneFunction = (err: Error | null, accessToken?: string | boolean, refreshToken?: string, params?: any) => void; + export class OAuth2Server { - exchange(fn: MiddlewareFunction): OAuth2Server; + grant(type: string, fn: MiddlewareFunction): OAuth2Server; + grant(fn: MiddlewareFunction): OAuth2Server; + exchange(type: string, fn: MiddlewareFunction): OAuth2Server; - // Parses requests to obtain authorization - authorize (options: AuthorizeOptions, validate: (clientId: string, redirectURI: string, validated: ValidatedFunction) => void): MiddlewareFunction; - authorization(options: AuthorizeOptions, validate: (clientId: string, redirectURI: string, validated: ValidatedFunction) => void): MiddlewareFunction; - authorize (validate: (clientId: string, redirectURI: string, validated: ValidatedFunction) => void): MiddlewareFunction; - authorization(validate: (clientId: string, redirectURI: string, validated: ValidatedFunction) => void): MiddlewareFunction; + exchange(fn: MiddlewareFunction): OAuth2Server; + + authorize(options: AuthorizeOptions, validate: ValidateFunction): MiddlewareFunction; + authorize(validate: ValidateFunction): MiddlewareFunction; + + authorization(options: AuthorizeOptions, validate: ValidateFunction, immediate?: ImmediateFunction): MiddlewareFunction; + authorization(validate: ValidateFunction, immediate?: ImmediateFunction): MiddlewareFunction; + + decision(options: DecisionOptions, parse: DecisionParseFunction): MiddlewareFunction; + decision(parse: DecisionParseFunction): MiddlewareFunction; token(options?: any): MiddlewareFunction; - errorHandler(options?: any): (err: Error, req: http.IncomingMessage, res: http.ServerResponse, next: any) => void; - serializeClient(fn: (client: any, done: (err: Error | null, id: string) => void) => void): void; - serializeClient(client: any, done: (err: Error | null, id: string) => void): void; - deserializeClient(fn: (id: string, done: (err: Error | null, client?: any | boolean) => void) => void): void; - deserializeClient(obj: any, done: (err: Error | null, client?: any | boolean) => void): void; + + errorHandler(options?: any): MiddlewareErrorFunction; + + serializeClient(fn: SerializeClientFunction): void; + serializeClient(client: any, done: SerializeClientDoneFunction): void; + + deserializeClient(fn: DeserializeClientFunction): void; + deserializeClient(obj: any, done: DeserializeClientDoneFunction): void; +} + +export namespace grant { + interface Options { + // For maximum flexibility, multiple scope spearators can optionally be + // allowed. This allows the server to accept clients that separate scope + // with either space or comma (' ', ','). This violates the specification, + // but achieves compatibility with existing client libraries that are already + // deployed. + scopeSeparator?: string; + } + + function code(options: Options, issue: IssueGrantCodeFunction): MiddlewareFunction; + function code(issue: IssueGrantCodeFunction): MiddlewareFunction; + + function token(options: Options, issue: IssueGrantTokenFunction): MiddlewareFunction; + function token(issue: IssueGrantTokenFunction): MiddlewareFunction; } export namespace exchange { @@ -57,41 +154,42 @@ export namespace exchange { scopeSeparator?: string; } - function authorizationCode(options: Options, issue: (client: any, code: string, redirectURI: string, issued: IssuedFunction) => void): MiddlewareFunction; - function authorizationCode(issue: (client: any, code: string, redirectURI: string, issued: IssuedFunction) => void): MiddlewareFunction; - function code(options: Options, issue: (client: any, code: string, redirectURI: string, issued: IssuedFunction) => void): MiddlewareFunction; - function code(issue: (client: any, code: string, redirectURI: string, issued: IssuedFunction) => void): MiddlewareFunction; + function authorizationCode(options: Options, issue: IssueExchangeCodeFunction): MiddlewareFunction; + function authorizationCode(issue: IssueExchangeCodeFunction): MiddlewareFunction; + + function code(options: Options, issue: IssueExchangeCodeFunction): MiddlewareFunction; + function code(issue: IssueExchangeCodeFunction): MiddlewareFunction; // arity == 5; issue(client, scope, req.body, req.authInfo, issued); - function clientCredentials(options: Options, issue: (client: any, scope: string[], body: any, authInfo: any, issued: IssuedFunction) => void): MiddlewareFunction; + function clientCredentials(options: Options, issue: (client: any, scope: string[], body: any, authInfo: any, issued: ExchangeDoneFunction) => void): MiddlewareFunction; // arity == 4; issue(client, scope, req.body, issued); - function clientCredentials(options: Options, issue: (client: any, scope: string[], body: any, issued: IssuedFunction) => void): MiddlewareFunction; + function clientCredentials(options: Options, issue: (client: any, scope: string[], body: any, issued: ExchangeDoneFunction) => void): MiddlewareFunction; // arity == 3; issue(client, scope, issued); - function clientCredentials(options: Options, issue: (client: any, scope: string[], issued: IssuedFunction) => void): MiddlewareFunction; + function clientCredentials(options: Options, issue: (client: any, scope: string[], issued: ExchangeDoneFunction) => void): MiddlewareFunction; // arity == 2; issue(client, issued); - function clientCredentials(options: Options, issue: (client: any, issued: IssuedFunction) => void): MiddlewareFunction; - function clientCredentials(issue: (client: any, scope: string[], issued: IssuedFunction) => void): MiddlewareFunction; - function clientCredentials(issue: (client: any, issued: IssuedFunction) => void): MiddlewareFunction; + function clientCredentials(options: Options, issue: (client: any, issued: ExchangeDoneFunction) => void): MiddlewareFunction; + function clientCredentials(issue: (client: any, scope: string[], issued: ExchangeDoneFunction) => void): MiddlewareFunction; + function clientCredentials(issue: (client: any, issued: ExchangeDoneFunction) => void): MiddlewareFunction; // arity == 7; issue(client, username, passwd, scope, req.body, req.authInfo, issued); - function password(options: Options, issue: (client: any, username: string, password: string, scope: string[], body: any, authInfo: any, issued: IssuedFunction) => void): MiddlewareFunction; + function password(options: Options, issue: (client: any, username: string, password: string, scope: string[], body: any, authInfo: any, issued: ExchangeDoneFunction) => void): MiddlewareFunction; // arity == 6; issue(client, username, passwd, scope, req.body, issued); - function password(options: Options, issue: (client: any, username: string, password: string, scope: string[], body: any, issued: IssuedFunction) => void): MiddlewareFunction; + function password(options: Options, issue: (client: any, username: string, password: string, scope: string[], body: any, issued: ExchangeDoneFunction) => void): MiddlewareFunction; // arity == 5; issue(client, username, passwd, scope, issued); - function password(options: Options, issue: (client: any, username: string, password: string, scope: string[], issued: IssuedFunction) => void): MiddlewareFunction; + function password(options: Options, issue: (client: any, username: string, password: string, scope: string[], issued: ExchangeDoneFunction) => void): MiddlewareFunction; // arity == 4; issue(client, username, passwd, issued); - function password(options: Options, issue: (client: any, username: string, password: string, issued: IssuedFunction) => void): MiddlewareFunction; - function password(issue: (client: any, username: string, password: string, scope: string[], issued: IssuedFunction) => void): MiddlewareFunction; - function password(issue: (client: any, username: string, password: string, issued: IssuedFunction) => void): MiddlewareFunction; + function password(options: Options, issue: (client: any, username: string, password: string, issued: ExchangeDoneFunction) => void): MiddlewareFunction; + function password(issue: (client: any, username: string, password: string, scope: string[], issued: ExchangeDoneFunction) => void): MiddlewareFunction; + function password(issue: (client: any, username: string, password: string, issued: ExchangeDoneFunction) => void): MiddlewareFunction; // arity == 6; issue(client, refreshToken, scope, req.body, req.authInfo, issued); - function refreshToken(options: Options, issue: (client: any, refreshToken: string, scope: string[], body: any, authInfo: any, issued: IssuedFunction) => void): MiddlewareFunction; + function refreshToken(options: Options, issue: (client: any, refreshToken: string, scope: string[], body: any, authInfo: any, issued: ExchangeDoneFunction) => void): MiddlewareFunction; // arity == 5; issue(client, refreshToken, scope, req.body, issued); - function refreshToken(options: Options, issue: (client: any, refreshToken: string, scope: string[], body: any, issued: IssuedFunction) => void): MiddlewareFunction; + function refreshToken(options: Options, issue: (client: any, refreshToken: string, scope: string[], body: any, issued: ExchangeDoneFunction) => void): MiddlewareFunction; // arity == 4; issue(client, refreshToken, scope, issued); - function refreshToken(options: Options, issue: (client: any, refreshToken: string, scope: string[], issued: IssuedFunction) => void): MiddlewareFunction; + function refreshToken(options: Options, issue: (client: any, refreshToken: string, scope: string[], issued: ExchangeDoneFunction) => void): MiddlewareFunction; // arity == 3; issue(client, refreshToken, issued); - function refreshToken(options: Options, issue: (client: any, refreshToken: string, issued: IssuedFunction) => void): MiddlewareFunction; - function refreshToken(issue: (client: any, refreshToken: string, scope: string[], issued: IssuedFunction) => void): MiddlewareFunction; - function refreshToken(issue: (client: any, refreshToken: string, issued: IssuedFunction) => void): MiddlewareFunction; + function refreshToken(options: Options, issue: (client: any, refreshToken: string, issued: ExchangeDoneFunction) => void): MiddlewareFunction; + function refreshToken(issue: (client: any, refreshToken: string, scope: string[], issued: ExchangeDoneFunction) => void): MiddlewareFunction; + function refreshToken(issue: (client: any, refreshToken: string, issued: ExchangeDoneFunction) => void): MiddlewareFunction; } diff --git a/types/oauth2orize/oauth2orize-tests.ts b/types/oauth2orize/oauth2orize-tests.ts index 9795b3e89e..49d7c94794 100644 --- a/types/oauth2orize/oauth2orize-tests.ts +++ b/types/oauth2orize/oauth2orize-tests.ts @@ -7,15 +7,15 @@ import * as http from 'http'; const server = oauth2orize.createServer(); // Register Grants -// server.grant(oauth2orize.grant.code(function(client, redirectURI, user, ares, done) { -// var code = utils.uid(16); +server.grant(oauth2orize.grant.code((client, redirectURI, user, ares, done) => { + // var code = utils.uid(16); -// var ac = new AuthorizationCode(code, client.id, redirectURI, user.id, ares.scope); -// ac.save(function(err) { -// if (err) { return done(err); } -// return done(null, code); -// }); -// })); + // var ac = new AuthorizationCode(code, client.id, redirectURI, user.id, ares.scope); + // ac.save(function(err) { + // if (err) { return done(err); } + // return done(null, code); + // }); +})); // Register Exchanges @@ -25,8 +25,8 @@ class AuthorizationCode { }) => void): void {} } -server.exchange(oauth2orize.exchange.code(function(client, code, redirectURI, done) { - AuthorizationCode.findOne(code, function(err, code) { +server.exchange(oauth2orize.exchange.code((client, code, redirectURI, done) => { + AuthorizationCode.findOne(code, (err, code) => { if (err) { return done(err); } if (client.id !== code.clientId) { return done(null, false); } if (redirectURI !== code.redirectURI) { return done(null, false); } @@ -50,27 +50,27 @@ class Clients { // app.get('/dialog/authorize', // login.ensureLoggedIn(), - server.authorize(function(clientID, redirectURI, done) { - Clients.findOne(clientID, function(err, client) { + server.authorize((clientID, redirectURI, done) => { + Clients.findOne(clientID, (err, client) => { if (err) { return done(err); } if (!client) { return done(null, false); } if (client.redirectURI != redirectURI) { return done(null, false); } return done(null, client, client.redirectURI); }); }), - function(req: http.IncomingMessage, res: http.ServerResponse) { + (req: http.IncomingMessage, res: http.ServerResponse) => { // res.render('dialog', { transactionID: req.oauth2.transactionID, // user: req.user, client: req.oauth2.client }); } // ); // Session Serialization -server.serializeClient(function(client, done) { +server.serializeClient((client, done) => { return done(null, client.id); }); -server.deserializeClient(function(id, done) { - Clients.findOne(id, function(err, client) { +server.deserializeClient((id, done) => { + Clients.findOne(id, (err, client) => { if (err) { return done(err); } return done(null, client); }); diff --git a/types/office-js/index.d.ts b/types/office-js/index.d.ts index 8dc027f765..13329dad9b 100644 --- a/types/office-js/index.d.ts +++ b/types/office-js/index.d.ts @@ -1,6 +1,6 @@ // Type definitions for Office.js // Project: http://dev.office.com -// Definitions by: OfficeDev +// Definitions by: OfficeDev , Lance Austin // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /* @@ -108,9 +108,9 @@ declare namespace Office { */ width?: number, /** - * Optional. Determines whether the dialog is safe to display within a Web frame. + * Optional. Determines whether the dialog box should be displayed within an IFrame. This setting is only applicable in Office Online clients, and is ignored on other platforms. */ - xFrameDenySafe?: boolean, + displayInIframe?: boolean } export interface OfficeTheme { bodyBackgroundColor: string; diff --git a/types/opener/opener-tests.ts b/types/opener/opener-tests.ts index 477fe4b3f8..7f69d8f2dd 100644 --- a/types/opener/opener-tests.ts +++ b/types/opener/opener-tests.ts @@ -7,5 +7,5 @@ opener('./my-file.txt'); opener('firefox'); opener('npm run lint'); -var editor = opener('documentation.odt'); +const editor = opener('documentation.odt'); editor.unref(); diff --git a/types/openfin/index.d.ts b/types/openfin/index.d.ts index 994a64939f..e6c11d0180 100644 --- a/types/openfin/index.d.ts +++ b/types/openfin/index.d.ts @@ -8,16 +8,16 @@ /** * JavaScript API - * The JavaScript API allows you to create an HTML/JavaScript application that has access to the native windowing environment, + * The JavaScript API allows you to create an HTML/JavaScript application that has access to the native windowing environment, * can communicate with other applications and has access to sandboxed system-level features. * * API Ready - * When using the OpenFin API, it is important to ensure that it has been fully loaded before making any API calls. To verify - * that the API is in fact ready, be sure to make any API calls either from within the fin.desktop.main() method or explicitly + * When using the OpenFin API, it is important to ensure that it has been fully loaded before making any API calls. To verify + * that the API is in fact ready, be sure to make any API calls either from within the fin.desktop.main() method or explicitly * after it has returned. This avoids the situation of trying to access methods that are not yet fully injected. * * Overview - * When running within the OpenFin Runtime your web applications have access to the "fin" namespace and all the modules within the API + * When running within the OpenFin Runtime your web applications have access to the "fin" namespace and all the modules within the API * without the need to include additional source files. You can treat the "fin" namespace as you would the "window", "navigator" or "document" objects. **/ declare namespace fin { @@ -136,8 +136,8 @@ declare namespace fin { */ scheduleRestart(callback?: () => void, errorCallback?: (reason: string) => void): void; /** - * Sets new shortcut configuration for current application. - * Application has to be launched with a manifest and has to have shortcut configuration (icon url, name, etc.) in its manifest to + * Sets new shortcut configuration for current application. + * Application has to be launched with a manifest and has to have shortcut configuration (icon url, name, etc.) in its manifest to * be able to change shortcut states. */ setShortcuts(config: ShortCutConfig, callback?: () => void, errorCallback?: (reason: string) => void): void; @@ -150,7 +150,7 @@ declare namespace fin { */ terminate(callback?: () => void, errorCallback?: (reason: string) => void): void; /** - * Waits for a hanging application. This method can be called in response to an application "not-responding" to allow the application + * Waits for a hanging application. This method can be called in response to an application "not-responding" to allow the application * to continue and to generate another "not-responding" message after a certain period of time. */ wait(callback?: () => void, errorCallback?: (reason: string) => void): void; @@ -244,8 +244,8 @@ declare namespace fin { */ customData?: any; /** - * Specifies that the window will be positioned in the center of the primary monitor when loaded for the first time on a machine. - * When the window corresponding to that id is loaded again, the position from before the window was closed is used. + * Specifies that the window will be positioned in the center of the primary monitor when loaded for the first time on a machine. + * When the window corresponding to that id is loaded again, the position from before the window was closed is used. * This option overrides defaultLeft and defaultTop. Default: false. */ defaultCentered?: boolean; @@ -260,12 +260,12 @@ declare namespace fin { */ defaultWidth?: number; /** - * The default top position of the window. Specifies the position of the top of the window when loaded for the first time on a machine. + * The default top position of the window. Specifies the position of the top of the window when loaded for the first time on a machine. * When the window corresponding to that id is loaded again, the value of top is taken to be the last value before the window was closed. Default: 100. */ defaultTop?: number; /** - * The default width of the window. Specifies the width of the window when loaded for the first time on a machine. + * The default width of the window. Specifies the width of the window when loaded for the first time on a machine. * When the window corresponding to that id is loaded again, the width is taken to be the last width of the window before it was closed. Default: 800. */ defaultLeft?: number; @@ -364,7 +364,7 @@ declare namespace fin { */ url?: string; /** - * When set to false, the window will render before the "load" event is fired on the content's window. + * When set to false, the window will render before the "load" event is fired on the content's window. * Caution, when false you will see an initial empty white window. Default: true. */ waitForPageLoad?: boolean; @@ -463,7 +463,7 @@ declare namespace fin { send(destinationUuid: string, name: string, topic: string, message: any, callback?: () => void, errorCallback?: (reason: string) => void): void; send(destinationUuid: string, topic: string, message: any, callback?: () => void, errorCallback?: (reason: string) => void): void; /** - * Subscribes to messages from the specified application on the specified topic. If the subscription is for a uuid, [name], + * Subscribes to messages from the specified application on the specified topic. If the subscription is for a uuid, [name], * topic combination that has already been published to upon subscription you will receive the last 20 missed messages in the order they were published. */ subscribe(senderUuid: string, name: string, topic: string, listener: (message: any, uuid: string, name: string) => void, @@ -492,8 +492,8 @@ declare namespace fin { /** * Notification - * Notification represents a window on OpenFin Runtime which is shown briefly to the user on the bottom-right corner of the primary monitor. - * A notification is typically used to alert the user of some important event which requires his or her attention. + * Notification represents a window on OpenFin Runtime which is shown briefly to the user on the bottom-right corner of the primary monitor. + * A notification is typically used to alert the user of some important event which requires his or her attention. * Notifications are a child or your application that are controlled by the runtime. */ interface OpenFinNotification { @@ -533,8 +533,8 @@ declare namespace fin { */ onClick?(callback: () => void): void; /** - * Invoked when the notification is closed via .close() method on the created notification instance - * or the by the notification itself via fin.desktop.Notification.getCurrent().close(). + * Invoked when the notification is closed via .close() method on the created notification instance + * or the by the notification itself via fin.desktop.Notification.getCurrent().close(). * NOTE: this is not invoked when the notification is dismissed via a swipe. For the swipe dismissal callback see onDismiss */ onClose?(callback: () => void): void; @@ -559,7 +559,7 @@ declare namespace fin { /** * System - * An object representing the core of OpenFin Runtime. + * An object representing the core of OpenFin Runtime. * Allows the developer to perform system-level actions, such as accessing logs, viewing processes, clearing the cache and exiting the runtime. */ interface OpenFinSystem { @@ -574,7 +574,7 @@ declare namespace fin { listener: (event: SystemBaseEvent | DesktopIconClickedEvent | IdleStateChangedEvent | MonitorInfoChangedEvent | SessionChangedEvent) => void, callback?: () => void, errorCallback?: (reason: string) => void): void; /** - * Clears cached data containing window state/positions, + * Clears cached data containing window state/positions, * application resource files (images, HTML, JavaScript files), cookies, and items stored in the Local Storage. */ clearCache(options: CacheOptions, callback?: () => void, errorCallback?: (reason: string) => void): void; @@ -636,7 +636,7 @@ declare namespace fin { */ getMousePosition(callback?: (mousePosition: VirtualScreenCoordinates) => void, errorCallback?: (reason: string) => void): void; /** - * Retrieves an array of all of the runtime processes that are currently running. + * Retrieves an array of all of the runtime processes that are currently running. * Each element in the array is an object containing the uuid and the name of the application to which the process belongs. */ getProcessList(callback?: (processInfoList: ProcessInfo[]) => void, errorCallback?: (reason: string) => void): void; @@ -706,7 +706,6 @@ declare namespace fin { * Update the OpenFin Runtime Proxy settings. */ updateProxySettings(type: string, address: string, port: number, callback?: () => void, errorCallback?: (reason: string) => void): void; - } interface CacheOptions { @@ -999,8 +998,8 @@ declare namespace fin { * * Creates a new OpenFin Window * - * A basic window that wraps a native HTML window. Provides more fine-grained control over the window state such as the ability to minimize, - * maximize, restore, etc. By default a window does not show upon instantiation; instead the window's show() method must be invoked manually. + * A basic window that wraps a native HTML window. Provides more fine-grained control over the window state such as the ability to minimize, + * maximize, restore, etc. By default a window does not show upon instantiation; instead the window's show() method must be invoked manually. * The new window appears in the same process as the parent window. * @param {any} options - The options of the window * @param {Function} [callback] - Called if the window creation was successful @@ -1021,8 +1020,8 @@ declare namespace fin { /** * Window - * A basic window that wraps a native HTML window. Provides more fine-grained control over the window state such as the ability to minimize, - * maximize, restore, etc. By default a window does not show upon instantiation; instead the window's show() method must be invoked manually. + * A basic window that wraps a native HTML window. Provides more fine-grained control over the window state such as the ability to minimize, + * maximize, restore, etc. By default a window does not show upon instantiation; instead the window's show() method must be invoked manually. * The new window appears in the same process as the parent window. */ interface OpenFinWindow { @@ -1031,9 +1030,9 @@ declare namespace fin { */ name: string; /** - * Returns the native JavaScript "window" object for the window. This method can only be used by the parent application or the window itself, - * otherwise it will return undefined. The same Single-Origin-Policy (SOP) rules apply for child windows created by window.open(url) in that the - * contents of the window object are only accessible if the URL has the same origin as the invoking window. See example below. + * Returns the native JavaScript "window" object for the window. This method can only be used by the parent application or the window itself, + * otherwise it will return undefined. The same Single-Origin-Policy (SOP) rules apply for child windows created by window.open(url) in that the + * contents of the window object are only accessible if the URL has the same origin as the invoking window. See example below. * Also, will not work with fin.desktop.Window objects created with fin.desktop.Window.wrap(). * @returns {Window} Native window */ @@ -1109,7 +1108,7 @@ declare namespace fin { */ getBounds(callback?: (bounds: WindowBounds) => void, errorCallback?: (reason: string) => void): void; /** - * Retrieves an array containing wrapped fin.desktop.Windows that are grouped with this window. If a window is not in a group an empty array is returned. + * Retrieves an array containing wrapped fin.desktop.Windows that are grouped with this window. If a window is not in a group an empty array is returned. * Please note that calling window is included in the result array. */ getGroup(callback?: (group: OpenFinWindow[]) => void, errorCallback?: (reason: string) => void): void; @@ -1686,4 +1685,4 @@ declare namespace fin { | "top-right" | "bottom-left" | "bottom-right"; -} \ No newline at end of file +} diff --git a/types/openfin/openfin-tests.ts b/types/openfin/openfin-tests.ts index 6693408eec..95ed176fb1 100644 --- a/types/openfin/openfin-tests.ts +++ b/types/openfin/openfin-tests.ts @@ -46,7 +46,7 @@ function test_application() { application.getGroups(allGroups => { console.log("There are a total of " + allGroups.length + " groups."); - var groupCounter = 1; + let groupCounter = 1; allGroups.forEach(windowGroup => { console.log("Group " + groupCounter + " contains " + windowGroup.length + " windows."); @@ -548,7 +548,7 @@ function test_window() { resizable: false, state: "normal" }, () => { - var _win = finWindow.getNativeWindow(); + const _win = finWindow.getNativeWindow(); _win.addEventListener("DOMContentLoaded", () => { finWindow.show(); }); }, error => { console.log("Error creating window:", error); @@ -725,4 +725,4 @@ function test_window() { frame: false, maxWidth: 500 }); -} \ No newline at end of file +} diff --git a/types/optics-agent/index.d.ts b/types/optics-agent/index.d.ts index 4d27ac71ae..902e8e8379 100644 --- a/types/optics-agent/index.d.ts +++ b/types/optics-agent/index.d.ts @@ -21,7 +21,7 @@ export interface Options { * * You shouldn't need to set this unless you are debugging. */ - normalizeQuery?: (graphQLResolveInfo: any) => string; + normalizeQuery?(graphQLResolveInfo: any): string; /** * Where to send the reports. Defaults to the production Optics endpoint, or the OPTICS_ENDPOINT_URL environment variable if it is set. diff --git a/types/pad/pad-tests.ts b/types/pad/pad-tests.ts index ccba560703..36befdac78 100644 --- a/types/pad/pad-tests.ts +++ b/types/pad/pad-tests.ts @@ -3,4 +3,4 @@ import pad = require('pad'); pad('pad', 5); // "pad " pad(5, 'pad'); // " pad" pad('pad', 5, '+'); // "pad++" -pad(5, 'pad', '+'); // "++pad" \ No newline at end of file +pad(5, 'pad', '+'); // "++pad" diff --git a/types/parse-unit/parse-unit-tests.ts b/types/parse-unit/parse-unit-tests.ts index 772641c302..dd5dcb7e9f 100644 --- a/types/parse-unit/parse-unit-tests.ts +++ b/types/parse-unit/parse-unit-tests.ts @@ -1,4 +1,4 @@ -import parse = require('parse-unit') -let [number, length] = parse('10px') -number === 50 -length === 'px' +import parse = require('parse-unit'); +const [number, length] = parse('10px'); +number === 50; +length === 'px'; diff --git a/types/parseurl/index.d.ts b/types/parseurl/index.d.ts index 15140d9261..f88566178b 100644 --- a/types/parseurl/index.d.ts +++ b/types/parseurl/index.d.ts @@ -11,7 +11,7 @@ import { Url } from "url"; declare function parseurl(req: IncomingMessage): Url | undefined; declare namespace parseurl { - export function original(req: IncomingMessage): Url | undefined; + function original(req: IncomingMessage): Url | undefined; } export = parseurl; diff --git a/types/parsimmon/index.d.ts b/types/parsimmon/index.d.ts index ee196dd1ff..21cd77ce2f 100644 --- a/types/parsimmon/index.d.ts +++ b/types/parsimmon/index.d.ts @@ -42,9 +42,9 @@ declare function Parsimmon(fn: (input: string, i: number) => Parsimmon.Result): Parsimmon.Parser; declare namespace Parsimmon { - export type StreamType = string; + type StreamType = string; - export interface Index { + interface Index { /** zero-based character offset */ offset: number; /** one-based line offset */ @@ -53,29 +53,29 @@ declare namespace Parsimmon { column: number; } - export interface Mark { + interface Mark { start: Index; end: Index; value: T; } - export type Result = Success | Failure; + type Result = Success | Failure; - export interface Success { + interface Success { status: true; value: T; } - export interface Failure { + interface Failure { status: false; expected: string[]; index: Index; } - export interface Parser { + interface Parser { /** * parse the string - */ + */ parse(input: string): Result; /** * Like parser.parse(input) but either returns the parsed value or throws @@ -91,7 +91,7 @@ declare namespace Parsimmon { * returns a new parser which tries parser, and on success calls the given function * with the result of the parse, which is expected to return another parser, which * will be tried next - */ + */ chain(next: (result: T) => Parser): Parser; /** * returns a new parser which tries parser, and on success calls the given function @@ -155,41 +155,41 @@ declare namespace Parsimmon { /** * Alias of `Parsimmon(fn)` for backwards compatibility. */ - export function Parser(fn: (input: string, i: number) => Parsimmon.Result): Parser; + function Parser(fn: (input: string, i: number) => Parsimmon.Result): Parser; /** * To be used inside of Parsimmon(fn). Generates an object describing how * far the successful parse went (index), and what value it created doing * so. See documentation for Parsimmon(fn). */ - export function makeSuccess(index: number, value: T): Success; + function makeSuccess(index: number, value: T): Success; /** * To be used inside of Parsimmon(fn). Generates an object describing how * far the unsuccessful parse went (index), and what kind of syntax it * expected to see (expectation). See documentation for Parsimmon(fn). */ - export function makeFailure(furthest: number, expectation: string): Failure; + function makeFailure(furthest: number, expectation: string): Failure; /** * Returns true if obj is a Parsimmon parser, otherwise false. */ - export function isParser(obj: any): boolean; + function isParser(obj: any): boolean; /** * is a parser that expects to find "my-string", and will yield the same. */ - export function string(string: string): Parser; + function string(string: string): Parser; /** * Returns a parser that looks for exactly one character from string, and yields that character. */ - export function oneOf(string: string): Parser; + function oneOf(string: string): Parser; /** * Returns a parser that looks for exactly one character NOT from string, and yields that character. */ - export function noneOf(string: string): Parser; + function noneOf(string: string): Parser; /** * Returns a parser that looks for a match to the regexp and yields the given match group @@ -197,145 +197,145 @@ declare namespace Parsimmon { * parse location. The regexp may only use the following flags: imu. Any other flag will * result in an error being thrown. */ - export function regexp(myregex: RegExp, group?: number): Parser; + function regexp(myregex: RegExp, group?: number): Parser; /** * This was the original name for Parsimmon.regexp, but now it is just an alias. */ - export function regex(myregex: RegExp, group?: number): Parser; + function regex(myregex: RegExp, group?: number): Parser; /** * Returns a parser that doesn't consume any of the string, and yields result. */ - export function succeed(result: U): Parser; + function succeed(result: U): Parser; /** * This is an alias for Parsimmon.succeed(result). */ - export function of(result: U): Parser; + function of(result: U): Parser; /** * accepts a variable number of parsers that it expects to find in order, yielding an array of the results. */ - export function seq(p1: Parser): Parser<[T]>; - export function seq(p1: Parser, p2: Parser): Parser<[T, U]>; - export function seq(p1: Parser, p2: Parser, p3: Parser): Parser<[T, U, V]>; - export function seq(p1: Parser, p2: Parser, p3: Parser, p4: Parser): Parser<[T, U, V, W]>; - export function seq(p1: Parser, p2: Parser, p3: Parser, p4: Parser, p5: Parser): Parser<[T, U, V, W, X]>; - export function seq(p1: Parser, p2: Parser, p3: Parser, p4: Parser, p5: Parser, p6: Parser): Parser<[T, U, V, W, X, Y]>; - export function seq(p1: Parser, p2: Parser, p3: Parser, p4: Parser, p5: Parser, p6: Parser, p7: Parser): Parser<[T, U, V, W, X, Y, Z]>; - export function seq(...parsers: Array>): Parser; - export function seq(...parsers: Array>): Parser; + function seq(p1: Parser): Parser<[T]>; + function seq(p1: Parser, p2: Parser): Parser<[T, U]>; + function seq(p1: Parser, p2: Parser, p3: Parser): Parser<[T, U, V]>; + function seq(p1: Parser, p2: Parser, p3: Parser, p4: Parser): Parser<[T, U, V, W]>; + function seq(p1: Parser, p2: Parser, p3: Parser, p4: Parser, p5: Parser): Parser<[T, U, V, W, X]>; + function seq(p1: Parser, p2: Parser, p3: Parser, p4: Parser, p5: Parser, p6: Parser): Parser<[T, U, V, W, X, Y]>; + function seq(p1: Parser, p2: Parser, p3: Parser, p4: Parser, p5: Parser, p6: Parser, p7: Parser): Parser<[T, U, V, W, X, Y, Z]>; + function seq(...parsers: Array>): Parser; + function seq(...parsers: Array>): Parser; /** * Takes the string passed to parser.parse(string) and the error returned from * parser.parse(string) and turns it into a human readable error message string. * Note that there are certainly better ways to format errors, so feel free to write your own. */ - export function formatError(string: string, error: Result): string; + function formatError(string: string, error: Result): string; /** * Matches all parsers sequentially, and passes their results as the arguments to a function. * Similar to calling Parsimmon.seq and then .map, but the values are not put in an array. */ - export function seqMap(p1: Parser, cb: (a1: T) => U): Parser; - export function seqMap(p1: Parser, p2: Parser, cb: (a1: T, a2: U) => V): Parser; - export function seqMap(p1: Parser, p2: Parser, p3: Parser, cb: (a1: T, a2: U, a3: V) => W): Parser; - export function seqMap(p1: Parser, p2: Parser, p3: Parser, p4: Parser, cb: (a1: T, a2: U, a3: V, a4: W) => X): Parser; - export function seqMap(p1: Parser, p2: Parser, p3: Parser, p4: Parser, p5: Parser, cb: (a1: T, a2: U, a3: V, a4: W, a5: X) => Y): Parser; - export function seqMap(p1: Parser, p2: Parser, p3: Parser, p4: Parser, p5: Parser, p6: Parser, cb: (a1: T, a2: U, a3: V, a4: W, a5: X, a6: Y) => Z): Parser; - export function seqMap( + function seqMap(p1: Parser, cb: (a1: T) => U): Parser; + function seqMap(p1: Parser, p2: Parser, cb: (a1: T, a2: U) => V): Parser; + function seqMap(p1: Parser, p2: Parser, p3: Parser, cb: (a1: T, a2: U, a3: V) => W): Parser; + function seqMap(p1: Parser, p2: Parser, p3: Parser, p4: Parser, cb: (a1: T, a2: U, a3: V, a4: W) => X): Parser; + function seqMap(p1: Parser, p2: Parser, p3: Parser, p4: Parser, p5: Parser, cb: (a1: T, a2: U, a3: V, a4: W, a5: X) => Y): Parser; + function seqMap(p1: Parser, p2: Parser, p3: Parser, p4: Parser, p5: Parser, p6: Parser, cb: (a1: T, a2: U, a3: V, a4: W, a5: X, a6: Y) => Z): Parser; + function seqMap( p1: Parser, p2: Parser, p3: Parser, p4: Parser, p5: Parser, p6: Parser, p7: Parser, cb: (a1: T, a2: U, a3: V, a4: W, a5: X, a6: Y, a7: Z) => A): Parser; - export function seqMap( + function seqMap( p1: Parser, p2: Parser, p3: Parser, p4: Parser, p5: Parser, p6: Parser, p7: Parser, p8: Parser, cb: (a1: T, a2: U, a3: V, a4: W, a5: X, a6: Y, a7: Z, a8: A) => B): Parser; - export type SuccessFunctionType = (index: number, result: U) => Result; - export type FailureFunctionType = (index: number, msg: string) => Result; - export type ParseFunctionType = (stream: StreamType, index: number) => Result; - /** - * allows to add custom primitive parsers. + type SuccessFunctionType = (index: number, result: U) => Result; + type FailureFunctionType = (index: number, msg: string) => Result; + type ParseFunctionType = (stream: StreamType, index: number) => Result; + /** + * allows to add custom primitive parsers. */ - export function custom(parsingFunction: (success: SuccessFunctionType, failure: FailureFunctionType) => ParseFunctionType): Parser; + function custom(parsingFunction: (success: SuccessFunctionType, failure: FailureFunctionType) => ParseFunctionType): Parser; /** * accepts a variable number of parsers, and yields the value of the first one that succeeds, * backtracking in between. */ - export function alt(...parsers: Array>): Parser; - export function alt(...parsers: Array>): Parser; + function alt(...parsers: Array>): Parser; + function alt(...parsers: Array>): Parser; /** * Accepts two parsers, and expects zero or more matches for content, separated by separator, yielding an array. */ - export function sepBy(content: Parser, separator: Parser): Parser; + function sepBy(content: Parser, separator: Parser): Parser; /** * This is the same as Parsimmon.sepBy, but matches the content parser at least once. */ - export function sepBy1(content: Parser, separator: Parser): Parser; + function sepBy1(content: Parser, separator: Parser): Parser; /** * accepts a function that returns a parser, which is evaluated the first time the parser is used. * This is useful for referencing parsers that haven't yet been defined. */ - export function lazy(f: () => Parser): Parser; - export function lazy(description: string, f: () => Parser): Parser; + function lazy(f: () => Parser): Parser; + function lazy(description: string, f: () => Parser): Parser; /** * fail paring with a message */ - export function fail(message: string): Parser; + function fail(message: string): Parser; /** * is equivalent to Parsimmon.regex(/[a-z]/i) */ - export var letter: Parser; + const letter: Parser; /** * is equivalent to Parsimmon.regex(/[a-z]*`/i) */ - export var letters: Parser; + const letters: Parser; /** * is equivalent to Parsimmon.regex(/[0-9]/) */ - export var digit: Parser; + const digit: Parser; /** * is equivalent to Parsimmon.regex(/[0-9]*`/) */ - export var digits: Parser; + const digits: Parser; /** * is equivalent to Parsimmon.regex(/\s+/) */ - export var whitespace: Parser; + const whitespace: Parser; /** * is equivalent to Parsimmon.regex(/\s*`/) */ - export var optWhitespace: Parser; + const optWhitespace: Parser; /** * consumes and yields the next character of the stream. */ - export var any: Parser; + const any: Parser; /** * consumes and yields the entire remainder of the stream. */ - export var all: Parser; + const all: Parser; /** * expects the end of the stream. */ - export var eof: Parser; + const eof: Parser; /** * is a parser that yields the current index of the parse. */ - export var index: Parser; + const index: Parser; /** * Returns a parser that yield a single character if it passes the predicate */ - export function test(predicate: (char: string) => boolean): Parser; + function test(predicate: (char: string) => boolean): Parser; /** * Returns a parser yield a string containing all the next characters that pass the predicate */ - export function takeWhile(predicate: (char: string) => boolean): Parser; + function takeWhile(predicate: (char: string) => boolean): Parser; } export = Parsimmon; diff --git a/types/parsimmon/parsimmon-tests.ts b/types/parsimmon/parsimmon-tests.ts index 6be7eb307a..e0ce697909 100644 --- a/types/parsimmon/parsimmon-tests.ts +++ b/types/parsimmon/parsimmon-tests.ts @@ -1,4 +1,3 @@ - import P = require('parsimmon'); import { Parser, Mark, Result, Index } from "parsimmon"; @@ -14,43 +13,35 @@ class Bar { // -- -- -- -- -- -- -- -- -- -- -- -- -- -var str: string; -var strArr: string[]; -var bool: boolean; -var num: number; -var index: Index; -var regex: RegExp; +let str: string; +let strArr: string[]; +let bool: boolean; +let num: number; +let index: Index; -var foo: Foo; -var bar: Bar; - -var strArr: string[]; -var fooArr: Foo[]; -var barArr: Bar[]; +let foo: Foo; +declare const bar: Bar; // -- -- -- -- -- -- -- -- -- -- -- -- -- -var strPar: Parser; -var numPar: Parser; -var voidPar: Parser; -var anyPar: Parser; -var indexPar: Parser; +let strPar: Parser; +let numPar: Parser; +let voidPar: Parser; +let anyPar: Parser; +let indexPar: Parser; -var fooPar: Parser; -var barPar: Parser; -var fooOrBarPar: Parser; +let fooPar: Parser; +let barPar: Parser; +let fooOrBarPar: Parser; // -- -- -- -- -- -- -- -- -- -- -- -- -- -var anyArrPar: Parser; - -var strArrPar: Parser; -var fooArrPar: Parser; -var barArrPar: Parser; +let strArrPar: Parser; +let fooArrPar: Parser; // -- -- -- -- -- -- -- -- -- -- -- -- -- -var fooMarkPar: Parser>; +let fooMarkPar: Parser>; const result = fooMarkPar.parse(str); if (result.status) { @@ -61,7 +52,7 @@ if (result.status) { // -- -- -- -- -- -- -- -- -- -- -- -- -- -var fooResult: Result; +let fooResult: Result; // https://github.com/Microsoft/TypeScript/issues/12882 if (fooResult.status === true) { @@ -126,13 +117,13 @@ fooPar = fooPar.desc(str); // -- -- -- -- -- -- -- -- -- -- -- -- -- strPar = P.string(str); -strPar = P.regex(regex); +strPar = P.regex(/rgx/); fooPar = P.succeed(foo); fooArrPar = P.seq(fooPar, fooPar); -var par: Parser<[Bar, Foo, number]> = P.seq(barPar, fooPar, numPar); -var par2: Parser = P.seq(barPar, fooPar, numPar).map(([a, b, c]: [Bar, Foo, number]) => 42); +const par: Parser<[Bar, Foo, number]> = P.seq(barPar, fooPar, numPar); +const par2: Parser = P.seq(barPar, fooPar, numPar).map(([a, b, c]: [Bar, Foo, number]) => 42); fooPar = P.custom((success, failure) => (stream, i) => { str = stream; num = i; return success(num, foo); }); fooPar = P.custom((success, failure) => (stream, i) => failure(num, str)); @@ -140,7 +131,6 @@ fooPar = P.custom((success, failure) => (stream, i) => failure(num, str)); fooPar = P.alt(fooPar, fooPar); anyPar = P.alt(barPar, fooPar, numPar); - fooPar = P.lazy(() => { return fooPar; }); diff --git a/types/pem/index.d.ts b/types/pem/index.d.ts index c523fb8fa7..b65b60b9e1 100644 --- a/types/pem/index.d.ts +++ b/types/pem/index.d.ts @@ -144,9 +144,9 @@ type Callback = (error: any, result: T) => any; * @param {PrivateKeyCreationOptions} [options] private key encryption settings, defaults to empty object (no enryption) * @param {Callback<{ key: string }>} callback Callback function with an error object and {key} */ -declare function createPrivateKey(keyBitsize: number, options: PrivateKeyCreationOptions, callback: Callback<{ key: string }>): void; -declare function createPrivateKey(optionsOrKeyBitsize: number | PrivateKeyCreationOptions, callback: Callback<{ key: string }>): void; -declare function createPrivateKey(callback: Callback<{ key: string }>): void; +export function createPrivateKey(keyBitsize: number, options: PrivateKeyCreationOptions, callback: Callback<{ key: string }>): void; +export function createPrivateKey(optionsOrKeyBitsize: number | PrivateKeyCreationOptions, callback: Callback<{ key: string }>): void; +export function createPrivateKey(callback: Callback<{ key: string }>): void; /** * Creates a dhparam key @@ -154,8 +154,8 @@ declare function createPrivateKey(callback: Callback<{ key: string }>): void; * @param {Number} [keyBitsize=512] Size of the key, defaults to 512bit * @param {Callback<{ dhparam: any }>} callback Callback function with an error object and {dhparam} */ -declare function createDhparam(keyBitsize: number, callback: Callback<{ dhparam: any }>): void; -declare function createDhparam(callback: Callback<{ dhparam: any }>): void; +export function createDhparam(keyBitsize: number, callback: Callback<{ dhparam: any }>): void; +export function createDhparam(callback: Callback<{ dhparam: any }>): void; /** * Creates a Certificate Signing Request @@ -166,8 +166,8 @@ declare function createDhparam(callback: Callback<{ dhparam: any }>): void; * @param {CSRCreationOptions} [options] Optional options object * @param {Callback<{ csr: string, clientKey: string }>} callback Callback function with an error object and {csr, clientKey} */ -declare function createCSR(options: CSRCreationOptions, callback: Callback<{ csr: string, clientKey: string }>): void; -declare function createCSR(callback: Callback<{ csr: string, clientKey: string }>): void; +export function createCSR(options: CSRCreationOptions, callback: Callback<{ csr: string, clientKey: string }>): void; +export function createCSR(callback: Callback<{ csr: string, clientKey: string }>): void; /** * Creates a certificate based on a CSR. If CSR is not defined, a new one @@ -177,8 +177,8 @@ declare function createCSR(callback: Callback<{ csr: string, clientKey: string } * @param {Object} [CertificateCreationOptions] Optional options object * @param {Callback} callback Callback function with an error object and {certificate, csr, clientKey, serviceKey} */ -declare function createCertificate(options: CertificateCreationOptions, callback: Callback): void; -declare function createCertificate(callback: Callback): void; +export function createCertificate(options: CertificateCreationOptions, callback: Callback): void; +export function createCertificate(callback: Callback): void; /** * Reads subject data from a certificate or a CSR @@ -186,8 +186,8 @@ declare function createCertificate(callback: Callback * @param {String} certificate PEM encoded CSR or certificate * @param {Callback} callback Callback function with an error object and {country, state, locality, organization, organizationUnit, commonName, emailAddress} */ -declare function readCertificateInfo(certificate: string, callback: Callback): void; -declare function readCertificateInfo(callback: Callback): void; +export function readCertificateInfo(certificate: string, callback: Callback): void; +export function readCertificateInfo(callback: Callback): void; /** * Exports a public key from a private key, CSR or certificate @@ -195,8 +195,8 @@ declare function readCertificateInfo(callback: Callback} callback Callback function with an error object and {publicKey} */ -declare function getPublicKey(certificate: string, callback: Callback<{ publicKey: string }>): void; -declare function getPublicKey(callback: Callback<{ publicKey: string }>): void; +export function getPublicKey(certificate: string, callback: Callback<{ publicKey: string }>): void; +export function getPublicKey(callback: Callback<{ publicKey: string }>): void; /** * Gets the fingerprint for a certificate @@ -205,9 +205,9 @@ declare function getPublicKey(callback: Callback<{ publicKey: string }>): void; * @param {HashFunction} hash Hash function to use (either md5 sha1 or sha256, defaults to sha256) * @param {Callback<{ fingerprint: string }>} callback Callback function with an error object and {fingerprint} */ -declare function getFingerprint(certificate: string, hash: HashFunction, callback: Callback<{ fingerprint: string }>): void; -declare function getFingerprint(certificate: string, callback: Callback<{ fingerprint: string }>): void; -declare function getFingerprint(callback: Callback<{ fingerprint: string }>): void; +export function getFingerprint(certificate: string, hash: HashFunction, callback: Callback<{ fingerprint: string }>): void; +export function getFingerprint(certificate: string, callback: Callback<{ fingerprint: string }>): void; +export function getFingerprint(callback: Callback<{ fingerprint: string }>): void; /** * Gets the modulus from a certificate, a CSR or a private key @@ -216,8 +216,8 @@ declare function getFingerprint(callback: Callback<{ fingerprint: string }>): vo * @param {String} password password for the certificate * @param {Callback<{ modulus: any }>} callback Callback function with an error object and {modulus} */ -declare function getModulus(certificate: string, password: string, callback: Callback<{ modulus: any }>): void; -declare function getModulus(certificate: string, callback: Callback<{ modulus: any }>): void; +export function getModulus(certificate: string, password: string, callback: Callback<{ modulus: any }>): void; +export function getModulus(certificate: string, callback: Callback<{ modulus: any }>): void; /** * Gets the size and prime of DH parameters @@ -225,7 +225,7 @@ declare function getModulus(certificate: string, callback: Callback<{ modulus: a * @param {String} dh DH parameters PEM encoded * @param {Callback<{ size: any, prime: any }>} callback Callback function with an error object and {size, prime} */ -declare function getDhparamInfo(dh: string, callback: Callback<{ size: any, prime: any }>): void; +export function getDhparamInfo(dh: string, callback: Callback<{ size: any, prime: any }>): void; /** * Exports private key and certificate to a PKCS12 keystore @@ -236,8 +236,8 @@ declare function getDhparamInfo(dh: string, callback: Callback<{ size: any, prim * @param {Pkcs12CreationOptions} [options] object of cipher and optional client key password {cipher:'aes128', clientKeyPassword: 'xxx'} * @param {Callback<{ pkcs12: any }>} callback Callback function with an error object and {pkcs12} */ -declare function createPkcs12(key: string, certificate: string, password: string, options: Pkcs12CreationOptions, callback: Callback<{ pkcs12: any }>): void; -declare function createPkcs12(key: string, certificate: string, password: string, callback: Callback<{ pkcs12: any }>): void; +export function createPkcs12(key: string, certificate: string, password: string, options: Pkcs12CreationOptions, callback: Callback<{ pkcs12: any }>): void; +export function createPkcs12(key: string, certificate: string, password: string, callback: Callback<{ pkcs12: any }>): void; /** * Reads private key and certificate from a PKCS12 keystore @@ -246,8 +246,8 @@ declare function createPkcs12(key: string, certificate: string, password: string * @param {Function} callback Callback function with an error object and {pkcs12} * @returns the result of the callback */ -declare function readPkcs12(bufferOrPath: string, options: Pkcs12ReadOptions, callback: Callback<{ pkcs12: any }>): any; -declare function readPkcs12(bufferOrPath: string, callback: Callback<{ pkcs12: any }>): any; +export function readPkcs12(bufferOrPath: string, options: Pkcs12ReadOptions, callback: Callback<{ pkcs12: any }>): any; +export function readPkcs12(bufferOrPath: string, callback: Callback<{ pkcs12: any }>): any; /** * Verifies the signing chain of the passed certificate @@ -256,10 +256,10 @@ declare function readPkcs12(bufferOrPath: string, callback: Callback<{ pkcs12: a * @param {string[]} ca List of CA certificates * @param {Function} callback Callback function with an error object and a boolean valid */ -declare function verifySigningChain(certificate: string, ca: string[], callback: Callback): void; +export function verifySigningChain(certificate: string, ca: string[], callback: Callback): void; /** * config the pem module * @param {ModuleConfiguration} options */ -declare function config(options: ModuleConfiguration): void; +export function config(options: ModuleConfiguration): void; diff --git a/types/pem/pem-tests.ts b/types/pem/pem-tests.ts index 689dc42ad9..fe409b6560 100644 --- a/types/pem/pem-tests.ts +++ b/types/pem/pem-tests.ts @@ -1,10 +1,9 @@ import * as pem from 'pem'; const tests = { - 'Create default sized dhparam key': (test: any) => { pem.createDhparam((error: any, data: any) => { - var dhparam = (data && data.dhparam || '').toString(); + const dhparam = (data && data.dhparam || '').toString(); test.ifError(error); test.ok(dhparam); test.ok(dhparam.match(/^\n*\-\-\-\-\-BEGIN DH PARAMETERS\-\-\-\-\-\n/)); @@ -17,7 +16,7 @@ const tests = { 'Create 2048bit dhparam key': (test: any) => { pem.createDhparam(2048, (error: any, data: any) => { - var dhparam = (data && data.dhparam || '').toString(); + const dhparam = (data && data.dhparam || '').toString(); test.ifError(error); test.ok(dhparam); test.ok(dhparam.match(/^\n*\-\-\-\-\-BEGIN DH PARAMETERS\-\-\-\-\-\n/)); @@ -30,7 +29,7 @@ const tests = { 'Create default sized Private key': (test: any) => { pem.createPrivateKey((error: any, data: any) => { - var key = (data && data.key || '').toString(); + const key = (data && data.key || '').toString(); test.ifError(error); test.ok(key); test.ok(key.match(/^\n*\-\-\-\-\-BEGIN RSA PRIVATE KEY\-\-\-\-\-\n/)); @@ -43,7 +42,7 @@ const tests = { 'Create 2048bit Private key': (test: any) => { pem.createPrivateKey(2048, (error: any, data: any) => { - var key = (data && data.key || '').toString(); + const key = (data && data.key || '').toString(); test.ifError(error); test.ok(key); test.ok(key.match(/^\n*\-\-\-\-\-BEGIN RSA PRIVATE KEY\-\-\-\-\-\n/)); @@ -56,7 +55,7 @@ const tests = { 'Create 2048bit Private key with Password': (test: any) => { pem.createPrivateKey(2048, {cipher: 'des', password: 'TestMe'}, (error: any, data: any) => { - var key = (data && data.key || '').toString(); + const key = (data && data.key || '').toString(); test.ifError(error); test.ok(key); test.ok(key.match(/ENCRYPTED\n/)); @@ -70,7 +69,7 @@ const tests = { 'Create default CSR': (test: any) => { pem.createCSR((error: any, data: any) => { - var csr = (data && data.csr || '').toString(); + const csr = (data && data.csr || '').toString(); test.ifError(error); test.ok(csr); test.ok(csr.match(/^\n*\-\-\-\-\-BEGIN CERTIFICATE REQUEST\-\-\-\-\-\n/)); @@ -83,7 +82,7 @@ const tests = { }, 'Create CSR using config file': (test: any) => { - var certInfo = { + const certInfo = { issuer : {}, country: 'EE', state: 'Harjumaa', @@ -95,7 +94,7 @@ const tests = { }; pem.createCSR({ csrConfigFile: './test/fixtures/test.cnf' }, (error: any, data: any) => { - var csr = (data && data.csr || '').toString(); + const csr = (data && data.csr || '').toString(); test.ifError(error); test.ok(csr); test.ok(csr.match(/^\n*\-\-\-\-\-BEGIN CERTIFICATE REQUEST\-\-\-\-\-\n/)); @@ -115,12 +114,12 @@ const tests = { 'Create CSR with own key': (test: any) => { pem.createPrivateKey((error: any, data: any) => { - var key = (data && data.key || '').toString(); + const key = (data && data.key || '').toString(); pem.createCSR({ clientKey: key }, (error: any, data: any) => { - var csr = (data && data.csr || '').toString(); + const csr = (data && data.csr || '').toString(); test.ifError(error); test.ok(csr); test.ok(csr.match(/^\n*\-\-\-\-\-BEGIN CERTIFICATE REQUEST\-\-\-\-\-\n/)); @@ -136,15 +135,15 @@ const tests = { }, 'Create CSR with own encrypted key': (test: any) => { - var password = 'my:secure! "password\'s\nawesome'; + const password = 'my:secure! "password\'s\nawesome'; pem.createPrivateKey(2048, { cipher: 'des3', password }, (error: any, data: any) => { - var key = (data && data.key || '').toString(); + const key = (data && data.key || '').toString(); pem.createCSR({ clientKey: key, clientKeyPassword: password }, (error: any, data: any) => { - var csr = (data && data.csr || '').toString(); + const csr = (data && data.csr || '').toString(); test.ifError(error); test.ok(csr); test.ok(csr.match(/^\n*\-\-\-\-\-BEGIN CERTIFICATE REQUEST\-\-\-\-\-\n/)); @@ -161,7 +160,7 @@ const tests = { 'Create default certificate': (test: any) => { pem.createCertificate((error: any, data: any) => { - var certificate = (data && data.certificate || '').toString(); + const certificate = (data && data.certificate || '').toString(); test.ifError(error); test.ok(certificate); test.ok(certificate.match(/^\n*\-\-\-\-\-BEGIN CERTIFICATE\-\-\-\-\-\n/)); @@ -181,7 +180,7 @@ const tests = { pem.createCertificate({ selfSigned: true }, (error: any, data: any) => { - var certificate = (data && data.certificate || '').toString(); + const certificate = (data && data.certificate || '').toString(); test.ifError(error); test.ok(certificate); test.ok(certificate.match(/^\n*\-\-\-\-\-BEGIN CERTIFICATE\-\-\-\-\-\n/)); @@ -199,7 +198,7 @@ const tests = { 'Read default cert data from CSR': (test: any) => { pem.createCSR((error: any, data: any) => { - var csr = (data && data.csr || '').toString(); + const csr = (data && data.csr || '').toString(); test.ifError(error); // test.ok(fs.readdirSync('./tmp').length === 0); @@ -222,7 +221,7 @@ const tests = { }, 'Read edited cert data from CSR': (test: any) => { - var certInfo = { + const certInfo = { issuer : {}, country: 'EE', state: 'Harjumaa', @@ -233,7 +232,7 @@ const tests = { emailAddress: 'andris@node.ee' }; pem.createCSR(Object.create(certInfo), (error: any, data: any) => { - var csr = (data && data.csr || '').toString(); + const csr = (data && data.csr || '').toString(); test.ifError(error); // test.ok(fs.readdirSync('./tmp').length === 0); @@ -248,7 +247,7 @@ const tests = { 'Read default cert data from certificate': (test: any) => { pem.createCertificate((error: any, data: any) => { - var certificate = (data && data.certificate || '').toString(); + const certificate = (data && data.certificate || '').toString(); test.ifError(error); // test.ok(fs.readdirSync('./tmp').length === 0); @@ -286,7 +285,7 @@ const tests = { }, 'Read edited cert data from certificate': (test: any) => { - var certInfo = { + const certInfo = { issuer : { country: 'EE', state: 'Harjumaa', @@ -304,7 +303,7 @@ const tests = { emailAddress: 'andris@node.ee' }; pem.createCertificate(Object.create(certInfo), (error: any, data: any) => { - var certificate = (data && data.certificate || '').toString(); + const certificate = (data && data.certificate || '').toString(); test.ifError(error); // test.ok(fs.readdirSync('./tmp').length === 0); @@ -327,13 +326,13 @@ const tests = { 'Get public key from private key': (test: any) => { pem.createPrivateKey((error: any, data: any) => { - var key = (data && data.key || '').toString(); + const key = (data && data.key || '').toString(); test.ifError(error); test.ok(key); // test.ok(fs.readdirSync('./tmp').length === 0); pem.getPublicKey(key, (error: any, data: any) => { - var pubkey = (data && data.publicKey || '').toString(); + const pubkey = (data && data.publicKey || '').toString(); test.ifError(error); test.ok(pubkey); @@ -348,13 +347,13 @@ const tests = { 'Get public key from CSR': (test: any) => { pem.createCSR((error: any, data: any) => { - var key = (data && data.clientKey || '').toString(); + const key = (data && data.clientKey || '').toString(); test.ifError(error); test.ok(key); // test.ok(fs.readdirSync('./tmp').length === 0); pem.getPublicKey(key, (error: any, data: any) => { - var pubkey = (data && data.publicKey || '').toString(); + const pubkey = (data && data.publicKey || '').toString(); test.ifError(error); test.ok(pubkey); @@ -369,13 +368,13 @@ const tests = { 'Get public key from certificate': (test: any) => { pem.createCertificate((error: any, data: any) => { - var key = (data && data.clientKey || '').toString(); + const key = (data && data.clientKey || '').toString(); test.ifError(error); test.ok(key); // test.ok(fs.readdirSync('./tmp').length === 0); pem.getPublicKey(key, (error: any, data: any) => { - var pubkey = (data && data.publicKey || '').toString(); + const pubkey = (data && data.publicKey || '').toString(); test.ifError(error); test.ok(pubkey); @@ -390,13 +389,13 @@ const tests = { 'Get fingerprint from certificate': (test: any) => { pem.createCertificate((error: any, data: any) => { - var certificate = (data && data.certificate || '').toString(); + const certificate = (data && data.certificate || '').toString(); test.ifError(error); test.ok(certificate); // test.ok(fs.readdirSync('./tmp').length === 0); pem.getFingerprint(certificate, (error: any, data: any) => { - var fingerprint = (data && data.fingerprint || '').toString(); + const fingerprint = (data && data.fingerprint || '').toString(); test.ifError(error); test.ok(fingerprint); test.ok(fingerprint.match(/^[0-9A-F]{2}(:[0-9A-F]{2}){19}$/)); @@ -409,19 +408,19 @@ const tests = { 'Get modulus from certificate': (test: any) => { pem.createCertificate((error: any, data: any) => { - var certificate = (data && data.certificate || '').toString(); + const certificate = (data && data.certificate || '').toString(); test.ifError(error); test.ok(certificate); // test.ok(fs.readdirSync('./tmp').length === 0); pem.getModulus(certificate, (error: any, data: any) => { - var certmodulus = (data && data.modulus || '').toString(); + const certmodulus = (data && data.modulus || '').toString(); test.ifError(error); test.ok(certmodulus); test.ok(certmodulus.match(/^[0-9A-F]*$/)); // test.ok(fs.readdirSync('./tmp').length === 0); pem.getModulus(certificate, (error: any, data: any) => { - var keymodulus = (data && data.modulus || '').toString(); + const keymodulus = (data && data.modulus || '').toString(); test.ifError(error); test.ok(keymodulus); test.ok(keymodulus.match(/^[0-9A-F]*$/)); @@ -434,17 +433,17 @@ const tests = { }, 'Get modulus from a protected key': (test: any) => { - var certificate = ''; // fs.readFileSync('./test/fixtures/test.crt').toString(); - var key = ''; // fs.readFileSync('./test/fixtures/test.key').toString(); + const certificate = ''; // fs.readFileSync('./test/fixtures/test.crt').toString(); + const key = ''; // fs.readFileSync('./test/fixtures/test.key').toString(); pem.getModulus(certificate, (error: any, data: any) => { - var certmodulus = (data && data.modulus || '').toString(); + const certmodulus = (data && data.modulus || '').toString(); test.ifError(error); test.ok(certmodulus); test.ok(certmodulus.match(/^[0-9A-F]*$/)); // test.ok(fs.readdirSync('./tmp').length === 0); pem.getModulus(key, 'password', (error: any, data: any) => { - var keymodulus = (data && data.modulus || '').toString(); + const keymodulus = (data && data.modulus || '').toString(); test.ifError(error); test.ok(keymodulus); test.ok(keymodulus.match(/^[0-9A-F]*$/)); @@ -453,15 +452,14 @@ const tests = { test.done(); }); }); - }, 'Get DH param info': (test: any) => { - var dh = ''; // fs.readFileSync('./test/fixtures/test.dh').toString(); + const dh = ''; // fs.readFileSync('./test/fixtures/test.dh').toString(); pem.getDhparamInfo(dh, (error: any, data: any) => { - var size = data && data.size || 0; - var prime = (data && data.prime || '').toString(); + const size = data && data.size || 0; + const prime = (data && data.prime || '').toString(); test.ifError(error); test.equal(size, 1024); test.ok(prime); @@ -473,11 +471,11 @@ const tests = { }, 'Create and verify wildcard certificate': (test: any) => { - var certInfo = { + const certInfo = { commonName: '*.node.ee' }; pem.createCertificate(Object.create(certInfo), (error: any, data: any) => { - var certificate = (data && data.certificate || '').toString(); + const certificate = (data && data.certificate || '').toString(); test.ifError(error); // test.ok(fs.readdirSync('./tmp').length === 0); @@ -507,13 +505,12 @@ const tests = { }, 'Create PKCS12 without key password': (test: any) => { pem.createPrivateKey((error: any, data: any) => { - var key = (data && data.key || '').toString(); + const key = (data && data.key || '').toString(); pem.createCertificate({ clientKey: key, selfSigned: true }, (error: any, csr: any) => { - pem.createPkcs12(csr.clientKey, csr.certificate, 'mypassword', (err: any, pkcs12: any) => { test.ifError(err); test.ok(pkcs12); @@ -526,13 +523,12 @@ const tests = { }, 'Create PKCS12 with key password': (test: any) => { pem.createPrivateKey({cipher: 'aes128', password: 'xxx'}, (error: any, data: any) => { - var key = (data && data.key || '').toString(); + const key = (data && data.key || '').toString(); pem.createCertificate({ clientKey: key, selfSigned: true }, (error: any, csr: any) => { - pem.createPkcs12(csr.clientKey, csr.certificate, 'mypassword', {cipher: 'aes256', clientKeyPassword: 'xxx'}, (err: any, pkcs12: any) => { test.ifError(err); test.ok(pkcs12); diff --git a/types/pixi.js/index.d.ts b/types/pixi.js/index.d.ts index cccbc1fbd9..d7a71abcef 100644 --- a/types/pixi.js/index.d.ts +++ b/types/pixi.js/index.d.ts @@ -5,39 +5,38 @@ // TypeScript Version: 2.1 declare namespace PIXI { - // from CONST - export const VERSION: typeof CONST.VERSION; - export const PI_2: typeof CONST.PI_2; - export const RAD_TO_DEG: typeof CONST.RAD_TO_DEG; - export const DEG_TO_RAD: typeof CONST.DEG_TO_RAD; - export const RENDERER_TYPE: typeof CONST.RENDERER_TYPE; - export const BLEND_MODES: typeof CONST.BLEND_MODES; - export const DRAW_MODES: typeof CONST.DRAW_MODES; - export const SCALE_MODES: typeof CONST.SCALE_MODES; - export const WRAP_MODES: typeof CONST.WRAP_MODES; - export const TRANSFORM_MODE: typeof CONST.TRANSFORM_MODE; - export const PRECISION: typeof CONST.PRECISION; - export const GC_MODES: typeof CONST.GC_MODES; - export const SHAPES: typeof CONST.SHAPES; - export const TEXT_GRADIENT: typeof CONST.TEXT_GRADIENT; + const VERSION: typeof CONST.VERSION; + const PI_2: typeof CONST.PI_2; + const RAD_TO_DEG: typeof CONST.RAD_TO_DEG; + const DEG_TO_RAD: typeof CONST.DEG_TO_RAD; + const RENDERER_TYPE: typeof CONST.RENDERER_TYPE; + const BLEND_MODES: typeof CONST.BLEND_MODES; + const DRAW_MODES: typeof CONST.DRAW_MODES; + const SCALE_MODES: typeof CONST.SCALE_MODES; + const WRAP_MODES: typeof CONST.WRAP_MODES; + const TRANSFORM_MODE: typeof CONST.TRANSFORM_MODE; + const PRECISION: typeof CONST.PRECISION; + const GC_MODES: typeof CONST.GC_MODES; + const SHAPES: typeof CONST.SHAPES; + const TEXT_GRADIENT: typeof CONST.TEXT_GRADIENT; - export function autoDetectRenderer(width: number, height: number, options?: PIXI.IRendererOptions, noWebGL?: boolean): PIXI.WebGLRenderer | PIXI.CanvasRenderer; - export const loader: PIXI.loaders.Loader; + function autoDetectRenderer(width: number, height: number, options?: PIXI.IRendererOptions, noWebGL?: boolean): PIXI.WebGLRenderer | PIXI.CanvasRenderer; + const loader: PIXI.loaders.Loader; ////////////////////////////////////////////////////////////////////////////// ///////////////////////////////SETTINGS/////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// - export namespace settings { - export let TARGET_FPMS: number; - export let MIPMAP_TEXTURES: boolean; - export let RESOLUTION: number; - export let FILTER_RESOLUTION: number; - export let SPRITE_MAX_TEXTURES: number; - export let SPRITE_BATCH_SIZE: number; - export let RETINA_PREFIX: RegExp; - export const RENDER_OPTIONS: { + namespace settings { + let TARGET_FPMS: number; + let MIPMAP_TEXTURES: boolean; + let RESOLUTION: number; + let FILTER_RESOLUTION: number; + let SPRITE_MAX_TEXTURES: number; + let SPRITE_BATCH_SIZE: number; + let RETINA_PREFIX: RegExp; + const RENDER_OPTIONS: { view: HTMLCanvasElement | null, antialias: boolean, forceFXAA: boolean, @@ -48,26 +47,24 @@ declare namespace PIXI { preserveDrawingBuffer: boolean, roundPixels: boolean }; - export let TRANSFORM_MODE: number; - export let GC_MODE: number; - export let GC_MAX_IDLE: number; - export let GC_MAX_CHECK_COUNT: number; - export let WRAP_MODE: number; - export let SCALE_MODE: number; - export let PRECISION: string; - export let UPLOADS_PER_FRAME: number; - export let CAN_UPLOAD_SAME_BUFFER: boolean; + let TRANSFORM_MODE: number; + let GC_MODE: number; + let GC_MAX_IDLE: number; + let GC_MAX_CHECK_COUNT: number; + let WRAP_MODE: number; + let SCALE_MODE: number; + let PRECISION: string; + let UPLOADS_PER_FRAME: number; + let CAN_UPLOAD_SAME_BUFFER: boolean; } ////////////////////////////////////////////////////////////////////////////// /////////////////////////////ACCESSIBILITY//////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// - export namespace accessibility { - + namespace accessibility { // accessibility - export class AccessibilityManager { - + class AccessibilityManager { constructor(renderer: CanvasRenderer | WebGLRenderer); protected div: HTMLElement; @@ -91,17 +88,13 @@ declare namespace PIXI { protected _onMouseMove(): void; destroy(): void; - } - export interface IAccessibleTarget { - + interface IAccessibleTarget { accessible: boolean; accessibleTitle: string | null; accessibleHint: string | null; tabIndex: number; - } - } ////////////////////////////////////////////////////////////////////////////// @@ -110,18 +103,18 @@ declare namespace PIXI { // const - export namespace CONST { - export const VERSION: string; - export const PI_2: number; - export const RAD_TO_DEG: number; - export const DEG_TO_RAD: number; - export const TARGET_FPMS: number; - export const RENDERER_TYPE: { + namespace CONST { + const VERSION: string; + const PI_2: number; + const RAD_TO_DEG: number; + const DEG_TO_RAD: number; + const TARGET_FPMS: number; + const RENDERER_TYPE: { UNKNOWN: number; WEBGL: number; CANVAS: number; }; - export const BLEND_MODES: { + const BLEND_MODES: { NORMAL: number; ADD: number; MULTIPLY: number; @@ -140,7 +133,7 @@ declare namespace PIXI { COLOR: number; LUMINOSITY: number; }; - export const DRAW_MODES: { + const DRAW_MODES: { POINTS: number; LINES: number; LINE_LOOP: number; @@ -149,40 +142,40 @@ declare namespace PIXI { TRIANGLE_STRIP: number; TRIANGLE_FAN: number; }; - export const SCALE_MODES: { + const SCALE_MODES: { LINEAR: number, NEAREST: number }; - export const GC_MODES: { + const GC_MODES: { AUTO: number; MANUAL: number; }; - export const WRAP_MODES: { + const WRAP_MODES: { CLAMP: number; MIRRORED_REPEAT: number; REPEAT: number; }; - export const TRANSFORM_MODE: { + const TRANSFORM_MODE: { DEFAULT: number; DYNAMIC: number; STATIC: number; }; - export const URL_FILE_EXTENSION: RegExp | string; - export const DATA_URI: RegExp | string; - export const SVG_SIZE: RegExp | string; - export const SHAPES: { + const URL_FILE_EXTENSION: RegExp | string; + const DATA_URI: RegExp | string; + const SVG_SIZE: RegExp | string; + const SHAPES: { POLY: number; RECT: number; CIRC: number; ELIP: number; RREC: number; }; - export const PRECISION: { + const PRECISION: { LOW: string; MEDIUM: string; HIGH: string; }; - export const TEXT_GRADIENT: { + const TEXT_GRADIENT: { LINEAR_VERTICAL: number; LINEAR_HORIZONTAL: number; }; @@ -190,8 +183,7 @@ declare namespace PIXI { // display - export interface IApplicationOptions extends IRendererOptions { - + interface IApplicationOptions extends IRendererOptions { view?: HTMLCanvasElement; transparent?: boolean; autoResize?: boolean; @@ -203,11 +195,9 @@ declare namespace PIXI { context?: WebGLRenderingContext; preserveDrawingBuffer?: boolean; legacy?: boolean; - } - export class Application { - + class Application { constructor(width?: number, height?: number, options?: IApplicationOptions, noWebGL?: boolean, useSharedTicker?: boolean); private _ticker: ticker.Ticker; @@ -222,16 +212,14 @@ declare namespace PIXI { render(): void; destroy(removeView?: boolean): void; readonly view: HTMLCanvasElement; - } - export interface IDestroyOptions { + interface IDestroyOptions { children?: boolean; texture?: boolean; baseTexture?: boolean; } - export class Bounds { - + class Bounds { minX: number; minY: number; maxX: number; @@ -249,10 +237,8 @@ declare namespace PIXI { addBounds(bounds: Bounds): void; addBoundsMask(bounds: Bounds, mask: Bounds): void; addBoundsArea(bounds: Bounds, area: Rectangle): void; - } - export class Container extends DisplayObject { - + class Container extends DisplayObject { // begin extras.getChildByName getChildByName(name: string): DisplayObject; // end extras.getChildByName @@ -289,10 +275,8 @@ declare namespace PIXI { on(event: "removed", fn: (DisplayObject: DisplayObject) => void, context?: any): this; on(event: string, fn: Function, context?: any): this; off(event: string, fn: Function, context?: any): this; - } - export class DisplayObject extends utils.EventEmitter implements interaction.InteractiveTarget, accessibility.IAccessibleTarget { - + class DisplayObject extends utils.EventEmitter implements interaction.InteractiveTarget, accessibility.IAccessibleTarget { // begin extras.cacheAsBitmap protected _cacheAsBitmap: boolean; protected _cacheData: boolean; @@ -413,11 +397,9 @@ declare namespace PIXI { once(event: 'touchmove', fn: (event: interaction.InteractionEvent) => void, context?: any): this; once(event: 'touchstart', fn: (event: interaction.InteractionEvent) => void, context?: any): this; */ - } - export class TransformBase { - + class TransformBase { static IDENTITY: TransformBase; worldTransform: Matrix; @@ -426,10 +408,8 @@ declare namespace PIXI { updateLocalTransform(): void; updateTransform(parentTransform: TransformBase): void; updateWorldTransform(parentTransform: TransformBase): void; - } - export class TransformStatic extends TransformBase { - + class TransformStatic extends TransformBase { position: ObservablePoint; scale: ObservablePoint; pivot: ObservablePoint; @@ -451,10 +431,8 @@ declare namespace PIXI { setFromMatrix(matrix: Matrix): void; rotation: number; - } - export class Transform extends TransformBase { - + class Transform extends TransformBase { constructor(); position: Point; @@ -474,14 +452,20 @@ declare namespace PIXI { setFromMatrix(matrix: Matrix): void; rotation: number; - } // graphics - export class GraphicsData { - - constructor(lineWidth: number, lineColor: number, lineAlpha: number, fillColor: number, fillAlpha: number, fill: boolean, nativeLines: boolean, shape: IShape | Circle | Rectangle | RoundedRectangle | Ellipse | Polygon); + class GraphicsData { + constructor( + lineWidth: number, + lineColor: number, + lineAlpha: number, + fillColor: number, + fillAlpha: number, + fill: boolean, + nativeLines: boolean, + shape: IShape | Circle | Rectangle | RoundedRectangle | Ellipse | Polygon); lineWidth: number; nativeLines: boolean; @@ -498,10 +482,8 @@ declare namespace PIXI { clone(): GraphicsData; addHole(shape: IShape | Circle | Rectangle | RoundedRectangle | Ellipse | Polygon): void; destroy(options?: IDestroyOptions | boolean): void; - } - export class Graphics extends Container { - + class Graphics extends Container { constructor(nativeLines?: boolean); fillAlpha: number; @@ -554,19 +536,15 @@ declare namespace PIXI { protected closePath(): Graphics; protected addHole(): Graphics; destroy(options?: IDestroyOptions | boolean): void; - } - export class CanvasGraphicsRenderer { - + class CanvasGraphicsRenderer { constructor(renderer: SystemRenderer); render(graphics: Graphics): void; protected updateGraphicsTint(graphics: Graphics): void; protected renderPolygon(points: Point[], close: boolean, context: CanvasRenderingContext2D): void; destroy(): void; - } - export class GraphicsRenderer extends ObjectRenderer { - + class GraphicsRenderer extends ObjectRenderer { constructor(renderer: PIXI.CanvasRenderer); protected graphicsDataPool: GraphicsData[]; @@ -579,10 +557,8 @@ declare namespace PIXI { render(graphics: Graphics): void; protected updateGraphics(graphics: PIXI.Graphics): void; getWebGLData(webGL: WebGLRenderingContext, type: number): WebGLGraphicsData; - } - export class WebGLGraphicsData { - + class WebGLGraphicsData { constructor(gl: WebGLRenderingContext, shader: glCore.GLShader, attribsState: glCore.IAttribState); gl: WebGLRenderingContext; @@ -600,40 +576,36 @@ declare namespace PIXI { reset(): void; upload(): void; destroy(): void; - } - export class PrimitiveShader extends glCore.GLShader { } + class PrimitiveShader extends glCore.GLShader { } // math - export namespace GroupD8 { - - export const E: number; - export const SE: number; - export const S: number; - export const SW: number; - export const W: number; - export const NW: number; - export const N: number; - export const NE: number; - export const MIRROR_HORIZONTAL: number; - export const MIRROR_VERTICAL: number; - - export function uX(ind: number): number; - export function uY(ind: number): number; - export function vX(ind: number): number; - export function vY(ind: number): number; - export function inv(rotation: number): number; - export function add(rotationSecond: number, rotationFirst: number): number; - export function sub(rotationSecond: number, rotationFirst: number): number; - export function rotate180(rotation: number): number; - export function isSwapWidthHeight(rotation: number): boolean; - export function byDirection(dx: number, dy: number): number; - export function matrixAppendRotationInv(matrix: Matrix, rotation: number, tx: number, ty: number): void; + namespace GroupD8 { + const E: number; + const SE: number; + const S: number; + const SW: number; + const W: number; + const NW: number; + const N: number; + const NE: number; + const MIRROR_HORIZONTAL: number; + const MIRROR_VERTICAL: number; + function uX(ind: number): number; + function uY(ind: number): number; + function vX(ind: number): number; + function vY(ind: number): number; + function inv(rotation: number): number; + function add(rotationSecond: number, rotationFirst: number): number; + function sub(rotationSecond: number, rotationFirst: number): number; + function rotate180(rotation: number): number; + function isSwapWidthHeight(rotation: number): boolean; + function byDirection(dx: number, dy: number): number; + function matrixAppendRotationInv(matrix: Matrix, rotation: number, tx: number, ty: number): void; } - export class Matrix { - + class Matrix { constructor(a?: number, b?: number, c?: number, d?: number, tx?: number, ty?: number); a: number; @@ -662,10 +634,8 @@ declare namespace PIXI { static IDENTITY: Matrix; static TEMP_MATRIX: Matrix; - } - export class ObservablePoint { - + class ObservablePoint { constructor(cb: Function, scope?: any, x?: number, y?: number); x: number; @@ -675,10 +645,8 @@ declare namespace PIXI { set(x?: number, y?: number): void; copy(point: Point | ObservablePoint): void; - } - export class Point { - + class Point { constructor(x?: number, y?: number); x: number; @@ -688,18 +656,14 @@ declare namespace PIXI { copy(p: Point): void; equals(p: Point): boolean; set(x?: number, y?: number): void; - } - export interface IShape { + interface IShape { } - export interface IHitArea extends IShape { - + interface IHitArea extends IShape { contains(x: number, y: number): boolean; - } - export class Circle { - + class Circle { constructor(x?: number, y?: number, radius?: number); x: number; @@ -710,10 +674,8 @@ declare namespace PIXI { clone(): Circle; contains(x: number, y: number): boolean; getBounds(): Rectangle; - } - export class Ellipse { - + class Ellipse { constructor(x?: number, y?: number, width?: number, height?: number); x: number; @@ -725,10 +687,8 @@ declare namespace PIXI { clone(): Ellipse; contains(x: number, y: number): boolean; getBounds(): Rectangle; - } - export class Polygon { - + class Polygon { constructor(points: Point[] | number[]); constructor(...points: Point[]); constructor(...points: number[]); @@ -740,10 +700,8 @@ declare namespace PIXI { clone(): Polygon; contains(x: number, y: number): boolean; close(): void; - } - export class Rectangle { - + class Rectangle { constructor(x?: number, y?: number, width?: number, height?: number); x: number; @@ -764,10 +722,8 @@ declare namespace PIXI { pad(paddingX: number, paddingY: number): void; fit(rectangle: Rectangle): void; enlarge(rectangle: Rectangle): void; - } - export class RoundedRectangle { - + class RoundedRectangle { constructor(x?: number, y?: number, width?: number, height?: number, radius?: number); x: number; @@ -779,13 +735,11 @@ declare namespace PIXI { clone(): RoundedRectangle; contains(x: number, y: number): boolean; - } // renderers - export interface IRendererOptions { - + interface IRendererOptions { view?: HTMLCanvasElement; transparent?: boolean; autoResize?: boolean; @@ -795,10 +749,8 @@ declare namespace PIXI { backgroundColor?: number; roundPixels?: boolean; context?: WebGLRenderingContext; - } - export class SystemRenderer extends utils.EventEmitter { - + class SystemRenderer extends utils.EventEmitter { constructor(system: string, screenWidth?: number, screenHeight?: number, options?: IRendererOptions); type: number; @@ -824,10 +776,8 @@ declare namespace PIXI { generateTexture(displayObject: DisplayObject, scaleMode?: number, resolution?: number): RenderTexture; render(...args: any[]): void; destroy(removeView?: boolean): void; - } - export class CanvasRenderer extends SystemRenderer { - + class CanvasRenderer extends SystemRenderer { // plugintarget mixin start static __plugins: Object; static registerPlugin(pluginName: string, ctor: Function): void; @@ -862,20 +812,16 @@ declare namespace PIXI { once(event: "postrender", fn: () => void, context?: any): this; once(event: string, fn: Function, context?: any): this; off(event: string, fn: Function, context?: any): this; - } - export class CanvasMaskManager { - + class CanvasMaskManager { constructor(renderer: CanvasRenderer); pushMask(maskData: any): void; protected renderGraphicsShape(graphics: Graphics): void; popMask(renderer: WebGLRenderer | CanvasRenderer): void; destroy(): void; - } - export class CanvasRenderTarget { - + class CanvasRenderTarget { constructor(width: number, height: number, resolution: number); canvas: HTMLCanvasElement; @@ -888,11 +834,9 @@ declare namespace PIXI { clear(): void; resize(width: number, height: number): void; destroy(): void; - } - export interface IWebGLRendererOptions { - + interface IWebGLRendererOptions { view?: HTMLCanvasElement; transparent?: boolean; autoResize?: boolean; @@ -903,10 +847,8 @@ declare namespace PIXI { preserveDrawingBuffer?: boolean; roundPixels?: boolean; legacy?: boolean; - } - export class WebGLRenderer extends SystemRenderer { - + class WebGLRenderer extends SystemRenderer { // plugintarget mixin start static __plugins: Object; static registerPlugin(pluginName: string, ctor: Function): void; @@ -973,10 +915,8 @@ declare namespace PIXI { once(event: "postrender", fn: () => void, context?: any): this; once(event: string, fn: Function, context?: any): this; off(event: string, fn: Function, context?: any): this; - } - export class WebGLState { - + class WebGLState { constructor(gl: WebGLRenderingContext); activeState: number[]; @@ -998,10 +938,8 @@ declare namespace PIXI { setFrontFace(value: number): void; resetAttributes(): void; resetToDefault(): void; - } - export class TextureManager { - + class TextureManager { constructor(renderer: WebGLRenderer); renderer: WebGLRenderer; @@ -1014,10 +952,8 @@ declare namespace PIXI { destroyTexture(texture: BaseTexture, _skipRemove?: boolean): void; removeAll(): void; destroy(): void; - } - export class TextureGarbageCollector { - + class TextureGarbageCollector { constructor(renderer: WebGLRenderer); renderer: WebGLRenderer; @@ -1030,10 +966,8 @@ declare namespace PIXI { update(): void; run(): void; unload(): void; - } - export abstract class ObjectRenderer extends WebGLManager { - + abstract class ObjectRenderer extends WebGLManager { constructor(renderer: WebGLRenderer); start(): void; @@ -1041,10 +975,8 @@ declare namespace PIXI { flush(): void; render(...args: any[]): void; - } - export class Quad { - + class Quad { constructor(gl: WebGLRenderingContext); gl: WebGLRenderingContext; @@ -1058,10 +990,8 @@ declare namespace PIXI { map(targetTextureFrame: Rectangle, destinationFrame: Rectangle): Quad; upload(): Quad; destroy(): void; - } - export class RenderTarget { - + class RenderTarget { constructor(gl: WebGLRenderingContext, width: number, height: number, scaleMode: number, resolution: number, root?: boolean); gl: WebGLRenderingContext; @@ -1080,11 +1010,11 @@ declare namespace PIXI { stencilMaskStack: Graphics[]; filterData: { index: number, - stack: { + stack: Array<{ renderTarget: RenderTarget, filter: any[]; bounds: Rectangle - }[] + }> }; scaleMode: number; root: boolean; @@ -1096,32 +1026,28 @@ declare namespace PIXI { calculateProjection(destinationFrame: Rectangle, sourceFrame: Rectangle): void; resize(width: number, height: number): void; destroy(): void; - } - export class BlendModeManager extends WebGLManager { - + class BlendModeManager extends WebGLManager { constructor(renderer: WebGLRenderer); currentBlendMode: number; setBlendMode(blendMode: number): boolean; - } - export class FilterManager extends WebGLManager { - + class FilterManager extends WebGLManager { constructor(renderer: WebGLRenderer); gl: WebGLRenderingContext; quad: Quad; - stack: { + stack: Array<{ renderTarget: RenderTarget; sourceFrame: Rectangle; destinationFrame: Rectangle; filters: Filter[]; target: any; resolution: number; - }[]; + }>; stackIndex: number; shaderCache: any; filterData: any; @@ -1139,17 +1065,13 @@ declare namespace PIXI { emptyPool(): void; getPotRenderTarget(gl: WebGLRenderingContext, minWidth: number, minHeight: number, resolution: number): RenderTarget; freePotRenderTarget(renderTarget: RenderTarget): void; - } - export class StencilMaskStack { - + class StencilMaskStack { stencilStack: any[]; reverse: boolean; count: number; - } - export class MaskManager extends WebGLManager { - + class MaskManager extends WebGLManager { scissor: boolean; scissorData: any; scissorRenderTarget: RenderTarget; @@ -1164,10 +1086,8 @@ declare namespace PIXI { popStencilMask(): void; pushScissorMask(target: RenderTarget, maskData: Sprite | Graphics): void; popScissorMask(): void; - } - export class StencilManager extends WebGLManager { - + class StencilManager extends WebGLManager { constructor(renderer: WebGLRenderer); stencilMaskStack: Graphics[]; @@ -1176,28 +1096,22 @@ declare namespace PIXI { pushStencil(graphics: Graphics): void; popStencil(): void; destroy(): void; - } - export class WebGLManager { - + class WebGLManager { constructor(renderer: WebGLRenderer); renderer: SystemRenderer; onContextChange(): void; destroy(): void; - } - export interface IUniformData { - + interface IUniformData { type: string; value: any; // name is set by pixi if uniforms were automatically extracted from shader code, but not used anywhere name?: string; - } - export class Filter { - + class Filter { constructor(vertexSrc?: string, fragmentSrc?: string, uniforms?: { [name: string]: IUniformData }); vertextSrc?: string; @@ -1214,22 +1128,18 @@ declare namespace PIXI { static defaultVertexSrc: string; static defaultFragmentSrc: string; - } - export class SpriteMaskFilter extends Filter { - + class SpriteMaskFilter extends Filter { constructor(sprite: Sprite); maskSprite: Sprite; maskMatrix: Matrix; apply(filterManager: FilterManager, input: RenderTarget, output: RenderTarget): void; - } // sprites - export class Sprite extends Container { - + class Sprite extends Container { constructor(texture?: Texture); protected _anchor: ObservablePoint; @@ -1268,19 +1178,15 @@ declare namespace PIXI { static from(source: number | string | BaseTexture | HTMLImageElement | HTMLCanvasElement | HTMLVideoElement): Sprite; static fromFrame(frameId: string): Sprite; static fromImage(imageId: string, crossorigin?: boolean, scaleMode?: number): Sprite; - } - export class BatchBuffer { - + class BatchBuffer { vertices: ArrayBuffer; float32View: number[]; uint32View: number[]; destroy(): void; - } - export class SpriteRenderer extends ObjectRenderer { - + class SpriteRenderer extends ObjectRenderer { constructor(renderer: PIXI.WebGLRenderer); vertSize: number; @@ -1305,33 +1211,28 @@ declare namespace PIXI { start(): void; stop(): void; destroy(): void; - } - export class CanvasSpriteRenderer extends ObjectRenderer { - + class CanvasSpriteRenderer extends ObjectRenderer { constructor(renderer: WebGLRenderer); render(sprite: Sprite): void; destroy(): void; - } - export namespace CanvasTinter { - - export function getTintedTexture(sprite: Sprite, color: number): HTMLCanvasElement; - export function tintWithMultiply(texture: Texture, color: number, canvas: HTMLCanvasElement): void; - export function tintWithOverlay(texture: Texture, color: number, canvas: HTMLCanvasElement): void; - export function tintWithPerPixel(texture: Texture, color: number, canvas: HTMLCanvasElement): void; - export function roundColor(color: number): number; - - export let cacheStepsPerColorChannel: number; - export let convertTintToImage: boolean; - export let canUseMultiply: boolean; - export let tintMethod: Function; + namespace CanvasTinter { + function getTintedTexture(sprite: Sprite, color: number): HTMLCanvasElement; + function tintWithMultiply(texture: Texture, color: number, canvas: HTMLCanvasElement): void; + function tintWithOverlay(texture: Texture, color: number, canvas: HTMLCanvasElement): void; + function tintWithPerPixel(texture: Texture, color: number, canvas: HTMLCanvasElement): void; + function roundColor(color: number): number; + let cacheStepsPerColorChannel: number; + let convertTintToImage: boolean; + let canUseMultiply: boolean; + let tintMethod: Function; } // text - export interface TextStyleOptions { + interface TextStyleOptions { align?: string; breakWords?: boolean; dropShadow?: boolean; @@ -1361,8 +1262,7 @@ declare namespace PIXI { wordWrapWidth?: number; } - export class TextStyle implements TextStyleOptions { - + class TextStyle implements TextStyleOptions { constructor(style: TextStyleOptions) styleID: number; @@ -1424,11 +1324,9 @@ declare namespace PIXI { wordWrap: boolean; protected _wordWrapWidth: number; wordWrapWidth: number; - } - export class Text extends Sprite { - + class Text extends Sprite { static getFontStyle(style: TextStyleOptions): string; static calculateFontProperties(style: string): any; @@ -1464,13 +1362,11 @@ declare namespace PIXI { protected _generateFillStyle(style: TextStyle, lines: string[]): string | number | CanvasGradient; destroy(options?: IDestroyOptions | boolean): void; dirty: boolean; - } // textures - export class BaseRenderTexture extends BaseTexture { - + class BaseRenderTexture extends BaseTexture { constructor(width?: number, height?: number, scaleMode?: number, resolution?: number); height: number; @@ -1492,10 +1388,8 @@ declare namespace PIXI { on(event: "update", fn: (baseRenderTexture: BaseRenderTexture) => void, context?: any): this; on(event: string, fn: Function, context?: any): this; off(event: string, fn: Function, context?: any): this; - } - export class BaseTexture extends utils.EventEmitter { - + class BaseTexture extends utils.EventEmitter { static from(source: string | HTMLImageElement | HTMLCanvasElement, scaleMode?: number, sourceScale?: number): BaseTexture; constructor(source?: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement, scaleMode?: number, resolution?: number); @@ -1551,10 +1445,8 @@ declare namespace PIXI { once(event: "dispose", fn: (baseTexture: BaseTexture) => void, context?: any): this; once(event: string, fn: Function, context?: any): this; off(event: string, fn: Function, context?: any): this; - } - export class RenderTexture extends Texture { - + class RenderTexture extends Texture { constructor(baseRenderTexture: BaseRenderTexture, frame?: Rectangle); protected legacyRenderer: any; @@ -1563,11 +1455,9 @@ declare namespace PIXI { resize(width: number, height: number, doNotResizeBaseTexture?: boolean): void; static create(width?: number, height?: number, scaleMode?: number, resolution?: number): RenderTexture; - } - export class Texture extends utils.EventEmitter { - - static from(source: number | string | HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | PIXI.BaseTexture): Texture; + class Texture extends utils.EventEmitter { + static from(source: number | string | HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | BaseTexture): Texture; constructor(baseTexture: BaseTexture, frame?: Rectangle, orig?: Rectangle, trim?: Rectangle, rotate?: number); @@ -1594,7 +1484,6 @@ declare namespace PIXI { static fromCanvas(canvas: HTMLCanvasElement, scaleMode?: number): Texture; static fromVideo(video: HTMLVideoElement | string, scaleMode?: number): Texture; static fromVideoUrl(videoUrl: string, scaleMode?: number): Texture; - static from(source: string | BaseTexture | HTMLImageElement | HTMLCanvasElement | HTMLVideoElement): Texture; static fromLoader(source: HTMLImageElement | HTMLCanvasElement, imageUrl: string, name?: string): Texture; static addTextureToCache(texture: Texture, id: string): void; static removeTextureFromCache(id: string): Texture | undefined; @@ -1612,10 +1501,8 @@ declare namespace PIXI { once(event: "update", fn: (texture: Texture) => void, context?: any): this; once(event: string, fn: Function, context?: any): this; off(event: string, fn: Function, context?: any): this; - } - export class TextureUvs { - + class TextureUvs { x0: number; y0: number; x1: number; @@ -1628,11 +1515,9 @@ declare namespace PIXI { uvsUint32: Uint32Array; protected set(frame: Rectangle, baseFrame: Rectangle, rotate: number): void; - } - export class Spritesheet { - + class Spritesheet { static BATCH_SIZE: number; constructor(baseTexture: BaseTexture, data: any, resolutionFilename?: string); @@ -1651,11 +1536,9 @@ declare namespace PIXI { protected _parseComplete(): void; protected _nextBatch(): void; destroy(destroyBase?: boolean): void; - } - export class VideoBaseTexture extends BaseTexture { - + class VideoBaseTexture extends BaseTexture { constructor(source: HTMLVideoElement, scaleMode?: number); autoUpdate: boolean; @@ -1681,11 +1564,9 @@ declare namespace PIXI { // ticker namespace ticker { + const shared: Ticker; - export const shared: Ticker; - - export class Ticker { - + class Ticker { protected _tick(time: number): void; protected _emitter: utils.EventEmitter; protected _requestId: number | null; @@ -1711,23 +1592,19 @@ declare namespace PIXI { start(): void; stop(): void; update(): void; - } - } // shader - export class Shader extends glCore.GLShader { } + class Shader extends glCore.GLShader { } ////////////////////////////////////////////////////////////////////////////// ////////////////////////////EXTRACT/////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// - export namespace extract { - - export class CanvasExtract { - + namespace extract { + class CanvasExtract { protected renderer: CanvasRenderer; constructor(renderer: CanvasRenderer); @@ -1738,9 +1615,8 @@ declare namespace PIXI { pixels(renderTexture?: DisplayObject | RenderTexture): number[]; destroy(): void; - } - export class WebGLExtract { + class WebGLExtract { protected renderer: WebGLRenderer; constructor(renderer: WebGLRenderer); @@ -1752,27 +1628,22 @@ declare namespace PIXI { destroy(): void; } - } ////////////////////////////////////////////////////////////////////////////// ////////////////////////////EXTRAS//////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// - export namespace extras { - - export interface IBitmapTextStyle { - + namespace extras { + interface IBitmapTextStyle { font?: string | { name?: string; size?: number; }; align?: string; tint?: number; - } - export class BitmapText extends Container { - + class BitmapText extends Container { static registerFont(xml: XMLDocument, texture: Texture): any; constructor(text: string, style?: IBitmapTextStyle); @@ -1806,16 +1677,14 @@ declare namespace PIXI { protected validate(): void; static fonts: any; - } - export class AnimatedSprite extends Sprite { - - constructor(textures: Texture[] | { texture: Texture, time?: number }[], autoUpdate?: boolean); + class AnimatedSprite extends Sprite { + constructor(textures: Texture[] | Array<{ texture: Texture, time?: number }>, autoUpdate?: boolean); protected _autoUpdate: boolean; protected _textures: Texture[]; protected _durations: number[]; - textures: Texture[] | { texture: Texture, time?: number }[]; + textures: Texture[] | Array<{ texture: Texture, time?: number }>; animationSpeed: number; loop: boolean; onComplete: () => void; @@ -1833,10 +1702,8 @@ declare namespace PIXI { static fromFrames(frame: string[]): AnimatedSprite; static fromImages(images: string[]): AnimatedSprite; - } - export class TextureTransform { - + class TextureTransform { constructor(texture: Texture, clampMargin?: number); protected _texture: Texture; @@ -1851,10 +1718,8 @@ declare namespace PIXI { texture: Texture; update(forceUpdate?: boolean): void; - } - export class TilingSprite extends Sprite { - + class TilingSprite extends Sprite { constructor(texture: Texture, width?: number, height?: number); tileTransform: TransformStatic; @@ -1884,27 +1749,21 @@ declare namespace PIXI { width: number; height: number; - } - export class TilingSpriteRenderer extends ObjectRenderer { - + class TilingSpriteRenderer extends ObjectRenderer { constructor(renderer: WebGLRenderer); render(ts: TilingSprite): void; - } - } ////////////////////////////////////////////////////////////////////////////// ////////////////////////////FILTERS/////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// - export namespace filters { - - export class FXAAFilter extends Filter { } - export class BlurFilter extends Filter { - + namespace filters { + class FXAAFilter extends Filter { } + class BlurFilter extends Filter { constructor(strength?: number, quality?: number, resolution?: number, kernelSize?: number); blurXFilter: BlurXFilter; @@ -1916,10 +1775,8 @@ declare namespace PIXI { blurX: number; blurY: number; quality: number; - } - export class BlurXFilter extends Filter { - + class BlurXFilter extends Filter { constructor(strength?: number, quality?: number, resolution?: number, kernelSize?: number); protected _quality: number; @@ -1930,10 +1787,8 @@ declare namespace PIXI { strength: number; firstRun: boolean; blur: number; - } - export class BlurYFilter extends Filter { - + class BlurYFilter extends Filter { constructor(strength?: number, quality?: number, resolution?: number, kernelSize?: number); protected _quality: number; @@ -1944,10 +1799,8 @@ declare namespace PIXI { strength: number; firstRun: boolean; blur: number; - } - export class ColorMatrixFilter extends Filter { - + class ColorMatrixFilter extends Filter { constructor(); protected _loadMatrix(matrix: number[], multiply?: boolean): void; @@ -1976,38 +1829,30 @@ declare namespace PIXI { predator(amount: number, multiply?: boolean): void; lsd(multiply?: boolean): void; reset(): void; - } - export class DisplacementFilter extends Filter { - + class DisplacementFilter extends Filter { constructor(sprite: Sprite, scale?: number); scale: Point; map: Texture; - } - export class VoidFilter extends Filter { + class VoidFilter extends Filter { glShaderKey: number; } // pixi-filters.d.ts todo // https://github.com/pixijs/pixi-filters/ - export class NoiseFilter extends Filter { - + class NoiseFilter extends Filter { noise: number; - } - } ////////////////////////////////////////////////////////////////////////////// ////////////////////////////INTERACTION/////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// - export namespace interaction { - - export interface InteractiveTarget { - + namespace interaction { + interface InteractiveTarget { interactive: boolean; interactiveChildren: boolean; hitArea: PIXI.Rectangle | PIXI.Circle | PIXI.Ellipse | PIXI.Polygon | PIXI.RoundedRectangle; @@ -2017,44 +1862,36 @@ declare namespace PIXI { // depricated defaultCursor: string; - } - export interface InteractionTrackingData { - + interface InteractionTrackingData { readonly pointerId: number; flags: number; none: number; over: boolean; rightDown: boolean; leftDown: boolean; - } - export interface InteractionEvent { - + interface InteractionEvent { stopped: boolean; target: DisplayObject; currentTarget: DisplayObject; type: string; data: InteractionData; stopPropagation(): void; - } - export class InteractionData { - + class InteractionData { global: Point; target: DisplayObject; originalEvent: Event; identifier?: number; getLocalPosition(displayObject: DisplayObject, point?: Point, globalPos?: Point): Point; - } - export interface InteractionManagerOptions { + interface InteractionManagerOptions { autoPreventDefault?: boolean; interactionFrequency?: number; } - export class InteractionManager extends utils.EventEmitter { - + class InteractionManager extends utils.EventEmitter { constructor(renderer: CanvasRenderer | WebGLRenderer | SystemRenderer, options?: InteractionManagerOptions); renderer: SystemRenderer; @@ -2096,7 +1933,12 @@ declare namespace PIXI { setCursorMode(mode: string): void; protected dispatchEvent(displayObject: Container | Sprite | extras.TilingSprite, eventString: string, eventData: any): void; mapPositionToPoint(point: Point, x: number, y: number): void; - protected processInteractive(interactionEvent: InteractionEvent, displayObject: PIXI.Container | PIXI.Sprite | PIXI.extras.TilingSprite, func?: Function, hitTest?: boolean, interactive?: boolean): boolean; + protected processInteractive( + interactionEvent: InteractionEvent, + displayObject: PIXI.Container | PIXI.Sprite | PIXI.extras.TilingSprite, + func?: Function, + hitTest?: boolean, + interactive?: boolean): boolean; protected onPointerComplete(originalEvent: PointerEvent, cancelled: boolean, func: Function): void; protected getInteractionDataForPointerId(pointerId: number): InteractionData; protected releaseInteractionDataForPointerId(pointerId: number): void; @@ -2107,9 +1949,7 @@ declare namespace PIXI { // depricated defaultCursorStyle: string; currentCursorStyle: string; - } - } ////////////////////////////////////////////////////////////////////////////// @@ -2121,7 +1961,6 @@ declare namespace PIXI { // 2.0.6 class MiniSignalBinding { - constructor(fn: Function, once?: boolean, thisArg?: any); protected _fn: Function; @@ -2132,10 +1971,8 @@ declare namespace PIXI { protected _owner: MiniSignal; detach(): boolean; - } class MiniSignal { - constructor(); protected _head: MiniSignalBinding; @@ -2151,31 +1988,24 @@ declare namespace PIXI { once(fn: Function, thisArg?: any): any; detach(node: MiniSignalBinding): MiniSignal; detachAll(): MiniSignal; - } - export namespace loaders { - - export interface ILoaderOptions { - + namespace loaders { + interface ILoaderOptions { crossOrigin?: boolean | string; loadType?: number; xhrType?: string; metaData?: any; loadElement?: HTMLImageElement | HTMLAudioElement | HTMLVideoElement; skipSource?: boolean; - } - export interface IResourceDictionary { - + interface IResourceDictionary { [index: string]: PIXI.loaders.Resource; - } // As of ResourceLoader v2 we no longer require EventEmitter // However, for depreciation reasons, it remains. - export class Loader extends utils.EventEmitter { - + class Loader extends utils.EventEmitter { // pixi overrides here static addPixiMiddleware(fn: Function): void; @@ -2236,13 +2066,11 @@ declare namespace PIXI { once(event: "progress", fn: (loader: loaders.Loader, resource: Resource) => void, context?: any): this; once(event: "start", fn: (loader: loaders.Loader) => void, context?: any): this; once(event: string, fn: Function, context?: any): this; - } - export interface ITextureDictionary { + interface ITextureDictionary { [index: string]: PIXI.Texture; } - export class Resource { - + class Resource { static setExtensionLoadType(extname: string, loadType: number): void; static setExtensionXhrType(extname: string, xhrType: string): void; @@ -2351,10 +2179,8 @@ declare namespace PIXI { ///////////////////////////////MESH/////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// - export namespace mesh { - - export class Mesh extends Container { - + namespace mesh { + class Mesh extends Container { constructor(texture: Texture, vertices?: Float32Array, uvs?: Float32Array, indices?: Uint16Array, drawMode?: number); protected _texture: Texture; @@ -2383,11 +2209,9 @@ declare namespace PIXI { TRIANGLE_MESH: number; TRIANGLES: number; }; - } - export class CanvasMeshRenderer { - + class CanvasMeshRenderer { constructor(renderer: CanvasRenderer); renderer: CanvasRenderer; @@ -2399,20 +2223,16 @@ declare namespace PIXI { protected renderMeshFlat(mesh: Mesh): void; destroy(): void; - } - export class MeshRenderer extends ObjectRenderer { - + class MeshRenderer extends ObjectRenderer { constructor(renderer: WebGLRenderer); shader: Shader; render(mesh: Mesh): void; - } - export class Plane extends Mesh { - + class Plane extends Mesh { constructor(texture: Texture, verticesX?: number, verticesY?: number); protected _ready: boolean; verticesX: number; @@ -2422,11 +2242,9 @@ declare namespace PIXI { refresh(): void; protected _onTexureUpdate(): void; - } - export class NineSlicePlane extends Plane { - + class NineSlicePlane extends Plane { constructor(texture: Texture, leftWidth?: number, topHeight?: number, rightWidth?: number, bottomHeight?: number); width: number; @@ -2450,11 +2268,9 @@ declare namespace PIXI { updateHorizontalVertices(): void; updateVerticalVertices(): void; protected drawSegment(context: CanvasRenderingContext2D | WebGLRenderingContext, textureSource: any, w: number, h: number, x1: number, y1: number, x2: number, y2: number): void; - } - export class Rope extends Mesh { - + class Rope extends Mesh { constructor(texture: Texture, points: Point[]); points: Point[]; @@ -2464,7 +2280,6 @@ declare namespace PIXI { protected _onTextureUpdate(): void; updateTransform(): void; - } } @@ -2472,19 +2287,15 @@ declare namespace PIXI { /////////////////////////////PARTICLES//////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// - export namespace particles { - - export interface IParticleContainerProperties { - + namespace particles { + interface IParticleContainerProperties { scale?: boolean; position?: boolean; rotation?: boolean; uvs?: boolean; alpha?: boolean; - } - export class ParticleContainer extends Container { - + class ParticleContainer extends Container { constructor(size?: number, properties?: IParticleContainerProperties, batchSize?: number); protected _properties: boolean[]; @@ -2501,10 +2312,8 @@ declare namespace PIXI { protected onChildrenChange: (smallestChildIndex?: number) => void; destroy(options?: IDestroyOptions | boolean): void; - } - export class ParticleBuffer { - + class ParticleBuffer { constructor(gl: WebGLRenderingContext, properties: any, dynamicPropertyFlags: any[], size: number); gl: WebGLRenderingContext; @@ -2521,16 +2330,14 @@ declare namespace PIXI { dynamicData: any; destroy(): void; - } - export interface IParticleRendererProperty { + interface IParticleRendererProperty { attribute: number; size: number; - uploadFunction: (children: PIXI.DisplayObject[], startIndex: number, amount: number, array: number[], stride: number, offset: number) => void; + uploadFunction(children: PIXI.DisplayObject[], startIndex: number, amount: number, array: number[], stride: number, offset: number): void; offset: number; } - export class ParticleRenderer extends ObjectRenderer { - + class ParticleRenderer extends ObjectRenderer { constructor(renderer: WebGLRenderer); shader: glCore.GLShader; @@ -2548,26 +2355,18 @@ declare namespace PIXI { destroy(): void; indices: Uint16Array; - } - export interface IParticleShader extends glCore.GLShader { } - + interface IParticleShader extends glCore.GLShader { } } ////////////////////////////////////////////////////////////////////////////// ////////////////////////////PREPARE/////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// - export namespace prepare { - - interface AddHook { - (item: any, queue: any[]): boolean; - } - interface UploadHook { - (prepare: UploadHookSource, item: any): boolean; - } - export abstract class BasePrepare{ - + namespace prepare { + type AddHook = (item: any, queue: any[]) => boolean; + type UploadHook = (prepare: UploadHookSource, item: any) => boolean; + abstract class BasePrepare{ constructor(renderer: SystemRenderer); limiter: CountLimiter | TimeLimiter; @@ -2575,7 +2374,7 @@ declare namespace PIXI { protected uploadHookHelper: UploadHookSource; protected queue: any[]; protected addHooks: AddHook[]; - protected uploadHooks: UploadHook[]; + protected uploadHooks: Array>; protected completes: Function[]; protected ticking: boolean; protected delayedTick: () => void; @@ -2586,38 +2385,28 @@ declare namespace PIXI { register(addHook?: AddHook, uploadHook?: UploadHook): this; add(item: PIXI.DisplayObject | PIXI.Container | PIXI.BaseTexture | PIXI.Texture | PIXI.Graphics | PIXI.Text | any): this; destroy(): void; - } - export class CanvasPrepare extends BasePrepare { - + class CanvasPrepare extends BasePrepare { constructor(renderer: CanvasRenderer); protected canvas: HTMLCanvasElement; protected ctx: CanvasRenderingContext2D; - } - export class WebGLPrepare extends BasePrepare { - + class WebGLPrepare extends BasePrepare { constructor(renderer: WebGLRenderer); - } - export class CountLimiter { - + class CountLimiter { constructor(maxItemsPerFrame: number); protected maxItemsPerFrame: number; protected itemsLeft: number; - } - export class TimeLimiter { - + class TimeLimiter { constructor(maxMilliseconds: number); protected maxMilliseconds: number; protected frameStart: number; - } - } ////////////////////////////////////////////////////////////////////////////// @@ -2626,9 +2415,8 @@ declare namespace PIXI { // pixi-gl-core https://github.com/pixijs/pixi-gl-core // sharedArrayBuffer as a type is not available yet. // need to fully define what an `Attrib` is. - export namespace glCore { - - export interface IContextOptions { + namespace glCore { + interface IContextOptions { /** * Boolean that indicates if the canvas contains an alpha buffer. */ @@ -2658,10 +2446,9 @@ declare namespace PIXI { */ failIfMajorPerformanceCaveat?: boolean; } - export function createContext(view: HTMLCanvasElement, options?: IContextOptions): WebGLRenderingContext; - export function setVertexAttribArrays(gl: WebGLRenderingContext, attribs: IAttrib[], state?: WebGLState): WebGLRenderingContext | undefined; - export class GLBuffer { - + function createContext(view: HTMLCanvasElement, options?: IContextOptions): WebGLRenderingContext; + function setVertexAttribArrays(gl: WebGLRenderingContext, attribs: IAttrib[], state?: WebGLState): WebGLRenderingContext | undefined; + class GLBuffer { constructor(gl: WebGLRenderingContext, type: number, data: ArrayBuffer | ArrayBufferView | any, drawType: number); protected _updateID?: number; @@ -2679,10 +2466,8 @@ declare namespace PIXI { static create(gl: WebGLRenderingContext, type: number, data: ArrayBuffer | ArrayBufferView | any, drawType: number): GLBuffer; destroy(): void; - } - export class GLFramebuffer { - + class GLFramebuffer { constructor(gl: WebGLRenderingContext, width: number, height: number); gl: WebGLRenderingContext; @@ -2702,10 +2487,8 @@ declare namespace PIXI { static createRGBA(gl: WebGLRenderingContext, width: number, height: number, data: ArrayBuffer | ArrayBufferView | any): GLFramebuffer; static createFloat32(gl: WebGLRenderingContext, width: number, height: number, data: ArrayBuffer | ArrayBufferView | any): GLFramebuffer; - } - export class GLShader { - + class GLShader { constructor(gl: WebGLRenderingContext, vertexSrc: string | string[], fragmentSrc: string | string[], precision: string, attributeLocations: { [key: string]: number }); gl: WebGLRenderingContext; @@ -2716,10 +2499,8 @@ declare namespace PIXI { bind(): void; destroy(): void; - } - export class GLTexture { - + class GLTexture { constructor(gl: WebGLRenderingContext, width?: number, height?: number, format?: number, type?: number); gl: WebGLRenderingContext; @@ -2747,10 +2528,8 @@ declare namespace PIXI { static fromSource(gl: WebGLRenderingContext, source: HTMLImageElement | ImageData | HTMLVideoElement | HTMLCanvasElement, premultipleAlpha?: boolean): GLTexture; static fromData(gl: WebGLRenderingContext, data: number[], width: number, height: number): GLTexture; - } - export interface IAttrib { - + interface IAttrib { attribute: { location: boolean; size: number; @@ -2759,25 +2538,21 @@ declare namespace PIXI { stride: number; start: number; buffer: ArrayBuffer; - } - export interface IWebGLRenderingContextAttribute { - + interface IWebGLRenderingContextAttribute { buffer: WebGLBuffer; attribute: any; type: number; normalized: boolean; stride: number; start: number; - } - export interface IAttribState { + interface IAttribState { tempAttribState: IAttrib[]; attribState: IAttrib[]; } - export class VertexArrayObject { - + class VertexArrayObject { static FORCE_NATIVE: boolean; constructor(gl: WebGLRenderingContext, state: WebGLState); @@ -2798,66 +2573,63 @@ declare namespace PIXI { clear(): VertexArrayObject; draw(type: number, size: number, start: number): VertexArrayObject; destroy(): void; - } - } ////////////////////////////////////////////////////////////////////////////// ///////////////////////////////UTILS////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// - export interface IDecomposedDataUri { + interface IDecomposedDataUri { mediaType: string; subType: string; encoding: string; data: any; } - export namespace utils { - - export function uid(): number; - export function hex2rgb(hex: number, out?: number[]): number[]; - export function hex2string(hex: number): string; - export function rgb2hex(rgb: Number[]): number; - export function canUseNewCanvasBlendModes(): boolean; - export function getResolutionOfUrl(url: string, defaultValue?: number): number; - export function getSvgSize(svgString: string): any; - export function decomposeDataUri(dataUri: string): IDecomposedDataUri | void; - export function getUrlFileExtension(url: string): string | void; - export function sayHello(type: string): void; - export function skipHello(): void; - export function isWebGLSupported(): boolean; - export function sign(n: number): number; - export function removeItems(arr: T[], startIdx: number, removeCount: number): void; - export const TextureCache: any; - export const BaseTextureCache: any; + namespace utils { + function uid(): number; + function hex2rgb(hex: number, out?: number[]): number[]; + function hex2string(hex: number): string; + function rgb2hex(rgb: Number[]): number; + function canUseNewCanvasBlendModes(): boolean; + function getResolutionOfUrl(url: string, defaultValue?: number): number; + function getSvgSize(svgString: string): any; + function decomposeDataUri(dataUri: string): IDecomposedDataUri | void; + function getUrlFileExtension(url: string): string | void; + function sayHello(type: string): void; + function skipHello(): void; + function isWebGLSupported(): boolean; + function sign(n: number): number; + function removeItems(arr: T[], startIdx: number, removeCount: number): void; + const TextureCache: any; + const BaseTextureCache: any; // https://github.com/kaimallea/isMobile - export namespace isMobile { - export const apple: { + namespace isMobile { + const apple: { phone: boolean; ipod: boolean; tablet: boolean; device: boolean; }; - export const android: { + const android: { phone: boolean; tablet: boolean; device: boolean; }; - export const amazon: { + const amazon: { phone: boolean; tablet: boolean; device: boolean; }; - export const windows: { + const windows: { phone: boolean; tablet: boolean; device: boolean; }; - export const seven_inch: boolean; - export const other: { + const seven_inch: boolean; + const other: { blackberry10: boolean; blackberry: boolean; opera: boolean; @@ -2865,14 +2637,13 @@ declare namespace PIXI { chrome: boolean; device: boolean; }; - export const any: boolean; - export const phone: boolean; - export const tablet: boolean; + const any: boolean; + const phone: boolean; + const tablet: boolean; } // https://github.com/primus/eventemitter3 - export class EventEmitter { - + class EventEmitter { listeners(event: string, exists?: boolean): Function[]; emit(event: string, ...args: any[]): boolean; on(event: string, fn: Function, context?: any): this; @@ -2883,9 +2654,7 @@ declare namespace PIXI { off(event: string, fn: Function, context?: any, once?: boolean): this; addListener(event: string, fn: Function, context?: any): this; - } - } ////////////////////////////////////////////////////////////////////////////// @@ -2893,7 +2662,6 @@ declare namespace PIXI { ////////////////////////////////////////////////////////////////////////////// // not sure how to handle blendmodes scalemodes basetexturecache namespace core { - /** * @class * @private @@ -3095,11 +2863,9 @@ declare namespace PIXI { * @deprecated since version 4.2.0 */ type DEFAULT_RENDER_OPTIONS = number; - } - export namespace extras { - + namespace extras { /** * @class * @name MovieClip @@ -3108,13 +2874,11 @@ declare namespace PIXI { * @deprecated since version 4.2.0 */ type MovieClip = extras.AnimatedSprite; - } - } declare namespace pixi { - export const gl: typeof PIXI.glCore; + const gl: typeof PIXI.glCore; } declare module "pixi.js" { diff --git a/types/pixi.js/pixi.js-tests.ts b/types/pixi.js/pixi.js-tests.ts index 8cea83df3f..72325504da 100644 --- a/types/pixi.js/pixi.js-tests.ts +++ b/types/pixi.js/pixi.js-tests.ts @@ -1,13 +1,10 @@ namespace basics { - export class Basics { - private app: PIXI.Application; private bunny: PIXI.Sprite; constructor() { - this.app = new PIXI.Application(800, 600, { backgroundColor: 0x1099bb }); document.body.appendChild(this.app.view); @@ -20,19 +17,15 @@ namespace basics { this.app.ticker.add((delta: number): void => { this.bunny.rotation += 0.1 / delta; }); - } - } export class Click { - private app: PIXI.Application; private sprite: PIXI.Sprite; constructor() { - this.app = new PIXI.Application(800, 600, { backgroundColor: 0x1099bb }); document.body.appendChild(this.app.view); @@ -48,33 +41,28 @@ namespace basics { this.sprite.scale.y *= 1.25; }); this.app.stage.addChild(this.sprite); - } } export class ContainerPivot { - private app: PIXI.Application; private container: PIXI.Container; constructor() { - this.app = new PIXI.Application(800, 600, { backgroundColor: 0x1099bb }); document.body.appendChild(this.app.view); this.container = new PIXI.Container(); this.app.stage.addChild(this.container); - let texture = PIXI.Texture.fromImage("../../_assets/basics/bunny.png"); + const texture = PIXI.Texture.fromImage("../../_assets/basics/bunny.png"); for (let i = 0; i < 25; i++) { - - let bunny = new PIXI.Sprite(texture); + const bunny = new PIXI.Sprite(texture); bunny.anchor.set(0.5); bunny.x = (i % 5) * 40; bunny.y = Math.floor(i / 5) * 40; this.container.addChild(bunny); - } this.container.x = this.app.renderer.width / 2; @@ -86,43 +74,36 @@ namespace basics { this.app.ticker.add((delta: number): void => { this.container.rotation -= 0.01 / delta; }); - } } export class Container { - private app: PIXI.Application; private container: PIXI.Container; constructor() { - this.app = new PIXI.Application(800, 600, { backgroundColor: 0x1099bb }); document.body.appendChild(this.app.view); this.container = new PIXI.Container(); this.app.stage.addChild(this.container); - let texture = PIXI.Texture.fromImage("../../_assets/basics/bunny.png"); + const texture = PIXI.Texture.fromImage("../../_assets/basics/bunny.png"); for (let i = 0; i < 25; i++) { - - let bunny = new PIXI.Sprite(texture); + const bunny = new PIXI.Sprite(texture); bunny.anchor.set(0.5); bunny.x = (i % 5) * 40; bunny.y = Math.floor(i / 5) * 40; this.container.addChild(bunny); - } this.container.x = this.app.renderer.width / 2; this.container.y = this.app.renderer.height / 2; - } } export class CustomizedFilter extends PIXI.Filter { - constructor(fragmentSource: string) { super(null, fragmentSource, { customUniform: { @@ -131,16 +112,13 @@ namespace basics { } }); } - } export class CustomFilter { - private app: PIXI.Application; private background: PIXI.Sprite; private filter: CustomizedFilter; constructor() { - this.app = new PIXI.Application(800, 600, { backgroundColor: 0x1099bb }); document.body.appendChild(this.app.view); @@ -152,9 +130,7 @@ namespace basics { this.app.stop(); PIXI.loader.add("shader", "_assets/basics/shader.frag") - .load((loader: PIXI.loaders.Loader, resource: any): void => { - this.filter = new PIXI.Filter(null, resource.shader.data); this.background.filters = [this.filter]; this.app.start(); @@ -162,23 +138,19 @@ namespace basics { this.app.ticker.add((delta: number) => { this.filter.uniforms.customUniform += 0.04 / delta; }); - }); - } } export class Graphics { - private app: PIXI.Application; private graphics: PIXI.Graphics; constructor() { - this.app = new PIXI.Application(800, 600, { antialias: true }); document.body.appendChild(this.app.view); - let graphics = new PIXI.Graphics(); + const graphics = new PIXI.Graphics(); // set a fill and line style graphics.beginFill(0xFF3300); @@ -215,32 +187,30 @@ namespace basics { } export class RenderTexture { - private app: PIXI.Application; private container: PIXI.Container; private renderTexture: PIXI.RenderTexture; private sprite: PIXI.Sprite; constructor() { - this.app = new PIXI.Application(800, 600, { backgroundColor: 0x1099bb }); document.body.appendChild(this.app.view); this.container = new PIXI.Container(); this.app.stage.addChild(this.container); - let texture = PIXI.Texture.fromImage("required/assets/basics/bunny.png"); + const texture = PIXI.Texture.fromImage("required/assets/basics/bunny.png"); for (let i = 0; i < 25; i++) { - let bunny = new PIXI.Sprite(texture); + const bunny = new PIXI.Sprite(texture); bunny.x = (i % 5) * 30; bunny.y = Math.floor(i / 5) * 30; bunny.rotation = Math.random() * (Math.PI * 2); this.container.addChild(bunny); } - let brt = new PIXI.BaseRenderTexture(300, 300, PIXI.SCALE_MODES.LINEAR, 1); - let rt = new PIXI.RenderTexture(brt); + const brt = new PIXI.BaseRenderTexture(300, 300, PIXI.SCALE_MODES.LINEAR, 1); + const rt = new PIXI.RenderTexture(brt); this.sprite = new PIXI.Sprite(rt); this.sprite.x = 450; @@ -253,29 +223,23 @@ namespace basics { this.app.ticker.add((delta: number) => { this.app.renderer.render(this.container, rt); }); - } } export class SpriteSheet { - private app: PIXI.Application; private anim: PIXI.extras.AnimatedSprite; constructor() { - PIXI.loader .add("required/assets/basics/fighter.json") .load((loader: PIXI.loaders.Loader, resource: any) => { - - let frames = []; + const frames = []; for (let i = 0; i < 30; i++) { - - let val = i < 10 ? "0" + i : i; + const val = i < 10 ? "0" + i : i; frames.push(PIXI.Texture.fromFrame("rollSequence00" + val + ".png")); - } this.anim = new PIXI.extras.AnimatedSprite(frames); @@ -291,20 +255,16 @@ namespace basics { this.app.ticker.add((deltaTime: number) => { this.anim.rotation += 0.01; }); - }); } - } export class Text { - private app: PIXI.Application; private basicText: PIXI.Text; private richText: PIXI.Text; constructor() { - this.app = new PIXI.Application(800, 600, { backgroundColor: 0x1099bb }); document.body.appendChild(this.app.view); @@ -313,7 +273,7 @@ namespace basics { this.basicText.y = 90; this.app.stage.addChild(this.basicText); - let style = new PIXI.TextStyle({ + const style = new PIXI.TextStyle({ fontFamily: "Arial", fontSize: 36, fontStyle: "italic", @@ -334,13 +294,10 @@ namespace basics { this.richText.x = 30; this.richText.y = 180; this.app.stage.addChild(this.richText); - } - } export class TexturedMesh { - private app: PIXI.Application; private count: number; private points: PIXI.Point[]; @@ -348,8 +305,7 @@ namespace basics { private graphics: PIXI.Graphics; constructor() { - - let ropeLength = 918 / 20; + const ropeLength = 918 / 20; for (let i = 0; i < 25; i++) { this.points.push(new PIXI.Point(i * ropeLength, 0)); @@ -367,7 +323,6 @@ namespace basics { // start animating this.app.ticker.add((deltaTime: number) => { - this.count += 0.1; // make the snake @@ -376,13 +331,10 @@ namespace basics { this.points[i].x = i * ropeLength + Math.cos((i * 0.3) + this.count) * 20; } this.renderPoints(); - }); - } private renderPoints(): void { - this.graphics.clear(); this.graphics.lineStyle(2, 0xffc2c2); this.graphics.moveTo(this.points[0].x, this.points[0].y); @@ -396,23 +348,19 @@ namespace basics { this.graphics.drawCircle(this.points[i].x, this.points[i].y, 10); this.graphics.endFill(); } - } - } export class TilingSprite { - private app: PIXI.Application; private tilingSprite: PIXI.extras.TilingSprite; private count: number; constructor() { - this.app = new PIXI.Application(); document.body.appendChild(this.app.view); - let texture = PIXI.Texture.fromImage("required/assets/p2.jpeg"); + const texture = PIXI.Texture.fromImage("required/assets/p2.jpeg"); this.tilingSprite = new PIXI.extras.TilingSprite( texture, @@ -424,28 +372,22 @@ namespace basics { this.count = 0; this.app.ticker.add((deltaTime: number): void => { - this.count += 0.005; this.tilingSprite.tileScale.x = 2 + Math.sin(this.count); this.tilingSprite.tileScale.y = 2 + Math.cos(this.count); this.tilingSprite.tilePosition.x += 1; this.tilingSprite.tilePosition.y += 1; - }); - } - } export class Video { - private app: PIXI.Application; private button: PIXI.Graphics; private videoSprite: PIXI.Sprite; constructor() { - this.app = new PIXI.Application(800, 600, { transparent: true }); document.body.appendChild(this.app.view); @@ -470,28 +412,21 @@ namespace basics { this.app.stage.addChild(this.button); this.button.on("pointertap", (): void => { - this.button.destroy(); - let texture = PIXI.Texture.fromVideo("required/assets/testVideo.mp4"); + const texture = PIXI.Texture.fromVideo("required/assets/testVideo.mp4"); this.videoSprite = new PIXI.Sprite(texture); this.videoSprite.width = this.app.renderer.width; this.videoSprite.height = this.app.renderer.height; this.app.stage.addChild(this.videoSprite); - }); - } - } - } namespace demos { - export class AlphaMask { - private app: PIXI.Application; private bg: PIXI.Container; private cells: PIXI.Sprite; @@ -499,7 +434,6 @@ namespace demos { private target: PIXI.Point; constructor() { - this.app = new PIXI.Application(); this.app.stage.interactive = true; document.body.appendChild(this.app.view); @@ -524,34 +458,25 @@ namespace demos { this.reset(); this.app.ticker.add((deltaTime: number): void => { - this.mask.position.x += (this.target.x - this.mask.x) * 0.1; this.mask.position.y += (this.target.y - this.mask.y) * 0.1; if (Math.abs(this.mask.x - this.target.x) < 1) { this.reset(); } - - }); - } private reset(): void { - this.target.x = Math.floor(Math.random() * 550); this.target.y = Math.floor(Math.random() * 300); - } - } export class AnimatedSpriteDemo { - private app: PIXI.Application; constructor() { - this.app = new PIXI.Application(); this.app.stop(); document.body.appendChild(this.app.view); @@ -559,18 +484,15 @@ namespace demos { PIXI.loader .add("spritesheet", "required/assets/mc.json") .load((): void => { + const explosionTextures: PIXI.Texture[] = []; - let explosionTextures: PIXI.Texture[] = []; - let i: number; - - for (i = 0; i < 26; i++) { - let texture = PIXI.Texture.fromFrame("Explosion_Sequence_A " + (i + 1) + ".png"); + for (let i = 0; i < 26; i++) { + const texture = PIXI.Texture.fromFrame("Explosion_Sequence_A " + (i + 1) + ".png"); explosionTextures.push(texture); } - for (i = 0; i < 50; i++) { - - let explosion = new PIXI.extras.AnimatedSprite(explosionTextures); + for (let i = 0; i < 50; i++) { + const explosion = new PIXI.extras.AnimatedSprite(explosionTextures); explosion.x = Math.random() * this.app.renderer.width; explosion.y = Math.random() * this.app.renderer.height; @@ -582,15 +504,11 @@ namespace demos { } this.app.start(); - }); - } - } export class Batch { - private app: PIXI.Application; private sprites: PIXI.particles.ParticleContainer; private maggots: Dude[]; @@ -598,7 +516,6 @@ namespace demos { private tick: number; constructor() { - this.app = new PIXI.Application(); document.body.appendChild(this.app.view); @@ -613,13 +530,12 @@ namespace demos { this.maggots = []; - let totalSprites = this.app.renderer instanceof PIXI.WebGLRenderer ? 10000 : 100; + const totalSprites = this.app.renderer instanceof PIXI.WebGLRenderer ? 10000 : 100; - let dudeTexture = PIXI.Texture.fromImage("required/assets/tinyMaggot.png"); + const dudeTexture = PIXI.Texture.fromImage("required/assets/tinyMaggot.png"); for (let i = 0; i < totalSprites; i++) { - - let dude = new Dude(dudeTexture); + const dude = new Dude(dudeTexture); dude.tint = Math.random() * 0xE8D4CD; dude.anchor.set(0.5); dude.scale.set(0.8 + Math.random() * 0.3); @@ -632,10 +548,9 @@ namespace demos { this.maggots.push(dude); this.sprites.addChild(dude); - } - let dudeBoundsPadding = 100; + const dudeBoundsPadding = 100; this.dudeBounds = new PIXI.Rectangle( -dudeBoundsPadding, -dudeBoundsPadding, @@ -646,10 +561,7 @@ namespace demos { this.tick = 0; this.app.ticker.add((): void => { - - for (let i = 0; i < this.maggots.length; i++) { - - let dude = this.maggots[i]; + for (const dude of this.maggots) { dude.scale.y = 0.95 + Math.sin(this.tick + dude.offset) * 0.05; dude.direction += dude.turningSpeed * 0.01; dude.x += Math.sin(dude.direction) * (dude.speed * dude.scale.y); @@ -659,28 +571,22 @@ namespace demos { // wrap the maggots if (dude.x < this.dudeBounds.x) { dude.x += this.dudeBounds.width; - } - else if (dude.x > this.dudeBounds.x + this.dudeBounds.width) { + } else if (dude.x > this.dudeBounds.x + this.dudeBounds.width) { dude.x -= this.dudeBounds.width; } if (dude.y < this.dudeBounds.y) { dude.y += this.dudeBounds.height; - } - else if (dude.y > this.dudeBounds.y + this.dudeBounds.height) { + } else if (dude.y > this.dudeBounds.y + this.dudeBounds.height) { dude.y -= this.dudeBounds.height; } } this.tick += 0.1; - }); - } - } export class Dude extends PIXI.Sprite { - direction: number = 0; speed: number = 0; turningSpeed: number = 0; @@ -689,18 +595,15 @@ namespace demos { constructor(texture: PIXI.Texture) { super(texture); } - } export class BlendModes { - private app: PIXI.Application; private background: PIXI.Sprite; private dudeArray: Dude[]; private dudeBounds: PIXI.Rectangle; constructor() { - this.app = new PIXI.Application(); document.body.appendChild(this.app.view); @@ -709,12 +612,11 @@ namespace demos { this.dudeArray = []; - let totalDudes = 20; - let dudeTexture = PIXI.Texture.fromImage("required/assets/flowerTop.png"); + const totalDudes = 20; + const dudeTexture = PIXI.Texture.fromImage("required/assets/flowerTop.png"); for (let i = 0; i < totalDudes; i++) { - - let dude = new Dude(dudeTexture); + const dude = new Dude(dudeTexture); dude.anchor.set(0.5); dude.scale.set(0.8 + Math.random() * 0.3); dude.x = Math.floor(Math.random() * this.app.renderer.width); @@ -726,10 +628,9 @@ namespace demos { this.dudeArray.push(dude); this.app.stage.addChild(dude); - } - let dudeBoundsPadding = 100; + const dudeBoundsPadding = 100; this.dudeBounds = new PIXI.Rectangle( -dudeBoundsPadding, -dudeBoundsPadding, @@ -738,10 +639,7 @@ namespace demos { ); this.app.ticker.add((): void => { - - for (let i = 0; i < this.dudeArray.length; i++) { - - let dude = this.dudeArray[i]; + for (const dude of this.dudeArray) { dude.direction += dude.turningSpeed * 0.01; dude.x += Math.sin(dude.direction) * dude.speed; dude.y += Math.cos(dude.direction) * dude.speed; @@ -750,34 +648,27 @@ namespace demos { // wrap the dudes by testing their bounds... if (dude.x < this.dudeBounds.x) { dude.x += this.dudeBounds.width; - } - else if (dude.x > this.dudeBounds.x + this.dudeBounds.width) { + } else if (dude.x > this.dudeBounds.x + this.dudeBounds.width) { dude.x -= this.dudeBounds.width; } if (dude.y < this.dudeBounds.y) { dude.y += this.dudeBounds.height; - } - else if (dude.y > this.dudeBounds.y + this.dudeBounds.height) { + } else if (dude.y > this.dudeBounds.y + this.dudeBounds.height) { dude.y -= this.dudeBounds.height; } } - }); - } - } export class CacheAsBitmap { - private app: PIXI.Application; private aliens: PIXI.Sprite[]; private count: number; private alienContainer: PIXI.Container; constructor() { - this.app = new PIXI.Application(); this.app.stage.interactive = true; document.body.appendChild(this.app.view); @@ -785,7 +676,7 @@ namespace demos { this.app.stop(); this.aliens = []; - let alienFrames = [ + const alienFrames = [ "eggHead.png", "flowerTop.png", "helmlok.png", @@ -802,12 +693,10 @@ namespace demos { PIXI.loader .add("spritesheet", "required/assets/monsters.json") .load((): void => { - for (let i = 0; i < 100; i++) { + const frameName = alienFrames[i % 4]; - let frameName = alienFrames[i % 4]; - - let alien = PIXI.Sprite.fromFrame(frameName); + const alien = PIXI.Sprite.fromFrame(frameName); alien.tint = Math.random() * 0xFFFFFF; alien.x = Math.random() * 800 - 400; alien.y = Math.random() * 600 - 300; @@ -822,10 +711,9 @@ namespace demos { this.alienContainer.cacheAsBitmap = !this.alienContainer.cacheAsBitmap; }); this.app.ticker.add((): void => { - // let"s rotate the aliens a little bit for (let i = 0; i < 100; i++) { - let alien = this.aliens[i]; + const alien = this.aliens[i]; alien.rotation += 0.1; } @@ -834,27 +722,21 @@ namespace demos { this.alienContainer.scale.x = Math.sin(this.count); this.alienContainer.scale.y = Math.sin(this.count); this.alienContainer.rotation += 0.01; - }); - }); - } - } export class Dragging { - private app: PIXI.Application; private data: PIXI.interaction.InteractionData; private dragging: boolean; constructor() { - this.app = new PIXI.Application(800, 600, { backgroundColor: 0x1099bb }); document.body.appendChild(this.app.view); - let texture = PIXI.Texture.fromImage("required/assets/bunny.png"); + const texture = PIXI.Texture.fromImage("required/assets/bunny.png"); texture.baseTexture.scaleMode = PIXI.SCALE_MODES.NEAREST; for (let i = 0; i < 10; i++) { @@ -864,71 +746,57 @@ namespace demos { Math.floor(Math.random() * this.app.renderer.height) ); } - } private createBunny(texture: PIXI.Texture, x: number, y: number): void { - - let bunny = new PIXI.Sprite(texture); + const bunny = new PIXI.Sprite(texture); bunny.interactive = true; bunny.buttonMode = true; bunny.anchor.set(0.5); bunny.scale.set(3); bunny .on("pointerdown", (event: PIXI.interaction.InteractionEvent): void => { - this.data = event.data; bunny.alpha = 0.5; this.dragging = true; - }) .on("pointerup", (event: PIXI.interaction.InteractionEvent): void => { - this.data = null; bunny.alpha = 0.5; this.dragging = false; - }) .on("pointerupoutside", (event: PIXI.interaction.InteractionEvent): void => { - this.data = null; bunny.alpha = 0.5; this.dragging = false; - }) .on("pointermove", (event: PIXI.interaction.InteractionEvent): void => { - if (this.dragging) { - let newPosition = this.data.getLocalPosition(bunny); + const newPosition = this.data.getLocalPosition(bunny); bunny.x = newPosition.x; bunny.y = newPosition.y; } - }); bunny.x = x; bunny.y = y; this.app.stage.addChild(bunny); - } - } export class GraphicsDemo { - private app: PIXI.Application; private graphics: PIXI.Graphics; private thing: PIXI.Graphics; private count: number; constructor() { - this.app = new PIXI.Application(800, 600, { antialias: true }); this.app.stage.interactive = true; document.body.appendChild(this.app.view); - let graphics = new PIXI.Graphics(); + const graphics = new PIXI.Graphics(); graphics.beginFill(0xFF3300); graphics.lineStyle(10, 0xffd900, 1); @@ -977,7 +845,6 @@ namespace demos { this.count = 0; this.app.stage.on("pointertap", (): void => { - this.graphics.lineStyle(Math.random() * 30, Math.random() * 0xFFFFFF, 1); this.graphics.moveTo(Math.random() * 800, Math.random() * 600); this.graphics.bezierCurveTo( @@ -985,11 +852,9 @@ namespace demos { Math.random() * 800, Math.random() * 600, Math.random() * 800, Math.random() * 600 ); - }); this.app.ticker.add((): void => { - this.count += 0.1; this.thing.clear(); @@ -1003,25 +868,20 @@ namespace demos { this.thing.lineTo(-120 + Math.sin(this.count) * 20, -100 + Math.cos(this.count) * 20); this.thing.rotation = this.count * 0.1; - }); - } - } export class Interactivity { - private app: PIXI.Application; private background: PIXI.Sprite; private buttons: PIXI.Sprite[]; constructor() { - this.app = new PIXI.Application(); document.body.appendChild(this.app.view); - let background = PIXI.Sprite.fromImage("required/assets/button_test_BG.jpg"); + const background = PIXI.Sprite.fromImage("required/assets/button_test_BG.jpg"); background.width = this.app.renderer.width; background.height = this.app.renderer.height; this.background = background; @@ -1029,7 +889,7 @@ namespace demos { this.buttons = []; - let buttonPositions = [ + const buttonPositions = [ 175, 75, 655, 75, 410, 325, @@ -1037,13 +897,12 @@ namespace demos { 685, 445 ]; - let textureButton = PIXI.Texture.fromImage("../../_assets/button.png"); - let textureButtonDown = PIXI.Texture.fromImage("../../_assets/buttonDown.png"); - let textureButtonOver = PIXI.Texture.fromImage("../../_assets/buttonOver.png"); + const textureButton = PIXI.Texture.fromImage("../../_assets/button.png"); + const textureButtonDown = PIXI.Texture.fromImage("../../_assets/buttonDown.png"); + const textureButtonOver = PIXI.Texture.fromImage("../../_assets/buttonOver.png"); for (let i = 0; i < 5; i++) { - - let button = new PIXI.Sprite(textureButton); + const button = new PIXI.Sprite(textureButton); button.anchor.set(0.5); button.x = buttonPositions[i * 2]; button.y = buttonPositions[i * 2 + 1]; @@ -1076,13 +935,10 @@ namespace demos { this.buttons[3].scale.set(0.8); this.buttons[4].scale.set(0.8, 1.2); this.buttons[4].rotation = Math.PI; - } - } export class Masking { - private app: PIXI.Application; private bg: PIXI.Sprite; private container: PIXI.Container; @@ -1095,7 +951,6 @@ namespace demos { private help: PIXI.Text; constructor() { - this.app = new PIXI.Application(800, 600, { antialias: true }); this.app.stage.interactive = true; document.body.appendChild(this.app.view); @@ -1139,14 +994,12 @@ namespace demos { this.app.stage.on("pointertap", (): void => { if (!this.container.mask) { this.container.mask = this.thing; - } - else { + } else { this.container.mask = null; } }); this.app.ticker.add((): void => { - this.bg.rotation += 0.01; this.bgFront.rotation -= 0.01; @@ -1169,16 +1022,11 @@ namespace demos { this.thing.lineTo(-120 + Math.sin(this.count) * 20, -300 + Math.cos(this.count) * 20); this.thing.lineTo(-320 + Math.sin(this.count) * 20, -100 + Math.cos(this.count) * 20); this.thing.rotation = this.count * 0.1; - }); - } - - } export class RenderTextureDemo { - private app: PIXI.Application; private renderTexture: PIXI.RenderTexture; @@ -1193,7 +1041,6 @@ namespace demos { private count: number; constructor() { - this.app = new PIXI.Application(); document.body.appendChild(this.app.view); @@ -1218,7 +1065,7 @@ namespace demos { this.stuffContainer.y = 300; this.app.stage.addChild(this.stuffContainer); - let fruits = [ + const fruits = [ "required/assets/spinObj_01.png", "required/assets/spinObj_02.png", "required/assets/spinObj_03.png", @@ -1232,7 +1079,7 @@ namespace demos { this.items = []; for (let i = 0; i < 20; i++) { - let item = PIXI.Sprite.fromImage(fruits[i % fruits.length]); + const item = PIXI.Sprite.fromImage(fruits[i % fruits.length]); item.x = Math.random() * 400 - 200; item.y = Math.random() * 400 - 200; item.anchor.set(0.5); @@ -1243,15 +1090,13 @@ namespace demos { this.count = 0; this.app.ticker.add((): void => { - - for (let i = 0; i < this.items.length; i++) { - let item = this.items[i]; + for (const item of this.items) { item.rotation += 0.1; } this.count += 0.01; - let temp = this.renderTexture; + const temp = this.renderTexture; this.renderTexture = this.renderTexture2; this.renderTexture2 = temp; @@ -1261,15 +1106,11 @@ namespace demos { this.outputSprite.scale.set(1 + Math.sin(this.count) * 0.2); this.app.renderer.render(this.app.stage, this.renderTexture2, false); - }); - } - } export class StripDemo { - private app: PIXI.Application; private count: number; private points: PIXI.Point[]; @@ -1277,13 +1118,12 @@ namespace demos { private snakeContainer: PIXI.Container; constructor() { - this.app = new PIXI.Application(); document.body.appendChild(this.app.view); this.count = 0; - let ropeLength = 918 / 20; + const ropeLength = 918 / 20; this.points = []; @@ -1308,13 +1148,10 @@ namespace demos { this.points[i].x = i * ropeLength + Math.cos((i * 0.3) + this.count) * 20; } }); - } - } export class TextDemo { - private app: PIXI.Application; private bitmapFontText: PIXI.extras.BitmapText; private background: PIXI.Sprite; @@ -1324,19 +1161,16 @@ namespace demos { private count: number; constructor() { - this.app = new PIXI.Application(); document.body.appendChild(this.app.view); PIXI.loader .add("desyrel", "required/assets/desyrel.xml") .load((): void => { - this.bitmapFontText = new PIXI.extras.BitmapText("bitmap fonts are\n now supported!", { font: "35px Desyrel", align: "right" }); this.bitmapFontText.x = this.app.renderer.width - this.bitmapFontText.textWidth - 20; this.bitmapFontText.y = 20; this.app.stage.addChild(this.bitmapFontText); - }); this.background = PIXI.Sprite.fromImage("required/assets/textDemoBG.jpg"); @@ -1385,20 +1219,15 @@ namespace demos { this.count = 0; this.app.ticker.add((): void => { - this.count += 0.05; this.countingText.text = "COUNT 4Elet: " + Math.floor(this.count); this.spinningText.rotation += 0.03; - }); - } - } export class TextureRotate { - private app: PIXI.Application; private bol: boolean; private texture: PIXI.Texture; @@ -1406,7 +1235,6 @@ namespace demos { private dude: PIXI.Sprite; constructor() { - this.app = new PIXI.Application(); document.body.appendChild(this.app.view); @@ -1417,20 +1245,18 @@ namespace demos { this.texture = resources.flowerTop.texture; this.init(); }); - } private init(): void { - - let textures = [this.texture]; - let D8 = PIXI.GroupD8; + const textures = [this.texture]; + const D8 = PIXI.GroupD8; for (let rotate = 1; rotate < 16; rotate++) { - let h = D8.isSwapWidthHeight(rotate) ? this.texture.frame.width : this.texture.frame.height; - let w = D8.isSwapWidthHeight(rotate) ? this.texture.frame.height : this.texture.frame.width; + const h = D8.isSwapWidthHeight(rotate) ? this.texture.frame.width : this.texture.frame.height; + const w = D8.isSwapWidthHeight(rotate) ? this.texture.frame.height : this.texture.frame.width; - let frame = this.texture.frame; - let crop = new PIXI.Rectangle(this.texture.frame.x, this.texture.frame.y, w, h); - let trim = crop; + const frame = this.texture.frame; + const crop = new PIXI.Rectangle(this.texture.frame.x, this.texture.frame.y, w, h); + const trim = crop; let rotatedTexture: PIXI.Texture; if (rotate % 2 === 0) { rotatedTexture = new PIXI.Texture(this.texture.baseTexture, frame, crop, trim, rotate); @@ -1441,33 +1267,28 @@ namespace demos { textures.push(rotatedTexture); } - let offsetX = this.app.renderer.width / 16 | 0; - let offsetY = this.app.renderer.height / 8 | 0; - let gridW = this.app.renderer.width / 4 | 0; - let gridH = this.app.renderer.height / 5 | 0; + const offsetX = this.app.renderer.width / 16 | 0; + const offsetY = this.app.renderer.height / 8 | 0; + const gridW = this.app.renderer.width / 4 | 0; + const gridH = this.app.renderer.height / 5 | 0; for (let i = 0; i < 16; i++) { - - let dude = new PIXI.Sprite(textures[i < 8 ? i * 2 : (i - 8) * 2 + 1]); + const dude = new PIXI.Sprite(textures[i < 8 ? i * 2 : (i - 8) * 2 + 1]); dude.scale.x = 0.5; dude.scale.y = 0.5; dude.x = offsetX + gridW * (i % 4); dude.y = offsetY + gridH * (i / 4 | 0); this.app.stage.addChild(dude); - let text = new PIXI.Text("rotate = " + dude.texture.rotate, { fontFamily: "Courier New", fontSize: "12px", fill: "white", align: "left" }); + const text = new PIXI.Text("rotate = " + dude.texture.rotate, { fontFamily: "Courier New", fontSize: "12px", fill: "white", align: "left" }); text.x = dude.x; text.y = dude.y - 20; this.app.stage.addChild(text); - } - } - } export class TextureSwap { - private app: PIXI.Application; private bol: boolean; private texture: PIXI.Texture; @@ -1475,7 +1296,6 @@ namespace demos { private dude: PIXI.Sprite; constructor() { - this.app = new PIXI.Application(); document.body.appendChild(this.app.view); @@ -1497,8 +1317,7 @@ namespace demos { this.bol = !this.bol; if (this.bol) { this.dude.texture = this.secondTexture; - } - else { + } else { this.dude.texture = this.texture; } }); @@ -1506,30 +1325,25 @@ namespace demos { this.app.ticker.add((): void => { this.dude.rotation += 0.1; }); - } - } export class Tinting { - private app: PIXI.Application; private aliens: Dude[]; constructor() { - this.app = new PIXI.Application(); document.body.appendChild(this.app.view); this.aliens = []; - let totalDudes = 20; + const totalDudes = 20; - let dudeTexture = PIXI.Texture.fromImage("required/assets/eggHead.png"); + const dudeTexture = PIXI.Texture.fromImage("required/assets/eggHead.png"); for (let i = 0; i < totalDudes; i++) { - - let dude = new Dude(dudeTexture); + const dude = new Dude(dudeTexture); dude.anchor.set(0.5); dude.scale.set(0.8 + Math.random() * 0.3); dude.x = Math.random() * this.app.renderer.width; @@ -1541,20 +1355,16 @@ namespace demos { this.aliens.push(dude); this.app.stage.addChild(dude); - } - let dudeBoundsPadding = 100; - let dudeBounds = new PIXI.Rectangle(-dudeBoundsPadding, + const dudeBoundsPadding = 100; + const dudeBounds = new PIXI.Rectangle(-dudeBoundsPadding, -dudeBoundsPadding, this.app.renderer.width + dudeBoundsPadding * 2, this.app.renderer.height + dudeBoundsPadding * 2); this.app.ticker.add((): void => { - - for (let i = 0; i < this.aliens.length; i++) { - - let dude = this.aliens[i]; + for (const dude of this.aliens) { dude.direction += dude.turningSpeed * 0.01; dude.x += Math.sin(dude.direction) * dude.speed; dude.y += Math.cos(dude.direction) * dude.speed; @@ -1562,31 +1372,25 @@ namespace demos { if (dude.x < dudeBounds.x) { dude.x += dudeBounds.width; - } - else if (dude.x > dudeBounds.x + dudeBounds.width) { + } else if (dude.x > dudeBounds.x + dudeBounds.width) { dude.x -= dudeBounds.width; } if (dude.y < dudeBounds.y) { dude.y += dudeBounds.height; - } - else if (dude.y > dudeBounds.y + dudeBounds.height) { + } else if (dude.y > dudeBounds.y + dudeBounds.height) { dude.y -= dudeBounds.height; } } - }); } - } export class TransparentBackground { - private app: PIXI.Application; private bunny: PIXI.Sprite; constructor() { - this.app = new PIXI.Application(800, 600, { transparent: true }); document.body.appendChild(this.app.view); @@ -1602,17 +1406,12 @@ namespace demos { this.app.ticker.add((): void => { this.bunny.rotation += 0.1; }); - } - } - } namespace filters { - export class BlurFilter { - private app: PIXI.Application; private bg: PIXI.Sprite; private littleDudes: PIXI.Sprite; @@ -1622,7 +1421,6 @@ namespace filters { private count: number; constructor() { - this.app = new PIXI.Application(800, 600); document.body.appendChild(this.app.view); @@ -1650,23 +1448,18 @@ namespace filters { this.count = 0; this.app.ticker.add((): void => { - this.count += 0.005; - let blurAmount = Math.cos(this.count); - let blurAmount2 = Math.sin(this.count); + const blurAmount = Math.cos(this.count); + const blurAmount2 = Math.sin(this.count); this.blurFilter1.blur = 20 * (blurAmount); this.blurFilter2.blur = 20 * (blurAmount2); - }); - } - } export class DisplacementMap { - private app: PIXI.Application; private container: PIXI.Container; private maggots: DisplacementMapDude[]; @@ -1677,7 +1470,6 @@ namespace filters { private count: number; constructor() { - this.app = new PIXI.Application(800, 600); this.app.stage.interactive = true; document.body.appendChild(this.app.view); @@ -1685,8 +1477,8 @@ namespace filters { this.container = new PIXI.Container(); this.app.stage.addChild(this.container); - let padding = 100; - let bounds = new PIXI.Rectangle( + const padding = 100; + const bounds = new PIXI.Rectangle( -padding, -padding, this.app.renderer.width + padding * 2, @@ -1695,8 +1487,7 @@ namespace filters { this.maggots = []; for (let i = 0; i < 20; i++) { - - let maggot = new DisplacementMapDude(); + const maggot = new DisplacementMapDude(); maggot.anchor.set(0.5); this.container.addChild(maggot); @@ -1710,11 +1501,10 @@ namespace filters { maggot.scale.set(1 + Math.random() * 0.3); maggot.original = maggot.scale.clone(); this.maggots.push(maggot); - } this.displacementSprite = PIXI.Sprite.fromImage("required/assets/displace.png"); - let displacementFilter = new PIXI.filters.DisplacementFilter(this.displacementSprite); + const displacementFilter = new PIXI.filters.DisplacementFilter(this.displacementSprite); this.app.stage.addChild(this.displacementSprite); this.container.filters = [displacementFilter]; @@ -1740,13 +1530,9 @@ namespace filters { .on("touchmove", this.onPointerMove); this.app.ticker.add((): void => { - this.count += 0.05; - for (let i = 0; i < this.maggots.length; i++) { - - let maggot = this.maggots[i]; - + for (const maggot of this.maggots) { maggot.direction += maggot.turnSpeed * 0.01; maggot.x += Math.sin(maggot.direction) * maggot.speed; maggot.y += Math.cos(maggot.direction) * maggot.speed; @@ -1756,51 +1542,39 @@ namespace filters { if (maggot.x < bounds.x) { maggot.x += bounds.width; - } - else if (maggot.x > bounds.x + bounds.width) { + } else if (maggot.x > bounds.x + bounds.width) { maggot.x -= bounds.width; } if (maggot.y < bounds.y) { maggot.y += bounds.height; - } - else if (maggot.y > bounds.y + bounds.height) { + } else if (maggot.y > bounds.y + bounds.height) { maggot.y -= bounds.height; } } - }); - } private onPointerMove = (eventData: PIXI.interaction.InteractionEvent): void => { - this.ring.visible = true; this.displacementSprite.x = eventData.data.global.x - 100; this.displacementSprite.y = eventData.data.global.y - this.displacementSprite.height / 2; this.ring.x = eventData.data.global.x - 25; this.ring.y = eventData.data.global.y; - } - } export class DisplacementMapDude extends PIXI.Sprite { - direction: number = 0; speed: number = 0; turnSpeed: number = 0; original: PIXI.Point = new PIXI.Point(); constructor() { - super(PIXI.Texture.fromImage("../../_assets/maggot.png")); - } - } export class Filter { - private app: PIXI.Application; private bg: PIXI.Sprite; private filter: PIXI.filters.ColorMatrixFilter; @@ -1814,7 +1588,6 @@ namespace filters { private help: PIXI.Text; constructor() { - this.app = new PIXI.Application(); this.app.stage.interactive = true; document.body.appendChild(this.app.view); @@ -1868,7 +1641,6 @@ namespace filters { this.app.stage.addChild(this.help); this.app.ticker.add((delta: number): void => { - this.bg.rotation += 0.01; this.bgFront.rotation -= 0.01; this.light1.rotation += 0.02; @@ -1879,7 +1651,7 @@ namespace filters { this.count += 0.1; - let matrix = this.filter.matrix; + const matrix = this.filter.matrix; matrix[1] = Math.sin(this.count) * 3; matrix[2] = Math.cos(this.count); @@ -1887,11 +1659,7 @@ namespace filters { matrix[4] = Math.sin(this.count / 3) * 2; matrix[5] = Math.sin(this.count / 2); matrix[6] = Math.sin(this.count / 4); - }); - } - } - -} \ No newline at end of file +} diff --git a/types/pixi.js/tslint.json b/types/pixi.js/tslint.json index 1c78047f30..bb288627d0 100644 --- a/types/pixi.js/tslint.json +++ b/types/pixi.js/tslint.json @@ -1,98 +1,14 @@ { - "jsRules": { - "class-name": true, - "comment-format": [ - true, - "check-space" - ], - "indent": [ - true, - "spaces" - ], - "no-duplicate-variable": true, - "no-eval": true, - "no-trailing-whitespace": true, - "no-unsafe-finally": true, - "one-line": [ - true, - "check-open-brace", - "check-whitespace" - ], - "quotemark": [ - true, - "double" - ], - "semicolon": [ - true, - "always" - ], - "triple-equals": [ - true, - "allow-null-check" - ], - "variable-name": [ - true, - "ban-keywords" - ], - "whitespace": [ - true, - "check-branch", - "check-decl", - "check-operator", - "check-separator", - "check-type" - ] - }, + "extends": "../tslint.json", "rules": { + "ban-types": false, + "interface-name": false, + "no-empty-interface": false, + "no-single-declare-module": false, + "unified-signatures": false, + "class-name": true, - "comment-format": [ - true, - "check-space" - ], - "indent": [ - true, - "spaces" - ], - "no-eval": true, - "no-internal-module": true, - "no-trailing-whitespace": true, - "no-unsafe-finally": true, - "no-var-keyword": true, - "one-line": [ - true, - "check-open-brace", - "check-whitespace" - ], - "quotemark": [ - true, - "double" - ], - "semicolon": [ - true, - "always" - ], - "triple-equals": [ - true, - "allow-null-check" - ], - "typedef-whitespace": [ - true, - { - "call-signature": "nospace", - "index-signature": "nospace", - "parameter": "nospace", - "property-declaration": "nospace", - "variable-declaration": "nospace" - } - ], - "variable-name": false, - "whitespace": [ - true, - "check-branch", - "check-decl", - "check-operator", - "check-separator", - "check-type" - ] + "indent": [true, "spaces"], + "quotemark": [true, "double"] } } \ No newline at end of file diff --git a/types/plotly.js/index.d.ts b/types/plotly.js/index.d.ts index 863c708abb..1fbdf3942c 100644 --- a/types/plotly.js/index.d.ts +++ b/types/plotly.js/index.d.ts @@ -1,39 +1,282 @@ -// Type definitions for plotly.js +// Type definitions for plotly.js 1.22 // Project: https://plot.ly/javascript/ -// Definitions by: Martin Duparc +// Definitions by: Chris Gervang , Martin Duparc // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 -interface PlotlyConfig { - staticPlot?: boolean, - editable?: boolean, - autosizable?: boolean, - fillFrame?: boolean, - frameMargins?: number, - scrollZoom?: boolean, - doubleClick?: string, - showTips?: boolean, - showLink?: boolean, - sendData?: boolean, - linkText?: string, - showSources?: boolean, - displayModeBar?: string|boolean, - modeBarButtonsToRemove?: any[], - modeBarButtonsToAdd?: any[], - modeBarButtons?: boolean, - displaylogo?: boolean, - plotGlPixelRatio?: number, - setBackground?: any, - topojsonURL?: string, - mapboxAccessToken?: string, - logging?: boolean +declare namespace Plots { + interface StaticPlots { + resize: (root: Plotly.Root) => void + } } -interface PlotlyStatic { - newPlot(divid:string | HTMLElement, data:any[], layout?:any, config?:PlotlyConfig):void; +declare namespace Plotly { + type Root = string | HTMLElement + + interface PlotlyStatic { + Plots: Plots.StaticPlots + newPlot: (root: Root, data: Partial[], layout?: Partial, config?: Partial) => void + relayout: (root: Root, layout: Partial) => void + redraw: (root: Root) => void + purge: (root: Root) => void + d3: any + } + + // Layout + + interface Layout { + autosize: boolean + showlegend: boolean + xaxis: Partial + yaxis: Partial + margin: Partial + height: number + width: number + hovermode: "closest" | "x" | "y" | false + 'xaxis.range': [Datum, Datum] + 'yaxis.range': [Datum, Datum] + 'yaxis.type': AxisType + 'xaxis.type': AxisType + 'xaxis.autorange': boolean + 'yaxis.autorange': boolean + shapes: Partial[] + } + + type AxisType = "date" | "log" | "linear" + + interface Axis { + showgrid: boolean + fixedrange: boolean + rangemode: "tozero" | 'normal' | 'nonnegative' + type: AxisType + tickformat: string + hoverformat: string + rangeslider: Partial + rangeselector: Partial, + range: [Datum, Datum] + showticklabels: boolean + autotick: boolean + zeroline: boolean + autorange: boolean | 'reversed' + } + + interface ShapeLine { + color: string + width: number + dash: Dash + } + + interface Shape { + visible: boolean + layer: 'below' | 'above' + type: 'rect' | 'circle' | 'line' | 'path' + path: string + // x-reference is assigned to the x-values + xref: 'x' | 'paper' + // y-reference is assigned to the plot paper [0,1] + yref: 'paper' | 'y' + x0: Datum + y0: Datum + x1: Datum + y1: Datum + fillcolor: string + opacity: number + line: Partial + } + + interface Margin { + t: number + b: number + l: number + r: number + } + + type ModeBarButtons = 'lasso2d' | 'select2d' | 'sendDataToCloud' | 'autoScale2d' | + 'zoom2d' | 'pan2d' | 'zoomIn2d' | 'zoomOut2d' | 'autoScale2d' | 'resetScale2d' | + 'hoverClosestCartesian' | 'hoverCompareCartesian' | 'zoom3d' | 'pan3d' | 'orbitRotation' | + 'tableRotation' | 'resetCameraDefault3d' | 'resetCameraLastSave3d' | 'hoverClosest3d' | + 'zoomInGeo' | 'zoomOutGeo' | 'resetGeo' | 'hoverClosestGeo' | 'hoverClosestGl2d' | + 'hoverClosestPie' | 'toggleHover' | 'resetViews' + + // Data + + type Datum = string | number | Date + + type Dash = 'solid' | 'dot' | 'dash' | 'longdash' | 'dashdot' | 'longdashdot' + + type Data = ScatterData | BarData + + // Bar + interface BarData { + type: 'bar' + x: Datum[] + y: Datum[] + } + + // Scatter + interface ScatterData { + type: 'scatter' | 'scattergl' + x: Datum[] + y: Datum[] + text: string | string[] + line: Partial + marker: Partial + mode: "lines" | "markers" | "text" | "lines+markers" | "text+markers" | "text+lines" | "text+lines+markers" | "none" + hoveron: "points" | "fills" + hoverinfo: "text" + fill: 'none' | 'tozeroy' | 'tozerox' | 'tonexty' | 'tonextx' | 'toself' | 'tonext' + fillcolor: string + legendgroup: string + name: string + connectgaps: boolean + } + + interface ScatterMarker { + symbol: "" //Drawing.symbolList + opacity: number + size: number + maxdisplayed: number + sizeref: number + sizemin: number + sizemode: "diameter" | "area" + showscale: boolean + line: {} //TODO + colorbar: {} //TODO + } + + interface ScatterLine { + color: string + width: number + dash: Dash + shape: 'linear' | 'spline' | 'hv' | 'vh' | 'hvh' | 'vhv' + smoothing: number + simplify: boolean + } + + interface Font { + family: string + size: number + color: string + } + + interface Config { + // no interactivity, for export or image generation + staticPlot: boolean + + // we can edit titles, move annotations, etc + editable: boolean + + // DO autosize once regardless of layout.autosize + // (use default width or height values otherwise) + autosizable: boolean + + // set the length of the undo/redo queue + queueLength: number + + // if we DO autosize, do we fill the container or the screen? + fillFrame: boolean + + // if we DO autosize, set the frame margins in percents of plot size + frameMargins: number + + // mousewheel or two-finger scroll zooms the plot + scrollZoom: boolean + + // double click interaction (false, 'reset', 'autosize' or 'reset+autosize') + doubleClick: 'reset+autosize' | 'reset' | 'autosize' | false + + // new users see some hints about interactivity + showTips: boolean + + // link to open this plot in plotly + showLink: boolean + + // if we show a link, does it contain data or just link to a plotly file? + sendData: boolean + + // text appearing in the sendData link + linkText: string + + // false or function adding source(s) to linkText + showSources: boolean + + // display the mode bar (true, false, or 'hover') + displayModeBar: 'hover' | boolean + + // remove mode bar button by name + // (see ./components/modebar/buttons.js for the list of names) + modeBarButtonsToRemove: ModeBarButtons[], + + // add mode bar button using config objects + // (see ./components/modebar/buttons.js for list of arguments) + modeBarButtonsToAdd: ModeBarButtons[], + + // fully custom mode bar buttons as nested array, + // where the outer arrays represents button groups, and + // the inner arrays have buttons config objects or names of default buttons + // (see ./components/modebar/buttons.js for more info) + modeBarButtons: boolean + + // add the plotly logo on the end of the mode bar + displaylogo: boolean + + // increase the pixel ratio for Gl plot images + plotGlPixelRatio: number + + // function to add the background color to a different container + // or 'opaque' to ensure there's white behind it + setBackground: string | 'opaque' + + // URL to topojson files used in geo charts + topojsonURL: string + + // Mapbox access token (required to plot mapbox trace types) + // If using an Mapbox Atlas server, set this option to '', + // so that plotly.js won't attempt to authenticate to the public Mapbox server. + mapboxAccessToken: string + + // Turn all console logging on or off (errors will be thrown) + // This should ONLY be set via Plotly.setPlotConfig + logging: boolean + + // Set global transform to be applied to all traces with no + // specification needed + globalTransforms: any[] + + } + + // Components + + interface RangeSlider { + visible: boolean + thickness: number + range: [Datum, Datum] + borderwidth: number + bordercolor: string + bgcolor: string + } + + interface RangeSelectorButton { + step: 'second' | 'minute' | 'hour' | 'day' | 'month' | 'year' | 'all' + stepmode: 'backward' | 'todate' + count: number + label: string + } + + interface RangeSelector { + buttons: Partial[] + visible: boolean + x: number + xanchor: 'auto' | 'left' | 'center' | 'right' + y: number + yanchor: 'auto' | 'top' | 'middle' | 'bottom' + bgcolor: string + activecolor: string + bordercolor: string + borderwidth: number + font: Partial + } } -declare module "plotly.js" { - export = plotly; -} - -declare var plotly:PlotlyStatic; +declare var Plotly: Plotly.PlotlyStatic +export = Plotly \ No newline at end of file diff --git a/types/plotly.js/plotly.js-tests.ts b/types/plotly.js/plotly.js-tests.ts index 57fc92d8a9..293c5ade6a 100644 --- a/types/plotly.js/plotly.js-tests.ts +++ b/types/plotly.js/plotly.js-tests.ts @@ -1,6 +1,6 @@ import * as Plotly from 'plotly.js'; -var data = [ +var data: Plotly.BarData[] = [ { x: ['giraffes', 'orangutans', 'monkeys'], y: [20, 14, 23], diff --git a/types/plotly.js/tsconfig.json b/types/plotly.js/tsconfig.json index 94a19223ed..776f3e5a66 100644 --- a/types/plotly.js/tsconfig.json +++ b/types/plotly.js/tsconfig.json @@ -7,7 +7,7 @@ ], "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": false, + "strictNullChecks": true, "baseUrl": "../", "typeRoots": [ "../" diff --git a/types/plotly.js/tslint.json b/types/plotly.js/tslint.json new file mode 100644 index 0000000000..2221e40e4a --- /dev/null +++ b/types/plotly.js/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } \ No newline at end of file diff --git a/types/plugapi/index.d.ts b/types/plugapi/index.d.ts index 82782a1934..e1c61ce792 100644 --- a/types/plugapi/index.d.ts +++ b/types/plugapi/index.d.ts @@ -3,20 +3,19 @@ // Definitions by: Brice Theurillat // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace PlugAPI { - - export interface PlugLogin { + interface PlugLogin { email: string; password: string; } - export interface Notification { + interface Notification { action: string; id: number; timestamp: string; value: string; } - export interface RawChatMessage { + interface RawChatMessage { cid: string; message: string; sub: number; @@ -24,7 +23,7 @@ declare namespace PlugAPI { un: string; } - export interface Media { + interface Media { author: string; format: number; image: string; @@ -34,7 +33,7 @@ declare namespace PlugAPI { id: number; } - export interface Score { + interface Score { positive: number; listeners: number; grabs: number; @@ -42,23 +41,23 @@ declare namespace PlugAPI { skipped: number; } - export interface LastPlay { + interface LastPlay { dj: User.DJ; media: Media; score: Score; } - export interface FollowJoinData { + interface FollowJoinData { r: number; un: string; id: string; } - export interface LogObject { - log: () => void; + interface LogObject { + log(): void; } - export namespace User { + namespace User { interface Default { username: string; language: string; @@ -110,7 +109,7 @@ declare namespace PlugAPI { } } - export namespace Enum { + namespace Enum { interface RoomRole { NONE: number; RESIDENTDJ: number; @@ -217,7 +216,7 @@ declare namespace PlugAPI { } } - export namespace Event { + namespace Event { interface BoothCycle { moderator: string; cycle: boolean; @@ -339,21 +338,21 @@ declare namespace PlugAPI { interface Command extends Event.Chat { command: string; args: string[]; - respond: (...args: any[]) => any; - respondTimeout: (...args: any[]) => any; - havePermission: (...args: any[]) => boolean; - isFrom: (...args: any[]) => boolean; + respond(...args: any[]): any; + respondTimeout(...args: any[]): any; + havePermission(...args: any[]): boolean; + isFrom(...args: any[]): boolean; } } - export var ROOM_ROLE: Enum.RoomRole; - export var GLOBAL_ROLES: Enum.GlobalRole; - export var STATUS: Enum.Status; - export var BAN: Enum.Ban; - export var BAN_REASON: Enum.BanReason; - export var MUTE: Enum.Mute; - export var MUTE_REASON: Enum.MuteReason; - export var events: Enum.Events; + const ROOM_ROLE: Enum.RoomRole; + const GLOBAL_ROLES: Enum.GlobalRole; + const STATUS: Enum.Status; + const BAN: Enum.Ban; + const BAN_REASON: Enum.BanReason; + const MUTE: Enum.Mute; + const MUTE_REASON: Enum.MuteReason; + const events: Enum.Events; } declare class PlugAPI { @@ -412,4 +411,5 @@ declare class PlugAPI { on(event: "command", callback: (data: PlugAPI.Event.Command) => void): void; on(event: string, callback: (data: any) => void): void; } + export = PlugAPI; diff --git a/types/progressbar/progressbar-tests.ts b/types/progressbar/progressbar-tests.ts index 46dcc60732..b75e110adb 100644 --- a/types/progressbar/progressbar-tests.ts +++ b/types/progressbar/progressbar-tests.ts @@ -1,8 +1,8 @@ import { Progressbar, create } from 'progressbar'; -let str: string = '', - progressbar: Progressbar, - num: number = 1; +let str: string = ''; +let progressbar: Progressbar; +let num: number = 1; const fn: () => void = () => {}; progressbar = create(); diff --git a/types/promised-temp/package.json b/types/promised-temp/package.json deleted file mode 100644 index 55849714d6..0000000000 --- a/types/promised-temp/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "dependencies": { - "@types/temp": "latest", - "@types/node": "latest" - } -} diff --git a/types/protractor-browser-logs/index.d.ts b/types/protractor-browser-logs/index.d.ts index 7f3a4ffa55..b2a4a91fac 100644 --- a/types/protractor-browser-logs/index.d.ts +++ b/types/protractor-browser-logs/index.d.ts @@ -2,6 +2,7 @@ // Project: https://www.npmjs.com/package/protractor-browser-logs, https://github.com/wix/protractor-browser-logs // Definitions by: Saqib Rokadia // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 import * as webdriver from 'selenium-webdriver'; import Entry = webdriver.logging.Entry; diff --git a/types/protractor-browser-logs/package.json b/types/protractor-browser-logs/package.json index 1f7874a30c..ce9b337b30 100644 --- a/types/protractor-browser-logs/package.json +++ b/types/protractor-browser-logs/package.json @@ -1,6 +1,5 @@ { "dependencies": { - "protractor": "latest", - "@types/selenium-webdriver": "latest" + "protractor": "latest" } } diff --git a/types/protractor-helpers/index.d.ts b/types/protractor-helpers/index.d.ts index 92215ce4eb..9bd62cb167 100644 --- a/types/protractor-helpers/index.d.ts +++ b/types/protractor-helpers/index.d.ts @@ -4,107 +4,101 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.1 -/// /// +import * as webdriver from "selenium-webdriver"; -// ElementArrayFinder +declare global { + // ElementArrayFinder -declare namespace protractor { - interface ElementArrayFinder { - getByText(text: string) : protractor.ElementFinder; - $$data(hook: string) : protractor.ElementArrayFinder; + namespace protractor { + interface ElementArrayFinder { + getByText(text: string) : protractor.ElementFinder; + $$data(hook: string) : protractor.ElementArrayFinder; + } + + interface ElementFinder { + $data(hook: string) : protractor.ElementFinder; + } } - interface ElementFinder { - $data(hook: string) : protractor.ElementFinder; + // Globals + + function $data(hook: string) : protractor.ElementFinder; + function $$data(hook: string) : protractor.ElementArrayFinder; + + + // Locators + + // TODO - find out about result of querySelector and querySelector all. + // Are they Locator s? + namespace protractor { + interface IProtractorLocatorStrategy { + dataHook(hook: string, optParentElement?: protractor.ElementFinder, optRootSelector?: string) : webdriver.Locator; + dataHookAll(hook: string, optParentElement?: protractor.ElementFinder, optRootSelector?: string) : webdriver.Locator; + } + } + + // Matchers + // TODO - Use `T` to improve types + + namespace jasmine { + interface Matchers { + toBePresent() : boolean; + toBeDisplayed() : boolean; + toHaveCountOf(expectedCount : number) : boolean; + toHaveText(expectedText : string) : boolean; + toMatchRegex(regex : RegExp) : boolean; + toMatchMoney(expectedValue : number, currencySymbol? : string) : boolean; + toMatchMoneyWithFraction(expectedValue : number, currencySymbol?: string) : boolean; + toHaveValue(actual: string | number) : boolean; + toHaveClass(className : string) : boolean; + toHaveUrl(url : string) : boolean; + toBeDisabled() : boolean; + toBeChecked() : boolean; + toBeValid() : boolean; + toBeInvalid() : boolean; + toBeInvalidRequired() : boolean; + // Copied definitions from angular-translate. + toMatchTranslated(translationId : string, interpolateParams? : any) : boolean; + toMatchTranslated(translationId : string[], interpolateParams? : any) : boolean; + } } } -// Globals +export function not(arg: webdriver.promise.IThenable) : webdriver.promise.IThenable; -declare function $data(hook: string) : protractor.ElementFinder; -declare function $$data(hook: string) : protractor.ElementArrayFinder; +// Copied definitions from angular-translate. +export function translate(translationId: string, interpolateParams?: any): webdriver.promise.IThenable; +export function translate(translationId: string[], interpolateParams?: any): webdriver.promise.IThenable<{ [key: string]: string }>; +export function safeGet(url: string) : void; -// Locators +export function maximizeWindow(width?: number, height?: number) : void; // TODO +export function resetPosition() : void; +export function moveToElement(hook: string) : void; +export function displayHover(element: protractor.ElementFinder) : void; -// TODO - find out about result of querySelector and querySelector all. -// Are they Locator s? -declare namespace protractor { - interface IProtractorLocatorStrategy { - dataHook(hook: string, optParentElement?: protractor.ElementFinder, optRootSelector?: string) : webdriver.Locator; - dataHookAll(hook: string, optParentElement?: protractor.ElementFinder, optRootSelector?: string) : webdriver.Locator; - } -} +export function waitForElement(element: protractor.ElementFinder, timeout?: number) : void; +export function waitForElementToDisappear(element: protractor.ElementFinder, timeout?: number) : void; -// Matchers -// TODO - Typescript doesn't really help much here -// we don't know what type is being tested. -// Fixing this would require modifying the -// jasmine d.ts. +export function selectOptionByText(select: protractor.ElementFinder, text: string) : void; +export function selectOptionByIndex(select: protractor.ElementFinder, index: number) : void; -declare namespace jasmine { - interface Matchers { - toBePresent() : boolean; - toBeDisplayed() : boolean; - toHaveCountOf(expectedCount : number) : boolean; - toHaveText(expectedText : string) : boolean; - toMatchRegex(regex : RegExp) : boolean; - toMatchMoney(expectedValue : number, currencySymbol? : string) : boolean; - toMatchMoneyWithFraction(expectedValue : number, currencySymbol?: string) : boolean; - toHaveValue(actual: string | number) : boolean; - toHaveClass(className : string) : boolean; - toHaveUrl(url : string) : boolean; - toBeDisabled() : boolean; - toBeChecked() : boolean; - toBeValid() : boolean; - toBeInvalid() : boolean; - toBeInvalidRequired() : boolean; - // Copied definitions from angular-translate. - toMatchTranslated(translationId : string, interpolateParams? : any) : boolean; - toMatchTranslated(translationId : string[], interpolateParams? : any) : boolean; - } -} +export function selectOption(option: protractor.ElementFinder) : void +export function isFirefox() : boolean; +export function isIE() : boolean; -declare module "protractor-helpers" { +export function createMessage(actual : string, message : string, isNot : any) : string; // isNot : boolean too inflexible +export function createMessage(actual : protractor.ElementFinder, message : string, isNot : any) : string; // isNot : boolean too inflexible +export function createMessage(actual : protractor.ElementArrayFinder, message : string, isNot : any) : string; // isNot : boolean too inflexible - function not(arg: webdriver.promise.IThenable) : webdriver.promise.IThenable; +export function clearAndSetValue(input : protractor.ElementFinder, value : string) : void; // TODO - sendKeys(value) - // Copied definitions from angular-translate. - function translate(translationId: string, interpolateParams?: any): webdriver.promise.IThenable; - function translate(translationId: string[], interpolateParams?: any): webdriver.promise.IThenable<{ [key: string]: string }>; - - function safeGet(url: string) : void; - - function maximizeWindow(width?: number, height?: number) : void; // TODO - function resetPosition() : void; - function moveToElement(hook: string) : void; - function displayHover(element: protractor.ElementFinder) : void; - - function waitForElement(element: protractor.ElementFinder, timeout?: number) : void; - function waitForElementToDisappear(element: protractor.ElementFinder, timeout?: number) : void; - - function selectOptionByText(select: protractor.ElementFinder, text: string) : void; - function selectOptionByIndex(select: protractor.ElementFinder, index: number) : void; - - function selectOption(option: protractor.ElementFinder) : void - - function isFirefox() : boolean; - function isIE() : boolean; - - function createMessage(actual : string, message : string, isNot : any) : string; // isNot : boolean too inflexible - function createMessage(actual : protractor.ElementFinder, message : string, isNot : any) : string; // isNot : boolean too inflexible - function createMessage(actual : protractor.ElementArrayFinder, message : string, isNot : any) : string; // isNot : boolean too inflexible - - function clearAndSetValue(input : protractor.ElementFinder, value : string) : void; // TODO - sendKeys(value) - - function hasClass(element: protractor.ElementFinder, className: string) : webdriver.promise.IThenable; - function hasValue(element: protractor.ElementFinder, expectedValue: string) : webdriver.promise.IThenable; - function hasValue(element: protractor.ElementFinder, expectedValue: number) : webdriver.promise.IThenable; - function hasLink(element: protractor.ElementFinder, url: string) : webdriver.promise.IThenable; - function isDisabled(element: protractor.ElementFinder) : webdriver.promise.IThenable; - function isChecked(element: protractor.ElementFinder) : webdriver.promise.IThenable; - function getFilteredConsoleErrors() : webdriver.promise.IThenable; // TODO - discuss handling in IE - -} +export function hasClass(element: protractor.ElementFinder, className: string) : webdriver.promise.IThenable; +export function hasValue(element: protractor.ElementFinder, expectedValue: string) : webdriver.promise.IThenable; +export function hasValue(element: protractor.ElementFinder, expectedValue: number) : webdriver.promise.IThenable; +export function hasLink(element: protractor.ElementFinder, url: string) : webdriver.promise.IThenable; +export function isDisabled(element: protractor.ElementFinder) : webdriver.promise.IThenable; +export function isChecked(element: protractor.ElementFinder) : webdriver.promise.IThenable; +export function getFilteredConsoleErrors() : webdriver.promise.IThenable; // TODO - discuss handling in IE diff --git a/types/protractor-helpers/package.json b/types/protractor-helpers/package.json deleted file mode 100644 index 2939ff6d12..0000000000 --- a/types/protractor-helpers/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "dependencies": { - "@types/jasmine": "^2.2.34", - "@types/selenium-webdriver": "2.44.28" - } -} diff --git a/types/protractor-helpers/protractor-helpers-tests.ts b/types/protractor-helpers/protractor-helpers-tests.ts index 543991392b..39ac5f079e 100644 --- a/types/protractor-helpers/protractor-helpers-tests.ts +++ b/types/protractor-helpers/protractor-helpers-tests.ts @@ -1,4 +1,5 @@ import helpers = require('protractor-helpers'); +import * as webdriver from "selenium-webdriver"; declare var $$: any, $: any, by: any, element: any; // ?? diff --git a/types/protractor-helpers/tsconfig.json b/types/protractor-helpers/tsconfig.json index c3fc74ec13..635aeabf5f 100644 --- a/types/protractor-helpers/tsconfig.json +++ b/types/protractor-helpers/tsconfig.json @@ -8,6 +8,9 @@ "noImplicitThis": true, "strictNullChecks": false, "baseUrl": "../", + "typeRoots": [ + "../" + ], "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/types/protractor-http-mock/package.json b/types/protractor-http-mock/package.json deleted file mode 100644 index 55eddeb1c7..0000000000 --- a/types/protractor-http-mock/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "@types/selenium-webdriver": "~2.44.28" - } -} diff --git a/types/pump/index.d.ts b/types/pump/index.d.ts index 7361399a6a..6e8cc7fc8e 100644 --- a/types/pump/index.d.ts +++ b/types/pump/index.d.ts @@ -11,8 +11,8 @@ declare function pump(streams: pump.Stream[], callback?: pump.Callback): pump.St declare function pump(...streams: Array): pump.Stream[]; declare namespace pump { - export type Callback = (err: Error) => any; - export type Stream = NodeJS.ReadableStream | NodeJS.WritableStream; + type Callback = (err: Error) => any; + type Stream = NodeJS.ReadableStream | NodeJS.WritableStream; } export = pump; diff --git a/types/python-shell/python-shell-tests.ts b/types/python-shell/python-shell-tests.ts index 859ea102e2..7529edaac0 100644 --- a/types/python-shell/python-shell-tests.ts +++ b/types/python-shell/python-shell-tests.ts @@ -7,7 +7,7 @@ ps.run('my_script.py', err => { console.log('finished'); }); -var options = { +const options = { mode: 'text', pythonPath: 'path/to/python', pythonOptions: ['-u'], @@ -21,7 +21,7 @@ ps.run('my_script.py', options, (err, results) => { console.log('results: %j', results); }); -var pyshell = new PythonShell('my_script.py'); +const pyshell = new PythonShell('my_script.py'); // sends a message to the Python script via stdin pyshell.send('hello'); @@ -35,4 +35,4 @@ pyshell.on('message', message => { pyshell.end(err => { if (err) throw err; console.log('finished'); -}); \ No newline at end of file +}); diff --git a/types/qlik-visualizationextensions/index.d.ts b/types/qlik-visualizationextensions/index.d.ts index e5d5850423..d4296fca5b 100644 --- a/types/qlik-visualizationextensions/index.d.ts +++ b/types/qlik-visualizationextensions/index.d.ts @@ -226,7 +226,7 @@ declare namespace BackendAPI { * Validation error. * REF(NxValidationError) */ - //?Type = REF(NxValidationError)? + // ?Type = REF(NxValidationError)? qError: INxValidationError; } @@ -654,12 +654,12 @@ declare namespace BackendAPI { interface INxPatch { /** - * Operation to perform. - * One of: - * # Add - * # Remove - * # Replace - */ + * Operation to perform. + * One of: + * # Add + * # Remove + * # Replace + */ qOp: PatchType; /** @@ -1182,7 +1182,7 @@ declare namespace AppAPI { field(field?: string, state?: string): FieldAPI.IQField; /** - * Step forward in list of selections. + * Step forward in list of selections. * @return {Promise} - A promise of a Qlik engine reply. */ forward(): ng.IPromise; @@ -2178,7 +2178,7 @@ declare namespace VisualizationAPI { * # treemap * # extension * @param {array} [cols] - Optional. Column definitions, dimensions and measures. - Each entry can be of the following structures: + * Each entry can be of the following structures: * # String * # NxDimension * # NxMeasure @@ -2235,11 +2235,7 @@ declare namespace VisualizationAPI { } declare namespace ExtensionAPI { - - - interface IExtensionModel { - - } + interface IExtensionModel {} interface IExtensionComponent { model: IExtensionModel; @@ -2249,13 +2245,12 @@ declare namespace ExtensionAPI { component: IExtensionComponent; } - - //ExtensionAPI + // ExtensionAPI type SelectionModeType = "CONFIRM" | "QUICK"; interface IInitialProperties { - qHyperCubeDef?: any; //IHyperCubeDef; - qListObjectDef?: any; //IListObjectDef; + qHyperCubeDef?: any; // IHyperCubeDef; + qListObjectDef?: any; // IListObjectDef; fixed?: boolean; width?: number; percent?: boolean; @@ -2270,7 +2265,7 @@ declare namespace ExtensionAPI { interface IExtension { definition?: IDefinition; - paint?: ($element: HTMLElement, layout?: any) => void; + paint?($element: HTMLElement, layout?: any): void; initialProperties?: IInitialProperties; template?: string; controller?: any; @@ -2287,7 +2282,7 @@ declare namespace ExtensionAPI { // qHyperCubeDef: IVisualizationHyperCubeDef; // qListObjectDef: IVis - //[""]: + // [""]: } //#region IDefinition @@ -2451,7 +2446,7 @@ declare namespace ExtensionAPI { items: any; } - //?Das selbe wie Appearance? + // ?Das selbe wie Appearance? interface ISettings { uses: "settings"; min?: number; @@ -2468,16 +2463,17 @@ declare namespace ExtensionAPI { } declare module "qlik" { - var e: RootAPI.IRoot; export = e; + const e: RootAPI.IRoot; + export = e; } interface IQVAngular { /** - * Register a new directive with the compiler. - * - * @param name Name of the directive in camel-case (i.e. ngBind which will match as ng-bind) - * @param directiveFactory An injectable directive factory function. - */ + * Register a new directive with the compiler. + * + * @param name Name of the directive in camel-case (i.e. ngBind which will match as ng-bind) + * @param directiveFactory An injectable directive factory function. + */ directive(name: string, directiveFactory: ng.Injectable): void; directive(object: { [directiveName: string]: ng.Injectable }): void; @@ -2485,21 +2481,22 @@ interface IQVAngular { filter(object: { [name: string]: ng.Injectable }): void; /** - * Register a service constructor, which will be invoked with new to create - * the service instance. This is short for registering a service where its - * provider's $get property is a factory function that returns an instance - * instantiated by the injector from the service constructor function. - * @param name The name of the instance. - * @param serviceConstructor An injectable class (constructor function) that will be instantiated. - * @return Returns the constructed singleton of the service class/function. - */ + * Register a service constructor, which will be invoked with new to create + * the service instance. This is short for registering a service where its + * provider's $get property is a factory function that returns an instance + * instantiated by the injector from the service constructor function. + * @param name The name of the instance. + * @param serviceConstructor An injectable class (constructor function) that will be instantiated. + * @return Returns the constructed singleton of the service class/function. + */ service(name: string, serviceConstructor: ng.Injectable): T; service(object: { [name: string]: ng.Injectable }): T; - //provider(name: string, serviceProviderFactory: ng.IServiceProviderFactory): void; - //provider(name: string, serviceProviderConstructor: ng.IServiceProviderClass): void; + // provider(name: string, serviceProviderFactory: ng.IServiceProviderFactory): void; + // provider(name: string, serviceProviderConstructor: ng.IServiceProviderClass): void; } declare module "qvangular" { - var e: IQVAngular; export = e; -} \ No newline at end of file + const e: IQVAngular; + export = e; +} diff --git a/types/qlik-visualizationextensions/qlik-visualizationextensions-tests.ts b/types/qlik-visualizationextensions/qlik-visualizationextensions-tests.ts index 76a71d22dc..0afce187e4 100644 --- a/types/qlik-visualizationextensions/qlik-visualizationextensions-tests.ts +++ b/types/qlik-visualizationextensions/qlik-visualizationextensions-tests.ts @@ -1,3 +1,3 @@ import qlik = require("qlik"); -const t = qlik.currApp(); \ No newline at end of file +const t = qlik.currApp(); diff --git a/types/qlik-visualizationextensions/tslint.json b/types/qlik-visualizationextensions/tslint.json index cae1bdf2ad..97addf8511 100644 --- a/types/qlik-visualizationextensions/tslint.json +++ b/types/qlik-visualizationextensions/tslint.json @@ -1,7 +1,7 @@ -{ +{ "extends": "../tslint.json", "rules": { - "forbidden-types": false, + "ban-types": false, "no-empty-interface": false, "interface-name": false } diff --git a/types/qrcode.react/index.d.ts b/types/qrcode.react/index.d.ts index c7a6b85d72..4de6ba60db 100644 --- a/types/qrcode.react/index.d.ts +++ b/types/qrcode.react/index.d.ts @@ -7,7 +7,7 @@ /// declare namespace qrcode { - export interface QRCodeProps { + interface QRCodeProps { value: string; size?: number; bgColor?: string; @@ -15,7 +15,7 @@ declare namespace qrcode { level?: "L"|"M"|"Q"|"H"; } - export type QRCode = React.ComponentClass; + type QRCode = React.ComponentClass; } declare const qrcode: qrcode.QRCode; diff --git a/types/raven/index.d.ts b/types/raven/index.d.ts new file mode 100644 index 0000000000..359ead4608 --- /dev/null +++ b/types/raven/index.d.ts @@ -0,0 +1,89 @@ +// Type definitions for raven 1.2 +// Project: https://github.com/getsentry/raven-node +// Definitions by: Scott Cooper +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +import { IncomingMessage, ServerResponse } from 'http'; +import { EventEmitter } from 'events'; + +export const version: string; +export function config(dsn: string | false, options?: ConstructorOptions): Client; +export function wrap(func: () => void, onErr?: () => void): () => void; +export function wrap(options: any, func: () => void, onErr?: () => void): () => void; +export function interceptErr(ctx: any): Client; +export function setContext(ctx: any): Client; +export function captureException(e: Error, cb?: CaptureCallback): Client; +export function captureException(e: Error, options?: CaptureOptions, cb?: CaptureCallback): Client; +export function mergeContext(ctx: any): Client; +export function getContext(): any; +export function errorHandler(): (e: Error, req: IncomingMessage, res: ServerResponse, next: () => void) => void; +export function context(ctx: any, func: () => void, onErr?: () => void): Client; +export function context(func: () => void, onErr?: () => void): Client; +export function captureBreadcrumb(breadcrumb: any): void; +export function disableConsoleAlerts(): void; +export function consoleAlert(msg: string): void; +export function parseDSN(dsn: string | false): parsedDSN; + +export class Client extends EventEmitter { + constructor(options: ConstructorOptions); + constructor(dsn: string, options?: ConstructorOptions); + config(dsn: string, options?: ConstructorOptions): Client; + install(options?: ConstructorOptions, cb?: () => void): Client; + setContext(ctx: any): Client; + requestHandler(): (req: IncomingMessage, res: ServerResponse, next: () => void) => void; + errorHandler(): (e: Error, req: IncomingMessage, res: ServerResponse, next: () => void) => void; + captureException(error: Error, cb?: CaptureCallback): void; + captureException(error: Error, options?: CaptureOptions, cb?: CaptureCallback): void; + captureMessage(message: string, cb?: CaptureCallback): void; + captureMessage(message: string, options?: CaptureOptions, cb?: CaptureCallback): void; + captureBreadcrumb(breadcrumb: any): void; + setUserContext(data: UserData): void; + setDataCallback(fn: DataCallback): void; + context(ctx: any, func: () => void, onErr?: () => void): Client; + context(func: () => void, onErr?: () => void): Client; + process(kwargs: any, cb?: () => void): void; + process(eventId: string, kwargs: any, cb?: () => void): void; +} + +export interface ConstructorOptions { + name?: string; + logger?: string; + release?: string; + environment?: string; + tags?: { string: string }; + extra?: { string: any }; + dataCallback?: DataCallback; + transport?(): void; + captureUnhandledRejections?: boolean; + autoBreadcrumbs?: boolean | any; +} + +export interface UserData { + id: string; + handle?: string; +} + +export interface parsedDSN { + protocol: string; + public_key: string; + private_key: string; + host: string; + path: string; + project_id: string; + port: number; +} + +export type CaptureCallback = (err: { string: any }, eventId: any) => void; + +export type DataCallback = (data: { string: any }) => void; + +export type TransportCallback = (options: { string: any }) => void; + +export interface CaptureOptions { + tags?: { string: string }; + extra?: { string: any }; + fingerprint?: string; + level?: string; +} diff --git a/types/raven/raven-tests.ts b/types/raven/raven-tests.ts new file mode 100644 index 0000000000..d419b32d12 --- /dev/null +++ b/types/raven/raven-tests.ts @@ -0,0 +1,28 @@ +import * as Raven from 'raven'; + +const dsn = '___DSN___'; + +const client = Raven.config(dsn, { autoBreadcrumbs: true }).install(); +console.log(Raven.version); +Raven.config(dsn).install({ captureUnhandledRejections: true }); +client.setContext({}); +client.on('logged', () => { }); +client.process({}); +client.captureMessage('Broken!', (err, eventId) => { }); +new Raven.Client({ name: 'YAY!' }); +new Raven.Client(dsn, { name: 'YAY!' }); +new Raven.Client(dsn); + +try { + throw new Error(); +} catch (e) { + const eventId = Raven.captureException(e, (sendErr, eventId) => { }); +} + +Raven.setContext({}); +Raven.mergeContext({}); +Raven.context(() => { + Raven.captureBreadcrumb({}); +}); +setTimeout(Raven.wrap(() => {}), 1000); +Raven.parseDSN('https://8769c40cf49c4cc58b51fa45d8e2d166:296768aa91084e17b5ac02d3ad5bc7e7@app.getsentry.com/269'); diff --git a/types/raven/tsconfig.json b/types/raven/tsconfig.json new file mode 100644 index 0000000000..dd41de9142 --- /dev/null +++ b/types/raven/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "raven-tests.ts" + ] +} diff --git a/types/raven/tslint.json b/types/raven/tslint.json new file mode 100644 index 0000000000..a205530b58 --- /dev/null +++ b/types/raven/tslint.json @@ -0,0 +1,6 @@ +{ + "extends": "../tslint.json", + "rules": { + "export-just-namespace": false + } +} diff --git a/types/rc-slider/index.d.ts b/types/rc-slider/index.d.ts index 704412eda6..37ce19ac59 100644 --- a/types/rc-slider/index.d.ts +++ b/types/rc-slider/index.d.ts @@ -7,11 +7,11 @@ import * as React from 'react'; declare namespace RcSliderClass { - export interface Marks { + interface Marks { [number: number]: JSX.Element | string | { style: any, label: string | JSX.Element }; } - export interface CommonApiProps { + interface CommonApiProps { /** * Additional CSS class for the root DOM node * @default '' @@ -100,8 +100,7 @@ declare namespace RcSliderClass { value?: number; } - - export interface RangeProps extends CommonApiProps { + interface RangeProps extends CommonApiProps { /** * Set initial positions of handles. * @default [0,0] @@ -128,7 +127,7 @@ declare namespace RcSliderClass { pushable?: boolean; } - export interface HandleProps extends CommonApiProps { + interface HandleProps extends CommonApiProps { /** * Class name */ @@ -152,5 +151,4 @@ declare namespace RcSliderClass { class Handle extends React.Component { } } - export = RcSliderClass; diff --git a/types/rc-slider/rc-slider-tests.tsx b/types/rc-slider/rc-slider-tests.tsx index f6e2442558..55c0674741 100644 --- a/types/rc-slider/rc-slider-tests.tsx +++ b/types/rc-slider/rc-slider-tests.tsx @@ -24,7 +24,7 @@ ReactDOM.render( marks={{ 1: "1" }} step={0.01} vertical={true} - handle={() => { return }} + handle={() => } included={true} disabled={false} dots={true} @@ -45,4 +45,4 @@ ReactDOM.render( allowCross={false} pushable={true} />, document.querySelector('.app') -); \ No newline at end of file +); diff --git a/types/react-autosuggest/index.d.ts b/types/react-autosuggest/index.d.ts index 7199fefcdb..165262eb39 100644 --- a/types/react-autosuggest/index.d.ts +++ b/types/react-autosuggest/index.d.ts @@ -4,7 +4,6 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.1 - import * as React from 'react'; declare class Autosuggest extends React.Component {} @@ -32,11 +31,11 @@ declare namespace Autosuggest { interface InputProps extends React.HTMLAttributes { value: string; - onChange: (event: React.FormEvent, params?: ChangeEvent) => void; - onBlur?: (event: React.FormEvent, params?: BlurEvent) => void; + onChange(event: React.FormEvent, params?: ChangeEvent): void; + onBlur?(event: React.FormEvent, params?: BlurEvent): void; } - export interface SuggestionSelectedEventData { + interface SuggestionSelectedEventData { method: 'click' | 'enter'; sectionIndex: number | null; suggestion: TSuggestion; @@ -57,23 +56,22 @@ declare namespace Autosuggest { interface AutosuggestProps extends React.Props { suggestions: any[]; - onSuggestionsFetchRequested: (request: SuggestionsFetchRequest) => void; - onSuggestionsClearRequested?: () => void; - getSuggestionValue: (suggestion: any) => any; - renderSuggestion: (suggestion: any, inputValues: InputValues) => JSX.Element; + onSuggestionsFetchRequested(request: SuggestionsFetchRequest): void; + onSuggestionsClearRequested?(): void; + getSuggestionValue(suggestion: any): any; + renderSuggestion(suggestion: any, inputValues: InputValues): JSX.Element; inputProps: InputProps; - onSuggestionSelected?: (event: React.FormEvent, data: SuggestionSelectedEventData) => void; - shouldRenderSuggestions?: (value: string) => boolean; + onSuggestionSelected?(event: React.FormEvent, data: SuggestionSelectedEventData): void; + shouldRenderSuggestions?(value: string): boolean; alwaysRenderSuggestions?: boolean; focusFirstSuggestion?: boolean; focusInputOnSuggestionClick?: boolean; multiSection?: boolean; - renderSectionTitle?: (section: any, inputValues: InputValues) => JSX.Element; - getSectionSuggestions?: (section: any) => any[]; - renderInputComponent?: () => JSX.Element; - renderSuggestionsContainer?: (children: any) => JSX.Element; + renderSectionTitle?(section: any, inputValues: InputValues): JSX.Element; + getSectionSuggestions?(section: any): any[]; + renderInputComponent?(): JSX.Element; + renderSuggestionsContainer?(children: any): JSX.Element; theme?: Theme; id?: string; } - } diff --git a/types/react-body-classname/index.d.ts b/types/react-body-classname/index.d.ts index e20bffdc73..b7f0856df9 100644 --- a/types/react-body-classname/index.d.ts +++ b/types/react-body-classname/index.d.ts @@ -13,4 +13,4 @@ declare class BodyClassName extends React.Component<{ className: string }, any> static displayName: string; static peek(): any; static rewind(): any; -} \ No newline at end of file +} diff --git a/types/react-body-classname/react-body-classname-tests.tsx b/types/react-body-classname/react-body-classname-tests.tsx index 7fb971fe44..019105bee6 100644 --- a/types/react-body-classname/react-body-classname-tests.tsx +++ b/types/react-body-classname/react-body-classname-tests.tsx @@ -23,4 +23,4 @@ class App { // Becuase we nested the component, our body will now have 'app home' // as the class name } -} \ No newline at end of file +} diff --git a/types/react-bootstrap-date-picker/index.d.ts b/types/react-bootstrap-date-picker/index.d.ts index f905dc77a7..28a5b0c72b 100644 --- a/types/react-bootstrap-date-picker/index.d.ts +++ b/types/react-bootstrap-date-picker/index.d.ts @@ -14,10 +14,9 @@ declare const DatePicker: DatePicker; type DatePicker = ComponentClass; declare namespace DatePicker { + type ChangeCallback = (value: string, formattedValue: string) => void; - export type ChangeCallback = (value: string, formattedValue: string) => void; - - export interface DatePickerProps { + interface DatePickerProps { value?: string; defaultValue?: string; style?: any; @@ -30,7 +29,7 @@ declare namespace DatePicker { dateFormat?: string; clearButtonElement?: ReactNode; showClearButton?: boolean; - onClear?: () => void; + onClear?(): void; previousButtonElement?: ReactNode; nextButtonElement?: ReactNode; cellPadding?: string; @@ -43,5 +42,4 @@ declare namespace DatePicker { todayButtonLabel?: string; customControl?: StatelessComponent | ComponentClass; } - } diff --git a/types/react-color/lib/components/common/EditableInput.d.ts b/types/react-color/lib/components/common/EditableInput.d.ts index 78df9473f2..f786399c9e 100644 --- a/types/react-color/lib/components/common/EditableInput.d.ts +++ b/types/react-color/lib/components/common/EditableInput.d.ts @@ -16,4 +16,3 @@ export interface EditableInputProps extends ClassAttributes { } export default class EditableInput extends Component {} - diff --git a/types/react-color/react-color-tests.tsx b/types/react-color/react-color-tests.tsx index e4e6f2348b..71ed800375 100644 --- a/types/react-color/react-color-tests.tsx +++ b/types/react-color/react-color-tests.tsx @@ -1,22 +1,22 @@ -import * as React from "react" -import { StatelessComponent } from "react" -import { render } from "react-dom" +import * as React from "react"; +import { StatelessComponent } from "react"; +import { render } from "react-dom"; import { AlphaPicker, BlockPicker, ChromePicker, CirclePicker, CompactPicker, GithubPicker, HuePicker, MaterialPicker, PhotoshopPicker, SketchPicker, SliderPicker, SwatchesPicker, TwitterPicker, CustomPicker, InjectedColorProps, ColorResult, Color -} from "react-color" -import { Alpha, Checkboard, EditableInput, Hue, Saturation } from "react-color/lib/components/common" +} from "react-color"; +import { Alpha, Checkboard, EditableInput, Hue, Saturation } from "react-color/lib/components/common"; interface CustomProps extends InjectedColorProps { - color?: Color + color?: Color; } -var CustomComponent: StatelessComponent = (props: CustomProps) => { - function onChange (color: ColorResult) { - console.log(color) +const CustomComponent: StatelessComponent = (props: CustomProps) => { + function onChange(color: ColorResult) { + console.log(color); } return ( @@ -27,23 +27,23 @@ var CustomComponent: StatelessComponent = (props: CustomProps) => { - ) -} -var Custom = CustomPicker(CustomComponent) + ); +}; +const Custom = CustomPicker(CustomComponent); -var colors: Array = ["#000", "#333"] +const colors = ["#000", "#333"]; -render(, document.getElementById("main")) -render(, document.getElementById("main")) -render(, document.getElementById("main")) -render(, document.getElementById("main")) -render(, document.getElementById("main")) -render(, document.getElementById("main")) -render(, document.getElementById("main")) -render(, document.getElementById("main")) -render(, document.getElementById("main")) -render(, document.getElementById("main")) -render(, document.getElementById("main")) -render(, document.getElementById("main")) -render(, document.getElementById("main")) -render(, document.getElementById("main")) +render(, document.getElementById("main")); +render(, document.getElementById("main")); +render(, document.getElementById("main")); +render(, document.getElementById("main")); +render(, document.getElementById("main")); +render(, document.getElementById("main")); +render(, document.getElementById("main")); +render(, document.getElementById("main")); +render(, document.getElementById("main")); +render(, document.getElementById("main")); +render(, document.getElementById("main")); +render(, document.getElementById("main")); +render(, document.getElementById("main")); +render(, document.getElementById("main")); diff --git a/types/react-copy-to-clipboard/index.d.ts b/types/react-copy-to-clipboard/index.d.ts index 1b0c9e942e..67b70b0ad1 100644 --- a/types/react-copy-to-clipboard/index.d.ts +++ b/types/react-copy-to-clipboard/index.d.ts @@ -11,20 +11,17 @@ export as namespace CopyToClipboard; export = CopyToClipboard; declare namespace CopyToClipboard { - - export interface Options { + interface Options { debug: boolean; message: string; } - export interface Props { + interface Props { text: string; - onCopy?: (a: string) => void, + onCopy?(a: string): void; options?: Options; } - } declare class CopyToClipboard extends React.Component { } - diff --git a/types/react-copy-to-clipboard/react-copy-to-clipboard-tests.tsx b/types/react-copy-to-clipboard/react-copy-to-clipboard-tests.tsx index 195e7a8ceb..4d412f0257 100644 --- a/types/react-copy-to-clipboard/react-copy-to-clipboard-tests.tsx +++ b/types/react-copy-to-clipboard/react-copy-to-clipboard-tests.tsx @@ -1,4 +1,3 @@ - import * as React from "react"; import * as CopyToClipboard from "react-copy-to-clipboard"; diff --git a/types/react-day-picker/index.d.ts b/types/react-day-picker/index.d.ts index be90f72d07..8dc5fcd12e 100644 --- a/types/react-day-picker/index.d.ts +++ b/types/react-day-picker/index.d.ts @@ -7,7 +7,7 @@ import * as React from 'react'; declare namespace DayPicker { - export interface LocaleUtils { + interface LocaleUtils { formatDay(day: Date, locale: string): string; formatMonthTitle(month: Date, locale: string): string; formatWeekdayLong(weekday: number, locale: string): string; @@ -16,7 +16,7 @@ declare namespace DayPicker { getMonths(locale: string): [string, string, string, string, string, string, string, string, string, string, string, string]; } - export interface DateUtils { + interface DateUtils { addMonths(d: Date, n: number): Date; clone(d: Date): Date; isSameDay(d1: Date, d2: Date): Date; @@ -27,16 +27,16 @@ declare namespace DayPicker { isDayInRange(day: Date, range: RangeModifier): boolean; } - export interface CaptionElementProps { + interface CaptionElementProps { date: Date; - classNames: ClassNames, + classNames: ClassNames; localeUtils: LocaleUtils; locale: string; months: undefined; onClick?: React.MouseEventHandler; } - export interface NavbarElementProps { + interface NavbarElementProps { className: string; classNames: ClassNames; previousMonth: Date; @@ -51,14 +51,14 @@ declare namespace DayPicker { locale: string; } - export interface WeekdayElementProps { + interface WeekdayElementProps { weekday: number; className: string; localeUtils: LocaleUtils; locale: string; } - export interface ClassNames { + interface ClassNames { container: string; interactionDisabled: string; navBar: string; @@ -80,28 +80,26 @@ declare namespace DayPicker { outside: string; } - export interface RangeModifier { + interface RangeModifier { from: Date; to: Date; } - export interface BeforeModifier { + interface BeforeModifier { before: Date; } - export interface AfterModifier { + interface AfterModifier { after: Date; } - export interface FunctionModifier { - (date: Date): boolean; - } - export type Modifier = Date | RangeModifier | BeforeModifier | AfterModifier | FunctionModifier; + type FunctionModifier = (date: Date) => boolean; + type Modifier = Date | RangeModifier | BeforeModifier | AfterModifier | FunctionModifier; - export interface Modifiers { + interface Modifiers { today: Modifier | Modifier[]; outside: Modifier | Modifier[]; [other: string]: Modifier | Modifier[] | undefined; } - export interface Props { + interface Props { canChangeMonth?: boolean; captionElement?: React.ReactElement> | React.ComponentClass | diff --git a/types/react-day-picker/react-day-picker-tests.tsx b/types/react-day-picker/react-day-picker-tests.tsx index 8c2755f9b5..1733b713dd 100644 --- a/types/react-day-picker/react-day-picker-tests.tsx +++ b/types/react-day-picker/react-day-picker-tests.tsx @@ -16,6 +16,7 @@ DayPicker.DateUtils.clone(new Date()); DayPicker.DateUtils.isDayInRange(new Date(), { from: new Date(), to: new Date(2050) }); interface MyCaptionProps extends DayPicker.CaptionElementProps { + myProp: number; } class Caption extends React.Component { render() { @@ -32,8 +33,7 @@ class Caption extends React.Component { ); } } - - +; type CaptionElementProps = Partial; class CaptionElement extends React.Component { @@ -46,7 +46,7 @@ class CaptionElement extends React.Component {
{ localeUtils.formatMonthTitle(date, locale) }
- ) + ); } } - }/> + }/>; diff --git a/types/react-dnd-html5-backend/react-dnd-html5-backend-tests.ts b/types/react-dnd-html5-backend/react-dnd-html5-backend-tests.ts index 68703d062d..198909b7e9 100644 --- a/types/react-dnd-html5-backend/react-dnd-html5-backend-tests.ts +++ b/types/react-dnd-html5-backend/react-dnd-html5-backend-tests.ts @@ -4,7 +4,7 @@ import React = require("react"); import ReactDnd = require("react-dnd"); -var r = React.DOM; +const r = React.DOM; import DragSource = ReactDnd.DragSource; import DropTarget = ReactDnd.DropTarget; @@ -15,8 +15,8 @@ import HTML5Backend, { getEmptyImage } from 'react-dnd-html5-backend'; // ---------------------------------------------------------------------- namespace Game { - var knightPosition = [0, 0]; - var observer: any = null; + let knightPosition = [0, 0]; + let observer: any = null; function emitChange() { observer(knightPosition); @@ -47,7 +47,7 @@ namespace Game { } } -var ItemTypes = { +const ItemTypes = { KNIGHT: "knight" }; @@ -61,7 +61,7 @@ namespace Knight { isDragging: boolean; } - var knightSource: ReactDnd.DragSourceSpec = { + const knightSource: ReactDnd.DragSourceSpec = { beginDrag: (props) => { return {}; } @@ -81,7 +81,7 @@ namespace Knight { static create = React.createFactory(Knight); componentDidMount() { - var img = getEmptyImage(); + const img = getEmptyImage(); img.onload = () => this.props.connectDragPreview(img); } @@ -99,8 +99,8 @@ namespace Knight { } } - export var DndKnight = DragSource(ItemTypes.KNIGHT, knightSource, knightCollect)(Knight); - export var create = React.createFactory(DndKnight); + export const DndKnight = DragSource(ItemTypes.KNIGHT, knightSource, knightCollect)(Knight); + export const create = React.createFactory(DndKnight); } // Square Component @@ -113,7 +113,7 @@ namespace Square { export class Square extends React.Component { render() { - var fill = this.props.black ? 'black' : 'white'; + const fill = this.props.black ? 'black' : 'white'; return r.div({ style: { backgroundColor: fill @@ -122,7 +122,7 @@ namespace Square { } } - export var create = React.createFactory(Square); + export const create = React.createFactory(Square); } // BoardSquare Component @@ -137,7 +137,7 @@ namespace BoardSquare { canDrop?: boolean; } - var boardSquareTarget: ReactDnd.DropTargetSpec = { + const boardSquareTarget: ReactDnd.DropTargetSpec = { canDrop: (props) => Game.canMoveKnight(props.x, props.y), drop: (props) => Game.moveKnight(props.x, props.y) }; @@ -169,9 +169,9 @@ namespace BoardSquare { } render() { - var black = (this.props.x + this.props.y) % 2 === 1; - var isOver = this.props.isOver; - var canDrop = this.props.canDrop; + const black = (this.props.x + this.props.y) % 2 === 1; + const isOver = this.props.isOver; + const canDrop = this.props.canDrop; return this.props.connectDropTarget( r.div({ @@ -191,8 +191,8 @@ namespace BoardSquare { } } - export var DndBoardSquare = DropTarget(ItemTypes.KNIGHT, boardSquareTarget, boardSquareCollect)(BoardSquare); - export var create = React.createFactory(DndBoardSquare); + export const DndBoardSquare = DropTarget(ItemTypes.KNIGHT, boardSquareTarget, boardSquareCollect)(BoardSquare); + export const create = React.createFactory(DndBoardSquare); } // Custom Drag Layer Component @@ -216,9 +216,9 @@ namespace CustomDragLayer { } } - export var dragLayer = DragLayer(dragLayerCollect)(CustomDragLayer); + export const dragLayer = DragLayer(dragLayerCollect)(CustomDragLayer); - export var create = React.createFactory(dragLayer); + export const create = React.createFactory(dragLayer); } // Board Component @@ -231,16 +231,16 @@ namespace Board { export class Board extends React.Component { private _renderPiece = (x: number, y: number) => { - var knightX = this.props.knightPosition[0]; - var knightY = this.props.knightPosition[1]; + const knightX = this.props.knightPosition[0]; + const knightY = this.props.knightPosition[1]; return x === knightX && y === knightY ? Knight.create() : null; } private _renderSquare = (i: number) => { - var x = i % 8; - var y = Math.floor(i / 8); + const x = i % 8; + const y = Math.floor(i / 8); return r.div({ key: i, @@ -252,7 +252,7 @@ namespace Board { } render() { - var squares: Array> = []; + const squares: Array> = []; for (let i = 0; i < 64; i++) { squares.push(this._renderSquare(i)); } @@ -274,7 +274,7 @@ namespace Board { } } - export var createWithHTMLBackend = React.createFactory(DragDropContext(HTML5Backend)(Board)); + export const createWithHTMLBackend = React.createFactory(DragDropContext(HTML5Backend)(Board)); } // Render the Board Component diff --git a/types/react-event-listener/index.d.ts b/types/react-event-listener/index.d.ts index c6d05b313b..906e3711e0 100644 --- a/types/react-event-listener/index.d.ts +++ b/types/react-event-listener/index.d.ts @@ -21,188 +21,188 @@ export function withOptions(handler: (ev: T) => any, options: EventOptions): export interface EventListenerProps { // Global events - onPointerCancel?: (ev: PointerEvent) => any; - onPointerCancelCapture?: (ev: PointerEvent) => any; - onPointerDown?: (ev: PointerEvent) => any; - onPointerDownCapture?: (ev: PointerEvent) => any; - onPointerEnter?: (ev: PointerEvent) => any; - onPointerEnterCapture?: (ev: PointerEvent) => any; - onPointerLeave?: (ev: PointerEvent) => any; - onPointerLeaveCapture?: (ev: PointerEvent) => any; - onPointerMove?: (ev: PointerEvent) => any; - onPointerMoveCapture?: (ev: PointerEvent) => any; - onPointerOut?: (ev: PointerEvent) => any; - onPointerOutCapture?: (ev: PointerEvent) => any; - onPointerOver?: (ev: PointerEvent) => any; - onPointerOverCapture?: (ev: PointerEvent) => any; - onPointerUp?: (ev: PointerEvent) => any; - onPointerUpCapture?: (ev: PointerEvent) => any; - onWheel?: (ev: WheelEvent) => any; - onWheelCapture?: (ev: WheelEvent) => any; - onAbort?: (ev: Event) => any; - onAbortCapture?: (ev: Event) => any; - onAfterPrint?: (ev: Event) => any; - onAfterPrintCapture?: (ev: Event) => any; - onBeforePrint?: (ev: Event) => any; - onBeforePrintCapture?: (ev: Event) => any; - onBeforeUnload?: (ev: BeforeUnloadEvent) => any; - onBeforeUnloadCapture?: (ev: BeforeUnloadEvent) => any; - onBlur?: (ev: FocusEvent) => any; - onBlurCapture?: (ev: FocusEvent) => any; - onCanPlay?: (ev: Event) => any; - onCanPlayCapture?: (ev: Event) => any; - onCanPlayThrough?: (ev: Event) => any; - onCanPlayThroughCapture?: (ev: Event) => any; - onChange?: (ev: Event) => any; - onChangeCapture?: (ev: Event) => any; - onClick?: (ev: MouseEvent) => any; - onClickCapture?: (ev: MouseEvent) => any; - onCompassNeedsCalibration?: (ev: Event) => any; - onCompassNeedsCalibrationCapture?: (ev: Event) => any; - onContextMenu?: (ev: PointerEvent) => any; - onContextMenuCapture?: (ev: PointerEvent) => any; - onDblClick?: (ev: MouseEvent) => any; - onDblClickCapture?: (ev: MouseEvent) => any; - onDeviceMotion?: (ev: DeviceMotionEvent) => any; - onDeviceMotionCapture?: (ev: DeviceMotionEvent) => any; - onDeviceOrientation?: (ev: DeviceOrientationEvent) => any; - onDeviceOrientationCapture?: (ev: DeviceOrientationEvent) => any; - onDrag?: (ev: DragEvent) => any; - onDragCapture?: (ev: DragEvent) => any; - onDragEnd?: (ev: DragEvent) => any; - onDragEndCapture?: (ev: DragEvent) => any; - onDragEnter?: (ev: DragEvent) => any; - onDragEnterCapture?: (ev: DragEvent) => any; - onDragLeave?: (ev: DragEvent) => any; - onDragLeaveCapture?: (ev: DragEvent) => any; - onDragOver?: (ev: DragEvent) => any; - onDragOverCapture?: (ev: DragEvent) => any; - onDragStart?: (ev: DragEvent) => any; - onDragStartCapture?: (ev: DragEvent) => any; - onDrop?: (ev: DragEvent) => any; - onDropCapture?: (ev: DragEvent) => any; - onDurationChange?: (ev: Event) => any; - onDurationChangeCapture?: (ev: Event) => any; - onEmptied?: (ev: Event) => any; - onEmptiedCapture?: (ev: Event) => any; - onEnded?: (ev: Event) => any; - onEndedCapture?: (ev: Event) => any; + onPointerCancel?(ev: PointerEvent): any; + onPointerCancelCapture?(ev: PointerEvent): any; + onPointerDown?(ev: PointerEvent): any; + onPointerDownCapture?(ev: PointerEvent): any; + onPointerEnter?(ev: PointerEvent): any; + onPointerEnterCapture?(ev: PointerEvent): any; + onPointerLeave?(ev: PointerEvent): any; + onPointerLeaveCapture?(ev: PointerEvent): any; + onPointerMove?(ev: PointerEvent): any; + onPointerMoveCapture?(ev: PointerEvent): any; + onPointerOut?(ev: PointerEvent): any; + onPointerOutCapture?(ev: PointerEvent): any; + onPointerOver?(ev: PointerEvent): any; + onPointerOverCapture?(ev: PointerEvent): any; + onPointerUp?(ev: PointerEvent): any; + onPointerUpCapture?(ev: PointerEvent): any; + onWheel?(ev: WheelEvent): any; + onWheelCapture?(ev: WheelEvent): any; + onAbort?(ev: Event): any; + onAbortCapture?(ev: Event): any; + onAfterPrint?(ev: Event): any; + onAfterPrintCapture?(ev: Event): any; + onBeforePrint?(ev: Event): any; + onBeforePrintCapture?(ev: Event): any; + onBeforeUnload?(ev: BeforeUnloadEvent): any; + onBeforeUnloadCapture?(ev: BeforeUnloadEvent): any; + onBlur?(ev: FocusEvent): any; + onBlurCapture?(ev: FocusEvent): any; + onCanPlay?(ev: Event): any; + onCanPlayCapture?(ev: Event): any; + onCanPlayThrough?(ev: Event): any; + onCanPlayThroughCapture?(ev: Event): any; + onChange?(ev: Event): any; + onChangeCapture?(ev: Event): any; + onClick?(ev: MouseEvent): any; + onClickCapture?(ev: MouseEvent): any; + onCompassNeedsCalibration?(ev: Event): any; + onCompassNeedsCalibrationCapture?(ev: Event): any; + onContextMenu?(ev: PointerEvent): any; + onContextMenuCapture?(ev: PointerEvent): any; + onDblClick?(ev: MouseEvent): any; + onDblClickCapture?(ev: MouseEvent): any; + onDeviceMotion?(ev: DeviceMotionEvent): any; + onDeviceMotionCapture?(ev: DeviceMotionEvent): any; + onDeviceOrientation?(ev: DeviceOrientationEvent): any; + onDeviceOrientationCapture?(ev: DeviceOrientationEvent): any; + onDrag?(ev: DragEvent): any; + onDragCapture?(ev: DragEvent): any; + onDragEnd?(ev: DragEvent): any; + onDragEndCapture?(ev: DragEvent): any; + onDragEnter?(ev: DragEvent): any; + onDragEnterCapture?(ev: DragEvent): any; + onDragLeave?(ev: DragEvent): any; + onDragLeaveCapture?(ev: DragEvent): any; + onDragOver?(ev: DragEvent): any; + onDragOverCapture?(ev: DragEvent): any; + onDragStart?(ev: DragEvent): any; + onDragStartCapture?(ev: DragEvent): any; + onDrop?(ev: DragEvent): any; + onDropCapture?(ev: DragEvent): any; + onDurationChange?(ev: Event): any; + onDurationChangeCapture?(ev: Event): any; + onEmptied?(ev: Event): any; + onEmptiedCapture?(ev: Event): any; + onEnded?(ev: Event): any; + onEndedCapture?(ev: Event): any; onError?: ErrorEventHandler; onErrorCapture?: ErrorEventHandler; - onFocus?: (ev: FocusEvent) => any; - onFocusCapture?: (ev: FocusEvent) => any; - onHashChange?: (ev: HashChangeEvent) => any; - onHashChangeCapture?: (ev: HashChangeEvent) => any; - onInput?: (ev: Event) => any; - onInputCapture?: (ev: Event) => any; - onKeyDown?: (ev: KeyboardEvent) => any; - onKeyDownCapture?: (ev: KeyboardEvent) => any; - onKeyPress?: (ev: KeyboardEvent) => any; - onKeyPressCapture?: (ev: KeyboardEvent) => any; - onKeyUp?: (ev: KeyboardEvent) => any; - onKeyUpCapture?: (ev: KeyboardEvent) => any; - onLoad?: (ev: Event) => any; - onLoadCapture?: (ev: Event) => any; - onLoadedData?: (ev: Event) => any; - onLoadedDataCapture?: (ev: Event) => any; - onLoadedMetadata?: (ev: Event) => any; - onLoadedMetadataCapture?: (ev: Event) => any; - onLoadStart?: (ev: Event) => any; - onLoadStartCapture?: (ev: Event) => any; - onMessage?: (ev: MessageEvent) => any; - onMessageCapture?: (ev: MessageEvent) => any; - onMouseDown?: (ev: MouseEvent) => any; - onMouseDownCapture?: (ev: MouseEvent) => any; - onMouseEnter?: (ev: MouseEvent) => any; - onMouseEnterCapture?: (ev: MouseEvent) => any; - onMouseLeave?: (ev: MouseEvent) => any; - onMouseLeaveCapture?: (ev: MouseEvent) => any; - onMouseMove?: (ev: MouseEvent) => any; - onMouseMoveCapture?: (ev: MouseEvent) => any; - onMouseOut?: (ev: MouseEvent) => any; - onMouseOutCapture?: (ev: MouseEvent) => any; - onMouseOver?: (ev: MouseEvent) => any; - onMouseOverCapture?: (ev: MouseEvent) => any; - onMouseUp?: (ev: MouseEvent) => any; - onMouseUpCapture?: (ev: MouseEvent) => any; - onMouseWheel?: (ev: MouseWheelEvent) => any; - onMouseWheelCapture?: (ev: MouseWheelEvent) => any; - onMsGestureChange?: (ev: MSGestureEvent) => any; - onMsGestureChangeCapture?: (ev: MSGestureEvent) => any; - onMsGestureDoubleTap?: (ev: MSGestureEvent) => any; - onMsGestureDoubleTapCapture?: (ev: MSGestureEvent) => any; - onMsGestureEnd?: (ev: MSGestureEvent) => any; - onMsGestureEndCapture?: (ev: MSGestureEvent) => any; - onMsGestureHold?: (ev: MSGestureEvent) => any; - onMsGestureHoldCapture?: (ev: MSGestureEvent) => any; - onMsGestureStart?: (ev: MSGestureEvent) => any; - onMsGestureStartCapture?: (ev: MSGestureEvent) => any; - onMsGestureTap?: (ev: MSGestureEvent) => any; - onMsGestureTapCapture?: (ev: MSGestureEvent) => any; - onMsInertiaStart?: (ev: MSGestureEvent) => any; - onMsInertiaStartCapture?: (ev: MSGestureEvent) => any; - onMsPointerCancel?: (ev: MSPointerEvent) => any; - onMsPointerCancelCapture?: (ev: MSPointerEvent) => any; - onMsPointerDown?: (ev: MSPointerEvent) => any; - onMsPointerDownCapture?: (ev: MSPointerEvent) => any; - onMsPointerEnter?: (ev: MSPointerEvent) => any; - onMsPointerEnterCapture?: (ev: MSPointerEvent) => any; - onMsPointerLeave?: (ev: MSPointerEvent) => any; - onMsPointerLeaveCapture?: (ev: MSPointerEvent) => any; - onMsPointerMove?: (ev: MSPointerEvent) => any; - onMsPointerMoveCapture?: (ev: MSPointerEvent) => any; - onMsPointerOut?: (ev: MSPointerEvent) => any; - onMsPointerOutCapture?: (ev: MSPointerEvent) => any; - onMsPointerOver?: (ev: MSPointerEvent) => any; - onMsPointerOverCapture?: (ev: MSPointerEvent) => any; - oNmsPointerUp?: (ev: MSPointerEvent) => any; - oNmsPointerUpCapture?: (ev: MSPointerEvent) => any; - onOffline?: (ev: Event) => any; - onOfflineCapture?: (ev: Event) => any; - onOnline?: (ev: Event) => any; - onOnlineCapture?: (ev: Event) => any; - onOrientationChange?: (ev: Event) => any; - onOrientationChangeCapture?: (ev: Event) => any; - onPageHide?: (ev: PageTransitionEvent) => any; - onPageHideCapture?: (ev: PageTransitionEvent) => any; - onPageShow?: (ev: PageTransitionEvent) => any; - onPageShowCapture?: (ev: PageTransitionEvent) => any; - onPause?: (ev: Event) => any; - onPauseCapture?: (ev: Event) => any; - onPlay?: (ev: Event) => any; - onPlayCapture?: (ev: Event) => any; - onPlaying?: (ev: Event) => any; - onPlayingCapture?: (ev: Event) => any; - onPopState?: (ev: PopStateEvent) => any; - onPopStateCapture?: (ev: PopStateEvent) => any; - onProgress?: (ev: ProgressEvent) => any; - onProgressCapture?: (ev: ProgressEvent) => any; - onRateChange?: (ev: Event) => any; - onRateChangeCapture?: (ev: Event) => any; - onReadyStateChange?: (ev: ProgressEvent) => any; - onReadyStateChangeCapture?: (ev: ProgressEvent) => any; - onReset?: (ev: Event) => any; - onResetCapture?: (ev: Event) => any; - onResize?: (ev: UIEvent) => any; - onResizeCapture?: (ev: UIEvent) => any; - onScroll?: (ev: UIEvent) => any; - onScrollCapture?: (ev: UIEvent) => any; - onSeeked?: (ev: Event) => any; - onSeekedCapture?: (ev: Event) => any; - onSeeking?: (ev: Event) => any; - onSeekingCapture?: (ev: Event) => any; - onSelect?: (ev: UIEvent) => any; - onSelectCapture?: (ev: UIEvent) => any; - onStalled?: (ev: Event) => any; - onStalledCapture?: (ev: Event) => any; - onStorage?: (ev: StorageEvent) => any; - onStorageCapture?: (ev: StorageEvent) => any; - onSubmit?: (ev: Event) => any; - onSubmitCapture?: (ev: Event) => any; - onSuspend?: (ev: Event) => any; - onSuspendCapture?: (ev: Event) => any; - onTimeUpdate?: (ev: Event) => any; - onTimeUpdateCapture?: (ev: Event) => any; + onFocus?(ev: FocusEvent): any; + onFocusCapture?(ev: FocusEvent): any; + onHashChange?(ev: HashChangeEvent): any; + onHashChangeCapture?(ev: HashChangeEvent): any; + onInput?(ev: Event): any; + onInputCapture?(ev: Event): any; + onKeyDown?(ev: KeyboardEvent): any; + onKeyDownCapture?(ev: KeyboardEvent): any; + onKeyPress?(ev: KeyboardEvent): any; + onKeyPressCapture?(ev: KeyboardEvent): any; + onKeyUp?(ev: KeyboardEvent): any; + onKeyUpCapture?(ev: KeyboardEvent): any; + onLoad?(ev: Event): any; + onLoadCapture?(ev: Event): any; + onLoadedData?(ev: Event): any; + onLoadedDataCapture?(ev: Event): any; + onLoadedMetadata?(ev: Event): any; + onLoadedMetadataCapture?(ev: Event): any; + onLoadStart?(ev: Event): any; + onLoadStartCapture?(ev: Event): any; + onMessage?(ev: MessageEvent): any; + onMessageCapture?(ev: MessageEvent): any; + onMouseDown?(ev: MouseEvent): any; + onMouseDownCapture?(ev: MouseEvent): any; + onMouseEnter?(ev: MouseEvent): any; + onMouseEnterCapture?(ev: MouseEvent): any; + onMouseLeave?(ev: MouseEvent): any; + onMouseLeaveCapture?(ev: MouseEvent): any; + onMouseMove?(ev: MouseEvent): any; + onMouseMoveCapture?(ev: MouseEvent): any; + onMouseOut?(ev: MouseEvent): any; + onMouseOutCapture?(ev: MouseEvent): any; + onMouseOver?(ev: MouseEvent): any; + onMouseOverCapture?(ev: MouseEvent): any; + onMouseUp?(ev: MouseEvent): any; + onMouseUpCapture?(ev: MouseEvent): any; + onMouseWheel?(ev: MouseWheelEvent): any; + onMouseWheelCapture?(ev: MouseWheelEvent): any; + onMsGestureChange?(ev: MSGestureEvent): any; + onMsGestureChangeCapture?(ev: MSGestureEvent): any; + onMsGestureDoubleTap?(ev: MSGestureEvent): any; + onMsGestureDoubleTapCapture?(ev: MSGestureEvent): any; + onMsGestureEnd?(ev: MSGestureEvent): any; + onMsGestureEndCapture?(ev: MSGestureEvent): any; + onMsGestureHold?(ev: MSGestureEvent): any; + onMsGestureHoldCapture?(ev: MSGestureEvent): any; + onMsGestureStart?(ev: MSGestureEvent): any; + onMsGestureStartCapture?(ev: MSGestureEvent): any; + onMsGestureTap?(ev: MSGestureEvent): any; + onMsGestureTapCapture?(ev: MSGestureEvent): any; + onMsInertiaStart?(ev: MSGestureEvent): any; + onMsInertiaStartCapture?(ev: MSGestureEvent): any; + onMsPointerCancel?(ev: MSPointerEvent): any; + onMsPointerCancelCapture?(ev: MSPointerEvent): any; + onMsPointerDown?(ev: MSPointerEvent): any; + onMsPointerDownCapture?(ev: MSPointerEvent): any; + onMsPointerEnter?(ev: MSPointerEvent): any; + onMsPointerEnterCapture?(ev: MSPointerEvent): any; + onMsPointerLeave?(ev: MSPointerEvent): any; + onMsPointerLeaveCapture?(ev: MSPointerEvent): any; + onMsPointerMove?(ev: MSPointerEvent): any; + onMsPointerMoveCapture?(ev: MSPointerEvent): any; + onMsPointerOut?(ev: MSPointerEvent): any; + onMsPointerOutCapture?(ev: MSPointerEvent): any; + onMsPointerOver?(ev: MSPointerEvent): any; + onMsPointerOverCapture?(ev: MSPointerEvent): any; + oNmsPointerUp?(ev: MSPointerEvent): any; + oNmsPointerUpCapture?(ev: MSPointerEvent): any; + onOffline?(ev: Event): any; + onOfflineCapture?(ev: Event): any; + onOnline?(ev: Event): any; + onOnlineCapture?(ev: Event): any; + onOrientationChange?(ev: Event): any; + onOrientationChangeCapture?(ev: Event): any; + onPageHide?(ev: PageTransitionEvent): any; + onPageHideCapture?(ev: PageTransitionEvent): any; + onPageShow?(ev: PageTransitionEvent): any; + onPageShowCapture?(ev: PageTransitionEvent): any; + onPause?(ev: Event): any; + onPauseCapture?(ev: Event): any; + onPlay?(ev: Event): any; + onPlayCapture?(ev: Event): any; + onPlaying?(ev: Event): any; + onPlayingCapture?(ev: Event): any; + onPopState?(ev: PopStateEvent): any; + onPopStateCapture?(ev: PopStateEvent): any; + onProgress?(ev: ProgressEvent): any; + onProgressCapture?(ev: ProgressEvent): any; + onRateChange?(ev: Event): any; + onRateChangeCapture?(ev: Event): any; + onReadyStateChange?(ev: ProgressEvent): any; + onReadyStateChangeCapture?(ev: ProgressEvent): any; + onReset?(ev: Event): any; + onResetCapture?(ev: Event): any; + onResize?(ev: UIEvent): any; + onResizeCapture?(ev: UIEvent): any; + onScroll?(ev: UIEvent): any; + onScrollCapture?(ev: UIEvent): any; + onSeeked?(ev: Event): any; + onSeekedCapture?(ev: Event): any; + onSeeking?(ev: Event): any; + onSeekingCapture?(ev: Event): any; + onSelect?(ev: UIEvent): any; + onSelectCapture?(ev: UIEvent): any; + onStalled?(ev: Event): any; + onStalledCapture?(ev: Event): any; + onStorage?(ev: StorageEvent): any; + onStorageCapture?(ev: StorageEvent): any; + onSubmit?(ev: Event): any; + onSubmitCapture?(ev: Event): any; + onSuspend?(ev: Event): any; + onSuspendCapture?(ev: Event): any; + onTimeUpdate?(ev: Event): any; + onTimeUpdateCapture?(ev: Event): any; onTouchCancel?: any; onTouchCancelCapture?: any; onTouchEnd?: any; @@ -211,12 +211,12 @@ export interface EventListenerProps { onTouchMoveCapture?: any; onTouchStart?: any; onTouchStartCapture?: any; - onUnload?: (ev: Event) => any; - onUnloadCapture?: (ev: Event) => any; - onVolumeChange?: (ev: Event) => any; - onVolumeChangeCapture?: (ev: Event) => any; - onWaiting?: (ev: Event) => any; - onWaitingCapture?: (ev: Event) => any; + onUnload?(ev: Event): any; + onUnloadCapture?(ev: Event): any; + onVolumeChange?(ev: Event): any; + onVolumeChangeCapture?(ev: Event): any; + onWaiting?(ev: Event): any; + onWaitingCapture?(ev: Event): any; /** * Target (window or document) diff --git a/types/react-facebook-login/index.d.ts b/types/react-facebook-login/index.d.ts index 8716b03217..9f83d7ae8b 100644 --- a/types/react-facebook-login/index.d.ts +++ b/types/react-facebook-login/index.d.ts @@ -7,10 +7,9 @@ import * as React from "react"; declare namespace ReactFacebookLogin { - - export interface ReactFacebookLoginProps { + interface ReactFacebookLoginProps { appId: string; - callback: (userInfo: ReactFacebookLoginInfo) => void; + callback(userInfo: ReactFacebookLoginInfo): void; autoLoad?: boolean; buttonStyle?: React.CSSProperties; @@ -22,7 +21,7 @@ declare namespace ReactFacebookLogin { icon?: string | React.ReactNode; isDisabled?: boolean; language?: string; - onClick?: () => void; + onClick?(): void; reAuthenticate?: boolean; redirectUri?: string; scope?: string; @@ -33,19 +32,17 @@ declare namespace ReactFacebookLogin { xfbml?: boolean; } - export interface ReactFacebookLoginInfo { + interface ReactFacebookLoginInfo { id: string; name: string; } - export interface ReactFacebookLoginState { + interface ReactFacebookLoginState { isSdkLoaded?: boolean; isProcessing?: boolean; } - } -declare class ReactFacebookLogin extends React.Component { -} +declare class ReactFacebookLogin extends React.Component {} -export = ReactFacebookLogin; \ No newline at end of file +export = ReactFacebookLogin; diff --git a/types/react-facebook-login/react-facebook-login-tests.tsx b/types/react-facebook-login/react-facebook-login-tests.tsx index 7f0d89ea8f..0efd5aa548 100644 --- a/types/react-facebook-login/react-facebook-login-tests.tsx +++ b/types/react-facebook-login/react-facebook-login-tests.tsx @@ -22,7 +22,6 @@ ReactDOM.render( document.getElementById('demo') ); - ReactDOM.render( { - private responseFacebook(response: ReactFacebookLoginInfo) { console.log(response); } @@ -78,9 +76,7 @@ class MyComponent extends React.Component { } } - class MyComponent2 extends React.Component { - private responseFacebook(response: ReactFacebookLoginInfo) { console.log(response); } @@ -96,4 +92,3 @@ class MyComponent2 extends React.Component { ); } } - diff --git a/types/react-gravatar/index.d.ts b/types/react-gravatar/index.d.ts index 3e33584a4b..9307c6fb93 100644 --- a/types/react-gravatar/index.d.ts +++ b/types/react-gravatar/index.d.ts @@ -22,10 +22,10 @@ declare class Gravatar extends React.Component { } declare namespace Gravatar { - export type DefaultImage = "404" | "mm" | "identicon" | "monsterid" | "wavatar" | "retro" | "blank"; - export type Rating = "g" | "pg" | "r" | "x"; + type DefaultImage = "404" | "mm" | "identicon" | "monsterid" | "wavatar" | "retro" | "blank"; + type Rating = "g" | "pg" | "r" | "x"; - export interface Props { + interface Props { /** * The email address used to look up the Gravatar image. * If you wish to avoid sending an email address to the client, you can compute the md5 hash on the server and diff --git a/types/react-gravatar/react-gravatar-tests.tsx b/types/react-gravatar/react-gravatar-tests.tsx index e3b36b7259..1dee72f2c9 100644 --- a/types/react-gravatar/react-gravatar-tests.tsx +++ b/types/react-gravatar/react-gravatar-tests.tsx @@ -37,4 +37,4 @@ class GravatarMinimalTest extends React.Component { render() { return ; } -} \ No newline at end of file +} diff --git a/types/react-helmet/index.d.ts b/types/react-helmet/index.d.ts index 730bfb6df3..26e4a8994c 100644 --- a/types/react-helmet/index.d.ts +++ b/types/react-helmet/index.d.ts @@ -1,48 +1,45 @@ -// Type definitions for react-helmet +// Type definitions for react-helmet 5.0 // Project: https://github.com/nfl/react-helmet -// Definitions by: Evan Bremer , Isman Usoh +// Definitions by: Evan Bremer , Isman Usoh , François Nguyen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.1 -/// - import * as React from "react"; -declare function ReactHelmet(): ReactHelmet.HelmetComponent; - -declare namespace ReactHelmet { - function peek(): ReactHelmet.HelmetData; - function rewind(): ReactHelmet.HelmetData; - - interface HelmetProps { - base?: any; - defaultTitle?: string; - htmlAttributes?: any; - link?: Array; - meta?: Array; - script?: Array; - style?: Array; - title?: string; - titleTemplate?: string; - onChangeClientState?: (newState: any) => void; - } - - interface HelmetData { - base: HelmetDatum; - htmlAttributes: HelmetDatum; - link: HelmetDatum; - meta: HelmetDatum; - script: HelmetDatum; - style: HelmetDatum; - title: HelmetDatum; - } - - interface HelmetDatum { - toString(): string; - toComponent(): React.Component; - } - - class HelmetComponent extends React.Component {} +interface HelmetProps { + encodeSpecialCharacters?: boolean; + titleTemplate?: string; + defaultTitle?: string; + onChangeClientState?: (nextState: any) => any } -export = ReactHelmet; +export class Helmet extends React.Component { + static peek(): HelmetData; + static rewind(): HelmetData; + static renderStatic(): HelmetData; + static canUseDOM: boolean; +} + +export interface HelmetData { + base: HelmetDatum; + bodyAttributes: HelmetDatum; + htmlAttributes: HelmetDatum; + link: HelmetDatum; + meta: HelmetDatum; + noscript: HelmetDatum; + script: HelmetDatum; + style: HelmetDatum; + title: HelmetDatum; + titleAttributes: HelmetDatum; +} + +export interface HelmetDatum { + toString(): string; + toComponent(): React.Component; +} + +export const peek: () => HelmetData; +export const rewind: () => HelmetData; +export const renderStatic: () => HelmetData; +export const canUseDOM: boolean; +export default Helmet; diff --git a/types/react-helmet/react-helmet-tests.tsx b/types/react-helmet/react-helmet-tests.tsx index e6b78955b3..ef2939a985 100644 --- a/types/react-helmet/react-helmet-tests.tsx +++ b/types/react-helmet/react-helmet-tests.tsx @@ -1,18 +1,37 @@ -import * as React from 'react'; -import * as Helmet from 'react-helmet'; +import * as React from "react"; +import { Helmet, HelmetData } from "react-helmet"; - +const Application = () => +
+ + + My Title + + + + My Title + + + +
+ + Nested Title + + +
+
; + +const helmet: HelmetData = Helmet.renderStatic(); -const head = Helmet.rewind(); const html = ` - + - ${ head.title.toString() } - ${ head.meta.toString() } - ${ head.link.toString() } + ${helmet.title.toString()} + ${helmet.meta.toString()} + ${helmet.link.toString()} - +
// React stuff here
@@ -21,24 +40,65 @@ const html = ` `; function HTML() { + const htmlAttrs = helmet.htmlAttributes.toComponent(); + const bodyAttrs = helmet.bodyAttributes.toComponent(); + return ( - + - { head.title.toComponent() } - { head.meta.toComponent() } - { head.link.toComponent() } + {helmet.title.toComponent()} + {helmet.meta.toComponent()} + {helmet.link.toComponent()} - +
- // React stuff here
); } -function log(datum: Helmet.HelmetDatum) { - return console.log('logging a helmet datum:', datum.toString()); -} + console.log(newState)} +> + + + + + My Title + + + + + + + + + + + + + + + + diff --git a/types/react-helmet/v4/index.d.ts b/types/react-helmet/v4/index.d.ts new file mode 100644 index 0000000000..0b013f25bf --- /dev/null +++ b/types/react-helmet/v4/index.d.ts @@ -0,0 +1,48 @@ +// Type definitions for react-helmet 4.0 +// Project: https://github.com/nfl/react-helmet +// Definitions by: Evan Bremer , Isman Usoh +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 + +/// + +import * as React from "react"; + +declare function ReactHelmet(): ReactHelmet.HelmetComponent; + +declare namespace ReactHelmet { + function peek(): ReactHelmet.HelmetData; + function rewind(): ReactHelmet.HelmetData; + + interface HelmetProps { + base?: any; + defaultTitle?: string; + htmlAttributes?: any; + link?: Array; + meta?: Array; + script?: Array; + style?: Array; + title?: string; + titleTemplate?: string; + onChangeClientState?: (newState: any) => void; + } + + interface HelmetData { + base: HelmetDatum; + htmlAttributes: HelmetDatum; + link: HelmetDatum; + meta: HelmetDatum; + script: HelmetDatum; + style: HelmetDatum; + title: HelmetDatum; + } + + interface HelmetDatum { + toString(): string; + toComponent(): React.Component; + } + + class HelmetComponent extends React.Component {} +} + +export = ReactHelmet; diff --git a/types/react-helmet/v4/react-helmet-tests.tsx b/types/react-helmet/v4/react-helmet-tests.tsx new file mode 100644 index 0000000000..e6b78955b3 --- /dev/null +++ b/types/react-helmet/v4/react-helmet-tests.tsx @@ -0,0 +1,44 @@ +import * as React from 'react'; +import * as Helmet from 'react-helmet'; + + + +const head = Helmet.rewind(); +const html = ` + + + + ${ head.title.toString() } + ${ head.meta.toString() } + ${ head.link.toString() } + + +
+ // React stuff here +
+ + +`; + +function HTML() { + return ( + + + { head.title.toComponent() } + { head.meta.toComponent() } + { head.link.toComponent() } + + +
+ // React stuff here +
+ + + ); +} + +function log(datum: Helmet.HelmetDatum) { + return console.log('logging a helmet datum:', datum.toString()); +} + +log(head.title); diff --git a/types/react-helmet/v4/tsconfig.json b/types/react-helmet/v4/tsconfig.json new file mode 100644 index 0000000000..5813078cfb --- /dev/null +++ b/types/react-helmet/v4/tsconfig.json @@ -0,0 +1,29 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": false, + "baseUrl": "../../", + "jsx": "react", + "typeRoots": [ + "../../" + ], + "paths": { + "react-helmet": [ + "react-helmet/v4" + ] + }, + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "react-helmet-tests.tsx" + ] +} \ No newline at end of file diff --git a/types/react-highlight-words/index.d.ts b/types/react-highlight-words/index.d.ts index aae2eff04e..220c245638 100644 --- a/types/react-highlight-words/index.d.ts +++ b/types/react-highlight-words/index.d.ts @@ -22,7 +22,7 @@ interface HighlighterProps { /** Type of tag to wrap around highlighted matches; defaults to mark */ highlightTag?: string; /** Process each search word and text to highlight before comparing (eg remove accents); signature (text: string): string */ - sanitize?: (text: string) => string; + sanitize?(text: string): string; /** Array of search words */ searchWords: string[]; /** Text to highlight matches in */ diff --git a/types/react-highlighter/react-highlighter-tests.tsx b/types/react-highlighter/react-highlighter-tests.tsx index 9065bd1fab..79760228dd 100644 --- a/types/react-highlighter/react-highlighter-tests.tsx +++ b/types/react-highlighter/react-highlighter-tests.tsx @@ -10,4 +10,4 @@ export class ReactHolderTest extends React.Component { ); } -} \ No newline at end of file +} diff --git a/types/react-icon-base/index.d.ts b/types/react-icon-base/index.d.ts index c0246569f6..600d33dff7 100644 --- a/types/react-icon-base/index.d.ts +++ b/types/react-icon-base/index.d.ts @@ -12,6 +12,4 @@ export interface IconBaseProps { style?: React.CSSProperties; } -export default class IconBase extends React.Component { - -} \ No newline at end of file +export default class IconBase extends React.Component {} diff --git a/types/react-icon-base/react-icon-base-tests.tsx b/types/react-icon-base/react-icon-base-tests.tsx index 68388f69d6..16ebafd133 100644 --- a/types/react-icon-base/react-icon-base-tests.tsx +++ b/types/react-icon-base/react-icon-base-tests.tsx @@ -1,4 +1,4 @@ import * as React from 'react'; import IconBase from 'react-icon-base'; -export default ; \ No newline at end of file +export default ; diff --git a/types/react-icons/react-icons-tests.tsx b/types/react-icons/react-icons-tests.tsx index 0c37cc9da2..1cb773fb4d 100644 --- a/types/react-icons/react-icons-tests.tsx +++ b/types/react-icons/react-icons-tests.tsx @@ -7,5 +7,3 @@ class Question extends React.Component { return

Lets go for a ?

; } } - - diff --git a/types/react-icons/tslint.json b/types/react-icons/tslint.json index 377cc837d4..05b3b474eb 100644 --- a/types/react-icons/tslint.json +++ b/types/react-icons/tslint.json @@ -1 +1,8 @@ -{ "extends": "../tslint.json" } +{ + "extends": "../tslint.json", + "rules": { + "eofline": false, + "no-useless-files": false, + "no-var": false + } +} diff --git a/types/react-input-mask/index.d.ts b/types/react-input-mask/index.d.ts index fe6cc718e4..560dc8cc2b 100644 --- a/types/react-input-mask/index.d.ts +++ b/types/react-input-mask/index.d.ts @@ -7,7 +7,7 @@ import * as React from "react"; declare namespace reactInputMask { - export interface ReactInputMaskProps extends React.HTMLAttributes { + interface ReactInputMaskProps extends React.HTMLAttributes { /** * Mask string. Format characters are: * * `9`: `0-9` @@ -37,7 +37,7 @@ declare namespace reactInputMask { */ alwaysShowMask?: boolean; } - export class ReactInputMask extends React.Component { + class ReactInputMask extends React.Component { } } declare var ReactInputMask: typeof reactInputMask.ReactInputMask; diff --git a/types/react-intl/index.d.ts b/types/react-intl/index.d.ts index e1ed69c152..d9f965602d 100644 --- a/types/react-intl/index.d.ts +++ b/types/react-intl/index.d.ts @@ -1,124 +1,107 @@ -// Type definitions for react-intl 2.2.1 +// Type definitions for react-intl 2.2 // Project: http://formatjs.io/react/ -// Definitions by: Bruno Grieder , Christian Droulers , Fedor Nezhivoi , Till Wolff +// Definitions by: Bruno Grieder , +// Christian Droulers , +// Fedor Nezhivoi , +// Till Wolff , +// Karol Janyst // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.1 -/// - declare namespace ReactIntl { + interface Values { + [key: string]: string; + } + interface Locale { locale: string; fields?: { [key: string]: string }, pluralRuleFunction?: (n: number, ord: boolean) => string; } - function injectIntl(component: React.ComponentClass | React.StatelessComponent): - React.ComponentClass & { WrappedComponent: React.ComponentClass | React.StatelessComponent }; + type LocaleData = Locale[]; + + interface InjectIntlConfig { + intlPropName?: string; + withRef?: boolean; + } + + type ComponentConstructor

= React.ComponentClass

| React.StatelessComponent

+ + function injectIntl

(component: ComponentConstructor

, options?: InjectIntlConfig): + React.ComponentClass

& { WrappedComponent: ComponentConstructor

}; function addLocaleData(data: Locale[] | Locale): void; - function hasLocaleData(localeName: string): boolean; - interface Messages { [key: string]: FormattedMessage.MessageDescriptor } function defineMessages(messages: T): T; - interface IntlShape extends React.Requireable { + interface IntlConfig { + locale: React.Requireable; + formats: React.Requireable; + messages: React.Requireable; + defaultLocale: React.Requireable; + defaultFormats: React.Requireable; } - var intlShape: IntlShape; - - interface FormatConfig { - locale?: string; - formats?: any; + interface IntlFormat { + formatDate: React.Requireable; + formatTime: React.Requireable; + formatRelative: React.Requireable; + formatNumber: React.Requireable; + formatPlural: React.Requireable; + formatMessage: React.Requireable; + formatHTMLMessage: React.Requireable; } + interface IntlShape extends IntlConfig, IntlFormat, React.Requireable { + now: React.Requireable; + } + + const intlShape: IntlShape; + interface InjectedIntl { formatDate: (date: Date, options?: FormattedDate.PropsBase) => string; formatTime: (date: Date, options?: FormattedTime.PropsBase) => string; - formatRelative: (value: number, options?: FormattedRelative.PropsBase) => string; + formatRelative: (value: number, options?: FormattedRelative.PropsBase & { now?: any }) => string; formatNumber: (value: number, options?: FormattedNumber.PropsBase) => string; - formatPlural: (value: number, options?: FormattedPlural.PropsBase) => string; - formatMessage: (messageDescriptor: FormattedMessage.MessageDescriptor, values?: Object) => string; - formatHTMLMessage: (messageDescriptor: FormattedMessage.MessageDescriptor, values?: Object) => string; + formatPlural: (value: number, options?: FormattedPlural.Base) => keyof FormattedPlural.PropsBase; + formatMessage: (messageDescriptor: FormattedMessage.MessageDescriptor, values?: Values) => string; + formatHTMLMessage: (messageDescriptor: FormattedMessage.MessageDescriptor, values?: Values) => string; + locale: string; + formats: any; + messages: { [id: string]: string }; + defaultLocale: string; + defaultFormats: any; + now : () => number; } interface InjectedIntlProps { - intl: InjectedIntl + intl: InjectedIntl; } namespace IntlComponent { - interface DateTimeFormatProps { - /* - * one of "best fit" (default) | "lookup" - */ - localeMatcher?: string; - /* - * one of "basic" (default) | "best fit" - */ - formatMatcher?: string; - timeZone?: string, - hour12?: boolean; - /* - * one of "narrow" (default) | "short" | "long" - */ - weekday?: string; - /* - * one of "narrow" (default) | "short" | "long" - */ - era?: string; - /* - * one of "numeric" (default) | "2-digit" - */ - year?: string; - /* - * one of "numeric" (default) | "2-digit" | "narrow" | "short" | "long" - */ - month?: string; - /* - * one of "numeric" (default) | "2-digit" - */ - day?: string; - /* - * one of "numeric" (default) | "2-digit" - */ - hour?: string; - /* - * one of "numeric" (default) | "2-digit" - */ - minute?: string; - /* - * one of "numeric" (default) | "2-digit" - */ - second?: string; - /* - * one of "short" (default) | "long" - */ - timeZoneName?: string; + interface DateTimeFormatProps extends Intl.DateTimeFormatOptions { + format?: string; } } - namespace FormattedDate { - export interface PropsBase extends IntlComponent.DateTimeFormatProps { - format?: string; - } + export interface PropsBase extends IntlComponent.DateTimeFormatProps {} export interface Props extends PropsBase { value: Date; } } + class FormattedDate extends React.Component { } - namespace FormattedTime { - export interface PropsBase extends IntlComponent.DateTimeFormatProps { - format?: string; - } + export interface PropsBase extends IntlComponent.DateTimeFormatProps {} export interface Props extends PropsBase { value: Date; @@ -126,17 +109,16 @@ declare namespace ReactIntl { } class FormattedTime extends React.Component { } - namespace FormattedRelative { export interface PropsBase { /* - * one of "second", "minute", "hour", "day", "month" or "year" - */ - units?: string; + * one of "second", "minute", "hour", "day", "month" or "year" + */ + units?: "second" | "minute" | "hour" | "day" | "month" | "year"; /* - * one of "best fit" (default) | "numeric" - */ - style?: string; + * one of "best fit" (default) | "numeric" + */ + style?: "best-fit" | "numeric"; format?: string; updateInterval?: number; initialNow?: any; @@ -146,8 +128,8 @@ declare namespace ReactIntl { value: number; } } - class FormattedRelative extends React.Component { } + class FormattedRelative extends React.Component { } namespace FormattedMessage { export interface MessageDescriptor { @@ -157,38 +139,17 @@ declare namespace ReactIntl { } export interface Props extends MessageDescriptor { - values?: Object; + values?: Values; tagName?: string; } } class FormattedMessage extends React.Component { } - class FormattedHTMLMessage extends React.Component { } - namespace FormattedNumber { - export interface PropsBase { + export interface PropsBase extends Intl.NumberFormatOptions { format?: string; - /* - * one of "best fit" (default) | "lookup" - */ - localeMatcher?: string; - /* - * one of "decimal" (default) | "currency" | "percent" - */ - style?: string; - currency?: string, - /* - * one of "symbol" (default) | "code" | "name" - */ - currencyDisplay?: string; - useGrouping?: boolean; - minimumIntegerDigits?: number; - minimumFractionDigits?: number; - maximumFractionDigits?: number; - minimumSignificantDigits?: number; - maximumSignificantDigits?: number; } export interface Props extends PropsBase { @@ -199,11 +160,14 @@ declare namespace ReactIntl { namespace FormattedPlural { - export interface PropsBase { + export interface Base { /* - * one of "cardinal" (default) | "ordinal" - */ - style?: string; + * one of "cardinal" (default) | "ordinal" + */ + style?: "cardinal" | "ordinal"; + } + + export interface PropsBase extends Base { other?: any; zero?: any; one?: any; @@ -222,20 +186,18 @@ declare namespace ReactIntl { namespace IntlProvider { export interface Props { locale?: string; - formats?: Object; - messages?: Object; + formats?: any; + messages?: any; defaultLocale?: string; - defaultFormats?: Object; + defaultFormats?: any; } } + class IntlProvider extends React.Component { getChildContext(): { intl: InjectedIntl; } } - - class LocaleData extends Array { - } } declare module "react-intl" { @@ -243,1166 +205,1166 @@ declare module "react-intl" { } declare module "react-intl/locale-data/af" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/agq" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/ak" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/am" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/ar" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/as" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/asa" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/ast" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/az" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/bas" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/be" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/bem" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/bez" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/bg" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/bh" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/bm" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/bn" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/bo" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/br" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/brx" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/bs" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/ca" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/ce" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/cgg" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/chr" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/ckb" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/cs" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/cu" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/cy" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/da" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/dav" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/de" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/dje" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/dsb" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/dua" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/dv" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/dyo" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/dz" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/ebu" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/ee" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/el" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/en" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/eo" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/es" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/et" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/eu" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/ewo" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/fa" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/ff" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/fi" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/fil" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/fo" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/fr" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/fur" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/fy" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/ga" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/gd" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/gl" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/gsw" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/gu" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/guw" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/guz" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/gv" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/ha" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/haw" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/he" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/hi" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/hr" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/hsb" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/hu" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/hy" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/id" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/ig" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/ii" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/in" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/is" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/it" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/iu" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/iw" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/ja" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/jbo" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/jgo" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/ji" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/jmc" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/jv" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/jw" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/ka" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/kab" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/kaj" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/kam" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/kcg" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/kde" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/kea" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/khq" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/ki" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/kk" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/kkj" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/kl" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/kln" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/km" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/kn" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/ko" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/kok" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/ks" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/ksb" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/ksf" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/ksh" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/ku" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/kw" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/ky" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/lag" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/lb" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/lg" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/lkt" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/ln" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/lo" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/lrc" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/lt" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/lu" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/luo" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/luy" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/lv" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/mas" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/mer" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/mfe" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/mg" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/mgh" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/mgo" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/mk" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/ml" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/mn" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/mo" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/mr" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/ms" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/mt" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/mua" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/my" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/mzn" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/nah" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/naq" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/nb" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/nd" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/ne" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/nl" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/nmg" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/nn" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/nnh" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/no" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/nqo" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/nr" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/nso" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/nus" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/ny" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/nyn" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/om" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/or" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/os" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/pa" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/pap" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/pl" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/prg" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/ps" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/pt" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/qu" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/rm" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/rn" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/ro" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/rof" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/ru" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/rw" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/rwk" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/sah" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/saq" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/sbp" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/sdh" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/se" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/seh" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/ses" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/sg" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/sh" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/shi" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/si" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/sk" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/sl" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/sma" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/smi" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/smj" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/smn" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/sms" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/sn" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/so" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/sq" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/sr" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/ss" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/ssy" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/st" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/sv" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/sw" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/syr" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/ta" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/te" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/teo" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/th" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/ti" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/tig" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/tk" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/tl" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/tn" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/to" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/tr" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/ts" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/twq" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/tzm" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/ug" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/uk" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/ur" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/uz" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/vai" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/ve" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/vi" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/vo" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/vun" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/wa" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/wae" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/wo" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/xh" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/xog" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/yav" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/yi" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/yo" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/zgh" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/zh" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } declare module "react-intl/locale-data/zu" { - var data: ReactIntl.LocaleData; + const data: ReactIntl.LocaleData; export = data; } diff --git a/types/react-intl/react-intl-tests.tsx b/types/react-intl/react-intl-tests.tsx index 3165b0583e..55528a385e 100644 --- a/types/react-intl/react-intl-tests.tsx +++ b/types/react-intl/react-intl-tests.tsx @@ -11,7 +11,6 @@ import { InjectedIntl, InjectedIntlProps, addLocaleData, - hasLocaleData, injectIntl, intlShape, defineMessages, @@ -27,13 +26,12 @@ import { import reactIntlEn = require("react-intl/locale-data/en"); addLocaleData(reactIntlEn); -console.log(hasLocaleData("en")); interface SomeComponentProps { className: string } -const SomeFunctionalComponentWithIntl = injectIntl(({ +const SomeFunctionalComponentWithIntl: React.ComponentClass = injectIntl(({ intl: { formatDate, formatHTMLMessage, @@ -41,7 +39,9 @@ const SomeFunctionalComponentWithIntl = injectIntl(({ formatMessage, formatPlural, formatRelative, - formatTime + formatTime, + locale, + defaultLocale }, className }) => { @@ -49,7 +49,7 @@ const SomeFunctionalComponentWithIntl = injectIntl(({ const formattedTime = formatTime(new Date(), { format: "short" }); const formattedRelative = formatRelative(new Date().getTime(), { format: "short" }); const formattedNumber = formatNumber(123, { format: "short" }); - const formattedPlural = formatPlural(1, { one: "hai!" }); + const formattedPlural = formatPlural(1, { style: "ordinal" }); const formattedMessage = formatMessage({ id: "hello", defaultMessage: "Hello {name}!" }, { name: "Roger" }); const formattedHTMLMessage = formatHTMLMessage({ id: "hello", defaultMessage: "Hello {name}!" }, { name: "Roger" }); return ( @@ -62,13 +62,13 @@ class SomeComponent extends React.Component = { intl: intlShape.isRequired }; - public render(): React.ReactElement<{}> { + render(): React.ReactElement<{}> { const intl = this.props.intl; const formattedDate = intl.formatDate(new Date(), { format: "short" }); const formattedTime = intl.formatTime(new Date(), { format: "short" }); const formattedRelative = intl.formatRelative(new Date().getTime(), { format: "short" }); const formattedNumber = intl.formatNumber(123, { format: "short" }); - const formattedPlural = intl.formatPlural(1, { one: "hai!" }); + const formattedPlural = intl.formatPlural(1, { style: "ordinal" }); const formattedMessage = intl.formatMessage({ id: "hello", defaultMessage: "Hello {name}!" }, { name: "Roger" }); const formattedHTMLMessage = intl.formatHTMLMessage({ id: "hello", defaultMessage: "Hello {name}!" }, { name: "Roger" }); return

@@ -171,7 +171,7 @@ class SomeComponent extends React.Component { - public render(): React.ReactElement<{}> { + render(): React.ReactElement<{}> { const definedMessages = defineMessages({ "sup": { id: "sup", diff --git a/types/react-intl/tsconfig.json b/types/react-intl/tsconfig.json index 48c75940b2..efc84e3fd3 100644 --- a/types/react-intl/tsconfig.json +++ b/types/react-intl/tsconfig.json @@ -21,4 +21,4 @@ "noEmit": true, "forceConsistentCasingInFileNames": true } -} \ No newline at end of file +} diff --git a/types/react-joyride/index.d.ts b/types/react-joyride/index.d.ts index 1a6d674ed4..ebc086770b 100644 --- a/types/react-joyride/index.d.ts +++ b/types/react-joyride/index.d.ts @@ -130,7 +130,7 @@ interface Props { /** * It will be called when the tour's state changes. */ - callback?: (options: any) => void; + callback?(options: any): void; } export interface Step { diff --git a/types/react-joyride/react-joyride-tests.tsx b/types/react-joyride/react-joyride-tests.tsx index 9674560f5e..68e11ba94c 100644 --- a/types/react-joyride/react-joyride-tests.tsx +++ b/types/react-joyride/react-joyride-tests.tsx @@ -52,4 +52,3 @@ class NewComponent extends React.Component { }); } } - diff --git a/types/react-json-pretty/index.d.ts b/types/react-json-pretty/index.d.ts index bf165faaf5..00f3f8b4ff 100644 --- a/types/react-json-pretty/index.d.ts +++ b/types/react-json-pretty/index.d.ts @@ -14,9 +14,7 @@ declare const JSONPretty: JSONPretty; type JSONPretty = ComponentClass; declare namespace JSONPretty { - - export interface JSONPrettyProps extends HTMLProps { + interface JSONPrettyProps extends HTMLProps { json: {} | string; } - } diff --git a/types/react-leaflet/index.d.ts b/types/react-leaflet/index.d.ts index eff286623a..9414e11f77 100644 --- a/types/react-leaflet/index.d.ts +++ b/types/react-leaflet/index.d.ts @@ -11,62 +11,61 @@ import * as React from 'react'; // which already declares things with some of the same names interface LeafletLayerEvents { - onbaselayerchange?: (event: Leaflet.LayersControlEvent) => void; - onoverlayadd?: (event: Leaflet.LayersControlEvent) => void; - onoverlayremove?: (event: Leaflet.LayersControlEvent) => void; - onlayeradd?: (event: Leaflet.LayerEvent) => void; - onlayerremove?: (event: Leaflet.LayerEvent) => void; + onbaselayerchange?(event: Leaflet.LayersControlEvent): void; + onoverlayadd?(event: Leaflet.LayersControlEvent): void; + onoverlayremove?(event: Leaflet.LayersControlEvent): void; + onlayeradd?(event: Leaflet.LayerEvent): void; + onlayerremove?(event: Leaflet.LayerEvent): void; } interface LeafletMapStateChangeEvents { - onzoomlevelschange?: (event: Leaflet.Event) => void; - onresize?: (event: Leaflet.ResizeEvent) => void; - onunload?: (event: Leaflet.Event) => void; - onviewreset?: (event: Leaflet.Event) => void; - onload?: (event: Leaflet.Event) => void; - onzoomstart?: (event: Leaflet.Event) => void; - onmovestart?: (event: Leaflet.Event) => void; - onzoom?: (event: Leaflet.Event) => void; - onmove?: (event: Leaflet.Event) => void; - onzoomend?: (event: Leaflet.Event) => void; - onmoveend?: (event: Leaflet.Event) => void; + onzoomlevelschange?(event: Leaflet.Event): void; + onresize?(event: Leaflet.ResizeEvent): void; + onunload?(event: Leaflet.Event): void; + onviewreset?(event: Leaflet.Event): void; + onload?(event: Leaflet.Event): void; + onzoomstart?(event: Leaflet.Event): void; + onmovestart?(event: Leaflet.Event): void; + onzoom?(event: Leaflet.Event): void; + onmove?(event: Leaflet.Event): void; + onzoomend?(event: Leaflet.Event): void; + onmoveend?(event: Leaflet.Event): void; } interface LeafletPopupEvents { - onpopupopen?: (event: Leaflet.PopupEvent) => void; - onpopupclose?: (event: Leaflet.PopupEvent) => void; - onautopanstart?: (event: Leaflet.Event) => void; + onpopupopen?(event: Leaflet.PopupEvent): void; + onpopupclose?(event: Leaflet.PopupEvent): void; + onautopanstart?(event: Leaflet.Event): void; } interface LeafletTooltipEvents { - ontooltipopen?: (event: Leaflet.TooltipEvent) => void; - ontooltipclose?: (event: Leaflet.TooltipEvent) => void; + ontooltipopen?(event: Leaflet.TooltipEvent): void; + ontooltipclose?(event: Leaflet.TooltipEvent): void; } interface LeafletLocationEvents { - onlocationerror?: (event: Leaflet.ErrorEvent) => void; - onlocationfound?: (event: Leaflet.LocationEvent) => void; + onlocationerror?(event: Leaflet.ErrorEvent): void; + onlocationfound?(event: Leaflet.LocationEvent): void; } interface LeafletInteractionEvents { - onclick?: (event: Leaflet.MouseEvent) => void; - ondblclick?: (event: Leaflet.MouseEvent) => void; - onmousedown?: (event: Leaflet.MouseEvent) => void; - onmouseup?: (event: Leaflet.MouseEvent) => void; - onmouseover?: (event: Leaflet.MouseEvent) => void; - onmouseout?: (event: Leaflet.MouseEvent) => void; - onmousemove?: (event: Leaflet.MouseEvent) => void; - oncontextmenu?: (event: Leaflet.MouseEvent) => void; - onkeypress?: (event: Leaflet.KeyboardEvent) => void; - onpreclick?: (event: Leaflet.MouseEvent) => void; + onclick?(event: Leaflet.MouseEvent): void; + ondblclick?(event: Leaflet.MouseEvent): void; + onmousedown?(event: Leaflet.MouseEvent): void; + onmouseup?(event: Leaflet.MouseEvent): void; + onmouseover?(event: Leaflet.MouseEvent): void; + onmouseout?(event: Leaflet.MouseEvent): void; + onmousemove?(event: Leaflet.MouseEvent): void; + oncontextmenu?(event: Leaflet.MouseEvent): void; + onkeypress?(event: Leaflet.KeyboardEvent): void; + onpreclick?(event: Leaflet.MouseEvent): void; } interface LeafletOtherEvents { - onzoomanim?: (event: Leaflet.ZoomAnimEvent) => void; + onzoomanim?(event: Leaflet.ZoomAnimEvent): void; } interface LeafletDraggingEvents { - ondragstart?: (event: Leaflet.Event) => void; - onmovestart?: (event: Leaflet.Event) => void; - ondrag?: (event: Leaflet.Event) => void; - ondragend?: (event: Leaflet.DragEndEvent) => void; - onmoveend?: (event: Leaflet.Event) => void; + ondragstart?(event: Leaflet.Event): void; + onmovestart?(event: Leaflet.Event): void; + ondrag?(event: Leaflet.Event): void; + ondragend?(event: Leaflet.DragEndEvent): void; + onmoveend?(event: Leaflet.Event): void; } - interface MapProps extends React.HTMLProps, LeafletLayerEvents, LeafletMapStateChangeEvents, LeafletPopupEvents, LeafletTooltipEvents, LeafletLocationEvents, LeafletInteractionEvents, LeafletOtherEvents, Leaflet.MapOptions { animate?: boolean; @@ -78,36 +77,33 @@ interface MapProps extends React.HTMLProps, id?: string; } -declare type Map = React.ComponentClass; -declare const Map: Map; +type Map = React.ComponentClass; +export const Map: Map; interface MapInstance extends React.Component { leafletElement: Leaflet.Map; } - interface PaneProps { name?: string; style?: React.CSSProperties; className?: string; } -declare const Pane: React.ComponentClass; - +export const Pane: React.ComponentClass; // There is no Layer class, these are the base props for all layers on the map interface LayerProps extends LeafletInteractionEvents { - onadd?: (event: Leaflet.Event) => void; - onremove?: (event: Leaflet.Event) => void; + onadd?(event: Leaflet.Event): void; + onremove?(event: Leaflet.Event): void; // Popup events - onpopupopen?: (event: Leaflet.PopupEvent) => void; - onpopupclose?: (event: Leaflet.PopupEvent) => void; + onpopupopen?(event: Leaflet.PopupEvent): void; + onpopupclose?(event: Leaflet.PopupEvent): void; // Tooltip events - ontooltipopen?: (event: Leaflet.TooltipEvent) => void; - ontooltipclose?: (event: Leaflet.TooltipEvent) => void; + ontooltipopen?(event: Leaflet.TooltipEvent): void; + ontooltipclose?(event: Leaflet.TooltipEvent): void; } - interface MarkerProps extends LayerProps, LeafletDraggingEvents { position: Leaflet.LatLngExpression; draggable?: boolean; @@ -115,7 +111,7 @@ interface MarkerProps extends LayerProps, LeafletDraggingEvents { zIndexOffset?: number; opacity?: number; } -declare const Marker: React.ComponentClass; +export const Marker: React.ComponentClass; interface MarkerInstance extends React.Component { leafletElement: Leaflet.Marker; } @@ -123,101 +119,97 @@ interface MarkerInstance extends React.Component { interface PopupProps extends LayerProps, Leaflet.PopupOptions { position?: Leaflet.LatLngExpression; } -declare const Popup: React.ComponentClass; +export const Popup: React.ComponentClass; // tslint:disable-next-line:no-empty-interface interface TooltipProps extends LayerProps, Leaflet.TooltipOptions { } -declare const Tooltip: React.ComponentClass; +export const Tooltip: React.ComponentClass; interface GridLayerProps extends LayerProps { opacity?: number; zIndex?: number; - onloading?: (event: Leaflet.Event) => void; - ontileunload?: (event: Leaflet.TileEvent) => void; - ontileloadstart?: (event: Leaflet.TileEvent) => void; - ontileerror?: (event: Leaflet.TileErrorEvent) => void; - ontileload?: (event: Leaflet.TileEvent) => void; - onload?: (event: Leaflet.Event) => void; + onloading?(event: Leaflet.Event): void; + ontileunload?(event: Leaflet.TileEvent): void; + ontileloadstart?(event: Leaflet.TileEvent): void; + ontileerror?(event: Leaflet.TileErrorEvent): void; + ontileload?(event: Leaflet.TileEvent): void; + onload?(event: Leaflet.Event): void; } -declare const GridLayer: React.ComponentClass; +export const GridLayer: React.ComponentClass; interface TileLayerProps extends GridLayerProps, Leaflet.TileLayerOptions { url: string; } -declare const TileLayer: React.ComponentClass; +export const TileLayer: React.ComponentClass; interface ImageOverlayProps extends LayerProps, LeafletInteractionEvents { url: string; opacity?: string; } -declare const ImageOverlay: React.ComponentClass; +export const ImageOverlay: React.ComponentClass; interface WMSTileLayerProps extends TileLayerProps { url: string; } -declare const WMSTileLayer: React.ComponentClass; +export const WMSTileLayer: React.ComponentClass; // Path is an abstract class // tslint:disable-next-line:no-empty-interface interface PathProps extends LeafletLayerEvents, LeafletInteractionEvents, Leaflet.PathOptions { } - interface CircleProps extends PathProps { center: Leaflet.LatLngExpression; radius?: number; } -declare const Circle: React.ComponentClass; +export const Circle: React.ComponentClass; interface CircleMarkerProps extends PathProps { center: Leaflet.LatLngExpression; radius?: number; } -declare const CircleMarker: React.ComponentClass; +export const CircleMarker: React.ComponentClass; interface PolylineProps extends PathProps { positions: Leaflet.LatLngExpression[] | Leaflet.LatLngExpression[][]; } -declare const Polyline: React.ComponentClass; +export const Polyline: React.ComponentClass; interface PolygonProps extends PathProps { positions: Leaflet.LatLngExpression[] | Leaflet.LatLngExpression[][] | Leaflet.LatLngExpression[][][]; } -declare const Polygon: React.ComponentClass; +export const Polygon: React.ComponentClass; interface RectangleProps extends PathProps { bounds: Leaflet.LatLngBoundsExpression; } -declare const Rectangle: React.ComponentClass; - +export const Rectangle: React.ComponentClass; // tslint:disable-next-line:no-empty-interface interface LayerGroupProps extends LayerProps { } -declare const LayerGroup: React.ComponentClass; +export const LayerGroup: React.ComponentClass; // tslint:disable-next-line:no-empty-interface interface FeatureGroupProps extends LayerGroupProps, Leaflet.PathOptions { } -declare const FeatureGroup: React.ComponentClass; +export const FeatureGroup: React.ComponentClass; -interface GeoJSONProps extends FeatureGroupProps { +interface GeoJSONProps extends FeatureGroupProps, Leaflet.GeoJSONOptions { data: GeoJSON.GeoJsonObject; } -declare const GeoJSON: React.ComponentClass; - - +export const GeoJSON: React.ComponentClass; interface AttributionControlProps { position?: Leaflet.ControlPosition; } -declare const AttributionControl: React.ComponentClass; +export const AttributionControl: React.ComponentClass; interface LayersControlProps { position?: Leaflet.ControlPosition; } -declare const LayersControl: React.ComponentClass & { BaseLayer: LayersControl.BaseLayer, Overlay: LayersControl.Overlay }; +export const LayersControl: React.ComponentClass & { BaseLayer: LayersControl.BaseLayer, Overlay: LayersControl.Overlay }; -declare namespace LayersControl { +export namespace LayersControl { interface LayersControlLayerProps { name: string; checked?: boolean; @@ -226,12 +218,19 @@ declare namespace LayersControl { type Overlay = React.ComponentClass; } +interface MapControlProps { + position?: Leaflet.ControlPosition; +} +export class MapControl extends React.Component { + leafletElement?: L.Control; +} + interface ScaleControlProps { position: Leaflet.ControlPosition; } -declare const ScaleControl: React.ComponentClass; +export const ScaleControl: React.ComponentClass; interface ZoomControlProps { position: Leaflet.ControlPosition; } -declare const ZoomControl: React.ComponentClass; +export const ZoomControl: React.ComponentClass; diff --git a/types/react-leaflet/react-leaflet-tests.tsx b/types/react-leaflet/react-leaflet-tests.tsx index 763e719de1..7646109d69 100644 --- a/types/react-leaflet/react-leaflet-tests.tsx +++ b/types/react-leaflet/react-leaflet-tests.tsx @@ -1,4 +1,5 @@ import * as React from 'react'; +import * as ReactDOM from 'react-dom'; import * as Leaflet from 'leaflet'; import { Component, PropTypes } from 'react'; import { @@ -8,6 +9,8 @@ import { LayerGroup, LayersControl, Map, + MapControl, + MapControlProps, MapInstance, Marker, MarkerInstance, @@ -187,7 +190,7 @@ export class MarkerWithDivIconExample extends Component { new Leaflet.DivIcon({}) }/> - ) + ); } } @@ -599,3 +602,66 @@ const ZoomControlExample = () => ( ); + +// MapControl https://github.com/PaulLeCam/react-leaflet/issues/130 +const mapControlCenter: [number, number] = [51.505, -0.09]; +class CenterControl extends MapControl { // note we're extending MapControl from react-leaflet, not Component from react + componentWillMount() { + const centerControl = new L.Control({position: this.props.position}); // see http://leafletjs.com/reference.html#control-positions for other positions + const jsx = ( + // PUT YOUR JSX FOR THE COMPONENT HERE: +
+ // add your JSX +
+ ); + + centerControl.onAdd = (map) => { + let div = L.DomUtil.create('div', ''); + ReactDOM.render(jsx, div); + return div; + }; + + this.leafletElement = centerControl; + } +} +const CenterControlExample = () => ( + + + +); + +class LegendControl extends MapControl { + componentWillMount() { + const legend = new L.Control({position: this.props.position}); + const jsx = ( +
+ {this.props.children} +
+ ); + + legend.onAdd = (map) => { + let div = L.DomUtil.create('div', ''); + ReactDOM.render(jsx, div); + return div; + }; + + this.leafletElement = legend; + } +} + +const LegendControlExample = () => ( + + + +
    +
  • Strong Support
  • +
  • Weak Support
  • +
  • Weak Oppose
  • +
  • Strong Oppose
  • +
+
+
+); diff --git a/types/react-maskedinput/index.d.ts b/types/react-maskedinput/index.d.ts index 6602240c67..e5e49a5140 100644 --- a/types/react-maskedinput/index.d.ts +++ b/types/react-maskedinput/index.d.ts @@ -14,20 +14,18 @@ declare const MaskedInput: MaskedInput; type MaskedInput = ComponentClass; declare namespace MaskedInput { - - export interface FormatCharacter { + interface FormatCharacter { validate(char: string): string; transform?(char: string): string; } - export interface CharsFormatters { + interface CharsFormatters { [char: string]: FormatCharacter; } - export interface MaskedInputProps extends HTMLAttributes { + interface MaskedInputProps extends HTMLAttributes { mask: string; formatCharacter?: CharsFormatters; placeholderChar?: string; } } - diff --git a/types/react-modal/index.d.ts b/types/react-modal/index.d.ts index afec7250e2..bb158bc6be 100644 --- a/types/react-modal/index.d.ts +++ b/types/react-modal/index.d.ts @@ -11,7 +11,7 @@ export as namespace ReactModal; export = ReactModal; declare namespace ReactModal { - export interface Styles { + interface Styles { content?: { [key: string]: any; }; @@ -20,7 +20,7 @@ declare namespace ReactModal { }; } - export interface Props { + interface Props { /* Boolean describing if the modal should be shown or not. Defaults to false. */ isOpen: boolean; /* Object indicating styles to be used for the modal, divided into overlay and content styles. */ @@ -28,9 +28,9 @@ declare namespace ReactModal { /* Set this to properly hide your application from assistive screenreaders and other assistive technologies while the modal is open. */ appElement?: HTMLElement | {}; /* Function that will be run after the modal has opened. */ - onAfterOpen?: () => void; + onAfterOpen?(): void; /* Function that will be run when the modal is requested to be closed, prior to actually closing. */ - onRequestClose?: (event: (MouseEvent | KeyboardEvent)) => void; + onRequestClose?(event: (MouseEvent | KeyboardEvent)): void; /* Number indicating the milliseconds to wait before closing the modal. Defaults to zero (no timeout). */ closeTimeoutMS?: number; /* Boolean indicating if the appElement should be hidden. Defaults to true. */ @@ -48,7 +48,7 @@ declare namespace ReactModal { /* String indicating the role of the modal, allowing the 'dialog' role to be applied if desired. */ role?: string; /* Function that will be called to get the parent element that the modal will be attached to. */ - parentSelector?: () => HTMLElement; + parentSelector?(): HTMLElement; } } diff --git a/types/react-modal/react-modal-tests.tsx b/types/react-modal/react-modal-tests.tsx index c8e50a3057..51cdffba0a 100644 --- a/types/react-modal/react-modal-tests.tsx +++ b/types/react-modal/react-modal-tests.tsx @@ -3,9 +3,9 @@ import * as ReactModal from 'react-modal'; class ExampleOfUsingReactModal extends React.Component<{}, {}> { render() { - var onAfterOpenFn = () => { }; - var onRequestCloseFn = () => { }; - var customStyle = { + const onAfterOpenFn = () => { }; + const onRequestCloseFn = () => { }; + const customStyle = { overlay: { position: 'fixed', top: 0, @@ -27,7 +27,6 @@ class ExampleOfUsingReactModal extends React.Component<{}, {}> { borderRadius: '4px', outline: 'none', padding: '20px' - } }; return ( @@ -43,4 +42,4 @@ class ExampleOfUsingReactModal extends React.Component<{}, {}> { ); } -}; +} diff --git a/types/react-native-datepicker/index.d.ts b/types/react-native-datepicker/index.d.ts index 232f2f56d1..ab3831dde8 100644 --- a/types/react-native-datepicker/index.d.ts +++ b/types/react-native-datepicker/index.d.ts @@ -18,9 +18,9 @@ interface DatePickerProps { cancelBtnText?: string; showIcon?: boolean; disabled?: boolean; - onDateChange?: (dateStr: string, date: Date) => void; + onDateChange?(dateStr: string, date: Date): void; placeholder?: string; - modalOnResponderTerminationRequest?: (e: any) => boolean; + modalOnResponderTerminationRequest?(e: any): boolean; is24Hour?: boolean; style?: any; customStyles?: any; diff --git a/types/react-native-datepicker/react-native-datepicker-tests.tsx b/types/react-native-datepicker/react-native-datepicker-tests.tsx index 22af7674d8..cce86882f8 100644 --- a/types/react-native-datepicker/react-native-datepicker-tests.tsx +++ b/types/react-native-datepicker/react-native-datepicker-tests.tsx @@ -39,4 +39,3 @@ export default class MyDatePicker extends React.Component<{}, MyDatePickerState> ); } } - diff --git a/types/react-native-fs/react-native-fs-tests.ts b/types/react-native-fs/react-native-fs-tests.ts index a006086a9a..85a623b82e 100644 --- a/types/react-native-fs/react-native-fs-tests.ts +++ b/types/react-native-fs/react-native-fs-tests.ts @@ -1,6 +1,5 @@ import * as RNFS from 'react-native-fs'; - // get a list of files and directories in the main bundle RNFS.readDir(RNFS.MainBundlePath) // On Android, use "RNFS.DocumentDirectoryPath" (MainBundlePath is not defined) .then((result) => { @@ -26,7 +25,7 @@ RNFS.readDir(RNFS.MainBundlePath) // On Android, use "RNFS.DocumentDirectoryPath }); // create a path you want to write to -var path = RNFS.DocumentDirectoryPath + '/test.txt'; +const path = RNFS.DocumentDirectoryPath + '/test.txt'; // write the file RNFS.writeFile(path, 'Lorem ipsum dolor sit amet', 'utf8') @@ -46,9 +45,9 @@ RNFS.unlink('path') console.log(err.message); }); -var uploadUrl = 'http://requestb.in/XXXXXXX'; // For testing purposes, go to http://requestb.in/ and create your own link +const uploadUrl = 'http://requestb.in/XXXXXXX'; // For testing purposes, go to http://requestb.in/ and create your own link // create an array of objects of the files you want to upload -var files = [ +const files = [ { name: 'test1', filename: 'test1.w4a', @@ -62,13 +61,13 @@ var files = [ } ]; -var uploadBegin: RNFS.UploadCallbackBegin = (response) => { - var jobId = response.jobId; +const uploadBegin: RNFS.UploadCallbackBegin = (response) => { + const jobId = response.jobId; console.log('UPLOAD HAS BEGUN! JobId: ' + jobId); }; -var uploadProgress: RNFS.UploadCallbackProgress = (response) => { - var percentage = Math.floor((response.totalBytesSent / response.totalBytesExpectedToSend) * 100); +const uploadProgress: RNFS.UploadCallbackProgress = (response) => { + const percentage = Math.floor((response.totalBytesSent / response.totalBytesExpectedToSend) * 100); console.log('UPLOAD IS ' + percentage + '% DONE!'); }; @@ -99,13 +98,13 @@ RNFS.uploadFiles({ console.log(err); }); -var downloadProgress: RNFS.DownloadCallbackProgress = (result) => { +const downloadProgress: RNFS.DownloadCallbackProgress = (result) => { result.bytesWritten === 0; result.contentLength > 10; result.jobId; }; -var downloadBegin: RNFS.DownloadCallbackBegin = (result) => { +const downloadBegin: RNFS.DownloadCallbackBegin = (result) => { result.headers === {}; }; diff --git a/types/react-native-google-analytics-bridge/index.d.ts b/types/react-native-google-analytics-bridge/index.d.ts new file mode 100644 index 0000000000..1edf5514e2 --- /dev/null +++ b/types/react-native-google-analytics-bridge/index.d.ts @@ -0,0 +1,234 @@ +// Type definitions for react-native-google-analytics-bridge 5.0 +// Project: https://github.com/idehub/react-native-google-analytics-bridge +// Definitions by: Huhuanming +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export class GoogleAnalyticsTracker { + /** + * Save all tracker related data that is needed to call native methods with proper data. + * @param trackerId {String} + * @param customDimensionsFieldsIndexMap {{fieldName: fieldIndex}} Custom dimensions field/index pairs + */ + constructor(trackerId: string, customDimensionsFieldsIndexMap?: {}) + + /** + * If Tracker has customDimensionsFieldsIndexMap, it will transform + * customDimensions map pairs {field: value} to {fieldIndex: value}. + * Otherwise customDimensions are passed trough untouched. + * Underlay native methods will transform provided customDimensions map to expected format. + * Google analytics expect dimensions to be tracker with 'dimension{index}' keys, + * not dimension field names. + * @param customDimensions {Object} + * @returns {Object} + */ + transformCustomDimensionsFieldsToIndexes(customDimensions: {}): void; + + /** + * Track the current screen/view + * @param {String} screenName The name of the current screen + */ + trackScreenView(screenName: string): void; + + /** + * Track an event that has occured + * @param {String} category The event category + * @param {String} action The event action + * @param {Object} optionalValues An object containing optional label and value + */ + trackEvent(category: string, action: string, optionalValues?: {}): void; + + /** + * Track the current screen/view with custom dimension values + * @param {String} screenName The name of the current screen + * @param {Object} customDimensionValues An object containing custom dimension key/value pairs + */ + trackScreenViewWithCustomDimensionValues(screenName: string, customDimensionValues: {}): void; + + /** + * Track an event that has occured with custom dimension values + * @param {String} category The event category + * @param {String} action The event action + * @param {Object} optionalValues An object containing optional label and value + * @param {Object} customDimensionValues An object containing custom dimension key/value pairs + */ + trackEventWithCustomDimensionValues( + category: string, + action: string, + optionalValues: {}, + customDimensionValues: {}, + ): void; + + /** + * Track an event that has occured + * @param {String} category The event category + * @param {Number} value The timing measurement in milliseconds + * @param {Object} optionalValues An object containing optional name and label + */ + trackTiming(category: string, value: number, optionalValues: {}): void; + + /** + * Track a purchase event. This uses the Enhanced Ecommerce GA feature. + * @param {Object} product An object with product values + * @param {Object} transaction An object with transaction values + * @param {String} eventCategory The event category, defaults to Ecommerce + * @param {String} eventAction The event action, defaults to Purchase + */ + trackPurchaseEvent( + product: {}, + transaction: {}, + eventCategory?: string, + eventAction?: string, + ): void; + + /** + * Track a purchase event. This uses the Enhanced Ecommerce GA feature. + * @param {Array} products An array with products + * @param {Object} transaction An object with transaction values + * @param {String} eventCategory The event category, defaults to Ecommerce + * @param {String} eventAction The event action, defaults to Purchase + */ + trackMultiProductsPurchaseEvent( + products: Array<{}>, + ransaction: {}, + eventCategory?: string, + eventAction?: string + ): void; + + /** + * Track a purchase event with custom dimensions. This uses the Enhanced Ecommerce GA feature. + * @param {Array} products An array with products + * @param {Object} transaction An object with transaction values + * @param {String} eventCategory The event category, defaults to Ecommerce + * @param {String} eventAction The event action, defaults to Purchase + * @param {Object} customDimensionValues An object containing custom dimension key/value pairs + */ + trackMultiProductsPurchaseEventWithCustomDimensionValues( + products: Array<{}>, + transaction: {}, + eventCategory?: string, + eventAction?: string, + customDimensions?: {}, + ): void; + + /** + * Track an exception + * @param {String} error The description of the error + * @param {Boolean} fatal A value indiciating if the error was fatal, defaults to false + */ + trackException(error: string, fatal?: boolean): void; + + /** + * Sets the current userId for tracking. + * @param {String} userId The current userId + */ + setUser(userId: string): void; + + /** + * Sets if IDFA (identifier for advertisers) collection should be enabled + * @param {Boolean} enabled Defaults to true + */ + allowIDFA(enabled?: boolean): void; + + /** + * Track a social interaction, Facebook, Twitter, etc. + * @param {String} network + * @param {String} action + * @param {String} targetUrl + */ + trackSocialInteraction(network: string, action: string, targetUrl: string): void; + + /** + * Sets if uncaught exceptions should be tracked + * @param {Boolean} enabled + */ + setTrackUncaughtExceptions(enabled: boolean): void; + + /** + * Sets the trackers appName + * The Bundle name is used by default + * @param {String} appName + */ + setAppName(appName: string): void; + + /** + * Sets the trackers appVersion + * @param {String} appVersion + */ + setAppVersion(appVersion: string): void; + + /** + * Sets if AnonymizeIp is enabled + * If enabled the last octet of the IP address will be removed + * @param {Boolean} enabled + */ + setAnonymizeIp(enabled: string): void; + + /** + * Sets tracker sampling rate. + * @param {Float} sampleRatio Percentage 0 - 100 + */ + setSamplingRate(sampleRatio: number): void; +} + +interface GAEvent { + event: string; + payload: T; +} + +export class GoogleTagManager { + /** + * Call once to open the container for all subsequent static calls. + * @param {String} containerId + */ + static openContainerWithId(containerId: string): void; + + /** + * Retrieves a boolean value with the given key from the opened container. + * @param {String} key + */ + static boolForKey(key: string): boolean; + + /** + * Retrieves a string with the given key from the opened container. + * @param {String} key + */ + static stringForKey(key: string): string; + + /** + * Retrieves a number with the given key from the opened container. + * @param {String} key + */ + static doubleForKey(key: string): number; + + /** + * push a datalayer event for Google Analytics through Google Tag Manager. + * @param {Object} dictionary An Map containing key and value pairs. + * it must have at least one key "event" with event name + * example: {event: "eventName", pageId: "/home"} + */ + static pushDataLayerEvent(dictionary: GAEvent): void; +} + +export class GoogleAnalyticsSettings { + /** + * Sets if OptOut is active and disables Google Analytics + * This has to be set each time the App starts + * @param {Boolean} enabled + */ + static setOptOut(enabled: boolean): void; + + /** + * Sets the trackers dispatch interval + * This will influence how often batches of events, screen views, etc + * are sent to your tracker. + * @param {Number} intervalInSeconds + */ + static setDispatchInterval(intervalInSeconds: number): void; + + /** + * Sets if the tracker should have dry run enabled. + * If dry run is enabled, no analytics data will be sent to your tracker. + * @param {Boolean} enabled + */ + static setDryRun(enabled: boolean): void; +} diff --git a/types/react-native-google-analytics-bridge/react-native-google-analytics-bridge-tests.ts b/types/react-native-google-analytics-bridge/react-native-google-analytics-bridge-tests.ts new file mode 100644 index 0000000000..8e365cb01d --- /dev/null +++ b/types/react-native-google-analytics-bridge/react-native-google-analytics-bridge-tests.ts @@ -0,0 +1,27 @@ +import { + GoogleAnalyticsTracker, + GoogleTagManager, + GoogleAnalyticsSettings, +} from 'react-native-google-analytics-bridge'; + +const tracker = new GoogleAnalyticsTracker('GA_UA'); + +tracker.allowIDFA(); +tracker.allowIDFA(true); + +tracker.setAnonymizeIp('1.1.1.1'); + +tracker.setAppName('name'); + +GoogleTagManager.openContainerWithId('123'); +GoogleTagManager.boolForKey('key'); +GoogleTagManager.stringForKey('key'); +GoogleTagManager.doubleForKey('key'); +GoogleTagManager.pushDataLayerEvent({ + event: 'event', + payload: 'payload', +}); + +GoogleAnalyticsSettings.setOptOut(true); +GoogleAnalyticsSettings.setDispatchInterval(1000); +GoogleAnalyticsSettings.setDryRun(true); diff --git a/types/react-native-google-analytics-bridge/tsconfig.json b/types/react-native-google-analytics-bridge/tsconfig.json new file mode 100644 index 0000000000..38ddc86d87 --- /dev/null +++ b/types/react-native-google-analytics-bridge/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "react-native-google-analytics-bridge-tests.ts" + ] +} diff --git a/types/react-native-google-analytics-bridge/tslint.json b/types/react-native-google-analytics-bridge/tslint.json new file mode 100644 index 0000000000..ec365f164b --- /dev/null +++ b/types/react-native-google-analytics-bridge/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "../tslint.json" +} diff --git a/types/react-native-orientation/index.d.ts b/types/react-native-orientation/index.d.ts index 03139b20dd..bc36430afe 100644 --- a/types/react-native-orientation/index.d.ts +++ b/types/react-native-orientation/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for react-native-orientation +// Type definitions for react-native-orientation 5.0 // Project: https://github.com/yamill/react-native-orientation // Definitions by: Moshe Atlow // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped diff --git a/types/react-native-scrollable-tab-view/index.d.ts b/types/react-native-scrollable-tab-view/index.d.ts index 873d69855b..9ef7e5a247 100644 --- a/types/react-native-scrollable-tab-view/index.d.ts +++ b/types/react-native-scrollable-tab-view/index.d.ts @@ -23,8 +23,7 @@ export interface onChangeTabProperties { } export interface renderTabBarProperties { - - goToPage: (pageNumber: number) => void; + goToPage(pageNumber: number): void; tabs: JSX.Element; @@ -36,7 +35,6 @@ export interface renderTabBarProperties { } interface ScrollableTabViewProperties extends React.Props { - /** * tabBarPosition (String) Defaults to "top". * "bottom" to position the tab bar below content. @@ -61,13 +59,13 @@ interface ScrollableTabViewProperties extends React.Props { * an Object containing two keys: i: the index of the tab that is selected, ref: the ref of the * tab that is selected */ - onChangeTab?: (value: onChangeTabProperties) => void; + onChangeTab?(value: onChangeTabProperties): void; /** * onScroll (Function) - function to call when the pages are sliding, * should accept 1 argument which is an Float number representing the page position in the slide frame. */ - onScroll?: (value: number) => void; + onScroll?(value: number): void; /** * renderTabBar (Function:ReactComponent) - accept 1 argument props and should return a component @@ -75,7 +73,7 @@ interface ScrollableTabViewProperties extends React.Props { * and should implement setAnimationValue to be able to animate itself along with the tab content. * You can manually pass the props to the TabBar component. */ - renderTabBar?: (value: JSX.Element) => JSX.Element; + renderTabBar?(value: JSX.Element): JSX.Element; /** * style (View.propTypes.style) diff --git a/types/react-native-scrollable-tab-view/react-native-scrollable-tab-view-tests.tsx b/types/react-native-scrollable-tab-view/react-native-scrollable-tab-view-tests.tsx index 2d79537221..0fb10a4ffb 100644 --- a/types/react-native-scrollable-tab-view/react-native-scrollable-tab-view-tests.tsx +++ b/types/react-native-scrollable-tab-view/react-native-scrollable-tab-view-tests.tsx @@ -22,7 +22,6 @@ class MyText extends React.Component { } class ScrollableTabViewDemo extends React.Component<{}, {}> { - constructor(props: ScrollableTabViewDemo) { super(props); } @@ -42,4 +41,4 @@ class ScrollableTabViewDemo extends React.Component<{}, {}> { protected componentWillUnmount?(): void { } -} \ No newline at end of file +} diff --git a/types/react-native-swiper/index.d.ts b/types/react-native-swiper/index.d.ts index f41a771caf..81888289b8 100644 --- a/types/react-native-swiper/index.d.ts +++ b/types/react-native-swiper/index.d.ts @@ -10,7 +10,6 @@ import { } from 'react-native'; interface SwiperProperties extends React.Props { - horizontal?: boolean; style?: ViewStyle; @@ -49,7 +48,7 @@ interface SwiperProperties extends React.Props { index?: number; - renderPagination?: (index: number, total: number, thisObject: Swiper) => JSX.Element; + renderPagination?(index: number, total: number, thisObject: Swiper): JSX.Element; dotStyle?: ViewStyle; @@ -62,4 +61,3 @@ interface SwiperProperties extends React.Props { export default class Swiper extends React.Component { } - diff --git a/types/react-native-swiper/react-native-swiper-tests.tsx b/types/react-native-swiper/react-native-swiper-tests.tsx index fa214e18f0..7463ac0b70 100644 --- a/types/react-native-swiper/react-native-swiper-tests.tsx +++ b/types/react-native-swiper/react-native-swiper-tests.tsx @@ -7,7 +7,6 @@ import { } from 'react-native'; import Swiper from 'react-native-swiper'; - class SwiperTest extends React.Component<{}, {}> { constructor(props: {}) { super(props); @@ -60,4 +59,4 @@ const styles = StyleSheet.create({ fontSize: 30, fontWeight: 'bold' } as ViewStyle -}); \ No newline at end of file +}); diff --git a/types/react-native/index.d.ts b/types/react-native/index.d.ts index 6a833a4467..083c646be7 100644 --- a/types/react-native/index.d.ts +++ b/types/react-native/index.d.ts @@ -337,7 +337,8 @@ export interface NativeMethodsMixinStatic { } // see react-jsx.d.ts -export function createElement

(type: React.ReactType, +export function createElement

( + type: React.ReactType, props?: P, ...children: React.ReactNode[]): React.ReactElement

; @@ -1230,7 +1231,7 @@ interface TextInputState { * Unfocuses the specified text field * noop if it wasn't focused */ - blurTextInput(textFieldID?: number) : void + blurTextInput(textFieldID?: number): void } /** @@ -4165,7 +4166,7 @@ export interface LeftToRightGesture { direction: string; } -export interface JumpGesture extends LeftToRightGesture{ +export interface JumpGesture extends LeftToRightGesture { overswipe: { frictionConstant: number frictionByDistance: number @@ -5774,7 +5775,7 @@ export interface SnapshotViewIOSProperties extends ViewProperties, React.Props } @@ -7288,7 +7289,7 @@ export interface EasingStatic { inOut(easing: EasingFunction): EasingFunction; } -export module Animated { +export namespace Animated { // Most (all?) functions where AnimatedValue is used any subclass of Animated can be used as well. type AnimatedValue = Animated; type AnimatedValueXY = ValueXY; @@ -7549,7 +7550,7 @@ export module Animated { * Spring animation based on Rebound and Origami. Tracks velocity state to * create fluid motions as the `toValue` updates, and can be chained together. */ - export function spring ( + export function spring( value: AnimatedValue | AnimatedValueXY, config: SpringAnimationConfig ): CompositeAnimation; @@ -7563,7 +7564,7 @@ export module Animated { * of the animations is stopped, they will all be stopped. You can override * this with the `stopTogether` flag. */ - export function parallel ( + export function parallel( animations: Array, config?: ParallelConfig ): CompositeAnimation; @@ -7589,7 +7590,7 @@ export module Animated { * ]), *``` */ - export function event ( + export function event( argMapping: Mapping[], config?: EventConfig ): (...args: any[]) => void; @@ -7597,7 +7598,7 @@ export module Animated { /** * Make any React component Animatable. Used to create `Animated.View`, etc. */ - export function createAnimatedComponent (component: any) : any; + export function createAnimatedComponent(component: any): any; /** * Animated variants of the basic native views. Accepts Animated.Value for @@ -8417,7 +8418,7 @@ export function requireNativeComponent

( extraConfig?: {nativeOnly?: any} ): React.ComponentClass

; -export function findNodeHandle(componentOrHandle: null | number | React.Component): null | number; +export function findNodeHandle(componentOrHandle: null | number | React.Component | React.ComponentClass): null | number; export function processColor(color: any): number; diff --git a/types/react-native/test/animated.tsx b/types/react-native/test/animated.tsx index 3b3457384c..8efd5fd171 100644 --- a/types/react-native/test/animated.tsx +++ b/types/react-native/test/animated.tsx @@ -90,4 +90,4 @@ function TestAnimatedAPI() { ); -} \ No newline at end of file +} diff --git a/types/react-native/test/index.tsx b/types/react-native/test/index.tsx index f7a4abae57..45a5b510e9 100644 --- a/types/react-native/test/index.tsx +++ b/types/react-native/test/index.tsx @@ -25,22 +25,16 @@ import { View, ViewStyle, ViewPagerAndroid, + findNodeHandle } from 'react-native'; function testDimensions() { - var { + const { width, height, scale, fontScale, - } = Dimensions.get("window"); - - var { - width, - height, - scale, - fontScale, - } = Dimensions.get("screen"); + } = Dimensions.get(1 === 1 ? "window" : "screen"); } BackAndroid.addEventListener("hardwareBackPress", () => { @@ -52,7 +46,7 @@ interface LocalStyles { instructions: TextStyle; } -var styles = StyleSheet.create( +const styles = StyleSheet.create( { container: { flex: 1, @@ -95,25 +89,46 @@ const stylesAlt = StyleSheet.create( } ) +class CustomView extends React.Component<{}, {}> { + + render() { + return ( + Custom View + ); + } + +} class Welcome extends React.Component { - refs: { - [key: string]: any - rootView: View + [key: string]: any + rootView: View + customView: CustomView } testNativeMethods() { - // this.setNativeProps({}); + // this.setNativeProps({}); - const { rootView } = this.refs; + const { rootView } = this.refs; + + rootView.measure((x: number, y: number, width: number, height: number) => { + }); + + } + + testFindNodeHandle() { + + const { rootView, customView } = this.refs; + + let nativeComponentHandle = findNodeHandle(rootView); + + let customComponentHandle = findNodeHandle(customView); + + let fromHandle = findNodeHandle(customComponentHandle); - rootView.measure((x: number, y: number, width: number, height: number) => { - }); } render() { - return ( @@ -126,6 +141,7 @@ class Welcome extends React.Component { Press Cmd+R to reload,{'\n'} Cmd+D or shake for dev menu + ) } @@ -135,7 +151,7 @@ export default Welcome; // App State -function appStateListener(state : string) { +function appStateListener(state: string) { console.log('New state: ' + state); } diff --git a/types/react-native/tslint.json b/types/react-native/tslint.json index dd4e4a1cba..7bd0b4c549 100644 --- a/types/react-native/tslint.json +++ b/types/react-native/tslint.json @@ -2,6 +2,21 @@ "extends": "../tslint.json", "rules": { // Lowercase `object` is available in TypeScript 2.2 only. - "forbidden-types": false + "ban-types": false, + // Below are all TODO + "align": false, + "array-type": false, + "comment-format": false, + "interface-over-type-literal": false, + "jsdoc-format": false, + "no-misused-new": false, + "no-consecutive-blank-lines": false, + "no-empty-interface": false, + "no-padding": false, + "no-redundant-modifiers": false, + "no-var": false, + "prefer-declare-function": false, + "prefer-method-signature": false, + "semicolon": false } } diff --git a/types/react-notification-system-redux/index.d.ts b/types/react-notification-system-redux/index.d.ts index 5820a48da5..ffcda21739 100644 --- a/types/react-notification-system-redux/index.d.ts +++ b/types/react-notification-system-redux/index.d.ts @@ -15,26 +15,24 @@ export = Notifications; declare class Notifications extends Component {} declare namespace Notifications { + type NotificationsState = Notification[]; - export type NotificationsState = Notification[]; + type NotificationLevel = "error" | "warning" | "info" | "success"; - export type NotificationLevel = "error" | "warning" | "info" | "success"; + type NotificationsReducer = (state: NotificationsState, action: A) => NotificationsState; - export type NotificationsReducer = (state: NotificationsState, action: A) => NotificationsState; + type NotificationShow = (opts?: Notification) => Action; - export type NotificationShow = (opts?: Notification) => Action; - - export interface NotificationsProps extends Attributes { + interface NotificationsProps extends Attributes { notifications?: Notification[]; } - export const reducer: NotificationsReducer; + const reducer: NotificationsReducer; - export const show: (opts?: Notification, level?: NotificationLevel) => Action; - export const error: NotificationShow; - export const hide: (opts?: Notification | string | number) => Action; - export const info: NotificationShow; - export const success: NotificationShow; - export const warning: NotificationShow; + function show(opts?: Notification, level?: NotificationLevel): Action; + const error: NotificationShow; + function hide(opts?: Notification | string | number): Action; + const info: NotificationShow; + const success: NotificationShow; + const warning: NotificationShow; } - diff --git a/types/react-notification-system-redux/react-notification-system-redux-tests.tsx b/types/react-notification-system-redux/react-notification-system-redux-tests.tsx index 59f1a8404f..83c8354c83 100644 --- a/types/react-notification-system-redux/react-notification-system-redux-tests.tsx +++ b/types/react-notification-system-redux/react-notification-system-redux-tests.tsx @@ -5,7 +5,6 @@ import * as Notifications from "react-notification-system-redux"; import { reducer, show, hide, info, error, warning, success, NotificationLevel } from "react-notification-system-redux"; class Test extends React.Component { - private test() { const notification: Notification = { message : "Test" @@ -27,7 +26,6 @@ class Test extends React.Component { const notifications: Notification[] = []; return (); } - } const store: Store = createStore(reducer); diff --git a/types/react-onsenui/index.d.ts b/types/react-onsenui/index.d.ts new file mode 100644 index 0000000000..5c25131be1 --- /dev/null +++ b/types/react-onsenui/index.d.ts @@ -0,0 +1,308 @@ +// Type definitions for React OnSenui (react-onsenui) 2.1 +// Project: https://onsen.io/v2/docs/guide/react/ +// Definitions by: Ozytis +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 +import { Component } from 'react'; + +export interface Modifiers_string { + default?: string; + material?: string; +} + +export interface Modifiers_number { + default?: number; + material?: number; +} + +export interface AnimationOptions { + duration?: number; + delay?: number; + timing?: string; +} + +/*** splitter ***/ +export class SplitterSide extends Component<{ + side?: "left" | "right", + collapse?: "portrait" | "landscape" | boolean, + isOpen?: boolean, + onOpen?(e?: Event): void, + onPreOpen?(e?: Event): void, + onPreClose?(e?: Event): void, + onModeChange?(e?: Event): void, + onClose?(e?: Event): void, + isSwipeable?: boolean, + swipeTargetWidth?: number, + width?: number, + animation?: "overlay" | "default" + animationOptions?: AnimationOptions, + openThreshold?: number, + mode?: "collapse" | "split" +}, any> { } + +export class SplitterContent extends Component<{}, any> { } + +export class Splitter extends Component<{}, any> { } + +/*** toolbar ***/ + +export class Toolbar extends Component<{}, any> {} + +export class BottomToolbar extends Component<{ + modifier?: string +}, any> {} + +export class ToolbarButton extends Component<{ + modifier?: string, + disabled?: boolean, + onClick?(e?: Event): void +}, any> {} + +/*** icon ***/ +export class Icon extends Component<{ + modifier?: string, + icon?: string | Modifiers_string, + size?: number | Modifiers_number, + rotate?: 90 | 180 | 270, + fixedWidth?: boolean, + spin?: boolean +}, any> {} + +/*** page ***/ + +export class Page extends Component<{ + contentStyle?: any, + modifier?: string, + renderModal?(): void, + renderToolbar?(): void, + renderBottomToolbar?(): void, + renderFixed?(): void, + onInit?(): void, + onShow?(): void, + onHide?(): void +}, any> {} + +/*** Grid ***/ +export class Col extends Component<{ + verticalAlign?: "top" | "bottom" | "center", + width?: string +}, any> {} + +export class Row extends Component<{ + verticalAlign?: "top" | "bottom" | "center", +}, any> {} + +/*** Navigation ***/ +export class BackButton extends Component<{ + modifier?: string, + onClick?(navigator: Navigator): void +}, any> {} + +export class Navigator extends Component<{ + renderPage(): any, + initialRouteStack?: string[], + initialRoute?: any, + onPrePush?(): void, + onPostPush?(): void, + onPrePop?(): void, + onPostPop?(): void, + animation?: "slide" | "lift" | "fade" | "none" | string, + animationOptions?: AnimationOptions +}, any> { + resetPage(route: any, options: any): void; + resetPageStack(route: any, options: any): void; + pushPage(route: any, options: any): void; + popPage(route: any, options: any): void; +} + +/*** Carousel ***/ +export class Carousel extends Component<{ + direction?: "horizontal" | "vertical", + fullscreen?: boolean, + overscrollable?: boolean, + centered?: boolean, + itemWidth?: number, + itemHeight?: number, + autoScroll?: boolean, + autoScrollRatio?: number, + swipeable?: boolean, + disabled?: boolean, + index?: number, + autoRefresh?: boolean, + onPostChange?(): void, + onRefresh?(): void, + onOverscroll?(): void + animationOptions?: AnimationOptions +}, any> {} + +export class CarouselItem extends Component<{ + modifier: string +}, any> {} + +/*** AlertDialog ***/ +export class AlertDialog extends Component<{ + onCancel?(): void, + isOpen?: boolean, + isCancelable?: boolean, + isDisabled?: boolean, + animation?: "none" | "default", + modifier?: string, + maskColor?: string, + animationOptions?: AnimationOptions, + onPreShow?(): void, + onPostShow?(): void, + onPreHide?(): void, + onPostHide?(): void, +}, any> {} + +export class Dialog extends Component<{ + onCancel?(): void, + isOpen?: boolean, + isCancelable?: boolean, + isDisabled?: boolean, + animation?: "none" | "default", + modifier?: string, + maskColor?: string, + animationOptions?: AnimationOptions, + onPreShow?(): void, + onPostShow?(): void, + onPreHide?(): void, + onPostHide?(): void, +}, any> {} + +export class Modal extends Component<{ + animation?: "fade" | "none", + animationOptions?: AnimationOptions + onShow?(): void, + onHide?(): void, + isOpen?: boolean +}, any> {} + +export class Popover extends Component<{ + getTarget?(): Component | HTMLElement, + onCancel?(): void, + isOpen?: boolean, + isCancelable?: boolean, + isDisabled?: boolean, + animation?: "none" | "default", + modifier?: string, + maskColor?: string, + animationOptions?: AnimationOptions, + onPreShow?(): void, + onPostShow?(): void, + onPreHide?(): void, + onPostHide?(): void, +}, any> {} + +export class ProgressBar extends Component<{ + modifier?: string, + value?: number, + secondaryValue?: boolean, + intermediate?: boolean, +}, any> {} + +export class ProgressCircular extends Component<{ + modifier?: string, + value?: number, + secondaryValue?: boolean, + intermediate?: boolean, +}, any> {} + +export class Ripple extends Component<{ + color?: string, + background?: string, + disabled?: boolean, +}, any> {} + +/*** Forms ***/ +export class Fab extends Component<{ + modifier?: string, + ripple?: boolean, + position?: string, + disabled?: boolean, + onClick?(): void, +}, any> {} + +export class Button extends Component<{ + modifier?: string, + disabled?: boolean, + ripple?: boolean, + onClick?(e?: Event): void +}, any> {} + +export class Input extends Component<{ + modifier?: string, + disabled?: boolean, + onChange?(e: Event): void, + value?: string, + checked?: boolean, + placeholder?: string, + type?: string, + inputId?: string, + float?: boolean, +}, any> {} + +export class Range extends Component<{ + modifier?: string, + onChange?(e: Event): void, + value?: number, + disabled?: boolean, +}, any> {} + +export class Switch extends Component<{ + onChange?(e: Event): void, + checked?: boolean, + disabled?: boolean, + inputId?: string +}, any> {} + +/** + * Tabs + */ + +export class Tab extends Component<{}, any> { } + +export class TabActive extends Component<{}, any> { } + +export class TabInactive extends Component<{}, any> { } + +export class Tabbar extends Component<{ + index?: number, + renderTabs?(): any, + position?: "bottom" | "top" | "auto", + animation: "none" | "slide" | "fade", + animationOptions?: AnimationOptions, + onPreChange?(): void, + onPostChange?(): void, + onReactive?(): void, +}, any> { } + +/** + * Lists + */ + +export class LazyList extends Component<{ + modifier?: string, + length?: number, + renderRow(rowIndex: number): any, + calculateItemHeight(rowIndex: number): any, +}, any> { } + +export class List extends Component<{ + modifier?: string, + dataSource?: string[], + renderRow?(): void, + renderHeader?(): void, + renderFooter?(): void, +}, any> {} + +export class ListHeader extends Component<{ + modifier?: string, +}, any> {} + +export class ListItem extends Component<{ + modifier?: string, + tappable?: boolean, + tapBackgroundColor?: string, + lockOnDrag?: boolean, +}, any> {} diff --git a/types/react-onsenui/react-onsenui-tests.tsx b/types/react-onsenui/react-onsenui-tests.tsx new file mode 100644 index 0000000000..fdc498fa17 --- /dev/null +++ b/types/react-onsenui/react-onsenui-tests.tsx @@ -0,0 +1,44 @@ +import * as React from "react"; +import * as ReactDOM from "react-dom"; +import { SplitterSide, Splitter, SplitterContent, Page } from "react-onsenui"; + +class AppState { + isOpen: boolean = false; +} + +interface AppProps {} // tslint:disable-line no-empty-interface + +export class App extends React.Component { + constructor(props?: AppProps) { + super(props); + this.state = new AppState(); + } + + hide() { + this.setState({ isOpen: false }); + } + + render() { + return ( + + this.hide()} + isSwipeable={true}> + + Menu content + + + + + Test page + + + + ); + } +} + +ReactDOM.render(, document.getElementById('react-body')); diff --git a/types/react-onsenui/tsconfig.json b/types/react-onsenui/tsconfig.json new file mode 100644 index 0000000000..2b4e079fd1 --- /dev/null +++ b/types/react-onsenui/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "sourceMap": true, + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "module": "commonjs", + "target": "es5", + "jsx": "react", + "experimentalDecorators": true, + "baseUrl": "../", + "typeRoots": [ "../" ], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "lib": [ + "es6", + "dom" + ], + "types": [] + }, + "files": [ + "index.d.ts", + "react-onsenui-tests.tsx" + ] +} \ No newline at end of file diff --git a/types/react-onsenui/tslint.json b/types/react-onsenui/tslint.json new file mode 100644 index 0000000000..2221e40e4a --- /dev/null +++ b/types/react-onsenui/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } \ No newline at end of file diff --git a/types/react-overlays/index.d.ts b/types/react-overlays/index.d.ts index 10b67d9d51..db292d7f52 100644 --- a/types/react-overlays/index.d.ts +++ b/types/react-overlays/index.d.ts @@ -58,37 +58,36 @@ interface AffixProps { /** * Callback fired when the right before the `affixStyle` and `affixStyle` props are rendered */ - onAffix?: () => void; + onAffix?(): void; /** * Callback fired after the component `affixStyle` and `affixClassName` props have been rendered. */ - onAffixed?: () => void; + onAffixed?(): void; /** * Callback fired when the right before the `topStyle` and `topClassName` props are rendered */ - onAffixTop?: () => void; + onAffixTop?(): void; /** * Callback fired after the component `topStyle` and `topClassName` props have been rendered. */ - onAffixedTop?: () => void; + onAffixedTop?(): void; /** * Callback fired when the right before the `bottomStyle` and `bottomClassName` props are rendered */ - onAffixBottom?: () => void; + onAffixBottom?(): void; /** * Callback fired after the component `bottomStyle` and `bottomClassName` props have been rendered. */ - onAffixedBottom?: () => void; + onAffixedBottom?(): void; } export class Affix extends React.Component { } // interface AutoAffixProps extends AffixProps { - /** * The logical container node or component for determining offset from bottom * of viewport, or a function that returns it @@ -155,32 +154,31 @@ interface TransitionProps { /** * Callback fired before the "entering" classes are applied */ - onEnter?: (element: Element) => void; + onEnter?(element: Element): void; /** * Callback fired after the "entering" classes are applied */ - onEntering?: (element: Element) => void; + onEntering?(element: Element): void; /** * Callback fired after the "enter" classes are applied */ - onEntered?: (element: Element) => void; + onEntered?(element: Element): void; /** * Callback fired before the "exiting" classes are applied */ - onExit?: (element: Element) => void; + onExit?(element: Element): void; /** * Callback fired after the "exiting" classes are applied */ - onExiting?: (element: Element) => void; + onExiting?(element: Element): void; /** * Callback fired after the "exited" classes are applied */ - onExited?: (element: Element) => void; + onExited?(element: Element): void; } export class Transition extends React.Component { } - diff --git a/types/react-overlays/lib/RootCloseWrapper.d.ts b/types/react-overlays/lib/RootCloseWrapper.d.ts index 0642bdcc52..384df80f4a 100644 --- a/types/react-overlays/lib/RootCloseWrapper.d.ts +++ b/types/react-overlays/lib/RootCloseWrapper.d.ts @@ -2,7 +2,7 @@ import * as React from "react"; // interface RootCloseWrapperProps { - onRootClose?: () => void; + onRootClose?(): void; children?: React.ReactNode; /** diff --git a/types/react-overlays/react-overlays-tests.tsx b/types/react-overlays/react-overlays-tests.tsx index dd151e10e9..bbe526853f 100644 --- a/types/react-overlays/react-overlays-tests.tsx +++ b/types/react-overlays/react-overlays-tests.tsx @@ -17,7 +17,6 @@ function testTransition() { ); } - class TestAffix extends React.Component<{}, {}> { render(): JSX.Element { return ( diff --git a/types/react-paginate/index.d.ts b/types/react-paginate/index.d.ts index 18636a8f6f..b6b50170c2 100644 --- a/types/react-paginate/index.d.ts +++ b/types/react-paginate/index.d.ts @@ -45,7 +45,7 @@ interface ReactPaginateProps { /** * The method to call when a page is clicked. Exposes the current page object as an argument. */ - onPageChange?: (selectedItem: {selected: number}) => void; + onPageChange?(selectedItem: {selected: number}): void; /** * The initial page selected. @@ -110,7 +110,7 @@ interface ReactPaginateProps { /** * The method is called to generate the href attribute value on tag a of each page element. */ - hrefBuilder?: (pageIndex: number) => void; + hrefBuilder?(pageIndex: number): void; } declare const ReactPaginate: React.ComponentClass; diff --git a/types/react-paginate/react-paginate-tests.tsx b/types/react-paginate/react-paginate-tests.tsx index 5f8f8f1994..31efb805ce 100644 --- a/types/react-paginate/react-paginate-tests.tsx +++ b/types/react-paginate/react-paginate-tests.tsx @@ -2,7 +2,6 @@ import * as React from "react"; import ReactPaginate = require("react-paginate"); class Test extends React.Component<{}, {}> { - render() { return ( { - closePortal: () => {}; + closePortal(): {}; } interface ReactPortalProps { @@ -15,10 +15,10 @@ interface ReactPortalProps { openByClickOn?: React.ReactElement; closeOnEsc?: boolean; closeOnOutsideClick?: boolean; - onOpen?: (node: HTMLDivElement) => {}; - beforeClose?: (node: HTMLDivElement, resetPortalState: () => void) => {}; - onClose?: () => {}; - onUpdate?: () => {}; + onOpen?(node: HTMLDivElement): {}; + beforeClose?(node: HTMLDivElement, resetPortalState: () => void): {}; + onClose?(): {}; + onUpdate?(): {}; } declare const ReactPortal: React.ComponentClass; diff --git a/types/react-portal/react-portal-tests.tsx b/types/react-portal/react-portal-tests.tsx index b192e297c7..f3bd6d4b83 100644 --- a/types/react-portal/react-portal-tests.tsx +++ b/types/react-portal/react-portal-tests.tsx @@ -4,7 +4,6 @@ import * as ReactDOM from "react-dom"; import * as Portal from "react-portal"; export default class App extends React.Component<{}, {}> { - render() { const button1 = ; @@ -17,10 +16,9 @@ export default class App extends React.Component<{}, {}> { ); } - } -export class PseudoModal extends React.Component<{ closePortal?: () => {} }, {}> { +export class PseudoModal extends React.Component<{ closePortal?(): {} }, {}> { render() { return (

@@ -31,4 +29,4 @@ export class PseudoModal extends React.Component<{ closePortal?: () => {} }, {}> } } -ReactDOM.render(, document.getElementById('react-body')); \ No newline at end of file +ReactDOM.render(, document.getElementById('react-body')); diff --git a/types/react-recaptcha/index.d.ts b/types/react-recaptcha/index.d.ts index 39cca4037c..af6853efb3 100644 --- a/types/react-recaptcha/index.d.ts +++ b/types/react-recaptcha/index.d.ts @@ -10,16 +10,16 @@ export = Recaptcha; interface RecaptchaProps { className?: string; elementID?: string; - expiredCallback?: () => any; + expiredCallback?(): any; expiredCallbackName?: string; - onloadCallback?: () => any; + onloadCallback?(): any; onloadCallbackName?: string; render?: string; size?: string; tabindex?: string; theme?: "dark" | "light"; type?: string; - verifyCallback?: () => any; + verifyCallback?(): any; verifyCallbackName?: string; sitekey?: string; } diff --git a/types/react-recaptcha/react-recaptcha-tests.tsx b/types/react-recaptcha/react-recaptcha-tests.tsx index 624020cc62..d931e45ae3 100644 --- a/types/react-recaptcha/react-recaptcha-tests.tsx +++ b/types/react-recaptcha/react-recaptcha-tests.tsx @@ -7,4 +7,4 @@ ReactDOM.render( sitekey="xxxxxxxxxxxxxxxxxxxx" />, document.getElementById('example') -); \ No newline at end of file +); diff --git a/types/react-router-config/index.d.ts b/types/react-router-config/index.d.ts new file mode 100644 index 0000000000..4979cbfd6b --- /dev/null +++ b/types/react-router-config/index.d.ts @@ -0,0 +1,31 @@ +// Type definitions for react-router-config 1.0 +// Project: https://github.com/ReactTraining/react-router/tree/master/packages/react-router-config +// Definitions by: François Nguyen +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +import * as React from "react"; +import { RouteComponentProps, match } from "react-router"; +import { Location } from "history"; + +export interface RouteConfigComponentProps extends RouteComponentProps { + route?: RouteConfig; +} + +export interface RouteConfig { + location?: Location; + component?: React.SFC | void> | React.ComponentClass | void>; + path?: string; + exact?: boolean; + strict?: boolean; + routes?: RouteConfig[]; +} + +export interface MatchedRoute { + route: RouteConfig; + match: match; +} + +export function matchRoutes(routes: RouteConfig[], pathname: string): Array>; + +export function renderRoutes(routes: RouteConfig[] | undefined): JSX.Element; diff --git a/types/react-router-config/react-router-config-tests.tsx b/types/react-router-config/react-router-config-tests.tsx new file mode 100644 index 0000000000..d1d28f93c0 --- /dev/null +++ b/types/react-router-config/react-router-config-tests.tsx @@ -0,0 +1,63 @@ +import * as React from "react"; +import { RouteConfig, matchRoutes, MatchedRoute, renderRoutes, RouteConfigComponentProps } from "react-router-config"; +import { BrowserRouter } from "react-router-dom"; + +const Root = ({ route }: RouteConfigComponentProps) => ( +
+

Root

+ {/* child routes won't render without this */} + {renderRoutes(route && route.routes)} +
+); + +const Home = ({ route }: RouteConfigComponentProps) => ( +
+

Home

+
+); + +const Child = ({ route }: RouteConfigComponentProps) => ( +
+

Child

+ {/* child routes won't render without this */} + {renderRoutes(route && route.routes)} +
+); + +const GrandChild = () => ( +
+

Grand Child

+
+); + +// route config +const routes: RouteConfig[] = [ + { + component: Root, + routes: [ + { + path: "/", + exact: true, + component: Home + }, + { + path: "/child/:id", + component: Child, + routes: [{ + path: "/child/:id/grand-child", + component: GrandChild + }] + } + ] + } +]; + +const branch: Array> = matchRoutes<{}>(routes, "/child/23"); +// using the routes shown earlier, this returns +// [ +// routes[0], +// routes[0].routes[1] +// ] + +// pass this into ReactDOM.render +{renderRoutes(routes)}; diff --git a/types/react-router-config/tsconfig.json b/types/react-router-config/tsconfig.json new file mode 100644 index 0000000000..34cb44c46f --- /dev/null +++ b/types/react-router-config/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "jsx": "preserve" + }, + "files": [ + "index.d.ts", + "react-router-config-tests.tsx" + ] +} \ No newline at end of file diff --git a/types/react-router-config/tslint.json b/types/react-router-config/tslint.json new file mode 100644 index 0000000000..cf4f5924c3 --- /dev/null +++ b/types/react-router-config/tslint.json @@ -0,0 +1,6 @@ +{ + "extends": "../tslint.json", + "rules": { + "void-return": false + } +} \ No newline at end of file diff --git a/types/react-router-dom/index.d.ts b/types/react-router-dom/index.d.ts index 72d195f56f..6c480d46c0 100644 --- a/types/react-router-dom/index.d.ts +++ b/types/react-router-dom/index.d.ts @@ -1,6 +1,7 @@ // Type definitions for React Router 4.0 // Project: https://github.com/ReactTraining/react-router // Definitions by: Tanguy Krotoff +// Huy Nguyen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 @@ -17,46 +18,42 @@ declare module 'react-router-dom' { Switch, match, matchPath, - withRouter + withRouter, + RouterChildContext } from 'react-router'; import * as React from 'react'; import * as H from 'history'; - interface BrowserRouterProps { basename?: string; - getUserConfirmation?: () => void; + getUserConfirmation?(): void; forceRefresh?: boolean; keyLength?: number; } class BrowserRouter extends React.Component {} - interface HashRouterProps { basename?: string; - getUserConfirmation?: () => void; + getUserConfirmation?(): void; hashType?: 'slash' | 'noslash' | 'hashbang'; } class HashRouter extends React.Component {} - interface LinkProps extends React.HTMLAttributes { to: H.LocationDescriptor; replace?: boolean; } class Link extends React.Component {} - interface NavLinkProps extends LinkProps { activeClassName?: string; activeStyle?: React.CSSProperties; exact?: boolean; strict?: boolean; - isActive?: (location: H.Location, props: any) => boolean; + isActive?(location: H.Location, props: any): boolean; } class NavLink extends React.Component {} - export { BrowserRouter, HashRouter, @@ -74,6 +71,7 @@ declare module 'react-router-dom' { Switch, match, // TypeScript specific, not from React Router itself matchPath, - withRouter - } + withRouter, + RouterChildContext + }; } diff --git a/types/react-router-redux/index.d.ts b/types/react-router-redux/index.d.ts index 9f8044a7c0..92b625be82 100644 --- a/types/react-router-redux/index.d.ts +++ b/types/react-router-redux/index.d.ts @@ -1,6 +1,10 @@ // Type definitions for react-router-redux 4.0 // Project: https://github.com/rackt/react-router-redux -// Definitions by: Isman Usoh , Noah Shipley , Dimitri Rosenberg , Karol Janyst , Dovydas Navickas +// Definitions by: Isman Usoh +// Noah Shipley +// Dimitri Rosenberg +// Karol Janyst +// Dovydas Navickas // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.1 diff --git a/types/react-router-redux/v3/tslint.json b/types/react-router-redux/v3/tslint.json index d032145676..7a5f77c1dc 100644 --- a/types/react-router-redux/v3/tslint.json +++ b/types/react-router-redux/v3/tslint.json @@ -1,7 +1,7 @@ { "extends": "../tslint.json", "rules": { - "forbidden-types": false, + "ban-types": false, "no-empty-interface": false } } diff --git a/types/react-router/index.d.ts b/types/react-router/index.d.ts index b777816b34..a3e05a29cb 100644 --- a/types/react-router/index.d.ts +++ b/types/react-router/index.d.ts @@ -10,6 +10,7 @@ // Karol Janyst // Dovydas Navickas // Tanguy Krotoff +// Huy Nguyen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 @@ -17,7 +18,17 @@ declare module 'react-router' { import * as React from 'react'; import * as H from 'history'; - + // This is the type of the context object that will be passed down to all children of + // a `Router` component: + interface RouterChildContext

{ + router: { + history: H.History + route: { + location: H.Location, + match: match

+ } + } + } interface MemoryRouterProps { initialEntries?: H.Location[]; initialIndex?: number; @@ -105,6 +116,7 @@ declare module 'react-router' { Switch, match, // TypeScript specific, not from React Router itself matchPath, - withRouter + withRouter, + RouterChildContext } } diff --git a/types/react-router/test/ModalGallery.tsx b/types/react-router/test/ModalGallery.tsx index ccaefe3adc..ae817e0cc9 100644 --- a/types/react-router/test/ModalGallery.tsx +++ b/types/react-router/test/ModalGallery.tsx @@ -17,7 +17,6 @@ import { // on top of the old screen. class ModalSwitch extends React.Component, void> { - // We can pass a location to that will tell it to // ignore the router's current location and use the location // prop instead. diff --git a/types/react-router/test/NavigateWithContext.tsx b/types/react-router/test/NavigateWithContext.tsx new file mode 100644 index 0000000000..6f7dfa9f4a --- /dev/null +++ b/types/react-router/test/NavigateWithContext.tsx @@ -0,0 +1,42 @@ +import * as React from 'react'; +import { + RouterChildContext, + RouteComponentProps +} from 'react-router'; +import { + BrowserRouter as Router, + Route, +} from 'react-router-dom' + +interface Params { + id?: string +} +type Props = RouteComponentProps + +class ComponentThatUsesContext extends React.Component { + static contextTypes = { + router: React.PropTypes.object.isRequired + } + context: RouterChildContext + private onClick = () => { + const { + history, + route: { + location, + match + } + } = this.context.router; + history.push('/some/url'); + } + render() { + return

+ } +} + +const Test = () => ( + + + +); + +export default Test; diff --git a/types/react-router/test/Recursive.tsx b/types/react-router/test/Recursive.tsx index 748e00a968..31b7c5fe29 100644 --- a/types/react-router/test/Recursive.tsx +++ b/types/react-router/test/Recursive.tsx @@ -15,7 +15,7 @@ const PEEPS = [ { id: 3, name: 'David', friends: [ 1, 2 ] } ] -const find = (id: number) => PEEPS.find(p => p.id == id) +const find = (id: number) => PEEPS.find(p => p.id === id) const RecursiveExample = () => ( diff --git a/types/react-router/tsconfig.json b/types/react-router/tsconfig.json index c98755507a..239a137bbc 100644 --- a/types/react-router/tsconfig.json +++ b/types/react-router/tsconfig.json @@ -20,6 +20,7 @@ "test/Basic.tsx", "test/CustomLink.tsx", "test/ModalGallery.tsx", + "test/NavigateWithContext.tsx", "test/NoMatch.tsx", "test/Params.tsx", "test/PreventingTransitions.tsx", diff --git a/types/react-router/tslint.json b/types/react-router/tslint.json index 0209984d72..a773d31b69 100644 --- a/types/react-router/tslint.json +++ b/types/react-router/tslint.json @@ -1,8 +1,14 @@ { "extends": "../tslint.json", "rules": { + "align": false, + "array-type": false, + "eofline": false, + "no-consecutive-blank-lines": false, "no-empty-interface": false, + "prefer-method-signature": false, "void-return": false, - "no-single-declare-module": false + "no-single-declare-module": false, + "semicolon": false } } diff --git a/types/react-router/v2/tslint.json b/types/react-router/v2/tslint.json index d032145676..7a5f77c1dc 100644 --- a/types/react-router/v2/tslint.json +++ b/types/react-router/v2/tslint.json @@ -1,7 +1,7 @@ { "extends": "../tslint.json", "rules": { - "forbidden-types": false, + "ban-types": false, "no-empty-interface": false } } diff --git a/types/react-router/v3/lib/IndexRoute.d.ts b/types/react-router/v3/lib/IndexRoute.d.ts index 44b8c82919..9c82775c12 100644 --- a/types/react-router/v3/lib/IndexRoute.d.ts +++ b/types/react-router/v3/lib/IndexRoute.d.ts @@ -15,8 +15,8 @@ type ComponentsCallback = (err: any, components: RouteComponents) => any; export interface IndexRouteProps { component?: RouteComponent; components?: RouteComponents; - getComponent?: (nextState: RouterState, callback: ComponentCallback) => void; - getComponents?: (nextState: RouterState, callback: ComponentsCallback) => void; + getComponent?(nextState: RouterState, callback: ComponentCallback): void; + getComponents?(nextState: RouterState, callback: ComponentsCallback): void; onEnter?: EnterHook; onChange?: ChangeHook; onLeave?: LeaveHook; diff --git a/types/react-router/v3/lib/Route.d.ts b/types/react-router/v3/lib/Route.d.ts index 9063ac8b45..15aafebc75 100644 --- a/types/react-router/v3/lib/Route.d.ts +++ b/types/react-router/v3/lib/Route.d.ts @@ -25,7 +25,7 @@ type RoutesCallback = (err: any, routesArray: PlainRoute[]) => void; export interface PlainRoute extends RouteProps { childRoutes?: PlainRoute[]; - getChildRoutes?: (partialNextState: LocationState, callback: RoutesCallback) => void; + getChildRoutes?(partialNextState: LocationState, callback: RoutesCallback): void; indexRoute?: PlainRoute; - getIndexRoute?: (partialNextState: LocationState, callback: RouteCallback) => void; + getIndexRoute?(partialNextState: LocationState, callback: RouteCallback): void; } diff --git a/types/react-router/v3/lib/applyRouterMiddleware.d.ts b/types/react-router/v3/lib/applyRouterMiddleware.d.ts index e4d023a792..40872cd77a 100644 --- a/types/react-router/v3/lib/applyRouterMiddleware.d.ts +++ b/types/react-router/v3/lib/applyRouterMiddleware.d.ts @@ -2,8 +2,8 @@ import { RouteComponent } from "react-router"; import RouterContext from "react-router/lib/RouterContext"; export interface Middleware { - renderRouterContext?: (previous: RouterContext, props: any) => RouterContext; - renderRouteComponent?: (previous: RouteComponent, props: any) => RouteComponent; + renderRouterContext?(previous: RouterContext, props: any): RouterContext; + renderRouteComponent?(previous: RouteComponent, props: any): RouteComponent; } export default function applyRouterMiddleware(...middlewares: Middleware[]): (renderProps: any) => RouterContext; diff --git a/types/react-router/v3/react-router-tests.tsx b/types/react-router/v3/react-router-tests.tsx index 314c78c6ce..084b21ac22 100644 --- a/types/react-router/v3/react-router-tests.tsx +++ b/types/react-router/v3/react-router-tests.tsx @@ -49,7 +49,6 @@ interface MasterContext { } class Master extends Component { - static contextTypes: ValidationMap = { router: routerShape }; @@ -57,7 +56,7 @@ class Master extends Component { context: MasterContext; navigate() { - var router = this.context.router; + const router = this.context.router; router.push("/users"); router.push({ pathname: "/users/12", @@ -73,7 +72,6 @@ class Master extends Component {

{this.props.children}

; } - } interface DashboardProps { @@ -84,7 +82,7 @@ class Dashboard extends React.Component { static staticMethodToBeHoisted(): void {} navigate() { - var router = this.props.router; + const router = this.props.router; router.push("/users"); router.push({ pathname: "/users/12", @@ -98,7 +96,6 @@ class Dashboard extends React.Component { This is a dashboard
; } - } const DashboardWithRouter = withRouter(Dashboard); @@ -106,29 +103,24 @@ const DashboardWithRouter = withRouter(Dashboard); DashboardWithRouter.staticMethodToBeHoisted(); class NotFound extends React.Component<{}, {}> { - render() { return
This path does not exists
; } - } type UsersProps = RouteComponentProps<{}, {}>; class Users extends React.Component { - render() { const { location, params, route, routes, router, routeParams } = this.props; return
This is a user list
; } - } - ReactDOM.render(( diff --git a/types/react-sidebar/index.d.ts b/types/react-sidebar/index.d.ts index a68749488c..1f3484762a 100644 --- a/types/react-sidebar/index.d.ts +++ b/types/react-sidebar/index.d.ts @@ -9,7 +9,7 @@ export interface SidebarProps { contentClassName?: string; docked?: boolean; dragToggleDistance?: number; - onSetOpen?: () => {}; + onSetOpen?(): {}; open?: boolean; overlayClassName?: string; pullRight?: boolean; diff --git a/types/react-smooth-scrollbar/index.d.ts b/types/react-smooth-scrollbar/index.d.ts index 6aea289136..54cc7d91b5 100644 --- a/types/react-smooth-scrollbar/index.d.ts +++ b/types/react-smooth-scrollbar/index.d.ts @@ -12,7 +12,7 @@ declare namespace Scrollbar { /** * Pipe to scrollbar.addListener() */ - onScroll?: (status: ScrollStatusObject, scrollbarInstance: SmoothScrollbar) => void; + onScroll?(status: ScrollStatusObject, scrollbarInstance: SmoothScrollbar): void; /** * Keep scrollbar tracks visible whether it's scrolling or not * @default false @@ -34,7 +34,6 @@ declare class Scrollbar extends React.Component { * Scrollbar instance */ readonly scrollbar: SmoothScrollbar; - } export as namespace Scrollbar; diff --git a/types/react-split-pane/index.d.ts b/types/react-split-pane/index.d.ts index cdbb05d4c1..27006b7088 100644 --- a/types/react-split-pane/index.d.ts +++ b/types/react-split-pane/index.d.ts @@ -31,6 +31,14 @@ declare namespace ReactSplitPane { */ size?: number | string; split?: string; + /* Styling to be applied to both panes */ + paneStyle?: React.CSSProperties; + /* Styling to be applied to the first pane, with precedence over paneStyle */ + pane1Style?: React.CSSProperties; + /* Styling to be applied to the second pane, with precedence over paneStyle */ + pane2Style?: React.CSSProperties; + /* Styling to be applied to the resizer bar */ + resizerStyle?: React.CSSProperties; } interface ReactSplitPaneClass extends React.ComponentClass { } diff --git a/types/react-sticky/index.d.ts b/types/react-sticky/index.d.ts index 2126d582ef..b83fa37ac4 100644 --- a/types/react-sticky/index.d.ts +++ b/types/react-sticky/index.d.ts @@ -6,22 +6,17 @@ import * as React from "react"; -declare module "react-sticky" { - - export var StickyContainer: React.ComponentClass>; - - export interface StickyProps { - isActive?: boolean; - className?: string; - style?: any; - stickyClassName?: string; - stickyStyle?: any; - topOffset?: number; - bottomOffset?: number; - onStickyStateChange?: (isSticky: boolean) => void; - } - - export var Sticky: React.ComponentClass; +export const StickyContainer: React.ComponentClass>; +export interface StickyProps { + isActive?: boolean; + className?: string; + style?: any; + stickyClassName?: string; + stickyStyle?: any; + topOffset?: number; + bottomOffset?: number; + onStickyStateChange?(isSticky: boolean): void; } +export const Sticky: React.ComponentClass; diff --git a/types/react-svg-pan-zoom/index.d.ts b/types/react-svg-pan-zoom/index.d.ts index 837890a507..31559cc4a8 100644 --- a/types/react-svg-pan-zoom/index.d.ts +++ b/types/react-svg-pan-zoom/index.d.ts @@ -5,194 +5,186 @@ // TypeScript Version: 2.2 import * as React from 'react'; -declare module 'react-svg-pan-zoom' { +// String constants: +export const MODE_IDLE = 'idle'; +export const MODE_PANNING = 'panning'; +export const MODE_ZOOMING = 'zooming'; - // String constants: - const MODE_IDLE = 'idle'; - const MODE_PANNING = 'panning'; - const MODE_ZOOMING = 'zooming'; +export const TOOL_AUTO = 'auto'; +export const TOOL_NONE = 'none'; +export const TOOL_PAN = 'pan'; +export const TOOL_ZOOM_IN = 'zoom-in'; +export const TOOL_ZOOM_OUT = 'zoom-out'; - export const TOOL_AUTO = 'auto'; - export const TOOL_NONE = 'none'; - export const TOOL_PAN = 'pan'; - export const TOOL_ZOOM_IN = 'zoom-in'; - export const TOOL_ZOOM_OUT = 'zoom-out'; +export const POSITION_NONE = 'none'; +export const POSITION_TOP = 'top'; +export const POSITION_RIGHT = 'right'; +export const POSITION_BOTTOM = 'bottom'; +export const POSITION_LEFT = 'left'; - export const POSITION_NONE = 'none'; - export const POSITION_TOP = 'top'; - export const POSITION_RIGHT = 'right'; - export const POSITION_BOTTOM = 'bottom'; - export const POSITION_LEFT = 'left'; +export type Mode = typeof MODE_IDLE | typeof MODE_PANNING | typeof MODE_ZOOMING; - export type Mode = typeof MODE_IDLE | typeof MODE_PANNING | typeof MODE_ZOOMING; - - export interface Value { - version: 2, - mode: Mode, - focus: boolean, - a: number, - b: number, - c: number, - d: number, - e: number, - f: number, - viewerWidth: number, - viewerHeight: number, - SVGWidth: number, - SVGHeight: number, - startX?: number | null, - startY?: number | null, - endX?: number | null, - endY?: number | null, - - } - - export type Tool = typeof TOOL_AUTO | typeof TOOL_NONE | typeof TOOL_PAN | - typeof TOOL_ZOOM_IN | typeof TOOL_ZOOM_OUT - export type ToolbarPosition = typeof POSITION_NONE | typeof POSITION_TOP | typeof POSITION_RIGHT | - typeof POSITION_BOTTOM | typeof POSITION_LEFT - - - export interface OptionalProps { - //background of the viewer - background: React.CSSProperties, - - //background of the svg - SVGBackground: string, - - //value of the viewer (current point of view) - value: Value | null, - - //CSS style of the Viewer - style: object, - - //className of the Viewer - className: string, - - //detect zoom operation performed trough pinch gesture or mouse scroll - detectWheel: boolean, - - //perform PAN if the mouse is on viewer border - detectAutoPan: boolean, - - //toolbar position - toolbarPosition: ToolbarPosition, - - //handler something changed - onChangeValue: (value: Value) => void, - - //handler tool changed - onChangeTool: (tool: Tool) => void, - - // Note: The `T` type parameter is the type of the `target` of the event: - //handler click - onClick: (event: ViewerMouseEvent) => void, - - //handler double click - onDoubleClick: (event: ViewerMouseEvent) => void, - - //handler mouseup - onMouseUp: (event: ViewerMouseEvent) => void, - - //handler mousemove - onMouseMove: (event: ViewerMouseEvent) => void, - - //handler mousedown - onMouseDown: (event: ViewerMouseEvent) => void, - - //if disabled the user can move the image outside the viewer - preventPanOutside: boolean, - - //how much scale in or out - scaleFactor: number, - - //current active tool (TOOL_NONE, TOOL_PAN, TOOL_ZOOM_IN, TOOL_ZOOM_OUT) - tool: Tool, - - //modifier keys //https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/getModifierState - modifierKeys: string[], - - //override default toolbar component - // TODO: specify function type more clearly - customToolbar: React.Component | React.StatelessComponent, - - // How about touch events? They are in README but not in `propTypes`. - } - - export interface RequiredProps { - //width of the viewer displayed on screen - width: number, - //height of the viewer displayed on screen - height: number, - - //accept only one node SVG - // TODO: Figure out how to constrain `children` or maybe just leave it commented out - // because `children` is already implicit props - // children: () => any - } - - export type Props = RequiredProps & Partial - - class ReactSVGPanZoom extends React.Component { - pan(SVGDeltaX: number, SVGDeltaY: number): void - zoom(SVGPointX: number, SVGPointY: number, scaleFactor: number): void - fitSelection(selectionSVGPointX: number, selectionSVGPointY: number, selectionWidth: number, selectionHeight: number): void - fitToViewer(): void - setPointOnViewerCenter(SVGPointX: number, SVGPointY: number, zoomLevel: number): void - reset(): void - zoomOnViewerCenter(scaleFactor: number): void - getValue(): Value - setValue(value: Value): void - getTool(): Tool - setTool(tool: Tool): void - } - - - export interface Point { - x: number, - y: number, - } - - export interface ViewerMouseEvent{ - originalEvent: React.MouseEvent, - SVGViewer: SVGSVGElement, - point: Point, - x: number, - y: number, - scaleFactor: number, - translationX: number, - translationY: number, - preventDefault(): void - stopPropagation(): void - } - - export interface ViewerTouchEvent { - originalEvent: React.TouchEvent, - SVGViewer: SVGSVGElement, - points: Point[], - changedPoints: Point[], - scaleFactor: number, - translationX: number, - translationY: number, - preventDefault(): void - stopPropagation(): void - } - - // Utility functions exposed: - export function pan(value: Value, SVGDeltaX: number, SVGDeltaY: number, panLimit?: number): Value - - export function zoom(value: Value, SVGPointX: number, SVGPointY: number, scaleFactor: number): Value - - export function fitSelection( - value: Value, selectionSVGPointX: number, selectionSVGPointY: number, selectionWidth: number, selectionHeight: number): Value - - export function fitToViewer(value: Value): Value - - export function zoomOnViewerCenter(value: Value, scaleFactor: number): Value - - export function setPointOnViewerCenter(value: Value, SVGPointX: number, SVGPointY: number, zoomLevel: number): Value - - export function reset(value: Value): Value +export interface Value { + version: 2; + mode: Mode; + focus: boolean; + a: number; + b: number; + c: number; + d: number; + e: number; + f: number; + viewerWidth: number; + viewerHeight: number; + SVGWidth: number; + SVGHeight: number; + startX?: number | null; + startY?: number | null; + endX?: number | null; + endY?: number | null; } +export type Tool = typeof TOOL_AUTO | typeof TOOL_NONE | typeof TOOL_PAN | + typeof TOOL_ZOOM_IN | typeof TOOL_ZOOM_OUT; +export type ToolbarPosition = typeof POSITION_NONE | typeof POSITION_TOP | typeof POSITION_RIGHT | + typeof POSITION_BOTTOM | typeof POSITION_LEFT; +export interface OptionalProps { + // background of the viewer + background: React.CSSProperties; + + // background of the svg + SVGBackground: string; + + // value of the viewer (current point of view) + value: Value | null; + + // CSS style of the Viewer + style: object; + + // className of the Viewer + className: string; + + // detect zoom operation performed trough pinch gesture or mouse scroll + detectWheel: boolean; + + // perform PAN if the mouse is on viewer border + detectAutoPan: boolean; + + // toolbar position + toolbarPosition: ToolbarPosition; + + // handler something changed + onChangeValue(value: Value): void; + + // handler tool changed + onChangeTool(tool: Tool): void; + + // Note: The `T` type parameter is the type of the `target` of the event: + // handler click + onClick(event: ViewerMouseEvent): void; + + // handler double click + onDoubleClick(event: ViewerMouseEvent): void; + + // handler mouseup + onMouseUp(event: ViewerMouseEvent): void; + + // handler mousemove + onMouseMove(event: ViewerMouseEvent): void; + + // handler mousedown + onMouseDown(event: ViewerMouseEvent): void; + + // if disabled the user can move the image outside the viewer + preventPanOutside: boolean; + + // how much scale in or out + scaleFactor: number; + + // current active tool (TOOL_NONE, TOOL_PAN, TOOL_ZOOM_IN, TOOL_ZOOM_OUT) + tool: Tool; + + // modifier keys //https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/getModifierState + modifierKeys: string[]; + + // override default toolbar component + // TODO: specify function type more clearly + customToolbar: React.Component | React.StatelessComponent; + + // How about touch events? They are in README but not in `propTypes`. +} + +export interface RequiredProps { + // width of the viewer displayed on screen + width: number; + // height of the viewer displayed on screen + height: number; + + // accept only one node SVG + // TODO: Figure out how to constrain `children` or maybe just leave it commented out + // because `children` is already implicit props + // children: () => any; +} + +export type Props = RequiredProps & Partial; + +export class ReactSVGPanZoom extends React.Component { + pan(SVGDeltaX: number, SVGDeltaY: number): void; + zoom(SVGPointX: number, SVGPointY: number, scaleFactor: number): void; + fitSelection(selectionSVGPointX: number, selectionSVGPointY: number, selectionWidth: number, selectionHeight: number): void; + fitToViewer(): void; + setPointOnViewerCenter(SVGPointX: number, SVGPointY: number, zoomLevel: number): void; + reset(): void; + zoomOnViewerCenter(scaleFactor: number): void; + getValue(): Value; + setValue(value: Value): void; + getTool(): Tool; + setTool(tool: Tool): void; +} + +export interface Point { + x: number; + y: number; +} + +export interface ViewerMouseEvent{ + originalEvent: React.MouseEvent; + SVGViewer: SVGSVGElement; + point: Point; + x: number; + y: number; + scaleFactor: number; + translationX: number; + translationY: number; + preventDefault(): void; + stopPropagation(): void; +} + +export interface ViewerTouchEvent { + originalEvent: React.TouchEvent; + SVGViewer: SVGSVGElement; + points: Point[]; + changedPoints: Point[]; + scaleFactor: number; + translationX: number; + translationY: number; + preventDefault(): void; + stopPropagation(): void; +} + +// Utility functions exposed: +export function pan(value: Value, SVGDeltaX: number, SVGDeltaY: number, panLimit?: number): Value; + +export function zoom(value: Value, SVGPointX: number, SVGPointY: number, scaleFactor: number): Value; + +export function fitSelection( + value: Value, selectionSVGPointX: number, selectionSVGPointY: number, selectionWidth: number, selectionHeight: number): Value; + +export function fitToViewer(value: Value): Value; + +export function zoomOnViewerCenter(value: Value, scaleFactor: number): Value; + +export function setPointOnViewerCenter(value: Value, SVGPointX: number, SVGPointY: number, zoomLevel: number): Value; + +export function reset(value: Value): Value; diff --git a/types/react-svg-pan-zoom/react-svg-pan-zoom-tests.tsx b/types/react-svg-pan-zoom/react-svg-pan-zoom-tests.tsx index dbe8f0d55e..a2d078d6d2 100644 --- a/types/react-svg-pan-zoom/react-svg-pan-zoom-tests.tsx +++ b/types/react-svg-pan-zoom/react-svg-pan-zoom-tests.tsx @@ -7,9 +7,8 @@ import { ViewerMouseEvent } from 'react-svg-pan-zoom'; - class Example1 extends React.Component<{}, {}> { - Viewer: ReactSVGPanZoom + Viewer: ReactSVGPanZoom; constructor(props: Props) { super(props); } diff --git a/types/react-test-renderer/index.d.ts b/types/react-test-renderer/index.d.ts index 9908394888..927e041378 100644 --- a/types/react-test-renderer/index.d.ts +++ b/types/react-test-renderer/index.d.ts @@ -16,7 +16,7 @@ interface ReactTestRendererJSON { $$typeof?: any; } interface TestRendererOptions { - createNodeMock: (element: ReactElement) => any; + createNodeMock(element: ReactElement): any; } // https://github.com/facebook/react/blob/master/src/renderers/testing/ReactTestMount.js#L155 export function create(nextElement: ReactElement, options?: TestRendererOptions): Renderer; diff --git a/types/react-tether/index.d.ts b/types/react-tether/index.d.ts index 14344c5476..23270282f8 100644 --- a/types/react-tether/index.d.ts +++ b/types/react-tether/index.d.ts @@ -13,13 +13,13 @@ import * as Tether from 'tether'; declare class TetherComponent extends React.Component { } declare namespace ReactTether { - export interface TetherComponentProps extends React.Props, Tether.ITetherOptions { + interface TetherComponentProps extends React.Props, Tether.ITetherOptions { renderElementTag?: string; - renderElementTo?: string | {appendChild: (element: HTMLElement) => void}; + renderElementTo?: string | { appendChild(element: HTMLElement): void }; id?: string; className?: string; style?: React.CSSProperties; - onUpdate?: () => void; - onRepositioned?: () => void; + onUpdate?(): void; + onRepositioned?(): void; } } diff --git a/types/react-tether/react-tether-tests.tsx b/types/react-tether/react-tether-tests.tsx index 666329621e..531fbbf9e1 100644 --- a/types/react-tether/react-tether-tests.tsx +++ b/types/react-tether/react-tether-tests.tsx @@ -13,4 +13,4 @@ const ReactTetherAllOptions: JSX.Element = />; const ReactTetherRequiredOptions: JSX.Element = - ; \ No newline at end of file + ; diff --git a/types/react-virtualized/dist/commonjs/ArrowKeyStepper.d.ts b/types/react-virtualized/dist/commonjs/ArrowKeyStepper.d.ts new file mode 100644 index 0000000000..6cd9604575 --- /dev/null +++ b/types/react-virtualized/dist/commonjs/ArrowKeyStepper.d.ts @@ -0,0 +1 @@ +export * from '../es/ArrowKeyStepper'; diff --git a/types/react-virtualized/dist/commonjs/AutoSizer.d.ts b/types/react-virtualized/dist/commonjs/AutoSizer.d.ts new file mode 100644 index 0000000000..6d16fa0c45 --- /dev/null +++ b/types/react-virtualized/dist/commonjs/AutoSizer.d.ts @@ -0,0 +1 @@ +export * from '../es/AutoSizer'; diff --git a/types/react-virtualized/dist/commonjs/CellMeasurer.d.ts b/types/react-virtualized/dist/commonjs/CellMeasurer.d.ts new file mode 100644 index 0000000000..77f4abea84 --- /dev/null +++ b/types/react-virtualized/dist/commonjs/CellMeasurer.d.ts @@ -0,0 +1 @@ +export * from '../es/CellMeasurer'; diff --git a/types/react-virtualized/dist/commonjs/Collection.d.ts b/types/react-virtualized/dist/commonjs/Collection.d.ts new file mode 100644 index 0000000000..e4905c3eee --- /dev/null +++ b/types/react-virtualized/dist/commonjs/Collection.d.ts @@ -0,0 +1 @@ +export * from '../es/Collection'; diff --git a/types/react-virtualized/dist/commonjs/ColumnSizer.d.ts b/types/react-virtualized/dist/commonjs/ColumnSizer.d.ts new file mode 100644 index 0000000000..1c42d3b94b --- /dev/null +++ b/types/react-virtualized/dist/commonjs/ColumnSizer.d.ts @@ -0,0 +1 @@ +export * from '../es/ColumnSizer'; diff --git a/types/react-virtualized/dist/commonjs/Grid.d.ts b/types/react-virtualized/dist/commonjs/Grid.d.ts new file mode 100644 index 0000000000..6834f9b47d --- /dev/null +++ b/types/react-virtualized/dist/commonjs/Grid.d.ts @@ -0,0 +1 @@ +export * from '../es/Grid'; diff --git a/types/react-virtualized/dist/commonjs/InfiniteLoader.d.ts b/types/react-virtualized/dist/commonjs/InfiniteLoader.d.ts new file mode 100644 index 0000000000..d4614b32d7 --- /dev/null +++ b/types/react-virtualized/dist/commonjs/InfiniteLoader.d.ts @@ -0,0 +1 @@ +export * from '../es/InfiniteLoader'; diff --git a/types/react-virtualized/dist/commonjs/List.d.ts b/types/react-virtualized/dist/commonjs/List.d.ts new file mode 100644 index 0000000000..8a174d91e2 --- /dev/null +++ b/types/react-virtualized/dist/commonjs/List.d.ts @@ -0,0 +1 @@ +export * from '../es/List'; diff --git a/types/react-virtualized/dist/commonjs/Masonry.d.ts b/types/react-virtualized/dist/commonjs/Masonry.d.ts new file mode 100644 index 0000000000..fc2768d7b7 --- /dev/null +++ b/types/react-virtualized/dist/commonjs/Masonry.d.ts @@ -0,0 +1 @@ +export * from '../es/Masonry'; diff --git a/types/react-virtualized/dist/commonjs/MultiGrid.d.ts b/types/react-virtualized/dist/commonjs/MultiGrid.d.ts new file mode 100644 index 0000000000..7504908682 --- /dev/null +++ b/types/react-virtualized/dist/commonjs/MultiGrid.d.ts @@ -0,0 +1 @@ +export * from '../es/MultiGrid'; diff --git a/types/react-virtualized/dist/commonjs/ScrollSync.d.ts b/types/react-virtualized/dist/commonjs/ScrollSync.d.ts new file mode 100644 index 0000000000..2e9ec08a4d --- /dev/null +++ b/types/react-virtualized/dist/commonjs/ScrollSync.d.ts @@ -0,0 +1 @@ +export * from '../es/ScrollSync'; diff --git a/types/react-virtualized/dist/commonjs/Table.d.ts b/types/react-virtualized/dist/commonjs/Table.d.ts new file mode 100644 index 0000000000..c710f4050c --- /dev/null +++ b/types/react-virtualized/dist/commonjs/Table.d.ts @@ -0,0 +1 @@ +export * from '../es/Table'; diff --git a/types/react-virtualized/dist/commonjs/WindowScroller.d.ts b/types/react-virtualized/dist/commonjs/WindowScroller.d.ts new file mode 100644 index 0000000000..51cd1f6ac0 --- /dev/null +++ b/types/react-virtualized/dist/commonjs/WindowScroller.d.ts @@ -0,0 +1 @@ +export * from '../es/WindowScroller'; diff --git a/types/react-virtualized/dist/es/ArrowKeyStepper.d.ts b/types/react-virtualized/dist/es/ArrowKeyStepper.d.ts new file mode 100644 index 0000000000..e42ff353f2 --- /dev/null +++ b/types/react-virtualized/dist/es/ArrowKeyStepper.d.ts @@ -0,0 +1,55 @@ +import { PropTypes, PureComponent, Validator, Requireable } from 'react' + +export type OnSectionRenderedParams = { + columnStartIndex: number, + columnStopIndex: number, + rowStartIndex: number, + rowStopIndex: number +} + +export type ChildProps = { + onSectionRendered: (params: OnSectionRenderedParams) => void, + scrollToColumn: number, + scrollToRow: number +}; +/** + * This HOC decorates a virtualized component and responds to arrow-key events by scrolling one row or column at a time. + */ +export type ArrowKeyStepperProps = { + children?: (props: ChildProps) => React.ReactNode; + className?: string; + columnCount: number; + rowCount: number; + mode?: 'edges' | 'cells'; +} +export type ScrollIndexes = { + scrollToRow: number, + scrollToColumn: number +} +export class ArrowKeyStepper extends PureComponent { + static defaultProps: { + disabled: false, + mode: 'edges', + scrollToColumn: 0, + scrollToRow: 0 + }; + + static propTypes: { + children: Validator<(props: ChildProps) => React.ReactNode>, + className: Requireable, + columnCount: Validator, + disabled: Validator, + mode: Validator<'cells' | 'edges'>, + rowCount: Validator, + scrollToColumn: Validator, + scrollToRow: Validator + }; + + constructor(props: ArrowKeyStepperProps, context: any); + + componentWillReceiveProps(nextProps: ArrowKeyStepperProps): void; + + setScrollIndexes(params: ScrollIndexes): void; + + render(): JSX.Element; +} diff --git a/types/react-virtualized/dist/es/AutoSizer.d.ts b/types/react-virtualized/dist/es/AutoSizer.d.ts new file mode 100644 index 0000000000..ea72c43c1e --- /dev/null +++ b/types/react-virtualized/dist/es/AutoSizer.d.ts @@ -0,0 +1,49 @@ +import { PropTypes, PureComponent, Validator, Requireable } from 'react' + +export type Dimensions = { + height: number, + width: number +} + +export type AutoSizerProps = { + disableHeight?: boolean; + disableWidth?: boolean; + onResize?: (info: { height: number, width: number }) => any; + children?: (props: Dimensions) => React.ReactNode +}; +/** + * Decorator component that automatically adjusts the width and height of a single child. + * Child component should not be declared as a child but should rather be specified by a `ChildComponent` property. + * All other properties will be passed through to the child component. + */ +export class AutoSizer extends PureComponent { + static propTypes: { + /** + * Function responsible for rendering children. + * This function should implement the following signature: + * ({ height, width }) => PropTypes.element + */ + children: Validator<(props: Dimensions) => React.ReactNode>, + + /** Disable dynamic :height property */ + disableHeight: Requireable, + + /** Disable dynamic :width property */ + disableWidth: Requireable, + + /** Callback to be invoked on-resize: ({ height, width }) */ + onResize: Validator<(props: Dimensions) => any> + }; + + static defaultProps: { + onResize: () => {} + }; + + constructor(props: AutoSizerProps); + + componentDidMount(): void; + + componentWillUnmount(): void; + + render(): JSX.Element; +} diff --git a/types/react-virtualized/dist/es/CellMeasurer.d.ts b/types/react-virtualized/dist/es/CellMeasurer.d.ts new file mode 100644 index 0000000000..5e1e0db3fb --- /dev/null +++ b/types/react-virtualized/dist/es/CellMeasurer.d.ts @@ -0,0 +1,78 @@ +import { PureComponent } from 'react' + +export type KeyMapper = ( + rowIndex: number, + columnIndex: number +) => any; + +export type CellMeasurerCacheParams = { + defaultHeight?: number, + defaultWidth?: number, + fixedHeight?: boolean, + fixedWidth?: boolean, + minHeight?: number, + minWidth?: number, + keyMapper?: KeyMapper +} +export class CellMeasurerCache { + constructor(params: CellMeasurerCacheParams); + clear( + rowIndex: number, + columnIndex: number + ): void; + clearAll(): void; + columnWidth: (params: { index: number }) => number | undefined; + hasFixedHeight(): boolean; + hasFixedWidth(): boolean; + getHeight( + rowIndex: number, + columnIndex: number + ): number | undefined; + getWidth( + rowIndex: number, + columnIndex: number + ): number | undefined; + has( + rowIndex: number, + columnIndex: number + ): boolean; + rowHeight: (params: { index: number }) => number | undefined; + set( + rowIndex: number, + columnIndex: number, + width: number, + height: number + ): void; +} + +export type CellMeasurerChildProps = { + getColumnWidth: () => number, + getRowHeight: () => number, + resetMeasurements: () => any, + resetMeasurementsForColumn: (index: number) => any, + resetMeasurementsForRow: (index: number) => any, +} + +export type CellMeasurerProps = { + cache?: CellMeasurerCache; + children?: (props: CellMeasurerChildProps) => React.ReactNode; + columnIndex?: number; + index?: number; + parent?: React.ReactType; + rowIndex?: number; + style?: React.CSSProperties; +} +/** + * Wraps a cell and measures its rendered content. + * Measurements are stored in a per-cell cache. + * Cached-content is not be re-measured. + */ +export class CellMeasurer extends PureComponent { + constructor(props: CellMeasurerProps, context: any); + + componentDidMount(): void; + + componentDidUpdate(prevProps: CellMeasurerProps, prevState: any): void; + + render(): JSX.Element; +} diff --git a/types/react-virtualized/dist/es/Collection.d.ts b/types/react-virtualized/dist/es/Collection.d.ts new file mode 100644 index 0000000000..404d329222 --- /dev/null +++ b/types/react-virtualized/dist/es/Collection.d.ts @@ -0,0 +1,123 @@ +import { PureComponent, Validator, Requireable } from 'react' +import { + Index, + ScrollPosition, + SizeInfo, + SizeAndPositionInfo +} from '../../index'; + +export type CollectionCellSizeAndPosition = { height: number, width: number, x: number, y: number }; +export type CollectionCellSizeAndPositionGetter = (params: Index) => CollectionCellSizeAndPosition; + +export type CollectionCellGroupRendererParams = { + cellSizeAndPositionGetter: CollectionCellSizeAndPositionGetter, + indices: number[], + cellRenderer: CollectionCellRenderer +} +export type CollectionCellGroupRenderer = (params: CollectionCellGroupRendererParams) => React.ReactNode[]; +export type CollectionCellRendererParams = { + index: number, + key: string, + style?: React.CSSProperties +} +export type CollectionCellRenderer = (params: CollectionCellRendererParams) => React.ReactNode; +export type CollectionProps = { + 'aria-label'?: string; + cellCount: number; + cellGroupRenderer?: CollectionCellGroupRenderer, + cellRenderer: CollectionCellRenderer, + cellSizeAndPositionGetter: CollectionCellSizeAndPositionGetter, + sectionSize?: number; + className?: string; + height: number; + width: number; + horizontalOverscanSize?: number; + noContentRenderer?: () => JSX.Element; + scrollToCell?: number; + verticalOverscanSize?: number; +}; + +/** + * Renders scattered or non-linear data. + * Unlike Grid, which renders checkerboard data, Collection can render arbitrarily positioned- even overlapping- data. + */ +export class Collection extends PureComponent { + static propTypes: { + 'aria-label': Requireable, + + /** + * Number of cells in Collection. + */ + cellCount: Validator, + + /** + * Responsible for rendering a group of cells given their indices. + * Should implement the following interface: ({ + * cellSizeAndPositionGetter:Function, + * indices: Array, + * cellRenderer: Function + * }): Array + */ + cellGroupRenderer: Validator, + + /** + * Responsible for rendering a cell given an row and column index. + * Should implement the following interface: ({ index: number, key: string, style: object }): PropTypes.element + */ + cellRenderer: Validator, + + /** + * Callback responsible for returning size and offset/position information for a given cell (index). + * ({ index: number }): { height: number, width: number, x: number, y: number } + */ + cellSizeAndPositionGetter: Validator, + + /** + * Optionally override the size of the sections a Collection's cells are split into. + */ + sectionSize: Requireable + }; + + static defaultProps: { + 'aria-label': 'grid', + cellGroupRenderer: CollectionCellGroupRenderer + }; + + constructor(props: CollectionProps, context: any); + + forceUpdate(): void; + + /** See Collection#recomputeCellSizesAndPositions */ + recomputeCellSizesAndPositions(): void; + + /** React lifecycle methods */ + + render(): JSX.Element; + + /** CellLayoutManager interface */ + + calculateSizeAndPositionData(): void; + + /** + * Returns the most recently rendered set of cell indices. + */ + getLastRenderedIndices(): number[]; + + /** + * Calculates the minimum amount of change from the current scroll position to ensure the specified cell is (fully) visible. + */ + getScrollPositionForCell(params: { + align: 'auto' | 'start' | 'end' | 'center', + cellIndex: number, + height: number, + scrollLeft: number, + scrollTop: number, + width: number + }): ScrollPosition; + + getTotalSize(): SizeInfo; + + cellRenderers(params: { + isScrolling: boolean, + } & SizeInfo): React.ReactNode[]; +} diff --git a/types/react-virtualized/dist/es/ColumnSizer.d.ts b/types/react-virtualized/dist/es/ColumnSizer.d.ts new file mode 100644 index 0000000000..6efcf8c044 --- /dev/null +++ b/types/react-virtualized/dist/es/ColumnSizer.d.ts @@ -0,0 +1,50 @@ +import { PureComponent, Validator, Requireable } from 'react' + +export type SizedColumnProps = { + adjustedWidth: number, + getColumnWidth: () => number, + registerChild: any +} + +export type ColumnSizerProps = { + children?: (props: SizedColumnProps) => React.ReactNode; + columnMaxWidth?: number; + columnMinWidth?: number; + columnCount?: number; + width: number; +} +/** + * High-order component that auto-calculates column-widths for `Grid` cells. + */ +export class ColumnSizer extends PureComponent { + static propTypes: { + /** + * Function responsible for rendering a virtualized Grid. + * This function should implement the following signature: + * ({ adjustedWidth, getColumnWidth, registerChild }) => PropTypes.element + * + * The specified :getColumnWidth function should be passed to the Grid's :columnWidth property. + * The :registerChild should be passed to the Grid's :ref property. + * The :adjustedWidth property is optional; it reflects the lesser of the overall width or the width of all columns. + */ + children: Validator<(props: SizedColumnProps) => React.ReactNode>, + + /** Optional maximum allowed column width */ + columnMaxWidth: Requireable, + + /** Optional minimum allowed column width */ + columnMinWidth: Requireable, + + /** Number of columns in Grid or Table child */ + columnCount: Validator, + + /** Width of Grid or Table child */ + width: Validator + }; + + constructor(props: ColumnSizerProps, context: any); + + componentDidUpdate(prevProps: ColumnSizerProps, prevState: any): void; + + render(): JSX.Element; +} diff --git a/types/react-virtualized/dist/es/Grid.d.ts b/types/react-virtualized/dist/es/Grid.d.ts new file mode 100644 index 0000000000..7fcd0d1314 --- /dev/null +++ b/types/react-virtualized/dist/es/Grid.d.ts @@ -0,0 +1,461 @@ +import { Validator, Requireable, PureComponent } from 'react' +import { List } from './List'; +import { Table } from './Table'; +import { CellMeasurerCache } from './CellMeasurer'; +import { Index, Map, Alignment } from '../../index'; + +export type GridCellProps = { + columnIndex: number; + isScrolling: boolean; + isVisible: boolean; + key: string; + parent: Grid | List | Table; + rowIndex: number; + style: React.CSSProperties; +}; +export type GridCellRenderer = (props: GridCellProps) => React.ReactNode; + +export type ConfigureParams = { + cellCount: number, + estimatedCellSize: number +}; +export type ContainerSizeAndOffset = { + containerSize: number, + offset: number +}; +export type SizeAndPositionData = { + offset: number, + size: number +}; +export type GetVisibleCellRangeParams = { + containerSize: number, + offset: number +}; +export type VisibleCellRange = { + start: number; + stop: number; +}; +export type ScrollParams = { + clientHeight: number, + clientWidth: number, + scrollHeight: number, + scrollLeft: number, + scrollTop: number, + scrollWidth: number +}; +export type SectionRenderedParams = { + columnStartIndex: number, + columnStopIndex: number, + rowStartIndex: number, + rowStopIndex: number +}; +export type OverscanIndicesGetterParams = { + cellCount: number, + overscanCellsCount: number, + scrollDirection: number, + startIndex: number, + stopIndex: number +}; +export type OverscanIndices = { + overscanStartIndex: number, + overscanStopIndex: number +}; + +export type CellSizeAndPositionManager = { + areOffsetsAdjusted(): boolean; + configure({ + cellCount, + estimatedCellSize + }: ConfigureParams): void; + getCellCount(): number; + getEstimatedCellSize(): number; + getLastMeasuredIndex(): number; + getOffsetAdjustment({ + containerSize, + offset // safe + }: ContainerSizeAndOffset): number; + /** + * This method returns the size and position for the cell at the specified index. + * It just-in-time calculates (or used cached values) for cells leading up to the index. + */ + getSizeAndPositionOfCell(index: number): SizeAndPositionData; + getSizeAndPositionOfLastMeasuredCell(): SizeAndPositionData; + /** + * Total size of all cells being measured. + * This value will be completedly estimated initially. + * As cells as measured the estimate will be updated. + */ + getTotalSize(): number; + /** + * Determines a new offset that ensures a certain cell is visible, given the current offset. + * If the cell is already visible then the current offset will be returned. + * If the current offset is too great or small, it will be adjusted just enough to ensure the specified index is visible. + * + * @param align Desired alignment within container; one of "auto" (default), "start", or "end" + * @param containerSize Size (width or height) of the container viewport + * @param currentOffset Container's current (x or y) offset + * @param totalSize Total size (width or height) of all cells + * @return Offset to use to ensure the specified cell is visible + */ + getUpdatedOffsetForIndex(params: { + align: string, + containerSize: number, + currentOffset: number, + targetIndex: number + }): number; + getVisibleCellRange(params: GetVisibleCellRangeParams): VisibleCellRange; + /** + * Clear all cached values for cells after the specified index. + * This method should be called for any cell that has changed its size. + * It will not immediately perform any calculations; they'll be performed the next time getSizeAndPositionOfCell() is called. + */ + resetCell(index: number): void +} + +export type GridCellRangeProps = { + cellCache: Map, + cellRenderer: GridCellRenderer, + columnSizeAndPositionManager: CellSizeAndPositionManager, + columnStartIndex: number, + columnStopIndex: number, + isScrolling: boolean, + rowSizeAndPositionManager: CellSizeAndPositionManager, + rowStartIndex: number, + rowStopIndex: number, + scrollLeft: number, + scrollTop: number +} +export type GridCellRangeRenderer = (params: GridCellRangeProps) => React.ReactNode[]; +// TODO add proper typing +export type GridProps = { + 'aria-label'?: string; + autoContainerWidth?: boolean; + autoHeight?: boolean; + cellRenderer: GridCellRenderer; + cellRangeRenderer?: GridCellRangeRenderer; + className?: string; + columnCount: number; + columnWidth: number | ((params: Index) => number); + containerStyle?: React.CSSProperties; + deferredMeasurementCache?: CellMeasurerCache; + estimatedColumnSize?: number; + estimatedRowSize?: number; + getScrollbarSize?: () => number; + height: number; + id?: string; + noContentRenderer?: () => React.ReactNode; + onScroll?: (params: ScrollParams) => any; + onSectionRendered?: (params: SectionRenderedParams) => any; + overscanColumnCount?: number; + overscanIndicesGetter?: (params: OverscanIndicesGetterParams) => OverscanIndices; + overscanRowCount?: number; + rowHeight: number | ((params: Index) => number); + rowCount: number; + scrollingResetTimeInterval?: number; + scrollLeft?: number; + scrollToAlignment?: Alignment; + scrollToColumn?: number; + scrollTop?: number; + scrollToRow?: number; + style?: React.CSSProperties; + tabIndex?: number; + width: number; +}; + +export type ScrollDirection = 'horizontal' | 'vertical'; + +export type GridState = { + isScrolling: boolean, + scrollDirectionHorizontal: ScrollDirection, + scrollDirectionVertical: ScrollDirection, + scrollLeft: number, + scrollTop: number +}; + +/** + * Specifies the number of miliseconds during which to disable pointer events while a scroll is in progress. + * This improves performance and makes scrolling smoother. + */ +export const DEFAULT_SCROLLING_RESET_TIME_INTERVAL = 150 + +/** + * Renders tabular data with virtualization along the vertical and horizontal axes. + * Row heights and column widths must be known ahead of time and specified as properties. + */ +export class Grid extends PureComponent { + static propTypes: { + 'aria-label': Requireable, + + /** + * Set the width of the inner scrollable container to 'auto'. + * This is useful for single-column Grids to ensure that the column doesn't extend below a vertical scrollbar. + */ + autoContainerWidth: Requireable, + + /** + * Removes fixed height from the scrollingContainer so that the total height + * of rows can stretch the window. Intended for use with WindowScroller + */ + autoHeight: Requireable, + + /** + * Responsible for rendering a cell given an row and column index. + * Should implement the following interface: ({ columnIndex: number, rowIndex: number }): PropTypes.node + */ + cellRenderer: Validator<(props: GridCellProps) => React.ReactNode>, + + /** + * Responsible for rendering a group of cells given their index ranges. + * Should implement the following interface: ({ + * cellCache: Map, + * cellRenderer: Function, + * columnSizeAndPositionManager: CellSizeAndPositionManager, + * columnStartIndex: number, + * columnStopIndex: number, + * isScrolling: boolean, + * rowSizeAndPositionManager: CellSizeAndPositionManager, + * rowStartIndex: number, + * rowStopIndex: number, + * scrollLeft: number, + * scrollTop: number + * }): Array + */ + cellRangeRenderer: Validator<(params: GridCellRangeProps) => React.ReactNode[]>, + + /** + * Optional custom CSS class name to attach to root Grid element. + */ + className: Requireable, + + /** + * Number of columns in grid. + */ + columnCount: Validator, + + /** + * Either a fixed column width (number) or a function that returns the width of a column given its index. + * Should implement the following interface: (index: number): number + */ + columnWidth: Validator number)>, + + /** Optional inline style applied to inner cell-container */ + containerStyle: Requireable, + + /** + * If CellMeasurer is used to measure this Grid's children, this should be a pointer to its CellMeasurerCache. + * A shared CellMeasurerCache reference enables Grid and CellMeasurer to share measurement data. + */ + deferredMeasurementCache: Requireable, + + /** + * Used to estimate the total width of a Grid before all of its columns have actually been measured. + * The estimated total width is adjusted as columns are rendered. + */ + estimatedColumnSize: Validator, + + /** + * Used to estimate the total height of a Grid before all of its rows have actually been measured. + * The estimated total height is adjusted as rows are rendered. + */ + estimatedRowSize: Validator, + + /** + * Exposed for testing purposes only. + */ + getScrollbarSize: Validator<() => number>, + + /** + * Height of Grid; this property determines the number of visible (vs virtualized) rows. + */ + height: Validator, + + /** + * Optional custom id to attach to root Grid element. + */ + id: Requireable, + + /** + * Optional renderer to be used in place of rows when either :rowCount or :columnCount is 0. + */ + noContentRenderer: Requireable<() => JSX.Element>, + + /** + * Callback invoked whenever the scroll offset changes within the inner scrollable region. + * This callback can be used to sync scrolling between lists, tables, or grids. + * ({ clientHeight, clientWidth, scrollHeight, scrollLeft, scrollTop, scrollWidth }): void + */ + onScroll: Validator<(params: ScrollParams) => void>, + + /** + * Callback invoked with information about the section of the Grid that was just rendered. + * ({ columnStartIndex, columnStopIndex, rowStartIndex, rowStopIndex }): void + */ + onSectionRendered: Validator<(params: SectionRenderedParams) => void>, + + /** + * Number of columns to render before/after the visible section of the grid. + * These columns can help for smoother scrolling on touch devices or browsers that send scroll events infrequently. + */ + overscanColumnCount: Validator, + + /** + * Calculates the number of cells to overscan before and after a specified range. + * This function ensures that overscanning doesn't exceed the available cells. + * Should implement the following interface: ({ + * cellCount: number, + * overscanCellsCount: number, + * scrollDirection: number, + * startIndex: number, + * stopIndex: number + * }): {overscanStartIndex: number, overscanStopIndex: number} + */ + overscanIndicesGetter: Validator<(params: OverscanIndicesGetterParams) => OverscanIndices>, + + /** + * Number of rows to render above/below the visible section of the grid. + * These rows can help for smoother scrolling on touch devices or browsers that send scroll events infrequently. + */ + overscanRowCount: Validator, + + /** + * ARIA role for the grid element. + */ + role: Requireable, + + /** + * Either a fixed row height (number) or a function that returns the height of a row given its index. + * Should implement the following interface: ({ index: number }): number + */ + rowHeight: Validator number)>, + + /** + * Number of rows in grid. + */ + rowCount: Validator, + + /** Wait this amount of time after the last scroll event before resetting Grid `pointer-events`. */ + scrollingResetTimeInterval: Requireable, + + /** Horizontal offset. */ + scrollLeft: Requireable, + + /** + * Controls scroll-to-cell behavior of the Grid. + * The default ("auto") scrolls the least amount possible to ensure that the specified cell is fully visible. + * Use "start" to align cells to the top/left of the Grid and "end" to align bottom/right. + */ + scrollToAlignment: Validator, + + /** + * Column index to ensure visible (by forcefully scrolling if necessary) + */ + scrollToColumn: Validator, + + /** Vertical offset. */ + scrollTop: Requireable, + + /** + * Row index to ensure visible (by forcefully scrolling if necessary) + */ + scrollToRow: Validator, + + /** Optional inline style */ + style: Requireable, + + /** Tab index for focus */ + tabIndex: Requireable, + + /** + * Width of Grid; this property determines the number of visible (vs virtualized) columns. + */ + width: Validator + }; + + static defaultProps: { + 'aria-label': 'grid', + cellRangeRenderer: GridCellRangeRenderer, + estimatedColumnSize: 100, + estimatedRowSize: 30, + getScrollbarSize: () => number, + noContentRenderer: () => null, + onScroll: () => null, + onSectionRendered: () => null, + overscanColumnCount: 0, + overscanIndicesGetter: OverscanIndicesGetterParams, + overscanRowCount: 10, + role: 'grid', + scrollingResetTimeInterval: typeof DEFAULT_SCROLLING_RESET_TIME_INTERVAL, + scrollToAlignment: 'auto', + scrollToColumn: -1, + scrollToRow: -1, + style: {}, + tabIndex: 0 + }; + + constructor(props: GridProps, context: any); + + /** + * Invalidate Grid size and recompute visible cells. + * This is a deferred wrapper for recomputeGridSize(). + * It sets a flag to be evaluated on cDM/cDU to avoid unnecessary renders. + * This method is intended for advanced use-cases like CellMeasurer. + */ + // @TODO (bvaughn) Add automated test coverage for this. + invalidateCellSizeAfterRender(params: { + columnIndex: number, + rowIndex: number + }): void + + /** + * Pre-measure all columns and rows in a Grid. + * Typically cells are only measured as needed and estimated sizes are used for cells that have not yet been measured. + * This method ensures that the next call to getTotalSize() returns an exact size (as opposed to just an estimated one). + */ + measureAllCells(): void; + + /** + * Forced recompute of row heights and column widths. + * This function should be called if dynamic column or row sizes have changed but nothing else has. + * Since Grid only receives :columnCount and :rowCount it has no way of detecting when the underlying data changes. + */ + recomputeGridSize(params?: { + columnIndex?: number, + rowIndex?: number + }): void; + + /** + * Ensure column and row are visible. + */ + scrollToCell(params: { + columnIndex: number, + rowIndex: number + }): void; + + componentDidMount(): void; + + /** + * @private + * This method updates scrollLeft/scrollTop in state for the following conditions: + * 1) New scroll-to-cell props have been set + */ + componentDidUpdate(prevProps: GridProps, prevState: GridState): void; + + componentWillMount(): void; + + componentWillUnmount(): void; + + /** + * @private + * This method updates scrollLeft/scrollTop in state for the following conditions: + * 1) Empty content (0 rows or columns) + * 2) New scroll props overriding the current state + * 3) Cells-count or cells-size has changed, making previous scroll offsets invalid + */ + componentWillReceiveProps(nextProps: GridProps): void; + + componentWillUpdate(nextProps: GridProps, nextState: GridState): void; + + render(): JSX.Element; +} + +export const defaultCellRangeRenderer: GridCellRangeRenderer; diff --git a/types/react-virtualized/dist/es/InfiniteLoader.d.ts b/types/react-virtualized/dist/es/InfiniteLoader.d.ts new file mode 100644 index 0000000000..e16359adca --- /dev/null +++ b/types/react-virtualized/dist/es/InfiniteLoader.d.ts @@ -0,0 +1,80 @@ +import { PureComponent, Validator, Requireable } from 'react' +import { Index, IndexRange } from '../../index'; + +export type InfiniteLoaderChildProps = { + onRowsRendered: (params: { startIndex: number, stopIndex: number }) => void, + registerChild: (registeredChild: any) => void +} + +export type InfiniteLoaderProps = { + children?: (props: InfiniteLoaderChildProps) => React.ReactNode; + isRowLoaded: (params: Index) => boolean; + loadMoreRows: (params: IndexRange) => Promise; + minimumBatchSize?: number; + rowCount?: number; + threshold?: number; +}; + +/** + * Higher-order component that manages lazy-loading for "infinite" data. + * This component decorates a virtual component and just-in-time prefetches rows as a user scrolls. + * It is intended as a convenience component; fork it if you'd like finer-grained control over data-loading. + */ +export class InfiniteLoader extends PureComponent { + static propTypes: { + /** + * Function responsible for rendering a virtualized component. + * This function should implement the following signature: + * ({ onRowsRendered, registerChild }) => PropTypes.element + * + * The specified :onRowsRendered function should be passed through to the child's :onRowsRendered property. + * The :registerChild callback should be set as the virtualized component's :ref. + */ + children: Validator<(props: InfiniteLoaderChildProps) => React.ReactNode>, + + /** + * Function responsible for tracking the loaded state of each row. + * It should implement the following signature: ({ index: number }): boolean + */ + isRowLoaded: Validator<(params: Index) => boolean>, + + /** + * Callback to be invoked when more rows must be loaded. + * It should implement the following signature: ({ startIndex, stopIndex }): Promise + * The returned Promise should be resolved once row data has finished loading. + * It will be used to determine when to refresh the list with the newly-loaded data. + * This callback may be called multiple times in reaction to a single scroll event. + */ + loadMoreRows: Validator<(params: IndexRange) => Promise>, + + /** + * Minimum number of rows to be loaded at a time. + * This property can be used to batch requests to reduce HTTP requests. + */ + minimumBatchSize: Validator, + + /** + * Number of rows in list; can be arbitrary high number if actual number is unknown. + */ + rowCount: Validator, + + /** + * Threshold at which to pre-fetch data. + * A threshold X means that data will start loading when a user scrolls within X rows. + * This value defaults to 15. + */ + threshold: Validator + }; + + static defaultProps: { + minimumBatchSize: 10, + rowCount: 0, + threshold: 15 + }; + + constructor(props: InfiniteLoaderProps, context: any); + + resetLoadMoreRowsCache(): void; + + render(): JSX.Element; +} diff --git a/types/react-virtualized/dist/es/List.d.ts b/types/react-virtualized/dist/es/List.d.ts new file mode 100644 index 0000000000..2a4f30dbfe --- /dev/null +++ b/types/react-virtualized/dist/es/List.d.ts @@ -0,0 +1,137 @@ +import { PureComponent, Validator, Requireable } from 'react' +import { Grid, GridCellProps } from './Grid' +import { Index, IndexRange, Alignment } from '../../index' +import { CellMeasurerCache } from './CellMeasurer' + +export type ListRowProps = GridCellProps & { index: number, style: React.CSSProperties }; + +export type ListRowRenderer = (props: ListRowProps) => React.ReactNode; +export type ListProps = { + deferredMeasurementCache?: CellMeasurerCache; + className?: string; + autoHeight?: boolean; + estimatedRowSize?: number; + height: number; + noRowsRenderer?: () => JSX.Element; + onRowsRendered?: (info: { overscanStartIndex: number, overscanStopIndex: number, startIndex: number, stopIndex: number }) => void; + onScroll?: (info: { clientHeight: number, scrollHeight: number, scrollTop: number }) => void; + overscanRowCount?: number; + rowHeight: number | ((info: Index) => number); + rowRenderer: ListRowRenderer; + rowCount: number; + scrollToAlignment?: string; + scrollToIndex?: number; + scrollTop?: number; + style?: React.CSSProperties; + tabIndex?: number; + width: number; +} +/** + * It is inefficient to create and manage a large list of DOM elements within a scrolling container + * if only a few of those elements are visible. The primary purpose of this component is to improve + * performance by only rendering the DOM nodes that a user is able to see based on their current + * scroll position. + * + * This component renders a virtualized list of elements with either fixed or dynamic heights. + */ +export class List extends PureComponent { + static propTypes: { + 'aria-label': Requireable, + + /** + * Removes fixed height from the scrollingContainer so that the total height + * of rows can stretch the window. Intended for use with WindowScroller + */ + autoHeight: Requireable, + + /** Optional CSS class name */ + className: Requireable, + + /** + * Used to estimate the total height of a List before all of its rows have actually been measured. + * The estimated total height is adjusted as rows are rendered. + */ + estimatedRowSize: Validator, + + /** Height constraint for list (determines how many actual rows are rendered) */ + height: Validator, + + /** Optional renderer to be used in place of rows when rowCount is 0 */ + noRowsRenderer: Validator<() => JSX.Element>, + + /** + * Callback invoked with information about the slice of rows that were just rendered. + * ({ startIndex, stopIndex }): void + */ + onRowsRendered: Validator<(params: IndexRange) => void>, + + /** + * Number of rows to render above/below the visible bounds of the list. + * These rows can help for smoother scrolling on touch devices. + */ + overscanRowCount: Validator, + + /** + * Callback invoked whenever the scroll offset changes within the inner scrollable region. + * This callback can be used to sync scrolling between lists, tables, or grids. + * ({ clientHeight, scrollHeight, scrollTop }): void + */ + onScroll: Validator<(params: { clientHeight: number, scrollHeight: number, scrollTop: number }) => void>, + + /** + * Either a fixed row height (number) or a function that returns the height of a row given its index. + * ({ index: number }): number + */ + rowHeight: Validator number)>, + + /** Responsible for rendering a row given an index; ({ index: number }): node */ + rowRenderer: Validator, + + /** Number of rows in list. */ + rowCount: Validator, + + /** See Grid#scrollToAlignment */ + scrollToAlignment: Validator, + + /** Row index to ensure visible (by forcefully scrolling if necessary) */ + scrollToIndex: Validator, + + /** Vertical offset. */ + scrollTop: Requireable, + + /** Optional inline style */ + style: Validator, + + /** Tab index for focus */ + tabIndex: Requireable, + + /** Width of list */ + width: Validator + }; + + static defaultProps: { + estimatedRowSize: 30, + noRowsRenderer: () => null, + onRowsRendered: () => null, + onScroll: () => null, + overscanRowCount: 10, + scrollToAlignment: 'auto', + scrollToIndex: -1, + style: {} + }; + + constructor(props: ListProps, context: any); + + forceUpdateGrid(): void; + + /** See Grid#measureAllCells */ + measureAllRows(): void; + + /** See Grid#recomputeGridSize */ + recomputeRowHeights(index?: number): void; + + /** See Grid#scrollToCell */ + scrollToRow(index?: number): void; + + render(): JSX.Element; +} diff --git a/types/react-virtualized/dist/es/Masonry.d.ts b/types/react-virtualized/dist/es/Masonry.d.ts new file mode 100644 index 0000000000..eb44635978 --- /dev/null +++ b/types/react-virtualized/dist/es/Masonry.d.ts @@ -0,0 +1,144 @@ +import { PureComponent, Validator, Requireable } from 'react' +import { CellMeasurerCache, KeyMapper } from './CellMeasurer'; +import { GridCellRenderer } from './Grid'; +/** + * Specifies the number of miliseconds during which to disable pointer events while a scroll is in progress. + * This improves performance and makes scrolling smoother. + */ +export const DEFAULT_SCROLLING_RESET_TIME_INTERVAL = 150 + +export type OnCellsRenderedCallback = (params: { + startIndex: number, + stopIndex: number +}) => void; + +export type OnScrollCallback = (params: { + clientHeight: number, + scrollHeight: number, + scrollTop: number +}) => void; + +export type MasonryCellProps = { + index: number, + isScrolling: boolean, + key: React.Key, + parent: React.ReactType, + style?: React.CSSProperties +} + +export type CellRenderer = (props: MasonryCellProps) => React.ReactNode + +export type MasonryProps = { + autoHeight: boolean, + cellCount: number, + cellMeasurerCache: CellMeasurerCache, + cellPositioner: Positioner, + cellRenderer: CellRenderer, + className?: string, + height: number, + id?: string, + keyMapper?: KeyMapper, + onCellsRendered?: OnCellsRenderedCallback, + onScroll?: OnScrollCallback, + overscanByPixels?: number, + role?: string, + scrollingResetTimeInterval?: number, + scrollTop?: number, + style?: React.CSSProperties, + tabIndex?: number, + width: number +} + +export type MasonryState = { + isScrolling: boolean, + scrollTop: number +} + +/** + * This component efficiently displays arbitrarily positioned cells using windowing techniques. + * Cell position is determined by an injected `cellPositioner` property. + * Windowing is vertical; this component does not support horizontal scrolling. + * + * Rendering occurs in two phases: + * 1) First pass uses estimated cell sizes (provided by the cache) to determine how many cells to measure in a batch. + * Batch size is chosen using a fast, naive layout algorithm that stacks images in order until the viewport has been filled. + * After measurement is complete (componentDidMount or componentDidUpdate) this component evaluates positioned cells + * in order to determine if another measurement pass is required (eg if actual cell sizes were less than estimated sizes). + * All measurements are permanently cached (keyed by `keyMapper`) for performance purposes. + * 2) Second pass uses the external `cellPositioner` to layout cells. + * At this time the positioner has access to cached size measurements for all cells. + * The positions it returns are cached by Masonry for fast access later. + * Phase one is repeated if the user scrolls beyond the current layout's bounds. + * If the layout is invalidated due to eg a resize, cached positions can be cleared using `recomputeCellPositions()`. + * + * Animation constraints: + * Simple animations are supported (eg translate/slide into place on initial reveal). + * More complex animations are not (eg flying from one position to another on resize). + * + * Layout constraints: + * This component supports multi-column layout. + * The height of each item may vary. + * The width of each item must not exceed the width of the column it is "in". + * The left position of all items within a column must align. + * (Items may not span multiple columns.) + */ +export class Masonry extends PureComponent { + static defaultProps: { + autoHeight: false, + keyMapper: identity, + onCellsRendered: noop, + onScroll: noop, + overscanByPixels: 20, + role: 'grid', + scrollingResetTimeInterval: typeof DEFAULT_SCROLLING_RESET_TIME_INTERVAL, + style: emptyObject, + tabIndex: 0 + } + + constructor(props: MasonryProps, context: any); + + clearCellPositions(): void; + + // HACK This method signature was intended for Grid + invalidateCellSizeAfterRender(params: { rowIndex: number }): void + + recomputeCellPositions(): void; + + componentDidMount(): void; + + componentDidUpdate(prevProps: MasonryProps, prevState: MasonryState): void; + + componentWillUnmount(): void; + + componentWillReceiveProps(nextProps: MasonryProps): void; + + render(): JSX.Element; +} + +type emptyObject = {} + +type identity = (value: T) => T; + +type noop = () => void; + +export type Position = { + left: number, + top: number +}; + +export type createCellPositionerParams = { + cellMeasurerCache: CellMeasurerCache, + columnCount: number, + columnWidth: number, + spacer?: number +}; + +export type resetParams = { + columnCount: number, + columnWidth: number, + spacer?: number +}; + +export type Positioner = ((index: number) => Position) & { reset: (params: resetParams) => void }; + +export const createCellPositioner: (params: createCellPositionerParams) => Positioner; diff --git a/types/react-virtualized/dist/es/MultiGrid.d.ts b/types/react-virtualized/dist/es/MultiGrid.d.ts new file mode 100644 index 0000000000..1bb8b7dfac --- /dev/null +++ b/types/react-virtualized/dist/es/MultiGrid.d.ts @@ -0,0 +1,75 @@ +import { PureComponent, Validator, Requireable } from 'react' +import { GridProps } from './Grid' + +export type MultiGridProps = { + fixedColumnCount: number; + fixedRowCount: number; + style: React.CSSProperties; + styleBottomLeftGrid: React.CSSProperties; + styleBottomRightGrid: React.CSSProperties; + styleTopLeftGrid: React.CSSProperties; + styleTopRightGrid: React.CSSProperties; +} & GridProps; + +export type MultiGridState = { + scrollLeft: number, + scrollTop: number +} + +/** + * Renders 1, 2, or 4 Grids depending on configuration. + * A main (body) Grid will always be rendered. + * Optionally, 1-2 Grids for sticky header rows will also be rendered. + * If no sticky columns, only 1 sticky header Grid will be rendered. + * If sticky columns, 2 sticky header Grids will be rendered. + */ +export class MultiGrid extends PureComponent { + static propTypes: { + fixedColumnCount: Validator, + fixedRowCount: Validator, + style: Validator, + styleBottomLeftGrid: Validator, + styleBottomRightGrid: Validator, + styleTopLeftGrid: Validator, + styleTopRightGrid: Validator + }; + + static defaultProps: { + fixedColumnCount: 0, + fixedRowCount: 0, + style: {}, + styleBottomLeftGrid: {}, + styleBottomRightGrid: {}, + styleTopLeftGrid: {}, + styleTopRightGrid: {} + }; + + constructor(props: MultiGridProps, context: any); + + forceUpdateGrids(): void; + + /** See Grid#invalidateCellSizeAfterRender */ + invalidateCellSizeAfterRender(params?: { + columnIndex?: number, + rowIndex?: number + }): void; + + /** See Grid#measureAllCells */ + measureAllCells(): void; + + /** See Grid#recomputeGridSize */ + recomputeGridSize(params?: { + columnIndex?: number, + rowIndex?: number + }): void; + + componentDidMount(): void; + + componentDidUpdate(prevProps: MultiGridProps, prevState: MultiGridState): void; + + componentWillMount(): void; + + componentWillReceiveProps(nextProps: MultiGridProps, nextState: MultiGridState): void; + + render(): JSX.Element; +} diff --git a/types/react-virtualized/dist/es/ScrollSync.d.ts b/types/react-virtualized/dist/es/ScrollSync.d.ts new file mode 100644 index 0000000000..d244262d25 --- /dev/null +++ b/types/react-virtualized/dist/es/ScrollSync.d.ts @@ -0,0 +1,51 @@ +import { PureComponent, Validator, Requireable } from 'react' + +export type OnScrollParams = { + clientHeight: number, + clientWidth: number, + scrollHeight: number, + scrollLeft: number, + scrollTop: number, + scrollWidth: number +} + +export type ScrollSyncChildProps = { + clientHeight: number, + clientWidth: number, + onScroll: (params: OnScrollParams) => void, + scrollHeight: number, + scrollLeft: number, + scrollTop: number, + scrollWidth: number +} + +export type ScrollSyncProps = { + children?: (props: ScrollSyncChildProps) => React.ReactNode +}; + +export type ScrollSyncState = { + clientHeight: number, + clientWidth: number, + scrollHeight: number, + scrollLeft: number, + scrollTop: number, + scrollWidth: number +}; + +/** + * HOC that simplifies the process of synchronizing scrolling between two or more virtualized components. + */ +export class ScrollSync extends PureComponent { + static propTypes: { + /** + * Function responsible for rendering 2 or more virtualized components. + * This function should implement the following signature: + * ({ onScroll, scrollLeft, scrollTop }) => PropTypes.element + */ + children: Validator<(props: ScrollSyncChildProps) => React.ReactNode> + }; + + constructor(props: ScrollSyncProps, context: any); + + render(): JSX.Element; +} diff --git a/types/react-virtualized/dist/es/Table.d.ts b/types/react-virtualized/dist/es/Table.d.ts new file mode 100644 index 0000000000..118215f4fa --- /dev/null +++ b/types/react-virtualized/dist/es/Table.d.ts @@ -0,0 +1,447 @@ +import { Validator, Requireable, PureComponent, Component } from 'react'; +import { CellMeasurerCache } from './CellMeasurer'; +import { Index, Alignment, ScrollEventData, IndexRange, OverscanIndexRange } from '../../index'; +import { Grid } from './Grid'; + +export type TableCellDataGetterParams = { + columnData?: any, + dataKey: string, + rowData: any +}; +export type TableCellProps = { + cellData?: any, + columnData?: any, + dataKey: string, + rowData: any, + rowIndex: number +}; +export type TableHeaderProps = { + columnData?: any, + dataKey: string, + disableSort?: boolean, + label?: string, + sortBy?: string, + sortDirection?: SortDirectionType +}; +export type TableHeaderRowProps = { + className: string, + columns: React.ReactNode[], + style: React.CSSProperties, + scrollbarWidth: number, + height: number, + width: number +}; +export type TableRowProps = { + className: string, + columns: any[], + index: number, + isScrolling: boolean, + onRowClick?: (params: RowMouseEventHandlerParams) => void, + onRowDoubleClick?: (params: RowMouseEventHandlerParams) => void, + onRowMouseOver?: (params: RowMouseEventHandlerParams) => void, + onRowMouseOut?: (params: RowMouseEventHandlerParams) => void, + rowData: any, + style: any +}; + +export type TableCellDataGetter = (params: TableCellDataGetterParams) => any; +export type TableCellRenderer = (props: TableCellProps) => React.ReactNode; +export type TableHeaderRenderer = (props: TableHeaderProps) => React.ReactNode; +export type TableHeaderRowRenderer = (props: TableHeaderRowProps) => React.ReactNode; +export type TableRowRenderer = (props: TableRowProps) => React.ReactNode; + +// https://github.com/bvaughn/react-virtualized/blob/master/docs/Column.md +export type ColumnProps = { + cellDataGetter?: TableCellDataGetter; + cellRenderer?: TableCellRenderer; + className?: string; + columnData?: any; + dataKey: any; + disableSort?: boolean; + flexGrow?: number; + flexShrink?: number; + headerClassName?: string; + headerRenderer?: TableHeaderRenderer; + label?: string; + maxWidth?: number; + minWidth?: number; + style?: React.CSSProperties; + width: number; +} +export class Column extends Component { + static propTypes: { + /** Optional aria-label value to set on the column header */ + 'aria-label': Requireable, + + /** + * Callback responsible for returning a cell's data, given its :dataKey + * ({ columnData: any, dataKey: string, rowData: any }): any + */ + cellDataGetter: Requireable, + + /** + * Callback responsible for rendering a cell's contents. + * ({ cellData: any, columnData: any, dataKey: string, rowData: any, rowIndex: number }): node + */ + cellRenderer: Requireable, + + /** Optional CSS class to apply to cell */ + className: Requireable, + + /** Optional additional data passed to this column's :cellDataGetter */ + columnData: Requireable, + + /** Uniquely identifies the row-data attribute correspnding to this cell */ + dataKey: Validator, + + /** If sort is enabled for the table at large, disable it for this column */ + disableSort: Requireable, + + /** Flex grow style; defaults to 0 */ + flexGrow: Requireable, + + /** Flex shrink style; defaults to 1 */ + flexShrink: Requireable, + + /** Optional CSS class to apply to this column's header */ + headerClassName: Requireable, + + /** + * Optional callback responsible for rendering a column header contents. + * ({ columnData: object, dataKey: string, disableSort: boolean, label: string, sortBy: string, sortDirection: string }): PropTypes.node + */ + headerRenderer: Validator, + + /** Header label for this column */ + label: Requireable, + + /** Maximum width of column; this property will only be used if :flexGrow is > 0. */ + maxWidth: Requireable, + + /** Minimum width of column. */ + minWidth: Requireable, + + /** Optional inline style to apply to cell */ + style: Requireable, + + /** Flex basis (width) for this column; This value can grow or shrink based on :flexGrow and :flexShrink properties. */ + width: Validator + }; + + static defaultProps: { + cellDataGetter: TableCellDataGetter, + cellRenderer: TableCellRenderer, + flexGrow: 0, + flexShrink: 1, + headerRenderer: TableHeaderRenderer, + style: {} + }; +} + +export type RowMouseEventHandlerParams = { + rowData: { + columnData: object, + id: string, + index: number + }, + index: number, + event: React.SyntheticEvent> +} + +export type HeaderMouseEventHandlerParams = { + dataKey: string, + columnData: any, + event: React.SyntheticEvent> +} + +// ref: https://github.com/bvaughn/react-virtualized/blob/master/docs/Table.md +export type TableProps = { + deferredMeasurementCache?: CellMeasurerCache; + autoHeight?: boolean; + children?: React.ReactChildren; + className?: string; + disableHeader?: boolean; + estimatedRowSize?: number; + gridClassName?: string; + gridStyle?: any; + headerClassName?: string; + headerHeight: number; + headerStyle?: any; + height?: number; + id?: string; + noRowsRenderer?: () => void; + onHeaderClick?: (params: HeaderMouseEventHandlerParams) => void; + onRowClick?: (info: RowMouseEventHandlerParams) => void; + onRowDoubleClick?: (info: RowMouseEventHandlerParams) => void; + onRowMouseOut?: (info: RowMouseEventHandlerParams) => void; + onRowMouseOver?: (info: RowMouseEventHandlerParams) => void; + onRowsRendered?: (info: IndexRange & OverscanIndexRange) => void; + overscanRowCount?: number; + onScroll?: (info: ScrollEventData) => void; + rowClassName?: string | ((info: Index) => string); + rowCount: number; + rowGetter?: (info: Index) => any; + rowHeight: number | ((info: Index) => number); + rowRenderer?: TableRowRenderer; + headerRowRenderer?: TableHeaderRowRenderer; + rowStyle?: React.CSSProperties | ((info: Index) => React.CSSProperties); + scrollToAlignment?: string; + scrollToIndex?: number; + scrollTop?: number; + sort?: (info: { sortBy: string, sortDirection: SortDirectionType }) => void; + sortBy?: string; + sortDirection?: SortDirectionType; + style?: React.CSSProperties; + tabIndex?: number; + width?: number; +} + +export const defaultTableCellDataGetter: TableCellDataGetter; +export const defaultTableCellRenderer: TableCellRenderer; +export const defaultTableHeaderRenderer: () => Array>; +export const defaultTableHeaderRowRenderer: TableHeaderRowRenderer; +export const defaultTableRowRenderer: TableRowRenderer; + +type SortDirectionStatic = { + /** + * Sort items in ascending order. + * This means arranging from the lowest value to the highest (e.g. a-z, 0-9). + */ + ASC: 'ASC', + + /** + * Sort items in descending order. + * This means arranging from the highest value to the lowest (e.g. z-a, 9-0). + */ + DESC: 'DESC' +} + +export const SortDirection: SortDirectionStatic + +export type SortDirectionType = 'ASC' | 'DESC' + +export const SortIndicator: React.StatelessComponent<{ sortDirection: SortDirectionType }> + +/** + * Table component with fixed headers and virtualized rows for improved performance with large data sets. + * This component expects explicit width, height, and padding parameters. + */ +export class Table extends PureComponent { + static propTypes: { + 'aria-label': Requireable, + + /** + * Removes fixed height from the scrollingContainer so that the total height + * of rows can stretch the window. Intended for use with WindowScroller + */ + autoHeight: Requireable, + + /** One or more Columns describing the data displayed in this row */ + children: Validator, + + /** Optional CSS class name */ + className: Requireable, + + /** Disable rendering the header at all */ + disableHeader: Requireable, + + /** + * Used to estimate the total height of a Table before all of its rows have actually been measured. + * The estimated total height is adjusted as rows are rendered. + */ + estimatedRowSize: Validator, + + /** Optional custom CSS class name to attach to inner Grid element. */ + gridClassName: Requireable, + + /** Optional inline style to attach to inner Grid element. */ + gridStyle: Requireable, + + /** Optional CSS class to apply to all column headers */ + headerClassName: Requireable, + + /** Fixed height of header row */ + headerHeight: Validator, + + /** + * Responsible for rendering a table row given an array of columns: + * Should implement the following interface: ({ + * className: string, + * columns: any[], + * style: any + * }): PropTypes.node + */ + headerRowRenderer: Requireable, + + /** Optional custom inline style to attach to table header columns. */ + headerStyle: Requireable, + + /** Fixed/available height for out DOM element */ + height: Validator, + + /** Optional id */ + id: Requireable, + + /** Optional renderer to be used in place of table body rows when rowCount is 0 */ + noRowsRenderer: Requireable<() => JSX.Element>, + + /** + * Optional callback when a column's header is clicked. + * ({ columnData: any, dataKey: string }): void + */ + onHeaderClick: Requireable<(params: HeaderMouseEventHandlerParams) => void>, + + /** + * Callback invoked when a user clicks on a table row. + * ({ index: number }): void + */ + onRowClick: Requireable<(params: RowMouseEventHandlerParams) => void>, + + /** + * Callback invoked when a user double-clicks on a table row. + * ({ index: number }): void + */ + onRowDoubleClick: Requireable<(params: RowMouseEventHandlerParams) => void>, + + /** + * Callback invoked when the mouse leaves a table row. + * ({ index: number }): void + */ + onRowMouseOut: Requireable<(params: RowMouseEventHandlerParams) => void>, + + /** + * Callback invoked when a user moves the mouse over a table row. + * ({ index: number }): void + */ + onRowMouseOver: Requireable<(params: RowMouseEventHandlerParams) => void>, + + /** + * Callback invoked with information about the slice of rows that were just rendered. + * ({ startIndex, stopIndex }): void + */ + onRowsRendered: Requireable<(params: RowMouseEventHandlerParams) => void>, + + /** + * Callback invoked whenever the scroll offset changes within the inner scrollable region. + * This callback can be used to sync scrolling between lists, tables, or grids. + * ({ clientHeight, scrollHeight, scrollTop }): void + */ + onScroll: Requireable<(params: ScrollEventData) => void>, + + /** + * Number of rows to render above/below the visible bounds of the list. + * These rows can help for smoother scrolling on touch devices. + */ + overscanRowCount: Validator, + + /** + * Optional CSS class to apply to all table rows (including the header row). + * This property can be a CSS class name (string) or a function that returns a class name. + * If a function is provided its signature should be: ({ index: number }): string + */ + rowClassName: Requireable string)>, + + /** + * Callback responsible for returning a data row given an index. + * ({ index: number }): any + */ + rowGetter: Validator<(params: Index) => any>, + + /** + * Either a fixed row height (number) or a function that returns the height of a row given its index. + * ({ index: number }): number + */ + rowHeight: Validator number)>, + + /** Number of rows in table. */ + rowCount: Validator, + + /** + * Responsible for rendering a table row given an array of columns: + * Should implement the following interface: ({ + * className: string, + * columns: Array, + * index: number, + * isScrolling: boolean, + * onRowClick: ?Function, + * onRowDoubleClick: ?Function, + * onRowMouseOver: ?Function, + * onRowMouseOut: ?Function, + * rowData: any, + * style: any + * }): PropTypes.node + */ + rowRenderer: Requireable<(props: TableRowProps) => React.ReactNode>, + + /** Optional custom inline style to attach to table rows. */ + rowStyle: Validator React.CSSProperties)>, + + /** See Grid#scrollToAlignment */ + scrollToAlignment: Validator, + + /** Row index to ensure visible (by forcefully scrolling if necessary) */ + scrollToIndex: Validator, + + /** Vertical offset. */ + scrollTop: Requireable, + + /** + * Sort function to be called if a sortable header is clicked. + * ({ sortBy: string, sortDirection: SortDirection }): void + */ + sort: Requireable<(params: { sortBy: string, sortDirection: SortDirectionType }) => void>, + + /** Table data is currently sorted by this :dataKey (if it is sorted at all) */ + sortBy: Requireable, + + /** Table data is currently sorted in this direction (if it is sorted at all) */ + sortDirection: Validator, + + /** Optional inline style */ + style: Requireable, + + /** Tab index for focus */ + tabIndex: Requireable, + + /** Width of list */ + width: Validator + }; + + static defaultProps: { + disableHeader: false, + estimatedRowSize: 30, + headerHeight: 0, + headerStyle: {}, + noRowsRenderer: () => null, + onRowsRendered: () => null, + onScroll: () => null, + overscanRowCount: 10, + rowRenderer: TableRowRenderer, + headerRowRenderer: TableHeaderRenderer, + rowStyle: {}, + scrollToAlignment: 'auto', + scrollToIndex: -1, + style: {} + }; + + Grid: Grid; + + constructor(props: TableProps); + + forceUpdateGrid(): void; + + /** See Grid#measureAllCells */ + measureAllRows(): void; + + /** See Grid#recomputeGridSize */ + recomputeRowHeights(index?: number): void; + + /** See Grid#scrollToCell */ + scrollToRow(index?: number): void + + componentDidMount(): void; + + componentDidUpdate(): void; + + render(): JSX.Element; +} diff --git a/types/react-virtualized/dist/es/WindowScroller.d.ts b/types/react-virtualized/dist/es/WindowScroller.d.ts new file mode 100644 index 0000000000..7e0a09379e --- /dev/null +++ b/types/react-virtualized/dist/es/WindowScroller.d.ts @@ -0,0 +1,59 @@ +import { Validator, Requireable, PureComponent } from 'react' + +export type WindowScrollerChildProps = { + height: number, + isScrolling: boolean, + scrollTop: number +}; + +export type WindowScrollerProps = { + children?: (props: WindowScrollerChildProps) => React.ReactNode; + onResize?: (prams: { height: number }) => void; + onScroll?: (params: { scrollTop: number }) => void; + scrollElement?: HTMLElement; +} +export type WindowScrollerState = { + height: number, + isScrolling: boolean, + scrollTop: number +} + +export class WindowScroller extends PureComponent { + static propTypes: { + /** + * Function responsible for rendering children. + * This function should implement the following signature: + * ({ height, isScrolling, scrollTop }) => PropTypes.element + */ + children: Validator<(props: WindowScrollerChildProps) => React.ReactNode>, + + /** Callback to be invoked on-resize: ({ height }) */ + onResize: Validator<(params: { height: number }) => void>, + + /** Callback to be invoked on-scroll: ({ scrollTop }) */ + onScroll: Validator<(params: { scrollTop: number }) => void>, + + /** Element to attach scroll event listeners. Defaults to window. */ + scrollElement: HTMLElement + }; + + static defaultProps: { + onResize: () => {}, + onScroll: () => {} + }; + + constructor(props: WindowScrollerProps); + + // Can’t use defaultProps for scrollElement without breaking server-side rendering + readonly scrollElement: HTMLElement | Window; + + updatePosition(scrollElement?: HTMLElement): void; + + componentDidMount(): void; + + componentWillReceiveProps(nextProps: WindowScrollerProps): void; + + componentWillUnmount(): void; + + render(): JSX.Element; +} diff --git a/types/react-virtualized/index.d.ts b/types/react-virtualized/index.d.ts index f89183c90f..2440e1dcf3 100644 --- a/types/react-virtualized/index.d.ts +++ b/types/react-virtualized/index.d.ts @@ -1,545 +1,167 @@ -// Type definitions for react-virtualized 9.2.1 +// Type definitions for react-virtualized 9.4 // Project: https://github.com/bvaughn/react-virtualized // Definitions by: Kalle Ott // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.1 +// TypeScript Version: 2.2 -import * as React from "react"; +export { + ArrowKeyStepper, + ArrowKeyStepperProps, + ChildProps as ArrowKeyStepperChildProps +} from './dist/es/ArrowKeyStepper' +export { + AutoSizer, + AutoSizerProps, + Dimensions +} from './dist/es/AutoSizer' +export { + CellMeasurer, + CellMeasurerCache, + CellMeasurerCacheParams, + CellMeasurerProps, + KeyMapper +} from './dist/es/CellMeasurer' +export { + Collection, + CollectionCellGroupRenderer, + CollectionCellGroupRendererParams, + CollectionCellRenderer, + CollectionCellRendererParams, + CollectionCellSizeAndPosition, + CollectionCellSizeAndPositionGetter, + CollectionProps +} from './dist/es/Collection' +export { + ColumnSizer, + ColumnSizerProps, + SizedColumnProps +} from './dist/es/ColumnSizer' +export { + defaultCellRangeRenderer, + Grid, + CellSizeAndPositionManager, + ConfigureParams, + ContainerSizeAndOffset, + GetVisibleCellRangeParams, + GridCellProps, + GridCellRangeProps, + GridCellRangeRenderer, + GridCellRenderer, + GridProps, + GridState, + OverscanIndices, + OverscanIndicesGetterParams, + ScrollDirection, + ScrollParams, + SectionRenderedParams, + SizeAndPositionData, + VisibleCellRange +} from './dist/es/Grid' +export { + InfiniteLoader, + InfiniteLoaderChildProps, + InfiniteLoaderProps +} from './dist/es/InfiniteLoader' +export { + List, + ListProps, + ListRowProps, + ListRowRenderer +} from './dist/es/List' +export { + createCellPositioner as createMasonryCellPositioner, + Masonry, + CellRenderer, + MasonryCellProps, + MasonryProps, + MasonryState, + OnCellsRenderedCallback, + OnScrollCallback, + Position, + Positioner +} from './dist/es/Masonry' +export { + MultiGrid, + MultiGridProps, + MultiGridState +} from './dist/es/MultiGrid' +export { + ScrollSync, + OnScrollParams, + ScrollSyncChildProps, + ScrollSyncProps, + ScrollSyncState +} from './dist/es/ScrollSync' +export { + defaultTableCellDataGetter, + defaultTableCellRenderer, + defaultTableHeaderRenderer, + defaultTableHeaderRowRenderer, + defaultTableRowRenderer, + Table, + Column, + SortDirection, + SortIndicator, + ColumnProps, + HeaderMouseEventHandlerParams, + RowMouseEventHandlerParams, + SortDirectionType, + TableCellDataGetter, + TableCellDataGetterParams, + TableCellProps, + TableCellRenderer, + TableHeaderProps, + TableHeaderRenderer, + TableHeaderRowProps, + TableHeaderRowRenderer, + TableProps, + TableRowProps, + TableRowRenderer +} from './dist/es/Table' +export { + WindowScroller, + WindowScrollerChildProps, + WindowScrollerProps, + WindowScrollerState +} from './dist/es/WindowScroller' -export interface ArrowKeyStepperProps { - children?: React.StatelessComponent<{ - onSectionRendered: Function, - scrollToColumn: number, - scrollToRow: number - }>; - className?: string; - columnCount: number; - rowCount: number; -} -export class ArrowKeyStepper extends React.PureComponent { } - -export interface AutoSizerProps { - disableHeight?: boolean; - disableWidth?: boolean; - onResize?: (info: { height: number, width: number }) => any; -} -export class AutoSizer extends React.PureComponent { } - -export interface CellMeasurerProps { - cache?: CellMeasurerCache; - children?: React.StatelessComponent<{ - getColumnWidth: () => number, - getRowHeight: () => number, - resetMeasurements: () => any, - resetMeasurementsForColumn: (index: number) => any, - resetMeasurementsForRow: (index: number) => any, - }>; - columnIndex: number; - parent?: React.ReactType; - rowIndex: number; - style?: React.CSSProperties; -} -export class CellMeasurer extends React.PureComponent { } - -export type KeyMapper = ( - rowIndex: number, - columnIndex: number -) => any; -export type Map = { [key: string]: T }; -export type Cache = Map; -export type IndexParam = { +export type Index = { index: number }; -export type CellMeasurerCacheParams = { - defaultHeight?: number, - defaultWidth?: number, - fixedHeight?: boolean, - fixedWidth?: boolean, - minHeight?: number, - minWidth?: number, - keyMapper?: KeyMapper -} -export class CellMeasurerCache { - constructor(params: CellMeasurerCacheParams); - clear( - rowIndex: number, - columnIndex: number - ): void; - clearAll(): void; - columnWidth: (params: IndexParam) => number | undefined; - hasFixedHeight(): boolean; - hasFixedWidth(): boolean; - getHeight( - rowIndex: number, - columnIndex: number - ): number | undefined; - getWidth( - rowIndex: number, - columnIndex: number - ): number | undefined; - has( - rowIndex: number, - columnIndex: number - ): boolean; - rowHeight: (params: IndexParam) => number | undefined; - set( - rowIndex: number, - columnIndex: number, - width: number, - height: number - ): void; -} - -export type CollectionCellSizeAndPosition = { height: number, width: number, x: number, y: number }; -export type CollectionCellSizeAndPositionGetter = (params: IndexParam) => CollectionCellSizeAndPosition; - -export type CollectionCellGroupRendererParams = { - cellSizeAndPositionGetter: CollectionCellSizeAndPositionGetter, - indices: number[], - cellRenderer: CollectionCellRenderer -} -export type CollectionCellGroupRenderer = (params: CollectionCellGroupRendererParams) => React.ReactNode[]; -export type CollectionCellRendererParams = { - index: number, - key: string, - style?: React.CSSProperties -} -export type CollectionCellRenderer = (params: CollectionCellRendererParams) => React.ReactNode; -export type CollectionProps = { - 'aria-label'?: string; - cellCount: number; - cellGroupRenderer?: CollectionCellGroupRenderer, - cellRenderer: CollectionCellRenderer, - cellSizeAndPositionGetter: CollectionCellSizeAndPositionGetter, - sectionSize?: number; +export type PositionInfo = { + x: number, + y: number }; -export class Collection extends React.PureComponent { } -export interface ColumnSizerProps { - children?: React.StatelessComponent<{ adjustedWidth: number, getColumnWidth: () => number, registerChild: any }>; - columnMaxWidth?: number; - columnMinWidth?: number; - columnCount?: number; - width: number; -} -export class ColumnSizer extends React.PureComponent { } +export type ScrollPosition = { + scrollLeft: number, + scrollTop: number +}; -export type CellDataGetterParams = { - columnData?: any, - dataKey: string, - rowData: any -}; -export type CellRendererParams = { - cellData?: any, - columnData?: any, - dataKey: string, - rowData: any, - rowIndex: number -}; -export type HeaderRendererParams = { - columnData?: any, - dataKey: string, - disableSort?: boolean, - label?: string, - sortBy?: string, - sortDirection?: SortDirectionType -}; -export type HeaderRowRendererParams = { - className: string, - columns: React.ReactNode[], - style: React.CSSProperties, - scrollbarWidth: number, +export type SizeInfo = { height: number, width: number }; -export type RowRendererParams = { - className: string, - columns: Array, - index: number, - isScrolling: boolean, - onRowClick?: Function, - onRowDoubleClick?: Function, - onRowMouseOver?: Function, - onRowMouseOut?: Function, - rowData: any, - style: any -}; -export type TableCellDataGetter = (params: CellDataGetterParams) => any; -export type TableCellRenderer = (params: CellRendererParams) => React.ReactNode; -export type TableHeaderRenderer = (params: HeaderRendererParams) => React.ReactNode; -export type TableHeaderRowRenderer = (params: HeaderRowRendererParams) => React.ReactNode; -export type TableRowRenderer = (params: RowRendererParams) => React.ReactNode; +export type SizeAndPositionInfo = SizeInfo & PositionInfo; -// https://github.com/bvaughn/react-virtualized/blob/master/docs/Column.md -export interface ColumnProps { - cellDataGetter?: TableCellDataGetter; - cellRenderer?: TableCellRenderer; - className?: string; - columnData?: any; - dataKey: any; - disableSort?: boolean; - flexGrow?: number; - flexShrink?: number; - headerClassName?: string; - headerRenderer?: TableHeaderRenderer; - label?: string; - maxWidth?: number; - minWidth?: number; - style?: React.CSSProperties; - width: number; -} -export class Column extends React.Component { } +export type Map = { [key: string]: T }; -export type RowClickHandlerParams = { - rowData: { - columnData: Object, - id: string, - index: number - } +export type Alignment = 'auto' | 'end' | 'start' | 'center'; + +export type IndexRange = { + startIndex: number, + stopIndex: number } -// ref: https://github.com/bvaughn/react-virtualized/blob/master/docs/Table.md -export interface TableProps { - deferredMeasurementCache?: CellMeasurerCache; - autoHeight?: boolean; - children?: React.ReactChildren; - className?: string; - disableHeader?: boolean; - estimatedRowSize?: number; - gridClassName?: string; - gridStyle?: any; - headerClassName?: string; - headerHeight: number; - headerStyle?: any; - height?: number; - id?: string; - noRowsRender?: () => void; - onHeaderClick?: (dataKey: string, columnData: any) => void; - onRowClick?: (info: RowClickHandlerParams) => void; - onRowDoubleClick?: (info: RowClickHandlerParams) => void; - onRowMouseOut?: (info: RowClickHandlerParams) => void; - onRowMouseOver?: (info: RowClickHandlerParams) => void; - onRowsRendered?: (info: RowClickHandlerParams) => void; - overscanRowCount?: number; - onScroll?: (info: { clientHeight: number, scrollHeight: number, scrollTop: number }) => void; - rowClassName?: string | ((info: IndexParam) => string); - rowCount: number; - rowGetter?: (info: IndexParam) => any; - rowHeight: number | ((info: IndexParam) => number); - rowRenderer?: TableRowRenderer; - headerRowRenderer?: TableHeaderRowRenderer; - rowStyle?: React.CSSProperties | ((info: IndexParam) => React.CSSProperties); - scrollToAlignment?: string; - scrollToIndex?: number; - scrollTop?: number; - sort?: (info: { sortBy: string, sortDirection: SortDirectionType }) => void; - sortBy?: string; - sortDirection?: SortDirectionType; - style?: React.CSSProperties; - tabIndex?: number; - width?: number; -} -export class Table extends React.PureComponent { - forceUpdateGrid(): void; - /** See Grid#measureAllCells */ - measureAllRows(): void; - /** See Grid#recomputeGridSize */ - recomputeRowHeights(index?: number): void; - /** See Grid#scrollToCell */ - scrollToRow(index?: number): void; - Grid: Grid; +export type OverscanIndexRange = { + overscanStartIndex: number, + overscanStopIndex: number, } -export const defaultTableCellDataGetter: TableCellDataGetter; -export const defaultTableCellRenderer: TableCellRenderer; -export const defaultTableHeaderRenderer: () => React.ReactElement[]; -export const defaultTableHeaderRowRenderer: TableHeaderRowRenderer; -export const defaultTableRowRenderer: TableRowRenderer; - -interface ISortDirection { - /** - * Sort items in ascending order. - * This means arranging from the lowest value to the highest (e.g. a-z, 0-9). - */ - ASC: 'ASC', - - /** - * Sort items in descending order. - * This means arranging from the highest value to the lowest (e.g. z-a, 9-0). - */ - DESC: 'DESC' -} - -export const SortDirection: ISortDirection - -export type SortDirectionType = 'ASC' | 'DESC' - -export const SortIndicator: React.StatelessComponent<{ sortDirection: SortDirectionType }> - - -export type DefaultCellRangeRendererParams = { - cellCache: Object, - cellRenderer: Function, - columnSizeAndPositionManager: Object, - columnStartIndex: number, - columnStopIndex: number, - horizontalOffsetAdjustment: number, - isScrolling: boolean, - rowSizeAndPositionManager: Object, - rowStartIndex: number, - rowStopIndex: number, - scrollLeft: number, - scrollTop: number, - styleCache: Object, - verticalOffsetAdjustment: number, - visibleColumnIndices: Object, - visibleRowIndices: Object -}; -export function defaultCellRangeRenderer(params: DefaultCellRangeRendererParams): React.ReactElement; - - -export type GridCellRendererParams = { - columnIndex: number; - isScrolling: boolean; - isVisible: boolean; - key: string; - parent: Grid | List | Table; - rowIndex: number; - style: React.CSSProperties; -}; -export type GridCellRenderer = (params: GridCellRendererParams) => React.ReactNode; - -export type ConfigureParams = { - cellCount: number, - estimatedCellSize: number -}; -export type ContainerSizeAndOffset = { - containerSize: number, - offset: number -}; -export type SizeAndPositionData = { - offset: number, - size: number -}; -export type GetVisibleCellRangeParams = { - containerSize: number, - offset: number -}; -export type VisibleCellRange = { - start: number; - stop: number; -} - -export type CellSizeAndPositionManager = { - areOffsetsAdjusted(): boolean; - configure({ - cellCount, - estimatedCellSize - }: ConfigureParams): void; - getCellCount(): number; - getEstimatedCellSize(): number; - getLastMeasuredIndex(): number; - getOffsetAdjustment({ - containerSize, - offset // safe - }: ContainerSizeAndOffset): number; - /** - * This method returns the size and position for the cell at the specified index. - * It just-in-time calculates (or used cached values) for cells leading up to the index. - */ - getSizeAndPositionOfCell(index: number): SizeAndPositionData; - getSizeAndPositionOfLastMeasuredCell(): SizeAndPositionData; - /** - * Total size of all cells being measured. - * This value will be completedly estimated initially. - * As cells as measured the estimate will be updated. - */ - getTotalSize(): number; - /** - * Determines a new offset that ensures a certain cell is visible, given the current offset. - * If the cell is already visible then the current offset will be returned. - * If the current offset is too great or small, it will be adjusted just enough to ensure the specified index is visible. - * - * @param align Desired alignment within container; one of "auto" (default), "start", or "end" - * @param containerSize Size (width or height) of the container viewport - * @param currentOffset Container's current (x or y) offset - * @param totalSize Total size (width or height) of all cells - * @return Offset to use to ensure the specified cell is visible - */ - getUpdatedOffsetForIndex(params: { - align: string, - containerSize: number, - currentOffset: number, - targetIndex: number - }): number; - getVisibleCellRange(params: GetVisibleCellRangeParams): VisibleCellRange; - /** - * Clear all cached values for cells after the specified index. - * This method should be called for any cell that has changed its size. - * It will not immediately perform any calculations; they'll be performed the next time getSizeAndPositionOfCell() is called. - */ - resetCell(index: number): void -} - -export type GridCellRangeRendererParams = { - cellCache: Map, - cellRenderer: GridCellRenderer, - columnSizeAndPositionManager: CellSizeAndPositionManager, - columnStartIndex: number, - columnStopIndex: number, - isScrolling: boolean, - rowSizeAndPositionManager: CellSizeAndPositionManager, - rowStartIndex: number, - rowStopIndex: number, - scrollLeft: number, +export type ScrollEventData = { + clientHeight: number, + scrollHeight: number, scrollTop: number } -export type GridCellRangeRenderer = (params: GridCellRangeRendererParams) => React.ReactNode[]; -// TODO add proper typing -export type GridProps = { - 'aria-label'?: string; - autoContainerWidth?: boolean; - autoHeight?: boolean; - cellRenderer: GridCellRenderer; - cellRangeRenderer?: GridCellRangeRenderer; - className?: string; - columnCount: number; - columnWidth: number | ((params: IndexParam) => number); - containerStyle?: React.CSSProperties; - deferredMeasurementCache?: CellMeasurerCache; - estimatedColumnSize?: number; - estimatedRowSize?: number; - getScrollbarSize?: () => number; - height: number; - id?: string; - noContentRenderer?: () => React.ReactNode; - onScroll?: (params: { clientHeight: number, clientWidth: number, scrollHeight: number, scrollLeft: number, scrollTop: number, scrollWidth: number }) => any; - onSectionRendered?: (params: { columnStartIndex: number, columnStopIndex: number, rowStartIndex: number, rowStopIndex: number }) => any; - overscanColumnCount?: number; - overscanIndicesGetter?: (params: { - cellCount: number, - overscanCellsCount: number, - scrollDirection: number, - startIndex: number, - stopIndex: number - }) => { overscanStartIndex: number, overscanStopIndex: number }; - overscanRowCount?: number; - rowHeight: number | ((params: IndexParam) => number); - rowCount: number; - scrollingResetTimeInterval?: number; - scrollLeft?: number; - scrollToAlignment?: 'auto' | 'end' | 'start' | 'center'; - scrollToColumn?: number; - scrollTop?: number; - scrollToRow?: number; - style?: React.CSSProperties; - tabIndex?: number; - width: number; -}; -export class Grid extends React.PureComponent { - /** - * Invalidate Grid size and recompute visible cells. - * This is a deferred wrapper for recomputeGridSize(). - * It sets a flag to be evaluated on cDM/cDU to avoid unnecessary renders. - * This method is intended for advanced use-cases like CellMeasurer. - */ - invalidateCellSizeAfterRender(params: { - columnIndex: number, - rowIndex: number - }): void; - /** - * Pre-measure all columns and rows in a Grid. - * Typically cells are only measured as needed and estimated sizes are used for cells that have not yet been measured. - * This method ensures that the next call to getTotalSize() returns an exact size (as opposed to just an estimated one). - */ - measureAllCells(): void; - /** - * Forced recompute of row heights and column widths. - * This function should be called if dynamic column or row sizes have changed but nothing else has. - * Since Grid only receives :columnCount and :rowCount it has no way of detecting when the underlying data changes. - */ - recomputeGridSize(params?: { - columnIndex?: number, - rowIndex?: number - }): void; - /** - * Ensure column and row are visible. - */ - scrollToCell(params: { - columnIndex: number, - rowIndex: number - }): void; -} - -export type InfiniteLoaderProps = { - children?: React.StatelessComponent<{ - onRowsRendered: (params: { startIndex: number, stopIndex: number }) => void, - registerChild: (registeredChild: any) => void - }>; - isRowLoaded: (params: IndexParam) => boolean; - loadMoreRows: (params: { startIndex: number, stopIndex: number }) => Promise; - minimumBatchSize?: number; - rowCount?: number; - threshold?: number; -}; -export class InfiniteLoader extends React.PureComponent { } -export type ListRowRenderer = (params: GridCellRendererParams & { index: number, style: React.CSSProperties }) => React.ReactNode; -export interface ListProps { - className?: string; - autoHeight?: boolean; - estimatedRowSize?: number; - height: number; - noRowsRenderer?: Function; - onRowsRendered?: (info: { overscanStartIndex: number, overscanStopIndex: number, startIndex: number, stopIndex: number }) => void; - onScroll?: (info: { clientHeight: number, scrollHeight: number, scrollTop: number }) => void; - overscanRowCount?: number; - rowHeight: number | ((info: IndexParam) => number); - rowRenderer: ListRowRenderer; - rowCount: number; - scrollToAlignment?: string; - scrollToIndex?: number; - scrollTop?: number; - style?: React.CSSProperties; - tabIndex?: number; - width: number; -} -export class List extends React.PureComponent { } - -export interface MultiGridProps { - fixedColumnCount: number; - fixedRowCount: number; - style: React.CSSProperties; - styleBottomLeftGrid: React.CSSProperties; - styleBottomRightGrid: React.CSSProperties; - styleTopLeftGrid: React.CSSProperties; - styleTopRightGrid: React.CSSProperties; -} -export class MultiGrid extends React.PureComponent { } - -export type ScrollSyncProps = { - children?: React.StatelessComponent<{ - clientHeight: number, - clientWidth: number, - onScroll: (params: { clientHeight: number, clientWidth: number, scrollHeight: number, scrollLeft: number, scrollTop: number, scrollWidth: number }) => void, - scrollHeight: number, - scrollLeft: number, - scrollTop: number, - scrollWidth: number - }>; -}; -export class ScrollSync extends React.PureComponent { } -export type WindowScrollerRenderCallBackParams = { - height: number, - isScrolling: boolean, - scrollTop: number -}; - -export type WindowScrollerProps = { - children?: React.StatelessComponent; - onResize?: (prams: { height: number }) => void; - onScroll?: (params: { scrollTop: number }) => void; - scrollElement?: HTMLElement; -} -export class WindowScroller extends React.PureComponent { } diff --git a/types/react-virtualized/react-virtualized-tests.tsx b/types/react-virtualized/react-virtualized-tests.tsx index aa1dc087a9..18de45e25a 100644 --- a/types/react-virtualized/react-virtualized-tests.tsx +++ b/types/react-virtualized/react-virtualized-tests.tsx @@ -1,156 +1,106 @@ -import * as React from "react"; -import * as ReactDOM from "react-dom"; +import * as React from 'react'; +import { PureComponent } from 'react' +import { ArrowKeyStepper, AutoSizer, Grid } from 'react-virtualized' -import { - Collection, - SortDirection, - Grid, - ArrowKeyStepper, - AutoSizer, - CellMeasurer, - ColumnSizer, - InfiniteLoader, - ScrollSync, - WindowScroller, - WindowScrollerRenderCallBackParams, - List, - Column, - Table, -} from "react-virtualized"; +export class ArrowKeyStepperExample extends PureComponent { + constructor(props) { + super(props) -/* - * Collection - */ + this._getColumnWidth = this._getColumnWidth.bind(this) + this._getRowHeight = this._getRowHeight.bind(this) + this._cellRenderer = this._cellRenderer.bind(this) + } -function CollectionTest() { - const list = [ - { name: "Brian Vaughn", x: 13, y: 34, width: 123, size: 234, height: 123 } - ]; + render() { + const { mode } = this.state - // Render your grid - ReactDOM.render( - list[index].name} - cellSizeAndPositionGetter={({ index }) => { - const datum = list[index]; - return { - height: datum.height, - width: datum.width, - x: datum.x, - y: datum.y - }; - }} - />, - document.getElementById("example") - ); + return ( + + + {({ onSectionRendered, scrollToColumn, scrollToRow }) => ( +
+ + + {({ width }) => ( + this._cellRenderer({ columnIndex, key, rowIndex, scrollToColumn, scrollToRow, style })} + rowHeight={this._getRowHeight} + rowCount={100} + scrollToColumn={scrollToColumn} + scrollToRow={scrollToRow} + width={width} + /> + )} + +
+ )} +
+ ) + } + + _getColumnWidth({ index }) { + return (1 + (index % 3)) * 60 + } + + _getRowHeight({ index }) { + return (1 + (index % 3)) * 30 + } + + _cellRenderer({ columnIndex, key, rowIndex, scrollToColumn, scrollToRow, style }) { + + return ( +
+ {`r:${rowIndex}, c:${columnIndex}`} +
+ ) + } } -function GridTest() { - // Grid data as an array of arrays - const list = [ - ['Brian Vaughn', 'Software Engineer', 'San Jose', 'CA', 95125 /* ... */] - // And so on... - ]; +import { List } from 'react-virtualized' - // Render your grid - ReactDOM.render( - list[rowIndex][columnIndex]} - />, - document.getElementById('example') - ); -} +export class AutoSizerExample extends PureComponent { + constructor(props) { + super(props) -function ListTest() { - // List data - const list = [ - { name: 'Brian Vaughn', occupation: 'Software Engineer', location: 'San Jose, CA, 95125' /* ... */ } - // And so on... - ]; + this._rowRenderer = this._rowRenderer.bind(this) + } - // Render your List - ReactDOM.render( - list[index]} - />, - document.getElementById('example') - ); -} + render() { + const { list } = this.context + const { hideDescription } = this.state -function TableTest() { - const list = [ - { name: 'Brian Vaughn', description: 'Software engineer' } - // And so on... - ]; - ReactDOM.render( - list[index]} - > - - -
, - document.getElementById('example') - ); -} + return ( + + {({ width, height }) => ( + + )} + + ) + } -function ArrowKeyStepperTest() { - const columnCount = 12; - const rowCount = 3; - - ReactDOM.render( - - {({ onSectionRendered, scrollToColumn, scrollToRow }) => ( - null} - columnCount={columnCount} - onSectionRendered={onSectionRendered} - rowCount={rowCount} - scrollToColumn={scrollToColumn} - scrollToRow={scrollToRow} - /> - )} - , - document.getElementById('example') - ); -} - -function AutoSizerTest() { - // List data as an array of strings - const list = [ - 'Brian Vaughn' - // And so on... - ]; - const _rowRenderer = ({ index, key, style }) => { - - const row = list[index]; + _rowRenderer({ index, key, style }) { + const { list } = this.context + const row = list.get(index) return (
- {row} + {row.name} +
+ ) + } +} +import { } from 'react' +import { CellMeasurer, CellMeasurerCache } from 'react-virtualized' + +export class DynamicHeightList extends PureComponent { + + _cache: CellMeasurerCache + + constructor(props, context) { + super(props, context) + + this._cache = new CellMeasurerCache({ + fixedWidth: true, + minHeight: 50 + }) + + this._rowRenderer = this._rowRenderer.bind(this) + } + + render() { + const { width } = this.props + + return ( + + ) + } + + _rowRenderer({ index, isScrolling, key, parent, style }) { + const { getClassName, list } = this.props + + const datum = list.get(index % list.size) + const classNames = getClassName({ columnIndex: 0, rowIndex: index }) + + const imageWidth = 300 + const imageHeight = datum.size * 2 + + const source = `http://fillmurray.com/${imageWidth}/${imageHeight}` + + return ( + + {({ measure }) => ( +
+ +
+ )} +
+ ) + } +} + +import { Collection } from 'react-virtualized' + +// Defines a pattern of sizes and positions for a range of 10 rotating cells +// These cells cover an area of 600 (wide) x 400 (tall) +const GUTTER_SIZE = 3 +const CELL_WIDTH = 75 + +export class CollectionExample extends PureComponent { + _columnYMap: any; + + constructor(props, context) { + super(props, context) + + this.context = context; + + this.state = { + cellCount: context.list.size, + columnCount: this._getColumnCount(context.list.size), + height: 300, + horizontalOverscanSize: 0, + scrollToCell: undefined, + showScrollingPlaceholder: false, + verticalOverscanSize: 0 + } + + this._columnYMap = [] + + this._cellRenderer = this._cellRenderer.bind(this) + this._cellSizeAndPositionGetter = this._cellSizeAndPositionGetter.bind(this) + this._noContentRenderer = this._noContentRenderer.bind(this) + this._onCellCountChange = this._onCellCountChange.bind(this) + this._onHeightChange = this._onHeightChange.bind(this) + this._onHorizontalOverscanSizeChange = this._onHorizontalOverscanSizeChange.bind(this) + this._onScrollToCellChange = this._onScrollToCellChange.bind(this) + this._onVerticalOverscanSizeChange = this._onVerticalOverscanSizeChange.bind(this) + } + + render() { + const { cellCount, height, horizontalOverscanSize, scrollToCell, showScrollingPlaceholder, verticalOverscanSize } = this.state + + return ( + + {({ width }) => ( + + )} + + ) + } + + _cellRenderer({ index, isScrolling, key, style }) { + const { list } = this.context + const { showScrollingPlaceholder } = this.state + + const datum = list.get(index % list.size) + + // Customize style + style.backgroundColor = datum.color + + return ( +
+ {showScrollingPlaceholder && isScrolling ? '...' : index}
) } - // Render your list - ReactDOM.render( - - {({ width, height }) => ( - { - const row = list[index]; + _cellSizeAndPositionGetter({ index }) { + const { list } = this.context + const { columnCount } = this.state - return ( -
- {row} -
- ) - }} - width={width} - /> - )} -
, - document.getElementById('example') - ); -} + const columnPosition = index % (columnCount || 1) + const datum = list.get(index % list.size) -function CellMeasurerTest() { - const columnCount = 12; - const rowCount = 3; - const cellRenderer = ({ columnIndex, rowIndex }) => `${rowIndex}, ${columnIndex}`; - const fixedRowHeight = 42; - const height = 12; - const width = 12; + // Poor man's Masonry layout; columns won't all line up equally with the bottom. + const height = datum.size + const width = CELL_WIDTH + const x = columnPosition * (GUTTER_SIZE + width) + const y = this._columnYMap[columnPosition] || 0 - ReactDOM.render( - - {({ getColumnWidth }) => ( - - )} - , - document.getElementById('example') - ); -} + this._columnYMap[columnPosition] = y + height + GUTTER_SIZE -function ColumnSizerTest() { - ReactDOM.render( - - {({ adjustedWidth, getColumnWidth, registerChild }) => ( - "test"} - rowHeight={50} - rowCount={12} - width={adjustedWidth} - /> - )} - , - document.getElementById('example') - ); -} - -function InfiniteLoaderTest() { - const list: string[] = []; - - function isRowLoaded({ index }) { - return !!list[index]; + return { + height, + width, + x, + y + } } - function loadMoreRows({ startIndex, stopIndex }: { startIndex: number, stopIndex: number }) { - return new Promise(resolve => resolve(list.push('test'))); + _getColumnCount(cellCount) { + return Math.round(Math.sqrt(cellCount)) } - function rowRenderer({ index, key, style }) { - const content = list[index]; + _onHorizontalOverscanSizeChange(event) { + const horizontalOverscanSize = parseInt(event.target.value, 10) || 0 + + this.setState({ horizontalOverscanSize }) + } + + _noContentRenderer() { + return ( +
+ No cells +
+ ) + } + + _onCellCountChange(event) { + const cellCount = parseInt(event.target.value, 10) || 0 + + this._columnYMap = [] + + this.setState({ + cellCount, + columnCount: this._getColumnCount(cellCount) + }) + } + + _onHeightChange(event) { + const height = parseInt(event.target.value, 10) || 0 + + this.setState({ height }) + } + + _onScrollToCellChange(event) { + const { cellCount } = this.state + + let scrollToCell = Math.min(cellCount - 1, parseInt(event.target.value, 10)) + + if (isNaN(scrollToCell)) { + scrollToCell = undefined + } + + this.setState({ scrollToCell }) + } + + _onVerticalOverscanSizeChange(event) { + const verticalOverscanSize = parseInt(event.target.value, 10) || 0 + + this.setState({ verticalOverscanSize }) + } +} + +import { ColumnSizer } from 'react-virtualized' + +export class ColumnSizerExample extends PureComponent { + constructor(props) { + super(props) + + this._noColumnMaxWidthChange = this._noColumnMaxWidthChange.bind(this) + this._noColumnMinWidthChange = this._noColumnMinWidthChange.bind(this) + this._onColumnCountChange = this._onColumnCountChange.bind(this) + this._noContentRenderer = this._noContentRenderer.bind(this) + this._cellRenderer = this._cellRenderer.bind(this) + } + + render() { + const { + columnMaxWidth, + columnMinWidth, + columnCount + } = this.state + + return ( +
+ + {({ width }) => ( + + {({ adjustedWidth, getColumnWidth, registerChild }) => ( +
+ +
+ )} +
+ )} +
+
+ ) + } + + _noColumnMaxWidthChange(event) { + let columnMaxWidth = parseInt(event.target.value, 10) + + if (isNaN(columnMaxWidth)) { + columnMaxWidth = undefined + } else { + columnMaxWidth = Math.min(1000, columnMaxWidth) + } + + this.setState({ columnMaxWidth }) + } + + _noColumnMinWidthChange(event) { + let columnMinWidth = parseInt(event.target.value, 10) + + if (isNaN(columnMinWidth)) { + columnMinWidth = undefined + } else { + columnMinWidth = Math.max(1, columnMinWidth) + } + + this.setState({ columnMinWidth }) + } + + _onColumnCountChange(event) { + this.setState({ columnCount: parseInt(event.target.value, 10) || 0 }) + } + + _noContentRenderer() { + return ( +
+ No cells +
+ ) + } + + _cellRenderer({ columnIndex, key, rowIndex, style }) { + const className = columnIndex === 0 + ? 'styles.firstCell' + : 'styles.cell' + + return ( +
+ {`R:${rowIndex}, C:${columnIndex}`} +
+ ) + } +} + +export class GridExample extends PureComponent { + constructor(props, context) { + super(props, context) + + this.state = { + columnCount: 1000, + height: 300, + overscanColumnCount: 0, + overscanRowCount: 10, + rowHeight: 40, + rowCount: 1000, + scrollToColumn: undefined, + scrollToRow: undefined, + useDynamicRowHeight: false + } + + this._cellRenderer = this._cellRenderer.bind(this) + this._getColumnWidth = this._getColumnWidth.bind(this) + this._getRowClassName = this._getRowClassName.bind(this) + this._getRowHeight = this._getRowHeight.bind(this) + this._noContentRenderer = this._noContentRenderer.bind(this) + this._onColumnCountChange = this._onColumnCountChange.bind(this) + this._onRowCountChange = this._onRowCountChange.bind(this) + this._onScrollToColumnChange = this._onScrollToColumnChange.bind(this) + this._onScrollToRowChange = this._onScrollToRowChange.bind(this) + this._renderBodyCell = this._renderBodyCell.bind(this) + this._renderLeftSideCell = this._renderLeftSideCell.bind(this) + } + + render() { + const { + columnCount, + height, + overscanColumnCount, + overscanRowCount, + rowHeight, + rowCount, + scrollToColumn, + scrollToRow, + useDynamicRowHeight + } = this.state + + return ( + + + {({ width }) => ( + + )} + + ) + } + + _cellRenderer({ columnIndex, key, rowIndex, style }) { + if (columnIndex === 0) { + return this._renderLeftSideCell({ key, rowIndex, style }) + } else { + return this._renderBodyCell({ columnIndex, key, rowIndex, style }) + } + } + + _getColumnWidth({ index }) { + switch (index) { + case 0: + return 50 + case 1: + return 100 + case 2: + return 300 + default: + return 80 + } + } + + _getDatum(index) { + const { list } = this.context + + return list.get(index % list.size) + } + + _getRowClassName(row) { + return row % 2 === 0 ? 'styles.evenRow' : 'styles.oddRow' + } + + _getRowHeight({ index }) { + return this._getDatum(index).size + } + + _noContentRenderer() { + return ( +
+ No cells +
+ ) + } + + _renderBodyCell({ columnIndex, key, rowIndex, style }) { + const rowClass = this._getRowClassName(rowIndex) + const datum = this._getDatum(rowIndex) + + let content + + switch (columnIndex) { + case 1: + content = datum.name + break + case 2: + content = datum.random + break + default: + content = `r:${rowIndex}, c:${columnIndex}` + break + } + + return ( +
+ {content} +
+ ) + } + + _renderLeftSideCell({ key, rowIndex, style }) { + const datum = this._getDatum(rowIndex) + + // Don't modify styles. + // These are frozen by React now (as of 16.0.0). + // Since Grid caches and re-uses them, they aren't safe to modify. + style = { + ...style, + backgroundColor: datum.color + } + + return ( +
+ {datum.name.charAt(0)} +
+ ) + } + + _updateUseDynamicRowHeights(value) { + this.setState({ + useDynamicRowHeight: value + }) + } + + _onColumnCountChange(event) { + const columnCount = parseInt(event.target.value, 10) || 0 + + this.setState({ columnCount }) + } + + _onRowCountChange(event) { + const rowCount = parseInt(event.target.value, 10) || 0 + + this.setState({ rowCount }) + } + + _onScrollToColumnChange(event) { + const { columnCount } = this.state + let scrollToColumn = Math.min(columnCount - 1, parseInt(event.target.value, 10)) + + if (isNaN(scrollToColumn)) { + scrollToColumn = undefined + } + + this.setState({ scrollToColumn }) + } + + _onScrollToRowChange(event) { + const { rowCount } = this.state + let scrollToRow = Math.min(rowCount - 1, parseInt(event.target.value, 10)) + + if (isNaN(scrollToRow)) { + scrollToRow = undefined + } + + this.setState({ scrollToRow }) + } +} + +import { InfiniteLoader } from 'react-virtualized' + +const STATUS_LOADING = 1 +const STATUS_LOADED = 2 + +export class InfiniteLoaderExample extends PureComponent { + _timeoutIdMap: any; + + constructor(props) { + super(props) + + this._timeoutIdMap = {} + + this._clearData = this._clearData.bind(this) + this._isRowLoaded = this._isRowLoaded.bind(this) + this._loadMoreRows = this._loadMoreRows.bind(this) + this._rowRenderer = this._rowRenderer.bind(this) + } + + componentWillUnmount() { + Object.keys(this._timeoutIdMap).forEach(timeoutId => { + clearTimeout(timeoutId as any) + }) + } + + render() { + const { list } = this.context + const { loadedRowCount, loadingRowCount } = this.state + + return ( + + {({ onRowsRendered, registerChild }) => ( + + {({ width }) => ( + + )} + + )} + + ) + } + + _clearData() { + this.setState({ + loadedRowCount: 0, + loadedRowsMap: {}, + loadingRowCount: 0 + }) + } + + _isRowLoaded({ index }) { + const { loadedRowsMap } = this.state + return !!loadedRowsMap[index] // STATUS_LOADING or STATUS_LOADED + } + + _loadMoreRows({ startIndex, stopIndex }) { + const { loadedRowsMap, loadingRowCount } = this.state + const increment = stopIndex - startIndex + 1 + + for (let i = startIndex; i <= stopIndex; i++) { + loadedRowsMap[i] = STATUS_LOADING + } + + this.setState({ + loadingRowCount: loadingRowCount + increment + }) + + const timeoutId = setTimeout(() => { + const { loadedRowCount, loadingRowCount } = this.state + + delete this._timeoutIdMap[timeoutId] + + for (let i = startIndex; i <= stopIndex; i++) { + loadedRowsMap[i] = STATUS_LOADED + } + + this.setState({ + loadingRowCount: loadingRowCount - increment, + loadedRowCount: loadedRowCount + increment + }) + + promiseResolver() + }, 1000 + Math.round(Math.random() * 2000)) + + this._timeoutIdMap[timeoutId] = true + + let promiseResolver + + return new Promise(resolve => { + promiseResolver = resolve + }) + } + + _rowRenderer({ index, key, style }) { + const { list } = this.context + const { loadedRowsMap } = this.state + + const row = list.get(index) + let content + + if (loadedRowsMap[index] === STATUS_LOADED) { + content = row.name + } else { + content = ( +
+ ) + } return (
) } - - - // Render your list - ReactDOM.render( - - {({ onRowsRendered, registerChild }) => ( - - {({ width }) => ( - - )} - - )} - , - document.getElementById('example') - ); } -function ScrollSyncTest() { - function hexToRgb(hex) { - const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex) - return result ? { - r: parseInt(result[1], 16), - g: parseInt(result[2], 16), - b: parseInt(result[3], 16) - } : null +export class ListExample extends PureComponent { + + constructor(props, context) { + super(props, context) + + this.state = { + listHeight: 300, + listRowHeight: 50, + overscanRowCount: 10, + rowCount: context.list.size, + scrollToIndex: undefined, + showScrollingPlaceholder: false, + useDynamicRowHeight: false + } + + this._getRowHeight = this._getRowHeight.bind(this) + this._noRowsRenderer = this._noRowsRenderer.bind(this) + this._onRowCountChange = this._onRowCountChange.bind(this) + this._onScrollToRowChange = this._onScrollToRowChange.bind(this) + this._rowRenderer = this._rowRenderer.bind(this) } - const LEFT_COLOR_FROM = hexToRgb('#471061') - const LEFT_COLOR_TO = hexToRgb('#BC3959') - const TOP_COLOR_FROM = hexToRgb('#000000') - const TOP_COLOR_TO = hexToRgb('#333333') - const columnWidth = 20; - const rowHeight = 10; - const overscanColumnCount = 10; - const overscanRowCount = 10; - const height = 10; - const rowCount = 100; - const columnCount = 100; + render() { + const { + listHeight, + listRowHeight, + overscanRowCount, + rowCount, + scrollToIndex, + showScrollingPlaceholder, + useDynamicRowHeight + } = this.state + return ( + + {({ width }) => ( + + )} + + ) + } - function mixColors(color1, color2, amount) { - const weight1 = amount - const weight2 = 1 - amount + _getDatum(index) { + const { list } = this.context - const r = Math.round(weight1 * color1.r + weight2 * color2.r) - const g = Math.round(weight1 * color1.g + weight2 * color2.g) - const b = Math.round(weight1 * color1.b + weight2 * color2.b) + return list.get(index % list.size) + } - return { r, g, b } - }; + _getRowHeight({ index }) { + return this._getDatum(index).size + } - function renderLeftHeaderCell({ columnIndex, key, rowIndex, style }) { + _noRowsRenderer() { + return ( +
+ No rows +
+ ) + } + + _onRowCountChange(event) { + const rowCount = parseInt(event.target.value, 10) || 0 + + this.setState({ rowCount }) + } + + _onScrollToRowChange(event) { + const { rowCount } = this.state + let scrollToIndex = Math.min(rowCount - 1, parseInt(event.target.value, 10)) + + if (isNaN(scrollToIndex)) { + scrollToIndex = undefined + } + + this.setState({ scrollToIndex }) + } + + _rowRenderer({ index, isScrolling, key, style }) { + const { + showScrollingPlaceholder, + useDynamicRowHeight + } = this.state + + if ( + showScrollingPlaceholder && + isScrolling + ) { + return ( +
+ Scrolling... +
+ ) + } + + const datum = this._getDatum(index) + + let additionalContent + + if (useDynamicRowHeight) { + switch (datum.size) { + case 75: + additionalContent =
It is medium-sized.
+ break + case 100: + additionalContent =
It is large-sized.
It has a 3rd row.
+ break + } + } + + return ( +
+
+ {datum.name.charAt(0)} +
+
+
+ {datum.name} +
+
+ This is row {index} +
+ {additionalContent} +
+ {useDynamicRowHeight && + + {datum.size}px + + } +
+ ) + } +} + +import { + WindowScroller, + createMasonryCellPositioner as createCellPositioner, + Positioner, + Masonry, + MasonryCellProps +} from 'react-virtualized' + +export class GridExample2 extends PureComponent { + _columnCount: number; + _cache: CellMeasurerCache; + _columnHeights: any; + _width: number; + _height: number; + _scrollTop: number; + _cellPositioner?: Positioner; + _masonry: Masonry; + + constructor(props, context) { + super(props, context) + + this._columnCount = 0 + + this._cache = new CellMeasurerCache({ + defaultHeight: 250, + defaultWidth: 200, + fixedWidth: true + }) + + this._columnHeights = {} + + this.state = { + columnWidth: 200, + height: 300, + gutterSize: 10, + windowScrollerEnabled: false + } + + this._cellRenderer = this._cellRenderer.bind(this) + this._onResize = this._onResize.bind(this) + this._renderAutoSizer = this._renderAutoSizer.bind(this) + this._renderMasonry = this._renderMasonry.bind(this) + this._setMasonryRef = this._setMasonryRef.bind(this) + } + + render() { + const { + columnWidth, + height, + gutterSize, + windowScrollerEnabled + } = this.state + + let child + + if (windowScrollerEnabled) { + child = ( + + {this._renderAutoSizer} + + ) + } else { + child = this._renderAutoSizer({ height }) + } + + return ( +
+ {child} +
+ ) + } + + _calculateColumnCount() { + const { + columnWidth, + gutterSize + } = this.state + + this._columnCount = Math.floor(this._width / (columnWidth + gutterSize)) + } + + _cellRenderer({ index, key, parent, style }: MasonryCellProps) { + const { list } = this.context + const { columnWidth } = this.state + + const datum = list.get(index % list.size) + + return ( + +
+
+ {datum.random} +
+ + ) + } + + _initCellPositioner() { + if (typeof this._cellPositioner === 'undefined') { + const { + columnWidth, + gutterSize + } = this.state + + this._cellPositioner = createCellPositioner({ + cellMeasurerCache: this._cache, + columnCount: this._columnCount, + columnWidth, + spacer: gutterSize + }) + } + } + + _onResize({ height, width }) { + this._width = width + + this._columnHeights = {} + this._calculateColumnCount() + this._resetCellPositioner() + this._masonry.recomputeCellPositions() + } + + _renderAutoSizer({ height, scrollTop }: { height: number, scrollTop?: number }) { + this._height = height + this._scrollTop = scrollTop + + return ( + + {this._renderMasonry} + + ) + } + + _renderMasonry({ width }) { + this._width = width + + this._calculateColumnCount() + this._initCellPositioner() + + const { height, windowScrollerEnabled } = this.state + + return ( + + ) + } + + _resetCellPositioner() { + const { + columnWidth, + gutterSize + } = this.state + + this._cellPositioner.reset({ + columnCount: this._columnCount, + columnWidth, + spacer: gutterSize + }) + } + + _setMasonryRef(ref) { + this._masonry = ref + } +} + +import { MultiGrid } from 'react-virtualized' + +const STYLE: React.CSSProperties = { + border: '1px solid #ddd', + overflow: 'hidden' +} +const STYLE_BOTTOM_LEFT_GRID: React.CSSProperties = { + borderRight: '2px solid #aaa', + backgroundColor: '#f7f7f7' +} +const STYLE_TOP_LEFT_GRID: React.CSSProperties = { + borderBottom: '2px solid #aaa', + borderRight: '2px solid #aaa', + fontWeight: 'bold' +} +const STYLE_TOP_RIGHT_GRID: React.CSSProperties = { + borderBottom: '2px solid #aaa', + fontWeight: 'bold' +} + +export class MultiGridExample extends PureComponent { + state + _onFixedColumnCountChange + _onFixedRowCountChange + _onScrollToColumnChange + _onScrollToRowChange + + constructor(props, context) { + super(props, context) + + this.state = { + fixedColumnCount: 2, + fixedRowCount: 1, + scrollToColumn: 0, + scrollToRow: 0 + } + + this._cellRenderer = this._cellRenderer.bind(this) + this._onFixedColumnCountChange = this._createEventHandler('fixedColumnCount') + this._onFixedRowCountChange = this._createEventHandler('fixedRowCount') + this._onScrollToColumnChange = this._createEventHandler('scrollToColumn') + this._onScrollToRowChange = this._createEventHandler('scrollToRow') + } + + render() { + return ( + + {({ width }) => ( + + )} + + ) + } + + _cellRenderer({ columnIndex, key, rowIndex, style }) { + return ( +
+ {columnIndex}, {rowIndex} +
+ ) + } + + _createEventHandler(property) { + return (event) => { + const value = parseInt(event.target.value, 10) || 0 + + this.setState({ + [property]: value + }) + } + } + + _createLabeledInput(property, eventHandler) { + const value = this.state[property] + + return ( + `` + ) + } +} + +import { ScrollSync } from 'react-virtualized' + +const LEFT_COLOR_FROM = hexToRgb('#471061') +const LEFT_COLOR_TO = hexToRgb('#BC3959') +const TOP_COLOR_FROM = hexToRgb('#000000') +const TOP_COLOR_TO = hexToRgb('#333333') + +function scrollbarSize() { return 42; } +export class GridExample3 extends PureComponent { + state + constructor(props, context) { + super(props, context) + + this.state = { + columnWidth: 75, + columnCount: 50, + height: 300, + overscanColumnCount: 0, + overscanRowCount: 5, + rowHeight: 40, + rowCount: 100 + } + + this._renderBodyCell = this._renderBodyCell.bind(this) + this._renderHeaderCell = this._renderHeaderCell.bind(this) + this._renderLeftSideCell = this._renderLeftSideCell.bind(this) + } + + render() { + const { + columnCount, + columnWidth, + height, + overscanColumnCount, + overscanRowCount, + rowHeight, + rowCount + } = this.state + + return ( + + + {({ clientHeight, clientWidth, onScroll, scrollHeight, scrollLeft, scrollTop, scrollWidth }) => { + const x = scrollLeft / (scrollWidth - clientWidth) + const y = scrollTop / (scrollHeight - clientHeight) + + const leftBackgroundColor = mixColors(LEFT_COLOR_FROM, LEFT_COLOR_TO, y) + const leftColor = '#ffffff' + const topBackgroundColor = mixColors(TOP_COLOR_FROM, TOP_COLOR_TO, x) + const topColor = '#ffffff' + const middleBackgroundColor = mixColors(leftBackgroundColor, topBackgroundColor, 0.5) + const middleColor = '#ffffff' + + return ( +
+
+ +
+
+ +
+
+ + {({ width }) => ( +
+
+ +
+
+ +
+
+ )} +
+
+
+ ) + }} +
+ ) + } + + _renderBodyCell({ columnIndex, key, rowIndex, style }) { + if (columnIndex < 1) { + return + } + + return this._renderLeftSideCell({ columnIndex, key, rowIndex, style }) + } + + _renderHeaderCell({ columnIndex, key, rowIndex, style }) { + if (columnIndex < 1) { + return + } + + return this._renderLeftHeaderCell({ columnIndex, key, rowIndex, style }) + } + + _renderLeftHeaderCell({ columnIndex, key, rowIndex, style }) { return (
) - }; - function renderLeftSideCell({ columnIndex, key, rowIndex, style }) { - const rowClass = rowIndex % 2 === 0 - ? columnIndex % 2 === 0 ? 'styles.evenRow' : 'styles.oddRow' - : columnIndex % 2 !== 0 ? 'styles.evenRow' : 'styles.oddRow' - const classNames = [rowClass, 'styles.cell'].join(' ') + } + _renderLeftSideCell({ columnIndex, key, rowIndex, style }) { return (
{`R${rowIndex}, C${columnIndex}`}
) - }; + } +} - function renderHeaderCell({ columnIndex, key, rowIndex, style }) { - if (columnIndex < 1) { - return +function hexToRgb(hex) { + const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex) + return result ? { + r: parseInt(result[1], 16), + g: parseInt(result[2], 16), + b: parseInt(result[3], 16) + } : null +} + +/** + * Ported from sass implementation in C + * https://github.com/sass/libsass/blob/0e6b4a2850092356aa3ece07c6b249f0221caced/functions.cpp#L209 + */ +function mixColors(color1, color2, amount) { + const weight1 = amount + const weight2 = 1 - amount + + const r = Math.round(weight1 * color1.r + weight2 * color2.r) + const g = Math.round(weight1 * color1.g + weight2 * color2.g) + const b = Math.round(weight1 * color1.b + weight2 * color2.b) + + return { r, g, b } +} + +import { Column, Table, SortDirection, SortIndicator } from 'react-virtualized' + +export class TableExample extends PureComponent { + state; + context; + constructor(props, context) { + super(props, context) + + this.state = { + disableHeader: false, + headerHeight: 30, + height: 270, + hideIndexRow: false, + overscanRowCount: 10, + rowHeight: 40, + rowCount: 1000, + scrollToIndex: undefined, + sortBy: 'index', + sortDirection: SortDirection.ASC, + useDynamicRowHeight: false } - return renderLeftHeaderCell({ columnIndex, key, rowIndex, style }) - }; - - function renderBodyCell({ columnIndex, key, rowIndex, style }) { - if (columnIndex < 1) { - return - } - - return renderLeftSideCell({ columnIndex, key, rowIndex, style }) + this._getRowHeight = this._getRowHeight.bind(this) + this._headerRenderer = this._headerRenderer.bind(this) + this._noRowsRenderer = this._noRowsRenderer.bind(this) + this._onRowCountChange = this._onRowCountChange.bind(this) + this._onScrollToRowChange = this._onScrollToRowChange.bind(this) + this._rowClassName = this._rowClassName.bind(this) + this._sort = this._sort.bind(this) } - return ( - - {({ clientHeight, clientWidth, onScroll, scrollHeight, scrollLeft, scrollTop, scrollWidth }) => { - const x = scrollLeft / (scrollWidth - clientWidth) - const y = scrollTop / (scrollHeight - clientHeight) + render() { + const { + disableHeader, + headerHeight, + height, + hideIndexRow, + overscanRowCount, + rowHeight, + rowCount, + scrollToIndex, + sortBy, + sortDirection, + useDynamicRowHeight + } = this.state - const leftBackgroundColor = mixColors(LEFT_COLOR_FROM, LEFT_COLOR_TO, y) - const leftColor = '#ffffff' - const topBackgroundColor = mixColors(TOP_COLOR_FROM, TOP_COLOR_TO, x) - const topColor = '#ffffff' - const middleBackgroundColor = mixColors(leftBackgroundColor, topBackgroundColor, 0.5) - const middleColor = '#ffffff' - - return ( -
-
- -
-
- -
-
- - {({ width }) => ( -
-
- -
-
- -
-
- )} -
-
-
+ const { list } = this.context + const sortedList = this._isSortEnabled() + ? list + .sortBy(item => item[sortBy]) + .update(list => + sortDirection === SortDirection.DESC + ? list.reverse() + : list ) - }} -
- ); -} + : list -function WindowScrollerTest() { - const onScroll = function ({scrollTop}: { scrollTop: number }) { }; - const onResize = function ({height}: { height: number }) { }; - const list = [ - { name: 'Brian Vaughn', description: 'Software engineer' } - // And so on... - ]; - ReactDOM.render( - - {({ height, isScrolling, scrollTop }) => ( + const rowGetter = ({ index }) => this._getDatum(sortedList, index) + + return ( +
{({ width }) => ( - list[index].name} - scrollTop={scrollTop} + noRowsRenderer={this._noRowsRenderer} + overscanRowCount={overscanRowCount} + rowClassName={this._rowClassName} + rowHeight={useDynamicRowHeight ? this._getRowHeight : rowHeight} + rowGetter={rowGetter} + rowCount={rowCount} + scrollToIndex={scrollToIndex} + sort={this._sort} + sortBy={sortBy} + sortDirection={sortDirection} width={width} - /> + > + {!hideIndexRow && + rowData.index + } + dataKey='index' + disableSort={!this._isSortEnabled()} + width={60} + /> + } + + cellData + } + flexGrow={1} + /> + )} - )} - , - document.getElementById('example') - ); - // test that onScroll & onResize are optional - ReactDOM.render( - , - document.getElementById('example') - ); +
+ ) + } + + _getDatum(list, index) { + return list.get(index % list.size) + } + + _getRowHeight({ index }) { + const { list } = this.context + + return this._getDatum(list, index).size + } + + _headerRenderer({ + columnData, + dataKey, + disableSort, + label, + sortBy, + sortDirection + }) { + return ( +
+ Full Name + {sortBy === dataKey && + + } +
+ ) + } + + _isSortEnabled() { + const { list } = this.context + const { rowCount } = this.state + + return rowCount <= list.size + } + + _noRowsRenderer() { + return ( +
+ No rows +
+ ) + } + + _onRowCountChange(event) { + const rowCount = parseInt(event.target.value, 10) || 0 + + this.setState({ rowCount }) + } + + _onScrollToRowChange(event) { + const { rowCount } = this.state + let scrollToIndex = Math.min(rowCount - 1, parseInt(event.target.value, 10)) + + if (isNaN(scrollToIndex)) { + scrollToIndex = undefined + } + + this.setState({ scrollToIndex }) + } + + _rowClassName({ index }) { + if (index < 0) { + return 'styles.headerRow' + } else { + return index % 2 === 0 ? 'styles.evenRow' : 'styles.oddRow' + } + } + + _sort({ sortBy, sortDirection }) { + this.setState({ sortBy, sortDirection }) + } + + _updateUseDynamicRowHeight(value) { + this.setState({ + useDynamicRowHeight: value + }) + } +} + +export class WindowScrollerExample extends PureComponent { + state; + context; + _windowScroller: WindowScroller; + + constructor(props) { + super(props) + + this.state = { + showHeaderText: true + } + + this._hideHeader = this._hideHeader.bind(this) + this._rowRenderer = this._rowRenderer.bind(this) + this._onCheckboxChange = this._onCheckboxChange.bind(this) + this._setRef = this._setRef.bind(this) + } + + render() { + const { list, isScrollingCustomElement, customElement } = this.context + const { showHeaderText } = this.state + + return ( + +
+ + {({ height, isScrolling, scrollTop }) => ( + + {({ width }) => ( + this._rowRenderer({ index, isScrolling, isVisible, key, style })} + scrollTop={scrollTop} + width={width} + /> + )} + + )} + +
+ ) + } + + _hideHeader() { + const { showHeaderText } = this.state + + this.setState({ + showHeaderText: !showHeaderText + }, () => { + this._windowScroller.updatePosition() + }) + } + + _rowRenderer({ index, isScrolling, isVisible, key, style }) { + const { list } = this.context + const row = list.get(index) + + return ( +
+ {row.name} +
+ ) + } + + _setRef(windowScroller) { + this._windowScroller = windowScroller + } + + _onCheckboxChange(event) { + this.context.setScrollingCustomElement(event.target.checked) + } } diff --git a/types/react-virtualized/tsconfig.json b/types/react-virtualized/tsconfig.json index ac62cf83d8..7e2936975f 100644 --- a/types/react-virtualized/tsconfig.json +++ b/types/react-virtualized/tsconfig.json @@ -19,6 +19,32 @@ }, "files": [ "index.d.ts", + "dist/es/ArrowKeyStepper.d.ts", + "dist/es/AutoSizer.d.ts", + "dist/es/CellMeasurer.d.ts", + "dist/es/Collection.d.ts", + "dist/es/ColumnSizer.d.ts", + "dist/es/Grid.d.ts", + "dist/es/InfiniteLoader.d.ts", + "dist/es/List.d.ts", + "dist/es/Masonry.d.ts", + "dist/es/MultiGrid.d.ts", + "dist/es/ScrollSync.d.ts", + "dist/es/Table.d.ts", + "dist/es/WindowScroller.d.ts", + "dist/commonjs/ArrowKeyStepper.d.ts", + "dist/commonjs/AutoSizer.d.ts", + "dist/commonjs/CellMeasurer.d.ts", + "dist/commonjs/Collection.d.ts", + "dist/commonjs/ColumnSizer.d.ts", + "dist/commonjs/Grid.d.ts", + "dist/commonjs/InfiniteLoader.d.ts", + "dist/commonjs/List.d.ts", + "dist/commonjs/Masonry.d.ts", + "dist/commonjs/MultiGrid.d.ts", + "dist/commonjs/ScrollSync.d.ts", + "dist/commonjs/Table.d.ts", + "dist/commonjs/WindowScroller.d.ts", "react-virtualized-tests.tsx" ] } \ No newline at end of file diff --git a/types/react-virtualized/tslint.json b/types/react-virtualized/tslint.json new file mode 100644 index 0000000000..65f4cad455 --- /dev/null +++ b/types/react-virtualized/tslint.json @@ -0,0 +1,12 @@ +{ + "extends": "../tslint.json", + "rules": { + "interface-over-type-literal": false, + "semicolon": [ + false + ], + "prefer-method-signature": false, + "prefer-declare-function": false, + "no-padding": false + } +} \ No newline at end of file diff --git a/types/reactcss/index.d.ts b/types/reactcss/index.d.ts index 2d571674f7..fe64ed4ce9 100644 --- a/types/reactcss/index.d.ts +++ b/types/reactcss/index.d.ts @@ -1,29 +1,29 @@ -// Type definitions for ReactCSS v1.0.0 +// Type definitions for ReactCSS 1.2.0 // Project: http://reactcss.com/ -// Definitions by: Karol Janyst +// Definitions by: Chris Gervang , Karol Janyst // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.1 +// TypeScript Version: 2.2 import * as React from "react" - -interface LoopableProps { +interface LoopableProps extends React.Props { + "nth-child": number "first-child"?: boolean "last-child"?: boolean even?: boolean odd?: boolean - [nthChild: string]: boolean } -interface HoverProps { +interface HoverProps extends React.Props { hover?: boolean } -interface Classes { - default: any - [scope: string]: any +interface Classes { + default: Partial + [scope: string]: Partial } +export type CSS = React.CSSProperties export function hover(component: React.ComponentClass | React.StatelessComponent): React.ComponentClass -export function loop(i: number, length: number): LoopableProps -export default function reactCSS(classes: Classes, ...activations: Array): any +export function loop(index: number, length: number): LoopableProps +export default function reactCSS(classes: Classes, ...activations: Array): T diff --git a/types/reactcss/reactcss-tests.tsx b/types/reactcss/reactcss-tests.tsx index 058958c7bf..0ba1f69fc2 100644 --- a/types/reactcss/reactcss-tests.tsx +++ b/types/reactcss/reactcss-tests.tsx @@ -1,19 +1,67 @@ import * as React from "react" -import { StatelessComponent } from "react" +import { SFC } from "react" import { render } from "react-dom" -import { default as reactCSS, hover, loop, LoopableProps, HoverProps } from "reactcss" +import { default as reactCSS, hover, loop, LoopableProps, HoverProps, CSS } from "reactcss" -interface TestProps extends HoverProps { } +interface TestHoverProps extends HoverProps { } -var styles: any = reactCSS({ - default: {}, - hover: {} -}, { hover: true }) +const TestHover: SFC = ({hover}) => { + const styles = reactCSS<{title: CSS}>({ + default: { + title: { + color: "black" + } + }, + hover: { + title: { + color: "blue" + } + } + }, { hover }) -var loopProps: LoopableProps = loop(1, 10) + const list = ["First!", "Second!", "Third!"] -var TestComponent: StatelessComponent -var Test = hover(TestComponent) + return ( +
+
+ Cool Title! +
+ + {list.map((item, index) => ( + {item} + ))} +
+ ) +} + +interface TestLoopProps extends LoopableProps { } + +const TestLoop: SFC = (props) => { + const styles = reactCSS<{element: CSS}>({ + default: { + element: { + width: "200px", + border: "1px solid black" + } + }, + "first-child": { + element: { + borderTopLeftRadius: "2px", + borderTopRightRadius: "2px" + } + }, + "last-child": { + element: { + borderBottomLeftRadius: "2px", + borderBottomRightRadius: "2px" + } + } + }, props) + + return
{props.children}
+} + +const Test = hover(TestHover) render( , diff --git a/types/reactstrap/index.d.ts b/types/reactstrap/index.d.ts index 198b410ed4..6dadd6d284 100644 --- a/types/reactstrap/index.d.ts +++ b/types/reactstrap/index.d.ts @@ -4,79 +4,79 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 -export { default as Alert } from './lib/Alert' -export { default as Badge } from './lib/Badge' -export { default as Breadcrumb } from './lib/Breadcrumb' -export { default as BreadcrumbItem } from './lib/BreadcrumbItem' -export { default as Button } from './lib/Button' -export { default as ButtonDropdown } from './lib/ButtonDropdown' -export { default as ButtonGroup } from './lib/ButtonGroup' -export { default as ButtonToolbar } from './lib/ButtonToolbar' -export { default as Card } from './lib/Card' -export { default as CardBlock } from './lib/CardBlock' -export { default as CardColumns } from './lib/CardColumns' -export { default as CardDeck } from './lib/CardDeck' -export { default as CardFooter } from './lib/CardFooter' -export { default as CardGroup } from './lib/CardGroup' -export { default as CardHeader } from './lib/CardHeader' -export { default as CardImg } from './lib/CardImg' -export { default as CardImgOverlay } from './lib/CardImgOverlay' -export { default as CardLink } from './lib/CardLink' -export { default as CardSubtitle } from './lib/CardSubtitle' -export { default as CardText } from './lib/CardText' -export { default as CardTitle } from './lib/CardTitle' -export { default as Col } from './lib/Col' -export { default as Collapse } from './lib/Collapse' -export { default as Container } from './lib/Container' -export { default as Dropdown } from './lib/Dropdown' -export { default as DropdownItem } from './lib/DropdownItem' -export { default as DropdownMenu } from './lib/DropdownMenu' -export { default as DropdownToggle } from './lib/DropdownToggle' -export { default as Fade } from './lib/Fade' -export { default as Form } from './lib/Form' -export { default as FormFeedback } from './lib/FormFeedback' -export { default as FormGroup } from './lib/FormGroup' -export { default as FormText } from './lib/FormText' -export { default as Input } from './lib/Input' -export { default as InputGroup } from './lib/InputGroup' -export { default as InputGroupAddon } from './lib/InputGroupAddon' -export { default as InputGroupButton } from './lib/InputGroupButton' -export { default as Jumbotron } from './lib/Jumbotron' -export { default as Label } from './lib/Label' -export { default as ListGroup } from './lib/ListGroup' -export { default as ListGroupItem } from './lib/ListGroupItem' -export { default as ListGroupItemHeading } from './lib/ListGroupItemHeading' -export { default as ListGroupItemText } from './lib/ListGroupItemText' -export { default as Media } from './lib/Media' -export { default as Modal } from './lib/Modal' -export { default as ModalBody } from './lib/ModalBody' -export { default as ModalFooter } from './lib/ModalFooter' -export { default as ModalHeader } from './lib/ModalHeader' -export { default as Nav } from './lib/Nav' -export { default as Navbar } from './lib/Navbar' -export { default as NavbarBrand } from './lib/NavbarBrand' -export { default as NavbarToggler } from './lib/NavbarToggler' -export { default as NavDropdown } from './lib/NavDropdown' -export { default as NavItem } from './lib/NavItem' -export { default as NavLink } from './lib/NavLink' -export { default as Pagination } from './lib/Pagination' -export { default as PaginationItem } from './lib/PaginationItem' -export { default as PaginationLink } from './lib/PaginationLink' -export { default as Popover } from './lib/Popover' -export { default as PopoverContent } from './lib/PopoverContent' -export { default as PopoverTitle } from './lib/PopoverTitle' -export { default as Progress } from './lib/Progress' -export { default as Row } from './lib/Row' -export { default as TabContent } from './lib/TabContent' -export { default as Table } from './lib/Table' -export { default as TabPane } from './lib/TabPane' -export { default as Tag } from './lib/Tag' -export { default as TetherContent } from './lib/TetherContent' -export { default as Tooltip } from './lib/Tooltip' +export { default as Alert } from './lib/Alert'; +export { default as Badge } from './lib/Badge'; +export { default as Breadcrumb } from './lib/Breadcrumb'; +export { default as BreadcrumbItem } from './lib/BreadcrumbItem'; +export { default as Button } from './lib/Button'; +export { default as ButtonDropdown } from './lib/ButtonDropdown'; +export { default as ButtonGroup } from './lib/ButtonGroup'; +export { default as ButtonToolbar } from './lib/ButtonToolbar'; +export { default as Card } from './lib/Card'; +export { default as CardBlock } from './lib/CardBlock'; +export { default as CardColumns } from './lib/CardColumns'; +export { default as CardDeck } from './lib/CardDeck'; +export { default as CardFooter } from './lib/CardFooter'; +export { default as CardGroup } from './lib/CardGroup'; +export { default as CardHeader } from './lib/CardHeader'; +export { default as CardImg } from './lib/CardImg'; +export { default as CardImgOverlay } from './lib/CardImgOverlay'; +export { default as CardLink } from './lib/CardLink'; +export { default as CardSubtitle } from './lib/CardSubtitle'; +export { default as CardText } from './lib/CardText'; +export { default as CardTitle } from './lib/CardTitle'; +export { default as Col } from './lib/Col'; +export { default as Collapse } from './lib/Collapse'; +export { default as Container } from './lib/Container'; +export { default as Dropdown } from './lib/Dropdown'; +export { default as DropdownItem } from './lib/DropdownItem'; +export { default as DropdownMenu } from './lib/DropdownMenu'; +export { default as DropdownToggle } from './lib/DropdownToggle'; +export { default as Fade } from './lib/Fade'; +export { default as Form } from './lib/Form'; +export { default as FormFeedback } from './lib/FormFeedback'; +export { default as FormGroup } from './lib/FormGroup'; +export { default as FormText } from './lib/FormText'; +export { default as Input } from './lib/Input'; +export { default as InputGroup } from './lib/InputGroup'; +export { default as InputGroupAddon } from './lib/InputGroupAddon'; +export { default as InputGroupButton } from './lib/InputGroupButton'; +export { default as Jumbotron } from './lib/Jumbotron'; +export { default as Label } from './lib/Label'; +export { default as ListGroup } from './lib/ListGroup'; +export { default as ListGroupItem } from './lib/ListGroupItem'; +export { default as ListGroupItemHeading } from './lib/ListGroupItemHeading'; +export { default as ListGroupItemText } from './lib/ListGroupItemText'; +export { default as Media } from './lib/Media'; +export { default as Modal } from './lib/Modal'; +export { default as ModalBody } from './lib/ModalBody'; +export { default as ModalFooter } from './lib/ModalFooter'; +export { default as ModalHeader } from './lib/ModalHeader'; +export { default as Nav } from './lib/Nav'; +export { default as Navbar } from './lib/Navbar'; +export { default as NavbarBrand } from './lib/NavbarBrand'; +export { default as NavbarToggler } from './lib/NavbarToggler'; +export { default as NavDropdown } from './lib/NavDropdown'; +export { default as NavItem } from './lib/NavItem'; +export { default as NavLink } from './lib/NavLink'; +export { default as Pagination } from './lib/Pagination'; +export { default as PaginationItem } from './lib/PaginationItem'; +export { default as PaginationLink } from './lib/PaginationLink'; +export { default as Popover } from './lib/Popover'; +export { default as PopoverContent } from './lib/PopoverContent'; +export { default as PopoverTitle } from './lib/PopoverTitle'; +export { default as Progress } from './lib/Progress'; +export { default as Row } from './lib/Row'; +export { default as TabContent } from './lib/TabContent'; +export { default as Table } from './lib/Table'; +export { default as TabPane } from './lib/TabPane'; +export { default as Tag } from './lib/Tag'; +export { default as TetherContent } from './lib/TetherContent'; +export { default as Tooltip } from './lib/Tooltip'; export { UncontrolledAlert, UncontrolledButtonDropdown, UncontrolledDropdown, UncontrolledNavDropdown, UncontrolledTooltip -} from './lib/Uncontrolled' \ No newline at end of file +} from './lib/Uncontrolled'; diff --git a/types/reactstrap/reactstrap-tests.tsx b/types/reactstrap/reactstrap-tests.tsx index 71ab35ff9b..d4320246b7 100644 --- a/types/reactstrap/reactstrap-tests.tsx +++ b/types/reactstrap/reactstrap-tests.tsx @@ -76,8 +76,7 @@ import { Tooltip } from 'reactstrap'; - -//--------------- Alert +// --------------- Alert const Examplea = (props: any) => { return (
@@ -103,7 +102,7 @@ class AlertExample extends React.Component { this.state = { visible: true - } + }; } onDismiss = () => { @@ -127,7 +126,7 @@ function AlertExample1() { ); } -//--------------- Badge +// --------------- Badge class Example2 extends React.Component { render() { return ( @@ -173,7 +172,7 @@ class Example4 extends React.Component { } } -//------------- Breadcrumbs +// ------------- Breadcrumbs const Example5 = (props: any) => { return (
@@ -206,7 +205,7 @@ const Example6 = (props: any) => { ); }; -//------------- Buttons +// ------------- Buttons class Example7 extends React.Component { render() { return ( @@ -243,35 +242,35 @@ const Example9 = ( {' '}
-) +); const Example10 = (
{' '}
-) +); const Example11 = (
-) +); const Example12 = (
{' '}
-) +); const Example13 = (
{' '}
-) +); class Example14 extends React.Component { constructor(props: any) { @@ -320,7 +319,7 @@ class Example14 extends React.Component { } } -//------------- Button Dropdown +// ------------- Button Dropdown class Example15 extends React.Component { constructor(props: any) { super(props); @@ -368,7 +367,7 @@ const Example16 = ( Another Action -) +); const Example17 = (props: any) => ( true}> @@ -382,7 +381,7 @@ const Example17 = (props: any) => ( Another Action -) +); const Example18 = (
@@ -406,7 +405,7 @@ const Example18 = (
-) +); const Example19 = ( true} dropup> @@ -418,11 +417,9 @@ const Example19 = ( Another Action -) +); - - -//--------------- ButtonGroup +// --------------- ButtonGroup class Example20 extends React.Component { render() { return ( @@ -478,7 +475,7 @@ const Example22 = (props: any) => (
-) +); const Example23 = (props: any) => ( @@ -494,8 +491,7 @@ const Example23 = (props: any) => ( - -) +); const Example24 = (props: any) => ( @@ -511,10 +507,9 @@ const Example24 = (props: any) => ( -) +); - -//------------------ Cards +// ------------------ Cards const Example25 = (props: any) => { return (
@@ -862,8 +857,7 @@ const Example36 = (props: any) => { ); }; - -//------------------ Collapse +// ------------------ Collapse class Example37 extends React.Component { constructor(props: any) { @@ -937,8 +931,7 @@ class Example38 extends React.Component { } } - -//------- Dropdown +// ------- Dropdown class Example39 extends React.Component { constructor(props: any) { @@ -987,11 +980,11 @@ const Example40 = (props: any) => ( Another Action -) +); const Example41 = (props: any) => ( Header -) +); const Example42 = (props: any) => (
@@ -1014,7 +1007,7 @@ const Example42 = (props: any) => (
-) +); class Example43 extends React.Component { constructor(props: any) { @@ -1071,8 +1064,7 @@ function Example44() { ); } - -//------------------ Form +// ------------------ Form class Example45 extends React.Component { render() { return ( @@ -1476,7 +1468,7 @@ const Example53 = (props: any) => {
); -} +}; const Example54 = (props: any) => { return ( @@ -1602,7 +1594,6 @@ const Example59 = (props: any) => { ); }; - const Example60 = (props: any) => { return (
@@ -1933,8 +1924,7 @@ const Example71 = () => { ); }; - -//--------------- Modal +// --------------- Modal class ModalExample72 extends React.Component { constructor(props: any) { super(props); @@ -2322,7 +2312,7 @@ class Example80 extends React.Component { } } -//----------- Pagination +// ----------- Pagination class Example81 extends React.Component { render() { return ( @@ -2363,7 +2353,6 @@ class Example81 extends React.Component { } } - class Example82 extends React.Component { render() { return ( @@ -2404,7 +2393,6 @@ class Example82 extends React.Component { } } - class Example83 extends React.Component { render() { return ( @@ -2465,8 +2453,7 @@ class Example84 extends React.Component { } } - -//------------------------- Popover +// ------------------------- Popover class Example85 extends React.Component { constructor(props: any) { super(props); @@ -2529,7 +2516,7 @@ class PopoverItem extends React.Component { } } -class PopoverExampleMulti extends React.Component { +class PopoverExampleMulti extends React.Component}> { constructor(props: any) { super(props); @@ -2566,8 +2553,7 @@ class PopoverExampleMulti extends React.Component { return ( @@ -2711,8 +2697,7 @@ const Example92 = (props: any) => { ); }; - -//--------------- Table +// --------------- Table class Example93 extends React.Component { render() { return ( @@ -3103,7 +3088,6 @@ class Example101 extends React.Component { } } - class Example102 extends React.Component { constructor(props: any) { super(props); @@ -3132,7 +3116,6 @@ class Example102 extends React.Component { } } - class Example103 extends React.Component { constructor(props: any) { super(props); diff --git a/types/realm/index.d.ts b/types/realm/index.d.ts index 974f2a4ed1..993f0bcc0f 100644 --- a/types/realm/index.d.ts +++ b/types/realm/index.d.ts @@ -6,16 +6,16 @@ declare namespace Realm { /** - * PropertyType - * @see { @link https://realm.io/docs/javascript/latest/api/Realm.html#~PropertyType } - */ - export type PropertyType = string | 'bool' | 'int' | 'float' | 'double' | 'string' | 'data' | 'date' | 'list'; + * PropertyType + * @see { @link https://realm.io/docs/javascript/latest/api/Realm.html#~PropertyType } + */ + type PropertyType = string | 'bool' | 'int' | 'float' | 'double' | 'string' | 'data' | 'date' | 'list'; /** - * ObjectSchemaProperty - * @see { @link https://realm.io/docs/javascript/latest/api/Realm.html#~ObjectSchemaProperty } - */ - export interface ObjectSchemaProperty { + * ObjectSchemaProperty + * @see { @link https://realm.io/docs/javascript/latest/api/Realm.html#~ObjectSchemaProperty } + */ + interface ObjectSchemaProperty { type: PropertyType; objectType?: string; default?: any; @@ -24,33 +24,33 @@ declare namespace Realm { } // properties types - export interface PropertiesTypes { + interface PropertiesTypes { [keys: string]: PropertyType | ObjectSchemaProperty; } /** - * ObjectSchema - * @see { @link https://realm.io/docs/javascript/latest/api/Realm.html#~ObjectSchema } - */ - export interface ObjectSchema { + * ObjectSchema + * @see { @link https://realm.io/docs/javascript/latest/api/Realm.html#~ObjectSchema } + */ + interface ObjectSchema { name: string; primaryKey?: string; properties: PropertiesTypes; } /** - * ObjectClass - * @see { @link https://realm.io/docs/javascript/latest/api/Realm.html#~ObjectClass } - */ - export interface ObjectClass { + * ObjectClass + * @see { @link https://realm.io/docs/javascript/latest/api/Realm.html#~ObjectClass } + */ + interface ObjectClass { schema: ObjectSchema; } /** - * ObjectType - * @see { @link https://realm.io/docs/javascript/latest/api/Realm.html#~ObjectType } - */ - export interface ObjectType { + * ObjectType + * @see { @link https://realm.io/docs/javascript/latest/api/Realm.html#~ObjectType } + */ + interface ObjectType { type: ObjectClass; } @@ -60,10 +60,10 @@ declare namespace Realm { } /** - * realm configuration - * @see { @link https://realm.io/docs/javascript/latest/api/Realm.html#~Configuration } - */ - export interface Configuration { + * realm configuration + * @see { @link https://realm.io/docs/javascript/latest/api/Realm.html#~Configuration } + */ + interface Configuration { encryptionKey?: any; migration?: any; path?: string; @@ -74,35 +74,35 @@ declare namespace Realm { } // object props type - export interface ObjectPropsType { + interface ObjectPropsType { [keys: string]: any; } /** - * SortDescriptor - * @see { @link https://realm.io/docs/javascript/latest/api/Realm.Collection.html#~SortDescriptor } - */ - export type SortDescriptor = string | [string, boolean] | any[]; + * SortDescriptor + * @see { @link https://realm.io/docs/javascript/latest/api/Realm.Collection.html#~SortDescriptor } + */ + type SortDescriptor = string | [string, boolean] | any[]; /** * Iterator * @see { @link https://realm.io/docs/javascript/latest/api/Realm.Collection.html#~Iterator } */ - export interface IteratorResult { + interface IteratorResult { done: boolean; value?: T; } - export interface Iterator { + interface Iterator { next(done: boolean, value?: any): IteratorResult; [Symbol.iterator](): any; } /** - * Collection - * @see { @link https://realm.io/docs/javascript/latest/api/Realm.Collection.html } - */ - export interface Collection { + * Collection + * @see { @link https://realm.io/docs/javascript/latest/api/Realm.Collection.html } + */ + interface Collection { readonly length: number; /** @@ -237,10 +237,10 @@ declare namespace Realm { } /** - * Object - * @see { @link https://realm.io/docs/javascript/latest/api/Realm.Object.html } - */ - export interface Object { + * Object + * @see { @link https://realm.io/docs/javascript/latest/api/Realm.Object.html } + */ + interface Object { /** * @returns boolean */ @@ -248,10 +248,10 @@ declare namespace Realm { } /** - * List - * @see { @link https://realm.io/docs/javascript/latest/api/Realm.List.html } - */ - export interface List extends Collection { + * List + * @see { @link https://realm.io/docs/javascript/latest/api/Realm.List.html } + */ + interface List extends Collection { /** * @returns T */ @@ -284,16 +284,16 @@ declare namespace Realm { } /** - * Results - * @see { @link https://realm.io/docs/javascript/latest/api/Realm.Results.html } - */ - export type Results = Collection; + * Results + * @see { @link https://realm.io/docs/javascript/latest/api/Realm.Results.html } + */ + type Results = Collection; /** * User * @see { @link https://realm.io/docs/javascript/latest/api/Realm.Sync.User.html } */ - export interface User { + interface User { all: any; current: User; readonly identity: string; @@ -313,7 +313,7 @@ declare namespace Realm { * Session * @see { @link https://realm.io/docs/javascript/latest/api/Realm.Sync.Session.html } */ - export interface Session { + interface Session { readonly config: any; readonly state: string; readonly url: string; @@ -324,7 +324,7 @@ declare namespace Realm { * AuthError * @see { @link https://realm.io/docs/javascript/latest/api/Realm.Sync.AuthError.html } */ - export interface AuthError { + interface AuthError { readonly code: number; readonly type: string; } @@ -333,7 +333,7 @@ declare namespace Realm { * ChangeEvent * @see { @link https://realm.io/docs/javascript/latest/api/Realm.Sync.ChangeEvent.html } */ - export interface ChangeEvent { + interface ChangeEvent { readonly changes: any; readonly oldRealm: Realm; readonly path: string; @@ -341,15 +341,15 @@ declare namespace Realm { } /** - * LogLevel - * @see { @link https://realm.io/docs/javascript/latest/api/Realm.Sync.html#~LogLevel } - */ + * LogLevel + * @see { @link https://realm.io/docs/javascript/latest/api/Realm.Sync.html#~LogLevel } + */ type LogLevelType = string | 'error' | 'info' | 'defug'; /** - * Sync - * @see { @link https://realm.io/docs/javascript/latest/api/Realm.Sync.html } - */ + * Sync + * @see { @link https://realm.io/docs/javascript/latest/api/Realm.Sync.html } + */ interface Sync { User: User; Session: Session; diff --git a/types/realm/realm-tests.ts b/types/realm/realm-tests.ts index 71dccefdfa..d8a0d98c4a 100644 --- a/types/realm/realm-tests.ts +++ b/types/realm/realm-tests.ts @@ -67,7 +67,6 @@ const currentVersion = Realm.schemaVersion(Realm.defaultPath); Realm.Sync.User.register('http://localhost:9080', 'username@example.com', 'p@s$w0rd', (error, user) => { /* ... */ }); Realm.Sync.User.login('http://localhost.com:9080', 'username@example.com', 'p@s$w0rd', (error, user) => { - const todoSchema = { name: 'Todo', primaryKey: 'id', diff --git a/types/reduce-reducers/reduce-reducers-tests.ts b/types/reduce-reducers/reduce-reducers-tests.ts index d5eeb02633..f542fe834a 100644 --- a/types/reduce-reducers/reduce-reducers-tests.ts +++ b/types/reduce-reducers/reduce-reducers-tests.ts @@ -5,9 +5,9 @@ import { import reduceReducers from 'reduce-reducers'; interface TestStore { - a: number, - b: string + a: number; + b: string; } -let firstReducer: (state: TestStore, action: Action) => TestStore = (a, b) => a; -let secondReducer: (state: TestStore, action: Action) => TestStore = (a, b) => a -let finalReducer: (state: TestStore, action: Action) => TestStore = reduceReducers(firstReducer, secondReducer); +const firstReducer: (state: TestStore, action: Action) => TestStore = (a, b) => a; +const secondReducer: (state: TestStore, action: Action) => TestStore = (a, b) => a; +const finalReducer: (state: TestStore, action: Action) => TestStore = reduceReducers(firstReducer, secondReducer); diff --git a/types/redux-localstorage/tslint.json b/types/redux-localstorage/tslint.json index d032145676..7a5f77c1dc 100644 --- a/types/redux-localstorage/tslint.json +++ b/types/redux-localstorage/tslint.json @@ -1,7 +1,7 @@ { "extends": "../tslint.json", "rules": { - "forbidden-types": false, + "ban-types": false, "no-empty-interface": false } } diff --git a/types/redux-logger/index.d.ts b/types/redux-logger/index.d.ts index becaf79c29..042dd49c92 100644 --- a/types/redux-logger/index.d.ts +++ b/types/redux-logger/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for redux-logger v2.10.1 +// Type definitions for redux-logger v3.0.0 // Project: https://github.com/fcomb/redux-logger // Definitions by: Alexander Rusakov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -46,6 +46,6 @@ export interface ReduxLoggerOptions { diffPredicate?: LoggerPredicate; } -declare function createLogger(options?: ReduxLoggerOptions): Redux.Middleware; +export function createLogger(options?: ReduxLoggerOptions): Redux.Middleware; -export default createLogger; +export default logger; diff --git a/types/redux-logger/redux-logger-tests.ts b/types/redux-logger/redux-logger-tests.ts index b2ccaa4432..db0131b95e 100644 --- a/types/redux-logger/redux-logger-tests.ts +++ b/types/redux-logger/redux-logger-tests.ts @@ -1,7 +1,7 @@ -import createLogger from 'redux-logger'; -import {logger} from 'redux-logger'; -import { applyMiddleware, createStore } from 'redux' +import {createLogger} from 'redux-logger'; +import logger from 'redux-logger'; +import { applyMiddleware, createStore } from 'redux'; let loggerSimple = createLogger(); diff --git a/types/reflux/reflux-tests.ts b/types/reflux/reflux-tests.ts index 150e40db03..0962b06cb8 100644 --- a/types/reflux/reflux-tests.ts +++ b/types/reflux/reflux-tests.ts @@ -1,13 +1,12 @@ import Reflux = require("reflux"); -var syncActions = Reflux.createActions([ +const syncActions = Reflux.createActions([ "statusUpdate", "statusEdited", "statusAdded" ]); - -var asyncActions = Reflux.createActions({ +const asyncActions = Reflux.createActions({ fireBall: {asyncResult: true} }); @@ -16,10 +15,8 @@ asyncActions.fireBall.listen(function() { setTimeout(() => this.completed(true), 1000); }); - // Creates a DataStore -var statusStore = Reflux.createStore({ - +const statusStore = Reflux.createStore({ // Initial setup init() { // Register statusUpdate action @@ -27,7 +24,7 @@ var statusStore = Reflux.createStore({ }, // Callback onFireBall(flag: boolean) { - var status = flag ? 'ONLINE' : 'OFFLINE'; + const status = flag ? 'ONLINE' : 'OFFLINE'; // Pass on to listeners this.trigger(status); @@ -38,11 +35,11 @@ Reflux.createAction({ children: ["progressed", "completed", "failed"] }); -var action = Reflux.createAction(); +const action = Reflux.createAction(); -var actions = Reflux.createActions(["fireBall", "magicMissile"]); +const actions = Reflux.createActions(["fireBall", "magicMissile"]); -var Store = Reflux.createStore({ +const Store = Reflux.createStore({ init() { this.listenToMany(actions); }, @@ -54,6 +51,6 @@ var Store = Reflux.createStore({ } }); -var ReactComponent = { +const ReactComponent = { mixins: [Reflux.ListenerMixin] -}; \ No newline at end of file +}; diff --git a/types/reflux/tslint.json b/types/reflux/tslint.json index f05741c59b..b0e7084e94 100644 --- a/types/reflux/tslint.json +++ b/types/reflux/tslint.json @@ -1,6 +1,6 @@ { "extends": "../tslint.json", "rules": { - "forbidden-types": false + "ban-types": false } } diff --git a/types/requirejs/index.d.ts b/types/requirejs/index.d.ts index ac116494f3..b2d5879e85 100644 --- a/types/requirejs/index.d.ts +++ b/types/requirejs/index.d.ts @@ -48,7 +48,7 @@ interface RequireError extends Error { /** * Required modules. **/ - requireModules: string[]; + requireModules: string[] | null; /** * The original error, if there is one (might be null). diff --git a/types/revalidate/index.d.ts b/types/revalidate/index.d.ts index a764e41e15..c17837129a 100644 --- a/types/revalidate/index.d.ts +++ b/types/revalidate/index.d.ts @@ -6,14 +6,18 @@ // This project is licensed under the MIT license. // Copyrights are respective of each contributor listed at the beginning of each definition file. -// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), +// to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. export interface CombineValidatorsOptions { - serializeValues?: (values: any) => any; + serializeValues?(values: any): any; } export interface Config { diff --git a/types/revalidate/revalidate-tests.ts b/types/revalidate/revalidate-tests.ts index 798089d6a0..7db6a582a6 100644 --- a/types/revalidate/revalidate-tests.ts +++ b/types/revalidate/revalidate-tests.ts @@ -3,7 +3,7 @@ import r = require("revalidate"); const isValidEmail = r.createValidator( message => value => { if (value && !/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i.test(value)) { - return message + return message; } }, 'Invalid email address' @@ -12,7 +12,7 @@ const isValidEmail = r.createValidator( const isGreaterThan = (n: any) => r.createValidator( message => value => { if (value && Number(value) <= n) { - return message + return message; } }, field => `${field} must be greater than ${n}` diff --git a/types/rheostat/index.d.ts b/types/rheostat/index.d.ts index 372e5c6f1b..86312c4fb3 100644 --- a/types/rheostat/index.d.ts +++ b/types/rheostat/index.d.ts @@ -20,13 +20,13 @@ export interface PublicState { } export interface Events { - onClick?: () => any; - onChange?: (publicState: PublicState) => any; - onKeyPress?: () => any; - onSliderDragEnd?: () => any; - onSliderDragMove?: () => any; - onSliderDragStart?: () => any; - onValuesUpdated?: (publicState: PublicState) => any; + onClick?(): any; + onChange?(publicState: PublicState): any; + onKeyPress?(): any; + onSliderDragEnd?(): any; + onSliderDragMove?(): any; + onSliderDragStart?(): any; + onValuesUpdated?(publicState: PublicState): any; } export interface Props extends Events { @@ -46,4 +46,3 @@ export interface Props extends Events { } export default class Rheostat extends React.Component {} - diff --git a/types/rrule/index.d.ts b/types/rrule/index.d.ts index b09d47ff2a..3915865392 100644 --- a/types/rrule/index.d.ts +++ b/types/rrule/index.d.ts @@ -13,16 +13,15 @@ export = RRule; // For CommonJS it must be imported as `require("rrule").RRule`. import RRuleAlias = RRule; declare module "rrule" { - export type RRule = RRuleAlias; - export const RRule: typeof RRuleAlias; + type RRule = RRuleAlias; + const RRule: typeof RRuleAlias; } declare namespace RRule { - /** - * see - * The only required option is `freq`, one of RRule.YEARLY, RRule.MONTHLY, ... - */ + * see + * The only required option is `freq`, one of RRule.YEARLY, RRule.MONTHLY, ... + */ interface Options { freq: RRule.Frequency; dtstart?: Date; @@ -52,16 +51,14 @@ declare namespace RRule { getJsWeekday(): number; } - } declare class RRule { - /** - * @param {Object?} options - see - * The only required option is `freq`, one of RRule.YEARLY, RRule.MONTHLY, ... - * @constructor - */ + * @param {Object?} options - see + * The only required option is `freq`, one of RRule.YEARLY, RRule.MONTHLY, ... + * @constructor + */ constructor(options: RRule.Options, noCache?: boolean); options: RRule.Options; @@ -69,65 +66,63 @@ declare class RRule { origOptions: RRule.Options; /** - * Returns the first recurrence after the given datetime instance. - * The inc keyword defines what happens if dt is an occurrence. - * With inc == True, if dt itself is an occurrence, it will be returned. - * @return Date or null - */ + * Returns the first recurrence after the given datetime instance. + * The inc keyword defines what happens if dt is an occurrence. + * With inc == True, if dt itself is an occurrence, it will be returned. + * @return Date or null + */ after(dt: Date, inc?: boolean): Date; /** - * @param {Function} iterator - optional function that will be called - * on each date that is added. It can return false - * to stop the iteration. - * @return Array containing all recurrences. - */ + * @param {Function} iterator - optional function that will be called + * on each date that is added. It can return false + * to stop the iteration. + * @return Array containing all recurrences. + */ all(iterator?: (date: Date, index?: number) => void): Date[]; /** - * Returns all the occurrences of the rrule between after and before. - * The inc keyword defines what happens if after and/or before are - * themselves occurrences. With inc == True, they will be included in the - * list, if they are found in the recurrence set. - * @return Array - */ + * Returns all the occurrences of the rrule between after and before. + * The inc keyword defines what happens if after and/or before are + * themselves occurrences. With inc == True, they will be included in the + * list, if they are found in the recurrence set. + * @return Array + */ between(a: Date, b: Date, inc?: boolean, iterator?: (date: Date, index: number) => void): Date[]; /** - * Returns the last recurrence before the given datetime instance. - * The inc keyword defines what happens if dt is an occurrence. - * With inc == True, if dt itself is an occurrence, it will be returned. - * @return Date or null - */ + * Returns the last recurrence before the given datetime instance. + * The inc keyword defines what happens if dt is an occurrence. + * With inc == True, if dt itself is an occurrence, it will be returned. + * @return Date or null + */ before(dt: Date, inc?: boolean): Date; /** - * Returns the number of recurrences in this set. It will have go trough - * the whole recurrence, if this hasn't been done before. - */ + * Returns the number of recurrences in this set. It will have go trough + * the whole recurrence, if this hasn't been done before. + */ count(): number; /** - * Converts the rrule into its string representation - * @see - * @return String - */ + * Converts the rrule into its string representation + * @see + * @return String + */ toString(): string; /** - * Will convert all rules described in nlp:ToText - * to text. - */ + * Will convert all rules described in nlp:ToText + * to text. + */ toText(gettext?: (str: string) => string, language?: any): string; isFullyConvertibleToText(): boolean; clone(): RRule; - } declare namespace RRule { - const FREQUENCIES: "YEARLY" | "MONTHLY" | "WEEKLY" | "DAILY" | "HOURLY" | "MINUTELY" | "SECONDLY"; enum Frequency { @@ -170,11 +165,10 @@ declare namespace RRule { class RRuleSet extends RRule { /** - * - * @param {Boolean?} noCache - * The same stratagy as RRule on cache, default to false - * @constructor - */ + * @param {Boolean?} noCache + * The same stratagy as RRule on cache, default to false + * @constructor + */ constructor(noCache?: boolean); rrule(rrule: RRule): void; rdate(date: Date): void; @@ -182,13 +176,13 @@ declare namespace RRule { exdate(date: Date): void; valueOf(): string[]; /** - * to generate recurrence field sush as: - * ["RRULE:FREQ=YEARLY;COUNT=2;BYDAY=TU;DTSTART=19970902T010000Z","RRULE:FREQ=YEARLY;COUNT=1;BYDAY=TH;DTSTART=19970902T010000Z"] - */ + * to generate recurrence field sush as: + * ["RRULE:FREQ=YEARLY;COUNT=2;BYDAY=TU;DTSTART=19970902T010000Z","RRULE:FREQ=YEARLY;COUNT=1;BYDAY=TH;DTSTART=19970902T010000Z"] + */ toString(): string; /** - * Create a new RRuleSet Object completely base on current instance - */ + * Create a new RRuleSet Object completely base on current instance + */ clone(): RRuleSet; } } diff --git a/types/rrule/test/rrule.ts b/types/rrule/test/rrule.ts index 461283c45d..c455fa40d1 100644 --- a/types/rrule/test/rrule.ts +++ b/types/rrule/test/rrule.ts @@ -30,7 +30,6 @@ y.push(rule.toText()); // including the default and inferred ones. y.push(RRule.optionsToString(rule.options)); - // Cherry-pick only some options from an rrule: y.push(RRule.optionsToString({ freq: rule.options.freq, @@ -42,7 +41,7 @@ rule = RRule.fromString("FREQ=WEEKLY;DTSTART=20120201T093000Z"); // This is equivalent rule = new RRule(RRule.parseString("FREQ=WEEKLY;DTSTART=20120201T093000Z")); -var options = RRule.parseString('FREQ=DAILY;INTERVAL=6'); +let options = RRule.parseString('FREQ=DAILY;INTERVAL=6'); options.dtstart = new Date(2000, 1, 1); rule = new RRule(options); diff --git a/types/rx-core-binding/index.d.ts b/types/rx-core-binding/index.d.ts index 54861eb6cb..1f51c54e1c 100644 --- a/types/rx-core-binding/index.d.ts +++ b/types/rx-core-binding/index.d.ts @@ -10,7 +10,7 @@ declare namespace Rx { hasObservers(): boolean; } - export interface Subject extends ISubject { + interface Subject extends ISubject { } interface SubjectStatic { @@ -18,18 +18,18 @@ declare namespace Rx { create(observer?: Observer, observable?: Observable): ISubject; } - export var Subject: SubjectStatic; + const Subject: SubjectStatic; - export interface AsyncSubject extends Subject { + interface AsyncSubject extends Subject { } interface AsyncSubjectStatic { new (): AsyncSubject; } - export var AsyncSubject: AsyncSubjectStatic; + const AsyncSubject: AsyncSubjectStatic; - export interface BehaviorSubject extends Subject { + interface BehaviorSubject extends Subject { getValue(): T; } @@ -37,16 +37,16 @@ declare namespace Rx { new (initialValue: T): BehaviorSubject; } - export var BehaviorSubject: BehaviorSubjectStatic; + const BehaviorSubject: BehaviorSubjectStatic; - export interface ReplaySubject extends Subject { + interface ReplaySubject extends Subject { } interface ReplaySubjectStatic { new (bufferSize?: number, window?: number, scheduler?: IScheduler): ReplaySubject; } - export var ReplaySubject: ReplaySubjectStatic; + const ReplaySubject: ReplaySubjectStatic; interface ConnectableObservable extends Observable { connect(): IDisposable; @@ -57,9 +57,9 @@ declare namespace Rx { new (): ConnectableObservable; } - export var ConnectableObservable: ConnectableObservableStatic; + const ConnectableObservable: ConnectableObservableStatic; - export interface Observable { + interface Observable { multicast(subject: Observable): ConnectableObservable; multicast(subjectSelector: () => ISubject, selector: (source: ConnectableObservable) => Observable): Observable; publish(): ConnectableObservable; diff --git a/types/rx-core/index.d.ts b/types/rx-core/index.d.ts index 15b55e93d9..f922b1f083 100644 --- a/types/rx-core/index.d.ts +++ b/types/rx-core/index.d.ts @@ -7,24 +7,24 @@ declare namespace Rx { /** * Promise A+ */ - export interface IPromise { + interface IPromise { then(onFulfilled: (value: T) => IPromise, onRejected: (reason: any) => IPromise): IPromise; then(onFulfilled: (value: T) => IPromise, onRejected?: (reason: any) => R): IPromise; then(onFulfilled: (value: T) => R, onRejected: (reason: any) => IPromise): IPromise; then(onFulfilled?: (value: T) => R, onRejected?: (reason: any) => R): IPromise; } - export interface IDisposable { + interface IDisposable { dispose(): void; } - export interface IScheduler { + interface IScheduler { catch(handler: (exception: any) => boolean): IScheduler; catchException(handler: (exception: any) => boolean): IScheduler; } // Observer - export interface Observer { + interface Observer { checked(): Observer; } @@ -37,7 +37,7 @@ declare namespace Rx { notifyOn(scheduler: IScheduler): Observer; } - export interface Observable { + interface Observable { observeOn(scheduler: IScheduler): Observable; subscribeOn(scheduler: IScheduler): Observable; diff --git a/types/rx-dom/tslint.json b/types/rx-dom/tslint.json index 8dd3240216..ee6fc74495 100644 --- a/types/rx-dom/tslint.json +++ b/types/rx-dom/tslint.json @@ -2,7 +2,7 @@ "extends": "../tslint.json", "rules": { // this package augments Rx with namespace level functions - // it would be particualrly strange to type these functions differently - "forbidden-types": false + // it would be particualrly strange to type these functions differently + "ban-types": false } } diff --git a/types/rx-lite-aggregates/index.d.ts b/types/rx-lite-aggregates/index.d.ts index 6dd9c76387..72c2ae402f 100644 --- a/types/rx-lite-aggregates/index.d.ts +++ b/types/rx-lite-aggregates/index.d.ts @@ -6,7 +6,7 @@ /// declare namespace Rx { - export interface Observable { + interface Observable { finalValue(): Observable; aggregate(accumulator: (acc: T, value: T) => T): Observable; aggregate(seed: TAcc, accumulator: (acc: TAcc, value: T) => TAcc): Observable; diff --git a/types/rx-lite-async/rx-lite-async-tests.ts b/types/rx-lite-async/rx-lite-async-tests.ts index 8c88cc135c..43c5155e2f 100644 --- a/types/rx-lite-async/rx-lite-async-tests.ts +++ b/types/rx-lite-async/rx-lite-async-tests.ts @@ -1,27 +1,24 @@ // Tests for RxJS-Async TypeScript definitions // Tests by Igor Oleinikov -namespace Rx.Tests.Async { +let obsNum: Rx.Observable; +let obsStr: Rx.Observable; +let sch: Rx.IScheduler; - var obsNum: Rx.Observable; - var obsStr: Rx.Observable; - var sch: Rx.IScheduler; - - function start() { - obsNum = Rx.Observable.start(() => 10, obsStr, sch); - obsNum = Rx.Observable.start(() => 10, obsStr); - obsNum = Rx.Observable.start(() => 10); - } - - function toAsync() { - obsNum = Rx.Observable.toAsync(() => 1, sch)(); - obsNum = Rx.Observable.toAsync((a1: number) => a1)(1); - obsStr = Rx.Observable.toAsync((a1: string, a2: number) => a1 + a2.toFixed(0))("", 1); - obsStr = Rx.Observable.toAsync((a1: string, a2: number, a3: Date) => a1 + a2.toFixed(0) + a3.toDateString())("", 1, new Date()); - obsStr = Rx.Observable.toAsync((a1: string, a2: number, a3: Date, a4: boolean) => a1 + a2.toFixed(0) + a3.toDateString() + (a4 ? 1 : 0))("", 1, new Date(), false); - } - - function startAsync() { - var o: Rx.Observable = Rx.Observable.startAsync(() => > {}); - } +function start() { + obsNum = Rx.Observable.start(() => 10, obsStr, sch); + obsNum = Rx.Observable.start(() => 10, obsStr); + obsNum = Rx.Observable.start(() => 10); +} + +function toAsync() { + obsNum = Rx.Observable.toAsync(() => 1, sch)(); + obsNum = Rx.Observable.toAsync((a1: number) => a1)(1); + obsStr = Rx.Observable.toAsync((a1: string, a2: number) => a1 + a2.toFixed(0))("", 1); + obsStr = Rx.Observable.toAsync((a1: string, a2: number, a3: Date) => a1 + a2.toFixed(0) + a3.toDateString())("", 1, new Date()); + obsStr = Rx.Observable.toAsync((a1: string, a2: number, a3: Date, a4: boolean) => a1 + a2.toFixed(0) + a3.toDateString() + (a4 ? 1 : 0))("", 1, new Date(), false); +} + +function startAsync() { + const o: Rx.Observable = Rx.Observable.startAsync(() => > {}); } diff --git a/types/rx-lite-backpressure/index.d.ts b/types/rx-lite-backpressure/index.d.ts index 2584cb8a36..d5039c2667 100644 --- a/types/rx-lite-backpressure/index.d.ts +++ b/types/rx-lite-backpressure/index.d.ts @@ -6,7 +6,7 @@ /// declare namespace Rx { - export interface Observable { + interface Observable { /** * Pauses the underlying observable sequence based upon the observable sequence which yields true/false. * @example @@ -37,11 +37,11 @@ declare namespace Rx { controlled(enableQueue?: boolean): ControlledObservable; } - export interface ControlledObservable extends Observable { + interface ControlledObservable extends Observable { request(numberOfItems?: number): IDisposable; } - export interface PausableObservable extends Observable { + interface PausableObservable extends Observable { pause(): void; resume(): void; } diff --git a/types/rx-lite-backpressure/rx-lite-backpressure-tests.ts b/types/rx-lite-backpressure/rx-lite-backpressure-tests.ts index 6c312691f7..00cef0d852 100644 --- a/types/rx-lite-backpressure/rx-lite-backpressure-tests.ts +++ b/types/rx-lite-backpressure/rx-lite-backpressure-tests.ts @@ -2,18 +2,18 @@ // Tests by Igor Oleinikov function testPausable() { - var o: Rx.Observable = {} as any; + const o: Rx.Observable = {} as any; - var pauser = new Rx.Subject(); + const pauser = new Rx.Subject(); - var p = o.pausable(pauser); + let p = o.pausable(pauser); p = o.pausableBuffered(pauser); } function testControlled() { - var o: Rx.Observable = {} as any; - var c = o.controlled(); + const o: Rx.Observable = {} as any; + const c = o.controlled(); - var d: Rx.IDisposable = c.request(); + let d: Rx.IDisposable = c.request(); d = c.request(5); } diff --git a/types/rx-lite-coincidence/index.d.ts b/types/rx-lite-coincidence/index.d.ts index 0361d025c2..3dc9f4c1be 100644 --- a/types/rx-lite-coincidence/index.d.ts +++ b/types/rx-lite-coincidence/index.d.ts @@ -6,7 +6,6 @@ /// declare namespace Rx { - interface Observable { join( right: Observable, diff --git a/types/rx-lite-experimental/index.d.ts b/types/rx-lite-experimental/index.d.ts index 9659d9fec6..d9c5ad3ac0 100644 --- a/types/rx-lite-experimental/index.d.ts +++ b/types/rx-lite-experimental/index.d.ts @@ -6,7 +6,6 @@ /// declare namespace Rx { - interface Observable { /** * Returns an observable sequence that is the result of invoking the selector on the source sequence, without sharing subscriptions. diff --git a/types/rx-lite-joinpatterns/index.d.ts b/types/rx-lite-joinpatterns/index.d.ts index 658c93d1a4..5e9b9d24b4 100644 --- a/types/rx-lite-joinpatterns/index.d.ts +++ b/types/rx-lite-joinpatterns/index.d.ts @@ -6,7 +6,6 @@ /// declare namespace Rx { - interface Pattern1 { and(other: Observable): Pattern2; thenDo(selector: (item1: T1) => TR): Plan; diff --git a/types/rx-lite-testing/index.d.ts b/types/rx-lite-testing/index.d.ts index 2fda5bfbb1..5e51044808 100644 --- a/types/rx-lite-testing/index.d.ts +++ b/types/rx-lite-testing/index.d.ts @@ -6,7 +6,7 @@ /// declare namespace Rx { - export interface TestScheduler extends VirtualTimeScheduler { + interface TestScheduler extends VirtualTimeScheduler { createColdObservable(...records: Recorded[]): Observable; createHotObservable(...records: Recorded[]): Observable; createObserver(): MockObserver; @@ -16,11 +16,11 @@ declare namespace Rx { startWithCreate(create: () => Observable): MockObserver; } - export var TestScheduler: { + const TestScheduler: { new (): TestScheduler; }; - export class Recorded { + class Recorded { constructor(time: number, value: any, equalityComparer?: (x: any, y: any) => boolean); equals(other: Recorded): boolean; toString(): string; @@ -28,7 +28,7 @@ declare namespace Rx { value: any; } - export var ReactiveTest: { + const ReactiveTest: { created: number; subscribed: number; disposed: number; @@ -40,12 +40,12 @@ declare namespace Rx { subscribe(subscribeAt: number, unsubscribeAt?: number): Subscription; }; - export class Subscription { + class Subscription { constructor(subscribeAt: number, unsubscribeAt?: number); equals(other: Subscription): boolean; } - export interface MockObserver extends Observer { + interface MockObserver extends Observer { messages: Recorded[]; } @@ -53,7 +53,7 @@ declare namespace Rx { new (scheduler: IScheduler): MockObserver; } - export var MockObserver: MockObserverStatic; + const MockObserver: MockObserverStatic; } declare module "rx-lite-testing" { diff --git a/types/rx-lite-time/index.d.ts b/types/rx-lite-time/index.d.ts index 38c553dbf1..01fadea822 100644 --- a/types/rx-lite-time/index.d.ts +++ b/types/rx-lite-time/index.d.ts @@ -6,7 +6,7 @@ /// declare namespace Rx { - export interface Observable { + interface Observable { delaySubscription(dueTime: number, scheduler?: IScheduler): Observable; delayWithSelector(delayDurationSelector: (item: T) => number): Observable; delayWithSelector(subscriptionDelay: number, delayDurationSelector: (item: T) => number): Observable; diff --git a/types/rx-lite-virtualtime/index.d.ts b/types/rx-lite-virtualtime/index.d.ts index d0907c7168..7413ec2604 100644 --- a/types/rx-lite-virtualtime/index.d.ts +++ b/types/rx-lite-virtualtime/index.d.ts @@ -6,7 +6,7 @@ /// declare namespace Rx { - export interface VirtualTimeScheduler extends Scheduler { + interface VirtualTimeScheduler extends Scheduler { // protected constructor(initialClock: TAbsolute, comparer: (first: TAbsolute, second: TAbsolute) => number); advanceBy(time: TRelative): void; @@ -28,10 +28,10 @@ declare namespace Rx { /* protected */ getNext(): internals.ScheduledItem; } - export interface HistoricalScheduler extends VirtualTimeScheduler { + interface HistoricalScheduler extends VirtualTimeScheduler { } - export var HistoricalScheduler: { + const HistoricalScheduler: { new (initialClock: number, comparer: (first: number, second: number) => number): HistoricalScheduler; }; } diff --git a/types/rx-lite/index.d.ts b/types/rx-lite/index.d.ts index 7e085031aa..d56e4e473c 100644 --- a/types/rx-lite/index.d.ts +++ b/types/rx-lite/index.d.ts @@ -7,12 +7,12 @@ /// declare namespace Rx { - export namespace internals { + namespace internals { function isEqual(left: any, right: any): boolean; function addRef(xs: Observable, r: { getDisposable(): IDisposable; }): Observable; // Priority Queue for Scheduling - export class PriorityQueue { + class PriorityQueue { constructor(capacity: number); length: number; @@ -29,7 +29,7 @@ declare namespace Rx { static count: number; } - export class ScheduledItem { + class ScheduledItem { constructor(scheduler: IScheduler, state: any, action: (scheduler: IScheduler, state: any) => IDisposable, dueTime: TTime, comparer?: (x: TTime, y: TTime) => number); scheduler: IScheduler; @@ -46,11 +46,11 @@ declare namespace Rx { } } - export namespace config { - export var Promise: { new (resolver: (resolvePromise: (value: T) => void, rejectPromise: (reason: any) => void) => void): IPromise; }; + namespace config { + let Promise: { new (resolver: (resolvePromise: (value: T) => void, rejectPromise: (reason: any) => void) => void): IPromise; }; } - export namespace helpers { + namespace helpers { function noop(): void; function notDefined(value: any): boolean; function identity(value: T): T; @@ -65,7 +65,7 @@ declare namespace Rx { function isFunction(value: any): boolean; } - export class CompositeDisposable implements IDisposable { + class CompositeDisposable implements IDisposable { constructor(...disposables: IDisposable[]); constructor(disposables: IDisposable[]); @@ -78,7 +78,7 @@ declare namespace Rx { toArray(): IDisposable[]; } - export class Disposable implements IDisposable { + class Disposable implements IDisposable { constructor(action: () => void); static create(action: () => void): IDisposable; @@ -88,7 +88,7 @@ declare namespace Rx { } // Single assignment - export class SingleAssignmentDisposable implements IDisposable { + class SingleAssignmentDisposable implements IDisposable { constructor(); isDisposed: boolean; @@ -100,11 +100,11 @@ declare namespace Rx { } // SerialDisposable it's an alias of SingleAssignmentDisposable - export class SerialDisposable extends SingleAssignmentDisposable { + class SerialDisposable extends SingleAssignmentDisposable { constructor(); } - export class RefCountDisposable implements IDisposable { + class RefCountDisposable implements IDisposable { constructor(disposable: IDisposable); dispose(): void; @@ -113,7 +113,7 @@ declare namespace Rx { getDisposable(): IDisposable; } - export interface IScheduler { + interface IScheduler { now(): number; isScheduler(value: any): boolean; @@ -135,10 +135,10 @@ declare namespace Rx { schedulePeriodicWithState(state: TState, period: number, action: (state: TState) => TState): IDisposable; } - export interface Scheduler extends IScheduler { + interface Scheduler extends IScheduler { } - export interface SchedulerStatic { + interface SchedulerStatic { new ( now: () => number, schedule: (state: any, action: (scheduler: IScheduler, state: any) => IDisposable) => IDisposable, @@ -153,7 +153,7 @@ declare namespace Rx { timeout: IScheduler; } - export var Scheduler: SchedulerStatic; + const Scheduler: SchedulerStatic; // Current Thread IScheduler interface ICurrentThreadScheduler extends IScheduler { @@ -161,7 +161,7 @@ declare namespace Rx { } // Notifications - export class Notification { + class Notification { accept(observer: IObserver): void; accept(onNext: (value: T) => TResult, onError?: (exception: any) => TResult, onCompleted?: () => TResult): TResult; toObservable(scheduler?: IScheduler): Observable; @@ -177,13 +177,13 @@ declare namespace Rx { } // Observer - export interface IObserver { + interface IObserver { onNext(value: T): void; onError(exception: any): void; onCompleted(): void; } - export interface Observer extends IObserver { + interface Observer extends IObserver { toNotifier(): (notification: Notification) => void; asObserver(): Observer; } @@ -193,9 +193,9 @@ declare namespace Rx { fromNotifier(handler: (notification: Notification, thisArg?: any) => void): Observer; } - export var Observer: ObserverStatic; + const Observer: ObserverStatic; - export interface IObservable { + interface IObservable { subscribe(observer: Observer): IDisposable; subscribe(onNext?: (value: T) => void, onError?: (exception: any) => void, onCompleted?: () => void): IDisposable; @@ -204,7 +204,7 @@ declare namespace Rx { subscribeOnCompleted(onCompleted: () => void, thisArg?: any): IDisposable; } - export interface Observable extends IObservable { + interface Observable extends IObservable { forEach(onNext?: (value: T) => void, onError?: (exception: any) => void, onCompleted?: () => void): IDisposable; // alias for subscribe toArray(): Observable; @@ -591,17 +591,17 @@ declare namespace Rx { prototype: any; } - export var Observable: ObservableStatic; + const Observable: ObservableStatic; } // Async declare namespace Rx { - export namespace config { + namespace config { /** * Configuration option to determine whether to use native events only */ - export var useNativeEvents: boolean; + const useNativeEvents: boolean; } interface ObservableStatic { @@ -655,12 +655,12 @@ declare namespace Rx { } interface NodeEventTarget { - addListener: (name: string, cb: (e: any) => any) => void; + addListener(name: string, cb: (e: any) => any): void; } interface NativeEventTarget { - on: (name: string, cb: (e: any) => any) => void; - off: (name: string, cb: (e: any) => any) => void; + on(name: string, cb: (e: any) => any): void; + off(name: string, cb: (e: any) => any): void; } interface DOMEventTarget { @@ -669,29 +669,28 @@ declare namespace Rx { } } - // time declare namespace Rx { - export interface TimeInterval { + interface TimeInterval { value: T; interval: number; } - export interface Timestamp { + interface Timestamp { value: T; timestamp: number; } - export interface Observable { + interface Observable { delay(dueTime: Date, scheduler?: IScheduler): Observable; delay(dueTime: number, scheduler?: IScheduler): Observable; debounce(dueTime: number, scheduler?: IScheduler): Observable; throttleWithTimeout(dueTime: number, scheduler?: IScheduler): Observable; /** - * @deprecated use #debounce or #throttleWithTimeout instead. - */ + * @deprecated use #debounce or #throttleWithTimeout instead. + */ throttle(dueTime: number, scheduler?: IScheduler): Observable; timeInterval(scheduler?: IScheduler): Observable>; diff --git a/types/rx-lite/rx-lite-tests.ts b/types/rx-lite/rx-lite-tests.ts index d0f871fcbb..fd3cf65663 100644 --- a/types/rx-lite/rx-lite-tests.ts +++ b/types/rx-lite/rx-lite-tests.ts @@ -1,53 +1,51 @@ import * as Rx from 'rx-lite'; namespace Tests.Async { - - var obsNum: Rx.Observable; - var obsStr: Rx.Observable; - var sch: Rx.IScheduler; + let obsNum: Rx.Observable; + let obsStr: Rx.Observable; function fromCallback() { // 0 arguments - var func0: (cb: (result: number) => void) => void = () => { }; + const func0: (cb: (result: number) => void) => void = () => { }; obsNum = Rx.Observable.fromCallback(func0)(); obsNum = Rx.Observable.fromCallback(func0, obsStr)(); obsNum = Rx.Observable.fromCallback(func0, obsStr, (results: number[]) => results[0])(); // 1 argument - var func1: (a: string, cb: (result: number) => void) => number = () => 0; + const func1: (a: string, cb: (result: number) => void) => number = () => 0; obsNum = Rx.Observable.fromCallback(func1)(""); obsNum = Rx.Observable.fromCallback(func1, {})(""); obsNum = Rx.Observable.fromCallback(func1, {}, (results: number[]) => results[0])(""); // 2 arguments - var func2: (a: number, b: string, cb: (result: string) => number) => Date = () => new Date(); + const func2: (a: number, b: string, cb: (result: string) => number) => Date = () => new Date(); obsStr = Rx.Observable.fromCallback(func2)(1, ""); obsStr = Rx.Observable.fromCallback(func2, {})(1, ""); obsStr = Rx.Observable.fromCallback(func2, {}, (results: string[]) => results[0])(1, ""); // 3 arguments - var func3: (a: number, b: string, c: boolean, cb: (result: string) => number) => Date = () => new Date(); + const func3: (a: number, b: string, c: boolean, cb: (result: string) => number) => Date = () => new Date(); obsStr = Rx.Observable.fromCallback(func3)(1, "", true); obsStr = Rx.Observable.fromCallback(func3, {})(1, "", true); obsStr = Rx.Observable.fromCallback(func3, {}, (results: string[]) => results[0])(1, "", true); // multiple results - var func0m: (cb: (result1: number, result2: number, result3: number) => void) => void = () => { }; + const func0m: (cb: (result1: number, result2: number, result3: number) => void) => void = () => { }; obsNum = Rx.Observable.fromCallback(func0m, obsStr, (results: number[]) => results[0])(); - var func1m: (a: string, cb: (result1: number, result2: number, result3: number) => void) => void = () => { }; + const func1m: (a: string, cb: (result1: number, result2: number, result3: number) => void) => void = () => { }; obsNum = Rx.Observable.fromCallback(func1m, obsStr, (results: number[]) => results[0])(""); - var func2m: (a: string, b: number, cb: (result1: string, result2: string, result3: string) => void) => void = () => { }; + const func2m: (a: string, b: number, cb: (result1: string, result2: string, result3: string) => void) => void = () => { }; obsStr = Rx.Observable.fromCallback(func2m, obsStr, (results: string[]) => results[0])("", 10); } function toPromise() { - var promiseImpl: { + const promiseImpl: { new (resolver: (resolvePromise: (value: T) => void, rejectPromise: (reason: any) => void) => void): Rx.IPromise; } = undefined as any; Rx.config.Promise = promiseImpl; - var p: Rx.IPromise = obsNum.toPromise(promiseImpl); + let p: Rx.IPromise = obsNum.toPromise(promiseImpl); p = obsNum.toPromise(); @@ -56,14 +54,13 @@ namespace Tests.Async { p = p.then(undefined, reason => 10); // p = p.then(undefined, reason => p); - var ps: Rx.IPromise = p.then(undefined, reason => "error"); + let ps: Rx.IPromise = p.then(undefined, reason => "error"); ps = p.then(x => ""); ps = p.then(x => ps); } } function test_scan() { - /* Without a seed */ const source1: Rx.Observable = Rx.Observable.range(1, 3) .scan((acc, x, i, source) => acc + x); @@ -71,16 +68,15 @@ function test_scan() { /* With a seed */ const source2: Rx.Observable = Rx.Observable.range(1, 3) .scan((acc, x, i, source) => acc + x, '...'); - } function test_concatAll() { /* concatAll Example */ - var source = Rx.Observable.range(0, 3) + const source = Rx.Observable.range(0, 3) .map(x => Rx.Observable.range(x, 3)) .concatAll(); - var subscription = source.subscribe( + const subscription = source.subscribe( x => { console.log('Next: %s', x); }, @@ -94,11 +90,11 @@ function test_concatAll() { function test_mergeAll() { /* mergeAll example */ - var source = Rx.Observable.range(0, 3) + const source = Rx.Observable.range(0, 3) .map(x => Rx.Observable.range(x, 3)) .mergeAll(); - var subscription = source.subscribe( + const subscription = source.subscribe( x => { console.log('Next: %s', x); }, @@ -108,25 +104,24 @@ function test_mergeAll() { () => { console.log('Completed'); }); - } // from https://github.com/Reactive-Extensions/RxJS/blob/master/doc/api/core/operators/publish.md function test_publish() { - var interval = Rx.Observable.interval(1000); + const interval = Rx.Observable.interval(1000); - var source = interval + const source = interval .take(2) .doAction(x => { console.log('Side effect'); }); - var published = source.publish(); + const published = source.publish(); published.subscribe(createObserver('SourceA')); published.subscribe(createObserver('SourceB')); - var connection = published.connect(); + const connection = published.connect(); function createObserver(tag: string) { return Rx.Observer.create( diff --git a/types/rx-lite/tslint.json b/types/rx-lite/tslint.json index 1bec85bd5c..69a2063c99 100644 --- a/types/rx-lite/tslint.json +++ b/types/rx-lite/tslint.json @@ -3,7 +3,7 @@ "rules": { "unified-signatures": false, "no-empty-interface": false, - "forbidden-types": false, + "ban-types": false, "interface-name": false, "array-type": false, "max-line-length": false, diff --git a/types/select2/index.d.ts b/types/select2/index.d.ts index 719e6673f8..f3492b6bb1 100644 --- a/types/select2/index.d.ts +++ b/types/select2/index.d.ts @@ -44,7 +44,7 @@ interface Select2Options { minimumInputLength?: number; maximumInputLength?: number; minimumResultsForSearch?: number; - maximumSelectionSize?: number; + maximumSelectionLength?: number; placeholder?: string | IdTextPair; separator?: string; allowClear?: boolean; @@ -211,4 +211,4 @@ declare class Select2 { $selection: JQuery; $results: JQuery; options: {options: Select2Options}; -} \ No newline at end of file +} diff --git a/types/select2/select2-tests.ts b/types/select2/select2-tests.ts index c10b482cab..5d794e64e0 100644 --- a/types/select2/select2-tests.ts +++ b/types/select2/select2-tests.ts @@ -32,7 +32,7 @@ $("#e5").select2({ } }); -$("#e19").select2({ maximumSelectionSize: 3 }); +$("#e19").select2({ maximumSelectionLength: 3 }); $("#e10").select2({ data: [{ id: 0, text: 'enhancement' }, { id: 1, text: 'bug' }, { id: 2, text: 'duplicate' }, { id: 3, text: 'invalid' }, { id: 4, text: 'wontfix' }] }); diff --git a/types/selenium-webdriver/chrome.d.ts b/types/selenium-webdriver/chrome.d.ts index 2604b99e89..6bd2fe22a8 100644 --- a/types/selenium-webdriver/chrome.d.ts +++ b/types/selenium-webdriver/chrome.d.ts @@ -59,7 +59,6 @@ export class 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 @@ -70,7 +69,6 @@ export class Options { */ addArguments(...var_args: string[]): Options; - /** * List of Chrome command line switches to exclude that ChromeDriver by default * passes when starting Chrome. Do not prefix switches with '--'. @@ -80,7 +78,6 @@ export class Options { */ excludeSwitches(...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 @@ -91,7 +88,6 @@ export class Options { */ 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 @@ -105,7 +101,6 @@ export class Options { */ 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 @@ -116,7 +111,6 @@ export class Options { */ 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. @@ -125,7 +119,6 @@ export class Options { */ setUserPreferences(prefs: any): Options; - /** * Sets the logging preferences for the new session. * @param {!webdriver.logging.Preferences} prefs The logging preferences. @@ -159,7 +152,6 @@ export class Options { */ setPerfLoggingPrefs(prefs: IPerfLoggingPrefs): Options; - /** * Sets preferences for the 'Local State' file in Chrome's user data * directory. @@ -168,7 +160,6 @@ export class Options { */ setLocalState(state: any): Options; - /** * Sets the name of the activity hosting a Chrome-based Android WebView. This * option must be set to connect to an [Android WebView]( @@ -179,7 +170,6 @@ export class Options { */ androidActivity(name: string): Options; - /** * Sets the device serial number to connect to via ADB. If not specified, the * ChromeDriver will select an unused device at random. An error will be @@ -190,7 +180,6 @@ export class Options { */ androidDeviceSerial(serial: string): Options; - /** * Configures the ChromeDriver to launch Chrome on Android via adb. This * function is shorthand for @@ -199,7 +188,6 @@ export class Options { */ androidChrome(): Options; - /** * Sets the package name of the Chrome or WebView app. * @@ -209,7 +197,6 @@ export class Options { */ androidPackage(pkg: string): Options; - /** * Sets the process name of the Activity hosting the WebView (as given by `ps`). * If not specified, the process name is assumed to be the same as @@ -220,7 +207,6 @@ export class Options { */ androidProcess(processName: string): Options; - /** * Sets whether to connect to an already-running instead of the specified * {@linkplain #androidProcess app} instead of launching the app with a clean @@ -231,7 +217,6 @@ export class Options { */ androidUseRunningApp(useRunning: boolean): Options; - /** * Sets the path to Chrome's log file. This path should exist on the machine * that will launch Chrome. @@ -240,7 +225,6 @@ export class Options { */ setChromeLogFile(path: string): Options; - /** * Sets the directory to store Chrome minidumps in. This option is only * supported when ChromeDriver is running on Linux. @@ -249,7 +233,6 @@ export class Options { */ setChromeMinidumpPath(path: string): Options; - /** * Configures Chrome to emulate a mobile device. For more information, refer * to the ChromeDriver project page on [mobile emulation][em]. Configuration @@ -295,7 +278,6 @@ export class Options { */ setProxy(proxy: webdriver.ProxyConfig): Options; - /** * Converts this options instance to a {@link webdriver.Capabilities} object. * @param {webdriver.Capabilities=} opt_capabilities The capabilities to merge @@ -330,7 +312,6 @@ export class ServiceBuilder extends remote.DriverService.Builder { */ setAdbPort(port: number): this; - /** * 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. @@ -339,14 +320,12 @@ export class ServiceBuilder extends remote.DriverService.Builder { */ loggingTo(path: string): this; - /** * Enables verbose logging. * @return {!ServiceBuilder} A self reference. */ enableVerboseLogging(): this; - /** * Sets the number of threads the driver should use to manage HTTP requests. * By default, the driver will use 4 threads. diff --git a/types/selenium-webdriver/edge.d.ts b/types/selenium-webdriver/edge.d.ts index 3fb3408b1f..90b45fc92d 100644 --- a/types/selenium-webdriver/edge.d.ts +++ b/types/selenium-webdriver/edge.d.ts @@ -27,7 +27,6 @@ export class Driver extends webdriver.WebDriver { * Class for managing MicrosoftEdgeDriver specific options. */ export class Options { - /** * Extracts the MicrosoftEdgeDriver specific options from the given * capabilities object. diff --git a/types/selenium-webdriver/firefox.d.ts b/types/selenium-webdriver/firefox.d.ts index 6746c3c683..0c2ecdbe92 100644 --- a/types/selenium-webdriver/firefox.d.ts +++ b/types/selenium-webdriver/firefox.d.ts @@ -20,7 +20,6 @@ export class Binary { */ addArguments(...var_args: string[]): void; - /** * Launches Firefox and eturns a promise that will be fulfilled when the process * terminates. @@ -30,7 +29,6 @@ export class Binary { */ launch(profile: string): webdriver.promise.Promise; - /** * Kills the managed Firefox process. * @return {!promise.Promise} A promise for when the process has terminated. @@ -59,7 +57,6 @@ export class Profile { */ addExtension(extension: string): void; - /** * Sets a desired preference for this profile. * @param {string} key The preference key. @@ -70,7 +67,6 @@ export class Profile { 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 @@ -81,7 +77,6 @@ export class Profile { */ 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 @@ -89,21 +84,18 @@ export class Profile { */ 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. @@ -111,35 +103,30 @@ export class Profile { */ 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 @@ -151,7 +138,6 @@ export class Profile { */ 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. @@ -264,7 +250,6 @@ export class Driver extends webdriver.WebDriver { */ static createSession(opt_config?: Options | webdriver.Capabilities, opt_executor?: http.Executor | remote.DriverService, opt_flow?: webdriver.promise.ControlFlow): Driver; - /** * This function is a no-op as file detectors are not supported by this * implementation. @@ -305,4 +290,3 @@ export class ServiceBuilder extends remote.DriverService.Builder { */ setFirefoxBinary(binary: string | Binary): this; } - diff --git a/types/selenium-webdriver/http.d.ts b/types/selenium-webdriver/http.d.ts index 4fc12afb19..72fa1b2c5f 100644 --- a/types/selenium-webdriver/http.d.ts +++ b/types/selenium-webdriver/http.d.ts @@ -42,7 +42,6 @@ export class Response { toString(): string; } - export function post(path: string): any; export function del(path: string): any; export function get(path: string): any; diff --git a/types/selenium-webdriver/index.d.ts b/types/selenium-webdriver/index.d.ts index bfd583302e..08b77d0ce1 100644 --- a/types/selenium-webdriver/index.d.ts +++ b/types/selenium-webdriver/index.d.ts @@ -241,7 +241,6 @@ export namespace error { } export namespace logging { - /** * A hash describing log preferences. * @typedef {Object.} @@ -268,7 +267,7 @@ export namespace logging { * Common log types. * @enum {string} */ - var Type: IType; + const Type: IType; /** * Defines a message level that may be used to control logging output. @@ -984,28 +983,22 @@ export namespace promise { */ constructor(resolver: (resolve: IFulfilledCallback, reject: IRejectedCallback) => void, opt_flow?: ControlFlow); - //region Static Methods + /** + * Creates a promise that is immediately resolved with the given value. + * + * @param {T=} opt_value The value to resolve. + * @return {!ManagedPromise} A promise resolved with the given value. + * @template T + */ + static resolve(opt_value?: T): Promise; - /** - * Creates a promise that is immediately resolved with the given value. - * - * @param {T=} opt_value The value to resolve. - * @return {!ManagedPromise} A promise resolved with the given value. - * @template T - */ - static resolve(opt_value?: T): Promise; - - /** - * Creates a promise that is immediately rejected with the given reason. - * - * @param {*=} opt_reason The rejection reason. - * @return {!ManagedPromise} A new rejected promise. - */ - static reject(opt_reason?: any): Promise; - - //endregion - - // region Methods + /** + * Creates a promise that is immediately rejected with the given reason. + * + * @param {*=} opt_reason The rejection reason. + * @return {!ManagedPromise} A new rejected promise. + */ + static reject(opt_reason?: any): Promise; /** * Registers listeners for when this instance is resolved. @@ -1046,9 +1039,6 @@ export namespace promise { * @template R */ catch(errback: (err: any) => R | IThenable): Promise; - - - // endregion } /** @@ -1124,10 +1114,10 @@ export namespace promise { } interface IControlFlowTimer { - clearInterval: (ms: number) => void; - clearTimeout: (ms: number) => void; - setInterval: (fn: Function, ms: number) => number; - setTimeout: (fn: Function, ms: number) => number; + clearInterval(ms: number): void; + clearTimeout(ms: number): void; + setInterval(fn: Function, ms: number): number; + setTimeout(fn: Function, ms: number): number; } interface IEventType { @@ -1314,7 +1304,6 @@ export class WebElementCondition extends Condition { } export namespace until { - /** * 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 @@ -1545,7 +1534,7 @@ interface IButton { * * @enum {string} */ -export var Button: IButton; +export const Button: IButton; interface IKey { NULL: string; @@ -1624,7 +1613,7 @@ interface IKey { * @param {...string} var_args The key sequence to concatenate. * @return {string} The null-terminated key sequence. */ - chord: (...var_args: Array) => string; + chord(...var_args: Array): string; } /** @@ -1634,7 +1623,7 @@ interface IKey { * * @enum {string} */ -export var Key: IKey; +export const Key: IKey; /** * Class for defining sequences of complex user interactions. Each sequence @@ -1652,7 +1641,6 @@ export var Key: IKey; * */ export class ActionSequence { - // region Constructors /** @@ -1827,7 +1815,6 @@ export class ActionSequence { // endregion } - /** * Class for defining sequences of user touch interactions. Each sequence * will not be executed until {@link #perform} is called. @@ -1847,7 +1834,6 @@ export class TouchSequence { */ constructor(driver: WebDriver); - /** * Executes this action sequence. * @return {!promise.Promise} A promise that will be resolved once @@ -1855,7 +1841,6 @@ export class TouchSequence { */ perform(): promise.Promise; - /** * Taps an element. * @@ -1864,7 +1849,6 @@ export class TouchSequence { */ tap(elem: WebElement): TouchSequence; - /** * Double taps an element. * @@ -1873,7 +1857,6 @@ export class TouchSequence { */ doubleTap(elem: WebElement): TouchSequence; - /** * Long press on an element. * @@ -1882,7 +1865,6 @@ export class TouchSequence { */ longPress(elem: WebElement): TouchSequence; - /** * Touch down at the given location. * @@ -1891,7 +1873,6 @@ export class TouchSequence { */ tapAndHold(location: ILocation): TouchSequence; - /** * Move a held {@linkplain #tapAndHold touch} to the specified location. * @@ -1900,7 +1881,6 @@ export class TouchSequence { */ move(location: ILocation): TouchSequence; - /** * Release a held {@linkplain #tapAndHold touch} at the specified location. * @@ -1909,7 +1889,6 @@ export class TouchSequence { */ release(location: ILocation): TouchSequence; - /** * Scrolls the touch screen by the given offset. * @@ -2019,7 +1998,6 @@ export class Alert { sendKeys(text: string): promise.Promise; // endregion - } /** @@ -2107,7 +2085,7 @@ interface IBrowser { HTMLUNIT: string; } -export var Browser: IBrowser; +export const Browser: IBrowser; interface ProxyConfig { proxyType: string; @@ -2116,9 +2094,9 @@ interface ProxyConfig { httpProxy?: string; sslProxy?: string; noProxy?: string; - socksProxy?: string, - socksUsername?: string, - socksPassword?: string + socksProxy?: string; + socksUsername?: string; + socksPassword?: string; } /** @@ -2161,7 +2139,6 @@ interface ProxyConfig { * node mytest.js */ export class Builder { - // region Constructors /** @@ -2399,7 +2376,6 @@ export class Builder { * @final */ export class By { - /** * @param {string} using the name of the location strategy to use. * @param {string} value the value to search for. @@ -2539,7 +2515,6 @@ type ByHash = { className: string } | * @enum {string} */ interface ICapability { - /** * Indicates whether a driver should accept all SSL certs by default. This * capability only applies when requesting a new session. To query whether @@ -2548,7 +2523,6 @@ interface ICapability { */ ACCEPT_SSL_CERTS: string; - /** * The browser name. Common browser names are defined in the * {@link Browser} enum. @@ -2628,7 +2602,7 @@ interface ICapability { VERSION: string; } -export var Capability: ICapability; +export const Capability: ICapability; export class Capabilities { // region Constructors @@ -2681,7 +2655,6 @@ export class Capabilities { */ setProxy(proxy: ProxyConfig): Capabilities; - /** * Sets whether native events should be used. * @param {boolean} enabled Whether to enable native events. @@ -2689,7 +2662,6 @@ export class Capabilities { */ 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 @@ -2916,7 +2888,7 @@ interface ICommandName { UPLOAD_FILE: string; } -export var CommandName: ICommandName; +export const CommandName: ICommandName; /** * Describes a command to be executed by the WebDriverJS framework. @@ -3046,7 +3018,6 @@ export class EventEmitter { */ addListener(type: string, fn: Function, opt_scope?: any, opt_oneshot?: boolean): EventEmitter; - /** * Registers a one-time listener which will be called only the first time an * event is emitted, after which it will be removed. @@ -3085,7 +3056,6 @@ export class EventEmitter { // endregion } - /** * Interface for navigating back and forth in the browser history. */ @@ -3141,7 +3111,6 @@ export class Navigation { } interface IWebDriverOptionsCookie { - /** * The name of the cookie. */ @@ -3199,7 +3168,7 @@ interface IWebDriverOptionsCookie { * * @type {(!number|undefined)} */ - expiry?: number + expiry?: number; } /** @@ -3354,7 +3323,6 @@ export class Timeouts { * An interface for managing the current window. */ export class Window { - // region Constructors /** @@ -3417,7 +3385,6 @@ export class Window { * Interface for managing WebDriver log records. */ export class Logs { - // region Constructors /** @@ -3460,7 +3427,6 @@ export class Logs { * An interface for changing the focus of the driver to another frame or window. */ export class TargetLocator { - // region Constructors /** @@ -3576,7 +3542,7 @@ export class FileDetector { type CreateSessionCapabilities = Capabilities | { desired?: Capabilities, required?: Capabilities - } + }; /** * Creates a new WebDriver client, which provides control over a browser. @@ -3708,7 +3674,6 @@ export class WebDriver { */ schedule(command: Command, description: string): promise.Promise; - /** * Sets the {@linkplain input.FileDetector file detector} that should be * used with this instance. @@ -3716,21 +3681,18 @@ export class WebDriver { */ setFileDetector(detector: FileDetector): void; - /** * @return {!promise.Promise.} A promise for this * client's session. */ getSession(): promise.Promise; - /** * @return {!promise.Promise.} A promise * that will resolve with the this instance's capabilities. */ getCapabilities(): promise.Promise; - /** * Schedules a command to quit the current session. After calling quit, this * instance will be invalidated and may no longer be used to issue commands @@ -3755,7 +3717,6 @@ export class WebDriver { */ actions(): ActionSequence; - /** * Creates a new touch sequence using this driver. The sequence will not be * scheduled for execution until {@link actions.TouchSequence#perform} is @@ -3770,7 +3731,6 @@ export class WebDriver { */ touchActions(): TouchSequence; - /** * Schedules a command to execute JavaScript in the context of the currently * selected frame or window. The script fragment will be executed as the body @@ -4842,7 +4802,6 @@ export class WebElementPromise extends WebElement implements promise.IThenable(opt_callback?: (value: WebElement) => R, opt_errback?: (error: any) => any): promise.Promise; - /** * Registers a listener for when this promise is rejected. This is synonymous * with the {@code catch} clause in a synchronous API: @@ -4873,7 +4832,6 @@ export class WebElementPromise extends WebElement implements promise.IThenable; } -export module DriverService { - +export namespace DriverService { /** * Creates {@link DriverService} objects that manage a WebDriver server in a * child process. */ - export class Builder { + class Builder { /** * @param {string} exe Path to the executable to use. This executable must * accept the `--port` flag for defining the port to start the server on. @@ -90,7 +89,6 @@ export module DriverService { */ addArguments(...var_args: string[]): this; - /** * Sets the host name to access the server on. If specified, the * {@linkplain #setLoopback() loopback} setting will be ignored. @@ -119,7 +117,6 @@ export module DriverService { */ setPath(basePath: string | null): this; - /** * Sets the port to start the server on. * diff --git a/types/selenium-webdriver/test/chrome.ts b/types/selenium-webdriver/test/chrome.ts index b26c43c2d6..a40afe854e 100644 --- a/types/selenium-webdriver/test/chrome.ts +++ b/types/selenium-webdriver/test/chrome.ts @@ -3,17 +3,17 @@ import * as remote from 'selenium-webdriver/remote'; import * as webdriver from 'selenium-webdriver'; function TestChromeDriver() { - var driver: chrome.Driver = chrome.Driver.createSession(); + let driver: chrome.Driver = chrome.Driver.createSession(); driver = chrome.Driver.createSession(webdriver.Capabilities.chrome()); driver = chrome.Driver.createSession(webdriver.Capabilities.chrome(), new remote.DriverService('executable', new chrome.Options()), new webdriver.promise.ControlFlow()); - var baseDriver: webdriver.WebDriver = driver; + let baseDriver: webdriver.WebDriver = driver; } function TestChromeOptions() { - var options: chrome.Options = new chrome.Options(); + let options: chrome.Options = new chrome.Options(); options = chrome.Options.fromCapabilities(webdriver.Capabilities.chrome()); options = options.addArguments('a', 'b', 'c'); @@ -35,15 +35,15 @@ function TestChromeOptions() { tracingCategories: 'category', bufferUsageReportingInterval: 1000 }); options = options.setProxy({ proxyType: 'proxyType' }); options = options.setUserPreferences('preferences'); - var capabilities: webdriver.Capabilities = options.toCapabilities(); + let capabilities: webdriver.Capabilities = options.toCapabilities(); capabilities = options.toCapabilities(webdriver.Capabilities.chrome()); } function TestServiceBuilder() { - var builder: chrome.ServiceBuilder = new chrome.ServiceBuilder(); + let builder: chrome.ServiceBuilder = new chrome.ServiceBuilder(); builder = new chrome.ServiceBuilder('exe'); - var anything: any = builder.build(); + let anything: any = builder.build(); builder = builder.setPort(8080); builder = builder.setAdbPort(5037); builder = builder.loggingTo('path'); @@ -52,10 +52,10 @@ function TestServiceBuilder() { builder = builder.setPath('path'); builder = builder.setStdio('config'); builder = builder.setStdio(['A', 'B']); - builder = builder.setEnvironment({ 'A': 'a', 'B': 'b' }); + builder = builder.setEnvironment({ A: 'a', B: 'b' }); } function TestChromeModule() { - var service: any = chrome.getDefaultService(); + let service: any = chrome.getDefaultService(); chrome.setDefaultService(new remote.DriverService('executable', new chrome.Options())); } diff --git a/types/selenium-webdriver/test/firefox.ts b/types/selenium-webdriver/test/firefox.ts index 38a3c3634e..0a8cabda41 100644 --- a/types/selenium-webdriver/test/firefox.ts +++ b/types/selenium-webdriver/test/firefox.ts @@ -4,26 +4,26 @@ import * as webdriver from 'selenium-webdriver'; import * as http from 'selenium-webdriver/http'; function TestBinary() { - var binary: firefox.Binary = new firefox.Binary(); + let binary: firefox.Binary = new firefox.Binary(); binary = new firefox.Binary('exe'); binary.addArguments('A', 'B', 'C'); - var promise: webdriver.promise.Promise = binary.kill(); + let promise: webdriver.promise.Promise = binary.kill(); binary.launch('profile').then((result: any) => {}); } function TestFirefoxDriver() { - var driver: firefox.Driver = firefox.Driver.createSession(); + let driver: firefox.Driver = firefox.Driver.createSession(); driver = firefox.Driver.createSession(webdriver.Capabilities.firefox()); driver = firefox.Driver.createSession(webdriver.Capabilities.firefox(), new http.Executor(new http.HttpClient('http://someurl'))); driver = firefox.Driver.createSession(webdriver.Capabilities.firefox(), new remote.DriverService('/dev/null', {})); driver = firefox.Driver.createSession(webdriver.Capabilities.firefox(), new remote.DriverService('/dev/null', {}), new webdriver.promise.ControlFlow()); - var baseDriver: webdriver.WebDriver = driver; + let baseDriver: webdriver.WebDriver = driver; } function TestFirefoxOptions() { - var options: firefox.Options = new firefox.Options(); + let options: firefox.Options = new firefox.Options(); options = options.setBinary('binary'); options = options.setBinary(new firefox.Binary()); @@ -31,19 +31,19 @@ function TestFirefoxOptions() { options = options.setProfile('profile'); options = options.setProfile(new firefox.Profile()); options = options.setProxy({ proxyType: 'proxy' }); - var capabilities: webdriver.Capabilities = options.toCapabilities(); + let capabilities: webdriver.Capabilities = options.toCapabilities(); } function TestFirefoxProfile() { - var profile: firefox.Profile = new firefox.Profile(); + let profile: firefox.Profile = new firefox.Profile(); profile = new firefox.Profile('dir'); - var bool: boolean = profile.acceptUntrustedCerts(); + let bool: boolean = profile.acceptUntrustedCerts(); profile.addExtension('ext'); bool = profile.assumeUntrustedCertIssuer(); profile.encode().then((prof: string) => {}); - var num: number = profile.getPort(); - var anything: any = profile.getPreference('key'); + let num: number = profile.getPort(); + let anything: any = profile.getPreference('key'); bool = profile.nativeEventsEnabled(); profile.setAcceptUntrustedCerts(true); profile.setAssumeUntrustedCertIssuer(true); @@ -52,16 +52,15 @@ function TestFirefoxProfile() { profile.setPreference('key', 'value'); profile.setPreference('key', 5); profile.setPreference('key', true); - var stringPromise: webdriver.promise.Promise = profile.writeToDisk(); + let stringPromise: webdriver.promise.Promise = profile.writeToDisk(); stringPromise = profile.writeToDisk(true); } - function TestServiceBuilder() { - var builder: firefox.ServiceBuilder = new firefox.ServiceBuilder(); + let builder: firefox.ServiceBuilder = new firefox.ServiceBuilder(); builder = new firefox.ServiceBuilder('exe'); - var anything: any = builder.build(); + let anything: any = builder.build(); builder = builder.setPort(8080); builder = builder.enableVerboseLogging(); builder = builder.enableVerboseLogging(true); @@ -70,5 +69,5 @@ function TestServiceBuilder() { builder = builder.setPath('path'); builder = builder.setStdio('config'); builder = builder.setStdio(['A', 'B']); - builder = builder.setEnvironment({ 'A': 'a', 'B': 'b' }); + builder = builder.setEnvironment({ A: 'a', B: 'b' }); } diff --git a/types/selenium-webdriver/test/index.ts b/types/selenium-webdriver/test/index.ts index 2556e7e2a8..5d4f8e8b4e 100644 --- a/types/selenium-webdriver/test/index.ts +++ b/types/selenium-webdriver/test/index.ts @@ -6,15 +6,15 @@ import * as remote from 'selenium-webdriver/remote'; import * as testing from 'selenium-webdriver/testing'; function TestBuilder() { - var builder: webdriver.Builder = new webdriver.Builder(); + let builder: webdriver.Builder = new webdriver.Builder(); - var driver: webdriver.WebDriver = builder.build(); + let driver: webdriver.WebDriver = builder.build(); builder = builder.forBrowser('name'); builder = builder.forBrowser('name', 'version'); builder = builder.forBrowser('name', 'version', 'platform'); - var cap: webdriver.Capabilities = builder.getCapabilities(); - var str: string = builder.getServerUrl(); + let cap: webdriver.Capabilities = builder.getCapabilities(); + let str: string = builder.getServerUrl(); builder = builder.setAlertBehavior('behavior'); builder = builder.setChromeOptions(new chrome.Options()); @@ -31,13 +31,13 @@ function TestBuilder() { } function TestActionSequence() { - var driver: webdriver.WebDriver = new webdriver.Builder(). + let driver: webdriver.WebDriver = new webdriver.Builder(). withCapabilities(webdriver.Capabilities.chrome()). build(); - var sequence: webdriver.ActionSequence = new webdriver.ActionSequence(driver); - var element: webdriver.WebElement = new webdriver.WebElement(driver, 'elementId'); - var promise: webdriver.promise.Promise; + let sequence: webdriver.ActionSequence = new webdriver.ActionSequence(driver); + let element: webdriver.WebElement = new webdriver.WebElement(driver, 'elementId'); + let promise: webdriver.promise.Promise; element = new webdriver.WebElement(driver, promise); // Click @@ -87,12 +87,12 @@ function TestActionSequence() { } function TestTouchSequence() { - var driver: webdriver.WebDriver = new webdriver.Builder(). + let driver: webdriver.WebDriver = new webdriver.Builder(). withCapabilities(webdriver.Capabilities.chrome()). build(); - var element: webdriver.WebElement = new webdriver.WebElement(driver, 'elementId'); + let element: webdriver.WebElement = new webdriver.WebElement(driver, 'elementId'); - var sequence: webdriver.TouchSequence = new webdriver.TouchSequence(driver); + let sequence: webdriver.TouchSequence = new webdriver.TouchSequence(driver); sequence = sequence.tap(element); sequence = sequence.doubleTap(element); @@ -109,11 +109,11 @@ function TestTouchSequence() { } function TestAlert() { - var driver: webdriver.WebDriver = new webdriver.Builder(). + let driver: webdriver.WebDriver = new webdriver.Builder(). withCapabilities(webdriver.Capabilities.chrome()). build(); - var alert: webdriver.Alert = driver.switchTo().alert(); + let alert: webdriver.Alert = driver.switchTo().alert(); alert.accept().then(() => {}); alert.dismiss().then(() => {}); @@ -122,7 +122,7 @@ function TestAlert() { } function TestBrowser() { - var browser: string; + let browser: string; browser = webdriver.Browser.ANDROID; browser = webdriver.Browser.CHROME; @@ -137,7 +137,7 @@ function TestBrowser() { } function TestButton() { - var button: string; + let button: string; button = webdriver.Button.LEFT; button = webdriver.Button.MIDDLE; @@ -145,14 +145,14 @@ function TestButton() { } function TestCapabilities() { - var capabilities: webdriver.Capabilities = new webdriver.Capabilities(); + let capabilities: webdriver.Capabilities = new webdriver.Capabilities(); capabilities = new webdriver.Capabilities(webdriver.Capabilities.chrome()); - var objCapabilities: any = {}; + let objCapabilities: any = {}; objCapabilities[webdriver.Capability.BROWSER_NAME] = webdriver.Browser.PHANTOM_JS; capabilities = new webdriver.Capabilities(objCapabilities); - var anything: any = capabilities.get(webdriver.Capability.SECURE_SSL); - var check: boolean = capabilities.has(webdriver.Capability.SECURE_SSL); + let anything: any = capabilities.get(webdriver.Capability.SECURE_SSL); + let check: boolean = capabilities.has(webdriver.Capability.SECURE_SSL); capabilities = capabilities.merge(capabilities); capabilities = capabilities.merge(objCapabilities); capabilities = capabilities.set(webdriver.Capability.VERSION, { abc: 'def' }); @@ -180,7 +180,7 @@ function TestCapabilities() { } function TestCapability() { - var capability: string; + let capability: string; capability = webdriver.Capability.ACCEPT_SSL_CERTS; capability = webdriver.Capability.BROWSER_NAME; @@ -202,19 +202,19 @@ function TestCapability() { } function TestCommand() { - var command: webdriver.Command = new webdriver.Command(webdriver.CommandName.ADD_COOKIE); + let command: webdriver.Command = new webdriver.Command(webdriver.CommandName.ADD_COOKIE); - var name: string = command.getName(); - var param: any = command.getParameter('param'); + let name: string = command.getName(); + let param: any = command.getParameter('param'); - var params: any = command.getParameters(); + let params: any = command.getParameters(); command = command.setParameter('param', 123); command = command.setParameters({ param: 123 }); } function TestCommandName() { - var command: string; + let command: string; command = webdriver.CommandName.ACCEPT_ALERT; command = webdriver.CommandName.ADD_COOKIE; @@ -315,21 +315,21 @@ function TestCommandName() { } function TestEventEmitter() { - var emitter: webdriver.EventEmitter = new webdriver.EventEmitter(); + let emitter: webdriver.EventEmitter = new webdriver.EventEmitter(); - var callback = (a: number, b: number, c: number) => {}; + let callback = (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'); + let listeners = emitter.listeners('ABC'); if (listeners[0].oneshot) { listeners[0].fn.apply(listeners[0].scope); } - var length: number = listeners.length; - var listenerInfo = listeners[0]; + let length: number = listeners.length; + let listenerInfo = listeners[0]; if (listenerInfo.oneshot) { listenerInfo.fn.apply(listenerInfo.scope, [1, 2, 3]); } @@ -347,7 +347,7 @@ function TestEventEmitter() { } function TestKey() { - var key: string; + let key: string; key = webdriver.Key.ADD; key = webdriver.Key.ALT; @@ -412,13 +412,13 @@ function TestKey() { } function TestBy() { - var driver: webdriver.WebDriver = new webdriver.Builder(). + let driver: webdriver.WebDriver = new webdriver.Builder(). withCapabilities(webdriver.Capabilities.chrome()). build(); - var locator: webdriver.By = new webdriver.By('class name', 'class'); + let locator: webdriver.By = new webdriver.By('class name', 'class'); - var str: string = locator.toString(); + let str: string = locator.toString(); locator = webdriver.By.className('class'); locator = webdriver.By.css('css'); @@ -430,9 +430,9 @@ function TestBy() { locator = webdriver.By.xpath('xpath'); // Can import 'By' without import declarations - var By = webdriver.By; + let By = webdriver.By; - var locatorHash: webdriver.ByHash; + let locatorHash: webdriver.ByHash; locatorHash = { className: 'class' }; locatorHash = { css: 'css' }; locatorHash = { id: 'id' }; @@ -446,45 +446,45 @@ function TestBy() { } function TestSession() { - var session: webdriver.Session = new webdriver.Session('ABC', webdriver.Capabilities.android()); - var capabilitiesObj: any = {}; + let session: webdriver.Session = new webdriver.Session('ABC', webdriver.Capabilities.android()); + let capabilitiesObj: any = {}; capabilitiesObj[webdriver.Capability.BROWSER_NAME] = webdriver.Browser.ANDROID; capabilitiesObj[webdriver.Capability.PLATFORM] = 'ANDROID'; session = new webdriver.Session('ABC', capabilitiesObj); - var capabilities: webdriver.Capabilities = session.getCapabilities(); - var capability: any = session.getCapability(webdriver.Capability.BROWSER_NAME); - var id: string = session.getId(); - var data: string = session.toJSON(); + let capabilities: webdriver.Capabilities = session.getCapabilities(); + let capability: any = session.getCapability(webdriver.Capability.BROWSER_NAME); + let id: string = session.getId(); + let data: string = session.toJSON(); } function TestWebDriverFileDetector() { - var driver: webdriver.WebDriver = new webdriver.Builder(). + let driver: webdriver.WebDriver = new webdriver.Builder(). withCapabilities(webdriver.Capabilities.chrome()). build(); - var fileDetector: webdriver.FileDetector = new webdriver.FileDetector(); + let fileDetector: webdriver.FileDetector = new webdriver.FileDetector(); fileDetector.handleFile(driver, 'path/to/file').then((path: string) => {}); } function TestWebDriverLogs() { - var driver: webdriver.WebDriver = new webdriver.Builder(). + let driver: webdriver.WebDriver = new webdriver.Builder(). withCapabilities(webdriver.Capabilities.chrome()). build(); - var logs: webdriver.Logs = new webdriver.Logs(driver); + let logs: webdriver.Logs = new webdriver.Logs(driver); logs.get(webdriver.logging.Type.BROWSER).then((entries: webdriver.logging.Entry[]) => {}); logs.getAvailableLogTypes().then((types: string[]) => {}); } function TestWebDriverNavigation() { - var driver: webdriver.WebDriver = new webdriver.Builder(). + let driver: webdriver.WebDriver = new webdriver.Builder(). withCapabilities(webdriver.Capabilities.chrome()). build(); - var navigation: webdriver.Navigation = new webdriver.Navigation(driver); + let navigation: webdriver.Navigation = new webdriver.Navigation(driver); navigation.back().then(() => {}); navigation.forward().then(() => {}); @@ -493,19 +493,19 @@ function TestWebDriverNavigation() { } function TestWebDriverOptions() { - var driver: webdriver.WebDriver = new webdriver.Builder(). + let driver: webdriver.WebDriver = new webdriver.Builder(). withCapabilities(webdriver.Capabilities.chrome()). build(); - var options: webdriver.Options = new webdriver.Options(driver); - var promise: webdriver.promise.Promise; + let options: webdriver.Options = new webdriver.Options(driver); + let promise: webdriver.promise.Promise; - var name: string = 'name'; - var value: string = 'value'; - var path: string = 'path'; - var domain: string = 'domain'; - var secure: boolean = true; - var httpOnly: boolean = true; + let name: string = 'name'; + let value: string = 'value'; + let path: string = 'path'; + let domain: string = 'domain'; + let secure: boolean = true; + let httpOnly: boolean = true; // Add Cookie promise = options.addCookie({ name, value }); @@ -519,37 +519,37 @@ function TestWebDriverOptions() { promise = options.deleteAllCookies(); promise = options.deleteCookie('name'); options.getCookie('name').then((cookie: webdriver.IWebDriverCookie) => { - var expiry: number = cookie.expiry; + let expiry: number = cookie.expiry; }); options.getCookies().then((cookies: webdriver.IWebDriverCookie[]) => { }); - var logs: webdriver.Logs = options.logs(); - var timeouts: webdriver.Timeouts = options.timeouts(); - var window: webdriver.Window = options.window(); + let logs: webdriver.Logs = options.logs(); + let timeouts: webdriver.Timeouts = options.timeouts(); + let window: webdriver.Window = options.window(); } function TestWebDriverTargetLocator() { - var driver: webdriver.WebDriver = new webdriver.Builder(). + let driver: webdriver.WebDriver = new webdriver.Builder(). withCapabilities(webdriver.Capabilities.chrome()). build(); - var locator: webdriver.TargetLocator = new webdriver.TargetLocator(driver); - var promise: webdriver.promise.Promise; + let locator: webdriver.TargetLocator = new webdriver.TargetLocator(driver); + let promise: webdriver.promise.Promise; - var element: webdriver.WebElement = locator.activeElement(); - var alert: webdriver.Alert = locator.alert(); + let element: webdriver.WebElement = locator.activeElement(); + let alert: webdriver.Alert = locator.alert(); promise = locator.defaultContent(); promise = locator.frame(1); promise = locator.window('nameOrHandle'); } function TestWebDriverTimeouts() { - var driver: webdriver.WebDriver = new webdriver.Builder(). + let driver: webdriver.WebDriver = new webdriver.Builder(). withCapabilities(webdriver.Capabilities.chrome()). build(); - var timeouts: webdriver.Timeouts = new webdriver.Timeouts(driver); - var promise: webdriver.promise.Promise; + let timeouts: webdriver.Timeouts = new webdriver.Timeouts(driver); + let promise: webdriver.promise.Promise; promise = timeouts.implicitlyWait(123); promise = timeouts.pageLoadTimeout(123); @@ -557,14 +557,14 @@ function TestWebDriverTimeouts() { } function TestWebDriverWindow() { - var driver: webdriver.WebDriver = new webdriver.Builder(). + let driver: webdriver.WebDriver = new webdriver.Builder(). withCapabilities(webdriver.Capabilities.chrome()). build(); - var window: webdriver.Window = new webdriver.Window(driver); - var locationPromise: webdriver.promise.Promise; - var sizePromise: webdriver.promise.Promise; - var voidPromise: webdriver.promise.Promise; + let window: webdriver.Window = new webdriver.Window(driver); + let locationPromise: webdriver.promise.Promise; + let sizePromise: webdriver.promise.Promise; + let voidPromise: webdriver.promise.Promise; locationPromise = window.getPosition(); sizePromise = window.getSize(); @@ -574,28 +574,28 @@ function TestWebDriverWindow() { } function TestWebDriver() { - var session: webdriver.Session = new webdriver.Session('ABC', webdriver.Capabilities.android()); - var sessionPromise: webdriver.promise.Promise; - var httpClient: http.HttpClient = new http.HttpClient('http://someserver'); - var executor: http.Executor = new http.Executor(httpClient); - var flow: webdriver.promise.ControlFlow = new webdriver.promise.ControlFlow(); - var driver: webdriver.WebDriver = new webdriver.WebDriver(session, executor); + let session: webdriver.Session = new webdriver.Session('ABC', webdriver.Capabilities.android()); + let sessionPromise: webdriver.promise.Promise; + let httpClient: http.HttpClient = new http.HttpClient('http://someserver'); + let executor: http.Executor = new http.Executor(httpClient); + let flow: webdriver.promise.ControlFlow = new webdriver.promise.ControlFlow(); + let driver: webdriver.WebDriver = new webdriver.WebDriver(session, executor); driver = new webdriver.WebDriver(session, 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; - var webElementPromise: webdriver.WebElementPromise; + let voidPromise: webdriver.promise.Promise; + let stringPromise: webdriver.promise.Promise; + let booleanPromise: webdriver.promise.Promise; + let webElementPromise: webdriver.WebElementPromise; - var actions: webdriver.ActionSequence = driver.actions(); - var touchActions: webdriver.TouchSequence = driver.touchActions(); + let actions: webdriver.ActionSequence = driver.actions(); + let touchActions: webdriver.TouchSequence = driver.touchActions(); // call stringPromise = driver.call(() => 'value'); stringPromise = driver.call(() => stringPromise); - stringPromise = driver.call(() => { var d: any = this; return 'value'; }, driver); + stringPromise = driver.call(() => { let d: any = this; return 'value'; }, driver); stringPromise = driver.call((a: number) => 'value', driver, 1); voidPromise = driver.close(); @@ -614,7 +614,7 @@ function TestWebDriver() { stringPromise = driver.executeScript((a: number) => {}, 1); // findElement - var element: webdriver.WebElement; + let element: webdriver.WebElement; element = driver.findElement(webdriver.By.id('ABC')); element = driver.findElement(webdriver.By.js('function(){}')); @@ -631,11 +631,11 @@ function TestWebDriver() { stringPromise = driver.getTitle(); stringPromise = driver.getWindowHandle(); - var options: webdriver.Options = driver.manage(); - var navigation: webdriver.Navigation = driver.navigate(); - var locator: webdriver.TargetLocator = driver.switchTo(); + let options: webdriver.Options = driver.manage(); + let navigation: webdriver.Navigation = driver.navigate(); + let locator: webdriver.TargetLocator = driver.switchTo(); - var fileDetector: webdriver.FileDetector = new webdriver.FileDetector(); + let fileDetector: webdriver.FileDetector = new webdriver.FileDetector(); driver.setFileDetector(fileDetector); voidPromise = driver.quit(); @@ -643,7 +643,7 @@ function TestWebDriver() { voidPromise = driver.sleep(123); stringPromise = driver.takeScreenshot(); - var booleanCondition: webdriver.Condition; + let booleanCondition: webdriver.Condition; booleanPromise = driver.wait(booleanPromise); booleanPromise = driver.wait(booleanCondition); booleanPromise = driver.wait((driver: webdriver.WebDriver) => true); @@ -660,24 +660,24 @@ function TestWebDriver() { } function TestSerializable() { - var serializable: webdriver.Serializable; - var serial: string | webdriver.promise.IThenable = serializable.serialize(); + let serializable: webdriver.Serializable; + let serial: string | webdriver.promise.IThenable = serializable.serialize(); } function TestWebElement() { - var driver: webdriver.WebDriver = new webdriver.Builder(). + let driver: webdriver.WebDriver = new webdriver.Builder(). withCapabilities(webdriver.Capabilities.chrome()). build(); - var promise: webdriver.promise.Promise; - var element: webdriver.WebElement; + let promise: webdriver.promise.Promise; + let element: webdriver.WebElement; element = new webdriver.WebElement(driver, 'elementId'); element = new webdriver.WebElement(driver, promise); - var voidPromise: webdriver.promise.Promise; - var stringPromise: webdriver.promise.Promise; - var booleanPromise: webdriver.promise.Promise; + let voidPromise: webdriver.promise.Promise; + let stringPromise: webdriver.promise.Promise; + let booleanPromise: webdriver.promise.Promise; voidPromise = element.clear(); voidPromise = element.click(); @@ -709,11 +709,11 @@ function TestWebElement() { } function TestWebElementPromise() { - var driver: webdriver.WebDriver = new webdriver.Builder(). + let driver: webdriver.WebDriver = new webdriver.Builder(). withCapabilities(webdriver.Capabilities.chrome()). build(); - var elementPromise: webdriver.WebElementPromise = driver.findElement(webdriver.By.id('id')); + let elementPromise: webdriver.WebElementPromise = driver.findElement(webdriver.By.id('id')); elementPromise.then(); elementPromise.then((element: webdriver.WebElement) => {}); @@ -722,11 +722,11 @@ function TestWebElementPromise() { } function TestLogging() { - var preferences: webdriver.logging.Preferences = new webdriver.logging.Preferences(); + let preferences: webdriver.logging.Preferences = new webdriver.logging.Preferences(); preferences.setLevel(webdriver.logging.Type.BROWSER, webdriver.logging.Level.ALL); - var prefs: any = preferences.toJSON(); + let prefs: any = preferences.toJSON(); - var level: webdriver.logging.Level = webdriver.logging.getLevel('OFF'); + let level: webdriver.logging.Level = webdriver.logging.getLevel('OFF'); level = webdriver.logging.getLevel(1); level = webdriver.logging.Level.ALL; @@ -736,10 +736,10 @@ function TestLogging() { level = webdriver.logging.Level.SEVERE; level = webdriver.logging.Level.WARNING; - var name: string = level.name; - var value: number = level.value; + let name: string = level.name; + let value: number = level.value; - var type: string; + let type: string; type = webdriver.logging.Type.BROWSER; type = webdriver.logging.Type.CLIENT; type = webdriver.logging.Type.DRIVER; @@ -748,7 +748,7 @@ function TestLogging() { } function TestLoggingEntry() { - var entry: webdriver.logging.Entry; + let entry: webdriver.logging.Entry; entry = new webdriver.logging.Entry(webdriver.logging.Level.ALL, 'ABC'); entry = new webdriver.logging.Entry('ALL', 'ABC'); @@ -757,23 +757,23 @@ function TestLoggingEntry() { entry = new webdriver.logging.Entry(webdriver.logging.Level.ALL, 'ABC', 123, webdriver.logging.Type.BROWSER); entry = new webdriver.logging.Entry('ALL', 'ABC', 123, webdriver.logging.Type.BROWSER); - var entryObj: any = entry.toJSON(); + let entryObj: any = entry.toJSON(); - var message: string = entry.message; - var timestamp: number = entry.timestamp; - var type: string = entry.type; + let message: string = entry.message; + let timestamp: number = entry.timestamp; + let type: string = entry.type; } function TestPromiseModule() { - var cancellationError: webdriver.promise.CancellationError = new webdriver.promise.CancellationError(); + let cancellationError: webdriver.promise.CancellationError = new webdriver.promise.CancellationError(); cancellationError = new webdriver.promise.CancellationError('message'); - var str: string = cancellationError.message; + let str: string = cancellationError.message; str = cancellationError.name; - var stringPromise: webdriver.promise.Promise; - var numberPromise: webdriver.promise.Promise; - var booleanPromise: webdriver.promise.Promise; - var voidPromise: webdriver.promise.Promise; + let stringPromise: webdriver.promise.Promise; + let numberPromise: webdriver.promise.Promise; + let booleanPromise: webdriver.promise.Promise; + let voidPromise: webdriver.promise.Promise; webdriver.promise.all([stringPromise]).then((values: string[]) => {}); @@ -791,7 +791,7 @@ function TestPromiseModule() { webdriver.promise.consume((a: number, b: number, c: number) => 5, this, 1, 2, 3) .then((value: number) => {}); - var numbersPromise: webdriver.promise.Promise = webdriver.promise.filter([1, 2, 3], (element: number, type: any, index: number, arr: number[]) => { + let numbersPromise: webdriver.promise.Promise = webdriver.promise.filter([1, 2, 3], (element: number, type: any, index: number, arr: number[]) => { return true; }); numbersPromise = webdriver.promise.filter([1, 2, 3], (element: number, type: any, index: number, arr: number[]) => { @@ -817,11 +817,11 @@ function TestPromiseModule() { return true; }, this); - var flow: webdriver.promise.ControlFlow = webdriver.promise.controlFlow(); + let flow: webdriver.promise.ControlFlow = webdriver.promise.controlFlow(); stringPromise = webdriver.promise.createFlow((newFlow: webdriver.promise.ControlFlow) => 'ABC'); - var deferred: webdriver.promise.Deferred; + let deferred: webdriver.promise.Deferred; deferred = webdriver.promise.defer(); deferred = webdriver.promise.defer(); @@ -837,8 +837,8 @@ function TestPromiseModule() { stringPromise = webdriver.promise.fullyResolved('abc'); - var bool: boolean = webdriver.promise.isGenerator(() => {}); - var isPromise: boolean = webdriver.promise.isPromise('ABC'); + let bool: boolean = webdriver.promise.isGenerator(() => {}); + let isPromise: boolean = webdriver.promise.isPromise('ABC'); stringPromise = webdriver.promise.rejected('{a: 123}'); @@ -848,18 +848,18 @@ function TestPromiseModule() { } function TestUntilModule() { - var driver: webdriver.WebDriver = new webdriver.Builder(). + let driver: webdriver.WebDriver = new webdriver.Builder(). withCapabilities(webdriver.Capabilities.chrome()). build(); - var conditionB: webdriver.Condition = new webdriver.Condition('message', (driver: webdriver.WebDriver) => true); - var conditionBBase: webdriver.Condition = conditionB; - var conditionWebElement: webdriver.WebElementCondition; - var conditionWebElements: webdriver.Condition; + let conditionB: webdriver.Condition = new webdriver.Condition('message', (driver: webdriver.WebDriver) => true); + let conditionBBase: webdriver.Condition = conditionB; + let conditionWebElement: webdriver.WebElementCondition; + let conditionWebElements: webdriver.Condition; conditionB = webdriver.until.ableToSwitchToFrame(5); - var conditionAlert: webdriver.Condition = webdriver.until.alertIsPresent(); - var el: webdriver.WebElement = driver.findElement(webdriver.By.id('id')); + let conditionAlert: webdriver.Condition = webdriver.until.alertIsPresent(); + let el: webdriver.WebElement = driver.findElement(webdriver.By.id('id')); conditionB = webdriver.until.stalenessOf(el); conditionB = webdriver.until.titleContains('text'); conditionB = webdriver.until.titleIs('text'); @@ -882,31 +882,31 @@ function TestUntilModule() { } function TestControlFlow() { - var flow: webdriver.promise.ControlFlow; + let flow: webdriver.promise.ControlFlow; flow = new webdriver.promise.ControlFlow(); - var emitter: webdriver.EventEmitter = flow; + let emitter: webdriver.EventEmitter = flow; - var eventType: string; + let 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 stringPromise: webdriver.promise.Promise; + let stringPromise: webdriver.promise.Promise; stringPromise = flow.execute(() => 'value'); stringPromise = flow.execute(() => stringPromise); stringPromise = flow.execute(() => stringPromise, 'Description'); - var schedule: string; + let schedule: string; schedule = flow.toString(); schedule = flow.getSchedule(); schedule = flow.getSchedule(true); flow.reset(); - var voidPromise: webdriver.promise.Promise = flow.timeout(123); + let voidPromise: webdriver.promise.Promise = flow.timeout(123); voidPromise = flow.timeout(123, 'Description'); stringPromise = flow.wait(stringPromise); @@ -917,12 +917,12 @@ function TestControlFlow() { } function TestDeferred() { - var deferred: webdriver.promise.Deferred; + let deferred: webdriver.promise.Deferred; deferred = new webdriver.promise.Deferred(); deferred = new webdriver.promise.Deferred(new webdriver.promise.ControlFlow()); - var promise: webdriver.promise.Promise = deferred.promise; + let promise: webdriver.promise.Promise = deferred.promise; deferred.errback(new Error('Error')); deferred.errback('Error'); @@ -933,8 +933,8 @@ function TestDeferred() { } function TestPromiseClass() { - var controlFlow: webdriver.promise.ControlFlow; - var promise: webdriver.promise.Promise; + let controlFlow: webdriver.promise.ControlFlow; + let promise: webdriver.promise.Promise; promise = new webdriver.promise.Promise((resolve: (value: string) => void, reject: () => void) => {}); promise = new webdriver.promise.Promise((resolve: (value: webdriver.promise.Promise) => void, reject: () => void) => {}); promise = new webdriver.promise.Promise((resolve: (value: string) => void, reject: () => void) => {}, controlFlow); @@ -946,7 +946,7 @@ function TestPromiseClass() { } function TestThenableClass() { - var thenable: webdriver.promise.Promise = new webdriver.promise.Promise((resolve, reject) => { + let thenable: webdriver.promise.Promise = new webdriver.promise.Promise((resolve, reject) => { resolve('a'); }); @@ -956,8 +956,8 @@ function TestThenableClass() { } async function TestAsyncAwaitable() { - var thenable: webdriver.promise.Promise = new webdriver.promise.Promise((resolve, reject) => resolve('foo')); - var str: string = await thenable; + let thenable: webdriver.promise.Promise = new webdriver.promise.Promise((resolve, reject) => resolve('foo')); + let str: string = await thenable; } function TestTestingModule() { @@ -973,7 +973,6 @@ function TestTestingModule() { testing.iit('My exclusive test.', () => { }); - }); testing.xdescribe('My disabled suite', () => { diff --git a/types/selenium-webdriver/tslint.json b/types/selenium-webdriver/tslint.json index 93fffac84e..f38c4dfc69 100644 --- a/types/selenium-webdriver/tslint.json +++ b/types/selenium-webdriver/tslint.json @@ -1,8 +1,8 @@ { "extends": "../tslint.json", "rules": { + "ban-types": false, "callable-types": false, - "forbidden-types": false, "interface-name": [false], "no-empty-interface": false, "unified-signatures": false diff --git a/types/serialize-javascript/index.d.ts b/types/serialize-javascript/index.d.ts new file mode 100644 index 0000000000..9cfa69b977 --- /dev/null +++ b/types/serialize-javascript/index.d.ts @@ -0,0 +1,29 @@ +// Type definitions for serialize-javascript 1.3 +// Project: https://github.com/yahoo/serialize-javascript +// Definitions by: François Nguyen +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare namespace serializeJavascript { + interface SerializeJSOptions { + /** + * This option is the same as the space argument that can be passed to JSON.stringify. + * It can be used to add whitespace and indentation to the serialized output to make it more readable. + */ + space?: string | number | undefined; + /** + * This option is a signal to serialize() that the object being serialized does not contain any function or regexps values. + * This enables a hot-path that allows serialization to be over 3x faster. + * If you're serializing a lot of data, and know its pure JSON, then you can enable this option for a speed-up. + */ + isJSON?: boolean; + } +} + +/** + * Serialize JavaScript to a superset of JSON that includes regular expressions and functions. + * @param {any} input data to serialize + * @param {serializeJavascript.SerializeJSOptions} options optional object + * @returns {string} serialized data + */ +declare function serializeJavascript(input: any, options?: serializeJavascript.SerializeJSOptions): string; +export = serializeJavascript; diff --git a/types/serialize-javascript/serialize-javascript-tests.ts b/types/serialize-javascript/serialize-javascript-tests.ts new file mode 100644 index 0000000000..b4c79f6a7c --- /dev/null +++ b/types/serialize-javascript/serialize-javascript-tests.ts @@ -0,0 +1,19 @@ +import * as serialize from "serialize-javascript"; + +const obj: any = { + str: "string", + num: 0, + obj: { foo: "foo" }, + arr: [1, 2, 3], + bool: true, + nil: null, + undef: undefined, + + fn: function echo(arg: any) { return arg; }, + re: /([^\s]+)/g +}; + +serialize(obj); +serialize(obj, { space: 2 }); +serialize(obj, { space: "\t" }); +serialize(obj, { isJSON: true }); diff --git a/types/serialize-javascript/tsconfig.json b/types/serialize-javascript/tsconfig.json new file mode 100644 index 0000000000..a0b35c9913 --- /dev/null +++ b/types/serialize-javascript/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "serialize-javascript-tests.ts" + ] +} \ No newline at end of file diff --git a/types/serialize-javascript/tslint.json b/types/serialize-javascript/tslint.json new file mode 100644 index 0000000000..2221e40e4a --- /dev/null +++ b/types/serialize-javascript/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } \ No newline at end of file diff --git a/types/session-file-store/index.d.ts b/types/session-file-store/index.d.ts index f8238cf109..5b755cafb9 100644 --- a/types/session-file-store/index.d.ts +++ b/types/session-file-store/index.d.ts @@ -5,18 +5,15 @@ /// - export = FileStore; declare namespace FileStore { - /** * FileStore Options * * @interface Options */ interface Options { - /** * The directory where the session files will be stored. Defaults to `./sessions` * @@ -111,7 +108,7 @@ declare namespace FileStore { * @type {Function} * @memberOf Options */ - logFn?: (...args: any[]) => void; + logFn?(...args: any[]): void; /** * Returns fallback session object after all failed retries. No defaults @@ -119,7 +116,7 @@ declare namespace FileStore { * @type {Function} * @memberOf Options */ - fallbackSessionFn?: (...args: any[]) => void; + fallbackSessionFn?(...args: any[]): void; /** * Object-to-text text encoding. Can be null. Defaults to `'utf8'` @@ -135,7 +132,7 @@ declare namespace FileStore { * @type {Function} * @memberOf Options */ - encoder?: (...args: any[]) => void; + encoder?(...args: any[]): void; /** * Decoding function. Takes encoded data, returns object. Defaults to `JSON.parse` @@ -143,7 +140,7 @@ declare namespace FileStore { * @type {Function} * @memberOf Options */ - decoder?: (...args: any[]) => void; + decoder?(...args: any[]): void; /** * If secret string is specified then enables encryption of the session before @@ -185,7 +182,7 @@ declare namespace FileStore { * * @memberOf Options */ - keyFunction?: (secret: string, sessionId: string) => string; + keyFunction?(secret: string, sessionId: string): string; } } @@ -196,7 +193,6 @@ declare namespace FileStore { * @class FileStore */ declare class FileStore { - /** * Creates an instance of FileStore. * @param {FileStore.Options} options @@ -283,5 +279,4 @@ declare class FileStore { * @memberOf FileStore */ expired(sessionId: string, callback: (errr: any, isExpired: boolean) => void): void; - } diff --git a/types/session-file-store/session-file-store-tests.ts b/types/session-file-store/session-file-store-tests.ts index ffe3c79bee..50d30da2ac 100644 --- a/types/session-file-store/session-file-store-tests.ts +++ b/types/session-file-store/session-file-store-tests.ts @@ -8,6 +8,4 @@ const options: FileStore.Options = { const sessionStore = new FileStore(options); -sessionStore.list((err: any, file: Array) => { - -}); \ No newline at end of file +sessionStore.list((err: any, file: string[]) => {}); diff --git a/types/sha1/sha1-tests.ts b/types/sha1/sha1-tests.ts index 22467632c8..6ce833b10b 100644 --- a/types/sha1/sha1-tests.ts +++ b/types/sha1/sha1-tests.ts @@ -1,29 +1,6 @@ import fs = require("fs"); import sha1 = require("sha1"); -/** - * API - * sha1(message) - * message -- String or Buffer - * returns String - * - * Usage - **************************************************** - * var sha1 = require('sha1'); * - * console.log(sha1('message')); * - **************************************************** - * This will print the following - * 6f9b9af3cd6e8b8a73c2cdced37fe9f59226e27d - * - * It supports buffers, too - **************************************************** - * var fs = require('fs'); * - * var sha1 = require('sha1'); * - * * - * fs.readFile('example.txt', function(err, buf) { * - * console.log(sha1(buf)); * - * }); * - * ************************************************** - */ + console.log(sha1('message')); // should print 6f9b9af3cd6e8b8a73c2cdced37fe9f59226e27d const testTwo = sha1('message', {asString: true}); diff --git a/types/sharepoint/index.d.ts b/types/sharepoint/index.d.ts index 1908d46b0c..dea4cae4fa 100644 --- a/types/sharepoint/index.d.ts +++ b/types/sharepoint/index.d.ts @@ -14,7 +14,7 @@ declare function ExecuteOrDelayUntilEventNotified(func: (...args: any[]) => void declare var Strings: any; declare namespace SP { - export class SOD { + class SOD { static execute(fileName: string, functionName: string, ...args: any[]): void; static executeFunc(fileName: string, typeName: string, fn: () => void): void; static executeOrDelayUntilEventNotified(func: (...args: any[]) => void, eventName: string): boolean; @@ -33,7 +33,7 @@ declare namespace SP { static set_ribbonImagePrefetchEnabled(value: boolean): void; } - export enum ListLevelPermissionMask { + enum ListLevelPermissionMask { viewListItems, // : 1, insertListItems, // : 2, editListItems, // : 4, @@ -47,7 +47,7 @@ declare namespace SP { manageLists // : 2048 } - export class HtmlBuilder { + class HtmlBuilder { constructor(); addAttribute(name: string, value: string): void; addCssClass(cssClassName: string): void; @@ -59,7 +59,7 @@ declare namespace SP { toString(): string; } - export class ScriptHelpers { + class ScriptHelpers { static disableWebpartSelection(context: SPClientTemplates.RenderContext): void; static getDocumentQueryPairs(): { [index: string]: string; }; static getFieldFromSchema(schema: SPClientTemplates.ListSchema, fieldName: string): SPClientTemplates.FieldSchema; @@ -84,8 +84,7 @@ declare namespace SP { static resizeImageToSquareLength(imgElement: HTMLImageElement, squareLength: number): void; } - - export class PageContextInfo { + class PageContextInfo { static get_siteServerRelativeUrl(): string; static get_webServerRelativeUrl(): string; static get_webAbsoluteUrl(): string; @@ -107,32 +106,30 @@ declare namespace SP { get_pagePersonalizationScope(): string; } - export class ContextPermissions { + class ContextPermissions { has(perm: number): boolean; hasPermissions(high: number, low: number): boolean; fromJson(json: { High: number; Low: number; }): void; } - export namespace ListOperation { - export namespace ViewOperation { - export function getSelectedView(): string; - export function navigateUp(viewId: string): void; - export function refreshView(viewId: string): void; + namespace ListOperation { + namespace ViewOperation { + function getSelectedView(): string; + function navigateUp(viewId: string): void; + function refreshView(viewId: string): void; } - export namespace Selection { - export function selectListItem(iid: string, bSelect: boolean): void; - export function getSelectedItems(): Array<{ id: number; fsObjType: FileSystemObjectType; }>; - export function getSelectedList(): string; - export function getSelectedView(): string; - export function navigateUp(viewId: string): void; - export function deselectAllListItems(iid: string): void; + namespace Selection { + function selectListItem(iid: string, bSelect: boolean): void; + function getSelectedItems(): Array<{ id: number; fsObjType: FileSystemObjectType; }>; + function getSelectedList(): string; + function getSelectedView(): string; + function navigateUp(viewId: string): void; + function deselectAllListItems(iid: string): void; } - export namespace Overrides { - export function overrideDeleteConfirmation(listId: string, overrideText: string): void; + namespace Overrides { + function overrideDeleteConfirmation(listId: string, overrideText: string): void; } } - - } /** Register function to rerun on partial update in MDS-enabled site.*/ @@ -277,8 +274,8 @@ interface ContextInfo extends SPClientTemplates.RenderContext { SendToLocationName: string; SendToLocationUrl: string; StateInitDone: boolean; - TableCbxFocusHandler: (instance: any, eventArgs: any) => void; - TableMouseoverHandler: (instance: any, eventArgs: any) => void; + TableCbxFocusHandler(instance: any, eventArgs: any): void; + TableMouseoverHandler(instance: any, eventArgs: any): void; TotalListItems: number; WorkflowsAssociated: boolean; clvp: any; @@ -302,7 +299,7 @@ interface ContextInfo extends SPClientTemplates.RenderContext { listTemplate: string; listUrlDir: string; newFormUrl: string; - onRefreshFailed: (context: any, requrest: any, response: any) => void; + onRefreshFailed(context: any, requrest: any, response: any): void; overrideDeleteConfirmation: string; overrideFilterQstring: string; recursiveView: boolean; @@ -322,13 +319,12 @@ interface ContextInfo extends SPClientTemplates.RenderContext { noGroupCollapse: boolean; SiteTemplateId: number; ExcludeFromOfflineClient: boolean; - } declare function GetCurrentCtx(): ContextInfo; declare function SetFullScreenMode(fullscreen: boolean): void; declare namespace SP { - export enum RequestExecutorErrors { + enum RequestExecutorErrors { requestAbortedOrTimedout, unexpectedResponse, httpError, @@ -338,7 +334,7 @@ declare namespace SP { iFrameLoadError } - export class RequestExecutor { + class RequestExecutor { constructor(url: string, options?: any); get_formDigestHandlingEnabled(): boolean; set_formDigestHandlingEnabled(value: boolean): void; @@ -348,7 +344,7 @@ declare namespace SP { attemptLogin(returnUrl: string, success: (response: ResponseInfo) => void, error?: (response: ResponseInfo, error: RequestExecutorErrors, statusText: string) => void): void; } - export interface RequestInfo { + interface RequestInfo { url: string; method?: string; headers?: { [key: string]: string; }; @@ -359,12 +355,12 @@ declare namespace SP { /** Currently need fix to get ginary response. Details: http:// techmikael.blogspot.ru/2013/07/how-to-copy-files-between-sites-using.html */ binaryStringResponseBody?: boolean; timeout?: number; - success?: (response: ResponseInfo) => void; - error?: (response: ResponseInfo, error: RequestExecutorErrors, statusText: string) => void; + success?(response: ResponseInfo): void; + error?(response: ResponseInfo, error: RequestExecutorErrors, statusText: string): void; state?: any; } - export interface ResponseInfo { + interface ResponseInfo { statusCode?: number; statusText?: string; responseAvailable: boolean; @@ -376,11 +372,11 @@ declare namespace SP { state?: any; } - export class ProxyWebRequestExecutor extends Sys.Net.WebRequestExecutor { + class ProxyWebRequestExecutor extends Sys.Net.WebRequestExecutor { constructor(url: string, options?: any); } - export class ProxyWebRequestExecutorFactory implements SP.IWebRequestExecutorFactory { + class ProxyWebRequestExecutorFactory implements SP.IWebRequestExecutorFactory { constructor(url: string, options?: any); createWebRequestExecutor(): ProxyWebRequestExecutor; } @@ -591,7 +587,6 @@ declare class CalloutActionMenuEntry { wzDesc: string); } - declare class CalloutActionMenu { constructor(actionsId: any); addAction(action: CalloutAction): void; @@ -601,7 +596,6 @@ declare class CalloutActionMenu { calculateActionWidth(): void; } - declare class CalloutAction { constructor(options: CalloutActionOptions); getText(): string; @@ -710,7 +704,6 @@ declare class CalloutOptions { positionAlgorithm: (callout: Callout) => void; } - declare class CalloutManager { /** Creates a new callout */ static createNew(options: CalloutOptions): Callout; @@ -737,21 +730,19 @@ declare class CalloutManager { static isAtLeastOneCalloutOn(): boolean; } - declare namespace SPClientTemplates { - - export enum FileSystemObjectType { + enum FileSystemObjectType { Invalid, File, Folder, Web } - export enum ChoiceFormatType { + enum ChoiceFormatType { Dropdown, Radio } - export enum ClientControlMode { + enum ClientControlMode { Invalid, DisplayForm, EditForm, @@ -759,24 +750,24 @@ declare namespace SPClientTemplates { View } - export enum RichTextMode { + enum RichTextMode { Compatible, FullHtml, HtmlAsXml, ThemeHtml } - export enum UrlFormatType { + enum UrlFormatType { Hyperlink, Image } - export enum DateTimeDisplayFormat { + enum DateTimeDisplayFormat { DateOnly, DateTime, TimeOnly } - export enum DateTimeCalendarType { + enum DateTimeCalendarType { None, Gregorian, Japan, @@ -794,20 +785,20 @@ declare namespace SPClientTemplates { SakaEra, UmAlQura } - export enum UserSelectionMode { + enum UserSelectionMode { PeopleOnly, PeopleAndGroups } /** Represents schema for a Choice field in list form or in list view in grid mode */ - export interface FieldSchema_InForm_Choice extends FieldSchema_InForm { + interface FieldSchema_InForm_Choice extends FieldSchema_InForm { /** List of choices for this field. */ Choices: string[]; /** Display format for the choice field */ FormatType: ChoiceFormatType; } /** Represents schema for a Lookup field in list form or in list view in grid mode */ - export interface FieldSchema_InForm_Lookup extends FieldSchema_InForm { + interface FieldSchema_InForm_Lookup extends FieldSchema_InForm { /** Specifies if the field allows multiple values */ AllowMultipleValues: boolean; /** Returns base url for a list display form, e.g. "http:// portal/web/_layouts/15/listform.aspx?PageType=4" @@ -826,10 +817,9 @@ declare namespace SPClientTemplates { ChoiceCount: number; LookupListId: string; - } /** Represents schema for a DateTime field in list form or in list view in grid mode */ - export interface FieldSchema_InForm_DateTime extends FieldSchema_InForm { + interface FieldSchema_InForm_DateTime extends FieldSchema_InForm { /** Type of calendar to use */ CalendarType: DateTimeCalendarType; /** Display format for DateTime field. */ @@ -851,19 +841,19 @@ declare namespace SPClientTemplates { HoursOptions: string[]; } /** Represents schema for a DateTime field in list form or in list view in grid mode */ - export interface FieldSchema_InForm_Geolocation extends FieldSchema_InForm { + interface FieldSchema_InForm_Geolocation extends FieldSchema_InForm { BingMapsKey: string; IsBingMapBlockedInCurrentRegion: boolean; } /** Represents schema for a Choice field in list form or in list view in grid mode */ - export interface FieldSchema_InForm_MultiChoice extends FieldSchema_InForm { + interface FieldSchema_InForm_MultiChoice extends FieldSchema_InForm { /** List of choices for this field. */ MultiChoices: string[]; /** Indicates wherever fill-in choice is allowed */ FillInChoice: boolean; } /** Represents schema for a Choice field in list form or in list view in grid mode */ - export interface FieldSchema_InForm_MultiLineText extends FieldSchema_InForm { + interface FieldSchema_InForm_MultiLineText extends FieldSchema_InForm { /** Specifies whether rich text formatting can be used in the field */ RichText: boolean; /** Changes are appended to the existing text. */ @@ -878,19 +868,19 @@ declare namespace SPClientTemplates { ScriptEditorAdderId: string; } /** Represents schema for a Number field in list form or in list view in grid mode */ - export interface FieldSchema_InForm_Number extends FieldSchema_InForm { + interface FieldSchema_InForm_Number extends FieldSchema_InForm { ShowAsPercentage: boolean; } /** Represents schema for a Number field in list form or in list view in grid mode */ - export interface FieldSchema_InForm_Text extends FieldSchema_InForm { + interface FieldSchema_InForm_Text extends FieldSchema_InForm { MaxLength: number; } /** Represents schema for a Number field in list form or in list view in grid mode */ - export interface FieldSchema_InForm_Url extends FieldSchema_InForm { + interface FieldSchema_InForm_Url extends FieldSchema_InForm { DisplayFormat: UrlFormatType; } /** Represents schema for a Number field in list form or in list view in grid mode */ - export interface FieldSchema_InForm_User extends FieldSchema_InForm { + interface FieldSchema_InForm_User extends FieldSchema_InForm { Presence: boolean; WithPicture: boolean; DefaultRender: boolean; @@ -904,7 +894,7 @@ declare namespace SPClientTemplates { PictureSize: string; } - export interface FieldSchema { + interface FieldSchema { /** Specifies if the field can be edited while list view is in the Grid mode */ AllowGridEditing: boolean; /** String representation of the field type, e.g. "Lookup". Same as SPField.TypeAsString */ @@ -918,7 +908,7 @@ declare namespace SPClientTemplates { /** Represents field schema in Grid mode and on list forms. Consider casting objects of this type to more specific field types, e.g. FieldSchemaInForm_Lookup */ - export interface FieldSchema_InForm extends FieldSchema { + interface FieldSchema_InForm extends FieldSchema { /** Description for this field. */ Description: string; /** Direction of the reading order for the field. */ @@ -941,25 +931,24 @@ declare namespace SPClientTemplates { UseMinWidth: boolean; } - export interface ListSchema { + interface ListSchema { Field: FieldSchema[]; } - - export interface ListSchema_InForm extends ListSchema { + interface ListSchema_InForm extends ListSchema { Field: FieldSchema_InForm[]; } - export interface ListData_InForm { + interface ListData_InForm { Items: Item[]; } - export interface RenderContext_FieldInForm extends RenderContext_Form { + interface RenderContext_FieldInForm extends RenderContext_Form { CurrentGroupIdx: number; CurrentGroup: Group; CurrentItems: Item[]; CurrentFieldSchema: FieldSchema_InForm; CurrentFieldValue: any; } - export interface RenderContext_Form extends RenderContext { + interface RenderContext_Form extends RenderContext { CurrentItem: Item; FieldControlModes: { [fieldInternalName: string]: ClientControlMode; }; FormContext: ClientFormContext; @@ -969,9 +958,7 @@ declare namespace SPClientTemplates { CSRCustomLayout?: boolean; } - - - export interface FieldSchema_InView_LookupField extends FieldSchema_InView { + interface FieldSchema_InView_LookupField extends FieldSchema_InView { /** Either "TRUE" or "FALSE" */ AllowMultipleValues: string; /** Target lookup list display form URL, including PageType and List attributes. */ @@ -979,7 +966,7 @@ declare namespace SPClientTemplates { /** Either "TRUE" or "FALSE" */ HasPrefix: string; } - export interface FieldSchema_InView_UserField extends FieldSchema_InView { + interface FieldSchema_InView_UserField extends FieldSchema_InView { /** Either "TRUE" or "FALSE" */ AllowMultipleValues: string; /** Either "TRUE" or "FALSE" */ @@ -992,7 +979,7 @@ declare namespace SPClientTemplates { DefaultRender: string; } /** Represents field schema in a list view. */ - export interface FieldSchema_InView extends FieldSchema { + interface FieldSchema_InView extends FieldSchema { /** Either "TRUE" or "FALSE" */ CalloutMenu: string; ClassInfo: string; // e.g. "Menu" @@ -1021,7 +1008,7 @@ declare namespace SPClientTemplates { /** Indicates whether the field can be sorted. Either "TRUE" or "FALSE" */ Sortable: string; } - export interface ListSchema_InView extends ListSchema { + interface ListSchema_InView extends ListSchema { /** Key-value object that represents all aggregations defined for the view. Key specifies the field internal name, and value specifies the type of the aggregation. */ Aggregate: { [name: string]: string; }; @@ -1090,7 +1077,7 @@ declare namespace SPClientTemplates { /** Query string parameters that specify current root folder (RootFolder) and folder content type id (FolderCTID) */ ViewSelector_ViewParameters: string; } - export interface ListData_InView { + interface ListData_InView { FilterLink: string; FilterFields: string; FirstRow: number; @@ -1106,12 +1093,12 @@ declare namespace SPClientTemplates { LastRow: number; Row: Item[]; } - export interface RenderContext_GroupInView extends RenderContext_InView { + interface RenderContext_GroupInView extends RenderContext_InView { CurrentGroupIdx: number; CurrentGroup: Group; CurrentItems: Item[]; } - export interface RenderContext_InView extends RenderContext { + interface RenderContext_InView extends RenderContext { AllowCreateFolder: boolean; AllowGridMode: boolean; BasePermissions: { [PermissionName: string]: boolean; }; // SP.BasePermissions? @@ -1199,11 +1186,11 @@ declare namespace SPClientTemplates { wpq: string; WriteSecurity: string; } - export interface RenderContext_ItemInView extends RenderContext_InView { + interface RenderContext_ItemInView extends RenderContext_InView { CurrentItem: Item; CurrentItemIdx: number; } - export interface RenderContext_FieldInView extends RenderContext_ItemInView { + interface RenderContext_FieldInView extends RenderContext_ItemInView { /** If in grid mode (context.inGridMode == true), cast to FieldSchema_InForm, otherwise cast to FieldSchema_InView */ CurrentFieldSchema: FieldSchema_InForm | FieldSchema_InView; CurrentFieldValue: any; @@ -1212,15 +1199,15 @@ declare namespace SPClientTemplates { FormUniqueId: string; } - export interface Item { + interface Item { [fieldInternalName: string]: any; } - export interface Group { + interface Group { Items: Item[]; } type RenderCallback = (ctx: RenderContext) => void; - export interface RenderContext { + interface RenderContext { BaseViewID?: number; ControlMode?: ClientControlMode; CurrentCultureName?: string; @@ -1231,37 +1218,37 @@ declare namespace SPClientTemplates { OnPostRender?: RenderCallback | RenderCallback[]; OnPreRender?: RenderCallback | RenderCallback[]; onRefreshFailed?: any; - RenderBody?: (renderContext: RenderContext) => string; - RenderFieldByName?: (renderContext: RenderContext, fieldName: string) => string; - RenderFields?: (renderContext: RenderContext) => string; - RenderFooter?: (renderContext: RenderContext) => string; - RenderGroups?: (renderContext: RenderContext) => string; - RenderHeader?: (renderContext: RenderContext) => string; - RenderItems?: (renderContext: RenderContext) => string; - RenderView?: (renderContext: RenderContext) => string; + RenderBody?(renderContext: RenderContext): string; + RenderFieldByName?(renderContext: RenderContext, fieldName: string): string; + RenderFields?(renderContext: RenderContext): string; + RenderFooter?(renderContext: RenderContext): string; + RenderGroups?(renderContext: RenderContext): string; + RenderHeader?(renderContext: RenderContext): string; + RenderItems?(renderContext: RenderContext): string; + RenderView?(renderContext: RenderContext): string; SiteClientTag?: string; Templates?: Templates; } /** Must return null in order to fall back to a more common template or to a system default template */ - export type SingleTemplateCallback = (renderContext: RenderContext_InView) => string; + type SingleTemplateCallback = (renderContext: RenderContext_InView) => string; /** Must return null in order to fall back to a more common template or to a system default template */ - export type GroupCallback = (renderContext: RenderContext_GroupInView) => string; + type GroupCallback = (renderContext: RenderContext_GroupInView) => string; /** Must return null in order to fall back to a more common template or to a system default template */ - export type ItemCallback = (renderContext: RenderContext) => string; + type ItemCallback = (renderContext: RenderContext) => string; /** Must return null in order to fall back to a more common template or to a system default template */ - export type FieldCallback = (renderContext: RenderContext) => string; + type FieldCallback = (renderContext: RenderContext) => string; /** Must return null in order to fall back to a more common template or to a system default template */ - export type FieldInFormCallback = (renderContext: RenderContext_FieldInForm) => string; + type FieldInFormCallback = (renderContext: RenderContext_FieldInForm) => string; /** Must return null in order to fall back to a more common template or to a system default template */ - export type FieldInViewCallback = (renderContext: RenderContext_FieldInView) => string; + type FieldInViewCallback = (renderContext: RenderContext_FieldInView) => string; - export interface FieldTemplateOverrides { + interface FieldTemplateOverrides { /** Defines templates for rendering the field on a display form. */ DisplayForm?: FieldInFormCallback; /** Defines templates for rendering the field on an edit form. */ @@ -1272,11 +1259,11 @@ declare namespace SPClientTemplates { View?: FieldInViewCallback; } - export interface FieldTemplates { + interface FieldTemplates { [fieldInternalName: string]: FieldCallback; } - export interface Templates { + interface Templates { View?: RenderCallback | string; // TODO: determine appropriate context type and purpose of this template Body?: RenderCallback | string; // TODO: determine appropriate context type and purpose of this template /** Defines templates for rendering groups (aggregations). */ @@ -1293,11 +1280,11 @@ declare namespace SPClientTemplates { Fields?: FieldTemplates; } - export interface FieldTemplateMap { + interface FieldTemplateMap { [fieldInternalName: string]: FieldTemplateOverrides; } - export interface TemplateOverrides { + interface TemplateOverrides { View?: RenderCallback | string; // TODO: determine appropriate context type and purpose of this template Body?: RenderCallback | string; // TODO: determine appropriate context type and purpose of this template /** Defines templates for rendering groups (aggregations). */ @@ -1313,7 +1300,7 @@ declare namespace SPClientTemplates { /** Defines templates for fields rendering. The field is specified by it's internal name. */ Fields?: FieldTemplateMap; } - export interface TemplateOverridesOptions { + interface TemplateOverridesOptions { /** Template overrides */ Templates?: TemplateOverrides; @@ -1333,12 +1320,12 @@ declare namespace SPClientTemplates { If not defined, the templates will be applied to all views. */ BaseViewID?: number | string; } - export class TemplateManager { + class TemplateManager { static RegisterTemplateOverrides(renderCtx: TemplateOverridesOptions): void; static GetTemplates(renderCtx: RenderContext): Templates; } - export interface ClientUserValue { + interface ClientUserValue { lookupId: number; lookupValue: string; displayStr: string; @@ -1349,15 +1336,15 @@ declare namespace SPClientTemplates { department: string; jobTitle: string; } - export interface ClientLookupValue { + interface ClientLookupValue { LookupId: number; LookupValue: string; } - export interface ClientUrlValue { + interface ClientUrlValue { URL: string; Description: string; } - export class Utility { + class Utility { static ComputeRegisterTypeInfo(renderCtx: TemplateOverridesOptions): any; static ControlModeToString(mode: SPClientTemplates.ClientControlMode): string; static FileSystemObjectTypeToString(fileSystemObjectType: SPClientTemplates.FileSystemObjectType): string; @@ -1387,7 +1374,7 @@ declare namespace SPClientTemplates { static UserMultiValueDelimitString: string; } - export class ClientFormContext { + class ClientFormContext { fieldValue: any; fieldSchema: SPClientTemplates.FieldSchema_InForm; fieldName: string; @@ -1421,7 +1408,6 @@ declare namespace SPClientTemplates { registerClientValidator(fieldname: string, validator: SPClientForms.ClientValidation.ValidatorSet): void; registerHasValueChangedCallback(fieldname: string, callback: (eventArg?: any) => void): void; } - } declare function GenerateIID(renderCtx: SPClientTemplates.RenderContext_ItemInView): string; @@ -1432,38 +1418,36 @@ declare function CoreRender(template: any, context: any): string; declare namespace SPClientForms { namespace ClientValidation { - export class ValidationResult { + class ValidationResult { constructor(hasErrors: boolean, errorMsg: string); } - export class ValidatorSet { + class ValidatorSet { RegisterValidator(validator: IValidator): void; } // tslint:disable-next-line: interface-name - export interface IValidator { + interface IValidator { Validate(value: any): ValidationResult; } - export class RequiredValidator implements IValidator { + class RequiredValidator implements IValidator { Validate(value: any): ValidationResult; } - export class RequiredFileValidator implements IValidator { + class RequiredFileValidator implements IValidator { Validate(value: any): ValidationResult; } - export class RequiredRichTextValidator implements IValidator { + class RequiredRichTextValidator implements IValidator { Validate(value: any): ValidationResult; } - export class MaxLengthUrlValidator implements IValidator { + class MaxLengthUrlValidator implements IValidator { Validate(value: any): ValidationResult; } - - } - export enum FormManagerEvents { + enum FormManagerEvents { Event_OnControlValueChanged, // : 1, Event_OnControlInitializedCallback, // : 2, Event_OnControlFocusSetCallback, // : 3, @@ -1473,14 +1457,14 @@ declare namespace SPClientForms { Event_GetHasValueChangedCallback // : 7 } - export class ClientForm { + class ClientForm { constructor(qualifier: string); RenderClientForm(): void; SubmitClientForm(): boolean; NotifyControlEvent(eventName: FormManagerEvents, fldName: string, eventArg: any): void; } - export class ClientFormManager { + class ClientFormManager { static GetClientForm(qualifier: string): ClientForm; static RegisterClientForm(qualifier: string): void; static SubmitClientForm(qualifier: string): boolean; @@ -1523,7 +1507,7 @@ declare function SPFieldLookupMulti_Edit(ctx: SPClientTemplates.RenderContext_Fi declare function SPFieldAttachments_Default(ctx: SPClientTemplates.RenderContext_FieldInForm): string; declare namespace SPAnimation { - export enum Attribute { + enum Attribute { PositionX, PositionY, Height, @@ -1531,7 +1515,7 @@ declare namespace SPAnimation { Opacity } - export enum ID { + enum ID { Basic_Show, Basic_SlowShow, Basic_Fade, @@ -1556,27 +1540,26 @@ declare namespace SPAnimation { Basic_QuickSize } - export class Settings { + class Settings { static DisableAnimation(): void; static DisableSessionAnimation(): void; static IsAnimationEnabled(): boolean; } - - export class State { + class State { SetAttribute(attributeId: Attribute, value: number): void; GetAttribute(attributeId: Attribute): number; - GetDataIndex(attributeId: Attribute): number + GetDataIndex(attributeId: Attribute): number; } - export class Object { + class Object { constructor(animationID: ID, delay: number, element: HTMLElement | HTMLElement[], finalState: State, finishFunc?: (data: any) => void, data?: any); RunAnimation(): void; } } declare namespace SPAnimationUtility { - export class BasicAnimator { + class BasicAnimator { static FadeIn(element: HTMLElement, finishFunc?: (data: any) => void, data?: any): void; static FadeOut(element: HTMLElement, finishFunc?: (data: any) => void, data?: any): void; static Move(element: HTMLElement, posX: number, posY: number, finishFunc?: (data: any) => void, data?: any): void; @@ -1611,13 +1594,13 @@ interface IEnumerable { } declare namespace SP { - export class ScriptUtility { + class ScriptUtility { static isNullOrEmptyString(str: string): boolean; static isNullOrUndefined(obj: any): boolean; static isUndefined(obj: any): boolean; static truncateToInt(n: number): number; } - export class Guid { + class Guid { constructor(guidText: string); static get_empty(): SP.Guid; static newGuid(): SP.Guid; @@ -1627,7 +1610,7 @@ declare namespace SP { ToSerialized(): string; } /** Specifies permissions that are used to define user roles. Represents SPBasePermissions class. */ - export enum PermissionKind { + enum PermissionKind { /** Has no permissions on the Web site. Not available through the user interface. */ emptyMask, /** View items in lists, documents in document libraries, and view Web discussion comments. */ @@ -1704,18 +1687,18 @@ declare namespace SP { fullMask, } - export class BaseCollection implements IEnumerable { + class BaseCollection implements IEnumerable { getEnumerator(): IEnumerator; get_count(): number; itemAtIndex(index: number): T; constructor(); } // tslint:disable-next-line: interface-name - export interface IFromJson { + interface IFromJson { fromJson(initValue: any): void; customFromJson(initValue: any): boolean; } - export class Base64EncodedByteArray { + class Base64EncodedByteArray { constructor(base64Str?: string); get_length(): number; toBase64String(): string; @@ -1723,7 +1706,7 @@ declare namespace SP { getByteAt(index: number): any; setByteAt(index: number, b: any): void; } - export class ConditionalScopeBase { + class ConditionalScopeBase { startScope(): any; startIfTrue(): any; startIfFalse(): any; @@ -1731,59 +1714,59 @@ declare namespace SP { fromJson(initValue: any): void; customFromJson(initValue: any): boolean; } - export class ClientObjectPropertyConditionalScope extends SP.ConditionalScopeBase { + class ClientObjectPropertyConditionalScope extends SP.ConditionalScopeBase { constructor(clientObject: SP.ClientObject, propertyName: string, comparisonOperator: string, valueToCompare: any, allowAllActions?: boolean); } - // export class ClientResult { + // class ClientResult { // get_value(): any; // setValue(value: any): void; // constructor(); // } - export class ClientResult { + class ClientResult { get_value(): T; setValue(value: T): void; constructor(); } - export class BooleanResult { + class BooleanResult { get_value(): boolean; constructor(); } - export class CharResult { + class CharResult { get_value(): any; constructor(); } - export class IntResult { + class IntResult { get_value(): number; constructor(); } - export class DoubleResult { + class DoubleResult { get_value(): number; constructor(); } - export class StringResult { + class StringResult { get_value(): string; constructor(); } - export class DateTimeResult { + class DateTimeResult { get_value(): Date; constructor(); } - export class GuidResult { + class GuidResult { get_value(): SP.Guid; constructor(); } - export class JsonObjectResult { + class JsonObjectResult { get_value(): any; constructor(); } - export class ClientDictionaryResultHandler { + class ClientDictionaryResultHandler { constructor(dict: SP.ClientResult); } - export class ClientUtility { + class ClientUtility { static urlPathEncodeForXmlHttpRequest(url: string): string; static getOrCreateObjectPathForConstructor(context: SP.ClientRuntimeContext, typeId: string, args: any[]): SP.ObjectPath; } - export class XElement { + class XElement { get_name(): string; set_name(value: string): void; get_attributes(): any; @@ -1792,17 +1775,17 @@ declare namespace SP { set_children(value: any): void; constructor(); } - export class ClientXElement { + class ClientXElement { get_element(): SP.XElement; set_element(value: SP.XElement): void; constructor(); } - export class ClientXDocument { + class ClientXDocument { get_root(): SP.XElement; set_root(value: SP.XElement): void; constructor(); } - export class DataConvert { + class DataConvert { static writePropertiesToXml(writer: SP.XmlWriter, obj: any, propNames: string[], serializationContext: SP.SerializationContext): void; static populateDictionaryFromObject(dict: any, parentNode: any): void; static fixupTypes(context: SP.ClientRuntimeContext, dict: any): void; @@ -1820,18 +1803,18 @@ declare namespace SP { } // tslint:disable-next-line: interface-name - export interface IWebRequestExecutorFactory { + interface IWebRequestExecutorFactory { createWebRequestExecutor(): Sys.Net.WebRequestExecutor; } - export class PageRequestFailedEventArgs extends Sys.EventArgs { + class PageRequestFailedEventArgs extends Sys.EventArgs { get_executor(): Sys.Net.WebRequestExecutor; get_errorMessage(): string; get_isErrorPage(): boolean; } - export class PageRequestSucceededEventArgs extends Sys.EventArgs { + class PageRequestSucceededEventArgs extends Sys.EventArgs { get_executor(): Sys.Net.WebRequestExecutor; } - export class PageRequest { + class PageRequest { get_request(): Sys.Net.WebRequest; get_url(): string; set_url(value: string): void; @@ -1847,11 +1830,11 @@ declare namespace SP { remove_failed(value: (sender: any, args: SP.PageRequestFailedEventArgs) => void): void; constructor(); } - export class ResResources { + class ResResources { static getString(resourceId: string, args: any[]): string; } /** Defines a writer that provides a set of methods to append text in XML format. Use the static SP.XmlWriter.create(sb) Method to create an SP.XmlWriter object with the Sys.StringBuilder object you pass in. */ - export class XmlWriter { + class XmlWriter { /** Creates a new instance of the XmlWriter class with the specified string builder. */ static create(sb: Sys.StringBuilder): SP.XmlWriter; /** Appends a start element tag with the specified name in XML format to the object?s string builder. */ @@ -1874,7 +1857,7 @@ declare namespace SP { close(): void; } - export class ClientConstants { + class ClientConstants { AddExpandoFieldTypeSuffix: string; Actions: string; ApplicationName: string; @@ -1999,14 +1982,13 @@ declare namespace SP { fluidApplicationInitParamRequestToken: string; fluidApplicationInitParamFormDigestTimeoutSeconds: string; fluidApplicationInitParamFormDigest: string; - } - export class ClientSchemaVersions { + class ClientSchemaVersions { version14: string; version15: string; currentVersion: string; } - export class ClientErrorCodes { + class ClientErrorCodes { genericError: number; accessDenied: number; docAlreadyExists: number; @@ -2019,24 +2001,24 @@ declare namespace SP { fieldValueFailedValidation: number; itemValueFailedValidation: number; } - export class ClientAction { + class ClientAction { get_id(): number; get_path(): SP.ObjectPath; get_name(): string; } - export class ClientActionSetProperty extends SP.ClientAction { + class ClientActionSetProperty extends SP.ClientAction { constructor(obj: SP.ClientObject, propName: string, propValue: any); } - export class ClientActionSetStaticProperty extends SP.ClientAction { + class ClientActionSetStaticProperty extends SP.ClientAction { constructor(context: SP.ClientRuntimeContext, typeId: string, propName: string, propValue: any); } - export class ClientActionInvokeMethod extends SP.ClientAction { + class ClientActionInvokeMethod extends SP.ClientAction { constructor(obj: SP.ClientObject, methodName: string, parameters: any[]); } - export class ClientActionInvokeStaticMethod extends SP.ClientAction { + class ClientActionInvokeStaticMethod extends SP.ClientAction { constructor(context: SP.ClientRuntimeContext, typeId: string, methodName: string, parameters: any[]); } - export class ClientObject { + class ClientObject { constructor(context: SP.ClientRuntimeContext, objectPath: SP.ObjectPath); get_context(): SP.ClientRuntimeContext; get_path(): SP.ObjectPath; @@ -2053,14 +2035,14 @@ declare namespace SP { initPropertiesFromJson(initValue: any): void; checkUninitializedProperty(propName: string): void; } - export class ClientObjectData { + class ClientObjectData { get_properties(): any; get_clientObjectProperties(): any; get_methodReturnObjects(): any; constructor(); } /** Provides a base class for a collection of objects on a remote client. */ - export class ClientObjectCollection extends SP.ClientObject implements IEnumerable { + class ClientObjectCollection extends SP.ClientObject implements IEnumerable { get_areItemsAvailable(): boolean; /** Gets the data for all of the items in the collection. */ retrieveItems(): SP.ClientObjectPrototype; @@ -2074,30 +2056,30 @@ declare namespace SP { fromJson(obj: any): void; } - export class ClientObjectList extends SP.ClientObjectCollection { + class ClientObjectList extends SP.ClientObjectCollection { constructor(context: SP.ClientRuntimeContext, objectPath: SP.ObjectPath, childItemType: any); fromJson(initValue: any): void; customFromJson(initValue: any): boolean; } - export class ClientObjectPrototype { + class ClientObjectPrototype { retrieve(propertyNames?: string[]): void; retrieveObject(propertyName: string): SP.ClientObjectPrototype; retrieveCollectionObject(propertyName: string): SP.ClientObjectCollectionPrototype; } - export class ClientObjectCollectionPrototype extends SP.ClientObjectPrototype { + class ClientObjectCollectionPrototype extends SP.ClientObjectPrototype { retrieveItems(): SP.ClientObjectPrototype; } - export enum ClientRequestStatus { + enum ClientRequestStatus { active, inProgress, completedSuccess, completedException, } - export class WebRequestEventArgs extends Sys.EventArgs { + class WebRequestEventArgs extends Sys.EventArgs { constructor(webRequest: Sys.Net.WebRequest); get_webRequest(): Sys.Net.WebRequest; } - export class ClientRequest { + class ClientRequest { static get_nextSequenceId(): number; get_webRequest(): Sys.Net.WebRequest; add_requestSucceeded(value: (sender: any, args: SP.ClientRequestSucceededEventArgs) => void): void; @@ -2107,10 +2089,10 @@ declare namespace SP { get_navigateWhenServerRedirect(): boolean; set_navigateWhenServerRedirect(value: boolean): void; } - export class ClientRequestEventArgs extends Sys.EventArgs { + class ClientRequestEventArgs extends Sys.EventArgs { get_request(): SP.ClientRequest; } - export class ClientRequestFailedEventArgs extends SP.ClientRequestEventArgs { + class ClientRequestFailedEventArgs extends SP.ClientRequestEventArgs { constructor(request: SP.ClientRequest, message: string, stackTrace: string, errorCode: number, errorValue: string, errorTypeName: string, errorDetails: any, errorTraceCorrelationId?: string); get_message(): string; get_stackTrace(): string; @@ -2120,9 +2102,9 @@ declare namespace SP { get_errorDetails(): any; get_errorTraceCorrelationId(): string; } - export class ClientRequestSucceededEventArgs extends SP.ClientRequestEventArgs { + class ClientRequestSucceededEventArgs extends SP.ClientRequestEventArgs { } - export class ClientRuntimeContext implements Sys.IDisposable { + class ClientRuntimeContext implements Sys.IDisposable { constructor(serverRelativeUrlOrFullUrl: string); get_url(): string; get_viaUrl(): string; @@ -2161,23 +2143,23 @@ declare namespace SP { set_traceCorrelationId(value: string): void; dispose(): void; } - export class SimpleDataTable { + class SimpleDataTable { get_rows(): any[]; constructor(); } - export class ClientValueObject { + class ClientValueObject { fromJson(obj: any): void; customFromJson(obj: any): boolean; writeToXml(writer: SP.XmlWriter, serializationContext: SP.SerializationContext): void; customWriteToXml(writer: SP.XmlWriter, serializationContext: SP.SerializationContext): boolean; get_typeId(): string; } - export class ClientValueObjectCollection extends SP.ClientValueObject implements IEnumerable { + class ClientValueObjectCollection extends SP.ClientValueObject implements IEnumerable { get_count(): number; getEnumerator(): IEnumerator; writeToXml(writer: SP.XmlWriter, serializationContext: SP.SerializationContext): void; } - export class ExceptionHandlingScope { + class ExceptionHandlingScope { constructor(context: SP.ClientRuntimeContext); startScope(): any; startTry(): any; @@ -2192,32 +2174,32 @@ declare namespace SP { get_serverErrorTypeName(): string; get_serverErrorDetails(): any; } - export class ObjectIdentityQuery extends SP.ClientAction { + class ObjectIdentityQuery extends SP.ClientAction { constructor(objectPath: SP.ObjectPath); } - export class ObjectPath { + class ObjectPath { setPendingReplace(): void; } - export class ObjectPathProperty extends SP.ObjectPath { + class ObjectPathProperty extends SP.ObjectPath { constructor(context: SP.ClientRuntimeContext, parent: SP.ObjectPath, propertyName: string); } - export class ObjectPathStaticProperty extends SP.ObjectPath { + class ObjectPathStaticProperty extends SP.ObjectPath { constructor(context: SP.ClientRuntimeContext, typeId: string, propertyName: string); } - export class ObjectPathMethod extends SP.ObjectPath { + class ObjectPathMethod extends SP.ObjectPath { constructor(context: SP.ClientRuntimeContext, parent: SP.ObjectPath, methodName: string, parameters: any[]); } - export class ObjectPathStaticMethod extends SP.ObjectPath { + class ObjectPathStaticMethod extends SP.ObjectPath { constructor(context: SP.ClientRuntimeContext, typeId: string, methodName: string, parameters: any[]); } - export class ObjectPathConstructor extends SP.ObjectPath { + class ObjectPathConstructor extends SP.ObjectPath { constructor(context: SP.ClientRuntimeContext, typeId: string, parameters: any[]); } - export class SerializationContext { + class SerializationContext { addClientObject(obj: SP.ClientObject): void; addObjectPath(path: SP.ObjectPath): void; } - export class ResourceStrings { + class ResourceStrings { argumentExceptionMessage: string; argumentNullExceptionMessage: string; cC_AppIconAlt: string; @@ -2279,7 +2261,7 @@ declare namespace SP { unknownError: string; unknownResponseData: string; } - export class RuntimeRes { + class RuntimeRes { cC_PlaceHolderElementNotFound: string; rE_CannotAccessSiteOpenWindowFailed: string; noObjectPathAssociatedWithObject: string; @@ -2341,16 +2323,16 @@ declare namespace SP { requestHasBeenExecuted: string; objectNameMethod: string; } - export class ParseJSONUtil { + class ParseJSONUtil { static parseObjectFromJsonString(json: string): any; static validateJson(text: string): boolean; } - export enum DateTimeKind { + enum DateTimeKind { unspecified, utc, local, } - export class OfficeVersion { + class OfficeVersion { majorBuildVersion: number; previousMajorBuildVersion: number; majorVersion: string; @@ -2360,18 +2342,18 @@ declare namespace SP { assemblyVersion: string; wssMajorVersion: string; } - export class ClientContext extends SP.ClientRuntimeContext { + class ClientContext extends SP.ClientRuntimeContext { constructor(serverRelativeUrlOrFullUrl?: string); static get_current(): SP.ClientContext; get_web(): SP.Web; get_site(): SP.Site; get_serverVersion(): string; } - export enum ULSTraceLevel { + enum ULSTraceLevel { verbose, } /** Provides a Unified Logging Service (ULS) that monitors log messages. */ - export class ULS { + class ULS { /** Gets a value that indicates whether the Unified Logging Service (ULS) is enabled. */ static get_enabled(): boolean; /** Sets a value that indicates whether the Unified Logging Service (ULS) is enabled. */ @@ -2388,11 +2370,11 @@ declare namespace SP { /** Traces when the function has finished. */ static traceApiLeave(): void; } - export class AccessRequests { + class AccessRequests { static changeRequestStatus(context: SP.ClientRuntimeContext, itemId: number, newStatus: number, convStr: string, permType: string, permissionLevel: number): void; static changeRequestStatusBulk(context: SP.ClientRuntimeContext, requestIds: number[], newStatus: number): void; } - export enum AddFieldOptions { + enum AddFieldOptions { defaultValue, addToDefaultContentType, addToNoContentType, @@ -2401,27 +2383,27 @@ declare namespace SP { addFieldToDefaultView, addFieldCheckDisplayName, } - export class AlternateUrl extends SP.ClientObject { + class AlternateUrl extends SP.ClientObject { get_uri(): string; get_urlZone(): SP.UrlZone; } - export class App extends SP.ClientObject { + class App extends SP.ClientObject { get_assetId(): string; get_contentMarket(): string; get_versionString(): string; } - export class AppCatalog { + class AppCatalog { static getAppInstances(context: SP.ClientRuntimeContext, web: SP.Web): SP.ClientObjectList; static getDeveloperSiteAppInstancesByIds(context: SP.ClientRuntimeContext, site: SP.Site, appInstanceIds: SP.Guid[]): SP.ClientObjectList; static isAppSideloadingEnabled(context: SP.ClientRuntimeContext): SP.BooleanResult; } - export class AppContextSite extends SP.ClientObject { + class AppContextSite extends SP.ClientObject { constructor(context: SP.ClientRuntimeContext, siteUrl: string); get_site(): SP.Site; get_web(): SP.Web; static newObject(context: SP.ClientRuntimeContext, siteUrl: string): SP.AppContextSite; } - export class AppInstance extends SP.ClientObject { + class AppInstance extends SP.ClientObject { get_appPrincipalId(): string; get_appWebFullUrl(): string; get_id(): SP.Guid; @@ -2441,7 +2423,7 @@ declare namespace SP { getPreviousAppVersion(): SP.App; retryAllJobs(): void; } - export class AppInstanceErrorDetails extends SP.ClientObject { + class AppInstanceErrorDetails extends SP.ClientObject { get_correlationId(): SP.Guid; set_correlationId(value: SP.Guid): void; get_errorDetail(): string; @@ -2453,7 +2435,7 @@ declare namespace SP { set_source(value: SP.AppInstanceErrorSource): void; get_sourceName(): string; } - export enum AppInstanceErrorSource { + enum AppInstanceErrorSource { common, appWeb, parentWeb, @@ -2463,12 +2445,12 @@ declare namespace SP { eventCallouts, finalization, } - export enum AppInstanceErrorType { + enum AppInstanceErrorType { transient, configuration, app, } - export enum AppInstanceStatus { + enum AppInstanceStatus { invalidStatus, installing, canceling, @@ -2480,36 +2462,36 @@ declare namespace SP { disabling, disabled, } - export class AppLicense extends SP.ClientValueObject { + class AppLicense extends SP.ClientValueObject { get_rawXMLLicenseToken(): string; get_typeId(): string; writeToXml(writer: SP.XmlWriter, serializationContext: SP.SerializationContext): void; constructor(); } - export class AppLicenseCollection extends SP.ClientValueObjectCollection { + class AppLicenseCollection extends SP.ClientValueObjectCollection { add(item: SP.AppLicense): void; get_item(index: number): SP.AppLicense; get_typeId(): string; writeToXml(writer: SP.XmlWriter, serializationContext: SP.SerializationContext): void; constructor(); } - export enum AppLicenseType { + enum AppLicenseType { perpetualMultiUser, perpetualAllUsers, trialMultiUser, trialAllUsers, } - export class Attachment extends SP.ClientObject { + class Attachment extends SP.ClientObject { get_fileName(): string; get_serverRelativeUrl(): string; deleteObject(): void; } - export class AttachmentCollection extends SP.ClientObjectCollection { + class AttachmentCollection extends SP.ClientObjectCollection { itemAt(index: number): SP.Attachment; get_item(index: number): SP.Attachment; getByFileName(fileName: string): SP.Attachment; } - export class AttachmentCreationInformation extends SP.ClientValueObject { + class AttachmentCreationInformation extends SP.ClientValueObject { get_contentStream(): SP.Base64EncodedByteArray; set_contentStream(value: SP.Base64EncodedByteArray): void; get_fileName(): string; @@ -2518,7 +2500,7 @@ declare namespace SP { writeToXml(writer: SP.XmlWriter, serializationContext: SP.SerializationContext): void; constructor(); } - export class BasePermissions extends SP.ClientValueObject { + class BasePermissions extends SP.ClientValueObject { set(perm: SP.PermissionKind): void; clear(perm: SP.PermissionKind): void; clearAll(): void; @@ -2530,7 +2512,7 @@ declare namespace SP { constructor(); } /** Specifies the base type for a list. */ - export enum BaseType { + enum BaseType { none, genericList, documentLibrary, @@ -2539,11 +2521,11 @@ declare namespace SP { survey, issue, } - export enum BrowserFileHandling { + enum BrowserFileHandling { permissive, strict, } - export enum CalendarType { + enum CalendarType { none, gregorian, japan, @@ -2562,7 +2544,7 @@ declare namespace SP { umAlQura, } /** Specifies a Collaborative Application Markup Language (CAML) query on a list. */ - export class CamlQuery extends SP.ClientValueObject { + class CamlQuery extends SP.ClientValueObject { constructor(); /** This method creates a Collaborative Application Markup Language (CAML) string that can be used to recursively get all of the items in a list, including @@ -2591,49 +2573,49 @@ declare namespace SP { get_typeId(): string; writeToXml(writer: SP.XmlWriter, serializationContext: SP.SerializationContext): void; } - export class Change extends SP.ClientObject { + class Change extends SP.ClientObject { get_changeToken(): SP.ChangeToken; get_changeType(): SP.ChangeType; get_siteId(): SP.Guid; get_time(): Date; } - export class ChangeAlert extends SP.Change { + class ChangeAlert extends SP.Change { get_alertId(): SP.Guid; get_webId(): SP.Guid; } - export class ChangeCollection extends SP.ClientObjectCollection { + class ChangeCollection extends SP.ClientObjectCollection { itemAt(index: number): SP.Change; get_item(index: number): SP.Change; } - export class ChangeContentType extends SP.Change { + class ChangeContentType extends SP.Change { get_contentTypeId(): SP.ContentTypeId; get_webId(): SP.Guid; } - export class ChangeField extends SP.Change { + class ChangeField extends SP.Change { get_fieldId(): SP.Guid; get_webId(): SP.Guid; } - export class ChangeFile extends SP.Change { + class ChangeFile extends SP.Change { get_uniqueId(): SP.Guid; get_webId(): SP.Guid; } - export class ChangeFolder extends SP.Change { + class ChangeFolder extends SP.Change { get_uniqueId(): SP.Guid; get_webId(): SP.Guid; } - export class ChangeGroup extends SP.Change { + class ChangeGroup extends SP.Change { get_groupId(): number; } - export class ChangeItem extends SP.Change { + class ChangeItem extends SP.Change { get_itemId(): number; get_listId(): SP.Guid; get_webId(): SP.Guid; } - export class ChangeList extends SP.Change { + class ChangeList extends SP.Change { get_listId(): SP.Guid; get_webId(): SP.Guid; } - export class ChangeLogItemQuery extends SP.ClientValueObject { + class ChangeLogItemQuery extends SP.ClientValueObject { get_changeToken(): string; set_changeToken(value: string): void; get_contains(): string; @@ -2652,7 +2634,7 @@ declare namespace SP { writeToXml(writer: SP.XmlWriter, serializationContext: SP.SerializationContext): void; constructor(); } - export class ChangeQuery extends SP.ClientValueObject { + class ChangeQuery extends SP.ClientValueObject { constructor(); constructor(allChangeObjectTypes: boolean, allChangeTypes: boolean); get_add(): boolean; @@ -2718,16 +2700,16 @@ declare namespace SP { get_typeId(): string; writeToXml(writer: SP.XmlWriter, serializationContext: SP.SerializationContext): void; } - export class ChangeSite extends SP.Change { + class ChangeSite extends SP.Change { } - export class ChangeToken extends SP.ClientValueObject { + class ChangeToken extends SP.ClientValueObject { get_stringValue(): string; set_stringValue(value: string): void; get_typeId(): string; writeToXml(writer: SP.XmlWriter, serializationContext: SP.SerializationContext): void; constructor(); } - export enum ChangeType { + enum ChangeType { noChange, add, update, @@ -2750,35 +2732,35 @@ declare namespace SP { listContentTypeAdd, listContentTypeDelete, } - export class ChangeUser extends SP.Change { + class ChangeUser extends SP.Change { get_activate(): boolean; get_userId(): number; } - export class ChangeView extends SP.Change { + class ChangeView extends SP.Change { get_viewId(): SP.Guid; get_listId(): SP.Guid; get_webId(): SP.Guid; } - export class ChangeWeb extends SP.Change { + class ChangeWeb extends SP.Change { get_webId(): SP.Guid; } - export enum CheckinType { + enum CheckinType { minorCheckIn, majorCheckIn, overwriteCheckIn, } - export enum CheckOutType { + enum CheckOutType { online, offline, none, } - export enum ChoiceFormatType { + enum ChoiceFormatType { dropdown, radioButtons, } - export class CompatibilityRange extends SP.ClientObject { + class CompatibilityRange extends SP.ClientObject { } - export class ContentType extends SP.ClientObject { + class ContentType extends SP.ClientObject { get_description(): string; set_description(value: string): void; get_displayFormTemplateName(): string; @@ -2821,14 +2803,14 @@ declare namespace SP { update(updateChildren: boolean): void; deleteObject(): void; } - export class ContentTypeCollection extends SP.ClientObjectCollection { + class ContentTypeCollection extends SP.ClientObjectCollection { itemAt(index: number): SP.ContentType; get_item(index: number): SP.ContentType; getById(contentTypeId: string): SP.ContentType; addExistingContentType(contentType: SP.ContentType): SP.ContentType; add(parameters: SP.ContentTypeCreationInformation): SP.ContentType; } - export class ContentTypeCreationInformation extends SP.ClientValueObject { + class ContentTypeCreationInformation extends SP.ClientValueObject { get_description(): string; set_description(value: string): void; get_group(): string; @@ -2841,33 +2823,33 @@ declare namespace SP { writeToXml(writer: SP.XmlWriter, serializationContext: SP.SerializationContext): void; constructor(); } - export class ContentTypeId extends SP.ClientValueObject { + class ContentTypeId extends SP.ClientValueObject { toString(): string; get_stringValue(): string; get_typeId(): string; writeToXml(writer: SP.XmlWriter, serializationContext: SP.SerializationContext): void; constructor(); } - export enum CustomizedPageStatus { + enum CustomizedPageStatus { none, uncustomized, customized, } - export enum DateTimeFieldFormatType { + enum DateTimeFieldFormatType { dateOnly, dateTime, } - export enum DateTimeFieldFriendlyFormatType { + enum DateTimeFieldFriendlyFormatType { unspecified, disabled, relative, } - export enum DraftVisibilityType { + enum DraftVisibilityType { reader, author, approver, } - export class EventReceiverDefinition extends SP.ClientObject { + class EventReceiverDefinition extends SP.ClientObject { get_receiverAssembly(): string; get_receiverClass(): string; get_receiverId(): SP.Guid; @@ -2879,13 +2861,13 @@ declare namespace SP { update(): void; deleteObject(): void; } - export class EventReceiverDefinitionCollection extends SP.ClientObjectCollection { + class EventReceiverDefinitionCollection extends SP.ClientObjectCollection { itemAt(index: number): SP.EventReceiverDefinition; get_item(index: number): SP.EventReceiverDefinition; getById(eventReceiverId: SP.Guid): SP.EventReceiverDefinition; add(eventReceiverCreationInformation: SP.EventReceiverDefinitionCreationInformation): SP.EventReceiverDefinition; } - export class EventReceiverDefinitionCreationInformation extends SP.ClientValueObject { + class EventReceiverDefinitionCreationInformation extends SP.ClientValueObject { get_receiverAssembly(): string; set_receiverAssembly(value: string): void; get_receiverClass(): string; @@ -2904,12 +2886,12 @@ declare namespace SP { writeToXml(writer: SP.XmlWriter, serializationContext: SP.SerializationContext): void; constructor(); } - export enum EventReceiverSynchronization { + enum EventReceiverSynchronization { defaultSynchronization, synchronous, asynchronous, } - export enum EventReceiverType { + enum EventReceiverType { invalidReceiver, itemAdding, itemUpdating, @@ -2987,23 +2969,23 @@ declare namespace SP { emailReceived, contextEvent, } - export class Feature extends SP.ClientObject { + class Feature extends SP.ClientObject { get_definitionId(): SP.Guid; } - export class FeatureCollection extends SP.ClientObjectCollection { + class FeatureCollection extends SP.ClientObjectCollection { itemAt(index: number): SP.Feature; get_item(index: number): SP.Feature; getById(featureId: SP.Guid): SP.Feature; add(featureId: SP.Guid, force: boolean, featdefScope: SP.FeatureDefinitionScope): SP.Feature; remove(featureId: SP.Guid, force: boolean): void; } - export enum FeatureDefinitionScope { + enum FeatureDefinitionScope { none, farm, site, web, } - export class Field extends SP.ClientObject { + class Field extends SP.ClientObject { get_canBeDeleted(): boolean; get_defaultValue(): string; set_defaultValue(value: string): void; @@ -3058,7 +3040,7 @@ declare namespace SP { setShowInEditForm(value: boolean): void; setShowInNewForm(value: boolean): void; } - export class FieldCalculated extends SP.Field { + class FieldCalculated extends SP.Field { get_dateFormat(): SP.DateTimeFieldFormatType; set_dateFormat(value: SP.DateTimeFieldFormatType): void; get_formula(): string; @@ -3066,24 +3048,24 @@ declare namespace SP { get_outputType(): SP.FieldType; set_outputType(value: SP.FieldType): void; } - export class FieldCalculatedErrorValue extends SP.ClientValueObject { + class FieldCalculatedErrorValue extends SP.ClientValueObject { get_errorMessage(): string; get_typeId(): string; writeToXml(writer: SP.XmlWriter, serializationContext: SP.SerializationContext): void; constructor(); } - export class FieldMultiChoice extends SP.Field { + class FieldMultiChoice extends SP.Field { get_fillInChoice(): boolean; set_fillInChoice(value: boolean): void; get_mappings(): string; get_choices(): string[]; set_choices(value: string[]): void; } - export class FieldChoice extends SP.FieldMultiChoice { + class FieldChoice extends SP.FieldMultiChoice { get_editFormat(): SP.ChoiceFormatType; set_editFormat(value: SP.ChoiceFormatType): void; } - export class FieldCollection extends SP.ClientObjectCollection { + class FieldCollection extends SP.ClientObjectCollection { itemAt(index: number): SP.Field; get_item(index: number): SP.Field; get_schemaXml(): string; @@ -3094,21 +3076,21 @@ declare namespace SP { addFieldAsXml(schemaXml: string, addToDefaultView: boolean, options: SP.AddFieldOptions): SP.Field; getByInternalNameOrTitle(strName: string): SP.Field; } - export class FieldComputed extends SP.Field { + class FieldComputed extends SP.Field { get_enableLookup(): boolean; set_enableLookup(value: boolean): void; } - export class FieldNumber extends SP.Field { + class FieldNumber extends SP.Field { get_maximumValue(): number; set_maximumValue(value: number): void; get_minimumValue(): number; set_minimumValue(value: number): void; } - export class FieldCurrency extends SP.FieldNumber { + class FieldCurrency extends SP.FieldNumber { get_currencyLocaleId(): number; set_currencyLocaleId(value: number): void; } - export class FieldDateTime extends SP.Field { + class FieldDateTime extends SP.Field { get_dateTimeCalendarType(): SP.CalendarType; set_dateTimeCalendarType(value: SP.CalendarType): void; get_displayFormat(): SP.DateTimeFieldFormatType; @@ -3116,9 +3098,9 @@ declare namespace SP { get_friendlyDisplayFormat(): SP.DateTimeFieldFriendlyFormatType; set_friendlyDisplayFormat(value: SP.DateTimeFieldFriendlyFormatType): void; } - export class FieldGeolocation extends SP.Field { + class FieldGeolocation extends SP.Field { } - export class FieldGeolocationValue extends SP.ClientValueObject { + class FieldGeolocationValue extends SP.ClientValueObject { get_altitude(): number; set_altitude(value: number): void; get_latitude(): number; @@ -3131,9 +3113,9 @@ declare namespace SP { writeToXml(writer: SP.XmlWriter, serializationContext: SP.SerializationContext): void; constructor(); } - export class FieldGuid extends SP.Field { + class FieldGuid extends SP.Field { } - export class FieldLink extends SP.ClientObject { + class FieldLink extends SP.ClientObject { get_hidden(): boolean; set_hidden(value: boolean): void; get_id(): SP.Guid; @@ -3142,21 +3124,21 @@ declare namespace SP { set_required(value: boolean): void; deleteObject(): void; } - export class FieldLinkCollection extends SP.ClientObjectCollection { + class FieldLinkCollection extends SP.ClientObjectCollection { itemAt(index: number): SP.FieldLink; get_item(index: number): SP.FieldLink; getById(id: SP.Guid): SP.FieldLink; add(parameters: SP.FieldLinkCreationInformation): SP.FieldLink; reorder(internalNames: string[]): void; } - export class FieldLinkCreationInformation extends SP.ClientValueObject { + class FieldLinkCreationInformation extends SP.ClientValueObject { get_field(): SP.Field; set_field(value: SP.Field): void; get_typeId(): string; writeToXml(writer: SP.XmlWriter, serializationContext: SP.SerializationContext): void; constructor(); } - export class FieldLookup extends SP.Field { + class FieldLookup extends SP.Field { get_allowMultipleValues(): boolean; set_allowMultipleValues(value: boolean): void; get_isRelationship(): boolean; @@ -3172,7 +3154,7 @@ declare namespace SP { get_relationshipDeleteBehavior(): SP.RelationshipDeleteBehaviorType; set_relationshipDeleteBehavior(value: SP.RelationshipDeleteBehaviorType): void; } - export class FieldLookupValue extends SP.ClientValueObject { + class FieldLookupValue extends SP.ClientValueObject { get_lookupId(): number; set_lookupId(value: number): void; get_lookupValue(): string; @@ -3180,7 +3162,7 @@ declare namespace SP { writeToXml(writer: SP.XmlWriter, serializationContext: SP.SerializationContext): void; constructor(); } - export class FieldMultiLineText extends SP.Field { + class FieldMultiLineText extends SP.Field { get_allowHyperlink(): boolean; set_allowHyperlink(value: boolean): void; get_appendOnly(): boolean; @@ -3193,7 +3175,7 @@ declare namespace SP { set_richText(value: boolean): void; get_wikiLinking(): boolean; } - export class FieldRatingScale extends SP.FieldMultiChoice { + class FieldRatingScale extends SP.FieldMultiChoice { get_gridEndNumber(): number; set_gridEndNumber(value: number): void; get_gridNAOptionText(): string; @@ -3208,7 +3190,7 @@ declare namespace SP { set_gridTextRangeLow(value: string): void; get_rangeCount(): number; } - export class FieldRatingScaleQuestionAnswer extends SP.ClientValueObject { + class FieldRatingScaleQuestionAnswer extends SP.ClientValueObject { get_answer(): number; set_answer(value: number): void; get_question(): string; @@ -3217,16 +3199,16 @@ declare namespace SP { writeToXml(writer: SP.XmlWriter, serializationContext: SP.SerializationContext): void; constructor(); } - export class FieldStringValues extends SP.ClientObject { + class FieldStringValues extends SP.ClientObject { get_fieldValues(): any; get_item(fieldName: string): string; refreshLoad(): void; } - export class FieldText extends SP.Field { + class FieldText extends SP.Field { get_maxLength(): number; set_maxLength(value: number): void; } - export enum FieldType { + enum FieldType { invalid, integer, text, @@ -3262,11 +3244,11 @@ declare namespace SP { outcomeChoice, maxItems, } - export class FieldUrl extends SP.Field { + class FieldUrl extends SP.Field { get_displayFormat(): SP.UrlFieldFormatType; set_displayFormat(value: SP.UrlFieldFormatType): void; } - export class FieldUrlValue extends SP.ClientValueObject { + class FieldUrlValue extends SP.ClientValueObject { get_description(): string; set_description(value: string): void; get_url(): string; @@ -3275,7 +3257,7 @@ declare namespace SP { writeToXml(writer: SP.XmlWriter, serializationContext: SP.SerializationContext): void; constructor(); } - export class FieldUser extends SP.FieldLookup { + class FieldUser extends SP.FieldLookup { get_allowDisplay(): boolean; set_allowDisplay(value: boolean): void; get_presence(): boolean; @@ -3285,18 +3267,18 @@ declare namespace SP { get_selectionMode(): SP.FieldUserSelectionMode; set_selectionMode(value: SP.FieldUserSelectionMode): void; } - export enum FieldUserSelectionMode { + enum FieldUserSelectionMode { peopleOnly, peopleAndGroups, } - export class FieldUserValue extends SP.FieldLookupValue { + class FieldUserValue extends SP.FieldLookupValue { static fromUser(userName: string): SP.FieldUserValue; get_typeId(): string; writeToXml(writer: SP.XmlWriter, serializationContext: SP.SerializationContext): void; constructor(); } /** Represents a file in a SharePoint Web site that can be a Web Part Page, an item in a document library, or a file in a folder. */ - export class File extends SP.ClientObject { + class File extends SP.ClientObject { get_author(): SP.User; /** Returns the user who has checked out the file. */ get_checkedOutByUser(): SP.User; @@ -3355,14 +3337,14 @@ declare namespace SP { recycle(): SP.GuidResult; checkOut(): void; } - export class FileCollection extends SP.ClientObjectCollection { + class FileCollection extends SP.ClientObjectCollection { itemAt(index: number): SP.File; get_item(index: number): SP.File; getByUrl(url: string): SP.File; add(parameters: SP.FileCreationInformation): SP.File; addTemplateFile(urlOfFile: string, templateFileType: SP.TemplateFileType): SP.File; } - export class FileCreationInformation extends SP.ClientValueObject { + class FileCreationInformation extends SP.ClientValueObject { get_content(): SP.Base64EncodedByteArray; set_content(value: SP.Base64EncodedByteArray): void; get_overwrite(): boolean; @@ -3373,12 +3355,12 @@ declare namespace SP { writeToXml(writer: SP.XmlWriter, serializationContext: SP.SerializationContext): void; constructor(); } - export enum FileLevel { + enum FileLevel { published, draft, checkout, } - export class FileSaveBinaryInformation extends SP.ClientValueObject { + class FileSaveBinaryInformation extends SP.ClientValueObject { get_checkRequiredFields(): boolean; set_checkRequiredFields(value: boolean): void; get_content(): SP.Base64EncodedByteArray; @@ -3391,13 +3373,13 @@ declare namespace SP { writeToXml(writer: SP.XmlWriter, serializationContext: SP.SerializationContext): void; constructor(); } - export enum FileSystemObjectType { + enum FileSystemObjectType { invalid, file, folder, web, } - export class FileVersion extends SP.ClientObject { + class FileVersion extends SP.ClientObject { get_checkInComment(): string; get_created(): Date; get_createdBy(): SP.User; @@ -3408,7 +3390,7 @@ declare namespace SP { get_versionLabel(): string; deleteObject(): void; } - export class FileVersionCollection extends SP.ClientObjectCollection { + class FileVersionCollection extends SP.ClientObjectCollection { itemAt(index: number): SP.FileVersion; get_item(index: number): SP.FileVersion; getById(versionid: number): SP.FileVersion; @@ -3417,7 +3399,7 @@ declare namespace SP { deleteAll(): void; restoreByLabel(versionlabel: string): void; } - export class Folder extends SP.ClientObject { + class Folder extends SP.ClientObject { get_contentTypeOrder(): SP.ContentTypeId[]; get_files(): SP.FileCollection; get_listItemAllFields(): SP.ListItem; @@ -3435,24 +3417,24 @@ declare namespace SP { deleteObject(): void; recycle(): SP.GuidResult; } - export class FolderCollection extends SP.ClientObjectCollection { + class FolderCollection extends SP.ClientObjectCollection { itemAt(index: number): SP.Folder; get_item(index: number): SP.Folder; getByUrl(url: string): SP.Folder; add(url: string): SP.Folder; } - export class Form extends SP.ClientObject { + class Form extends SP.ClientObject { get_id(): SP.Guid; get_serverRelativeUrl(): string; get_formType(): SP.PageType; } - export class FormCollection extends SP.ClientObjectCollection { + class FormCollection extends SP.ClientObjectCollection { itemAt(index: number): SP.Form; get_item(index: number): SP.Form; getByPageType(formType: SP.PageType): SP.Form; getById(id: SP.Guid): SP.Form; } - export class Principal extends SP.ClientObject { + class Principal extends SP.ClientObject { get_id(): number; get_isHiddenInUI(): boolean; get_loginName(): string; @@ -3460,7 +3442,7 @@ declare namespace SP { set_title(value: string): void; get_principalType(): SP.Utilities.PrincipalType; } - export class Group extends SP.Principal { + class Group extends SP.Principal { get_allowMembersEditMembership(): boolean; set_allowMembersEditMembership(value: boolean): void; get_allowRequestToJoinLeave(): boolean; @@ -3482,7 +3464,7 @@ declare namespace SP { get_users(): SP.UserCollection; update(): void; } - export class GroupCollection extends SP.ClientObjectCollection { + class GroupCollection extends SP.ClientObjectCollection { itemAt(index: number): SP.Group; get_item(index: number): SP.Group; getByName(name: string): SP.Group; @@ -3492,7 +3474,7 @@ declare namespace SP { removeById(id: number): void; remove(group: SP.Group): void; } - export class GroupCreationInformation extends SP.ClientValueObject { + class GroupCreationInformation extends SP.ClientValueObject { get_description(): string; set_description(value: string): void; get_title(): string; @@ -3501,7 +3483,7 @@ declare namespace SP { writeToXml(writer: SP.XmlWriter, serializationContext: SP.SerializationContext): void; constructor(); } - export class InformationRightsManagementSettings extends SP.ClientObject { + class InformationRightsManagementSettings extends SP.ClientObject { get_allowPrint(): boolean; set_allowPrint(value: boolean): void; get_allowScript(): boolean; @@ -3533,7 +3515,7 @@ declare namespace SP { reset(): void; update(): void; } - export class Language extends SP.ClientValueObject { + class Language extends SP.ClientValueObject { get_displayName(): string; get_languageTag(): string; get_lcid(): number; @@ -3541,7 +3523,7 @@ declare namespace SP { writeToXml(writer: SP.XmlWriter, serializationContext: SP.SerializationContext): void; constructor(); } - export class SecurableObject extends SP.ClientObject { + class SecurableObject extends SP.ClientObject { get_firstUniqueAncestorSecurableObject(): SP.SecurableObject; get_hasUniqueRoleAssignments(): boolean; get_roleAssignments(): SP.RoleAssignmentCollection; @@ -3549,14 +3531,14 @@ declare namespace SP { breakRoleInheritance(copyRoleAssignments: boolean, clearSubscopes: boolean): void; } /** Represents display mode for a control or form */ - export enum ControlMode { + enum ControlMode { invalid, displayMode, editMode, newMode } /** Represents a list on a SharePoint Web site. */ - export class List extends SP.SecurableObject { + class List extends SP.SecurableObject { /** Gets item by id. */ getItemById(id: number): SP.ListItem; /** Gets a value that specifies whether the list supports content types. */ @@ -3773,7 +3755,7 @@ declare namespace SP { addItem(parameters: SP.ListItemCreationInformation): SP.ListItem; } /** Represents a collection of SP.List objects */ - export class ListCollection extends SP.ClientObjectCollection { + class ListCollection extends SP.ClientObjectCollection { /** Gets the list at the specified index in the collection. */ itemAt(index: number): SP.List; /** Gets the list at the specified index in the collection. */ @@ -3789,7 +3771,7 @@ declare namespace SP { /** Gets a list that is the default asset location for images or other files, which the users upload to their wiki pages. */ ensureSiteAssetsLibrary(): SP.List; } - export class ListCreationInformation extends SP.ClientValueObject { + class ListCreationInformation extends SP.ClientValueObject { get_customSchemaXml(): string; set_customSchemaXml(value: string): void; get_dataSourceProperties(): any; @@ -3812,20 +3794,20 @@ declare namespace SP { writeToXml(writer: SP.XmlWriter, serializationContext: SP.SerializationContext): void; constructor(); } - export class ListDataSource extends SP.ClientValueObject { + class ListDataSource extends SP.ClientValueObject { get_properties(): any; get_typeId(): string; writeToXml(writer: SP.XmlWriter, serializationContext: SP.SerializationContext): void; constructor(); } - export class ListDataValidationExceptionValue extends SP.ClientValueObject { + class ListDataValidationExceptionValue extends SP.ClientValueObject { get_fieldFailures(): SP.ListDataValidationFailure[]; get_itemFailure(): SP.ListDataValidationFailure; get_typeId(): string; writeToXml(writer: SP.XmlWriter, serializationContext: SP.SerializationContext): void; constructor(); } - export class ListDataValidationFailure extends SP.ClientValueObject { + class ListDataValidationFailure extends SP.ClientValueObject { get_displayName(): string; get_message(): string; get_name(): string; @@ -3835,11 +3817,11 @@ declare namespace SP { writeToXml(writer: SP.XmlWriter, serializationContext: SP.SerializationContext): void; constructor(); } - export enum ListDataValidationFailureReason { + enum ListDataValidationFailureReason { dataFailure, formulaError, } - export enum ListDataValidationType { + enum ListDataValidationType { userFormulaField, userFormulaItem, requiredField, @@ -3848,7 +3830,7 @@ declare namespace SP { textField, } /** Represents an item or row in a list. */ - export class ListItem extends SP.SecurableObject { + class ListItem extends SP.SecurableObject { get_fieldValues(): any; /** Gets the specified field value for the list item. Field value is returned as string, but it can be casted to a specific field value type, e.g. SP.LookupFieldValue, etc. */ get_item(fieldInternalName: string): any; @@ -3896,13 +3878,13 @@ declare namespace SP { /** Validates form values specified for the list item. Errors are returned through hasException and errorMessage properties of the ListItemFormUpdateValue objects */ validateUpdateListItem(formValues: SP.ListItemFormUpdateValue[], bNewDocumentUpdate: boolean): SP.ListItemFormUpdateValue[]; } - export class ListItemCollection extends SP.ClientObjectCollection { + class ListItemCollection extends SP.ClientObjectCollection { itemAt(index: number): SP.ListItem; get_item(index: number): SP.ListItem; getById(id: number | string): SP.ListItem; get_listItemCollectionPosition(): SP.ListItemCollectionPosition; } - export class ListItemCollectionPosition extends SP.ClientValueObject { + class ListItemCollectionPosition extends SP.ClientValueObject { get_pagingInfo(): string; set_pagingInfo(value: string): void; get_typeId(): string; @@ -3910,7 +3892,7 @@ declare namespace SP { constructor(); } /** Specifies the properties of the new list item. */ - export class ListItemCreationInformation extends SP.ClientValueObject { + class ListItemCreationInformation extends SP.ClientValueObject { get_folderUrl(): string; /** Sets a value that specifies the folder for the new list item. */ set_folderUrl(value: string): void; @@ -3924,11 +3906,11 @@ declare namespace SP { writeToXml(writer: SP.XmlWriter, serializationContext: SP.SerializationContext): void; constructor(); } - export class ListItemEntityCollection extends SP.ClientObjectCollection { + class ListItemEntityCollection extends SP.ClientObjectCollection { itemAt(index: number): SP.ListItem; get_item(index: number): SP.ListItem; } - export class ListItemFormUpdateValue extends SP.ClientValueObject { + class ListItemFormUpdateValue extends SP.ClientValueObject { get_errorMessage(): string; set_errorMessage(value: string): void; get_fieldName(): string; @@ -3941,7 +3923,7 @@ declare namespace SP { writeToXml(writer: SP.XmlWriter, serializationContext: SP.SerializationContext): void; constructor(); } - export class ListTemplate extends SP.ClientObject { + class ListTemplate extends SP.ClientObject { get_allowsFolderCreation(): boolean; get_baseType(): SP.BaseType; get_description(): string; @@ -3955,12 +3937,12 @@ declare namespace SP { get_listTemplateTypeKind(): number; get_unique(): boolean; } - export class ListTemplateCollection extends SP.ClientObjectCollection { + class ListTemplateCollection extends SP.ClientObjectCollection { itemAt(index: number): SP.ListTemplate; get_item(index: number): SP.ListTemplate; getByName(name: string): SP.ListTemplate; } - export enum ListTemplateType { + enum ListTemplateType { invalidType, noListTemplate, genericList, @@ -4022,20 +4004,20 @@ declare namespace SP { healthReports, developerSiteDraftApps, } - export enum MoveOperations { + enum MoveOperations { none, overwrite, allowBrokenThickets, bypassApprovePermission, } - export class Navigation extends SP.ClientObject { + class Navigation extends SP.ClientObject { get_quickLaunch(): SP.NavigationNodeCollection; get_topNavigationBar(): SP.NavigationNodeCollection; get_useShared(): boolean; set_useShared(value: boolean): void; getNodeById(id: number): SP.NavigationNode; } - export class NavigationNode extends SP.ClientObject { + class NavigationNode extends SP.ClientObject { get_children(): SP.NavigationNodeCollection; get_id(): number; get_isDocLib(): boolean; @@ -4049,12 +4031,12 @@ declare namespace SP { update(): void; deleteObject(): void; } - export class NavigationNodeCollection extends SP.ClientObjectCollection { + class NavigationNodeCollection extends SP.ClientObjectCollection { itemAt(index: number): SP.NavigationNode; get_item(index: number): SP.NavigationNode; add(parameters: SP.NavigationNodeCreationInformation): SP.NavigationNode; } - export class NavigationNodeCreationInformation extends SP.ClientValueObject { + class NavigationNodeCreationInformation extends SP.ClientValueObject { get_asLastNode(): boolean; set_asLastNode(value: boolean): void; get_isExternal(): boolean; @@ -4069,7 +4051,7 @@ declare namespace SP { writeToXml(writer: SP.XmlWriter, serializationContext: SP.SerializationContext): void; constructor(); } - export class ObjectSharingInformation extends SP.ClientObject { + class ObjectSharingInformation extends SP.ClientObject { get_anonymousEditLink(): string; get_anonymousViewLink(): string; get_canManagePermissions(): boolean; @@ -4085,7 +4067,7 @@ declare namespace SP { static getWebSharingInformation(context: SP.ClientRuntimeContext, excludeCurrentUser: boolean, excludeSiteAdmin: boolean, excludeSecurityGroups: boolean, retrieveAnonymousLinks: boolean, retrieveUserInfoDetails: boolean, checkForAccessRequests: boolean): SP.ObjectSharingInformation; static getObjectSharingInformation(context: SP.ClientRuntimeContext, securableObject: SP.SecurableObject, excludeCurrentUser: boolean, excludeSiteAdmin: boolean, excludeSecurityGroups: boolean, retrieveAnonymousLinks: boolean, retrieveUserInfoDetails: boolean, checkForAccessRequests: boolean, retrievePermissionLevels: boolean): SP.ObjectSharingInformation; } - export class ObjectSharingInformationUser extends SP.ClientObject { + class ObjectSharingInformationUser extends SP.ClientObject { get_customRoleNames(): string; get_department(): string; get_email(): string; @@ -4101,11 +4083,11 @@ declare namespace SP { get_sipAddress(): string; get_user(): SP.User; } - export enum OpenWebOptions { + enum OpenWebOptions { none, initNavigationCache, } - export enum PageType { + enum PageType { invalid, defaultView, normalView, @@ -4120,13 +4102,13 @@ declare namespace SP { solutionForm, pAGE_MAXITEMS, } - export class PropertyValues extends SP.ClientObject { + class PropertyValues extends SP.ClientObject { get_fieldValues(): any; get_item(fieldName: string): any; set_item(fieldName: string, value: any): void; refreshLoad(): void; } - export class PushNotificationSubscriber extends SP.ClientObject { + class PushNotificationSubscriber extends SP.ClientObject { get_customArgs(): string; set_customArgs(value: string): void; get_deviceAppInstanceId(): SP.Guid; @@ -4139,17 +4121,17 @@ declare namespace SP { get_user(): SP.User; update(): void; } - export class PushNotificationSubscriberCollection extends SP.ClientObjectCollection { + class PushNotificationSubscriberCollection extends SP.ClientObjectCollection { itemAt(index: number): SP.PushNotificationSubscriber; get_item(index: number): SP.PushNotificationSubscriber; getByStoreId(id: string): SP.PushNotificationSubscriber; } - export enum QuickLaunchOptions { + enum QuickLaunchOptions { off, on, defaultValue, } - export class RecycleBinItem extends SP.ClientObject { + class RecycleBinItem extends SP.ClientObject { get_author(): SP.User; get_deletedBy(): SP.User; get_deletedDate(): Date; @@ -4163,19 +4145,19 @@ declare namespace SP { deleteObject(): void; restore(): void; } - export class RecycleBinItemCollection extends SP.ClientObjectCollection { + class RecycleBinItemCollection extends SP.ClientObjectCollection { itemAt(index: number): SP.RecycleBinItem; get_item(index: number): SP.RecycleBinItem; getById(id: SP.Guid): SP.RecycleBinItem; deleteAll(): void; restoreAll(): void; } - export enum RecycleBinItemState { + enum RecycleBinItemState { none, firstStageRecycleBin, secondStageRecycleBin, } - export enum RecycleBinItemType { + enum RecycleBinItemType { none, file, fileVersion, @@ -4188,7 +4170,7 @@ declare namespace SP { cascadeParent, web, } - export class RegionalSettings extends SP.ClientObject { + class RegionalSettings extends SP.ClientObject { get_adjustHijriDays(): number; get_alternateCalendarType(): number; get_aM(): string; @@ -4221,18 +4203,18 @@ declare namespace SP { get_workDays(): number; get_workDayStartHour(): number; } - export class RelatedField extends SP.ClientObject { + class RelatedField extends SP.ClientObject { get_fieldId(): SP.Guid; get_listId(): SP.Guid; get_lookupList(): SP.List; get_relationshipDeleteBehavior(): SP.RelationshipDeleteBehaviorType; get_webId(): SP.Guid; } - export class RelatedFieldCollection extends SP.ClientObjectCollection { + class RelatedFieldCollection extends SP.ClientObjectCollection { itemAt(index: number): SP.RelatedField; get_item(index: number): SP.RelatedField; } - export class RelatedFieldExtendedData extends SP.ClientObject { + class RelatedFieldExtendedData extends SP.ClientObject { get_fieldId(): SP.Guid; get_listId(): SP.Guid; get_listImageUrl(): string; @@ -4240,11 +4222,11 @@ declare namespace SP { get_toolTipDescription(): string; get_webId(): SP.Guid; } - export class RelatedFieldExtendedDataCollection extends SP.ClientObjectCollection { + class RelatedFieldExtendedDataCollection extends SP.ClientObjectCollection { itemAt(index: number): SP.RelatedFieldExtendedData; get_item(index: number): SP.RelatedFieldExtendedData; } - export class RelatedItem extends SP.ClientValueObject { + class RelatedItem extends SP.ClientValueObject { get_iconUrl(): string; set_iconUrl(value: string): void; get_itemId(): number; @@ -4261,7 +4243,7 @@ declare namespace SP { writeToXml(writer: SP.XmlWriter, serializationContext: SP.SerializationContext): void; constructor(); } - export class RelatedItemManager extends SP.ClientObject { + class RelatedItemManager extends SP.ClientObject { static getRelatedItems(context: SP.ClientRuntimeContext, SourceListName: string, SourceItemID: number): SP.RelatedItem[]; static getPageOneRelatedItems(context: SP.ClientRuntimeContext, SourceListName: string, SourceItemID: number): SP.RelatedItem[]; static addSingleLink(context: SP.ClientRuntimeContext, SourceListName: string, SourceItemID: number, SourceWebUrl: string, TargetListName: string, TargetItemID: number, TargetWebUrl: string, TryAddReverseLink: boolean): void; @@ -4269,19 +4251,19 @@ declare namespace SP { static addSingleLinkFromUrl(context: SP.ClientRuntimeContext, SourceItemUrl: string, TargetListName: string, TargetItemID: number, TryAddReverseLink: boolean): void; static deleteSingleLink(context: SP.ClientRuntimeContext, SourceListName: string, SourceItemID: number, SourceWebUrl: string, TargetListName: string, TargetItemID: number, TargetWebUrl: string, TryDeleteReverseLink: boolean): void; } - export enum RelationshipDeleteBehaviorType { + enum RelationshipDeleteBehaviorType { none, cascade, restrict, } - export class RequestVariable extends SP.ClientObject { + class RequestVariable extends SP.ClientObject { constructor(context: SP.ClientRuntimeContext); get_value(): string; static newObject(context: SP.ClientRuntimeContext): SP.RequestVariable; append(value: string): void; set(value: string): void; } - export class RoleAssignment extends SP.ClientObject { + class RoleAssignment extends SP.ClientObject { get_member(): SP.Principal; get_principalId(): number; get_roleDefinitionBindings(): SP.RoleDefinitionBindingCollection; @@ -4289,7 +4271,7 @@ declare namespace SP { update(): void; deleteObject(): void; } - export class RoleAssignmentCollection extends SP.ClientObjectCollection { + class RoleAssignmentCollection extends SP.ClientObjectCollection { itemAt(index: number): SP.RoleAssignment; get_item(index: number): SP.RoleAssignment; get_groups(): SP.GroupCollection; @@ -4297,7 +4279,7 @@ declare namespace SP { getByPrincipalId(principalId: number): SP.RoleAssignment; add(principal: SP.Principal, roleBindings: SP.RoleDefinitionBindingCollection): SP.RoleAssignment; } - export class RoleDefinition extends SP.ClientObject { + class RoleDefinition extends SP.ClientObject { get_basePermissions(): SP.BasePermissions; set_basePermissions(value: SP.BasePermissions): void; get_description(): string; @@ -4312,7 +4294,7 @@ declare namespace SP { update(): void; deleteObject(): void; } - export class RoleDefinitionBindingCollection extends SP.ClientObjectCollection { + class RoleDefinitionBindingCollection extends SP.ClientObjectCollection { itemAt(index: number): SP.RoleDefinition; get_item(index: number): SP.RoleDefinition; constructor(context: SP.ClientRuntimeContext); @@ -4321,7 +4303,7 @@ declare namespace SP { remove(roleDefinition: SP.RoleDefinition): void; removeAll(): void; } - export class RoleDefinitionCollection extends SP.ClientObjectCollection { + class RoleDefinitionCollection extends SP.ClientObjectCollection { itemAt(index: number): SP.RoleDefinition; get_item(index: number): SP.RoleDefinition; getByName(name: string): SP.RoleDefinition; @@ -4329,7 +4311,7 @@ declare namespace SP { getById(id: number): SP.RoleDefinition; getByType(roleType: SP.RoleType): SP.RoleDefinition; } - export class RoleDefinitionCreationInformation extends SP.ClientValueObject { + class RoleDefinitionCreationInformation extends SP.ClientValueObject { get_basePermissions(): SP.BasePermissions; set_basePermissions(value: SP.BasePermissions): void; get_description(): string; @@ -4342,7 +4324,7 @@ declare namespace SP { writeToXml(writer: SP.XmlWriter, serializationContext: SP.SerializationContext): void; constructor(); } - export enum RoleType { + enum RoleType { none, guest, reader, @@ -4351,11 +4333,11 @@ declare namespace SP { administrator, editor, } - export class ServerSettings { + class ServerSettings { static getAlternateUrls(context: SP.ClientRuntimeContext): SP.ClientObjectList; static getGlobalInstalledLanguages(context: SP.ClientRuntimeContext, compatibilityLevel: number): SP.Language[]; } - export class Site extends SP.ClientObject { + class Site extends SP.ClientObject { get_allowDesigner(): boolean; set_allowDesigner(value: boolean): void; get_allowMasterPageEditing(): boolean; @@ -4405,9 +4387,9 @@ declare namespace SP { extendUpgradeReminderDate(): void; invalidate(): void; } - export class SiteUrl extends SP.ClientObject { + class SiteUrl extends SP.ClientObject { } - export class SubwebQuery extends SP.ClientValueObject { + class SubwebQuery extends SP.ClientValueObject { get_configurationFilter(): number; set_configurationFilter(value: number): void; get_webTemplateFilter(): number; @@ -4416,30 +4398,30 @@ declare namespace SP { writeToXml(writer: SP.XmlWriter, serializationContext: SP.SerializationContext): void; constructor(); } - export enum TemplateFileType { + enum TemplateFileType { standardPage, wikiPage, formPage, } - export class ThemeInfo extends SP.ClientObject { + class ThemeInfo extends SP.ClientObject { get_accessibleDescription(): string; get_themeBackgroundImageUri(): string; getThemeShadeByName(name: string): SP.StringResult; getThemeFontByName(name: string, lcid: number): SP.StringResult; } - export class TimeZone extends SP.ClientObject { + class TimeZone extends SP.ClientObject { get_description(): string; get_id(): number; get_information(): SP.TimeZoneInformation; localTimeToUTC(date: Date): SP.DateTimeResult; utcToLocalTime(date: Date): SP.DateTimeResult; } - export class TimeZoneCollection extends SP.ClientObjectCollection { + class TimeZoneCollection extends SP.ClientObjectCollection { itemAt(index: number): SP.TimeZone; get_item(index: number): SP.TimeZone; getById(id: number): SP.TimeZone; } - export class TimeZoneInformation extends SP.ClientValueObject { + class TimeZoneInformation extends SP.ClientValueObject { get_bias(): number; get_daylightBias(): number; get_standardBias(): number; @@ -4447,7 +4429,7 @@ declare namespace SP { writeToXml(writer: SP.XmlWriter, serializationContext: SP.SerializationContext): void; constructor(); } - export class UpgradeInfo extends SP.ClientValueObject { + class UpgradeInfo extends SP.ClientValueObject { get_errorFile(): string; get_errors(): number; get_lastUpdated(): Date; @@ -4462,28 +4444,28 @@ declare namespace SP { writeToXml(writer: SP.XmlWriter, serializationContext: SP.SerializationContext): void; constructor(); } - export enum UpgradeStatus { + enum UpgradeStatus { none, inProgress, failed, completed, } - export enum UpgradeType { + enum UpgradeType { buildUpgrade, versionUpgrade, } - export enum UrlFieldFormatType { + enum UrlFieldFormatType { hyperlink, image, } - export enum UrlZone { + enum UrlZone { defaultZone, intranet, internet, custom, extranet, } - export class UsageInfo extends SP.ClientValueObject { + class UsageInfo extends SP.ClientValueObject { get_bandwidth(): number; get_discussionStorage(): number; get_hits(): number; @@ -4494,7 +4476,7 @@ declare namespace SP { writeToXml(writer: SP.XmlWriter, serializationContext: SP.SerializationContext): void; constructor(); } - export class User extends SP.Principal { + class User extends SP.Principal { get_email(): string; set_email(value: string): void; get_groups(): SP.GroupCollection; @@ -4503,7 +4485,7 @@ declare namespace SP { get_userId(): SP.UserIdInfo; update(): void; } - export class UserCollection extends SP.ClientObjectCollection { + class UserCollection extends SP.ClientObjectCollection { itemAt(index: number): SP.User; get_item(index: number): SP.User; getByLoginName(loginName: string): SP.User; @@ -4515,7 +4497,7 @@ declare namespace SP { add(parameters: SP.UserCreationInformation): SP.User; addUser(user: SP.User): SP.User; } - export class UserCreationInformation extends SP.ClientValueObject { + class UserCreationInformation extends SP.ClientValueObject { get_email(): string; set_email(value: string): void; get_loginName(): string; @@ -4526,7 +4508,7 @@ declare namespace SP { writeToXml(writer: SP.XmlWriter, serializationContext: SP.SerializationContext): void; constructor(); } - export class UserCustomAction extends SP.ClientObject { + class UserCustomAction extends SP.ClientObject { get_commandUIExtension(): string; set_commandUIExtension(value: string): void; get_description(): string; @@ -4561,34 +4543,34 @@ declare namespace SP { update(): void; deleteObject(): void; } - export class UserCustomActionCollection extends SP.ClientObjectCollection { + class UserCustomActionCollection extends SP.ClientObjectCollection { itemAt(index: number): SP.UserCustomAction; get_item(index: number): SP.UserCustomAction; getById(id: SP.Guid): SP.UserCustomAction; clear(): void; add(): SP.UserCustomAction; } - export enum UserCustomActionRegistrationType { + enum UserCustomActionRegistrationType { none, list, contentType, progId, fileType, } - export enum UserCustomActionScope { + enum UserCustomActionScope { unknown, site, web, list, } - export class UserIdInfo extends SP.ClientValueObject { + class UserIdInfo extends SP.ClientValueObject { get_nameId(): string; get_nameIdIssuer(): string; get_typeId(): string; writeToXml(writer: SP.XmlWriter, serializationContext: SP.SerializationContext): void; constructor(); } - export class View extends SP.ClientObject { + class View extends SP.ClientObject { get_aggregations(): string; set_aggregations(value: string): void; get_aggregationsStatus(): string; @@ -4654,14 +4636,14 @@ declare namespace SP { renderAsHtml(): SP.StringResult; update(): void; } - export class ViewCollection extends SP.ClientObjectCollection { + class ViewCollection extends SP.ClientObjectCollection { itemAt(index: number): SP.View; get_item(index: number): SP.View; getByTitle(strTitle: string): SP.View; getById(guidId: SP.Guid): SP.View; add(parameters: SP.ViewCreationInformation): SP.View; } - export class ViewCreationInformation extends SP.ClientValueObject { + class ViewCreationInformation extends SP.ClientValueObject { get_paged(): boolean; set_paged(value: boolean): void; get_personalView(): boolean; @@ -4682,7 +4664,7 @@ declare namespace SP { writeToXml(writer: SP.XmlWriter, serializationContext: SP.SerializationContext): void; constructor(); } - export class ViewFieldCollection extends SP.ClientObjectCollection { + class ViewFieldCollection extends SP.ClientObjectCollection { itemAt(index: number): string; get_item(index: number): string; get_schemaXml(): string; @@ -4691,13 +4673,13 @@ declare namespace SP { remove(strField: string): void; removeAll(): void; } - export enum ViewScope { + enum ViewScope { defaultValue, recursive, recursiveAll, filesOnly, } - export enum ViewType { + enum ViewType { none, html, grid, @@ -4706,7 +4688,7 @@ declare namespace SP { chart, gantt, } - export class Web extends SP.SecurableObject { + class Web extends SP.SecurableObject { get_allowDesignerForCurrentUser(): boolean; get_allowMasterPageEditingForCurrentUser(): boolean; get_allowRevertFromTemplateForCurrentUser(): boolean; @@ -4813,12 +4795,12 @@ declare namespace SP { /** Available after March 2015 CU for SharePoint 2013*/ getList(url: string): List; } - export class WebCollection extends SP.ClientObjectCollection { + class WebCollection extends SP.ClientObjectCollection { itemAt(index: number): SP.Web; get_item(index: number): SP.Web; add(parameters: SP.WebCreationInformation): SP.Web; } - export class WebCreationInformation extends SP.ClientValueObject { + class WebCreationInformation extends SP.ClientValueObject { get_description(): string; set_description(value: string): void; get_language(): number; @@ -4835,7 +4817,7 @@ declare namespace SP { writeToXml(writer: SP.XmlWriter, serializationContext: SP.SerializationContext): void; constructor(); } - export class WebInformation extends SP.ClientObject { + class WebInformation extends SP.ClientObject { get_configuration(): number; get_created(): Date; get_description(): string; @@ -4847,10 +4829,10 @@ declare namespace SP { get_webTemplate(): string; get_webTemplateId(): number; } - export class WebProxy { + class WebProxy { static invoke(context: SP.ClientRuntimeContext, requestInfo: SP.WebRequestInfo): SP.WebResponseInfo; } - export class WebRequestInfo extends SP.ClientValueObject { + class WebRequestInfo extends SP.ClientValueObject { get_body(): string; set_body(value: string): void; get_headers(): any; @@ -4863,7 +4845,7 @@ declare namespace SP { writeToXml(writer: SP.XmlWriter, serializationContext: SP.SerializationContext): void; constructor(); } - export class WebResponseInfo extends SP.ClientValueObject { + class WebResponseInfo extends SP.ClientValueObject { get_body(): string; set_body(value: string): void; get_headers(): any; @@ -4874,7 +4856,7 @@ declare namespace SP { writeToXml(writer: SP.XmlWriter, serializationContext: SP.SerializationContext): void; constructor(); } - export class WebTemplate extends SP.ClientObject { + class WebTemplate extends SP.ClientObject { get_description(): string; get_displayCategory(): string; get_id(): number; @@ -4886,34 +4868,34 @@ declare namespace SP { get_name(): string; get_title(): string; } - export class WebTemplateCollection extends SP.ClientObjectCollection { + class WebTemplateCollection extends SP.ClientObjectCollection { itemAt(index: number): SP.WebTemplate; get_item(index: number): SP.WebTemplate; getByName(name: string): SP.WebTemplate; } - export namespace Application { - export namespace UI { - export interface DefaultFormsInformationRequestor { + namespace Application { + namespace UI { + interface DefaultFormsInformationRequestor { onDefaultFormsInformationRetrieveSuccess(defaultForms: SP.Application.UI.DefaultFormsInformation): void; onDefaultFormsInformationRetrieveFailure(): void; } - export class FormsInfo { + class FormsInfo { ContentTypeName: string; NewFormUrl: string; DisplayFormUrl: string; EditFormUrl: string; constructor(); } - export class DefaultFormsInformation { + class DefaultFormsInformation { DefaultForms: SP.Application.UI.FormsInfo; OtherForms: any; constructor(); } - export class DefaultFormsMenuBuilder { + class DefaultFormsMenuBuilder { static getDefaultFormsInformation(requestor: SP.Application.UI.DefaultFormsInformationRequestor, listId: SP.Guid): void; } - export class ViewSelectorMenuOptions { + class ViewSelectorMenuOptions { showRepairView: boolean; showMergeView: boolean; showEditView: boolean; @@ -4924,10 +4906,10 @@ declare namespace SP { viewParameters: string; constructor(); } - export interface ViewInformationRequestor { + interface ViewInformationRequestor { onViewInformationReturned(viewGroups: SP.Application.UI.ViewSelectorGroups): void; } - export class ViewSelectorGroups { + class ViewSelectorGroups { ModeratedViews: any; PublicViews: any; PersonalViews: any; @@ -4936,7 +4918,7 @@ declare namespace SP { ViewCreation: any; constructor(); } - export class ViewSelectorMenuItem { + class ViewSelectorMenuItem { Text: string; ActionScriptText: string; NavigateUrl: string; @@ -4948,33 +4930,33 @@ declare namespace SP { GroupId: number; constructor(); } - export class ViewSelectorSubMenu { + class ViewSelectorSubMenu { Text: string; ImageSourceUrl: string; SubMenuItems: any; constructor(); } - export class ViewSelectorMenuBuilder { + class ViewSelectorMenuBuilder { static get_filterMenuItemsCallback(): (menuItems: any) => any; static set_filterMenuItemsCallback(value: (menuItems: any) => any): void; static showMenu(elem: HTMLElement, options: SP.Application.UI.ViewSelectorMenuOptions): void; static getViewInformation(requestor: SP.Application.UI.ViewInformationRequestor, options: SP.Application.UI.ViewSelectorMenuOptions): void; } - export class MoreColorsPicker extends Sys.UI.Control { + class MoreColorsPicker extends Sys.UI.Control { constructor(e: HTMLElement); initialize(): void; dispose(): void; get_colorValue(): string; set_colorValue(value: string): void; } - export class MoreColorsPage extends Sys.UI.Control { + class MoreColorsPage extends Sys.UI.Control { constructor(e: HTMLElement); initialize(): void; dispose(): void; get_moreColorsPicker(): SP.Application.UI.MoreColorsPicker; set_moreColorsPicker(value: SP.Application.UI.MoreColorsPicker): void; } - export class ThemeWebPage extends Sys.UI.Control { + class ThemeWebPage extends Sys.UI.Control { add_themeDisplayUpdated(value: (sender: any, e: Sys.EventArgs) => void): void; remove_themeDisplayUpdated(value: (sender: any, e: Sys.EventArgs) => void): void; constructor(e: HTMLElement); @@ -4985,7 +4967,7 @@ declare namespace SP { get_thmxThemes(): any; set_thmxThemes(value: any): void; } - export class WikiPageNameInPlaceEditor { + class WikiPageNameInPlaceEditor { constructor(ownerDoc: any, displayElemId: string, editElemId: string, editTextBoxId: string); editingPageCallback(): void; savingPageCallback(): void; @@ -4993,15 +4975,14 @@ declare namespace SP { } } - - export namespace Analytics { - export class AnalyticsUsageEntry extends SP.ClientObject { + namespace Analytics { + class AnalyticsUsageEntry extends SP.ClientObject { static logAnalyticsEvent(context: SP.ClientRuntimeContext, eventTypeId: number, itemId: string): void; static logAnalyticsEvent2(context: SP.ClientRuntimeContext, eventTypeId: number, itemId: string, rollupScopeId: SP.Guid, siteId: SP.Guid, userId: string): void; static logAnalyticsAppEvent(context: SP.ClientRuntimeContext, appEventTypeId: SP.Guid, itemId: string): void; static logAnalyticsAppEvent2(context: SP.ClientRuntimeContext, appEventTypeId: SP.Guid, itemId: string, rollupScopeId: SP.Guid, siteId: SP.Guid, userId: string): void; } - export enum EventTypeId { + enum EventTypeId { none, first, view, @@ -5011,8 +4992,8 @@ declare namespace SP { } } - export namespace SiteHealth { - export class SiteHealthResult extends SP.ClientValueObject { + namespace SiteHealth { + class SiteHealthResult extends SP.ClientValueObject { get_messageAsText(): string; get_ruleHelpLink(): string; get_ruleId(): SP.Guid; @@ -5026,29 +5007,24 @@ declare namespace SP { writeToXml(writer: SP.XmlWriter, serializationContext: SP.SerializationContext): void; constructor(); } - export enum SiteHealthStatusType { + enum SiteHealthStatusType { passed, failedWarning, failedError, } - export class SiteHealthSummary extends SP.ClientObject { + class SiteHealthSummary extends SP.ClientObject { get_failedErrorCount(): number; get_failedWarningCount(): number; get_passedCount(): number; get_results(): SP.SiteHealth.SiteHealthResult[]; } } - } - - - declare namespace Microsoft.SharePoint.Client.Search { namespace Query { - /**Contains information common to all types of search queries.*/ - export class Query extends SP.ClientObject { + class Query extends SP.ClientObject { get_blockDedupeMode: () => number; set_blockDedupeMode: (value: number) => void; @@ -5155,24 +5131,20 @@ declare namespace Microsoft.SharePoint.Client.Search { get_trimDuplicates: () => boolean; set_trimDuplicates: (value: boolean) => void; - get_uiLanguage: () => number; set_uiLanguage: (value: number) => void; - - - getQuerySuggestionsWithResults: (iNumberOfQuerySuggestions: number, + getQuerySuggestionsWithResults: ( + iNumberOfQuerySuggestions: number, iNumberOfResultSuggestions: number, fPreQuerySuggestions: boolean, fHitHighlighting: boolean, fCapitalizeFirstLetters: boolean, fPrefixMatchAllTerms: boolean) => QuerySuggestionResults; - - } /**Contains information about a keyword based search query.*/ - export class KeywordQuery extends Query { + class KeywordQuery extends Query { constructor(context: SP.ClientContext); get_collapseSpecification: () => string; @@ -5205,7 +5177,7 @@ declare namespace Microsoft.SharePoint.Client.Search { } /**Executes queries against a search server.*/ - export class SearchExecutor extends SP.ClientObject { + class SearchExecutor extends SP.ClientObject { constructor(context: SP.ClientContext); /**Runs a query.*/ @@ -5224,8 +5196,7 @@ declare namespace Microsoft.SharePoint.Client.Search { exportPopularQueries: (web: SP.Web, sourceId: SP.Guid) => SP.JsonObjectResult; } - - export class StringCollection extends SP.ClientObjectCollection { + class StringCollection extends SP.ClientObjectCollection { constructor(context: SP.ClientContext); itemAt: (index: number) => string; get_item: (index: number) => string; @@ -5234,11 +5205,11 @@ declare namespace Microsoft.SharePoint.Client.Search { clear: () => void; } - export class QueryPersonalizationData extends SP.ClientObject { + class QueryPersonalizationData extends SP.ClientObject { // It's really empty; } - export class QuerySuggestionResults extends SP.ClientValueObject { + class QuerySuggestionResults extends SP.ClientValueObject { get_peopleNames: () => string[]; set_peopleNames: (value: string[]) => void; @@ -5249,7 +5220,7 @@ declare namespace Microsoft.SharePoint.Client.Search { set_queries: (value: QuerySuggestionQuery[]) => void; } - export class PersonalResultSuggestion extends SP.ClientValueObject { + class PersonalResultSuggestion extends SP.ClientValueObject { get_highlightedTitle: () => string; set_highlightedTitle: (value: string) => void; @@ -5263,7 +5234,7 @@ declare namespace Microsoft.SharePoint.Client.Search { set_url: (value: string) => void; } - export class QuerySuggestionQuery extends SP.ClientValueObject { + class QuerySuggestionQuery extends SP.ClientValueObject { get_isPersonal: () => boolean; set_isPersonal: (value: boolean) => void; @@ -5271,14 +5242,14 @@ declare namespace Microsoft.SharePoint.Client.Search { set_query: (value: string) => void; } - export class KeywordQueryProperties extends SP.ClientObject { + class KeywordQueryProperties extends SP.ClientObject { get_item: (key: string) => any; set_item: (key: string, value: any) => void; setQueryPropertyValue: (name: string) => QueryPropertyValue; getQueryPropertyValue: (name: string, value: QueryPropertyValue) => void; } - export enum QueryPropertyValueType { + enum QueryPropertyValueType { none, stringType, int32TYpe, @@ -5287,7 +5258,7 @@ declare namespace Microsoft.SharePoint.Client.Search { unSupportedType } - export class QueryPropertyValue extends SP.ClientValueObject { + class QueryPropertyValue extends SP.ClientValueObject { get_boolVal: () => boolean; set_boolVal: (value: boolean) => boolean; @@ -5301,12 +5272,12 @@ declare namespace Microsoft.SharePoint.Client.Search { set_strVal: (value: string) => string; } - export class QueryUtility { + class QueryUtility { static create: (name: string, val: any) => QueryPropertyValue; static getQueryPropertyValueType: (val: QueryPropertyValue) => QueryPropertyValueType; static queryPropertyValueToObject: (val: QueryPropertyValue) => any; } - export class ReorderingRuleCollection extends SP.ClientObjectCollection { + class ReorderingRuleCollection extends SP.ClientObjectCollection { itemAt: (index: number) => ReorderingRule; get_item: (index: number) => ReorderingRule; get_childItemType: () => typeof ReorderingRule; @@ -5314,7 +5285,7 @@ declare namespace Microsoft.SharePoint.Client.Search { clear: () => void; } - export enum ReorderingRuleMatchType { + enum ReorderingRuleMatchType { resultContainsKeyword, titleContainsKeyword, titleMatchesKeyword, @@ -5326,7 +5297,7 @@ declare namespace Microsoft.SharePoint.Client.Search { manualCondition } - export class ReorderingRule extends SP.ClientValueObject { + class ReorderingRule extends SP.ClientValueObject { get_boost: () => number; set_boost: (value: number) => void; @@ -5337,7 +5308,7 @@ declare namespace Microsoft.SharePoint.Client.Search { set_matchValue: (value: string) => void; } - export class SortCollection extends SP.ClientObjectCollection { + class SortCollection extends SP.ClientObjectCollection { itemAt: (index: number) => Sort; get_item: (index: number) => Sort; get_childItemType: () => typeof Sort; @@ -5350,7 +5321,7 @@ declare namespace Microsoft.SharePoint.Client.Search { descending, fqlFormula } - export class Sort extends SP.ClientValueObject { + class Sort extends SP.ClientValueObject { get_direction: () => SortDirection; set_direction: (value: SortDirection) => void; @@ -5358,8 +5329,7 @@ declare namespace Microsoft.SharePoint.Client.Search { set_property: (value: string) => void; } - - export class ResultTableCollection extends SP.ClientValueObjectCollection { + class ResultTableCollection extends SP.ClientValueObjectCollection { get_item: (index: number) => ResultTable; get_elapsedTime: () => number; @@ -5376,10 +5346,9 @@ declare namespace Microsoft.SharePoint.Client.Search { get_triggeredRules: () => SP.Guid[]; initPropertiesFromJson: (parentNode: any) => void; - } - export class ResultTable extends SP.ClientValueObject { + class ResultTable extends SP.ClientValueObject { get_groupTemplateId: () => string; get_itemTemplateId: () => string; @@ -5407,14 +5376,14 @@ declare namespace Microsoft.SharePoint.Client.Search { initPropertiesFromJson: (parentNode: any) => void; } - export class RankingLabeling extends SP.ClientObject { + class RankingLabeling extends SP.ClientObject { constructor(context: SP.ClientContext); getJudgementsForQuery: (query: string) => SP.JsonObjectResult; addJudgment: (userQuery: string, url: string, labelId: number) => void; normalizeResultUrl: (url: string) => SP.JsonObjectResult; } - export class PopularQuery extends SP.ClientValueObject { + class PopularQuery extends SP.ClientValueObject { get_clickCount: () => number; set_clickCount: (value: number) => void; @@ -5428,7 +5397,7 @@ declare namespace Microsoft.SharePoint.Client.Search { set_queryText: (value: string) => void; } - export class QueryPropertyNames { + class QueryPropertyNames { static blockDedupeMode: string; // 'BlockDedupeMode'; static bypassResultTypes: string; // 'BypassResultTypes'; static clientType: string; // 'ClientType'; @@ -5466,12 +5435,12 @@ declare namespace Microsoft.SharePoint.Client.Search { static uiLanguage: string; // 'UILanguage'; } - export class QueryObjectPropertyNames { + class QueryObjectPropertyNames { static hitHighlightedProperties: string; // = 'HitHighlightedProperties'; static personalizationData: string; // = 'PersonalizationData'; } - export class KeywordQueryPropertyNames { + class KeywordQueryPropertyNames { static collapseSpecification: string; // 'CollapseSpecification'; static enableSorting: string; // 'EnableSorting'; static hiddenConstraints: string; // 'HiddenConstraints'; @@ -5479,7 +5448,7 @@ declare namespace Microsoft.SharePoint.Client.Search { static trimDuplicatesIncludeId: string; // 'TrimDuplicatesIncludeId'; } - export class KeywordQueryObjectPropertyNames { + class KeywordQueryObjectPropertyNames { static properties: string; // 'Properties'; static refinementFilters: string; // 'RefinementFilters'; static reorderingRules: string; // 'ReorderingRules'; @@ -5489,7 +5458,7 @@ declare namespace Microsoft.SharePoint.Client.Search { } namespace WebControls { - export class ControlMessage extends SP.ClientValueObject { + class ControlMessage extends SP.ClientValueObject { get_code: () => number; get_correlationID: () => string; @@ -5515,7 +5484,7 @@ declare namespace Microsoft.SharePoint.Client.Search { get_type: () => string; } - export enum MessageLevel { + enum MessageLevel { information, warning, error @@ -5523,9 +5492,10 @@ declare namespace Microsoft.SharePoint.Client.Search { } namespace Administration { - export class DocumentCrawlLog extends SP.ClientObject { + class DocumentCrawlLog extends SP.ClientObject { constructor(context: SP.ClientContext, site: SP.Site); - getCrawledUrls: (getCountOnly: boolean, + getCrawledUrls: ( + getCountOnly: boolean, maxRows: { High: number; Low: number; }, queryString: string, isLike: boolean, @@ -5536,11 +5506,11 @@ declare namespace Microsoft.SharePoint.Client.Search { endDateTime: Date) => SP.JsonObjectResult; } - export class SearchObjectOwner extends SP.ClientObject { + class SearchObjectOwner extends SP.ClientObject { constructor(context: SP.ClientContext, lowestCurrentLevelToUse: SearchObjectLevel); } - export enum SearchObjectLevel { + enum SearchObjectLevel { spWeb, spSite, spSiteSubscription, @@ -5549,7 +5519,7 @@ declare namespace Microsoft.SharePoint.Client.Search { } namespace Portability { - export class SearchConfigurationPortability extends SP.ClientObject { + class SearchConfigurationPortability extends SP.ClientObject { constructor(context: SP.ClientContext); get_importWarnings: () => string; @@ -5560,14 +5530,14 @@ declare namespace Microsoft.SharePoint.Client.Search { deleteSearchConfiguration: (owningScope: Administration.SearchObjectOwner, searchConfiguration: string) => void; } - export class SearchConfigurationPortabilityPropertyNames { + class SearchConfigurationPortabilityPropertyNames { static importWarnings: string; // = 'ImportWarnings' } } /**Located in sp.search.apps.js*/ namespace Analytics { - export class AnalyticsItemData extends SP.ClientObject { + class AnalyticsItemData extends SP.ClientObject { get_lastProcessingTime: () => Date; get_totalHits: () => number; @@ -5583,7 +5553,7 @@ declare namespace Microsoft.SharePoint.Client.Search { getUniqueUsersCountForMonth: (day: Date) => number; } - export class UsageAnalytics extends SP.ClientObject { + class UsageAnalytics extends SP.ClientObject { getAnalyticsItemData: (eventType: number, listItem: SP.ListItem) => AnalyticsItemData; getAnalyticsItemDataForApplicationEventType: (appEventType: SP.Guid, listItem: SP.ListItem) => AnalyticsItemData; @@ -5592,15 +5562,12 @@ declare namespace Microsoft.SharePoint.Client.Search { deleteCustomEventUsageData: (appEventTypeId: SP.Guid) => void; } - - - } } declare namespace SP { - export namespace BusinessData { - export class AppBdcCatalog extends SP.ClientObject { + namespace BusinessData { + class AppBdcCatalog extends SP.ClientObject { getEntity(namespace: string, name: string): SP.BusinessData.Entity; getLobSystemProperty(lobSystemName: string, propertyName: string): SP.StringResult; setLobSystemProperty(lobSystemName: string, propertyName: string, propertyValue: string): void; @@ -5610,7 +5577,7 @@ declare namespace SP { setConnectionId(lobSystemName: string, lobSystemInstanceName: string, connectionId: string): void; getPermissibleConnections(): string[]; } - export class Entity extends SP.ClientObject { + class Entity extends SP.ClientObject { get_estimatedInstanceCount(): number; get_name(): string; get_namespace(): string; @@ -5635,20 +5602,20 @@ declare namespace SP { subscribe(eventType: SP.BusinessData.Runtime.EntityEventType, notificationCallback: SP.BusinessData.Runtime.NotificationCallback, onBehalfOfUser: string, subscriberName: string, lobSystemInstance: SP.BusinessData.LobSystemInstance): SP.BusinessData.Runtime.Subscription; unsubscribe(subscription: SP.BusinessData.Runtime.Subscription, onBehalfOfUser: string, unsubscriberName: string, lobSystemInstance: SP.BusinessData.LobSystemInstance): void; } - export class EntityField extends SP.ClientObject { + class EntityField extends SP.ClientObject { get_containsLocalizedDisplayName(): boolean; get_defaultDisplayName(): string; get_localizedDisplayName(): string; get_name(): string; } - export class EntityIdentifier extends SP.ClientObject { + class EntityIdentifier extends SP.ClientObject { get_identifierType(): string; get_name(): string; getDefaultDisplayName(): SP.StringResult; containsLocalizedDisplayName(): SP.BooleanResult; getLocalizedDisplayName(): SP.StringResult; } - export class EntityView extends SP.ClientObject { + class EntityView extends SP.ClientObject { get_fields(): SP.BusinessData.Collections.EntityFieldCollection; get_name(): string; get_relatedSpecificFinderName(): string; @@ -5657,7 +5624,7 @@ declare namespace SP { getTypeDescriptor(fieldDotNotation: string): SP.BusinessData.TypeDescriptor; getType(fieldDotNotation: string): SP.StringResult; } - export class Filter extends SP.ClientObject { + class Filter extends SP.ClientObject { get_defaultDisplayName(): string; get_filterField(): string; get_filterType(): string; @@ -5665,21 +5632,21 @@ declare namespace SP { get_name(): string; get_valueCount(): number; } - export class LobSystem extends SP.ClientObject { + class LobSystem extends SP.ClientObject { get_name(): string; getLobSystemInstances(): SP.BusinessData.Collections.LobSystemInstanceCollection; } - export class LobSystemInstance extends SP.ClientObject { + class LobSystemInstance extends SP.ClientObject { get_name(): string; } - export class MethodExecutionResult extends SP.ClientObject { + class MethodExecutionResult extends SP.ClientObject { get_returnParameterCollection(): SP.BusinessData.ReturnParameterCollection; } - export class ReturnParameterCollection extends SP.ClientObjectCollection { + class ReturnParameterCollection extends SP.ClientObjectCollection { itemAt(index: number): SP.BusinessData.Runtime.EntityFieldValueDictionary; get_item(index: number): SP.BusinessData.Runtime.EntityFieldValueDictionary; } - export class TypeDescriptor extends SP.ClientObject { + class TypeDescriptor extends SP.ClientObject { get_containsReadOnly(): boolean; get_isCollection(): boolean; get_isReadOnly(): boolean; @@ -5693,50 +5660,50 @@ declare namespace SP { getChildTypeDescriptors(): SP.BusinessData.Collections.TypeDescriptorCollection; getParentTypeDescriptor(): SP.BusinessData.TypeDescriptor; } - export namespace Collections { - export class EntityFieldCollection extends SP.ClientObjectCollection { + namespace Collections { + class EntityFieldCollection extends SP.ClientObjectCollection { itemAt(index: number): SP.BusinessData.EntityField; get_item(index: number): SP.BusinessData.EntityField; } - export class EntityIdentifierCollection extends SP.ClientObjectCollection { + class EntityIdentifierCollection extends SP.ClientObjectCollection { itemAt(index: number): SP.BusinessData.EntityIdentifier; get_item(index: number): SP.BusinessData.EntityIdentifier; } - export class EntityInstanceCollection extends SP.ClientObjectCollection { + class EntityInstanceCollection extends SP.ClientObjectCollection { itemAt(index: number): SP.BusinessData.Runtime.EntityInstance; get_item(index: number): SP.BusinessData.Runtime.EntityInstance; } - export class FilterCollection extends SP.ClientObjectCollection { + class FilterCollection extends SP.ClientObjectCollection { itemAt(index: number): SP.BusinessData.Filter; get_item(index: number): SP.BusinessData.Filter; setFilterValue(inputFilterName: string, valueIndex: number, value: any): void; } - export class LobSystemInstanceCollection extends SP.ClientObjectCollection { + class LobSystemInstanceCollection extends SP.ClientObjectCollection { itemAt(index: number): SP.BusinessData.LobSystemInstance; get_item(index: number): SP.BusinessData.LobSystemInstance; } - export class TypeDescriptorCollection extends SP.ClientObjectCollection { + class TypeDescriptorCollection extends SP.ClientObjectCollection { itemAt(index: number): SP.BusinessData.TypeDescriptor; get_item(index: number): SP.BusinessData.TypeDescriptor; } } - export namespace Infrastructure { - export class ExternalSubscriptionStore extends SP.ClientObject { + namespace Infrastructure { + class ExternalSubscriptionStore extends SP.ClientObject { constructor(context: SP.ClientRuntimeContext, web: SP.Web); static newObject(context: SP.ClientRuntimeContext, web: SP.Web): SP.BusinessData.Infrastructure.ExternalSubscriptionStore; indexStore(): void; } } - export namespace Runtime { - export enum EntityEventType { + namespace Runtime { + enum EntityEventType { none, itemAdded, itemUpdated, itemDeleted, } - export class EntityFieldValueDictionary extends SP.ClientObject { + class EntityFieldValueDictionary extends SP.ClientObject { get_fieldValues(): any; get_item(fieldName: string): any; set_item(fieldName: string, value: any): void; @@ -5747,7 +5714,7 @@ declare namespace SP { createCollectionInstance(fieldDotNotation: string, size: number): void; getCollectionSize(fieldDotNotation: string): SP.IntResult; } - export class EntityIdentity extends SP.ClientObject { + class EntityIdentity extends SP.ClientObject { get_fieldValues(): any; get_item(fieldName: string): any; constructor(context: SP.ClientRuntimeContext, identifierValues: any[]); @@ -5755,7 +5722,7 @@ declare namespace SP { static newObject(context: SP.ClientRuntimeContext, identifierValues: any[]): SP.BusinessData.Runtime.EntityIdentity; refreshLoad(): void; } - export class EntityInstance extends SP.ClientObject { + class EntityInstance extends SP.ClientObject { get_fieldValues(): any; get_item(fieldName: string): any; set_item(fieldName: string, value: any): void; @@ -5768,7 +5735,7 @@ declare namespace SP { fromXml(xml: string): void; toXml(): SP.StringResult; } - export class NotificationCallback extends SP.ClientObject { + class NotificationCallback extends SP.ClientObject { constructor(context: SP.ClientRuntimeContext, notificationEndpoint: string); get_notificationContext(): string; set_notificationContext(value: string): void; @@ -5777,7 +5744,7 @@ declare namespace SP { set_notificationForwarderType(value: string): void; static newObject(context: SP.ClientRuntimeContext, notificationEndpoint: string): SP.BusinessData.Runtime.NotificationCallback; } - export class Subscription extends SP.ClientObject { + class Subscription extends SP.ClientObject { constructor(context: SP.ClientRuntimeContext, id: any, hash: string); get_hash(): string; get_iD(): any; @@ -5788,19 +5755,19 @@ declare namespace SP { } declare namespace SP { - export namespace Sharing { - export class DocumentSharingManager { + namespace Sharing { + class DocumentSharingManager { static getRoleDefinition(context: SP.ClientRuntimeContext, role: SP.Sharing.Role): SP.RoleDefinition; static isDocumentSharingEnabled(context: SP.ClientRuntimeContext, list: SP.List): SP.BooleanResult; static updateDocumentSharingInfo(context: SP.ClientRuntimeContext, resourceAddress: string, userRoleAssignments: SP.Sharing.UserRoleAssignment[], validateExistingPermissions: boolean, additiveMode: boolean, sendServerManagedNotification: boolean, customMessage: string, includeAnonymousLinksInNotification: boolean): SP.Sharing.UserSharingResult[]; } - export enum Role { + enum Role { none, view, edit, owner, } - export class UserRoleAssignment extends SP.ClientValueObject { + class UserRoleAssignment extends SP.ClientValueObject { get_role(): SP.Sharing.Role; set_role(value: SP.Sharing.Role): void; get_userId(): string; @@ -5809,7 +5776,7 @@ declare namespace SP { writeToXml(writer: SP.XmlWriter, serializationContext: SP.SerializationContext): void; constructor(); } - export class UserSharingResult extends SP.ClientValueObject { + class UserSharingResult extends SP.ClientValueObject { get_allowedRoles(): SP.Sharing.Role[]; get_currentRole(): SP.Sharing.Role; get_isUserKnown(): boolean; @@ -5821,21 +5788,19 @@ declare namespace SP { constructor(); } } - } declare namespace SP { - - export namespace Social { + namespace Social { /** Identifies an actor as a user, document, site, or tag. */ - export enum SocialActorType { + enum SocialActorType { user, document, site, tag } /** Specifies one or more actor types in a query to the server. */ - export enum SocialActorTypes { + enum SocialActorTypes { none, users, documents, @@ -5846,21 +5811,21 @@ declare namespace SP { all } /** Specifies whether the action is to navigate to the attachment or to perform some action dependent on the context in which the attachment is presented to the user. */ - export enum SocialAttachmentActionKind { + enum SocialAttachmentActionKind { /** This value specifies that the action is to navigate to the attachment. */ navigate, /** This value specifies that the action is dependent on the context that the attachment is displayed to the user. */ adHocAction } - export enum SocialAttachmentKind { + enum SocialAttachmentKind { image, video, document } /** Specifies whether the item being inserted is a user, document, site, tag, or link. */ - export enum SocialDataItemType { + enum SocialDataItemType { user, document, site, @@ -5869,19 +5834,19 @@ declare namespace SP { } /** Specifies whether the overlay is a link or one or more actors. */ - export enum SocialDataOverlayType { + enum SocialDataOverlayType { link, actors } /** Specifies whether the sort order is by creation time or modification time. */ - export enum SocialFeedSortOrder { + enum SocialFeedSortOrder { byModifiedTime, byCreatedTime } /** Identifies the kind of post to be retrieved. */ - export enum SocialFeedType { + enum SocialFeedType { personal, news, timeline, @@ -5890,7 +5855,7 @@ declare namespace SP { } // For some reasons this enum doesn't exist - // export enum SocialFollowResult { + // enum SocialFollowResult { // ok = 0, // alreadyFollowing = 1, // limitReached = 2, @@ -5899,13 +5864,13 @@ declare namespace SP { /** Provides information about the feed. This type provides information about whether the feed on the server contains additional threads that were not returned. */ - export enum SocialFeedAttributes { + enum SocialFeedAttributes { none, moreThreadsAvailable } /** Specifies attributes of the post, such as whether the current user can like or delete the post. */ - export enum SocialPostAttributes { + enum SocialPostAttributes { none, canLike, canDelete, @@ -5916,7 +5881,7 @@ declare namespace SP { /** Defines the type of item being specified in the SocialPostDefinitionDataItem. This type is only available in server-to-server calls. */ - export enum SocialPostDefinitionDataItemType { + enum SocialPostDefinitionDataItemType { text, user, document, @@ -5925,13 +5890,13 @@ declare namespace SP { link } - export enum SocialPostType { + enum SocialPostType { root, reply } /** Specifies a status or error code. */ - export enum SocialStatusCode { + enum SocialStatusCode { OK, /** This value specifies that an invalid request was encountered. */ invalidRequest, @@ -5962,7 +5927,7 @@ declare namespace SP { } /** Specifies properties of the thread. */ - export enum SocialThreadAttributes { + enum SocialThreadAttributes { none, isDigest, canReply, @@ -5971,7 +5936,7 @@ declare namespace SP { replyLimitReached } - export enum SocialThreadType { + enum SocialThreadType { normal, likeReference, replyReference, @@ -5980,7 +5945,7 @@ declare namespace SP { } /** Contains information about an actor retrieved from server. An actor is a user, document, site, or tag. */ - export class SocialActor extends SP.ClientValueObject { + class SocialActor extends SP.ClientValueObject { /** The AccountName property returns the user account name. This property is only available for social actors of type "user". */ get_accountName(): string; @@ -6026,7 +5991,7 @@ declare namespace SP { } /** Identifies an actor to the server. An actor can be a user, document, site, or tag. */ - export class SocialActorInfo extends SP.ClientValueObject { + class SocialActorInfo extends SP.ClientValueObject { /** User account name. This property is only available for social actors of type "user". */ get_accountName(): string; @@ -6056,7 +6021,7 @@ declare namespace SP { } /** Represents an image, document preview, or video preview attachment. */ - export class SocialAttachment extends SP.ClientValueObject { + class SocialAttachment extends SP.ClientValueObject { /** Specifies the type of object that the attachment contains. */ get_attachmentKind(): SocialAttachmentKind; /** Specifies the type of object that the attachment contains. */ @@ -6103,7 +6068,7 @@ declare namespace SP { set_width(value: number): number; } /** Specifies the user actions that are allowed for the attachment object. */ - export class SocialAttachmentAction extends SP.ClientValueObject { + class SocialAttachmentAction extends SP.ClientValueObject { /** Specifies whether the action is to navigate to a URI or an action that is dependent on the context in which the object is presented to the user. */ get_actionKind(): SocialAttachmentActionKind; /** Specifies whether the action is to navigate to a URI or an action that is dependent on the context in which the object is presented to the user. */ @@ -6117,7 +6082,7 @@ declare namespace SP { /** Defines a user, document, site, tag, or link to be inserted in a new post. The SocialPostCreationData class defines the content text that contains substitution strings. Each substitution string is replaced by a SocialDataItem value. */ - export class SocialDataItem extends SP.ClientValueObject { + class SocialDataItem extends SP.ClientValueObject { /** Identifies the user. */ get_accountName(): string; /** Identifies the user. */ @@ -6144,7 +6109,7 @@ declare namespace SP { An overlay is a substring in a post that represents a user, document, site, tag, or link. The SocialPost class contains an array of SocialDataOverlay objects. Each of the SocialDataOverlay objects specifies a link or one or more actors. */ - export class SocialDataOverlay extends SP.ClientValueObject { + class SocialDataOverlay extends SP.ClientValueObject { /** Specifies one or more actors as an array of integers where each integer specifies an index into the SocialThreadActors array. This property is only available if the get_overlayType() has a value of SocialDataOverlayType.actors. */ get_actorIndexes(): number[]; @@ -6160,7 +6125,7 @@ declare namespace SP { } /** Specifies information about errors that the server has encountered. */ - export class SocialExceptionDetails extends SP.ClientValueObject { + class SocialExceptionDetails extends SP.ClientValueObject { get_internalErrorCode(): number; get_internalMessage(): string; get_internalStackTrace(): string; @@ -6170,7 +6135,7 @@ declare namespace SP { } /** Specifies a feed, which contains an array of SocialThreads, each of which specifies a root SocialPost object and an array of response SocialPost objects. */ - export class SocialFeed extends SP.ClientValueObject { + class SocialFeed extends SP.ClientValueObject { /** Specifies attributes of the returned feed. The attributes specify if the requested feed has additional threads that were not included in the returned thread. */ get_attributes(): SocialFeedAttributes; @@ -6190,7 +6155,7 @@ declare namespace SP { /** Provides access to social feeds. It provides methods to create posts, delete posts, read posts, and perform other operations on posts. */ - export class SocialFeedManager extends SP.ClientObject { + class SocialFeedManager extends SP.ClientObject { constructor(context: SP.ClientRuntimeContext); /** Returns the current user */ get_owner(): SocialActor; @@ -6260,7 +6225,7 @@ declare namespace SP { getPreviewImage(url: string, key: string, iv: string): any; } - export class SocialFeedOptions extends SP.ClientObject { + class SocialFeedOptions extends SP.ClientObject { get_maxThreadCount(): number; set_maxThreadCount(value: number): number; get_newerThan(): string; @@ -6273,7 +6238,7 @@ declare namespace SP { /** Provides properties and methods for managing a user's list of followed actors. Actors can be users, documents, sites, and tags. */ - export class SocialFollowingManager extends SP.ClientObject { + class SocialFollowingManager extends SP.ClientObject { constructor(context: SP.ClientRuntimeContext); /** URI to a site that lists the current user's followed documents. */ get_followedDocumentsUri(): string; @@ -6297,7 +6262,7 @@ declare namespace SP { /** Defines a link that includes a URI and text representation. This class is used to represent the location of a web site. */ - export class SocialLink extends SP.ClientValueObject { + class SocialLink extends SP.ClientValueObject { get_text(): string; set_text(value: string): string; get_uri(): string; @@ -6305,7 +6270,7 @@ declare namespace SP { } /** Specifies a post read from the server. */ - export class SocialPost extends SP.ClientValueObject { + class SocialPost extends SP.ClientValueObject { /** Specifies an image, document preview, or video preview attachment */ get_attachment(): SocialAttachment; /** Describes attributes about the post, such as whether the current user can delete or like the post. */ @@ -6333,7 +6298,7 @@ declare namespace SP { } /** Specifies a set of users, documents, sites, and tags by an index into the SocialThreadActors array */ - export class SocialPostActorInfo extends SP.ClientValueObject { + class SocialPostActorInfo extends SP.ClientValueObject { get_includesCurrentUser(): boolean; /** Specifies an array of indexes into the SocialThreadActors array. The server can choose to return a limited set of actors. For example, the server can choose to return a subset of the users that like a post. */ @@ -6343,7 +6308,7 @@ declare namespace SP { /** Specifies the content of a post in the SocialFeedManager.createPost method. The post consists of a text message, which can optionally include social tags, mentions of users, and links. */ - export class SocialPostCreationData extends SP.ClientValueObject { + class SocialPostCreationData extends SP.ClientValueObject { /** Specifies an image, document preview, or video preview to be used in the post. */ get_attachment(): SocialAttachment; /** Specifies an image, document preview, or video preview to be used in the post. */ @@ -6382,7 +6347,7 @@ declare namespace SP { /** Provides additional information about server-generated posts. This type can only be specified in a server-to-server call. */ - export class SocialPostDefinitionData extends SP.ClientValueObject { + class SocialPostDefinitionData extends SP.ClientValueObject { get_items(): SocialPostDefinitionDataItem[]; set_items(value: SocialPostDefinitionDataItem[]): SocialPostDefinitionDataItem[]; get_name(): string; @@ -6391,7 +6356,7 @@ declare namespace SP { /** Specifies an item to be inserted in a post by replacing a token in the post definition. This type can only be specified in a server-to-server call. */ - export class SocialPostDefinitionDataItem extends SP.ClientValueObject { + class SocialPostDefinitionDataItem extends SP.ClientValueObject { /** Specifies the name of the user. This property is only used if the ItemType property specifies that the item is a User. */ get_accountName(): string; @@ -6426,7 +6391,7 @@ declare namespace SP { /** Specifies a reference to a post in another thread. The referenced post can be a post with a tag, a post that is liked, a post that mentions a user, or a post that is a reply. */ - export class SocialPostReference extends SP.ClientValueObject { + class SocialPostReference extends SP.ClientValueObject { /** Provides a digest of the thread containing the referenced post */ get_digest(): SocialThread; get_post(): SocialPost; @@ -6438,7 +6403,7 @@ declare namespace SP { /** Specifies a thread that is stored on the server. The thread contains a root post and zero or more reply posts. */ - export class SocialThread extends SP.ClientValueObject { + class SocialThread extends SP.ClientValueObject { /** Specifies the users who have created a post in the returned thread and also contains any users, documents, sites, and tags that are referenced in any of the posts in the returned thread. */ get_actors(): SocialActor[]; /** Specifies attributes of the thread, such as whether the current user can reply or lock the thread and whether the thread is a digest of a thread on the server, whether the number of replies has reached the maximum, and whether the thread is locked. */ @@ -6463,18 +6428,16 @@ declare namespace SP { get_threadType(): SocialThreadType; get_totalReplyCount(): number; } - } - } declare namespace SP { namespace Taxonomy { - export enum StringMatchOption { + enum StringMatchOption { startsWith, exactMatch } - export enum ChangeItemType { + enum ChangeItemType { unknown, term, termSet, @@ -6483,7 +6446,7 @@ declare namespace SP { site } - export enum ChangeOperationType { + enum ChangeOperationType { unknown, add, edit, @@ -6496,8 +6459,7 @@ declare namespace SP { restore } - - export class TaxonomySession extends SP.ClientObject { + class TaxonomySession extends SP.ClientObject { static getTaxonomySession(context: SP.ClientContext): TaxonomySession; get_offlineTermStoreNames(): string[]; get_termStores(): TermStoreCollection; @@ -6529,14 +6491,14 @@ declare namespace SP { getDefaultSiteCollectionTermStore(): TermStore; } - export class TermStoreCollection extends SP.ClientObjectCollection { + class TermStoreCollection extends SP.ClientObjectCollection { itemAt(index: number): TermStore; get_item(index: number): TermStore; getById(id: SP.Guid): TermStore; getByName(name: string): TermStore; } - export class TermStore extends SP.ClientObject { + class TermStore extends SP.ClientObject { get_contentTypePublishingHub(): string; get_defaultLanguage(): number; set_defaultLanguage(value: number): void; @@ -6579,7 +6541,7 @@ declare namespace SP { updateUsedTermsOnSite(currentSite: SP.Site): void; } - export class TaxonomyItem extends SP.ClientObject { + class TaxonomyItem extends SP.ClientObject { static normalizeName(context: SP.ClientContext, name: string): SP.StringResult; get_createdDate(): Date; get_id(): SP.Guid; @@ -6590,14 +6552,14 @@ declare namespace SP { deleteObject(): void; } - export class TermGroupCollection extends SP.ClientObjectCollection { + class TermGroupCollection extends SP.ClientObjectCollection { itemAt(index: number): TermGroup; get_item(index: number): TermGroup; getById(id: SP.Guid): TermGroup; getByName(name: string): TermGroup; } - export class TermGroup extends TaxonomyItem { + class TermGroup extends TaxonomyItem { get_description(): string; set_description(value: string): void; get_isSiteCollectionGroup(): boolean; @@ -6609,7 +6571,7 @@ declare namespace SP { getTermSetsWithCustomProperty(customPropertyMatchInformation: CustomPropertyMatchInformation): TermSetCollection; } - export class TermSetItem extends TaxonomyItem { + class TermSetItem extends TaxonomyItem { get_customProperties(): { [key: string]: string; }; get_customSortOrder(): string; set_customSortOrder(value: string): void; @@ -6627,14 +6589,14 @@ declare namespace SP { setCustomProperty(name: string, value: string): void; } - export class TermSetCollection extends SP.ClientObjectCollection { + class TermSetCollection extends SP.ClientObjectCollection { itemAt(index: number): TermSet; get_item(index: number): TermSet; getById(id: SP.Guid): TermSet; getByName(name: string): TermSet; } - export class TermSet extends TermSetItem { + class TermSet extends TermSetItem { get_contact(): string; set_contact(value: string): void; get_description(): string; @@ -6657,14 +6619,14 @@ declare namespace SP { move(targetGroup: TermGroup): void; } - export class TermCollection extends SP.ClientObjectCollection { + class TermCollection extends SP.ClientObjectCollection { itemAt(index: number): Term; get_item(index: number): Term; getById(id: SP.Guid): Term; getByName(name: string): Term; } - export class Term extends TermSetItem { + class Term extends TermSetItem { get_description(): string; get_isDeprecated(): boolean; get_isKeyword(): boolean; @@ -6711,14 +6673,13 @@ declare namespace SP { getPath(lcid: number): SP.StringResult; } - - export class LabelCollection extends SP.ClientObjectCollection'); } - var results = list.getItems(query); + const results = list.getItems(query); ctx.load(results); - ctx.executeQueryAsync((o, e) => { - var selected = false; + let selected = false; while (_dropdownElt.options.length) { (_dropdownElt.options as any /* TODO remove `as any` */).remove(0); } if (!_schema.Required) { - var defaultOpt = new Option(Strings.STS.L_LookupFieldNoneOption, '0', selected, selected); + const defaultOpt = new Option(Strings.STS.L_LookupFieldNoneOption, '0', selected, selected); (_dropdownElt.options as any /* TODO remove `as any` */).add(defaultOpt); selected = _selectedValue === 0; } - var isEmptyList = true; + let isEmptyList = true; - var enumerator = results.getEnumerator(); + const enumerator = results.getEnumerator(); while (enumerator.moveNext()) { - var c = enumerator.get_current(); - var id: number; - var text: string; + const c = enumerator.get_current(); + let id: number; + let text: string; if (!lookupField) { id = c.get_id(); text = c.get_item('Title'); } else { - var value = c.get_item(lookupField) as SP.FieldLookupValue; + const value = c.get_item(lookupField) as SP.FieldLookupValue; id = value.get_lookupId(); text = value.get_lookupValue(); } - var isSelected = _selectedValue === id; + const isSelected = _selectedValue === id; if (isSelected) { selected = true; } - var opt = new Option(text, id.toString(), isSelected, isSelected); + const opt = new Option(text, id.toString(), isSelected, isSelected); (_dropdownElt.options as any /* TODO remove `as any` */).add(opt); isEmptyList = false; } @@ -1134,31 +1090,26 @@ namespace CSR { OnLookupValueChanged(); } } - - }, (o, args) => { console.log(args.get_message()); }); } } - } koEditField(fieldName: string, template: string, vm: KoFieldInForm, dependencyFields?: string[]): CSR { return this.fieldEdit(fieldName, koEditField_Edit) .fieldNew(fieldName, koEditField_Edit); - function koEditField_Edit(rCtx: SPClientTemplates.RenderContext_FieldInForm) { if (rCtx == null) return ''; - var _myData = SPClientTemplates.Utility.GetFormContextForCurrentField(rCtx); + const _myData = SPClientTemplates.Utility.GetFormContextForCurrentField(rCtx); if (_myData == null || _myData.fieldSchema == null) return ''; - var elementId = _myData.fieldName + '_' + _myData.fieldSchema.Id + '_$' + _myData.fieldSchema.Type; + const elementId = _myData.fieldName + '_' + _myData.fieldSchema.Id + '_$' + _myData.fieldSchema.Type; vm.renderingContext = rCtx; - if (dependencyFields) { dependencyFields.forEach(dependencyField => { if (!vm[dependencyField]) { @@ -1170,7 +1121,6 @@ namespace CSR { }); } - if (!vm.value) { vm.value = ko.observable(); } @@ -1178,7 +1128,6 @@ namespace CSR { vm.value.subscribe(v => { _myData.updateControlValue(fieldName, v); }); _myData.registerGetValueCallback(fieldName, () => vm.value()); - _myData.registerInitCallback(fieldName, () => { ko.applyBindings(vm, $get(elementId)); }); @@ -1188,18 +1137,17 @@ namespace CSR { } computedValue(targetField: string, transform: (...values: string[]) => string, ...sourceField: string[]): CSR { - var dependentValues: { [field: string]: string } = {}; + const dependentValues: { [field: string]: string } = {}; return this.onPostRenderField(targetField, (schema: SPClientTemplates.FieldSchema_InForm, ctx: SPClientTemplates.RenderContext_FieldInForm) => { if (ctx.ControlMode === SPClientTemplates.ClientControlMode.EditForm || ctx.ControlMode === SPClientTemplates.ClientControlMode.NewForm) { - var targetControl = CSR.getControl(schema as SPClientTemplates.FieldSchema_InForm); + const targetControl = CSR.getControl(schema as SPClientTemplates.FieldSchema_InForm); sourceField.forEach((field) => { CSR.addUpdatedValueCallback(ctx, field, v => { dependentValues[field] = v; targetControl.value = transform.apply(this, sourceField.map(n => dependentValues[n] || '')); - }); }); } @@ -1216,7 +1164,6 @@ namespace CSR { } } - autofill(fieldName: string, init: (ctx: AutoFillFieldContext) => () => void): CSR { return this .fieldNew(fieldName, SPFieldLookup_Autofill_Edit) @@ -1225,17 +1172,17 @@ namespace CSR { function SPFieldLookup_Autofill_Edit(rCtx: SPClientTemplates.RenderContext_FieldInForm) { if (rCtx == null) return ''; - var _myData = SPClientTemplates.Utility.GetFormContextForCurrentField(rCtx); + const _myData = SPClientTemplates.Utility.GetFormContextForCurrentField(rCtx); if (_myData == null || _myData.fieldSchema == null) return ''; - var _autoFillControl: SPClientAutoFill; - var _textInputElt: HTMLInputElement; - var _textInputId = _myData.fieldName + '_' + _myData.fieldSchema.Id + '_$' + _myData.fieldSchema.Type + 'Field'; - var _autofillContainerId = _myData.fieldName + '_' + _myData.fieldSchema.Id + '_$AutoFill'; + let _autoFillControl: SPClientAutoFill; + let _textInputElt: HTMLInputElement; + const _textInputId = _myData.fieldName + '_' + _myData.fieldSchema.Id + '_$' + _myData.fieldSchema.Type + 'Field'; + const _autofillContainerId = _myData.fieldName + '_' + _myData.fieldSchema.Id + '_$AutoFill'; - var validators = new SPClientForms.ClientValidation.ValidatorSet(); + const validators = new SPClientForms.ClientValidation.ValidatorSet(); if (_myData.fieldSchema.Required) { validators.RegisterValidator(new SPClientForms.ClientValidation.RequiredValidator()); } @@ -1259,7 +1206,7 @@ namespace CSR { SP.SOD.executeFunc("autofill.js", "SPClientAutoFill", () => { _autoFillControl = new SPClientAutoFill(_textInputId, _autofillContainerId, (_) => callback()); - var callback = init({ + const callback = init({ renderContext: rCtx, fieldContext: _myData, autofill: _autoFillControl, @@ -1270,10 +1217,8 @@ namespace CSR { // _autoFillControl.VisibleItemCount = 15; // _autoFillControl.AutoFillTimeout = 500; }); - } // function OnPopulate(targetElement: HTMLInputElement) { - // } // function OnLookupValueChanged() { @@ -1283,7 +1228,7 @@ namespace CSR { // return _valueStr; // } function buildAutoFillControl() { - var result: string[] = []; + const result: string[] = []; result.push('
'); result.push(''); @@ -1293,21 +1238,19 @@ namespace CSR { return result.join(""); } } - - } seachLookup(fieldName: string): CSR { return this.autofill(fieldName, (ctx: AutoFillFieldContext) => { - var _myData = ctx.fieldContext; - var _schema = _myData.fieldSchema as SPClientTemplates.FieldSchema_InForm_Lookup; + const _myData = ctx.fieldContext; + const _schema = _myData.fieldSchema as SPClientTemplates.FieldSchema_InForm_Lookup; if (_myData.fieldSchema.Type !== 'Lookup') { return null; } - var _valueStr = _myData.fieldValue != null ? _myData.fieldValue : ''; - var _selectedValue = SPClientTemplates.Utility.ParseLookupValue(_valueStr); - var _noValueSelected = _selectedValue.LookupId === 0; + const _valueStr = _myData.fieldValue != null ? _myData.fieldValue : ''; + const _selectedValue = SPClientTemplates.Utility.ParseLookupValue(_valueStr); + const _noValueSelected = _selectedValue.LookupId === 0; ctx.control.value = _selectedValue.LookupValue; $addHandler(ctx.control, "blur", _ => { if (ctx.control.value === '') { @@ -1319,39 +1262,39 @@ namespace CSR { if (_noValueSelected) _myData.fieldValue = ''; - var _autoFillControl = ctx.autofill; + const _autoFillControl = ctx.autofill; _autoFillControl.AutoFillMinTextLength = 2; _autoFillControl.VisibleItemCount = 15; _autoFillControl.AutoFillTimeout = 500; return () => { - var value = ctx.control.value; + const value = ctx.control.value; _autoFillControl.PopulateAutoFill([AutoFillOptionBuilder.buildLoadingItem('Please wait...')], onSelectItem); SP.SOD.executeFunc("sp.search.js", "Microsoft.SharePoint.Client.Search.Query", () => { - var Search = Microsoft.SharePoint.Client.Search.Query; - var ctx = SP.ClientContext.get_current(); - var query = new Search.KeywordQuery(ctx); + const Search = Microsoft.SharePoint.Client.Search.Query; + const ctx = SP.ClientContext.get_current(); + const query = new Search.KeywordQuery(ctx); query.set_rowLimit(_autoFillControl.VisibleItemCount); query.set_queryText('contentclass:STS_ListItem ListID:{' + _schema.LookupListId + '} ' + value); - var selectProps = query.get_selectProperties(); + const selectProps = query.get_selectProperties(); selectProps.clear(); // TODO: Handle ShowField attribute selectProps.add('Title'); selectProps.add('ListItemId'); - var executor = new Search.SearchExecutor(ctx); - var result = executor.executeQuery(query); + const executor = new Search.SearchExecutor(ctx); + const result = executor.executeQuery(query); ctx.executeQueryAsync( () => { // TODO: Discover proper way to load collection - var tableCollection = new Search.ResultTableCollection(); + const tableCollection = new Search.ResultTableCollection(); tableCollection.initPropertiesFromJson(result.get_value()); - var relevantResults = tableCollection.get_item(0); - var rows = relevantResults.get_resultRows(); + const relevantResults = tableCollection.get_item(0); + const rows = relevantResults.get_resultRows(); - var items = []; - for (var row of rows) { + const items = []; + for (const row of rows) { items.push(AutoFillOptionBuilder.buildOptionItem(parseInt(row["ListItemId"], 10), row["Title"])); } @@ -1363,7 +1306,6 @@ namespace CSR { items.push(AutoFillOptionBuilder.buildFooterItem("Showing " + rows.length + " of" + relevantResults.get_totalRows() + " items!")); _autoFillControl.PopulateAutoFill(items, onSelectItem); - }, (sender, args) => { _autoFillControl.PopulateAutoFill([AutoFillOptionBuilder.buildFooterItem("Error executing query/ See log for details.")], onSelectItem); @@ -1373,36 +1315,36 @@ namespace CSR { }; function onSelectItem(targetInputId, item: ISPClientAutoFillData) { - var targetElement = ctx.control; + const targetElement = ctx.control; targetElement.value = item[SPClientAutoFill.DisplayTextProperty]; _selectedValue.LookupId = item[SPClientAutoFill.KeyProperty]; _selectedValue.LookupValue = item[SPClientAutoFill.DisplayTextProperty]; _myData.fieldValue = item[SPClientAutoFill.KeyProperty] + ';#' + item[SPClientAutoFill.TitleTextProperty]; _myData.updateControlValue(_myData.fieldSchema.Name, _myData.fieldValue); } - }); } lookupAddNew(fieldName: string, prompt: string, showDialog?: boolean, contentTypeId?: string): CSR { return this.onPostRenderField(fieldName, (schema: SPClientTemplates.FieldSchema_InForm_Lookup, ctx: SPClientTemplates.RenderContext_FieldInForm) => { + let control: HTMLInputElement; if (ctx.ControlMode === SPClientTemplates.ClientControlMode.EditForm || ctx.ControlMode === SPClientTemplates.ClientControlMode.NewForm) - var control = CSR.getControl(schema); + control = CSR.getControl(schema); if (control) { - var weburl = _spPageContextInfo.webServerRelativeUrl; + let weburl = _spPageContextInfo.webServerRelativeUrl; if (weburl[weburl.length - 1] === '/') { weburl = weburl.substring(0, weburl.length - 1); } - var newFormUrl = weburl + '/_layouts/listform.aspx/listform.aspx?PageType=8' + let newFormUrl = weburl + '/_layouts/listform.aspx/listform.aspx?PageType=8' + "&ListId=" + encodeURIComponent('{' + schema.LookupListId + '}'); if (contentTypeId) { newFormUrl += '&ContentTypeId=' + contentTypeId; } - var link = document.createElement('a'); + const link = document.createElement('a'); link.href = "javascript:NewItem2(event, \'" + newFormUrl + "&Source=" + encodeURIComponent(document.location.href) + "')"; link.textContent = prompt; if (control.nextElementSibling) { @@ -1433,9 +1375,8 @@ namespace CSR { } export class AutoFillOptionBuilder { - static buildFooterItem(title: string): ISPClientAutoFillData { - var item = {}; + const item = {}; item[SPClientAutoFill.DisplayTextProperty] = title; item[SPClientAutoFill.MenuOptionTypeProperty] = SPClientAutoFill.MenuOptionType.Footer; @@ -1444,8 +1385,7 @@ namespace CSR { } static buildOptionItem(id: number, title: string, displayText?: string, subDisplayText?: string): ISPClientAutoFillData { - - var item = {}; + const item = {}; item[SPClientAutoFill.KeyProperty] = id; item[SPClientAutoFill.DisplayTextProperty] = displayText || title; @@ -1457,19 +1397,18 @@ namespace CSR { } static buildSeparatorItem(): ISPClientAutoFillData { - var item = {}; + const item = {}; item[SPClientAutoFill.MenuOptionTypeProperty] = SPClientAutoFill.MenuOptionType.Separator; return item; } static buildLoadingItem(title: string): ISPClientAutoFillData { - var item = {}; + const item = {}; item[SPClientAutoFill.MenuOptionTypeProperty] = SPClientAutoFill.MenuOptionType.Loading; item[SPClientAutoFill.DisplayTextProperty] = title; return item; } - } type RenderContext = (ctx: SPClientTemplates.RenderContext) => T; /** Lightweight client-side rendering template overrides.*/ @@ -1606,7 +1545,6 @@ namespace CSR { // tslint:disable-next-line: unified-signatures fieldNew(fieldName: string, template: (ctx: SPClientTemplates.RenderContext_FieldInForm) => string): CSR; - /** Set initial value for field. @param fieldName Internal name of the field. @param value Initial value for field. @@ -1618,7 +1556,6 @@ namespace CSR { */ makeHidden(fieldName: string): CSR; - /** Replace New and Edit templates for field to Display template. @param fieldName Internal name of the field. */ @@ -1656,8 +1593,6 @@ namespace CSR { lookupAddNew(fieldName: string, prompt: string, showDialog?: boolean, contentTypeId?: string): CSR; koEditField(fieldName: string, template: string, vm: KoFieldInForm, dependencyFields?: string[]): CSR; - - } export interface AutoFillFieldContext { @@ -1672,7 +1607,6 @@ namespace CSR { value?: KnockoutObservable; } - interface FormRenderContexWithHook extends SPClientTemplates.RenderContext_FieldInForm { FormContextHook: FormContextHook; } @@ -1684,16 +1618,14 @@ namespace CSR { interface FormContextHookField { fieldSchema?: SPClientTemplates.FieldSchema_InForm; lastValue?: any; - getValue?: () => any; + getValue?(): any; updatedValueCallbacks: UpdatedValueCallback[]; } - function ensureFormContextHookField(hook: FormContextHook, fieldName: string): FormContextHookField { return hook[fieldName] = hook[fieldName] || { updatedValueCallbacks: [] }; - } class BooleanValueValidator implements SPClientForms.ClientValidation.IValidator { @@ -1703,23 +1635,17 @@ namespace CSR { return new SPClientForms.ClientValidation.ValidationResult(!this.valueGetter(), this.validationMessage); } } - } if (typeof SP === 'object' && SP && typeof SP.SOD === 'object' && SP.SOD) { SP.SOD.notifyScriptLoadedAndExecuteWaitingJobs("typescripttemplates.ts"); } - // mquery.ts - - - namespace spdevlab { export namespace mQuery { export class DynamicTable { - // private fields _domContainer: HTMLElement; _tableContainer: MQueryResultSetElements; @@ -1735,7 +1661,6 @@ namespace spdevlab { // public methods init(domContainer: HTMLElement, options) { - if (m$.isDefinedAndNotNull(options)) { m$.extend(this._options, options); } @@ -1749,7 +1674,6 @@ namespace spdevlab { // private methods _initContainers(domContainer) { - this._domContainer = domContainer; this._tableContainer = m$(this._options.tableCnt, this._domContainer); } @@ -1759,17 +1683,13 @@ namespace spdevlab { } _initEvents() { - m$(this._options.addCnt, this._domContainer).click(() => { - if (m$.isDefinedAndNotNull(this._rowTemplateContent)) { - m$(this._tableContainer).append(this._rowTemplateContent); m$("tr:last-child " + this._options.removeCnt, this._tableContainer).click((e) => { - - var targetElement = e.currentTarget as HTMLElement; - var parentRow = m$(targetElement).parents("tr").first(); + const targetElement = e.currentTarget as HTMLElement; + const parentRow = m$(targetElement).parents("tr").first(); m$(parentRow).remove(); }); @@ -1780,7 +1700,7 @@ namespace spdevlab { } _initRowTemplate() { - var templateId = m$(this._tableContainer).attr("template-id"); + const templateId = m$(this._tableContainer).attr("template-id"); if (m$.isDefinedAndNotNull(templateId)) { this._rowTemplateId = templateId; @@ -1792,8 +1712,7 @@ namespace spdevlab { static initTables() { // init templates m$('script').forEach((template: HTMLElement) => { - - var id = m$(template).attr("dynamic-table-template-id"); + const id = m$(template).attr("dynamic-table-template-id"); if (m$.isDefinedAndNotNull(id)) { DynamicTable._templates[id] = template.innerHTML; @@ -1802,18 +1721,14 @@ namespace spdevlab { // init tables m$(".spdev-rep-tb-cnt").forEach(divContainer => { - - var dynamicTable = new DynamicTable(); + const dynamicTable = new DynamicTable(); dynamicTable.init(divContainer, { removeCnt: '.spdev-rep-tb-del-override' }); }); } - - }; - - + } } } @@ -1821,16 +1736,14 @@ m$.ready(() => { spdevlab.mQuery.DynamicTable.initTables(); }); - // whoisapppart.ts - namespace _ { - var queryString = parseQueryString(); - var isIframe = queryString['DisplayMode'] === 'iframe'; - var spHostUrl = queryString['SPHostUrl']; - var editmode = Number(queryString['editmode']); - var includeDetails = queryString['boolProp'] === 'true'; + const queryString = parseQueryString(); + const isIframe = queryString['DisplayMode'] === 'iframe'; + const spHostUrl = queryString['SPHostUrl']; + const editmode = Number(queryString['editmode']); + const includeDetails = queryString['boolProp'] === 'true'; prepareVisual(); m$.ready(() => { @@ -1844,7 +1757,7 @@ namespace _ { // Load the people picker function loadPeoplePicker(peoplePickerElementId: string) { - var schema: ISPClientPeoplePickerSchema = { + const schema: ISPClientPeoplePickerSchema = { PrincipalAccountType: "User", AllowMultipleValues: false, Width: 300, @@ -1856,20 +1769,19 @@ namespace _ { function onUserResolvedClientScript(el: string, users: ISPClientPeoplePickerEntity[]) { if (users.length > 0) { - var person = users[0]; - var accountName = person.Key; + const person = users[0]; + const accountName = person.Key; - var context = SP.ClientContext.get_current(); + const context = SP.ClientContext.get_current(); - var peopleManager = new SP.UserProfiles.PeopleManager(context); - var personProperties = peopleManager.getPropertiesFor(accountName); + const peopleManager = new SP.UserProfiles.PeopleManager(context); + const personProperties = peopleManager.getPropertiesFor(accountName); context.load(personProperties); context.executeQueryAsync((sender, args) => { - $get("basicInfo").style.display = 'block'; - var userPic = personProperties.get_userProfileProperties()["PictureURL"]; + const userPic = personProperties.get_userProfileProperties()["PictureURL"]; $get("pic").innerHTML = ' + personProperties.get_displayName() + '; $get("name").innerHTML = '' + personProperties.get_displayName() + ''; @@ -1878,9 +1790,9 @@ namespace _ { $get("department").innerHTML = person.EntityData.Department; $get("phone").innerHTML = person.EntityData.MobilePhone; - var properties = personProperties.get_userProfileProperties(); - var messageText = ""; - for (var key in properties) { + const properties = personProperties.get_userProfileProperties(); + let messageText = ""; + for (const key in properties) { if (properties.hasOwnProperty(key)) continue; messageText += "
[" + key + "]: \"" + properties[key] + "\""; @@ -1890,14 +1802,11 @@ namespace _ { if (isIframe) { partResize(); } - }, (sender, args) => { alert('Error: ' + args.get_message()); }); - } } function partProperties() { - if (editmode === 1) { $get("editmodehdr").style.display = "inline"; $get("content").style.display = "none"; @@ -1910,23 +1819,22 @@ namespace _ { } function partResize() { - var bounds = Sys.UI.DomElement.getBounds(document.body); + const bounds = Sys.UI.DomElement.getBounds(document.body); parent.postMessage('resize(' + bounds.width + ',' + bounds.height + ')', '*'); } function prepareVisual() { if (isIframe) { // Create a Link element for the defaultcss.ashx resource - var linkElement = document.createElement('link'); + const linkElement = document.createElement('link'); linkElement.setAttribute('rel', 'stylesheet'); linkElement.setAttribute('href', spHostUrl + '/_layouts/15/defaultcss.ashx'); // Add the linkElement as a child to the head section of the html document.head.appendChild(linkElement); } else { - m$.ready(() => { - var nav = new SP.UI.Controls.Navigation('navigation', { + const nav = new SP.UI.Controls.Navigation('navigation', { appIconUrl: queryString['SPHostLogo'], appTitle: document.title }); @@ -1938,13 +1846,13 @@ namespace _ { } function parseQueryString() { - var result = {}; - var qs = document.location.search.split('?')[1]; + const result = {}; + const qs = document.location.search.split('?')[1]; if (qs) { - var parts = qs.split('&'); - for (var part of parts) { + const parts = qs.split('&'); + for (const part of parts) { if (part) { - var pair = part.split('='); + const pair = part.split('='); result[pair[0]] = decodeURIComponent(pair[1]); } } @@ -1955,12 +1863,11 @@ namespace _ { // taxonomy namespace MySP { - // Class export class ClientContextPromise extends SP.ClientContext { /** To use this function, you must ensure that jQuery and CSOMPromise js files are loaded to the page */ executeQueryPromise(): JQueryPromise { - var deferred = jQuery.Deferred(); + const deferred = jQuery.Deferred(); this.executeQueryAsync(function done(sender, args) { deferred.resolve(sender, args); }, @@ -1977,20 +1884,18 @@ namespace MySP { static get_current(): ClientContextPromise { return new ClientContextPromise(_spPageContextInfo.siteServerRelativeUrl); } - } - } SP.SOD.notifyScriptLoadedAndExecuteWaitingJobs("CSOMPromise.ts"); namespace _ { - var context: MySP.ClientContextPromise; - var web: SP.Web; - var site: SP.Site; - var session: SP.Taxonomy.TaxonomySession; - var termStore: SP.Taxonomy.TermStore; - var groups: SP.Taxonomy.TermGroupCollection; + let context: MySP.ClientContextPromise; + let web: SP.Web; + let site: SP.Site; + let session: SP.Taxonomy.TaxonomySession; + let termStore: SP.Taxonomy.TermStore; + let groups: SP.Taxonomy.TermGroupCollection; // This code runs when the DOM is ready and creates a context object // which is needed to use the SharePoint object model. @@ -2033,15 +1938,15 @@ namespace _ { function onRetrieveGroups() { $('#report').children().remove(); - var groupEnum = groups.getEnumerator(); + const groupEnum = groups.getEnumerator(); // For each group, we'll build a clickable div. while (groupEnum.moveNext()) { (() => { - var currentGroup = groupEnum.get_current(); - var groupName = document.createElement("div"); + const currentGroup = groupEnum.get_current(); + const groupName = document.createElement("div"); groupName.setAttribute("style", "float:none;cursor:pointer"); - var groupID = currentGroup.get_id(); + const groupID = currentGroup.get_id(); groupName.setAttribute("id", groupID.toString()); $(groupName).click(() => showTermSets(groupID)); groupName.appendChild(document.createTextNode(currentGroup.get_name())); @@ -2056,23 +1961,22 @@ namespace _ { // do is retrieve a reference to the group with the same ID as the div, and // then add the term sets that belong to that group under the div that was clicked. function showTermSets(groupID: SP.Guid) { - // First thing is to remnove the divs under the group DIV to ensure we have a clean place to write to. // The reason we don't clear them all is becuase we want to retain the text node of the // group div. I.E. that's why we use "parentDiv.childNodes.length>1" as our loop // controller. - var parentDiv = document.getElementById(groupID.toString()); + const parentDiv = document.getElementById(groupID.toString()); while (parentDiv.childNodes.length > 1) { parentDiv.removeChild(parentDiv.lastChild); } // For each term set, we'll build a clickable div - var currentGroup = groups.getById(groupID); + const currentGroup = groups.getById(groupID); // We need to load and populate the matching group first, or the // term sets that it contains will be inaccessible to our code. context.load(currentGroup); - var termSets: SP.Taxonomy.TermSetCollection; + let termSets: SP.Taxonomy.TermSetCollection; context.executeQueryPromise() .then( () => { @@ -2096,25 +2000,23 @@ namespace _ { // group ID. We also pass in the event object, so that we can cancel the bubble // because this clickable div will be inside a parent clickable div and we // don't want the parent's event to fire. - var termSetEnum = termSets.getEnumerator(); + const termSetEnum = termSets.getEnumerator(); while (termSetEnum.moveNext()) { (() => { - var currentTermSet = termSetEnum.get_current(); - var termSetName = document.createElement("div"); + const currentTermSet = termSetEnum.get_current(); + const termSetName = document.createElement("div"); termSetName.appendChild(document.createTextNode(" + " + currentTermSet.get_name())); termSetName.setAttribute("style", "float:none;cursor:pointer;"); - var termSetID = currentTermSet.get_id(); + const termSetID = currentTermSet.get_id(); termSetName.setAttribute("id", termSetID.toString()); $(termSetName).click(e => showTerms(e, groupID, termSetID)); parentDiv.appendChild(termSetName); })(); } - }) .fail(() => parentDiv.appendChild(document.createTextNode("An error occurred in loading the term sets for this group"))); } - // This is the function that runs when the user clicks one of the divs // that we created in the showTermSets function. We can know which // div was clicked by interrogating the termSetID parameter. So what we'll @@ -2122,7 +2024,6 @@ namespace _ { // then add the term that belong to that term set under the div that was clicked. function showTerms(event: JQueryEventObject, groupID: SP.Guid, termSetID: SP.Guid) { - // First, cancel the bubble so that the group div click handler does not also fire // because that removes all term set divs and we don't want that here. event.cancelBubble = true; @@ -2130,17 +2031,17 @@ namespace _ { // Get a reference to the term set div that was click and // remove its children (apart from the TextNode that is currently // showing the term set name. - var parentDiv = document.getElementById(termSetID.toString()); + const parentDiv = document.getElementById(termSetID.toString()); while (parentDiv.childNodes.length > 1) { parentDiv.removeChild(parentDiv.lastChild); } // We need to load and populate the matching group first, or the // term sets that it contains will be inaccessible to our code. - var currentGroup = groups.getById(groupID); - var termSets: SP.Taxonomy.TermSetCollection; - var currentTermSet: SP.Taxonomy.TermSet; - var terms: SP.Taxonomy.TermCollection; + const currentGroup = groups.getById(groupID); + let termSets: SP.Taxonomy.TermSetCollection; + let currentTermSet: SP.Taxonomy.TermSet; + let terms: SP.Taxonomy.TermCollection; context.load(currentGroup); context @@ -2166,11 +2067,11 @@ namespace _ { return context.executeQueryPromise(); }) .then(() => { - var termsEnum = terms.getEnumerator(); + const termsEnum = terms.getEnumerator(); while (termsEnum.moveNext()) { - var currentTerm = termsEnum.get_current(); + const currentTerm = termsEnum.get_current(); - var term = document.createElement("div"); + const term = document.createElement("div"); term.appendChild(document.createTextNode(" - " + currentTerm.get_name())); term.setAttribute("style", "float:none;margin-left:10px;"); parentDiv.appendChild(term); @@ -2193,7 +2094,6 @@ namespace _ { $('#report').append("Failed to get session. Error: " + args.get_message()); } - // When the createTerms button is clicked, start by loading // a TaxonomySession for the current context. Also get and load // the associated term store. @@ -2205,22 +2105,21 @@ namespace _ { context.executeQueryAsync(onGetTaxonomySession, onFailTaxonomySession); } - // This function is the success callback for loading the session and store from the createTerms function function onGetTaxonomySession() { // Create six GUIDs that we will need when we create a new group, term set, and associated terms - var guidGroupValue = SP.Guid.newGuid(); - var guidTermSetValue = SP.Guid.newGuid(); - var guidTerm1 = SP.Guid.newGuid(); - var guidTerm2 = SP.Guid.newGuid(); - var guidTerm3 = SP.Guid.newGuid(); - var guidTerm4 = SP.Guid.newGuid(); + const guidGroupValue = SP.Guid.newGuid(); + const guidTermSetValue = SP.Guid.newGuid(); + const guidTerm1 = SP.Guid.newGuid(); + const guidTerm2 = SP.Guid.newGuid(); + const guidTerm3 = SP.Guid.newGuid(); + const guidTerm4 = SP.Guid.newGuid(); // Create a new group - var myGroup = termStore.createGroup("CustomTerms", guidGroupValue); + const myGroup = termStore.createGroup("CustomTerms", guidGroupValue); // Create a new term set in the newly-created group - var myTermSet = myGroup.createTermSet("Privacy", guidTermSetValue, 1033); + const myTermSet = myGroup.createTermSet("Privacy", guidTermSetValue, 1033); // Create four new terms in the newly-created term set myTermSet.createTerm("Top Secret", 1033, guidTerm1); @@ -2235,7 +2134,6 @@ namespace _ { // Execute all the preceeding statements in this function context.executeQueryAsync(onAddTerms, onFailAddTerms); - } // If all is well with creating the terms, then this function will run. @@ -2258,54 +2156,50 @@ namespace _ { $('#report').children().remove(); $('#report').append("Failed to get session. Error: " + args.get_message()); } - -}; +} // publishing.ts // Variables used in various callbacks JSRequest.EnsureSetup(); SP.SOD.execute('mquery.js', 'm$.ready', () => { - var context = SP.ClientContext.get_current(); - var web = context.get_web(); + const context = SP.ClientContext.get_current(); + const web = context.get_web(); m$('#CreatePage').click(createPage); }); function createPage(evt) { SP.SOD.execute('sp.js', 'SP.ClientConext', () => { SP.SOD.execute('sp.publishing.js', 'SP.Publishing', () => { - var context = SP.ClientContext.get_current(); + const context = SP.ClientContext.get_current(); - - var hostUrl = decodeURIComponent(JSRequest.QueryString["SPHostUrl"]); - var hostcontext = new SP.AppContextSite(context, hostUrl); - var web = hostcontext.get_web(); - var pubWeb = SP.Publishing.PublishingWeb.getPublishingWeb(context, web); + const hostUrl = decodeURIComponent(JSRequest.QueryString["SPHostUrl"]); + const hostcontext = new SP.AppContextSite(context, hostUrl); + const web = hostcontext.get_web(); + const pubWeb = SP.Publishing.PublishingWeb.getPublishingWeb(context, web); context.load(web); context.load(pubWeb); context.executeQueryAsync( // Success callback after getting the host Web as a PublishingWeb. // We now want to add a new Publishing Page. function done() { - var pageInfo = new SP.Publishing.PublishingPageInformation(); - var newPage = pubWeb.addPublishingPage(pageInfo); + const pageInfo = new SP.Publishing.PublishingPageInformation(); + const newPage = pubWeb.addPublishingPage(pageInfo); context.load(newPage); context.executeQueryAsync( function done() { - // Success callback after adding a new Publishing Page. // We want to get the actual list item that is represented by the Publishing Page. - var listItem = newPage.get_listItem(); + const listItem = newPage.get_listItem(); context.load(listItem); context.executeQueryAsync( - // Success callback after getting the actual list item that is // represented by the Publishing Page. // We can now get its FieldValues, one of which is its FileLeafRef value. // We can then use that value to build the Url to the new page // and set the href or our link to that Url. function done() { - var link = document.getElementById("linkToPage"); + const link = document.getElementById("linkToPage"); link.setAttribute("href", web.get_url() + "/Pages/" + listItem.get_fieldValues().FileLeafRef); link.innerText = "Go to new page!"; }, @@ -2334,13 +2228,11 @@ function createPage(evt) { // likes namespace SampleReputation { - interface MyList extends SPClientTemplates.RenderContext_InView { listId: string; } class MyItem { - id: number; title: string; likesCount: number; @@ -2355,7 +2247,7 @@ namespace SampleReputation { private getLike(likedBy): boolean { if (likedBy && likedBy.length > 0) { - for (var likedByItem of likedBy) { + for (const likedByItem of likedBy) { if (likedByItem.id === _spPageContextInfo.userId) { return true; } @@ -2383,15 +2275,14 @@ namespace SampleReputation { RegisterModuleInit('/SPTypeScript/ReputationModule/likes.js', init); }); - SP.SOD.notifyScriptLoadedAndExecuteWaitingJobs('likes.js'); } function renderTemplate(ctx: MyList) { - var rows = ctx.ListData.Row; - var result = ''; - for (var row of rows) { - var item = new MyItem(row); + const rows = ctx.ListData.Row; + let result = ''; + for (const row of rows) { + const item = new MyItem(row); result += '\
  • ' + item.title + '\ \ @@ -2407,14 +2298,14 @@ namespace SampleReputation { } export function setLike(itemId: number, listId: string): void { - var context = SP.ClientContext.get_current(); - var isLiked = m$('#likesCountText' + itemId)[0].textContent === '\u2661'; + const context = SP.ClientContext.get_current(); + const isLiked = m$('#likesCountText' + itemId)[0].textContent === '\u2661'; SP.SOD.executeFunc('reputation.js', 'Microsoft.Office.Server.ReputationModel.Reputation', function fail() { Microsoft.Office.Server.ReputationModel.Reputation.setLike(context, listId, itemId, isLiked); context.executeQueryAsync( () => { m$('#likesCountText' + itemId)[0].textContent = getLikeText(isLiked); - var likesCount = parseInt(m$('#likesCount' + itemId)[0].textContent, 10); + const likesCount = parseInt(m$('#likesCount' + itemId)[0].textContent, 10); m$('#likesCount' + itemId)[0].textContent = (isLiked ? likesCount + 1 : likesCount - 1).toString(); }, (sender, args) => { @@ -2426,12 +2317,10 @@ namespace SampleReputation { init(); } - - // code from https://github.com/gandjustas/SharePointAngularTS namespace App { "use strict"; - var app = angular.module("app", []); + const app = angular.module("app", []); } // Install the angularjs.TypeScript.DefinitelyTyped NuGet package @@ -2440,7 +2329,7 @@ namespace App { interface Iappcontroller { title: string; - activate: () => void; + activate(): void; } class appcontroller implements Iappcontroller { @@ -2454,27 +2343,23 @@ namespace App { } activate() { - var loading = this.$n.showLoading(true); + const loading = this.$n.showLoading(true); this.$SharePoint .getLists() .then(l => this.lists = l) .catch((e: string) => this.$n.show(e, true)) .finally(() => this.$n.remove(loading)); - ; - } } angular.module("app").controller("appcontroller", appcontroller); } - - namespace App { "use strict"; export interface SharePoint { - getLists: () => ng.IPromise; + getLists(): ng.IPromise; } class SharePointServcie implements SharePoint { @@ -2484,18 +2369,18 @@ namespace App { } getLists() { - var promise = this.$q.defer(); + const promise = this.$q.defer(); SP.SOD.executeFunc("sp.js", "SP.ClientContext", () => { - var ctx = SP.ClientContext.get_current(); - var hostUrl = decodeURIComponent(SP.ScriptHelpers.getDocumentQueryPairs()['SPHostUrl']); - var appCtx = new SP.AppContextSite(ctx, hostUrl); - var hostWeb = appCtx.get_web(); - var lists = hostWeb.get_lists(); + const ctx = SP.ClientContext.get_current(); + const hostUrl = decodeURIComponent(SP.ScriptHelpers.getDocumentQueryPairs()['SPHostUrl']); + const appCtx = new SP.AppContextSite(ctx, hostUrl); + const hostWeb = appCtx.get_web(); + const lists = hostWeb.get_lists(); ctx.load(lists); ctx.executeQueryAsync(() => { - var result: SP.List[] = []; - for (var e = lists.getEnumerator(); e.moveNext(); /* nothing */) { + const result: SP.List[] = []; + for (const e = lists.getEnumerator(); e.moveNext(); /* nothing */) { result.push(e.get_current()); } promise.resolve(result); @@ -2509,7 +2394,6 @@ namespace App { angular.module("app").service("$SharePoint", SharePointServcie); } - // Install the angularjs.TypeScript.DefinitelyTyped NuGet package namespace App { "use strict"; @@ -2523,7 +2407,6 @@ namespace App { class NotifyImpl implements SpNotify { static $inject: string[] = []; - showLoading(sticky: boolean = false) { return SP.UI.Notify.showLoadingNotification(sticky); } @@ -2539,4 +2422,3 @@ namespace App { angular.module("app").service("$spnotify", NotifyImpl); } - diff --git a/types/sharepoint/tslint.json b/types/sharepoint/tslint.json index e4f5db4fa0..e094a35492 100644 --- a/types/sharepoint/tslint.json +++ b/types/sharepoint/tslint.json @@ -1,6 +1,7 @@ { "extends": "../tslint.json", "rules": { + "jsdoc-format": false, "max-line-length": false } } diff --git a/types/sharp/sharp-tests.ts b/types/sharp/sharp-tests.ts index 2ca348620a..86d01066dc 100644 --- a/types/sharp/sharp-tests.ts +++ b/types/sharp/sharp-tests.ts @@ -47,7 +47,7 @@ sharp('input.jpg') // containing a scaled and cropped version of input.jpg }); -var transformer = sharp() +let transformer = sharp() .resize(300) .on('info', (info: sharp.OutputInfo) => { console.log('Image height is ' + info.height); diff --git a/types/sheetify/index.d.ts b/types/sheetify/index.d.ts index d6711c5bd9..5fd3ac2df6 100644 --- a/types/sheetify/index.d.ts +++ b/types/sheetify/index.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace sheetify { - export function getPrefix(css: string): string; + function getPrefix(css: string): string; } declare function sheetify(src: string | TemplateStringsArray, filename?: string, options?: {[prop: string]: any}, done?: (err: Error, css: string, prefix: string) => void): string; diff --git a/types/sheetify/sheetify-tests.ts b/types/sheetify/sheetify-tests.ts index 931e05b579..31b35c220d 100644 --- a/types/sheetify/sheetify-tests.ts +++ b/types/sheetify/sheetify-tests.ts @@ -17,4 +17,4 @@ const test8 = sheetify` } `; -const prefix = sheetify.getPrefix('boop'); \ No newline at end of file +const prefix = sheetify.getPrefix('boop'); diff --git a/types/simple-peer/index.d.ts b/types/simple-peer/index.d.ts index 86c7f08bfb..e03e5b3372 100644 --- a/types/simple-peer/index.d.ts +++ b/types/simple-peer/index.d.ts @@ -10,7 +10,7 @@ import * as stream from 'stream'; declare const SimplePeer: SimplePeer.SimplePeer; declare namespace SimplePeer { - export interface Options { + interface Options { initiator?: boolean; // set to true if this is the initiating peer channelConfig?: {}; // custom webrtc data channel configuration (used by createDataChannel) channelName?: string; // custom webrtc data channel name @@ -19,14 +19,14 @@ declare namespace SimplePeer { offerConstraints?: {}; // custom offer constraints (used by createOffer method) answerConstraints?: {}; // custom answer constraints (used by createAnswer method) reconnectTimer?: boolean | number; // wait __ milliseconds after ICE 'disconnect' for reconnect attempt before emitting 'close' - sdpTransform?: (sdp: T) => T; // function to transform the generated SDP signaling data (for advanced users) + sdpTransform?(sdp: T): T; // function to transform the generated SDP signaling data (for advanced users) stream?: boolean; // if video/voice is desired, pass stream returned from getUserMedia trickle?: boolean; // set to false to disable trickle ICE and get a single 'signal' event (slower) wrtc?: {}; // RTCPeerConnection/RTCSessionDescription/RTCIceCandidate } // https://github.com/feross/simple-peer/tree/v6.1.5#peer--new-simplepeeropts - export interface SimplePeer { + interface SimplePeer { new (opts?: Options): Instance; (opts?: Options): Instance; @@ -34,17 +34,16 @@ declare namespace SimplePeer { readonly WEBRTC_SUPPORT: boolean; } - export type TypedArray = Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array; + type TypedArray = Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array; - export type SimplePeerData = string | Buffer | TypedArray | ArrayBuffer | Blob; + type SimplePeerData = string | Buffer | TypedArray | ArrayBuffer | Blob; - export interface SignalData { + interface SignalData { sdp?: any; candidate?: any; } - export interface Instance extends stream.Duplex { - + interface Instance extends stream.Duplex { // https://github.com/feross/simple-peer/tree/v6.1.5#peersignaldata signal(data: string | SignalData): void; diff --git a/types/sinon/index.d.ts b/types/sinon/index.d.ts index e4ba1ad612..0dd6d29fce 100644 --- a/types/sinon/index.d.ts +++ b/types/sinon/index.d.ts @@ -1,6 +1,6 @@ -// Type definitions for Sinon 1.16.0 +// Type definitions for Sinon 2.1.0 // Project: http://sinonjs.org/ -// Definitions by: William Sears +// Definitions by: William Sears , Jonathan Little // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // sinon uses DOM dependencies which are absent in browserless envoronment like node.js @@ -96,11 +96,16 @@ declare namespace Sinon { interface SinonStub extends SinonSpy { resetBehavior(): void; + resetHistory(): void; returns(obj: any): SinonStub; returnsArg(index: number): SinonStub; returnsThis(): SinonStub; + resolves(value: any): SinonStub; throws(type?: string): SinonStub; throws(obj: any): SinonStub; + rejects(): SinonStub; + rejects(errorType: string): SinonStub; + rejects(value: any): SinonStub; callsArg(index: number): SinonStub; callThrough(): SinonStub; callsArgOn(index: number, context: any): SinonStub; @@ -369,6 +374,7 @@ declare namespace Sinon { array: SinonMatcher; regexp: SinonMatcher; date: SinonMatcher; + symbol: SinonMatcher; same(obj: any): SinonMatcher; typeOf(type: string): SinonMatcher; instanceOf(type: any): SinonMatcher; @@ -421,17 +427,10 @@ declare namespace Sinon { (...args: any[]): any; } - interface SinonStatic { - config: SinonTestConfig; - test(fn: (...args: any[]) => any): SinonTestWrapper; - testCase(tests: any): any; - } - // Utility overridables interface SinonStatic { createStubInstance(constructor: any): any; format(obj: any): string; - log(message: string): void; restore(object: any): void; } } diff --git a/types/sinon/sinon-tests.ts b/types/sinon/sinon-tests.ts index 9a35166324..afd20c2e18 100644 --- a/types/sinon/sinon-tests.ts +++ b/types/sinon/sinon-tests.ts @@ -100,6 +100,23 @@ function testSandbox() { sandbox.restore(); } +function testPromises() { + var resolveStub = sinon.stub().resolves(10); + var rejectStub1 = sinon.stub().rejects(); + var rejectsStub2 = sinon.stub().rejects(new Error('Specified error')); + var rejectsStub2 = sinon.stub().rejects("TypeError"); +} + +function testSymbolMatch() { + var stub = sinon.stub(); + stub(Symbol('TestSymbol')); + stub.calledWithMatch(sinon.match.symbol); +} + +function testResetHistory() { + sinon.stub().resetHistory(); +} + testOne(); testTwo(); testThree(); @@ -109,6 +126,9 @@ testSix(); testSeven(); testEight(); testNine(); +testPromises(); +testSymbolMatch(); +testResetHistory(); var clock = sinon.useFakeTimers(); clock.setSystemTime(1000); diff --git a/types/sip.js/index.d.ts b/types/sip.js/index.d.ts index d4e6bcebf1..4cb973ad10 100644 --- a/types/sip.js/index.d.ts +++ b/types/sip.js/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Kir Dergachev // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -declare interface SIP { +interface SIP { UA: { new (configuration?: sipjs.ConfigurationParameters): sipjs.UA; }; @@ -18,7 +18,6 @@ declare interface SIP { } declare namespace sipjs { - interface URI { scheme?: string; user?: string; @@ -164,7 +163,6 @@ declare namespace sipjs { } namespace WebRTC { - interface Options { stunServers?: string | string[]; turnServers?: TurnServer | TurnServer[]; @@ -211,7 +209,7 @@ declare namespace sipjs { log?: { builtinEnabled?: boolean; level?: number | string; - connector?: (level: string, category: string, label: string, content: string) => void; + connector?(level: string, category: string, label: string, content: string): void; }; mediaHandlerFactory?: WebRTC.MediaHandlerFactory; noAnswerTimeout?: number; diff --git a/types/sip.js/sip.js-tests.ts b/types/sip.js/sip.js-tests.ts index b817b8e2c8..23b2578194 100644 --- a/types/sip.js/sip.js-tests.ts +++ b/types/sip.js/sip.js-tests.ts @@ -88,12 +88,8 @@ ua.on('registered', () => { }); ua.on('unregistered', (args: sipjs.UA.EventArgs.UnregisteredArgs) => { }); ua.on('registrationFailed', (args: sipjs.UA.EventArgs.RegistrationFailedArgs) => { }); ua.on('invite', (session: sipjs.Session) => { - session.on('progress', (response) => { - }); - session.on('accepted', (response) => { - }); - session.on('rejected', (response) => { - }); - + session.on('progress', (response) => {}); + session.on('accepted', (response) => {}); + session.on('rejected', (response) => {}); }); ua.on('message', (message: sipjs.Message) => { }); diff --git a/types/sitemap2/index.d.ts b/types/sitemap2/index.d.ts index 75108ff603..42af7e5c02 100644 --- a/types/sitemap2/index.d.ts +++ b/types/sitemap2/index.d.ts @@ -7,10 +7,10 @@ declare var sitemap2: Sitemap; export = sitemap2; -declare interface Sitemap { +interface Sitemap { new (conf?: SitemapConfig): Sitemap; - addUrl(urlData: UrlData | UrlData[] | string | string[]): this + addUrl(urlData: UrlData | UrlData[] | string | string[]): this; addSitemap(sm: Sitemap): this; toXML(): SitemapXml[]; @@ -21,7 +21,7 @@ declare interface Sitemap { childrens: Sitemap[]; } -declare interface SitemapConfig { +interface SitemapConfig { hostName?: string; fileName?: string; limit?: number; @@ -31,7 +31,7 @@ declare interface SitemapConfig { childrens?: Sitemap[]; } -declare interface UrlData { +interface UrlData { url: string; chengefreq?: string; priority?: number | string; @@ -43,10 +43,10 @@ declare interface UrlData { description: string; thumbnail_loc: string; content_loc: string; - } + }; } -declare interface SitemapXml { +interface SitemapXml { fileName: string; xml: string; } diff --git a/types/sitemap2/sitemap2-tests.ts b/types/sitemap2/sitemap2-tests.ts index 235cbb93a4..60a8a7fe75 100644 --- a/types/sitemap2/sitemap2-tests.ts +++ b/types/sitemap2/sitemap2-tests.ts @@ -1,6 +1,6 @@ import Sitemap = require('sitemap2'); -let sitemap = new Sitemap({ +const sitemap = new Sitemap({ hostName: ('https://example.com/'), fileName: 'sitemap.xml', limit: 50000, @@ -43,9 +43,9 @@ sitemap.addUrl([ } ]); -let sitemap2 = new Sitemap(); +const sitemap2 = new Sitemap(); sitemap.addSitemap(sitemap2); const xmlList = sitemap.toXML(); -var str = xmlList[0].fileName; -var str = xmlList[0].xml; +let str = xmlList[0].fileName; +str = xmlList[0].xml; diff --git a/types/sitemap2/tslint.json b/types/sitemap2/tslint.json index 2221e40e4a..3c4a3237e8 100644 --- a/types/sitemap2/tslint.json +++ b/types/sitemap2/tslint.json @@ -1 +1,6 @@ -{ "extends": "../tslint.json" } \ No newline at end of file +{ + "extends": "../tslint.json", + "rules": { + "no-misused-new": false + } +} diff --git a/types/slimerjs/index.d.ts b/types/slimerjs/index.d.ts new file mode 100644 index 0000000000..784f814f57 --- /dev/null +++ b/types/slimerjs/index.d.ts @@ -0,0 +1,374 @@ +// Type definitions for SlimerJS 0.10 +// Project: https://docs.slimerjs.org/current/index.html#api-reference +// Definitions by: Alex Wall +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare var phantom: Phantom; +declare var slimer: Slimer; + +interface Slimer { + version: number; + geckoVersion: number; + + clearHttpAuth(): void; + isExiting(): boolean; + hasFeature(featureName: string): boolean; + exit(returnValue?: number): void; + wait(milliseconds: number): void; +} + +interface Phantom { + // Properties + args: string[]; // DEPRECATED + cookies: Cookie[]; + cookiesEnabled: boolean; + libraryPath: string; + scriptName: string; // DEPRECATED + version: { + major: number; + minor: number; + patch: number; + }; + + // Functions + addCookie(cookie: Cookie): boolean; + clearCookies(): void; + deleteCookie(cookieName: string): boolean; + exit(returnValue?: any): boolean; + injectJs(filename: string): boolean; + + // Callbacks + onError(msg: string, trace: string[]): any; +} + +interface Std { + read(): any; + write(arg: any): void; +} + +interface SystemModule { + pid: number; + platform: string; + os: { + architecture: string; + name: string; + version: string; + }; + env: { [name: string]: string; }; + args: string[]; + standarderr: Std; + standardin: Std; + standardout: Std; + stdout: Std; + stderr: Std; + stdin: Std; +} + +interface HttpConf { + operation: string; + data: any; + headers: any; +} + +interface WebPage { + // Properties + canGoBack: boolean; + canGoForward: boolean; + clipRect: ClipRect; + content: string; + cookies: Cookie[]; + customHeaders: { [name: string]: string; }; + event: any; // :TODO: elaborate this when documentation improves + focusedFrameName: string; + frameContent: string; + frameName: string; + framePlainText: string; + frameTitle: string; + frameUrl: string; + framesCount: number; + framesName: any; // :TODO: elaborate this when documentation improves + libraryPath: string; + navigationLocked: boolean; + offlineStoragePath: string; + offlineStorageQuota: number; + ownsPages: boolean; + pages: WebPage[]; + pagesWindowName: string; + paperSize: PaperSize; + plainText: string; + scrollPosition: TopLeft; + settings: WebPageSettings; + title: string; + url: string; + viewportSize: Size; + windowName: string; + zoomFactor: number; + captureContent: RegExp[]; // slimerjs only + + // Functions + addCookie(cookie: Cookie): boolean; + childFramesCount(): number; // DEPRECATED + childFramesName(): string; // DEPRECATED + clearCookies(): void; + close(): Promise; + close(): void; + currentFrameName(): string; // DEPRECATED + deleteCookie(cookieName: string): boolean; + // evaluate(callback: () => R): Promise; + // evaluate(callback: (arg: T) => R, arg: T): Promise; + // evaluate(callback: (arg1: T1, arg2: T2) => R, arg1: T1, arg2: T2): Promise; + // evaluate(callback: (arg1: T1, arg2: T2, arg3: T3) => R, arg1: T1, arg2: T2, arg3: T3): Promise; + // evaluate(callback: (...args: any[]) => R, ...args: any[]): Promise; + evaluate(callback: () => R, ...args: any[]): R; + evaluateAsync(fn: () => void): void; + evaluateJavaScript(str: string): any; // :TODO: elaborate this when documentation improves + getPage(windowName: string): WebPage; + go(index: number): void; + goBack(): void; + goForward(): void; + includeJs(url: string): Promise; + includeJs(url: string, callback: () => void): void; + injectJs(filename: string): Promise; + injectJs(filename: string): boolean; + // open(url: string): Promise; + open(url: string, callback?: (status: string) => any): Promise; + open(url: string, method: string, callback: (status: string) => any): Promise; // maybe data is missing + open(url: string, method: string, data: any, callback?: (status: string) => any): Promise; + open(url: string, method: string, data: any, headers: any, callback: (status: string) => any): Promise; + openUrl(url: string, httpConf: HttpConf, settings: any): Promise; // :TODO: elaborate this when documentation improves + release(): void; // DEPRECATED + reload(): void; + // render(filename: string): Promise; + render(filename: string): void; + render(filename: string, options?: { format?: string; quality?: string; ratio?: number; onlyViewport?: boolean }): Promise; + renderBase64(type: string): Promise; + renderBase64(format: string): string; + sendEvent(mouseEventType: string, mouseX?: number, mouseY?: number, button?: string): Promise; + sendEvent(keyboardEventType: string, key: string, null1?: null, null2?: null, modifier?: number): Promise; + sendEvent(mouseEventType: string, mouseX?: number, mouseY?: number, button?: string): void; + sendEvent(keyboardEventType: string, keyOrKeys: any, aNull?: any, bNull?: any, modifier?: number): void; + setContent(html: string, url: string): Promise; + setContent(content: string, url: string): void; + stop(): void; + switchToFocusedFrame(): void; + switchToFrame(framePosOrName: number | string): void; + // switchToFrame(framePosition: number): void; + switchToChildFrame(framePosOrName: number | string): void; + // switchToChildFrame(framePosition: number): void; + switchToMainFrame(): void; // DEPRECATED + switchToParentFrame(): void; // DEPRECATED + uploadFile(selector: string, filename: string): void; + + // Callbacks + onAlert(msg: string): any; + onCallback(): void; // EXPERIMENTAL + onClosing(closingPage: WebPage): any; + onConfirm(msg: string): boolean; + onConsoleMessage(msg: string, lineNum?: number, sourceId?: string): any; + onError(msg: string, trace: string[]): any; + onFilePicker(oldFile: string): string; + onInitialized(): any; + onLoadFinished(status: string): any; + onLoadStarted(): any; + onNavigationRequested(url: string, type: string, willNavigate: boolean, main: boolean): any; + onPageCreated(newPage: WebPage): any; + onPrompt(msg: string, defaultVal: string): string; + onResourceError(resourceError: ResourceError): any; + onResourceReceived(response: ResourceResponse): any; + onResourceRequested(requestData: ResourceRequest, networkRequest: NetworkRequest): any; + onUrlChanged(targetUrl: string): any; + + // Callback triggers + closing(closingPage: WebPage): void; + initialized(): void; + javaScriptAlertSent(msg: string): void; + javaScriptConsoleMessageSent(msg: string, lineNum?: number, sourceId?: string): void; + loadFinished(status: string): void; + loadStarted(): void; + navigationRequested(url: string, type: string, willNavigate: boolean, main: boolean): void; + rawPageCreated(newPage: WebPage): void; + resourceReceived(response: ResourceResponse): void; + resourceRequested(requestData: ResourceRequest, networkRequest: NetworkRequest): void; + urlChanged(targetUrl: string): void; +} + +interface ResourceError { + id: number; + url: string; + errorCode: string; + errorString: string; +} + +interface HttpVersion { + major: number; + minor: number; +} + +interface ResourceResponse { + id: number; + url: string; + time: Date; + headers: { [name: string]: string; }; + bodySize: number; + contentType?: string; + redirectURL?: string; + stage: string; + status: number; + statusText: string; + contentCharset: string; + referrer: string; + isFileDownloading: boolean; + body: any; + httpVersion: HttpVersion; +} + +interface ResourceRequest { + id: number; + method: string; + url: string; + time: Date; + headers: { [name: string]: string; }; +} + +interface NetworkRequest { + abort(): void; + changeUrl(url: string): void; + setHeader(name: string, value: string): void; +} + +interface PaperSize { + width?: string; + height?: string; + border: string; + format?: string; + orientation?: string; + margin?: any; // string | { top?: string; left?: string; bottom?: string; right?: string; } +} + +interface WebPageSettings { + javascriptEnabled: boolean; + loadImages: boolean; + localToRemoteUrlAccessEnabled: boolean; + userAgent: string; + userName: string; + password: string; + XSSAuditingEnabled: boolean; + webSecurityEnabled: boolean; + resourceTimeout: number; +} + +interface FileSystem { + // Properties + separator: string; + workingDirectory: string; + + // Functions + + // Query Functions + list(path: string): string[]; + absolute(path: string): string; + exists(path: string): boolean; + isDirectory(path: string): boolean; + isFile(path: string): boolean; + isAbsolute(path: string): boolean; + isExecutable(path: string): boolean; + isReadable(path: string): boolean; + isWritable(path: string): boolean; + isLink(path: string): boolean; + readLink(path: string): string; + + // Directory Functions + changeWorkingDirectory(path: string): void; + makeDirectory(path: string): void; + makeTree(path: string): void; + removeDirectory(path: string): void; + removeTree(path: string): void; + copyTree(source: string, destination: string): void; + + // File Functions + // open(path: string, mode: string): IStream; + // open(path: string, options: { mode: string; charset?: string; }): IStream; + open(path: string, mode: string | { mode: string; charset?: string; }): Stream; + read(path: string): string; + write(path: string, content: string, mode: string): void; + size(path: string): number; + remove(path: string): void; + copy(source: string, destination: string): void; + move(source: string, destination: string): void; + touch(path: string): void; +} + +interface Stream { + atEnd(): boolean; + close(): void; + flush(): void; + read(): string; + readLine(): string; + seek(position: number): void; + write(data: string): void; + writeLine(data: string): void; +} + +interface WebServerModule { + registerDirectory(urlpath: string, directoryPath: string): void; + registerFile(urlpath: string, filePath: string): void; + registerPathHandler(urlpath: string, handlerCallback: (request: WebServerRequest, response: WebServerResponse) => void): void; + port: number; + listen(port: number | string, cb?: (request: WebServerRequest, response: WebServerResponse) => void): boolean; + // listen(ipAddressPort: string, cb?: (request: IWebServerRequest, response: IWebServerResponse) => void): boolean; + close(): void; +} + +interface WebServerRequest { + method: string; + url: string; + httpVersion: number; + headers: { [name: string]: string; }; + post: string; + postRaw: string; +} + +interface WebServerResponse { + headers: { [name: string]: string; }; + setHeader(name: string, value: string): void; + header(name: string): string; + statusCode: number; + setEncoding(encoding: string): void; + write(data: string): void; + writeHead(statusCode: number, headers?: { [name: string]: string; }): void; + close(): void; + closeGracefully(): void; +} + +interface TopLeft { + top: number; + left: number; +} + +interface Size { + width: number; + height: number; +} + +interface ClipRect extends TopLeft, Size { +} + +interface Cookie { + name: string; + value: string; + domain?: string; + path: string; + httponly?: boolean; + secure?: boolean; + expires?: string; + expiry: number; +} + +interface WebPageModule { + create(): WebPage; + exit(returnValue?: number): void; +} + +declare function require(module: "webpage"): WebPageModule; +declare function require(module: "webserver"): WebServerModule; +declare function require(module: "system"): SystemModule; diff --git a/types/slimerjs/slimerjs-tests.ts b/types/slimerjs/slimerjs-tests.ts new file mode 100644 index 0000000000..da40531769 --- /dev/null +++ b/types/slimerjs/slimerjs-tests.ts @@ -0,0 +1,70 @@ +const webpageMod = require('webpage'); // tslint:disable-line no-var-requires +const webserverMod = require('webserver'); // tslint:disable-line no-var-requires + +let page = webpageMod.create(); +let vUrl = 'https://www.w3c.org'; + +function testWebserver() { + webserverMod.close(); + webserverMod.listen(1234); + webserverMod.registerFile("urlPath", "filePath"); + webserverMod.registerDirectory("urlPath", "dirPath"); +} + +let vUserAgent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/602.4.8 (KHTML, like Gecko) Version/10.0.3 Safari/602.4.8'; +page.settings.userAgent = vUserAgent; + +page.onConsoleMessage = (vMsg) => { +}; + +page.onAlert = (vMsg) => { +}; + +page.onLoadStarted = () => { +}; + +page.captureContent = [/json/]; + +page.onResourceReceived = (oResponse) => { + oResponse.id; + oResponse.bodySize; + oResponse.body; + oResponse.contentType; + oResponse.headers; +}; + +page.onResourceRequested = (oRequestData, oNetworkRequest) => { + oRequestData.headers; + oRequestData.id; + oRequestData.method; + oRequestData.time; + oRequestData.url; +}; + +page.onLoadFinished = (vStatus) => { + phantom.exit(); +}; + +page.onInitialized = () => { +}; + +page.onPageCreated = (oPage) => { + let oCookie: Cookie; + oPage.addCookie(oCookie); +}; + +page.open(vUrl) // loads a page + .then(() => { // executed after loading + page.viewportSize = { width: 414, height: 736 }; + + let vFilename = `../data/page01.png`; + page.render(vFilename, {onlyViewport: true}); + + // then open a second page + return page.open('http://'); + }) + .then(() => { + // click somewhere on the second page + page.sendEvent("click", 5, 5, 'left', 0); + slimer.exit(); + }); diff --git a/types/slimerjs/tsconfig.json b/types/slimerjs/tsconfig.json new file mode 100644 index 0000000000..d108eae45c --- /dev/null +++ b/types/slimerjs/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "./" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "slimerjs-tests.ts" + ] +} diff --git a/types/slimerjs/tslint.json b/types/slimerjs/tslint.json new file mode 100644 index 0000000000..377cc837d4 --- /dev/null +++ b/types/slimerjs/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } diff --git a/types/speakingurl/index.d.ts b/types/speakingurl/index.d.ts index 83e38fd7b8..67c9678c9e 100644 --- a/types/speakingurl/index.d.ts +++ b/types/speakingurl/index.d.ts @@ -23,7 +23,7 @@ interface SpeakingURLOptions { declare function getSlug(input: string, options?: SpeakingURLOptions|string): string; declare namespace getSlug { - export function createSlug(options: SpeakingURLOptions): (input: string) => string; + function createSlug(options: SpeakingURLOptions): (input: string) => string; } export = getSlug; diff --git a/types/speakingurl/speakingurl-tests.ts b/types/speakingurl/speakingurl-tests.ts index 76dd9f1a8d..413ad024d8 100644 --- a/types/speakingurl/speakingurl-tests.ts +++ b/types/speakingurl/speakingurl-tests.ts @@ -91,4 +91,4 @@ const options = { }; const mySlug = getSlug.createSlug(options); -slug = mySlug('welcome to the jungle'); \ No newline at end of file +slug = mySlug('welcome to the jungle'); diff --git a/types/sqlite3/index.d.ts b/types/sqlite3/index.d.ts index 19828e2b3f..6e5ab5a322 100644 --- a/types/sqlite3/index.d.ts +++ b/types/sqlite3/index.d.ts @@ -5,14 +5,13 @@ /// - import events = require("events"); -export declare var OPEN_READONLY: number; -export declare var OPEN_READWRITE: number; -export declare var OPEN_CREATE: number; +export const OPEN_READONLY: number; +export const OPEN_READWRITE: number; +export const OPEN_CREATE: number; -export declare var cached: { +export const cached: { Database(filename: string, callback?: (err: Error) => void): Database; Database(filename: string, mode?: number, callback?: (err: Error) => void): Database; }; @@ -22,7 +21,7 @@ export interface RunResult { changes: number; } -export declare class Statement { +export class Statement { bind(callback?: (err: Error) => void): Statement; bind(...params: any[]): Statement; @@ -47,7 +46,7 @@ export declare class Statement { each(...params: any[]): Statement; } -export declare class Database extends events.EventEmitter { +export class Database extends events.EventEmitter { constructor(filename: string, callback?: (err: Error) => void); constructor(filename: string, mode?: number, callback?: (err: Error) => void); @@ -85,4 +84,4 @@ export declare class Database extends events.EventEmitter { on(event: string, listener: (...args: any[]) => void): this; } -declare function verbose(): void; +export function verbose(): void; diff --git a/types/sqlite3/sqlite3-tests.ts b/types/sqlite3/sqlite3-tests.ts index 75a8c2e72c..57cd516bcb 100644 --- a/types/sqlite3/sqlite3-tests.ts +++ b/types/sqlite3/sqlite3-tests.ts @@ -1,8 +1,7 @@ - import sqlite3 = require('sqlite3'); sqlite3.verbose(); -var db: sqlite3.Database = new sqlite3.Database('chain.sqlite3', () => {}); +let db: sqlite3.Database = new sqlite3.Database('chain.sqlite3', () => {}); function createDb() { console.log("createDb chain"); @@ -16,9 +15,9 @@ function createTable() { function insertRows() { console.log("insertRows Ipsum i"); - var stmt = db.prepare("INSERT INTO lorem VALUES (?)"); + const stmt = db.prepare("INSERT INTO lorem VALUES (?)"); - for (var i = 0; i < 10; i++) { + for (let i = 0; i < 10; i++) { stmt.run("Ipsum " + i); } @@ -56,8 +55,8 @@ runChainExample(); db.serialize(() => { db.run("CREATE TABLE lorem (info TEXT)"); - var stmt = db.prepare("INSERT INTO lorem VALUES (?)"); - for (var i = 0; i < 10; i++) { + const stmt = db.prepare("INSERT INTO lorem VALUES (?)"); + for (let i = 0; i < 10; i++) { stmt.run("Ipsum " + i); } stmt.finalize(); diff --git a/types/sshpk/index.d.ts b/types/sshpk/index.d.ts index 0bc2274120..6089dd930b 100644 --- a/types/sshpk/index.d.ts +++ b/types/sshpk/index.d.ts @@ -5,19 +5,16 @@ /// -declare class SshPK { -} +declare class SshPK {} declare namespace SshPK { - - export class Algo { + class Algo { parts: string[]; sizePart?: string; normalize?: boolean; } - - export class algInfo { + class algInfo { dsa: Algo; rsa: Algo; ecdsa: Algo; @@ -25,7 +22,7 @@ declare namespace SshPK { curve25519: Algo; } - export class algPrivInfo { + class algPrivInfo { dsa: Algo; rsa: Algo; ecdsa: Algo; @@ -33,7 +30,7 @@ declare namespace SshPK { curve25519: Algo; } - export class hashAlgs { + class hashAlgs { md5: boolean; sha1: boolean; sha256: boolean; @@ -41,7 +38,7 @@ declare namespace SshPK { sha512: boolean; } - export class Curve { + class Curve { size: number; pkcs8oid: string; p: Buffer; @@ -52,21 +49,20 @@ declare namespace SshPK { G: Buffer; } - export class curves { + class curves { nistp256: Curve; nistp384: Curve; nistp512: Curve; } - export class algs { + class algs { info: algInfo; privInfo: algPrivInfo; hashAlgs: hashAlgs; curves: curves; } - - export class Certificate { + class Certificate { subjects: Identity[]; issuer: string; subjectKey: string; @@ -101,12 +97,9 @@ declare namespace SshPK { static parse(data: string|Buffer, format: string, options: any): Certificate; static isCertificate(data: string|Buffer, ver: string): boolean; - } - - export class DiffieHellman { - + class DiffieHellman { constructor(key: Key); getPublicKey(): Key; @@ -121,24 +114,23 @@ declare namespace SshPK { generateKeys(): PrivateKey; } - export class X9ECParameters { + class X9ECParameters { G: any; g: any; n: any; h: any; } - export class ECPublic { + class ECPublic { constructor(params: X9ECParameters, buffer: Buffer); } - export class ECPrivate { + class ECPrivate { constructor(params: X9ECParameters, buffer: Buffer); deriveSharedSecret(pk: Key): Buffer; } - - export class Verifier { + class Verifier { constructor(key: Key, hashAlgo: string); update(chunk: string|Buffer): void; @@ -146,53 +138,50 @@ declare namespace SshPK { verify(signature: string): boolean; } - export class Signer { - + class Signer { constructor(key: Key, hashAlgo: string); update(chunk: string|Buffer): void; sign(): Signature; } - - export class FingerprintFormatError implements Error { + class FingerprintFormatError implements Error { name: string; message: string; constructor(fp: Fingerprint, format: string); } - export class InvalidAlgorithmError implements Error { + class InvalidAlgorithmError implements Error { name: string; message: string; constructor(algo: string); } - export class KeyParseError implements Error { + class KeyParseError implements Error { name: string; message: string; constructor(name: string, format: string, innerErr: any); } - export class SignatureParseError implements Error { + class SignatureParseError implements Error { name: string; message: string; constructor(type: string, format: string, innerErr: any); } - export class CertificateParseError implements Error { + class CertificateParseError implements Error { name: string; message: string; constructor(name: string, format: string, innerErr: any); } - export class KeyEncryptedError implements Error { + class KeyEncryptedError implements Error { name: string; message: string; constructor(name: string, format: string); } - - export class Fingerprint { + class Fingerprint { algorithm: string; hash: string; type: string; @@ -206,10 +195,9 @@ declare namespace SshPK { isFingerprint(obj: string|Buffer, ver: string): boolean; static parse(fp: string, options: any): Fingerprint; - } - export class Identity { + class Identity { cn: string; components: string[]; componentLookup: any; @@ -233,13 +221,12 @@ declare namespace SshPK { static isIdentity(dn: Buffer|string, ver: string): boolean; } - - export class Format { + class Format { read: (buf: Buffer, options?: any) => Buffer; write: (key: Key, options?: any) => Buffer; } - export class Formats { + class Formats { auto: Format; pem: Format; pkcs1: Format; @@ -250,11 +237,11 @@ declare namespace SshPK { openssh: Format; } - export class Verify { + class Verify { verify(data: string, fmt: string): boolean; } - export class Key { + class Key { type: string; parts: string; part: string; @@ -278,10 +265,9 @@ declare namespace SshPK { static parse(data: string|Buffer, format: string, options: any): Key; static isKey(obj: string|Buffer, ver: string): boolean; - } - export class PrivateKey { + class PrivateKey { constructor(opts: any); static formats: Formats; toBuffer(format: string, options: any): Buffer; @@ -293,11 +279,9 @@ declare namespace SshPK { static parse(data: string|Buffer, format: string, options: any): PrivateKey; static isPrivateKey(data: string|Buffer, ver: string): boolean; - } - - export class Signature { + class Signature { constructor(opts: any); toBuffer(format: string): Buffer; toString(format: string): string; @@ -305,14 +289,13 @@ declare namespace SshPK { static parse(data: string|Buffer, type: string, format: string): Signature; static isSignature(obj: string|Buffer, ver: string): boolean; - } - export class SSHPart { + class SSHPart { data: Buffer; } - export class SSHBuffer { + class SSHBuffer { constructor(opts: any); toBuffer(): Buffer; atEnd(): boolean; @@ -333,47 +316,44 @@ declare namespace SshPK { writeChar(buf: string): void; writePart(buf: SSHPart): void; write(buf: Buffer): void; - } - - export function bufferSplit(buf: Buffer, chr: string): Buffer[]; - export function addRSAMissing(key: PrivateKey): void; - export function calculateDSAPublic(g: Buffer, p: Buffer, x: Buffer): Buffer; - export function mpNormalize(buf: Buffer): Buffer; - export function ecNormalize(buf: Buffer, addZero: boolean): Buffer; - export function countZeros(buf: Buffer): number; - export function assertCompatible(obj: any, klass: any, needVer: string, name: string): void; - export function isCompatible(obj: any, klass: any, needVer: string): boolean; - export class OpenSllKeyDeriv { + function bufferSplit(buf: Buffer, chr: string): Buffer[]; + function addRSAMissing(key: PrivateKey): void; + function calculateDSAPublic(g: Buffer, p: Buffer, x: Buffer): Buffer; + function mpNormalize(buf: Buffer): Buffer; + function ecNormalize(buf: Buffer, addZero: boolean): Buffer; + function countZeros(buf: Buffer): number; + function assertCompatible(obj: any, klass: any, needVer: string, name: string): void; + function isCompatible(obj: any, klass: any, needVer: string): boolean; + class OpenSllKeyDeriv { key: Buffer; iv: Buffer; } - export function opensslKeyDeriv(cipher: string, salt: string, passphrase: string, count: number): OpenSllKeyDeriv; + function opensslKeyDeriv(cipher: string, salt: string, passphrase: string, count: number): OpenSllKeyDeriv; - export class OpensshCipherInfo { + class OpensshCipherInfo { keySize: number; blockSize: number; opensslName: string; } - export function opensshCipherInfo(cipber: string): OpensshCipherInfo; + function opensshCipherInfo(cipber: string): OpensshCipherInfo; - export function parseKey(data: string|Buffer, format: string, options?: any): Key; - export function parseFingerprint(fp: string, options?: any): Fingerprint; - export function parseSignature(data: string|Buffer, type: string, format: string): Signature; - export function parsePrivateKey(data: string|Buffer, format: string, options?: any): PrivateKey; + function parseKey(data: string|Buffer, format: string, options?: any): Key; + function parseFingerprint(fp: string, options?: any): Fingerprint; + function parseSignature(data: string|Buffer, type: string, format: string): Signature; + function parsePrivateKey(data: string|Buffer, format: string, options?: any): PrivateKey; - export function parseCertificate(data: string|Buffer, format: string, options?: any): Certificate; - export function createSelfSignedCertificate(subjectOrSubjects: string, key: Key, options?: any): Certificate; - export function createCertificate( + function parseCertificate(data: string|Buffer, format: string, options?: any): Certificate; + function createSelfSignedCertificate(subjectOrSubjects: string, key: Key, options?: any): Certificate; + function createCertificate( subjectOrSubjects: string, key: Key, issuer: string, issuerKey: PrivateKey, options?: any): Certificate; - export function identityFromDN(dn: string): Identity; - export function identityForHost(hostname: string): Identity; - export function identityForUser(uid: string): Identity; - export function identityForEmail(email: string): Identity; - + function identityFromDN(dn: string): Identity; + function identityForHost(hostname: string): Identity; + function identityForUser(uid: string): Identity; + function identityForEmail(email: string): Identity; } export = SshPK; diff --git a/types/sshpk/sshpk-tests.ts b/types/sshpk/sshpk-tests.ts index 301534d908..9caf27160d 100644 --- a/types/sshpk/sshpk-tests.ts +++ b/types/sshpk/sshpk-tests.ts @@ -1,4 +1,3 @@ - import * as sshpk from 'sshpk'; const cert = sshpk.parseCertificate("", "pem"); diff --git a/types/stamplay-js-sdk/index.d.ts b/types/stamplay-js-sdk/index.d.ts index 81f20d8c95..ed029cc1bd 100644 --- a/types/stamplay-js-sdk/index.d.ts +++ b/types/stamplay-js-sdk/index.d.ts @@ -4,24 +4,24 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace Stamplay { - export function init(appId: string): void; - export function User(): StamplayObject; - export function Cobject(object: string): StamplayObject; + function init(appId: string): void; + function User(): StamplayObject; + function Cobject(object: string): StamplayObject; - export interface Model { + interface Model { signup({}): Promise; new(): Model; // This is suspicious, but tests show model instances being constructable... get(property: string): any; set(property: string, value: any): void; - unset(property: string) : void; - fetch(id: any) : Promise; + unset(property: string): void; + fetch(id: any): Promise; destroy(): Promise; save({}?): Promise; upVote(): Promise; } - export interface StamplayObject { + interface StamplayObject { Model: Model; - Collection : any; + Collection: any; } } diff --git a/types/stamplay-js-sdk/stamplay-js-sdk-tests.ts b/types/stamplay-js-sdk/stamplay-js-sdk-tests.ts index 9dddc1b242..bf12d5ad72 100644 --- a/types/stamplay-js-sdk/stamplay-js-sdk-tests.ts +++ b/types/stamplay-js-sdk/stamplay-js-sdk-tests.ts @@ -1,12 +1,11 @@ - Stamplay.init('sample'); -var userFn = Stamplay.User(); -var user = new userFn.Model; -var colTags = Stamplay.Cobject('tag'); -var tags = new colTags.Collection(); +const userFn = Stamplay.User(); +const user = new userFn.Model(); +const colTags = Stamplay.Cobject('tag'); +const tags = new colTags.Collection(); // Signing up -var registrationData = { +const registrationData = { email : 'user@provider.com', password: 'mySecret' }; @@ -15,20 +14,19 @@ user.signup(registrationData).then(() => { user.set('phoneNumber', '020 123 4567' ); return user.save(); }).then(() => { - var number = user.get('phoneNumber'); + const number = user.get('phoneNumber'); console.log(number); // number value is 020 123 4567 }); - // Action -var colFoo = Stamplay.Cobject('foo'); -var fooMod = new colFoo.Model(); +const colFoo = Stamplay.Cobject('foo'); +const fooMod = new colFoo.Model(); fooMod.fetch(5) .then(() => fooMod.upVote()) .then( () => { - //success callback + // success callback }, (err: any) => { - //error callback + // error callback } -) +); diff --git a/types/stamplay-js-sdk/tslint.json b/types/stamplay-js-sdk/tslint.json index 2221e40e4a..3c4a3237e8 100644 --- a/types/stamplay-js-sdk/tslint.json +++ b/types/stamplay-js-sdk/tslint.json @@ -1 +1,6 @@ -{ "extends": "../tslint.json" } \ No newline at end of file +{ + "extends": "../tslint.json", + "rules": { + "no-misused-new": false + } +} diff --git a/types/steed/index.d.ts b/types/steed/index.d.ts index 4865c8efa8..1b1febae8f 100644 --- a/types/steed/index.d.ts +++ b/types/steed/index.d.ts @@ -25,9 +25,9 @@ declare namespace steed { length(): number; kill(): void; concurrency: number; - drain: () => any; - empty: () => any; - saturated: () => any; + drain(): any; + empty(): any; + saturated(): any; } interface Steed { diff --git a/types/steed/steed-tests.ts b/types/steed/steed-tests.ts index dd89e4480b..708a443fa1 100644 --- a/types/steed/steed-tests.ts +++ b/types/steed/steed-tests.ts @@ -2,8 +2,8 @@ import steed = require('steed'); -declare var path: { - exists: (path: string, callback?: (error: Error, exists: boolean) => any) => void; +declare const path: { + exists(path: string, callback?: (error: Error, exists: boolean) => any): void; }; function funcStringCbErrBoolean(v: string, cb: (error: Error, res: boolean) => void) { } @@ -19,15 +19,15 @@ steed.series([ () => {} ]); -var data: any[] = []; +const data: any[] = []; function steedProcess(item: any, callback: (error: Error, result: any) => void) { } steed.map(data, steedProcess, (error, results) => { console.log(results); }); -var openFiles = ['file1', 'file2']; +const openFiles = ['file1', 'file2']; -var saveFile = (file: string, cb: (error: Error) => void) => {}; +const saveFile = (file: string, cb: (error: Error) => void) => {}; steed.each(openFiles, saveFile, (error: Error) => {}); steed.eachSeries(openFiles, saveFile, (error: Error) => {}); @@ -109,7 +109,6 @@ steed.parallel([ ], (error, results) => {}); - steed.parallel({ one(callback) { setTimeout(() => { @@ -144,7 +143,7 @@ function whileFn(callback: any) { } function whileTest() { return count < 5; } -var count = 0; +let count = 0; steed.waterfall([ (callback: any) => { @@ -158,13 +157,11 @@ steed.waterfall([ } ], (error, result) => {}); - -var q = steed.queue((task: any, callback: () => void) => { +const q = steed.queue((task: any, callback: () => void) => { console.log('hello ' + task.name); callback(); }, 2); - q.drain = () => { console.log('all items have been processed'); }; @@ -189,8 +186,8 @@ q.unshift([{ name: 'baz' }, { name: 'bay' }, { name: 'bax' }], (error: Error) => console.log('finished processing bar'); }); -var qLength: number = q.length(); -var qIsIdle: boolean = q.idle(); +const qLength: number = q.length(); +const qIsIdle: boolean = q.idle(); q.saturated = () => { console.log('queue is saturated.'); @@ -209,7 +206,7 @@ q.resume(); q.kill(); // tests for strongly typed tasks -var q2 = steed.queue((task: string, callback: () => void) => { +const q2 = steed.queue((task: string, callback: () => void) => { console.log('Task: ' + task); callback(); }, 1); @@ -251,38 +248,24 @@ steed.each({ a: 1, b: 2 }, (val: number, next: steed.ErrorCallback): void => { - setTimeout((): void => { - console.log(`steed.each: ${val}`); - next(); - }, 500); - }, (err?: Error): void => { - console.log("steed.each: done."); - }); steed.eachSeries({ a: 1, b: 2 }, (val: number, next: steed.ErrorCallback): void => { - setTimeout((): void => { - console.log(`steed.eachSeries: ${val}`); - next(); - }, 500); - }, (err?: Error): void => { - console.log("steed.eachSeries: done."); - }); // map @@ -292,19 +275,12 @@ steed.map({ b: 2, c: 3 }, (val: number, next: steed.SteedResultCallback): void => { - setTimeout((): void => { - console.log(`steed.map: ${val}`); - next(undefined as any, val.toString()); - }, 500); - }, (error: Error, results: string[]): void => { - console.log("steed.map: done with results", results); - }); steed.mapSeries({ @@ -312,17 +288,10 @@ steed.mapSeries({ b: 2, c: 3 }, (val: number, next: steed.SteedResultCallback): void => { - setTimeout((): void => { - console.log(`steed.mapSeries: ${val}`); - next(undefined as any, val.toString()); - }, 500); - }, (error: Error, results: string[]): void => { - console.log("steed.mapSeries: done with results", results); - }); diff --git a/types/steed/tslint.json b/types/steed/tslint.json index 0f47deabb4..3bfbe8c142 100644 --- a/types/steed/tslint.json +++ b/types/steed/tslint.json @@ -1,6 +1,6 @@ { "extends": "../tslint.json", "rules": { - "forbidden-types": false + "ban-types": false } } \ No newline at end of file diff --git a/types/stream-buffers/index.d.ts b/types/stream-buffers/index.d.ts index d3871b1efa..59cf0e1df1 100644 --- a/types/stream-buffers/index.d.ts +++ b/types/stream-buffers/index.d.ts @@ -11,11 +11,11 @@ export interface WritableStreamBufferOptions extends stream.WritableOptions { incrementAmount?: number; } -export declare class WritableStreamBuffer extends stream.Writable { +export class WritableStreamBuffer extends stream.Writable { constructor(options?: WritableStreamBufferOptions); size(): number; maxSize(): number; - getContents(length?: number): any; + getContents(length?: number): Buffer; getContentsAsString(encoding?: string, length?: number): string; } @@ -26,7 +26,7 @@ export interface ReadableStreamBufferOptions extends stream.ReadableOptions { incrementAmount?: number; } -export declare class ReadableStreamBuffer extends stream.Readable { +export class ReadableStreamBuffer extends stream.Readable { constructor(options?: ReadableStreamBufferOptions); put(data: string | Buffer, encoding?: string): void; stop(): void; @@ -34,7 +34,7 @@ export declare class ReadableStreamBuffer extends stream.Readable { maxSize(): number; } -export declare const DEFAULT_INITIAL_SIZE: number; -export declare const DEFAULT_INCREMENT_AMOUNT: number; -export declare const DEFAULT_FREQUENCY: number; -export declare const DEFAULT_CHUNK_SIZE: number; +export const DEFAULT_INITIAL_SIZE: number; +export const DEFAULT_INCREMENT_AMOUNT: number; +export const DEFAULT_FREQUENCY: number; +export const DEFAULT_CHUNK_SIZE: number; diff --git a/types/stream-buffers/stream-buffers-tests.ts b/types/stream-buffers/stream-buffers-tests.ts index 7bccc43f15..b50a1db286 100644 --- a/types/stream-buffers/stream-buffers-tests.ts +++ b/types/stream-buffers/stream-buffers-tests.ts @@ -3,15 +3,15 @@ import * as streamBuffers from 'stream-buffers'; // The following are examples from README.md // https://github.com/samcday/node-stream-buffer -var myWritableStreamBuffer = new streamBuffers.WritableStreamBuffer({ +const myWritableStreamBuffer = new streamBuffers.WritableStreamBuffer({ initialSize: (100 * 1024), // start at 100 kilobytes. incrementAmount: (10 * 1024) // grow by 10 kilobytes each time buffer overflows. }); -var a = streamBuffers.DEFAULT_INITIAL_SIZE; // (8 * 1024) -var b = streamBuffers.DEFAULT_INCREMENT_AMOUNT; // (8 * 1024) -var c = streamBuffers.DEFAULT_CHUNK_SIZE; // (1024) -var d = streamBuffers.DEFAULT_FREQUENCY; // (1) +const a = streamBuffers.DEFAULT_INITIAL_SIZE; // (8 * 1024) +const b = streamBuffers.DEFAULT_INCREMENT_AMOUNT; // (8 * 1024) +const c = streamBuffers.DEFAULT_CHUNK_SIZE; // (1024) +const d = streamBuffers.DEFAULT_FREQUENCY; // (1) const buffer = new Buffer('ASDF'); myWritableStreamBuffer.write('ASDF'); @@ -20,18 +20,18 @@ myWritableStreamBuffer.size(); myWritableStreamBuffer.maxSize(); // Gets all held data as a Buffer. -myWritableStreamBuffer.getContents(); +const contents: Buffer = myWritableStreamBuffer.getContents(); // Gets all held data as a utf8 string. -myWritableStreamBuffer.getContentsAsString('utf8'); +const stringContents: string = myWritableStreamBuffer.getContentsAsString('utf8'); // Gets first 5 bytes as a Buffer. -myWritableStreamBuffer.getContents(5); +const contents2: Buffer = myWritableStreamBuffer.getContents(5); // Gets first 5 bytes as a utf8 string. -myWritableStreamBuffer.getContentsAsString('utf8', 5); +const stringContents2: string = myWritableStreamBuffer.getContentsAsString('utf8', 5); -var myReadableStreamBuffer = new streamBuffers.ReadableStreamBuffer({ +const myReadableStreamBuffer = new streamBuffers.ReadableStreamBuffer({ frequency: 10, // in milliseconds. chunkSize: 2048 // in bytes. }); diff --git a/types/strip-bom/strip-bom-tests.ts b/types/strip-bom/strip-bom-tests.ts index 79aaa3daae..29e544db98 100644 --- a/types/strip-bom/strip-bom-tests.ts +++ b/types/strip-bom/strip-bom-tests.ts @@ -1,4 +1,4 @@ import stripBom = require('strip-bom'); stripBom('\uFEFFunicorn'); -// => 'unicorn' \ No newline at end of file +// => 'unicorn' diff --git a/types/strong-cluster-control/index.d.ts b/types/strong-cluster-control/index.d.ts index 5037aed03b..e0b3fb5c12 100644 --- a/types/strong-cluster-control/index.d.ts +++ b/types/strong-cluster-control/index.d.ts @@ -7,7 +7,7 @@ declare namespace StrongClusterControl { type pid = number; - export interface StartOptions { + interface StartOptions { size?: number; env?: {}; shutdownTimeout?: number; @@ -15,17 +15,17 @@ declare namespace StrongClusterControl { throttleDelay?: number; } - export interface ClusterMaster { + interface ClusterMaster { pid: number; setSize?: number; startTime: number; } - export interface ClusterWorker extends ClusterMaster { + interface ClusterWorker extends ClusterMaster { id: number; } - export interface ClusterStatus { + interface ClusterStatus { master: ClusterMaster; workers: ClusterWorker[]; } @@ -34,7 +34,7 @@ declare namespace StrongClusterControl { SHUTDOWN: "CLUSTER_CONTROL_shutdown"; } - export interface Control extends NodeJS.EventEmitter { + interface Control extends NodeJS.EventEmitter { readonly cmd: CMD; readonly CPUS: number; readonly options: StartOptions; diff --git a/types/stylelint/index.d.ts b/types/stylelint/index.d.ts index 2ec479d2e1..90778baef9 100644 --- a/types/stylelint/index.d.ts +++ b/types/stylelint/index.d.ts @@ -3,6 +3,10 @@ // Definitions by: Alan Agius // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +export type FormatterType = "json" | "string" | "verbose"; + +export type SyntaxType = "scss" | "less" | "sugarss"; + export interface LinterOptions { code?: string; codeFilename?: string; @@ -11,11 +15,11 @@ export interface LinterOptions { configFile?: string; configOverrides?: JSON; files?: string | string[]; - formatter?: "json" | "string" | "verbose"; + formatter?: FormatterType; ignoreDisables?: boolean; reportNeedlessDisables?: boolean; ignorePath?: boolean; - syntax?: "scss" | "less" | "sugarss"; + syntax?: SyntaxType; customSyntax?: string; } diff --git a/types/stylelint/stylelint-tests.ts b/types/stylelint/stylelint-tests.ts index 0eeb0bdec8..a621c73a1d 100644 --- a/types/stylelint/stylelint-tests.ts +++ b/types/stylelint/stylelint-tests.ts @@ -1,4 +1,4 @@ -import { LinterOptions, lint, LintResult, LinterResult } from "stylelint"; +import { LinterOptions, FormatterType, SyntaxType, lint, LintResult, LinterResult } from "stylelint"; const options: LinterOptions = { code: "div { color: red }", @@ -16,3 +16,7 @@ lint(options).then((x: LinterResult) => { const postcssResults: any[] = x.postcssResults; const results: LintResult[] = x.results; }); + +const formatter: FormatterType = "json"; + +const syntax: SyntaxType = "scss"; diff --git a/types/swagger-sails-hook/index.d.ts b/types/swagger-sails-hook/index.d.ts index 4ce957a6bf..6d474c1907 100644 --- a/types/swagger-sails-hook/index.d.ts +++ b/types/swagger-sails-hook/index.d.ts @@ -26,14 +26,13 @@ declare namespace SwaggerHook { * @see {@link http://sailsjs.com/documentation/concepts/extending-sails/hooks/hook-specification|Sails Hook Docs} * @see {@link http://sailsjs.com/documentation/anatomy/api/hooks/my-hook/index-js|Sails Hook Example} */ - export interface SailsHook { - + interface SailsHook { /** * Perform startup tasks. * All Sails configuration is guaranteed to be completed before a hook’s initialize function runs. * @param {Function} done - called when `swagger-sails-hook`'s startup tasks have finished. */ - initialize: (done: () => any) => void; + initialize(done: () => any): void; /** * `swagger-sails-hook` specific route bound to a Sails app at load time. @@ -48,7 +47,7 @@ declare namespace SwaggerHook { * This route will match any routes that aren't bound in the app via a custom route configuration * or a blueprint. */ - "/*": (req: any, res: any, next: () => any) => any + "/*"(req: any, res: any, next: () => any): any } }; } diff --git a/types/swagger-sails-hook/swagger-sails-hook-tests.ts b/types/swagger-sails-hook/swagger-sails-hook-tests.ts index c1b73a08b7..9d5cc1d6b8 100644 --- a/types/swagger-sails-hook/swagger-sails-hook-tests.ts +++ b/types/swagger-sails-hook/swagger-sails-hook-tests.ts @@ -1,7 +1,6 @@ import swaggerSailsHook = require("swagger-sails-hook"); import * as express from "express"; - const mockSailsApp = { models: {}, conf: {}, diff --git a/types/swagger-schema-official/index.d.ts b/types/swagger-schema-official/index.d.ts index f0f2e60183..f988d75831 100644 --- a/types/swagger-schema-official/index.d.ts +++ b/types/swagger-schema-official/index.d.ts @@ -132,7 +132,7 @@ interface BaseSchema { uniqueItems?: boolean; maxProperties?: number; minProperties?: number; - enum?: (string|boolean|number|{})[]; + enum?: Array; type?: string; items?: Schema|Schema[]; } diff --git a/types/swiper/index.d.ts b/types/swiper/index.d.ts index 99cdc714d9..e74fc923f9 100644 --- a/types/swiper/index.d.ts +++ b/types/swiper/index.d.ts @@ -97,10 +97,10 @@ interface SwiperOptions { paginationHide?: boolean; paginationClickable?: boolean; paginationElement?: string; - paginationBulletRender?: (swiper: Swiper, index: number, className: string) => void; - paginationFractionRender?: (swiper: Swiper, currentClassName: string, totalClassName: string) => void; - paginationProgressRender?: (swiper: Swiper, progressbarClass: string) => void; - paginationCustomRender?: (swiper: Swiper, current: number, total: number) => void; + paginationBulletRender?(swiper: Swiper, index: number, className: string): void; + paginationFractionRender?(swiper: Swiper, currentClassName: string, totalClassName: string): void; + paginationProgressRender?(swiper: Swiper, progressbarClass: string): void; + paginationCustomRender?(swiper: Swiper, current: number, total: number): void; // Navigation Buttons nextButton?: string | Element; @@ -112,7 +112,6 @@ interface SwiperOptions { scrollbarDraggable?: boolean; scrollbarSnapOnRelease?: boolean; - // Accessibility a11y?: boolean; prevSlideMessage?: string; @@ -121,7 +120,6 @@ interface SwiperOptions { lastSlideMessage?: string; paginationBulletMessage?: string; - // Keyboard / Mousewheel keyboardControl?: boolean; mousewheelControl?: boolean; @@ -135,7 +133,6 @@ interface SwiperOptions { hashnavWatchState?: boolean; history?: string; - // Images preloadImages?: boolean; updateOnImagesReady?: boolean; @@ -165,36 +162,36 @@ interface SwiperOptions { // Callbacks runCallbacksOnInit?: boolean; - onInit?: (swiper: Swiper) => void; - onSlideChangeStart?: (swiper: Swiper) => void; - onSlideChangeEnd?: (swiper: Swiper) => void; - onSlideNextStart?: (swiper: Swiper) => void; - onSlideNextEnd?: (swiper: Swiper) => void; - onSlidePrevStart?: (swiper: Swiper) => void; - onSlidePrevEnd?: (swiper: Swiper) => void; - onTransitionStart?: (swiper: Swiper) => void; - onTransitionEnd?: (swiper: Swiper) => void; - onTouchStart?: (swiper: Swiper, event: Event) => void; - onTouchMove?: (swiper: Swiper, event: Event) => void; - onTouchMoveOpposite?: (swiper: Swiper, event: Event) => void; - onSliderMove?: (swiper: Swiper, event: Event) => void; - onTouchEnd?: (swiper: Swiper, event: Event) => void; - onClick?: (swiper: Swiper, event: Event) => void; - onTap?: (swiper: Swiper, event: Event) => void; - onDoubleTap?: (swiper: Swiper, event: Event) => void; - onImagesReady?: (swiper: Swiper) => void; - onProgress?: (swiper: Swiper, progress: number) => void; - onReachBeginning?: (swiper: Swiper) => void; - onReachEnd?: (swiper: Swiper) => void; - onDestroy?: (swiper: Swiper) => void; - onSetTranslate?: (swiper: Swiper, translate: any) => void; - onSetTransition?: (swiper: Swiper, transition: any) => void; - onAutoplay?: (swiper: Swiper) => void; - onAutoplayStart?: (swiper: Swiper) => void; - onAutoplayStop?: (swiper: Swiper) => void; - onLazyImageLoad?: (swiper: Swiper, slide: any, image: any) => void; - onLazyImageReady?: (swiper: Swiper, slide: any, image: any) => void; - onPaginationRendered?: (swiper: Swiper, paginationContainer: any) => void; + onInit?(swiper: Swiper): void; + onSlideChangeStart?(swiper: Swiper): void; + onSlideChangeEnd?(swiper: Swiper): void; + onSlideNextStart?(swiper: Swiper): void; + onSlideNextEnd?(swiper: Swiper): void; + onSlidePrevStart?(swiper: Swiper): void; + onSlidePrevEnd?(swiper: Swiper): void; + onTransitionStart?(swiper: Swiper): void; + onTransitionEnd?(swiper: Swiper): void; + onTouchStart?(swiper: Swiper, event: Event): void; + onTouchMove?(swiper: Swiper, event: Event): void; + onTouchMoveOpposite?(swiper: Swiper, event: Event): void; + onSliderMove?(swiper: Swiper, event: Event): void; + onTouchEnd?(swiper: Swiper, event: Event): void; + onClick?(swiper: Swiper, event: Event): void; + onTap?(swiper: Swiper, event: Event): void; + onDoubleTap?(swiper: Swiper, event: Event): void; + onImagesReady?(swiper: Swiper): void; + onProgress?(swiper: Swiper, progress: number): void; + onReachBeginning?(swiper: Swiper): void; + onReachEnd?(swiper: Swiper): void; + onDestroy?(swiper: Swiper): void; + onSetTranslate?(swiper: Swiper, translate: any): void; + onSetTransition?(swiper: Swiper, transition: any): void; + onAutoplay?(swiper: Swiper): void; + onAutoplayStart?(swiper: Swiper): void; + onAutoplayStop?(swiper: Swiper): void; + onLazyImageLoad?(swiper: Swiper, slide: any, image: any): void; + onLazyImageReady?(swiper: Swiper, slide: any, image: any): void; + onPaginationRendered?(swiper: Swiper, paginationContainer: any): void; // Namespace slideClass?: string; @@ -321,7 +318,7 @@ declare class Swiper { setGrabCursor(): void; plugins?: { - debugger?: (swiper: any, params: any) => void; + debugger?(swiper: any, params: any): void; }; } diff --git a/types/swiper/swiper-tests.ts b/types/swiper/swiper-tests.ts index 6decd155e0..7e772a2742 100644 --- a/types/swiper/swiper-tests.ts +++ b/types/swiper/swiper-tests.ts @@ -1,4 +1,3 @@ - /// // @@ -7,18 +6,18 @@ // 01-default.html function defaultDemo() { - var swiper = new Swiper('.swiper-container'); + const swiper = new Swiper('.swiper-container'); } // 02-responsive.html function responsive() { - var swiper = new Swiper('.swiper-container', { + const swiper = new Swiper('.swiper-container', { pagination: '.swiper-pagination', paginationClickable: true }); } // 03-vertical.html function vertical() { - var swiper = new Swiper('.swiper-container', { + const swiper = new Swiper('.swiper-container', { pagination: '.swiper-pagination', paginationClickable: true, direction: 'vertical' @@ -26,7 +25,7 @@ function vertical() { } // 04-space-between.html function spaceBetween() { - var swiper = new Swiper('.swiper-container', { + const swiper = new Swiper('.swiper-container', { pagination: '.swiper-pagination', paginationClickable: true, spaceBetween: 30, @@ -34,7 +33,7 @@ function spaceBetween() { } // 05-slides-per-view.html function slidesPerView() { - var swiper = new Swiper('.swiper-container', { + const swiper = new Swiper('.swiper-container', { pagination: '.swiper-pagination', slidesPerView: 3, paginationClickable: true, @@ -43,7 +42,7 @@ function slidesPerView() { } // 06-slides-per-view-auto.html function slidesPerViewAuto() { - var swiper = new Swiper('.swiper-container', { + const swiper = new Swiper('.swiper-container', { pagination: '.swiper-pagination', slidesPerView: 'auto', paginationClickable: true, @@ -52,7 +51,7 @@ function slidesPerViewAuto() { } // 07-centered.html function centered() { - var swiper = new Swiper('.swiper-container', { + const swiper = new Swiper('.swiper-container', { pagination: '.swiper-pagination', slidesPerView: 4, centeredSlides: true, @@ -62,7 +61,7 @@ function centered() { } // 08-centered-auto.html function centeredAuto() { - var swiper = new Swiper('.swiper-container', { + const swiper = new Swiper('.swiper-container', { pagination: '.swiper-pagination', slidesPerView: 'auto', centeredSlides: true, @@ -72,7 +71,7 @@ function centeredAuto() { } // 09-freemode.html function freemode() { - var swiper = new Swiper('.swiper-container', { + const swiper = new Swiper('.swiper-container', { pagination: '.swiper-pagination', slidesPerView: 3, paginationClickable: true, @@ -82,7 +81,7 @@ function freemode() { } // 10-slides-per-column.html function slidesPerColumn() { - var swiper = new Swiper('.swiper-container', { + const swiper = new Swiper('.swiper-container', { pagination: '.swiper-pagination', slidesPerView: 3, slidesPerColumn: 2, @@ -92,12 +91,12 @@ function slidesPerColumn() { } // 11-nested.html function nested() { - var swiperH = new Swiper('.swiper-container-h', { + const swiperH = new Swiper('.swiper-container-h', { pagination: '.swiper-pagination-h', paginationClickable: true, spaceBetween: 50 }); - var swiperV = new Swiper('.swiper-container-v', { + const swiperV = new Swiper('.swiper-container-v', { pagination: '.swiper-pagination-v', paginationClickable: true, direction: 'vertical', @@ -106,7 +105,7 @@ function nested() { } // 12-grab-cursor.html function grabCursor() { - var swiper = new Swiper('.swiper-container', { + const swiper = new Swiper('.swiper-container', { pagination: '.swiper-pagination', slidesPerView: 4, centeredSlides: true, @@ -117,7 +116,7 @@ function grabCursor() { } // 13-scrollbar.html function scrollbar() { - var swiper = new Swiper('.swiper-container', { + const swiper = new Swiper('.swiper-container', { scrollbar: '.swiper-scrollbar', scrollbarHide: true, slidesPerView: 'auto', @@ -128,7 +127,7 @@ function scrollbar() { } // 14-nav-arrows.html function navArrows() { - var swiper = new Swiper('.swiper-container', { + const swiper = new Swiper('.swiper-container', { pagination: '.swiper-pagination', paginationClickable: true, nextButton: '.swiper-button-next', @@ -138,7 +137,7 @@ function navArrows() { } // 15-infinite-loop.html function infiniteLoop() { - var swiper = new Swiper('.swiper-container', { + const swiper = new Swiper('.swiper-container', { pagination: '.swiper-pagination', nextButton: '.swiper-button-next', prevButton: '.swiper-button-prev', @@ -150,7 +149,7 @@ function infiniteLoop() { } // 16-effect-fade.html function effectFade() { - var swiper = new Swiper('.swiper-container', { + const swiper = new Swiper('.swiper-container', { pagination: '.swiper-pagination', paginationClickable: true, nextButton: '.swiper-button-next', @@ -161,7 +160,7 @@ function effectFade() { } // 17-effect-cube.html function effectCube() { - var swiper = new Swiper('.swiper-container', { + const swiper = new Swiper('.swiper-container', { pagination: '.swiper-pagination', effect: 'cube', grabCursor: true, @@ -175,7 +174,7 @@ function effectCube() { } // 18-effect-coverflow.html function effectCoverflow() { - var swiper = new Swiper('.swiper-container', { + const swiper = new Swiper('.swiper-container', { pagination: '.swiper-pagination', effect: 'coverflow', grabCursor: true, @@ -192,7 +191,7 @@ function effectCoverflow() { } // 19-keyboard-control.html function keyboardControl() { - var swiper = new Swiper('.swiper-container', { + const swiper = new Swiper('.swiper-container', { pagination: '.swiper-pagination', slidesPerView: 1, paginationClickable: true, @@ -204,7 +203,7 @@ function keyboardControl() { } // 20-mousewheel-control.html function mousewheelControl() { - var swiper = new Swiper('.swiper-container', { + const swiper = new Swiper('.swiper-container', { pagination: '.swiper-pagination', direction: 'vertical', slidesPerView: 1, @@ -215,7 +214,7 @@ function mousewheelControl() { } // 21-autoplay.html function autoplay() { - var swiper = new Swiper('.swiper-container', { + const swiper = new Swiper('.swiper-container', { pagination: '.swiper-pagination', nextButton: '.swiper-button-next', prevButton: '.swiper-button-prev', @@ -228,9 +227,9 @@ function autoplay() { } // 22-dynamic-slides.html function dynamicSlides() { - var appendNumber = 4; - var prependNumber = 1; - var swiper = new Swiper('.swiper-container', { + let appendNumber = 4; + let prependNumber = 1; + const swiper = new Swiper('.swiper-container', { pagination: '.swiper-pagination', nextButton: '.swiper-button-next', prevButton: '.swiper-button-prev', @@ -264,14 +263,14 @@ function dynamicSlides() { } // 23-thumbs-gallery-loop.html function thumbsGalleryLoop() { - var galleryTop = new Swiper('.gallery-top', { + const galleryTop = new Swiper('.gallery-top', { nextButton: '.swiper-button-next', prevButton: '.swiper-button-prev', spaceBetween: 10, loop: true, loopedSlides: 5, // looped slides should be the same }); - var galleryThumbs = new Swiper('.gallery-thumbs', { + const galleryThumbs = new Swiper('.gallery-thumbs', { spaceBetween: 10, slidesPerView: 4, touchRatio: 0.2, @@ -281,16 +280,15 @@ function thumbsGalleryLoop() { }); galleryTop.params.control = galleryThumbs; galleryThumbs.params.control = galleryTop; - } // 23-thumbs-gallery.html function thumbsGallery() { - var galleryTop = new Swiper('.gallery-top', { + const galleryTop = new Swiper('.gallery-top', { nextButton: '.swiper-button-next', prevButton: '.swiper-button-prev', spaceBetween: 10, }); - var galleryThumbs = new Swiper('.gallery-thumbs', { + const galleryThumbs = new Swiper('.gallery-thumbs', { spaceBetween: 10, centeredSlides: true, slidesPerView: 'auto', @@ -299,21 +297,20 @@ function thumbsGallery() { }); galleryTop.params.control = galleryThumbs; galleryThumbs.params.control = galleryTop; - } // 24-multiple-swipers.html function multipleSwipers() { - var swiper1 = new Swiper('.swiper1', { + const swiper1 = new Swiper('.swiper1', { pagination: '.swiper-pagination1', paginationClickable: true, spaceBetween: 30, }); - var swiper2 = new Swiper('.swiper2', { + const swiper2 = new Swiper('.swiper2', { pagination: '.swiper-pagination2', paginationClickable: true, spaceBetween: 30, }); - var swiper3 = new Swiper('.swiper3', { + const swiper3 = new Swiper('.swiper3', { pagination: '.swiper-pagination3', paginationClickable: true, spaceBetween: 30, @@ -321,7 +318,7 @@ function multipleSwipers() { } // 25-hash-navigation.html function hashNavigation() { - var swiper = new Swiper('.swiper-container', { + const swiper = new Swiper('.swiper-container', { pagination: '.swiper-pagination', paginationClickable: true, nextButton: '.swiper-button-next', @@ -333,7 +330,7 @@ function hashNavigation() { } // 26-rtl.html function rtl() { - var swiper = new Swiper('.swiper-container', { + const swiper = new Swiper('.swiper-container', { pagination: '.swiper-pagination', paginationClickable: true, nextButton: '.swiper-button-next', @@ -342,7 +339,7 @@ function rtl() { } // 27-jquery.html function jquery() { - var swiper = new Swiper('.swiper-container', { + const swiper = new Swiper('.swiper-container', { pagination: '.swiper-pagination', paginationClickable: true, nextButton: '.swiper-button-next', @@ -351,7 +348,7 @@ function jquery() { } // 28-parallax.html function parallax() { - var swiper = new Swiper('.swiper-container', { + const swiper = new Swiper('.swiper-container', { pagination: '.swiper-pagination', paginationClickable: true, nextButton: '.swiper-button-next', @@ -362,7 +359,7 @@ function parallax() { } // 29-custom-pagination.html function customPagination() { - var swiper = new Swiper('.swiper-container', { + const swiper = new Swiper('.swiper-container', { pagination: '.swiper-pagination', paginationClickable: true, paginationBulletRender(swiper, index, className) { @@ -372,7 +369,7 @@ function customPagination() { } // 30-lazy-load-images.html function lazyLoadImages() { - var swiper = new Swiper('.swiper-container', { + const swiper = new Swiper('.swiper-container', { nextButton: '.swiper-button-next', prevButton: '.swiper-button-prev', pagination: '.swiper-pagination', @@ -430,7 +427,7 @@ function customPlugin() { } // 32-scroll-container.html function scrollContainer() { - var swiper = new Swiper('.swiper-container', { + const swiper = new Swiper('.swiper-container', { scrollbar: '.swiper-scrollbar', direction: 'vertical', slidesPerView: 'auto', @@ -440,34 +437,34 @@ function scrollContainer() { } // 32-slideable-menu.html function slideableMenu() { - var toggleMenu = () => { + const toggleMenu = () => { if (swiper.previousIndex === 0) swiper.slidePrev(); - } - , menuButton = document.getElementsByClassName('menu-button')[0] - , swiper = new Swiper('.swiper-container', { - slidesPerView: 'auto' - , initialSlide: 1 - , resistanceRatio: .00000000000001 - , onSlideChangeStart: (slider) => { - if (slider.activeIndex === 0) { - menuButton.classList.add('cross'); - menuButton.removeEventListener('click', toggleMenu, false); - } else - menuButton.classList.remove('cross'); - } - , onSlideChangeEnd: (slider) => { - if (slider.activeIndex === 0) - menuButton.removeEventListener('click', toggleMenu, false); - else - menuButton.addEventListener('click', toggleMenu, false); - } - , slideToClickedSlide: true - }); + }; + const menuButton = document.getElementsByClassName('menu-button')[0]; + const swiper = new Swiper('.swiper-container', { + slidesPerView: 'auto', + initialSlide: 1, + resistanceRatio: .00000000000001, + onSlideChangeStart: (slider) => { + if (slider.activeIndex === 0) { + menuButton.classList.add('cross'); + menuButton.removeEventListener('click', toggleMenu, false); + } else + menuButton.classList.remove('cross'); + }, + onSlideChangeEnd: (slider) => { + if (slider.activeIndex === 0) + menuButton.removeEventListener('click', toggleMenu, false); + else + menuButton.addEventListener('click', toggleMenu, false); + }, + slideToClickedSlide: true + }); } // 33-responsive-breakpoints.html function responsiveBreakpoints() { - var swiper = new Swiper('.swiper-container', { + const swiper = new Swiper('.swiper-container', { pagination: '.swiper-pagination', paginationClickable: true, slidesPerView: 5, @@ -494,7 +491,7 @@ function responsiveBreakpoints() { } // 34-autoheight.html function autoheight() { - var swiper = new Swiper('.swiper-container', { + const swiper = new Swiper('.swiper-container', { pagination: '.swiper-pagination', paginationClickable: true, nextButton: '.swiper-button-next', @@ -504,7 +501,7 @@ function autoheight() { } // 35-effect-flip.html function effectFlip() { - var swiper = new Swiper('.swiper-container', { + const swiper = new Swiper('.swiper-container', { pagination: '.swiper-pagination', effect: 'flip', grabCursor: true, @@ -514,7 +511,7 @@ function effectFlip() { } // 36-pagination-fraction.html function paginationFraction() { - var swiper = new Swiper('.swiper-container', { + const swiper = new Swiper('.swiper-container', { nextButton: '.swiper-button-next', prevButton: '.swiper-button-prev', pagination: '.swiper-pagination', @@ -523,7 +520,7 @@ function paginationFraction() { } // 37-pagination-progress.html function paginationProgress() { - var swiper = new Swiper('.swiper-container', { + const swiper = new Swiper('.swiper-container', { nextButton: '.swiper-button-next', prevButton: '.swiper-button-prev', pagination: '.swiper-pagination', @@ -532,7 +529,7 @@ function paginationProgress() { } // 38-history.html function historyDemo() { - var swiper = new Swiper('.swiper-container', { + const swiper = new Swiper('.swiper-container', { spaceBetween: 50, slidesPerView: 2, centeredSlides: true, @@ -547,7 +544,7 @@ function historyDemo() { } // 38-jquery-ie9-loop.html function jqueryIe9Loop() { - var swiper = new Swiper('.swiper-container', { + const swiper = new Swiper('.swiper-container', { loop: true, pagination: '.swiper-pagination', paginationClickable: true, @@ -557,7 +554,7 @@ function jqueryIe9Loop() { } // 39-zoom.html function zoom() { - var swiper = new Swiper('.swiper-container', { + const swiper = new Swiper('.swiper-container', { zoom: true, pagination: '.swiper-pagination', nextButton: '.swiper-button-next', diff --git a/types/swiper/v2/index.d.ts b/types/swiper/v2/index.d.ts index a5a98b691f..446b104aba 100644 --- a/types/swiper/v2/index.d.ts +++ b/types/swiper/v2/index.d.ts @@ -3,7 +3,6 @@ // Definitions by: Sebastián Galiano // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - interface SwiperOptions { speed?: number; autoplay?: number; @@ -77,18 +76,18 @@ interface SwiperOptions { // Callbacks queueStartCallbacks?: boolean; queueEndCallbacks?: boolean; - onTouchStart?: (swiper: Swiper) => void; - onTouchMove?: (swiper: Swiper) => void; - onTouchEnd?: (swiper: Swiper) => void; - onSlideReset?: (swiper: Swiper) => void; - onSlideChangeStart?: (swiper: Swiper) => void; - onSlideChangeEnd?: (swiper: Swiper) => void; - onSlideClick?: (swiper: Swiper) => void; - onSlideTouch?: (swiper: Swiper) => void; - onImagesReady?: (swiper: Swiper) => void; - onMomentumBounce?: (swiper: Swiper) => void; - onResistanceBefore?: (swiper: Swiper, distance: any) => void; - onResistanceAfter?: (swiper: Swiper, distance: any) => void; + onTouchStart?(swiper: Swiper): void; + onTouchMove?(swiper: Swiper): void; + onTouchEnd?(swiper: Swiper): void; + onSlideReset?(swiper: Swiper): void; + onSlideChangeStart?(swiper: Swiper): void; + onSlideChangeEnd?(swiper: Swiper): void; + onSlideClick?(swiper: Swiper): void; + onSlideTouch?(swiper: Swiper): void; + onImagesReady?(swiper: Swiper): void; + onMomentumBounce?(swiper: Swiper): void; + onResistanceBefore?(swiper: Swiper, distance: any): void; + onResistanceAfter?(swiper: Swiper, distance: any): void; // Slides Loader loader?: { diff --git a/types/swiper/v2/swiper-tests.ts b/types/swiper/v2/swiper-tests.ts index ad1180a352..d4b0160098 100644 --- a/types/swiper/v2/swiper-tests.ts +++ b/types/swiper/v2/swiper-tests.ts @@ -1,4 +1,3 @@ - /// // @@ -7,7 +6,7 @@ // 01-default.html function defaultDemo() { - var mySwiper = new Swiper('.swiper-container', { + const mySwiper = new Swiper('.swiper-container', { pagination: '.pagination', loop: true, grabCursor: true, @@ -27,7 +26,7 @@ function defaultDemo() { // 02-vertical-mode.html function verticalMode() { - var mySwiper = new Swiper('.swiper-container', { + const mySwiper = new Swiper('.swiper-container', { pagination: '.pagination', paginationClickable: true, mode: 'vertical' @@ -36,17 +35,17 @@ function verticalMode() { // 03-dynamic-slides.html function dynamicSlides() { - var mySwiper = new Swiper('.swiper-container', { + const mySwiper = new Swiper('.swiper-container', { pagination: '.pagination', paginationClickable: true }); function randomColor() { - var colors = ('blue red green orange pink').split(' '); + const colors = ('blue red green orange pink').split(' '); return colors[Math.floor(Math.random() * colors.length)]; } - var count = 4; + let count = 4; $('.sdl-append').click(e => { e.preventDefault(); @@ -90,7 +89,7 @@ function dynamicSlides() { // 04-scroll-container.html function scrollContainer() { - var mySwiper = new Swiper('.swiper-container', { + const mySwiper = new Swiper('.swiper-container', { scrollContainer: true, scrollbar: { container: '.swiper-scrollbar' @@ -100,7 +99,7 @@ function scrollContainer() { // 05-free-mode.html function freeMode() { - var mySwiper = new Swiper('.swiper-container', { + const mySwiper = new Swiper('.swiper-container', { pagination: '.pagination', paginationClickable: true, freeMode: true, @@ -110,7 +109,7 @@ function freeMode() { // 06-carousel-mode.html function carouselMode() { - var mySwiper = new Swiper('.swiper-container', { + const mySwiper = new Swiper('.swiper-container', { pagination: '.pagination', paginationClickable: true, slidesPerView: 3 @@ -119,7 +118,7 @@ function carouselMode() { // 07-carousel-loop.html function carouselLoop() { - var mySwiper = new Swiper('.swiper-container', { + const mySwiper = new Swiper('.swiper-container', { pagination: '.pagination', paginationClickable: true, slidesPerView: 3, @@ -129,20 +128,20 @@ function carouselLoop() { // 08-nested.html function nested() { - var swiperParent = new Swiper('.swiper-parent', { + const swiperParent = new Swiper('.swiper-parent', { pagination: '.pagination-parent', paginationClickable: true, slidesPerView: 3 }); - var swiperNested1 = new Swiper('.swiper-nested-1', { + const swiperNested1 = new Swiper('.swiper-nested-1', { mode: 'vertical', pagination: '.pagination-nested-1', paginationClickable: true, slidesPerView: 2 }); - var swiperNested2 = new Swiper('.swiper-nested-2', { + const swiperNested2 = new Swiper('.swiper-nested-2', { mode: 'vertical', pagination: '.pagination-nested-2', paginationClickable: true, @@ -152,14 +151,14 @@ function nested() { // 09-nested-loop.html function nestedLoop() { - var swiperParent = new Swiper('.swiper-parent', { + const swiperParent = new Swiper('.swiper-parent', { pagination: '.pagination-parent', paginationClickable: true, loop: true, slidesPerView: 3 }); - var swiperNested1 = new Swiper('.swiper-nested', { + const swiperNested1 = new Swiper('.swiper-nested', { mode: 'vertical', pagination: '.pagination-nested', paginationClickable: true, @@ -169,7 +168,7 @@ function nestedLoop() { // 10-tabs.html function tabs() { - var tabsSwiper = new Swiper('.swiper-container', { + const tabsSwiper = new Swiper('.swiper-container', { onlyExternal: true, speed: 500 }); @@ -188,7 +187,7 @@ function tabs() { // 11-tabs-feedback.html function tabsFeedback() { - var tabsSwiper = new Swiper('.swiper-container', { + const tabsSwiper = new Swiper('.swiper-container', { speed: 500, onSlideChangeStart: () => { $(".tabs .active").removeClass('active'); @@ -210,7 +209,7 @@ function tabsFeedback() { // 12-partial-display.html function partialDisplay() { - var mySwiper = new Swiper('.swiper-container', { + const mySwiper = new Swiper('.swiper-container', { pagination: '.pagination', paginationClickable: true, slidesPerView: 'auto' @@ -219,7 +218,7 @@ function partialDisplay() { // 13-threshold.html function threshold() { - var mySwiper = new Swiper('.swiper-container', { + const mySwiper = new Swiper('.swiper-container', { pagination: '.pagination', paginationClickable: true, moveStartThreshold: 100 @@ -228,7 +227,7 @@ function threshold() { // 14-different-widths.html function differentWidths() { - var mySwiper = new Swiper('.swiper-container', { + const mySwiper = new Swiper('.swiper-container', { pagination: '.pagination', paginationClickable: true, slidesPerView: 'auto' @@ -237,7 +236,7 @@ function differentWidths() { // 15-centered-slides.html function centeredSlides() { - var mySwiper = new Swiper('.swiper-container', { + const mySwiper = new Swiper('.swiper-container', { pagination: '.pagination', paginationClickable: true, centeredSlides: true, @@ -247,7 +246,7 @@ function centeredSlides() { // 16-visibility-api.html function visibilityApi() { - var mySwiper = new Swiper('.swiper-container', { + const mySwiper = new Swiper('.swiper-container', { pagination: '.pagination', paginationClickable: true, centeredSlides: true, @@ -258,20 +257,19 @@ function visibilityApi() { // 17 - responsive.html function responsive() { - var mySwiper = new Swiper('.swiper-container', { + const mySwiper = new Swiper('.swiper-container', { pagination: '.pagination', paginationClickable: true }); } - // // Scrollbar // // demo-1.html function demo1() { - var mySwiper = new Swiper('.swiper-container', { + const mySwiper = new Swiper('.swiper-container', { scrollbar: { container: '.swiper-scrollbar', hide: false, @@ -282,7 +280,7 @@ function demo1() { // demo-2.html function demo2() { - var mySwiper = new Swiper('.swiper-container', { + const mySwiper = new Swiper('.swiper-container', { scrollbar: { container: '.swiper-scrollbar', hide: false, @@ -293,7 +291,7 @@ function demo2() { // demo-3.html function demo3() { - var mySwiper = new Swiper('.swiper-container', { + const mySwiper = new Swiper('.swiper-container', { scrollbar: { container: '.swiper-scrollbar', hide: true, @@ -304,7 +302,7 @@ function demo3() { // demo-4.html function demo4() { - var mySwiper = new Swiper('.swiper-container', { + const mySwiper = new Swiper('.swiper-container', { slidesPerView: 3, scrollbar: { container: '.swiper-scrollbar', @@ -317,7 +315,7 @@ function demo4() { // demo-5.html function demo5() { - var mySwiper = new Swiper('.swiper-container', { + const mySwiper = new Swiper('.swiper-container', { scrollContainer: true, mousewheelControl: true, mode: 'vertical', @@ -327,4 +325,4 @@ function demo5() { draggable: false } }); -} \ No newline at end of file +} diff --git a/types/tcomb/index.d.ts b/types/tcomb/index.d.ts index abfa163b98..261eef2137 100644 --- a/types/tcomb/index.d.ts +++ b/types/tcomb/index.d.ts @@ -5,16 +5,16 @@ // Original Definitions by: Jed Mao declare namespace TComb { - export interface tcomb { - format: (format: string, ...values: any[]) => string; - getFunctionName: (fn: Function) => string; - getTypeName: (type: TCombBase) => string; - mixin: (target: {}, source: {}, overwrite?: boolean) => any; + interface tcomb { + format(format: string, ...values: any[]): string; + getFunctionName(fn: Function): string; + getTypeName(type: TCombBase): string; + mixin(target: {}, source: {}, overwrite?: boolean): any; slice: typeof Array.prototype.slice; - shallowCopy: (x: TCombBase) => TCombBase; - update: (instance: any, spec: {} ) => TCombBase; - assert: (condition: boolean, message?: string, ...values: any[]) => void; - fail: (message?: string) => void; + shallowCopy(x: TCombBase): TCombBase; + update(instance: any, spec: {} ): TCombBase; + assert(condition: boolean, message?: string, ...values: any[]): void; + fail(message?: string): void; Any: Any_Static; Nil: Nil_Static; Str: Str_Static; @@ -54,13 +54,9 @@ declare namespace TComb { dict(domain: TCombBase, codomain: TCombBase, name?: string): Dict_Static; subtype(type: TCombBase, predicate: TypePredicate, name?: string): Subtype_Static; - } - - - - export interface TCombBase { + interface TCombBase { meta: { /** * The type kind, equal to "irreducible" for irreducible types. @@ -76,35 +72,27 @@ declare namespace TComb { update(instance: any, spec: {}): TCombBase; } - export interface TypePredicate { + interface TypePredicate { (x: any): Bool_Instance; } - export interface Any_Instance { - } - - export interface Any_Static extends TCombBase { + interface Any_Instance {} + interface Any_Static extends TCombBase { new (value: any): Any_Instance; (value: any): Any_Instance; } + interface Nil_Instance {} - - export interface Nil_Instance { - } - - export interface Nil_Static extends TCombBase { + interface Nil_Static extends TCombBase { new (value: any): Nil_Instance; (value: any): Nil_Instance; } + interface Str_Instance extends String {} - - export interface Str_Instance extends String { - } - - export interface Str_Static extends TCombBase { + interface Str_Static extends TCombBase { new (value: string): Str_Instance; (value: string): Str_Instance; meta: { @@ -123,94 +111,69 @@ declare namespace TComb { }; } + interface Num_Instance extends Number {} - - export interface Num_Instance extends Number { - } - - export interface Num_Static extends TCombBase { + interface Num_Static extends TCombBase { new (value: number): Num_Instance; (value: number): Num_Instance; } + interface Bool_Instance extends Boolean {} - - export interface Bool_Instance extends Boolean { - } - - export interface Bool_Static extends TCombBase { + interface Bool_Static extends TCombBase { new (value: boolean): Bool_Instance; (value: boolean): Bool_Instance; } + interface Arr_Instance extends Array {} - - export interface Arr_Instance extends Array { - } - - export interface Arr_Static extends TCombBase { + interface Arr_Static extends TCombBase { new (value: any[]): Arr_Instance; (value: any[]): Arr_Instance; } + interface Obj_Instance extends Object {} - - export interface Obj_Instance extends Object { - } - - export interface Obj_Static extends TCombBase { - + interface Obj_Static extends TCombBase { new (value: Object): Obj_Instance; (value: Object): Obj_Instance; } + interface Func_Instance extends Function {} - - export interface Func_Instance extends Function { - } - - export interface Func_Static extends TCombBase { + interface Func_Static extends TCombBase { new (value: Function): Func_Instance; (value: Function): Func_Instance; } + interface Err_Instance extends Error {} - export interface Err_Instance extends Error { - } - - export interface Err_Static extends TCombBase { + interface Err_Static extends TCombBase { new (value: Error): Err_Instance; (value: Error): Err_Instance; } + interface Re_Instance extends RegExp {} - export interface Re_Instance extends RegExp { - } - - export interface Re_Static extends TCombBase { + interface Re_Static extends TCombBase { new (value: RegExp): Re_Instance; (value: RegExp): Re_Instance; } + interface Dat_Instance extends Date {} - export interface Dat_Instance extends Date { - } - - export interface Dat_Static extends TCombBase { + interface Dat_Static extends TCombBase { new (value: Date): Dat_Instance; (value: Date): Dat_Instance; } - export interface Type_Instance { - } + interface Type_Instance {} - export interface Type_Static extends TCombBase { + interface Type_Static extends TCombBase { new (value: any): Type_Instance; (value: any): Type_Instance; } - - /** * @param name - The type name. * @param is - A predicate. @@ -220,9 +183,7 @@ declare namespace TComb { * @param props - A hash whose keys are the field names and the values are the fields types. * @param name - Useful for debugging purposes. */ - - - export interface Struct_Static extends TCombBase { + interface Struct_Static extends TCombBase { new (value: any, mutable?: boolean): Struct_Instance; (value: any, mutable?: boolean): Struct_Instance; meta: { @@ -252,32 +213,29 @@ declare namespace TComb { extend(mixins: Struct_Static[], name?: string): Struct_Static; } - interface Struct_Instance { - } + interface Struct_Instance {} /** * @param map - A hash whose keys are the enums (values are free). * @param name - Useful for debugging purposes. */ - - export namespace enums { + namespace enums { /** * @param keys - Array of enums. * @param name - Useful for debugging purposes. */ - export function of(keys: string[], name?: string): TCombBase; + function of(keys: string[], name?: string): TCombBase; /** * @param keys - String of enums separated by spaces. * @param name - Useful for debugging purposes. */ - export function of(keys: string, name?: string): TCombBase; + function of(keys: string, name?: string): TCombBase; } /** * @param name - Useful for debugging purposes. */ - - export interface Union_Static extends TCombBase { + interface Union_Static extends TCombBase { new (value: any, mutable?: boolean): Union_Instance; (value: any, mutable?: boolean): Union_Instance; meta: { @@ -288,18 +246,13 @@ declare namespace TComb { dispatch(x: any): TCombBase; } - export interface Union_Instance { - } - + interface Union_Instance {} /** * @param type - The wrapped type. * @param name - Useful for debugging purposes. */ - - - - export interface Maybe_Static extends TCombBase { + interface Maybe_Static extends TCombBase { new (value: any, mutable?: boolean): Maybe_Instance; (value: any, mutable?: boolean): Maybe_Instance; meta: { @@ -309,14 +262,11 @@ declare namespace TComb { }; } - interface Maybe_Instance { - } - + interface Maybe_Instance {} /** * @param name - Useful for debugging purposes. */ - interface Tuple_Static extends TCombBase { new (value: any, mutable?: boolean): Tuple_Instance; (value: any, mutable?: boolean): Tuple_Instance; @@ -327,17 +277,14 @@ declare namespace TComb { }; } - interface Tuple_Instance { - } + interface Tuple_Instance {} /** * Combines old types into a new one. * @param type - A type already defined. * @param name - Useful for debugging purposes. */ - - - export interface Subtype_Static extends TCombBase { + interface Subtype_Static extends TCombBase { new (value: any, mutable?: boolean): Subtype_Instance; (value: any, mutable?: boolean): Subtype_Instance; meta: { @@ -348,14 +295,13 @@ declare namespace TComb { }; } - interface Subtype_Instance { - } + interface Subtype_Instance {} /** * @param type - The type of list items. * @param name - Useful for debugging purposes. */ - export function list(type: TCombBase, name?: string): List_Static; + function list(type: TCombBase, name?: string): List_Static; interface List_Static extends TCombBase { new (value: any, mutable?: boolean): List_Instance; @@ -367,16 +313,13 @@ declare namespace TComb { }; } - interface List_Instance { - } + interface List_Instance {} /** * @param domain - The type of keys. * @param codomain - The type of values. * @param name - Useful for debugging purposes. */ - - interface Dict_Static extends TCombBase { new (value: any, mutable?: boolean): Dict_Instance; (value: any, mutable?: boolean): Dict_Instance; @@ -388,8 +331,7 @@ declare namespace TComb { }; } - interface Dict_Instance { - } + interface Dict_Instance {} /** * @param type - The type of the function's argument. @@ -401,7 +343,6 @@ declare namespace TComb { * @param codomain - The type of the function's return value. * @param name - Useful for debugging purposes. */ - interface Func_Static extends TCombBase { new (value: any, mutable?: boolean): Func_Instance; (value: any, mutable?: boolean): Func_Instance; @@ -414,9 +355,7 @@ declare namespace TComb { of(fn: Function): Function; } - interface Func_Instance { - } - + interface Func_Instance {} } declare var t: TComb.tcomb; diff --git a/types/tcomb/tcomb-tests.ts b/types/tcomb/tcomb-tests.ts index 7aa7d9a786..2219bb3c95 100644 --- a/types/tcomb/tcomb-tests.ts +++ b/types/tcomb/tcomb-tests.ts @@ -7,94 +7,70 @@ declare function it(desc: string, f: () => void): void; // tslint:disable:no-construct -'use strict'; import assert = require('assert'); import t = require("tcomb"); - -var Any = t.Any; -var Nil = t.Nil; -var Bool = t.Bool; -var Num = t.Num; -var Str = t.Str; -var Arr = t.Arr; -var Obj = t.Obj; -var Func = t.Func; -var Err = t.Err; -var Re = t.Re; -var Dat = t.Dat; -var struct = t.struct; -var enums = t.enums; -var union = t.union; -var tuple = t.tuple; -var maybe = t.maybe; -var subtype = t.subtype; -var list = t.list; -var dict = t.dict; -var func = t.func; -var getTypeName = t.getTypeName; -var mixin = t.mixin; -var format = t.format; +import { Any, Nil, Bool, Num, Str, Arr, Obj, Func, Err, Re, Dat, + struct, enums, union, tuple, maybe, subtype, list, dict, func, getTypeName, mixin, format } from "tcomb"; // // setup // -var ok = (x: any) => { assert.strictEqual(true, x); }; -var ko = (x: any) => { assert.strictEqual(false, x); }; -var eq = assert.deepEqual; -var throwsWithMessage = (f: any, message: any) => { +const ok = (x: any) => { assert.strictEqual(true, x); }; +const ko = (x: any) => { assert.strictEqual(false, x); }; +const eq = assert.deepEqual; +const throwsWithMessage = (f: any, message: any) => { assert.throws(f, (err: any) => { ok(err instanceof Error); eq(err.message, message); return true; }); }; -var doesNotThrow = assert.doesNotThrow; +const doesNotThrow = assert.doesNotThrow; -var noop = () => {}; -var Point = struct({ +const noop = () => {}; +const Point = struct({ x: Num, y: Num }); describe('update', () => { - - var update = t.update; - var Tuple = tuple([Str, Num]); - var List = list(Num); - var Dict = dict(Str, Num); + const update = t.update; + const Tuple = tuple([Str, Num]); + const List = list(Num); + const Dict = dict(Str, Num); it('should handle $set command', () => { - var instance = 1; - var actual = update(instance, {$set: 2}); + const instance = 1; + let actual = update(instance, {$set: 2}); eq(actual, 2); - var instance2 = [1, 2, 3]; + const instance2 = [1, 2, 3]; actual = update(instance2, {1: {$set: 4}}); eq(instance2, [1, 2, 3]); eq(actual, [1, 4, 3]); }); it('$set and null value, fix #65', () => { - var NullStruct = struct({a: Num, b: maybe(Num)}); - var instance = new NullStruct({a: 1}); - var updated = update(instance, {b: {$set: 2}}); + const NullStruct = struct({a: Num, b: maybe(Num)}); + const instance = new NullStruct({a: 1}); + const updated = update(instance, {b: {$set: 2}}); eq(instance, {a: 1, b: null}); eq(updated, {a: 1, b: 2}); }); it('should handle $apply command', () => { - var $apply = (n: any) => n + 1; - var instance = 1; - var actual = update(instance, {$apply}); + const $apply = (n: any) => n + 1; + const instance = 1; + let actual = update(instance, {$apply}); eq(actual, 2); - var instance2 = [1, 2, 3]; + const instance2 = [1, 2, 3]; actual = update(instance2, {1: {$apply}}); eq(instance2, [1, 2, 3]); eq(actual, [1, 3, 3]); }); it('should handle $unshift command', () => { - var actual = update([1, 2, 3], {$unshift: [4]}); + let actual = update([1, 2, 3], {$unshift: [4]}); eq(actual, [4, 1, 2, 3]); actual = update([1, 2, 3], {$unshift: [4, 5]}); eq(actual, [4, 5, 1, 2, 3]); @@ -103,7 +79,7 @@ describe('update', () => { }); it('should handle $push command', () => { - var actual = update([1, 2, 3], {$push: [4]}); + let actual = update([1, 2, 3], {$push: [4]}); eq(actual, [1, 2, 3, 4]); actual = update([1, 2, 3], {$push: [4, 5]}); eq(actual, [1, 2, 3, 4, 5]); @@ -112,47 +88,46 @@ describe('update', () => { }); it('should handle $splice command', () => { - var instance = [1, 2, {a: [12, 17, 15]}]; - var actual = update(instance, {2: {a: {$splice: [[1, 1, 13, 14]]}}}); + const instance = [1, 2, {a: [12, 17, 15]}]; + const actual = update(instance, {2: {a: {$splice: [[1, 1, 13, 14]]}}}); eq(instance, [1, 2, {a: [12, 17, 15]}]); eq(actual, [1, 2, {a: [12, 13, 14, 15]}]); }); it('should handle $remove command', () => { - var instance = {a: 1, b: 2}; - var actual = update(instance, {$remove: ['a']}); + const instance = {a: 1, b: 2}; + const actual = update(instance, {$remove: ['a']}); eq(instance, {a: 1, b: 2}); eq(actual, {b: 2}); }); it('should handle $swap command', () => { - var instance = [1, 2, 3, 4]; - var actual = update(instance, {$swap: {from: 1, to: 2}}); + const instance = [1, 2, 3, 4]; + const actual = update(instance, {$swap: {from: 1, to: 2}}); eq(instance, [1, 2, 3, 4]); eq(actual, [1, 3, 2, 4]); }); describe('structs', () => { - - var instance = new Point({x: 0, y: 1}); + let instance = new Point({x: 0, y: 1}); it('should handle $set command', () => { - var updated = update(instance, {x: {$set: 1}}); + const updated = update(instance, {x: {$set: 1}}); eq(instance, {x: 0, y: 1}); eq(updated, {x: 1, y: 1}); }); it('should handle $apply command', () => { - var updated = update(instance, {x: {$apply: (x: any) => x + 2}}); + const updated = update(instance, {x: {$apply: (x: any) => x + 2}}); eq(instance, {x: 0, y: 1}); eq(updated, {x: 2, y: 1}); }); it('should handle $merge command', () => { - var updated = update(instance, {$merge: {x: 2, y: 2}}); + let updated = update(instance, {$merge: {x: 2, y: 2}}); eq(instance, {x: 0, y: 1}); eq(updated, {x: 2, y: 2}); - var Nested = struct({ + const Nested = struct({ a: Num, b: struct({ c: Num, @@ -165,81 +140,73 @@ describe('update', () => { eq(instance, {a: 1, b: {c: 2, d: 3, e: 4}}); eq(updated, {a: 1, b: {c: 5, d: 3, e: 6}}); }); - }); describe('tuples', () => { - - var instance = Tuple(['a', 1]); + const instance = Tuple(['a', 1]); it('should handle $set command', () => { - var updated = update(instance, {0: {$set: 'b'}}); + const updated = update(instance, {0: {$set: 'b'}}); eq(updated, ['b', 1]); }); - }); describe('lists', () => { - - var instance = List([1, 2, 3, 4]); + const instance = List([1, 2, 3, 4]); it('should handle $set command', () => { - var updated = update(instance, {2: {$set: 5}}); + const updated = update(instance, {2: {$set: 5}}); eq(updated, [1, 2, 5, 4]); }); it('should handle $splice command', () => { - var updated = update(instance, {$splice: [[1, 2, 5, 6]]}); + const updated = update(instance, {$splice: [[1, 2, 5, 6]]}); eq(updated, [1, 5, 6, 4]); }); it('should handle $concat command', () => { - var updated = update(instance, {$push: [5]}); + let updated = update(instance, {$push: [5]}); eq(updated, [1, 2, 3, 4, 5]); updated = update(instance, {$push: [5, 6]}); eq(updated, [1, 2, 3, 4, 5, 6]); }); it('should handle $prepend command', () => { - var updated = update(instance, {$unshift: [5]}); + let updated = update(instance, {$unshift: [5]}); eq(updated, [5, 1, 2, 3, 4]); updated = update(instance, {$unshift: [5, 6]}); eq(updated, [5, 6, 1, 2, 3, 4]); }); it('should handle $swap command', () => { - var updated = update(instance, {$swap: {from: 1, to: 2}}); + const updated = update(instance, {$swap: {from: 1, to: 2}}); eq(updated, [1, 3, 2, 4]); }); - }); describe('dicts', () => { - - var instance = Dict({a: 1, b: 2}); + const instance = Dict({a: 1, b: 2}); it('should handle $set command', () => { - var updated = update(instance, {a: {$set: 2}}); + const updated = update(instance, {a: {$set: 2}}); eq(updated, {a: 2, b: 2}); }); it('should handle $remove command', () => { - var updated = update(instance, {$remove: ['a']}); + const updated = update(instance, {$remove: ['a']}); eq(updated, {b: 2}); }); - }); describe('memory saving', () => { - it('should reuse members that are not updated', () => { - var Struct = struct({ + const Struct = struct({ a: Num, b: Str, c: tuple([Num, Num]), }); - var List = list(Struct); - var instance = List([{ + const List = list(Struct); + const instance = List([{ a: 1, b: 'one', c: [1000, 1000000] @@ -249,7 +216,7 @@ describe('update', () => { c: [2000, 2000000] }]); - var updated = update(instance, { + const updated = update(instance, { 1: { a: {$set: 119} } @@ -262,21 +229,20 @@ describe('update', () => { }); describe('all together now', () => { - it('should handle mixed commands', () => { - var Struct = struct({ + const Struct = struct({ a: Num, b: Tuple, c: List, d: Dict }); - var instance = new Struct({ + const instance = new Struct({ a: 1, b: ['a', 1], c: [1, 2, 3, 4], d: {a: 1, b: 2} }); - var updated = update(instance, { + const updated = update(instance, { a: {$set: 1}, b: {0: {$set: 'b'}}, c: {2: {$set: 5}}, @@ -291,7 +257,7 @@ describe('update', () => { }); it('should handle nested structures', () => { - var Struct = struct({ + const Struct = struct({ a: struct({ b: tuple([ Str, @@ -299,12 +265,12 @@ describe('update', () => { ]) }) }); - var instance = new Struct({ + const instance = new Struct({ a: { b: ['a', [1, 2, 3]] } }); - var updated = update(instance, { + const updated = update(instance, { a: {b: {1: {2: {$set: 4}}}} }); eq(updated, { @@ -313,9 +279,7 @@ describe('update', () => { } }); }); - }); - }); // @@ -323,8 +287,7 @@ describe('update', () => { // describe('assert', () => { - - var assert = t.assert; + const assert = t.assert; it('should nor throw when guard is true', () => { assert(true); @@ -349,7 +312,7 @@ describe('assert', () => { }); it('should handle custom fail behaviour', () => { - var fail = t.fail; + const fail = t.fail; t.fail = message => { try { throw new Error(message); @@ -362,7 +325,6 @@ describe('assert', () => { }); t.fail = fail; }); - }); // @@ -370,7 +332,6 @@ describe('assert', () => { // describe('format(str, [...])', () => { - it('should format strings', () => { eq(format('%s', 'a'), 'a'); eq(format('%s', 2), '2'); @@ -405,15 +366,13 @@ describe('format(str, [...])', () => { ( format).formatters.l = (x: any) => x.length; eq(format('%l', ['a', 'b', 'c']), '3'); }); - }); describe('mixin(x, y, [overwrite])', () => { - it('should mix two objects', () => { - var o1 = {a: 1}; - var o2 = {b: 2}; - var o3 = mixin(o1, o2); + const o1 = {a: 1}; + const o2 = {b: 2}; + const o3 = mixin(o1, o2); ok(o3 === o1); eq(o3.a, 1); eq(o3.b, 2); @@ -421,16 +380,16 @@ describe('mixin(x, y, [overwrite])', () => { it('should throw if a property already exists', () => { throwsWithMessage(() => { - var o1 = {a: 1}; - var o2 = {a: 2, b: 2}; + const o1 = {a: 1}; + const o2 = {a: 2, b: 2}; mixin(o1, o2); }, 'Cannot overwrite property a'); }); it('should not throw if a property already exists but overwrite = true', () => { - var o1 = {a: 1}; - var o2 = {a: 2, b: 2}; - var o3 = mixin(o1, o2, true); + const o1 = {a: 1}; + const o2 = {a: 2, b: 2}; + const o3 = mixin(o1, o2, true); eq(o3.a, 2); eq(o3.b, 2); }); @@ -438,24 +397,22 @@ describe('mixin(x, y, [overwrite])', () => { it('should not mix prototype properties', () => { function F() {} F.prototype.method = noop; - var source = new ( F)(); - var target = {}; + const source = new ( F)(); + const target = {}; mixin(target, source); eq(( target).method, undefined); }); - }); describe('getFunctionName(f, [defaultName])', () => { - - var getFunctionName = t.getFunctionName; + const getFunctionName = t.getFunctionName; it('should return the name of a named function', () => { eq(getFunctionName(function myfunc(){}), 'myfunc'); }); it('should return the value of `displayName` if specified', () => { - var f = function myfunc(){}; + const f = function myfunc(){}; ( f).displayName = 'mydisplayname'; eq(getFunctionName(f), 'mydisplayname'); }); @@ -463,29 +420,27 @@ describe('getFunctionName(f, [defaultName])', () => { it('should fallback on function arity if nothing is specified', () => { eq(getFunctionName((a: any, b: any, c: any) => a + b + c), ''); }); - }); describe('getTypeName(type)', () => { - - var UnnamedStruct = struct({}); - var NamedStruct = struct({}, 'NamedStruct'); - var UnnamedUnion = union([Str, Num]); - var NamedUnion = union([Str, Num], 'NamedUnion'); - var UnnamedMaybe = maybe(Str); - var NamedMaybe = maybe(Str, 'NamedMaybe'); - var UnnamedEnums = enums({a: 'A', b: 'B'}); - var NamedEnums = enums({}, 'NamedEnums'); - var UnnamedTuple = tuple([Str, Num]); - var NamedTuple = tuple([Str, Num], 'NamedTuple'); - var UnnamedSubtype = subtype(Str, function notEmpty(x) { return x !== ''; }); - var NamedSubtype = subtype(Str, x => x !== '', 'NamedSubtype'); - var UnnamedList = list(Str); - var NamedList = list(Str, 'NamedList'); - var UnnamedDict = dict(Str, Str); - var NamedDict = dict(Str, Str, 'NamedDict'); - var UnnamedFunc = func(Str, Str); - var NamedFunc = func(Str, Str, 'NamedFunc'); + const UnnamedStruct = struct({}); + const NamedStruct = struct({}, 'NamedStruct'); + const UnnamedUnion = union([Str, Num]); + const NamedUnion = union([Str, Num], 'NamedUnion'); + const UnnamedMaybe = maybe(Str); + const NamedMaybe = maybe(Str, 'NamedMaybe'); + const UnnamedEnums = enums({a: 'A', b: 'B'}); + const NamedEnums = enums({}, 'NamedEnums'); + const UnnamedTuple = tuple([Str, Num]); + const NamedTuple = tuple([Str, Num], 'NamedTuple'); + const UnnamedSubtype = subtype(Str, function notEmpty(x) { return x !== ''; }); + const NamedSubtype = subtype(Str, x => x !== '', 'NamedSubtype'); + const UnnamedList = list(Str); + const NamedList = list(Str, 'NamedList'); + const UnnamedDict = dict(Str, Str); + const NamedDict = dict(Str, Str, 'NamedDict'); + const UnnamedFunc = func(Str, Str); + const NamedFunc = func(Str, Str, 'NamedFunc'); it('should return the name of a named type', () => { eq(getTypeName(NamedStruct), 'NamedStruct'); @@ -510,7 +465,6 @@ describe('getTypeName(type)', () => { eq(getTypeName(UnnamedDict), '{[key:Str]: Str}'); eq(getTypeName(UnnamedFunc), '(Str) => Str'); }); - }); // @@ -518,25 +472,21 @@ describe('getTypeName(type)', () => { // describe('Any', () => { - - var T = Any; + const T = Any; describe('constructor', () => { - it('should behave like identity', () => { eq(Any('a'), 'a'); }); it('should throw if used with new', () => { throwsWithMessage(() => { - var x = new ( T)(); + const x = new ( T)(); }, 'Operator `new` is forbidden for type `Any`'); }); - }); describe('#is(x)', () => { - it('should always return true', () => { ok(T.is(null)); ok(T.is(undefined)); @@ -550,9 +500,7 @@ describe('Any', () => { ok(T.is(new RegExp('a'))); ok(T.is(new Error())); }); - }); - }); // @@ -560,7 +508,6 @@ describe('Any', () => { // describe('irreducible types constructors', () => { - [ {T: Nil, x: null}, {T: Str, x: 'a'}, @@ -573,8 +520,7 @@ describe('irreducible types constructors', () => { {T: Re, x: /a/}, {T: Dat, x: new Date()} ].forEach(o => { - - var { T, x } = o; + const { T, x } = o; it('should accept only valid values', () => { eq(( T)(x), x); @@ -582,18 +528,14 @@ describe('irreducible types constructors', () => { it('should throw if used with new', () => { throwsWithMessage(() => { - var x = new ( T) (); + const x = new ( T) (); }, 'Operator `new` is forbidden for type `' + getTypeName(T) + '`'); }); - }); - }); describe('Nil', () => { - describe('#is(x)', () => { - it('should return true when x is null or undefined', () => { ok(Nil.is(null)); ok(Nil.is(undefined)); @@ -611,15 +553,11 @@ describe('Nil', () => { ko(Nil.is(/a/)); ko(Nil.is(new RegExp('a'))); }); - }); - }); describe('Bool', () => { - describe('#is(x)', () => { - it('should return true when x is true or false', () => { ok(Bool.is(true)); ok(Bool.is(false)); @@ -638,15 +576,11 @@ describe('Bool', () => { ko(Bool.is(new Error())); ko(Bool.is(new Date())); }); - }); - }); describe('Num', () => { - describe('#is(x)', () => { - it('should return true when x is a number', () => { ok(Num.is(0)); ok(Num.is(1)); @@ -669,15 +603,11 @@ describe('Num', () => { ko(Num.is(new Error())); ko(Num.is(new Date())); }); - }); - }); describe('Str', () => { - describe('#is(x)', () => { - it('should return true when x is a string', () => { ok(Str.is('')); ok(Str.is('a')); @@ -700,15 +630,11 @@ describe('Str', () => { ko(Str.is(new Error())); ko(Str.is(new Date())); }); - }); - }); describe('Arr', () => { - describe('#is(x)', () => { - it('should return true when x is an array', () => { ok(Arr.is([])); }); @@ -729,15 +655,11 @@ describe('Arr', () => { ko(Arr.is(new Error())); ko(Arr.is(new Date())); }); - }); - }); describe('Obj', () => { - describe('#is(x)', () => { - it('should return true when x is an object', () => { function A() {} ok(Obj.is({})); @@ -752,15 +674,11 @@ describe('Obj', () => { ko(Obj.is([])); ko(Obj.is(noop)); }); - }); - }); describe('Func', () => { - describe('#is(x)', () => { - it('should return true when x is a function', () => { ok(Func.is(noop)); ok(Func.is(new Function())); @@ -780,15 +698,11 @@ describe('Func', () => { ko(Func.is(new Error())); ko(Func.is(new Date())); }); - }); - }); describe('Err', () => { - describe('#is(x)', () => { - it('should return true when x is an error', () => { ok(Err.is(new Error())); }); @@ -806,15 +720,11 @@ describe('Err', () => { ko(Err.is(new RegExp('a'))); ko(Err.is(new Date())); }); - }); - }); describe('Re', () => { - describe('#is(x)', () => { - it('should return true when x is a regexp', () => { ok(Re.is(/a/)); ok(Re.is(new RegExp('a'))); @@ -832,15 +742,11 @@ describe('Re', () => { ko(Re.is(new Error())); ko(Re.is(new Date())); }); - }); - }); describe('Dat', () => { - describe('#is(x)', () => { - it('should return true when x is a Dat', () => { ok(Dat.is(new Date())); }); @@ -858,9 +764,7 @@ describe('Dat', () => { ko(Dat.is(/a/)); ko(Dat.is(new RegExp('a'))); }); - }); - }); // @@ -868,11 +772,8 @@ describe('Dat', () => { // describe('struct', () => { - describe('combinator', () => { - it('should throw if used with wrong arguments', () => { - throwsWithMessage(() => { ( struct)(); }, 'Invalid argument `props` = `undefined` supplied to `struct` combinator'); @@ -884,16 +785,13 @@ describe('struct', () => { throwsWithMessage(() => { ( struct)({}, 1); }, 'Invalid argument `name` = `1` supplied to `struct` combinator'); - }); - }); describe('constructor', () => { - it('should be idempotent', () => { - var T = Point; - var p1 = T({x: 0, y: 0}); - var p2 = T(p1); + const T = Point; + const p1 = T({x: 0, y: 0}); + const p2 = T(p1); eq(Object.isFrozen(p1), true); eq(Object.isFrozen(p2), true); eq(p2 === p1, true); @@ -904,40 +802,34 @@ describe('struct', () => { Point(1); }, 'Invalid argument `value` = `1` supplied to struct type `{x: Num, y: Num}`'); }); - }); describe('#is(x)', () => { - it('should return true when x is an instance of the struct', () => { - var p = new Point({ x: 1, y: 2 }); + const p = new Point({ x: 1, y: 2 }); ok(Point.is(p)); }); - }); describe('#update()', () => { - - var Type = struct({name: Str}); - var instance = new Type({name: 'Giulio'}); + const Type = struct({name: Str}); + const instance = new Type({name: 'Giulio'}); it('should return a new instance', () => { - var newInstance = Type.update(instance, {name: {$set: 'Canti'}}); + const newInstance = Type.update(instance, {name: {$set: 'Canti'}}); ok(Type.is(newInstance)); eq( ( instance).name, 'Giulio'); eq(( newInstance).name, 'Canti'); }); - }); describe('#extend(props, [name])', () => { - it('should extend an existing struct', () => { - var Point = struct({ + const Point = struct({ x: Num, y: Num }, 'Point'); - var Point3D = Point.extend({z: Num}, 'Point3D'); + const Point3D = Point.extend({z: Num}, 'Point3D'); eq(getTypeName(Point3D), 'Point3D'); eq(( Point3D).meta.props.x, Num); eq(( Point3D).meta.props.y, Num); @@ -945,9 +837,9 @@ describe('struct', () => { }); it('should handle an array as argument', () => { - var Type = struct({a: Str}, 'Type'); - var Mixin = [{b: Num, c: Bool}]; - var NewType = Type.extend(Mixin, 'NewType'); + const Type = struct({a: Str}, 'Type'); + const Mixin = [{b: Num, c: Bool}]; + const NewType = Type.extend(Mixin, 'NewType'); eq(getTypeName(NewType), 'NewType'); eq(( NewType).meta.props.a, Str); eq(( NewType).meta.props.b, Num); @@ -955,11 +847,11 @@ describe('struct', () => { }); it('should handle a struct (or list of structs) as argument', () => { - var A = struct({a: Str}, 'A'); - var B = struct({b: Str}, 'B'); - var C = struct({c: Str}, 'C'); - var MixinD = {d: Str}; - var E = A.extend([B, C, MixinD]); + const A = struct({a: Str}, 'A'); + const B = struct({b: Str}, 'B'); + const C = struct({c: Str}, 'C'); + const MixinD = {d: Str}; + const E = A.extend([B, C, MixinD]); eq(E.meta.props, { a: Str, b: Str, @@ -969,8 +861,8 @@ describe('struct', () => { }); it('should support prototypal inheritance', () => { - interface Rectangle { w: number; h: number; area(): number; }; - var Rectangle = struct({ + interface Rectangle { w: number; h: number; area(): number; } + const Rectangle = struct({ w: Num, h: Num }, 'Rectangle'); @@ -978,7 +870,7 @@ describe('struct', () => { return this.w * this.h; }; interface Cube extends Rectangle { l: number; } - var Cube = Rectangle.extend({ + const Cube = Rectangle.extend({ l: Num }); Cube.prototype.volume = function(this: Cube) { @@ -991,12 +883,10 @@ describe('struct', () => { assert('function' === typeof Cube.prototype.volume); assert(Cube.prototype.constructor === Cube); - var c = new Cube({w: 2, h: 2, l: 2}); + const c = new Cube({w: 2, h: 2, l: 2}); eq(( c).volume(), 8); }); - }); - }); // @@ -1004,11 +894,8 @@ describe('struct', () => { // describe('enums', () => { - describe('combinator', () => { - it('should throw if used with wrong arguments', () => { - throwsWithMessage(() => { ( enums)(); }, 'Invalid argument `map` = `undefined` supplied to `enums` combinator'); @@ -1016,18 +903,15 @@ describe('enums', () => { throwsWithMessage(() => { ( enums)({}, 1); }, 'Invalid argument `name` = `1` supplied to `enums` combinator'); - }); - }); describe('constructor', () => { - - var T = enums({a: 0}, 'T'); + const T = enums({a: 0}, 'T'); it('should throw if used with new', () => { throwsWithMessage(() => { - var x = new ( T)('a'); + const x = new ( T)('a'); }, 'Operator `new` is forbidden for type `T`'); }); @@ -1037,12 +921,10 @@ describe('enums', () => { ( T)('b'); }, 'Invalid argument `value` = `b` supplied to enums type `T`, expected one of ["a"]'); }); - }); describe('#is(x)', () => { - - var Direction = enums({ + const Direction = enums({ North: 0, East: 1, South: 2, @@ -1062,13 +944,11 @@ describe('enums', () => { ko(Direction.is('North-East')); ko(Direction.is(2)); }); - }); describe('#of(keys)', () => { - it('should return an enum', () => { - var Size = ( enums).of(['large', 'small', 1, 10.9]); ///!!! + const Size = ( enums).of(['large', 'small', 1, 10.9]); ///!!! ok(Size.meta.map.large === 'large'); ok(Size.meta.map.small === 'small'); ok(Size.meta.map['1'] === 1); @@ -1076,15 +956,13 @@ describe('enums', () => { }); it('should handle a string', () => { - var Size = ( enums).of('large small 10'); + const Size = ( enums).of('large small 10'); ok(Size.meta.map.large === 'large'); ok(Size.meta.map.small === 'small'); ok(Size.meta.map['10'] === '10'); ok(Size.meta.map[10] === '10'); }); - }); - }); // @@ -1092,18 +970,17 @@ describe('enums', () => { // describe('union', () => { - - var Circle = struct({ + const Circle = struct({ center: Point, radius: Num }, 'Circle'); - var Rectangle = struct({ + const Rectangle = struct({ a: Point, b: Point }); - var Shape = union([Circle, Rectangle], 'Shape'); + const Shape = union([Circle, Rectangle], 'Shape'); Shape.dispatch = values => { assert(Obj.is(values)); @@ -1113,9 +990,7 @@ describe('union', () => { }; describe('combinator', () => { - it('should throw if used with wrong arguments', () => { - throwsWithMessage(() => { ( union)(); }, 'Invalid argument `types` = `undefined` supplied to `union` combinator'); @@ -1131,43 +1006,40 @@ describe('union', () => { throwsWithMessage(() => { ( union)([Circle, Point], 1); }, 'Invalid argument `name` = `1` supplied to `union` combinator'); - }); - }); describe('constructor', () => { - it('should throw when dispatch() is not implemented', () => { throwsWithMessage(() => { - var T = union([Str, Num], 'T'); + const T = union([Str, Num], 'T'); T.dispatch = null; T(1); }, 'Unimplemented `dispatch()` function for union type `T`'); }); it('should have a default dispatch() implementation', () => { - var T = union([Str, Num], 'T'); + const T = union([Str, Num], 'T'); eq(T(1), 1); }); it('should throw when dispatch() does not return a type', () => { throwsWithMessage(() => { - var T = union([Str, Num], 'T'); + const T = union([Str, Num], 'T'); T(true); }, 'The `dispatch()` function of union type `T` returns no type constructor'); }); it('should build instances when dispatch() is implemented', () => { - var circle = Shape({center: {x: 0, y: 0}, radius: 10}); + const circle = Shape({center: {x: 0, y: 0}, radius: 10}); ok(Circle.is(circle)); }); it('should throw if used with new and union types are not instantiables with new', () => { throwsWithMessage(() => { - var T = union([Str, Num], 'T'); + const T = union([Str, Num], 'T'); T.dispatch = () => Str; - var x = new T('a'); + const x = new T('a'); }, 'Operator `new` is forbidden for type `T`'); }); @@ -1178,24 +1050,20 @@ describe('union', () => { }); it('should be idempotent', () => { - var p1 = Shape({center: {x: 0, y: 0}, radius: 10}); - var p2 = Shape(p1); + const p1 = Shape({center: {x: 0, y: 0}, radius: 10}); + const p2 = Shape(p1); eq(Object.isFrozen(p1), true); eq(Object.isFrozen(p2), true); eq(p2 === p1, true); }); - }); describe('#is(x)', () => { - it('should return true when x is an instance of the union', () => { - var p = new Circle({center: { x: 0, y: 0 }, radius: 10}); + const p = new Circle({center: { x: 0, y: 0 }, radius: 10}); ok(Shape.is(p)); }); - }); - }); // @@ -1203,11 +1071,8 @@ describe('union', () => { // describe('maybe', () => { - describe('combinator', () => { - it('should throw if used with wrong arguments', () => { - throwsWithMessage(() => { ( maybe)(); }, 'Invalid argument `type` = `undefined` supplied to `maybe` combinator'); @@ -1215,11 +1080,10 @@ describe('maybe', () => { throwsWithMessage(() => { ( maybe)(Point, 1); }, 'Invalid argument `name` = `1` supplied to `maybe` combinator'); - }); it('should be idempotent', () => { - var MaybeStr = maybe(Str); + const MaybeStr = maybe(Str); ok(maybe(MaybeStr) === MaybeStr); }); @@ -1230,47 +1094,41 @@ describe('maybe', () => { it('should be noop with Nil', () => { ok(( maybe)(Nil) === Nil); }); - }); describe('constructor', () => { - it('should throw if used with new', () => { throwsWithMessage(() => { - var T = maybe(Str, 'T'); - var x = new ( T)(); + const T = maybe(Str, 'T'); + const x = new ( T)(); }, 'Operator `new` is forbidden for type `T`'); }); it('should coerce values', () => { - var T = maybe(Point); + const T = maybe(Point); eq(T(null), null); eq(T(undefined), null); ok(Point.is(T({x: 0, y: 0}))); }); it('should be idempotent', () => { - var T = maybe(Point); - var p1 = T({x: 0, y: 0}); - var p2 = T(p1); + const T = maybe(Point); + const p1 = T({x: 0, y: 0}); + const p2 = T(p1); eq(Object.isFrozen(p1), true); eq(Object.isFrozen(p2), true); eq(p2 === p1, true); }); - }); describe('#is(x)', () => { - it('should return true when x is an instance of the maybe', () => { - var Radio = maybe(Str); + const Radio = maybe(Str); ok(Radio.is('a')); ok(Radio.is(null)); ok(Radio.is(undefined)); }); - }); - }); // @@ -1278,13 +1136,10 @@ describe('maybe', () => { // describe('tuple', () => { - - var Area = tuple([Num, Num], 'Area'); + const Area = tuple([Num, Num], 'Area'); describe('combinator', () => { - it('should throw if used with wrong arguments', () => { - throwsWithMessage(() => { ( tuple)(); }, 'Invalid argument `types` = `undefined` supplied to `tuple` combinator'); @@ -1292,24 +1147,20 @@ describe('tuple', () => { throwsWithMessage(() => { ( tuple)([Point, Point], 1); }, 'Invalid argument `name` = `1` supplied to `tuple` combinator'); - }); - }); describe('constructor', () => { - - var S = struct({}, 'S'); - var T = tuple([S, S], 'T'); + const S = struct({}, 'S'); + const T = tuple([S, S], 'T'); it('should coerce values', () => { - var t = T([{}, {}]); + const t = T([{}, {}]); ok(S.is(( t)[0])); ok(S.is(( t)[1])); }); it('should accept only valid values', () => { - throwsWithMessage(() => { T(1); }, 'Invalid argument `value` = `1` supplied to tuple type `T`, expected an `Arr` of length `2`'); @@ -1317,22 +1168,19 @@ describe('tuple', () => { throwsWithMessage(() => { T([1, 1]); }, 'Invalid argument `value` = `1` supplied to struct type `S`'); - }); it('should be idempotent', () => { - var T = tuple([Str, Num]); - var p1 = T(['a', 1]); - var p2 = T(p1); + const T = tuple([Str, Num]); + const p1 = T(['a', 1]); + const p2 = T(p1); eq(Object.isFrozen(p1), true); eq(Object.isFrozen(p2), true); eq(p2 === p1, true); }); - }); describe('#is(x)', () => { - it('should return true when x is an instance of the tuple', () => { ok(Area.is([1, 2])); }); @@ -1346,23 +1194,19 @@ describe('tuple', () => { it('should not depend on `this`', () => { ok([[1, 2]].every(Area.is)); }); - }); describe('#update()', () => { - - var Type = tuple([Str, Num]); - var instance = Type(['a', 1]); + const Type = tuple([Str, Num]); + const instance = Type(['a', 1]); it('should return a new instance', () => { - var newInstance = Type.update(instance, {0: {$set: 'b'}}); + const newInstance = Type.update(instance, {0: {$set: 'b'}}); assert(Type.is(newInstance)); assert(( instance)[0] === 'a'); assert(( newInstance)[0] === 'b'); }); - }); - }); // @@ -1370,11 +1214,8 @@ describe('tuple', () => { // describe('list', () => { - describe('combinator', () => { - it('should throw if used with wrong arguments', () => { - throwsWithMessage(() => { ( list)(); }, 'Invalid argument `type` = `undefined` supplied to `list` combinator'); @@ -1382,23 +1223,19 @@ describe('list', () => { throwsWithMessage(() => { ( list)(Point, 1); }, 'Invalid argument `name` = `1` supplied to `list` combinator'); - }); - }); describe('constructor', () => { - - var S = struct({}, 'S'); - var T = list(S, 'T'); + const S = struct({}, 'S'); + const T = list(S, 'T'); it('should coerce values', () => { - var t = T([{}]); + const t = T([{}]); ok(S.is(( t)[0])); }); it('should accept only valid values', () => { - throwsWithMessage(() => { T(1); }, 'Invalid argument `value` = `1` supplied to list type `T`'); @@ -1406,25 +1243,22 @@ describe('list', () => { throwsWithMessage(() => { T([1]); }, 'Invalid argument `value` = `1` supplied to struct type `S`'); - }); it('should be idempotent', () => { - var T = list(Num); - var p1 = T([1, 2]); - var p2 = T(p1); + const T = list(Num); + const p1 = T([1, 2]); + const p2 = T(p1); eq(Object.isFrozen(p1), true); eq(Object.isFrozen(p2), true); eq(p2 === p1, true); }); - }); describe('#is(x)', () => { - - var Path = list(Point); - var p1 = new Point({x: 0, y: 0}); - var p2 = new Point({x: 1, y: 1}); + const Path = list(Point); + const p1 = new Point({x: 0, y: 0}); + const p2 = new Point({x: 1, y: 1}); it('should return true when x is a list', () => { ok(Path.is([p1, p2])); @@ -1433,23 +1267,19 @@ describe('list', () => { it('should not depend on `this`', () => { ok([[p1, p2]].every(Path.is)); }); - }); describe('#update()', () => { - - var Type = list(Str); - var instance = Type(['a', 'b']); + const Type = list(Str); + const instance = Type(['a', 'b']); it('should return a new instance', () => { - var newInstance = Type.update(instance, {$push: ['c']}); + const newInstance = Type.update(instance, {$push: ['c']}); assert(Type.is(newInstance)); assert(( instance).length === 2); assert(( newInstance).length === 3); }); - }); - }); // @@ -1457,13 +1287,10 @@ describe('list', () => { // describe('subtype', () => { - - var True = () => true; + const True = () => true; describe('combinator', () => { - it('should throw if used with wrong arguments', () => { - throwsWithMessage(() => { ( subtype)(); }, 'Invalid argument `type` = `undefined` supplied to `subtype` combinator'); @@ -1475,39 +1302,34 @@ describe('subtype', () => { throwsWithMessage(() => { ( subtype)(Point, True, 1); }, 'Invalid argument `name` = `1` supplied to `subtype` combinator'); - }); - }); describe('constructor', () => { - it('should throw if used with new and a type that is not instantiable with new', () => { throwsWithMessage(() => { - var T = subtype(Str, () => true, 'T'); - var x = new( T)(); + const T = subtype(Str, () => true, 'T'); + const x = new( T)(); }, 'Operator `new` is forbidden for type `T`'); }); it('should coerce values', () => { - var T = subtype(Point, () => true); - var p = T({x: 0, y: 0}); + const T = subtype(Point, () => true); + const p = T({x: 0, y: 0}); ok(Point.is(p)); }); it('should accept only valid values', () => { - var predicate = (p: any) => p.x > 0; - var T = subtype(Point, predicate, 'T'); + const predicate = (p: any) => p.x > 0; + const T = subtype(Point, predicate, 'T'); throwsWithMessage(() => { T({x: 0, y: 0}); }, 'Invalid argument `value` = `[object Object]` supplied to subtype type `T`'); }); - }); describe('#is(x)', () => { - - var Positive = subtype(Num, n => n >= 0); + const Positive = subtype(Num, n => n >= 0); it('should return true when x is a subtype', () => { ok(Positive.is(1)); @@ -1516,22 +1338,18 @@ describe('subtype', () => { it('should return false when x is not a subtype', () => { ko(Positive.is(-1)); }); - }); describe('#update()', () => { - - var Type = subtype(Str, s => s.length > 2); - var instance = Type('abc'); + const Type = subtype(Str, s => s.length > 2); + const instance = Type('abc'); it('should return a new instance', () => { - var newInstance = Type.update(instance, {$set: 'bca'}); + const newInstance = Type.update(instance, {$set: 'bca'}); assert(Type.is(newInstance)); eq(newInstance, 'bca'); }); - }); - }); // @@ -1539,11 +1357,8 @@ describe('subtype', () => { // describe('dict', () => { - describe('combinator', () => { - it('should throw if used with wrong arguments', () => { - throwsWithMessage(() => { ( dict)(); }, 'Invalid argument `domain` = `undefined` supplied to `dict` combinator'); @@ -1555,24 +1370,20 @@ describe('dict', () => { throwsWithMessage(() => { ( dict)(Str, Point, 1); }, 'Invalid argument `name` = `1` supplied to `dict` combinator'); - }); - }); describe('constructor', () => { - - var S = struct({}, 'S'); - var Domain = subtype(Str, x => x !== 'forbidden', 'Domain'); - var T = dict(Domain, S, 'T'); + const S = struct({}, 'S'); + const Domain = subtype(Str, x => x !== 'forbidden', 'Domain'); + const T = dict(Domain, S, 'T'); it('should coerce values', () => { - var t = T({a: {}}); + const t = T({a: {}}); ok(S.is(( t).a)); }); it('should accept only valid values', () => { - throwsWithMessage(() => { T(1); }, 'Invalid argument `value` = `1` supplied to dict type `T`'); @@ -1584,25 +1395,22 @@ describe('dict', () => { throwsWithMessage(() => { T({forbidden: {}}); }, 'Invalid argument `value` = `forbidden` supplied to subtype type `Domain`'); - }); it('should be idempotent', () => { - var T = dict(Str, Str); - var p1 = T({a: 'a', b: 'b'}); - var p2 = T(p1); + const T = dict(Str, Str); + const p1 = T({a: 'a', b: 'b'}); + const p2 = T(p1); eq(Object.isFrozen(p1), true); eq(Object.isFrozen(p2), true); eq(p2 === p1, true); }); - }); describe('#is(x)', () => { - - var T = dict(Str, Point); - var p1 = new Point({x: 0, y: 0}); - var p2 = new Point({x: 1, y: 1}); + const T = dict(Str, Point); + const p1 = new Point({x: 0, y: 0}); + const p2 = new Point({x: 1, y: 1}); it('should return true when x is a list', () => { ok(T.is({a: p1, b: p2})); @@ -1611,23 +1419,19 @@ describe('dict', () => { it('should not depend on `this`', () => { ok([{a: p1, b: p2}].every(T.is)); }); - }); describe('#update()', () => { - - var Type = dict(Str, Str); - var instance = Type({p1: 'a', p2: 'b'}); + const Type = dict(Str, Str); + const instance = Type({p1: 'a', p2: 'b'}); it('should return a new instance', () => { - var newInstance = Type.update(instance, {p2: {$set: 'c'}}); + const newInstance = Type.update(instance, {p2: {$set: 'c'}}); ok(Type.is(newInstance)); eq(( instance).p2, 'b'); eq(( newInstance).p2, 'c'); }); - }); - }); // @@ -1635,32 +1439,29 @@ describe('dict', () => { // describe('func', () => { - it('should handle a no types', () => { - var T = func([], Str); + const T = func([], Str); eq(T.meta.domain.length, 0); - var getGreeting = T.of(() => 'Hi'); + const getGreeting = T.of(() => 'Hi'); eq(getGreeting(), 'Hi'); }); it('should handle a single type', () => { - var T = func(Num, Num); + const T = func(Num, Num); eq(T.meta.domain.length, 1); ok(T.meta.domain[0] === Num); }); it('should automatically instrument a function', () => { - var T = func(Num, Num); - var f = () => 'hi'; + const T = func(Num, Num); + const f = () => 'hi'; ok(T.is(T(f))); }); describe('of', () => { - it('should check the arguments', () => { - - var T = func([Num, Num], Num); - var sum = T.of((a: any, b: any) => a + b); + const T = func([Num, Num], Num); + const sum = T.of((a: any, b: any) => a + b); eq(sum(1, 2), 3); throwsWithMessage(() => { @@ -1670,24 +1471,21 @@ describe('func', () => { throwsWithMessage(() => { sum('a', 2); }, 'Invalid argument `value` = `a` supplied to irreducible type `Num`'); - }); it('should check the return value', () => { - - var T = func([Num, Num], Num); - var sum = T.of(() => { + const T = func([Num, Num], Num); + const sum = T.of(() => { return 'a'; }); throwsWithMessage(() => { sum(1, 2); }, 'Invalid argument `value` = `a` supplied to irreducible type `Num`'); - }); it('should preserve `this`', () => { - var o = {name: 'giulio'}; + const o = {name: 'giulio'}; ( o).getTypeName = func([], Str).of(function(this: any) { return this.name; }); @@ -1695,58 +1493,52 @@ describe('func', () => { }); it('should handle function types', () => { - var A = func([Str], Str); - var B = func([Str, A], Str); + const A = func([Str], Str); + const B = func([Str, A], Str); - var f = A.of((s: any) => s + '!'); - var g = B.of((str: any, strAction: any) => strAction(str)); + const f = A.of((s: any) => s + '!'); + const g = B.of((str: any, strAction: any) => strAction(str)); eq(g('hello', f), 'hello!'); }); it('should be idempotent', () => { - var f = (s: any) => s; - var g = func([Str], Str).of(f); - var h = func([Str], Str).of(g); + const f = (s: any) => s; + const g = func([Str], Str).of(f); + const h = func([Str], Str).of(g); ok(h === g); }); - }); describe('currying', () => { - it('should curry functions', () => { - var Type = func([Num, Num, Num], Num); - var sum = Type.of((a: any, b: any, c: any) => a + b + c); + const Type = func([Num, Num, Num], Num); + const sum = Type.of((a: any, b: any, c: any) => a + b + c); eq(sum(1, 2, 3), 6); eq(sum(1, 2)(3), 6); eq(sum(1)(2, 3), 6); eq(sum(1)(2)(3), 6); // important: the curried function must be of the correct type - var CurriedType = func([Num, Num], Num); - var sum1 = sum(1); + const CurriedType = func([Num, Num], Num); + const sum1 = sum(1); eq(sum1(2, 3), 6); eq(sum1(2)(3), 6); ok(CurriedType.is(sum1)); }); it('should throw if partial arguments are wrong', () => { - - var T = func([Num, Num], Num); - var sum = T.of((a: any, b: any) => a + b); + const T = func([Num, Num], Num); + const sum = T.of((a: any, b: any) => a + b); throwsWithMessage(() => { sum('a'); }, 'Invalid argument `value` = `a` supplied to irreducible type `Num`'); throwsWithMessage(() => { - var sum1 = sum(1); + const sum1 = sum(1); sum1('a'); }, 'Invalid argument `value` = `a` supplied to irreducible type `Num`'); - }); - }); - }); diff --git a/types/tcomb/tslint.json b/types/tcomb/tslint.json index c3d18eb9dd..d3cce83dc9 100644 --- a/types/tcomb/tslint.json +++ b/types/tcomb/tslint.json @@ -2,7 +2,7 @@ "extends": "../tslint.json", "rules": { "callable-types": false, - "forbidden-types": false, + "ban-types": false, "no-empty-interface": false, "no-single-declare-module": false, "unified-signatures": false diff --git a/types/tedious-connection-pool/index.d.ts b/types/tedious-connection-pool/index.d.ts index 7d144bfc22..dcd02a97e9 100644 --- a/types/tedious-connection-pool/index.d.ts +++ b/types/tedious-connection-pool/index.d.ts @@ -12,7 +12,7 @@ declare namespace tcp { /** * Extends Tedious Connection with release function */ - export class PooledConnection extends tedious.Connection { + class PooledConnection extends tedious.Connection { /** * If the connection is issued from a connection pool returns the connection to the pool. */ @@ -24,12 +24,12 @@ declare namespace tcp { * @param err error if any * @param connection issued from the pool */ - export type ConnectionCallback = (err: Error, connection: PooledConnection) => void; + type ConnectionCallback = (err: Error, connection: PooledConnection) => void; /** * Pool Configuration interface */ - export interface PoolConfig { + interface PoolConfig { /** * Minimum concurrent connections */ diff --git a/types/tedious-connection-pool/tedious-connection-pool-tests.ts b/types/tedious-connection-pool/tedious-connection-pool-tests.ts index 0a2ec38be6..f5151db7e4 100644 --- a/types/tedious-connection-pool/tedious-connection-pool-tests.ts +++ b/types/tedious-connection-pool/tedious-connection-pool-tests.ts @@ -1,7 +1,7 @@ import ConnectionPool = require("tedious-connection-pool"); import tedious = require("tedious"); -var config: tedious.ConnectionConfig = { +const config: tedious.ConnectionConfig = { userName: "rogier", password: "rogiers password", server: "127.0.0.1", @@ -11,12 +11,12 @@ var config: tedious.ConnectionConfig = { } }; -var poolConfig : ConnectionPool.PoolConfig = { +const poolConfig: ConnectionPool.PoolConfig = { min: 1, max: 4 }; -var pool: ConnectionPool = new ConnectionPool(poolConfig, config); +const pool: ConnectionPool = new ConnectionPool(poolConfig, config); pool.on('error', (err: Error) => { console.error(err); @@ -34,8 +34,7 @@ pool.acquire((err: Error, connection: ConnectionPool.PooledConnection) => { connection.rollbackTransaction((error: Error): void => {}); connection.commitTransaction((error: Error): void => {}); - - var request = new tedious.Request("SELECT * FROM foo", (error: Error, rowCount: number): void => { + const request = new tedious.Request("SELECT * FROM foo", (error: Error, rowCount: number): void => { }); request.on("row", (row: tedious.ColumnValue[]): void => { }); @@ -43,11 +42,5 @@ pool.acquire((err: Error, connection: ConnectionPool.PooledConnection) => { connection.release(); - pool.drain(); }); - - - - - diff --git a/types/tedious/index.d.ts b/types/tedious/index.d.ts index 39d8664e0d..b89ac58beb 100644 --- a/types/tedious/index.d.ts +++ b/types/tedious/index.d.ts @@ -297,7 +297,7 @@ export interface ConnectionConfig { export interface ParameterOptions { // for VarChar, NVarChar, VarBinary - length?: number; + length?: number | 'max'; // precision for Numeric, Decimal precision?: number; // scale for Numeric, Decimal, Time, DateTime2, DateTimeOffset diff --git a/types/tinymce/index.d.ts b/types/tinymce/index.d.ts index 04ac24d056..70d73315ea 100644 --- a/types/tinymce/index.d.ts +++ b/types/tinymce/index.d.ts @@ -5,26 +5,22 @@ // Work In Progress -import 'jquery'; +/// +export namespace tinymce { + const DOM: dom.DOMUtils; + const PluginManager: AddOnManager; + const ScriptLoader: dom.ScriptLoader; -declare namespace tinymce { + const ThemeManager: AddOnManager; - var DOM: dom.DOMUtils; + const EditorManager: EditorManager; - var PluginManager: AddOnManager; + const baseURL: string; - var ScriptLoader: dom.ScriptLoader; - - var ThemeManager: AddOnManager; - - var EditorManager: EditorManager; - - var baseURL: string; - - var activeEditor: Editor; + const activeEditor: Editor; function create(s: string, p: {}, root?: {}): void; @@ -53,10 +49,10 @@ declare namespace tinymce { function trim(s: string): string; function walk(o: {}, f: () => void, n?: string, s?: string): void; - + function init(settings: Settings): void; - export interface Settings { + interface Settings { table_toolbar?: boolean; auto_focus?: string; @@ -69,17 +65,17 @@ declare namespace tinymce { hidden_input?: boolean; - init_instance_callback?: (editor: Editor) => void; + init_instance_callback?(editor: Editor): void; plugins?: string | string[]; selector?: string; - setup?: (edtor: Editor) => void; + setup?(edtor: Editor): void; target?: Element; - color_picker_callback?: (callback: (hexColor: string) => void, value: string) => void; + color_picker_callback?(callback: (hexColor: string) => void, value: string): void; elementpath?: boolean; @@ -217,15 +213,15 @@ declare namespace tinymce { automatic_uploads?: boolean; - file_browser_callback?: (field_name: string, url: string, type: string, win: Window) => void; + file_browser_callback?(field_name: string, url: string, type: string, win: Window): void; file_browser_callback_types?: string; - file_picker_callback?: (callback: (filename: string, metadata: {}) => void, valud: string, meta: {}) => void; + file_picker_callback?(callback: (filename: string, metadata: {}) => void, valud: string, meta: {}): void; file_picker_types?: string; - images_dataimg_filter?: (img: any) => void; + images_dataimg_filter?(img: any): void; images_reuse_filename?: boolean; @@ -233,7 +229,7 @@ declare namespace tinymce { images_upload_credentials?: boolean; - images_upload_handler?: (blobInfo: any, success: (msg: string) => void, failure: (msg: string) => void) => void; + images_upload_handler?(blobInfo: any, success: (msg: string) => void, failure: (msg: string) => void): void; images_upload_url?: string; @@ -253,7 +249,7 @@ declare namespace tinymce { remove_script_host?: boolean; - urlconverter_callback?: (url: string, node: HTMLElement, on_save: boolean, name: string) => void; + urlconverter_callback?(url: string, node: HTMLElement, on_save: boolean, name: string): void; anchor_bottom?: string; @@ -270,12 +266,10 @@ declare namespace tinymce { object_resizing?: boolean | string; type_ahead_urls?: boolean; - } - export namespace settings { - - export interface Menu { + namespace settings { + interface Menu { file: MenuItem; edit: MenuItem; insert: MenuItem; @@ -285,14 +279,13 @@ declare namespace tinymce { tools: MenuItem; } - export interface MenuItem { + interface MenuItem { title: string; items: string; } } - export interface AddOnManager { - + interface AddOnManager { add(id: string, addOn: (editor: Editor, url: string) => void): Theme | Plugin; addComponents(pluginName: string, scripts: string[]): void; @@ -304,8 +297,7 @@ declare namespace tinymce { requireLangPack(name: string, languages?: string): void; } - export class Editor extends util.Observable { - + class Editor extends util.Observable { constructor(id: string, settings: Settings, editorManager: tinymce.EditorManager); $: dom.DomQuery; @@ -433,8 +425,7 @@ declare namespace tinymce { uploadImages(callback: () => void): Promise; } - export interface EditorCommands { - + interface EditorCommands { addCommands(command_list: {}, type?: string): void; execCommand(command: string, ui?: boolean, value?: {}, args?: {}): boolean; @@ -446,8 +437,7 @@ declare namespace tinymce { queryCommandValue(command: string): {}; } - export interface EditorManager extends util.Observable { - + interface EditorManager extends util.Observable { $: dom.DomQuery; activeEditor: Editor; @@ -493,8 +483,7 @@ declare namespace tinymce { triggerSave(): void; } - export interface Env { - + interface Env { android: boolean; ceFalse: boolean; @@ -524,10 +513,8 @@ declare namespace tinymce { webKit: boolean; } - export namespace Events { - - export interface Event { - + namespace Events { + interface Event { type: string; target: string; @@ -545,13 +532,11 @@ declare namespace tinymce { stopPropagation(): void; } - export interface FocusBlurEvent extends Event { - + interface FocusBlurEvent extends Event { blurredEditor: Editor; } - export interface ContentEvent extends Event { - + interface ContentEvent extends Event { format: string; set: boolean; @@ -559,8 +544,7 @@ declare namespace tinymce { content: string; } - export interface ProcessEvent extends Event { - + interface ProcessEvent extends Event { content: string; forced_root_block: string; @@ -576,8 +560,7 @@ declare namespace tinymce { selection: true; } - export interface NodeChangeEvent extends Event { - + interface NodeChangeEvent extends Event { element: Node; parents: Node[]; @@ -585,20 +568,17 @@ declare namespace tinymce { selectionChange: boolean; } - export interface UndoRedoEvent extends Event { - + interface UndoRedoEvent extends Event { level: {}; } - export interface ChangeEvent extends Event { - + interface ChangeEvent extends Event { lastLevel: {}; level: {}; } - export interface CommandEvent extends Event { - + interface CommandEvent extends Event { command: string; ui: boolean; @@ -612,8 +592,7 @@ declare namespace tinymce { static isEditorUIElement(elm: Element): boolean; } - export interface Formatter { - + interface Formatter { apply(name: string, vars?: {}, node?: html.Node): void; canApply(name: string): boolean; @@ -639,25 +618,21 @@ declare namespace tinymce { unregister(name: string): void; } - export class Formatter implements Formatter { - + class Formatter implements Formatter { constructor(ed: Editor); } - export interface Shortcuts { - + interface Shortcuts { add(pattern: string, desc: string, cmdFunc: () => void | string, scope?: {}): boolean; remove(pattern: string): boolean; } - export interface Theme { - + interface Theme { renderUI(obj: {}): {}; } - export interface UndoManager { - + interface UndoManager { add(level?: {}, event?: DocumentEvent): {}; beforeChange(): void; @@ -677,8 +652,7 @@ declare namespace tinymce { undo(): {}; } - export interface WindowManager { - + interface WindowManager { alert(message: string, callback: () => void, scope?: {}): void; close(): void; @@ -694,8 +668,7 @@ declare namespace tinymce { setParams(params: {}): void; } - export interface notificationManager { - + interface notificationManager { close(): void; getNotifications(): Array<{}>; @@ -703,14 +676,12 @@ declare namespace tinymce { open(args?: {}): void; } - export namespace ui { - export interface ControlSettings { + namespace ui { + interface ControlSettings { menu: ui.Menu; } - interface Collection { - - } + interface Collection {} interface Container { add(items: any): Collection; @@ -721,19 +692,15 @@ declare namespace tinymce { moveRel(elm: Node, rel: string): Control; } - interface FloatPanel extends Control, Moveable { + interface FloatPanel extends Control, Moveable {} - } - - interface Menu extends FloatPanel, Control, Container { - - } + interface Menu extends FloatPanel, Control, Container {} interface Factory { create(settings: any): Control; } - export class Control { + class Control { constructor(); $el: JQuery; @@ -745,10 +712,8 @@ declare namespace tinymce { } } - export namespace dom { - - export interface BookmarkManager { - + namespace dom { + interface BookmarkManager { getBookmark(type?: number, normalized?: boolean): {}; isBookmarkNode(node: HTMLElement): boolean; @@ -756,8 +721,7 @@ declare namespace tinymce { moveToBookmark(bookmark: {}): boolean; } - export interface DOMUtils { - + interface DOMUtils { add(parentElm: string, name: string, attrs?: {}, html?: string, create?: boolean): Element | T[]; addClass(elm: string, cls: string): string | T[]; @@ -873,13 +837,11 @@ declare namespace tinymce { uniqueId(prefix?: string): string; } - export class DOMUtils implements DOMUtils { - + class DOMUtils implements DOMUtils { constructor(doc: Document, settings?: {}); } - export interface DomQuery { - + interface DomQuery { add(items: T[], sort?: boolean): DomQuery; addClass(className: string): DomQuery; @@ -993,13 +955,11 @@ declare namespace tinymce { wrapInner(content: string): DomQuery; } - export class DomQuery implements DomQuery { - + class DomQuery implements DomQuery { constructor(selector?: string, context?: Document); } - export interface EventUtils { - + interface EventUtils { bind(target: {}, names: string, callback: () => void, scope: {}): () => void; clean(target: {}): EventUtils; @@ -1009,15 +969,13 @@ declare namespace tinymce { unbind(target: {}, names?: string, callback?: () => void): EventUtils; } - export interface RangeUtils { - + interface RangeUtils { compareRanges(rng1: Range, rng2: Range): boolean; getCaretRangeFromPoint(clientX: number, clientY: number, doc: Document): Range; } - export interface ScriptLoader { - + interface ScriptLoader { add(url: string, success?: () => void, scope?: {}, failure?: () => void): void; isDone(url: string): boolean; @@ -1031,8 +989,7 @@ declare namespace tinymce { markDone(url: string): void; } - export interface Selection { - + interface Selection { collapse(toStart?: boolean): void; getBookmark(type?: number, normalized?: boolean): {}; @@ -1066,13 +1023,11 @@ declare namespace tinymce { setRng(rng: Range, forward?: boolean): void; } - export class Selection implements Selection { - + class Selection implements Selection { constructor(dom: DOMUtils, win: Window, editor: Editor, serializer: Serializer); } - export interface Serializer { - + interface Serializer { addAttributeFilter(callback: () => void): void; addNodeFilter(callback: () => void): void; @@ -1084,16 +1039,13 @@ declare namespace tinymce { serialize(node: HTMLElement, args: {}): void; setRules(rules: string): void; - } - export class Serializer implements Serializer { - + class Serializer implements Serializer { constructor(settings: {}, editor?: Editor); } - export interface TreeWalker { - + interface TreeWalker { current(): html.Node; next(): html.Node; @@ -1102,15 +1054,12 @@ declare namespace tinymce { } } - export class TreeWalker implements TreeWalker { - + class TreeWalker implements TreeWalker { constructor(startNode: html.Node, rootNode: html.Node); } - export namespace geom { - - export interface Rect { - + namespace geom { + interface Rect { clamp(rect: Rect, clampRect: Rect, fixedSize: boolean): Rect; create(x: number, y: number, w: number, h: number): Rect; @@ -1127,10 +1076,8 @@ declare namespace tinymce { } } - export namespace html { - - export interface DomParser { - + namespace html { + interface DomParser { addAttributeFilter(attributes: string, callback: () => void): void; addNodeFilter(attributes: string, callback: () => void): void; @@ -1140,13 +1087,11 @@ declare namespace tinymce { parse(html: string, args?: {}): html.Node; } - export class DomParser implements DomParser { - + class DomParser implements DomParser { constructor(settings: {}, schema: html.Schema); } - export interface Entities { - + interface Entities { decode(text: string): string; encodeAllRaw(text: string): string; @@ -1160,8 +1105,7 @@ declare namespace tinymce { getEncodeFunc(name: string, entities?: string): () => void; } - export interface Node { - + interface Node { append(node: html.Node): html.Node; attr(name: string, value?: string): string | html.Node; @@ -1189,23 +1133,19 @@ declare namespace tinymce { wrap(wrapperNode: html.Node): html.Node; } - export class Node implements Node { - + class Node implements Node { constructor(name: string, type: number); } - export interface SaxParser { - + interface SaxParser { parse(html: string): void; } - export class SaxParser implements SaxParser { - + class SaxParser implements SaxParser { constructor(settings: {}, schema: html.Schema); } - export interface Schema { - + interface Schema { addCustomElements(custom_elements: string): void; addValidChildren(valid_children: string): void; @@ -1249,23 +1189,19 @@ declare namespace tinymce { setValidElements(valid_elements: string): void; } - export class Schema implements Schema { - + class Schema implements Schema { constructor(settings: {}); } - export interface Serializer { - + interface Serializer { serialize(node: html.Node): string; } - export class Serializer implements Serializer { - + class Serializer implements Serializer { constructor(settings: {}, schema: html.Schema); } - export interface Styles { - + interface Styles { parse(css: string): {}; serialize(styles: {}, elementName: string): string; @@ -1273,8 +1209,7 @@ declare namespace tinymce { toHex(color: string): string; } - export interface Writer { - + interface Writer { cdata(text: string): void; doctype(text: string): void; @@ -1293,15 +1228,12 @@ declare namespace tinymce { } } - export class Writer implements Writer { - + class Writer implements Writer { constructor(settings: {}); } - export namespace util { - - export interface Color { - + namespace util { + interface Color { parse(value: {}): util.Color; toHex(): string; @@ -1311,13 +1243,11 @@ declare namespace tinymce { toRgb(): {}; } - export class Color implements Color { - + class Color implements Color { constructor(value: string | {}); } - export interface Delay { - + interface Delay { clearInterval(interval: number): void; clearTimeout(timeout: number): void; @@ -1335,8 +1265,7 @@ declare namespace tinymce { setTimeout(callback: () => void, time: number): number; } - export interface EventDispatcher { - + interface EventDispatcher { fire(name: string, args?: {}): {}; has(name: string): boolean; @@ -1350,8 +1279,7 @@ declare namespace tinymce { once(name: string, callback: () => void, first: boolean): {}; } - export interface i18n { - + interface i18n { rtl: boolean; add(code: string, items: Array<{}>): void; @@ -1363,22 +1291,19 @@ declare namespace tinymce { translate(text: string): string; } - export interface JSON { - + interface JSON { parse(s: string): {}; serialize(obj: {}, quote?: string): string; } - export interface JSONRequest { - + interface JSONRequest { send(args: {}): void; sendRPC(o: {}): void; } - export interface LocalStorage { - + interface LocalStorage { length: number; clear(): void; @@ -1392,8 +1317,7 @@ declare namespace tinymce { setItem(key: string, value: string): void; } - export class Observable { - + class Observable { fire(name: string, args?: {}, bubble?: boolean): {}; hasEventListeners(name: string): boolean; @@ -1405,8 +1329,7 @@ declare namespace tinymce { once(name: string, callback: (event: any) => void): {}; } - export interface Tools { - + interface Tools { create(s: string, p: {}, root?: {}): void; createNS(n: string, o?: {}): {}; @@ -1436,8 +1359,7 @@ declare namespace tinymce { walk(o: {}, f: () => void, n?: string, s?: string): void; } - export interface URI { - + interface URI { getURI(noProtoHost: boolean): URI; isSameOrigin(uri: util.URI): boolean; @@ -1453,13 +1375,11 @@ declare namespace tinymce { toRelative(uri: string): string; } - export class URI implements URI { - + class URI implements URI { constructor(url: string, settings?: {}); } - export interface XHR { - + interface XHR { fire(name: string, args?: {}, bubble?: boolean): {}; hasEventListeners(name: string): boolean; @@ -1472,6 +1392,5 @@ declare namespace tinymce { send(settings: {}): void; } - } } diff --git a/types/tinymce/tinymce-tests.ts b/types/tinymce/tinymce-tests.ts index 09c3dd523b..7165ab25a7 100644 --- a/types/tinymce/tinymce-tests.ts +++ b/types/tinymce/tinymce-tests.ts @@ -1,19 +1,16 @@ import { tinymce } from 'tinymce'; -tinymce.init( - { - selector: 'textarea', - height: 500, - menubar: false, - plugins: [ - 'advlist autolink lists link image charmap print preview anchor', - 'searchreplace visualblocks code fullscreen', - 'insertdatetime media table contextmenu paste code' - ], - toolbar: 'undo redo | insert | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image', - content_css: '//www.tinymce.com/css/codepen.min.css' - } -); +tinymce.init({ + selector: 'textarea', + height: 500, + menubar: false, + plugins: [ + 'advlist autolink lists link image charmap print preview anchor', + 'searchreplace visualblocks code fullscreen', + 'insertdatetime media table contextmenu paste code' + ], + toolbar: 'undo redo | insert | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image', + content_css: '//www.tinymce.com/css/codepen.min.css' +}); - -let t = new tinymce.util.Color('#FFFFFF'); +const t = new tinymce.util.Color('#FFFFFF'); diff --git a/types/tinymce/tslint.json b/types/tinymce/tslint.json index 377cc837d4..105f5736e6 100644 --- a/types/tinymce/tslint.json +++ b/types/tinymce/tslint.json @@ -1 +1,6 @@ -{ "extends": "../tslint.json" } +{ + "extends": "../tslint.json", + "rules": { + "no-empty-interface": false + } +} diff --git a/types/transducers-js/transducers-js-tests.ts b/types/transducers-js/transducers-js-tests.ts index d11825838f..30b91d8f47 100644 --- a/types/transducers-js/transducers-js-tests.ts +++ b/types/transducers-js/transducers-js-tests.ts @@ -2,7 +2,7 @@ import * as t from 'transducers-js'; -var map = t.map, +const map = t.map, filter = t.filter, comp = t.comp, into = t.into; @@ -11,119 +11,119 @@ var map = t.map, function inc(n: number) { return n + 1; }; function isEven(n: number) { return n % 2 === 0; }; -var xf = comp(map(inc), filter(isEven)); +let xf = comp(map(inc), filter(isEven)); into([], xf, [0, 1, 2, 3, 4]); // [2, 4] // integration -var arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10], - apush = (arr: number[], x: number) => { arr.push(x); return arr; }, - xf = comp(map(inc), filter(isEven)), - toFn = t.toFn; +const arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; +const apush = (arr: number[], x: number) => { arr.push(x); return arr; }; +xf = comp(map(inc), filter(isEven)); +const toFn = t.toFn; arr.reduce(toFn(xf, apush), []); // native // source examples function mapExample() { - var xf = t.map(inc); + const xf = t.map(inc); t.into([], xf, [1, 2, 3]); // [2, 3, 4] } function filterExample() { - var xf = t.filter(isEven); + const xf = t.filter(isEven); t.into([], xf, [0, 1, 2, 3, 4]); // [0, 2, 4]; } function removeExample() { - var xf = t.remove(isEven); + const xf = t.remove(isEven); t.into([], xf, [0, 1, 2, 3, 4]); // [1, 3]; } function complementExample() { - var isOdd = t.complement(isEven); + const isOdd = t.complement(isEven); } function keepIndexedExample() { - var xf = t.keepIndexed((i: number, x: string|number) => { if (typeof x === "string") return "cool"; }); + const xf = t.keepIndexed((i: number, x: string|number) => { if (typeof x === "string") return "cool"; }); t.into([], xf, [0, 1, "foo", 3, 4, "bar"]); // ["foo", "bar"] } function takeExample() { - var xf = t.take(3); + const xf = t.take(3); t.into([], xf, [0, 1, 2, 3, 4, 5]); // [0, 1, 2]; } function takeWhileExample() { - var xf = t.takeWhile(n => n < 3); + const xf = t.takeWhile(n => n < 3); t.into([], xf, [0, 1, 2, 3, 4, 5]); // [0, 1, 2]; } function intoExample() { - var xf = t.comp(t.map(inc), t.filter(isEven)); + const xf = t.comp(t.map(inc), t.filter(isEven)); t.into([], xf, [1, 2, 3, 4]); // [2, 4] } function toFnExample() { - var arr = [0, 1, 2, 3, 4, 5]; - var xf = t.comp(t.map(inc), t.filter(isEven)); + const arr = [0, 1, 2, 3, 4, 5]; + const xf = t.comp(t.map(inc), t.filter(isEven)); arr.reduce(t.toFn(xf, apush), []); // [2, 4, 6] } function takeNthExample() { - var xf = t.takeNth(3); + const xf = t.takeNth(3); t.into([], xf, [0, 1, 2, 3, 4, 5]); // [2, 5]; } function dropExample() { - var xf = t.drop(3); + const xf = t.drop(3); t.into([], xf, [0, 1, 2, 3, 4, 5]); // [3, 4, 5]; } function dropWhileExample() { - var xf = t.dropWhile(n => n < 3); + const xf = t.dropWhile(n => n < 3); t.into([], xf, [0, 1, 2, 3, 4, 5]); // [3, 4, 5]; } function partitionByExample() { - var xf = t.partitionBy((x: string|number) => typeof x === "string"); + const xf = t.partitionBy((x: string|number) => typeof x === "string"); t.into([], xf, [0, 1, "foo", "bar", 2, 3, "bar", "baz"]); // [[0, 1], ["foo", "bar"], [2, 3], ["bar", "baz"]]; } function partitionAllExample() { - var xf = t.partitionAll(3); + const xf = t.partitionAll(3); t.into([], xf, [0, 1, 2, 3, 4, 5]); // [[0, 1, 2], [3, 4, 5]] } function wrapExample() { - var arrayPush = t.wrap((arr: number[], x: number) => { arr.push(x); return arr; }); + const arrayPush = t.wrap((arr: number[], x: number) => { arr.push(x); return arr; }); } function ensureReducedExample() { - var x = t.ensureReduced(1); - var y = t.ensureReduced(x); + const x = t.ensureReduced(1); + const y = t.ensureReduced(x); x === y; // true } function unreducedExample() { - var x = t.reduced(1); + const x = t.reduced(1); t.unreduced(x); // 1 t.unreduced(t.unreduced(x)); // 1 } function reverse(arr: number[]) { - var arr: number[] = Array.prototype.slice.call(arr, 0); + arr = Array.prototype.slice.call(arr, 0); arr.reverse(); return arr; } function catExample() { - var xf = t.comp(t.map(reverse), t.cat); + const xf = t.comp(t.map(reverse), t.cat); t.into([], xf, [[3, 2, 1], [6, 5, 4]]); // [1, 2, 3, 4, 5, 6] } function mapcatExample() { - var xf = t.mapcat(reverse); + const xf = t.mapcat(reverse); t.into([], xf, [[3, 2, 1], [6, 5, 4]]); // [1, 2, 3, 4, 5, 6] } diff --git a/types/transducers-js/tslint.json b/types/transducers-js/tslint.json index f05741c59b..b0e7084e94 100644 --- a/types/transducers-js/tslint.json +++ b/types/transducers-js/tslint.json @@ -1,6 +1,6 @@ { "extends": "../tslint.json", "rules": { - "forbidden-types": false + "ban-types": false } } diff --git a/types/tslint.json b/types/tslint.json index 490445671d..36eac22f51 100644 --- a/types/tslint.json +++ b/types/tslint.json @@ -1 +1,7 @@ -{ "extends": "../node_modules/types-publisher/tslint-definitions.json" } +{ + "extends": "dtslint/dtslint.json", + "rules": { + // https://github.com/palantir/tslint/pull/2391 + "prefer-const": false + } +} diff --git a/types/tweezer.js/index.d.ts b/types/tweezer.js/index.d.ts new file mode 100644 index 0000000000..ae1f93030b --- /dev/null +++ b/types/tweezer.js/index.d.ts @@ -0,0 +1,24 @@ +// Type definitions for tweezer.js 1.4 +// Project: https://github.com/jaxgeller/tweezer.js +// Definitions by: Lindsey Smith +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +interface Options { + duration?: number; + easing?(currentTime: number, beginningTime: number, changeInValue: number, duration: number): number; + start: number; + end: number; +} + +declare class Tweezer { + constructor(opts: Options); + + stop(): this; + + on(name: 'tick', handler: (v: number) => void): this; + on(name: 'done', handler: () => void): this; + + begin(): this; +} + +export default Tweezer; diff --git a/types/tweezer.js/tsconfig.json b/types/tweezer.js/tsconfig.json new file mode 100644 index 0000000000..801c03fe35 --- /dev/null +++ b/types/tweezer.js/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "tweezer.js-tests.ts" + ] +} \ No newline at end of file diff --git a/types/tweezer.js/tslint.json b/types/tweezer.js/tslint.json new file mode 100644 index 0000000000..2221e40e4a --- /dev/null +++ b/types/tweezer.js/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } \ No newline at end of file diff --git a/types/tweezer.js/tweezer.js-tests.ts b/types/tweezer.js/tweezer.js-tests.ts new file mode 100644 index 0000000000..4fb7e7a05c --- /dev/null +++ b/types/tweezer.js/tweezer.js-tests.ts @@ -0,0 +1,28 @@ +import Tweezer from 'tweezer.js'; + +const tweezer = new Tweezer({ + start: 100, + end: 200, +}); + +tweezer + .on('tick', (foo) => { foo.toFixed(); }) + .on('done', () => {}) + .begin() + .stop(); + +function testEaser(currentTime: number, beginningTime: number, changeInValue: number, duration: number) { + return 42; +} + +const tweezer2 = new Tweezer({ + start: 100, + end: 200, + easing: testEaser +}); + +const tweezer3 = new Tweezer({ + start: 100, + end: 200, + duration: 42 +}); diff --git a/types/ui-router-extras/index.d.ts b/types/ui-router-extras/index.d.ts index 81ddddfc75..647263c912 100644 --- a/types/ui-router-extras/index.d.ts +++ b/types/ui-router-extras/index.d.ts @@ -8,9 +8,7 @@ import * as angular from 'angular'; declare module 'angular' { - export namespace ui { - - + namespace ui { /* * $deepStateRedirect */ @@ -64,7 +62,6 @@ declare module 'angular' { * Previous state service */ interface IPreviousStateService { - /** * Get a previous state * @param memoName Memo name @@ -96,8 +93,8 @@ declare module 'angular' { } /** - * Sticky state - */ + * Sticky state + */ interface IStickyState extends angular.ui.IState { /* * When marking a state sticky, the state must target its own unique named ui-view. @@ -117,18 +114,17 @@ declare module 'angular' { /* * Function (injectable). Called when a sticky state is navigated away from (inactivated). */ - onInactivate?: (...args: any[]) => void; + onInactivate?(...args: any[]): void; /* * Function (injectable). Called when an inactive sticky state is navigated to (reactivated). */ - onReactivate?: (...args: any[]) => void; + onReactivate?(...args: any[]): void; /* * Note: named views are mandatory when using sticky states! */ views?: { [name: string]: angular.ui.IState }; } - /** * Sticky state service */ @@ -150,9 +146,7 @@ declare module 'angular' { state(name: string, config: IStickyState): IStateProvider; } - interface IFutureStateProvider { - /** * Registers a `FutureState` object as a placeholder for a full UI-Router `state` or `state` tree. */ @@ -164,31 +158,28 @@ declare module 'angular' { stateFactory(type: string, stateFactory: IFutureStateFactory): void; /** - * Adds a resolve function. - * `$futureStateProvider` won't reject any state transitions or routes until all resolveFunction promises have been resolved. + * Adds a resolve function. + * `$futureStateProvider` won't reject any state transitions or routes until all resolveFunction promises have been resolved. * Resolves may be used to defer routing until the states have been loaded via $http, for instance. */ addResolve(resolveFn: IResolveFunction): void; } - interface IFutureStateService { - - } + interface IFutureStateService {} /** * A `FutureState` object is a placeholder for full a UI-Router `state` */ interface IFutureState { - /** - * The placeholder state name (fully qualified). + * The placeholder state name (fully qualified). * Attempted transitions to this state (or any substates) will trigger a lazy load of the full UI-Router `state` represented by this FutureState. */ stateName: string; /** - * The placeholder url path fragment (the fragment is the URL prefix which the state will be accessed on, not the URL of the state's source code). - * Attempted navigations to a URL starting with this fragment will trigger a lazy load of the full UI-Router `state` represented by this FutureState. + * The placeholder url path fragment (the fragment is the URL prefix which the state will be accessed on, not the URL of the state's source code). + * Attempted navigations to a URL starting with this fragment will trigger a lazy load of the full UI-Router `state` represented by this FutureState. */ url: string; diff --git a/types/ui-router-extras/tslint.json b/types/ui-router-extras/tslint.json index 19dc9db271..535e89e2ef 100644 --- a/types/ui-router-extras/tslint.json +++ b/types/ui-router-extras/tslint.json @@ -1,8 +1,7 @@ { "extends": "../tslint.json", "rules": { - "interface-name": [ - false - ] + "interface-name": false, + "no-empty-interface": false } } diff --git a/types/ui-router-extras/ui-router-extras-tests.ts b/types/ui-router-extras/ui-router-extras-tests.ts index 427c0ca498..df560356aa 100644 --- a/types/ui-router-extras/ui-router-extras-tests.ts +++ b/types/ui-router-extras/ui-router-extras-tests.ts @@ -1,23 +1,20 @@ import * as angular from 'angular'; -var myApp = angular.module('testModule') +const myApp = angular.module('testModule'); myApp.config(($stateProvider: angular.ui.IStateProvider, $stickyStateProvider: angular.ui.IStickyStateProvider) => { - var state: angular.ui.IStickyState = { + const state: angular.ui.IStickyState = { name: 'test', sticky: true, dsr: { default: 'substate', params: ['param1', 'param2'], - fn: ($dsr$) => { - - return $dsr$.to; - } + fn: ($dsr$) => $dsr$.to, }, onInactivate: ($state: angular.ui.IState) => { - var iAmInjectedByInjector = $state; + const iAmInjectedByInjector = $state; }, onReactivate: ($state: angular.ui.IState) => { - var iAmInjectedByInjector = $state; + const iAmInjectedByInjector = $state; }, controller: ($previousState: angular.ui.IPreviousStateService, $deepstateRedirect: angular.ui.IDeepStateRedirectService) => { $previousState.memo('test-memo1'); @@ -37,7 +34,7 @@ myApp.config(($stateProvider: angular.ui.IStateProvider, $stickyStateProvider: a }); }, views: { - //named views are mandatory + // named views are mandatory 'name1': {} } }; @@ -51,16 +48,13 @@ myApp.config(($stateProvider: angular.ui.IStateProvider, $stickyStateProvider: a dsr: { default: 'substate', params: ['param1', 'param2'], - fn: ($dsr$) => { - - return $dsr$.to; - } + fn: $dsr$ => $dsr$.to, }, onInactivate: ($state: angular.ui.IState) => { - var iAmInjectedByInjector = $state; + const iAmInjectedByInjector = $state; }, onReactivate: ($state: angular.ui.IState) => { - var iAmInjectedByInjector = $state; + const iAmInjectedByInjector = $state; }, controller: ($previousState: angular.ui.IPreviousStateService, $deepstateRedirect: angular.ui.IDeepStateRedirectService) => { $previousState.memo('test-memo1'); @@ -80,7 +74,7 @@ myApp.config(($stateProvider: angular.ui.IStateProvider, $stickyStateProvider: a }); }, views: { - //named views are mandatory + // named views are mandatory 'name1': {} } }); @@ -91,16 +85,13 @@ myApp.config(($stateProvider: angular.ui.IStateProvider, $stickyStateProvider: a dsr: { default: 'substate', params: ['param1', 'param2'], - fn: ($dsr$) => { - - return $dsr$.to; - } + fn: $dsr$ => $dsr$.to, }, onInactivate: ($state: angular.ui.IState) => { - var iAmInjectedByInjector = $state; + const iAmInjectedByInjector = $state; }, onReactivate: ($state: angular.ui.IState) => { - var iAmInjectedByInjector = $state; + const iAmInjectedByInjector = $state; }, controller: ($previousState: angular.ui.IPreviousStateService, $deepstateRedirect: angular.ui.IDeepStateRedirectService) => { $previousState.memo('test-memo1'); @@ -120,44 +111,43 @@ myApp.config(($stateProvider: angular.ui.IStateProvider, $stickyStateProvider: a }); }, views: { - //named views are mandatory + // named views are mandatory 'name1': {} } }); - }); -var templateLoadStateFactory: ng.ui.IFutureStateFactory = ($q: ng.IQService, $timeout: ng.ITimeoutService, futureState: ng.ui.IFutureState) => { - var d = $q.defer(); +const templateLoadStateFactory: ng.ui.IFutureStateFactory = ($q: ng.IQService, $timeout: ng.ITimeoutService, futureState: ng.ui.IFutureState) => { + const d = $q.defer(); $timeout(() => { - var fullUiRouterState = { + const fullUiRouterState = { name: futureState.stateName, url: futureState.url, template: '

    Template

    ' - } + }; d.resolve(fullUiRouterState); // Async resolve of ui-router state promise }, 1000); return d.promise; // ui-router state promise returned -} +}; myApp.config(($futureStateProvider: ng.ui.IFutureStateProvider) => { $futureStateProvider.addResolve(($q: ng.IQService, $timeout: ng.ITimeoutService) => { - var d = $q.defer(); + const d = $q.defer(); $timeout(() => { d.resolve("When this resolves, future state provider will re-sync the state/url"); }, 1000); return d.promise; }); - var futureState = { type: 'ngload', stateName: 'foo', url: '/foo', src: 'foo.js' }; + const futureState = { type: 'ngload', stateName: 'foo', url: '/foo', src: 'foo.js' }; $futureStateProvider.futureState(futureState); $futureStateProvider.stateFactory('ngload', templateLoadStateFactory); }); -var adminModuleFutureState: ng.ui.IFutureState = { +const adminModuleFutureState: ng.ui.IFutureState = { stateName: 'app.admin', url: '/admin', type: 'ngload', src: 'js/modules/admin.js' // example custom attr -} +}; diff --git a/types/uikit/index.d.ts b/types/uikit/index.d.ts index 11a68c1848..de14822d28 100644 --- a/types/uikit/index.d.ts +++ b/types/uikit/index.d.ts @@ -153,7 +153,7 @@ declare namespace UIkit { * Parameter * Description * - + * * * show.uk.modal * event @@ -168,15 +168,14 @@ declare namespace UIkit { * @example *
    
          * $('.modalSelector').on({
    -	 *
    -	 *	'show.uk.modal': function(){
    -	 *    console.log("Modal is visible.");
    -	 *	},
    -	 *
    -	 *   'hide.uk.modal': function(){
    -	 *    console.log("Element is not visible.");
    -	 *  }
    -	 *	});
    +     *     'show.uk.modal': function(){
    +     *         console.log("Modal is visible.");
    +     *     },
    +     *
    +     *     'hide.uk.modal': function(){
    +     *         console.log("Element is not visible.");
    +     *     }
    +     * });
          * 
    */ interface Modal { @@ -227,10 +226,10 @@ declare namespace UIkit { * var modal = UIkit.modal(".modalSelector"); * * if ( modal.isActive() ) { - * modal.hide(); - * } else { - * modal.show(); - * } + * modal.hide(); + * } else { + * modal.show(); + * } * */ (selector: string|JQuery, options?: ModalOptions): ModalElement; @@ -326,7 +325,6 @@ declare namespace UIkit { * Init element manually */ (element: string|JQuery, options?: LightBoxOptions): LightBoxElement; - } type CallbackAutoComplete = () => string; interface AutoCompleteOptions { @@ -420,7 +418,6 @@ declare namespace UIkit { * @default 'auto' */ pos?: string; - } /** * Create a toggleable dropdown with an datepicker @@ -711,7 +708,6 @@ declare namespace UIkit { */ type SlideShow = (element: string|JQuery, options: SlideShowOptions) => any; interface ParallaxOptions { - /** * Animation velocity during scrolling * @default 0.5 @@ -736,7 +732,6 @@ declare namespace UIkit { * integer / string */ media?: number|string; - } /** * Animate CSS properties depending on the scroll position of the document. @@ -899,7 +894,6 @@ declare namespace UIkit { * integer */ delay?: number; - } /** * Easily create a nicely looking search. @@ -1020,7 +1014,6 @@ declare namespace UIkit { * string */ emptyClass?: string; - } /** * Create nestable lists that can be sorted by drag and drop. @@ -1091,7 +1084,6 @@ declare namespace UIkit { * string */ dragCustomClass?: string; - } /** * Create sortable grids and lists to rearrange the order of its elements. @@ -1197,7 +1189,6 @@ declare namespace UIkit { * mixed */ boundary?: boolean|string; - } /** * Make elements remain at the top of the viewport, like a sticky navbar. @@ -1244,7 +1235,6 @@ declare namespace UIkit { * Integer between 0 and 24 */ end?: number; - } /** * Create a timepicker which can easily be used by selecting a time value from a pre filled dropdown. @@ -1294,7 +1284,6 @@ declare namespace UIkit { * string */ activeClass?: string; - } /** * Easily create a nicely looking tooltip. @@ -1351,19 +1340,19 @@ declare namespace UIkit { * (text|json) */ "type"?: string; - before?: (settings: UploadOptions, files: string|string[]) => any; - beforeAll?: (files: string|string[]) => any; - beforeSend?: (xhr: XMLHttpRequest) => any; - progress?: (percent: number) => any; - complete?: (response: any, xhr: XMLHttpRequest) => any; - allcomplete?: (response: any, xhr: XMLHttpRequest) => any; - notallowed?: (file: string|string[], settings: UploadOptions) => any; - loadstart?: (event: any) => any; - load?: (event: any) => any; - loadend?: (event: any) => any; - error?: (event: any) => any; - abort?: (event: any) => any; - readystatechange?: (event: any) => any; + before?(settings: UploadOptions, files: string|string[]): any; + beforeAll?(files: string|string[]): any; + beforeSend?(xhr: XMLHttpRequest): any; + progress?(percent: number): any; + complete?(response: any, xhr: XMLHttpRequest): any; + allcomplete?(response: any, xhr: XMLHttpRequest): any; + notallowed?(file: string|string[], settings: UploadOptions): any; + loadstart?(event: any): any; + load?(event: any): any; + loadend?(event: any): any; + error?(event: any): any; + abort?(event: any): any; + readystatechange?(event: any): any; } /** @@ -1430,25 +1419,25 @@ declare namespace UIkit { * */ type Upload = (element: string|JQuery, options: UploadOptions) => any; - var dropdown: Dropdown; - var modal: Modal; - var lightbox: LightBox; - var offcanvas: OffCanvas; - var autocomplete: AutoComplete; - var datepicker: DatePicker; - var htmleditor: HtmlEditor; - var slider: Slider; - var slideset: SlideSet; - var slideshow: SlideShow; - var parallax: Parallax; - var accordion: Accordion; - var notify: Notify; - var search: Search; - var nestable: Nestable; - var sortable: Sortable; - var sticky: Sticky; - var timepicker: Timepicker; - var tooltip: Tooltip; - var uploadSelect: Upload; - var uploadDrop: Upload; + const dropdown: Dropdown; + const modal: Modal; + const lightbox: LightBox; + const offcanvas: OffCanvas; + const autocomplete: AutoComplete; + const datepicker: DatePicker; + const htmleditor: HtmlEditor; + const slider: Slider; + const slideset: SlideSet; + const slideshow: SlideShow; + const parallax: Parallax; + const accordion: Accordion; + const notify: Notify; + const search: Search; + const nestable: Nestable; + const sortable: Sortable; + const sticky: Sticky; + const timepicker: Timepicker; + const tooltip: Tooltip; + const uploadSelect: Upload; + const uploadDrop: Upload; } diff --git a/types/uikit/uikit-tests.ts b/types/uikit/uikit-tests.ts index 5a28b61682..a33780085e 100644 --- a/types/uikit/uikit-tests.ts +++ b/types/uikit/uikit-tests.ts @@ -13,7 +13,7 @@ function testDropdown() { hoverDelayIdle: 200, preventflip: 'x' }; - var dropdown = UIkit.dropdown("$parent", options); + const dropdown = UIkit.dropdown("$parent", options); dropdown.show(); dropdown.hide(); @@ -40,10 +40,10 @@ function testModal() { UIkit.modal.prompt("Name:", 'value', (newvalue: string) => { // will be executed on submit. }); - var modal = UIkit.modal.blockUI("Any content..."); + let modal = UIkit.modal.blockUI("Any content..."); modal.hide(); modal.show(); - var modal = UIkit.modal(".modalSelector"); + modal = UIkit.modal(".modalSelector"); if (modal.isActive()) { modal.hide(); @@ -59,14 +59,14 @@ function testOffCanvas() { } function testLightBox() { - var element = "#group"; - var lightbox = UIkit.lightbox(element, {/* options */}); - var lightbox2 = UIkit.lightbox.create([ + const element = "#group"; + const lightbox = UIkit.lightbox(element, {/* options */}); + const lightbox2 = UIkit.lightbox.create([ {source: 'http://url/to/video.mp4', type: 'video'}, {source: 'http://url/to/image.jpg', type: 'image'} ]); lightbox2.show(); - var lightbox3 = UIkit.lightbox(element); + const lightbox3 = UIkit.lightbox(element); } function testAutoComplete() { @@ -75,31 +75,30 @@ function testAutoComplete() { } function testDatepicker() { - var datepicker = UIkit.datepicker("#element", {}); + const datepicker = UIkit.datepicker("#element", {}); } function testHtmlEditor() { - var htmleditor = UIkit.htmleditor("textarea", {/* options */}); + const htmleditor = UIkit.htmleditor("textarea", {/* options */}); } function testSlider() { - var slider = UIkit.slider("element", {}); + const slider = UIkit.slider("element", {}); } function testSlideSet() { - var slideset = UIkit.slideset("element", {}); + const slideset = UIkit.slideset("element", {}); } function testSlideShow() { - var slideshow = UIkit.slideshow("element", {}); + const slideshow = UIkit.slideshow("element", {}); } function testParallax() { - var parallax = UIkit.parallax("element", {}); + const parallax = UIkit.parallax("element", {}); } function testAccordion() { - var accordion = UIkit.accordion("element", {}); + const accordion = UIkit.accordion("element", {}); } - function testNotify() { UIkit.notify({ message: 'Bazinga!', @@ -108,8 +107,7 @@ function testNotify() { pos: 'top-center' }); - -// Shortcuts + // Shortcuts UIkit.notify('My message'); UIkit.notify('My message', status); UIkit.notify('My message', {/* options */}); @@ -119,100 +117,70 @@ function testNotify() { UIkit.notify("...", {status: 'info'}); } - function testSearch() { - var search = UIkit.search("element", {}); + const search = UIkit.search("element", {}); } function testNestable() { - var nestable = UIkit.nestable('element', {}); + const nestable = UIkit.nestable('element', {}); } function testSortable() { - var sortable = UIkit.sortable('element', {}); + const sortable = UIkit.sortable('element', {}); } function testStick() { - var sticky = UIkit.sticky('element', {}); + const sticky = UIkit.sticky('element', {}); } function testTimePicker() { - var timepicker = UIkit.timepicker('element', {}); + const timepicker = UIkit.timepicker('element', {}); } function testTooltip() { - var tooltip = UIkit.tooltip('element', {}); + const tooltip = UIkit.tooltip('element', {}); } function testUpload() { $(() => { + const progressbar = $("#progressbar"); + const bar = progressbar.find('.uk-progress-bar'); + const settings = { + action: '/', // upload url + allow : '*.(jpg|jpeg|gif|png)', // allow only images + loadstart() { + bar.css("width", "0%").text("0%"); + progressbar.removeClass("uk-hidden"); + }, + progress(percent: number) { + percent = Math.ceil(percent); + bar.css("width", percent + "%").text(percent + "%"); + }, + allcomplete(response: any) { + bar.css("width", "100%").text("100%"); - var progressbar = $("#progressbar"), - bar = progressbar.find('.uk-progress-bar'), - settings = { + setTimeout(() => { + progressbar.addClass("uk-hidden"); + }, 250); - action: '/', // upload url + alert("Upload Completed"); + } + }; - allow : '*.(jpg|jpeg|gif|png)', // allow only images - - loadstart() { - bar.css("width", "0%").text("0%"); - progressbar.removeClass("uk-hidden"); - }, - - progress(percent: number) { - percent = Math.ceil(percent); - bar.css("width", percent + "%").text(percent + "%"); - }, - - allcomplete(response: any) { - - bar.css("width", "100%").text("100%"); - - setTimeout(() => { - progressbar.addClass("uk-hidden"); - }, 250); - - alert("Upload Completed"); - } - }; - - var select = UIkit.uploadSelect($("#upload-select"), settings), - drop = UIkit.uploadDrop($("#upload-drop"), settings); + const select = UIkit.uploadSelect($("#upload-select"), settings); + const drop = UIkit.uploadDrop($("#upload-drop"), settings); }); // Test with object literal - var select2 = UIkit.uploadSelect($("#upload-select"), { - + const select2 = UIkit.uploadSelect($("#upload-select"), { action: '/', // upload url - allow: '*.(jpg|jpeg|gif|png)', // allow only images - - loadstart: () => { - - }, - - progress: (percent: number) => { - - }, - - allcomplete: (response: any) => { - - } + loadstart: () => {}, + progress: (percent: number) => {}, + allcomplete: (response: any) => {} }); - var drop2 = UIkit.uploadDrop($("#upload-drop"), { - + const drop2 = UIkit.uploadDrop($("#upload-drop"), { action: '/', // upload url - allow: '*.(jpg|jpeg|gif|png)', // allow only images - - loadstart: () => { - - }, - - progress: (percent: number) => { - - }, - - allcomplete: (response: any) => { - } + loadstart: () => {}, + progress: (percent: number) => {}, + allcomplete: (response: any) => {} }); - } diff --git a/types/universal-router/index.d.ts b/types/universal-router/index.d.ts index e9f64a1846..b17256ce77 100644 --- a/types/universal-router/index.d.ts +++ b/types/universal-router/index.d.ts @@ -39,7 +39,7 @@ export interface ActionContext extends Context { */ export interface Route { path: string; - action: (ctx: ActionContext & C, params: Params) => R | Promise | void; + action(ctx: ActionContext & C, params: Params): R | Promise | void; children?: Routes; } diff --git a/types/universal-router/tslint.json b/types/universal-router/tslint.json index f05741c59b..b0e7084e94 100644 --- a/types/universal-router/tslint.json +++ b/types/universal-router/tslint.json @@ -1,6 +1,6 @@ { "extends": "../tslint.json", "rules": { - "forbidden-types": false + "ban-types": false } } diff --git a/types/universal-router/universal-router-tests.ts b/types/universal-router/universal-router-tests.ts index 5964ee1a90..1d20af187e 100644 --- a/types/universal-router/universal-router-tests.ts +++ b/types/universal-router/universal-router-tests.ts @@ -26,7 +26,6 @@ const routes2 = [ resolve(routes2, { path: "/hello/john" }) .then(result => console.log(result)); - // Test 3 const routes3 = [ { @@ -38,7 +37,6 @@ const routes3 = [ resolve(routes3, { path: "/hello/john" }) .then(result => console.log(result)); - // Test 4 const routes4 = [ { diff --git a/types/urijs/index.d.ts b/types/urijs/index.d.ts index 649dba4f0a..63df83601c 100644 --- a/types/urijs/index.d.ts +++ b/types/urijs/index.d.ts @@ -104,6 +104,11 @@ declare namespace uri { segment(position: number): string; segment(position: number, level: string): URI; segment(segment: string): URI; + segmentCoded(): string[]; + segmentCoded(segments: string[]): URI; + segmentCoded(position: number): string; + segmentCoded(position: number, level: string): URI; + segmentCoded(segment: string): URI; setQuery(key: string, value: string): URI; setQuery(qry: Object): URI; setSearch(key: string, value: string): URI; diff --git a/types/urijs/urijs-tests.ts b/types/urijs/urijs-tests.ts index 0c5e8dfb4b..12c853d8b4 100644 --- a/types/urijs/urijs-tests.ts +++ b/types/urijs/urijs-tests.ts @@ -39,6 +39,10 @@ URI('http://example.org/foo/hello.html').segment('bar'); URI('http://example.org/foo/hello.html').segment(0, 'bar'); URI('http://example.org/foo/hello.html').segment(['foo', 'bar', 'foobar.html']); +URI('http://example.org/foo/hello.html').segmentCoded('foo bar'); +URI('http://example.org/foo/hello.html').segmentCoded(0, 'foo bar'); +URI('http://example.org/foo/hello.html').segmentCoded(['foo bar', 'bar foo', 'foo bar.html']); + var withDuplicates = URI("?bar=1&bar=1") .duplicateQueryParameters(true) .normalizeQuery() diff --git a/types/uuid-js/uuid-js-tests.ts b/types/uuid-js/uuid-js-tests.ts index 67ef73ba68..6662bb6cd8 100644 --- a/types/uuid-js/uuid-js-tests.ts +++ b/types/uuid-js/uuid-js-tests.ts @@ -1,28 +1,24 @@ import UUID = require('uuid-js'); - // Generate a V4 UUID -var uuid4 = UUID.create(); +const uuid4 = UUID.create(); console.log(uuid4.toString()); // Prints: 896b677f-fb14-11e0-b14d-d11ca798dbac - // Generate a V1 TimeUUID -var uuid1 = UUID.create(1); +const uuid1 = UUID.create(1); console.log(uuid1.toString()); - // First and last possible v1 TimeUUID for a given timestamp: -var date = new Date().getTime(); -var uuidFirst = UUID.fromTime(date, false); -var uuidLast = UUID.fromTime(date, true); +const date = new Date().getTime(); +const uuidFirst = UUID.fromTime(date, false); +const uuidLast = UUID.fromTime(date, true); console.log(uuidFirst.toString(), uuidLast.toString()); // Prints: aa0f9af0-0e1f-11e1-0000-000000000000 aa0f9af0-0e1f-11e1-c0ff-ffffffffffff - // Use these TimeUUID's to perform range queries in cassandra: -var today = new Date().getTime(); -var last30days = (new Date().setDate(today - 30)); +const today = new Date().getTime(); +const last30days = (new Date().setDate(today - 30)); -var rangeStart = UUID.firstFromTime(last30days); -var rangeEnd = UUID.lastFromTime(today); +const rangeStart = UUID.firstFromTime(last30days); +const rangeEnd = UUID.lastFromTime(today); diff --git a/types/vanilla-tilt/index.d.ts b/types/vanilla-tilt/index.d.ts index 828ca47513..e24208f563 100644 --- a/types/vanilla-tilt/index.d.ts +++ b/types/vanilla-tilt/index.d.ts @@ -6,7 +6,7 @@ /** * A smooth 3D tilt javascript library forked from Tilt.js (jQuery version). */ -export declare namespace VanillaTilt { +export namespace VanillaTilt { /** * Options which configures the tilting */ @@ -49,7 +49,7 @@ export declare namespace VanillaTilt { easing?: string; } - export interface TiltValues { + interface TiltValues { /** * The current tilt on the X axis */ @@ -68,15 +68,15 @@ export declare namespace VanillaTilt { percentageY: number; } - export interface HTMLVanillaTiltElement extends HTMLElement { - vanillaTilt: VanillaTilt + interface HTMLVanillaTiltElement extends HTMLElement { + vanillaTilt: VanillaTilt; } } /** * A smooth 3D tilt javascript library forked from Tilt.js (jQuery version). */ -export declare class VanillaTilt { +export class VanillaTilt { /** * Creates a new instance of a VanillaTilt element. * @param element The element, which should be a VanillaTilt element diff --git a/types/vanilla-tilt/vanilla-tilt-tests.ts b/types/vanilla-tilt/vanilla-tilt-tests.ts index 80691885c4..c40bd56f75 100644 --- a/types/vanilla-tilt/vanilla-tilt-tests.ts +++ b/types/vanilla-tilt/vanilla-tilt-tests.ts @@ -1,6 +1,6 @@ -import { VanillaTilt } from './index.d'; +import { VanillaTilt } from 'vanilla-tilt'; -let element: VanillaTilt = new VanillaTilt(document.createElement('a'), { +const element: VanillaTilt = new VanillaTilt(document.createElement('a'), { axis: 'y', easing: 'cubic-besizer(0.9, 0.9, 0.9)', max: 2, @@ -21,8 +21,7 @@ VanillaTilt.init([document.createElement('a')], { axis: null }); - -let values: VanillaTilt.TiltValues = element.getValues(); +const values: VanillaTilt.TiltValues = element.getValues(); values.percentageX; values.percentageY; values.tiltX; diff --git a/types/vinyl-fs/index.d.ts b/types/vinyl-fs/index.d.ts index 52aa5cd506..46510032ee 100644 --- a/types/vinyl-fs/index.d.ts +++ b/types/vinyl-fs/index.d.ts @@ -25,17 +25,17 @@ interface SrcOptions extends globStream.Options { cwd?: string; /** - * Specifies the folder relative to the cwd - * This is used to determine the file names when saving in .dest() - * Default: where the glob begins - */ + * Specifies the folder relative to the cwd + * This is used to determine the file names when saving in .dest() + * Default: where the glob begins + */ base?: string; /** - * Setting this to false will make file.contents a paused stream - * If true it will buffer the file contents - * Default: true - */ + * Setting this to false will make file.contents a paused stream + * If true it will buffer the file contents + * Default: true + */ buffer?: boolean; /** @@ -59,10 +59,10 @@ interface SrcOptions extends globStream.Options { followSymlinks?: boolean; /** - * Setting this to false will ignore the contents of the file and disable - * writing to disk to speed up operations - * Default: true - */ + * Setting this to false will ignore the contents of the file and disable + * writing to disk to speed up operations + * Default: true + */ read?: boolean; /** @@ -95,59 +95,59 @@ interface SrcOptions extends globStream.Options { } /** -* Gets files that match the glob and converts them into the vinyl format -* @param globs Takes a glob string or an array of glob strings as the first argument -* Globs are executed in order, so negations should follow positive globs -* fs.src(['!b*.js', '*.js']) would not exclude any files, but this would: fs.src(['*.js', '!b*.js']) -* @param opt Options Vinyl source options, changes the way the files are read, found, or stored in the vinyl stream -*/ -declare function src(globs: string|string[], opt?: SrcOptions): NodeJS.ReadWriteStream; + * Gets files that match the glob and converts them into the vinyl format + * @param globs Takes a glob string or an array of glob strings as the first argument + * Globs are executed in order, so negations should follow positive globs + * fs.src(['!b*.js', '*.js']) would not exclude any files, but this would: fs.src(['*.js', '!b*.js']) + * @param opt Options Vinyl source options, changes the way the files are read, found, or stored in the vinyl stream + */ +export function src(globs: string|string[], opt?: SrcOptions): NodeJS.ReadWriteStream; /** -* This is just a glob-watcher -* -* @param globs Takes a glob string or an array of glob strings as the first argument -* Globs are executed in order, so negations should follow positive globs -* fs.src(['!b*.js', '*.js']) would not exclude any files, but this would: fs.src(['*.js', '!b*.js']) -*/ -declare function watch(globs: string|string[], cb?: (outEvt: { type: any; path: any; old: any; }) => void): _events.EventEmitter; + * This is just a glob-watcher + * + * @param globs Takes a glob string or an array of glob strings as the first argument + * Globs are executed in order, so negations should follow positive globs + * fs.src(['!b*.js', '*.js']) would not exclude any files, but this would: fs.src(['*.js', '!b*.js']) + */ +export function watch(globs: string|string[], cb?: (outEvt: { type: any; path: any; old: any; }) => void): _events.EventEmitter; /** -* This is just a glob-watcher -* -* @param globs Takes a glob string or an array of glob strings as the first argument -* Globs are executed in order, so negations should follow positive globs -* fs.src(['!b*.js', '*.js']) would not exclude any files, but this would: fs.src(['*.js', '!b*.js']) -*/ -declare function watch( + * This is just a glob-watcher + * + * @param globs Takes a glob string or an array of glob strings as the first argument + * Globs are executed in order, so negations should follow positive globs + * fs.src(['!b*.js', '*.js']) would not exclude any files, but this would: fs.src(['*.js', '!b*.js']) + */ +export function watch( globs: string|string[], opt?: { interval?: number; debounceDelay?: number; cwd?: string; - maxListeners?: () => number; + maxListeners?(): number; }, cb?: (outEvt: { type: any; path: any; old: any; }) => void): _events.EventEmitter; /** -* On write the stream will save the vinyl File to disk at the folder/cwd specified. -* After writing the file to disk, it will be emitted from the stream so you can keep piping these around. -* The file will be modified after being written to this stream: -* cwd, base, and path will be overwritten to match the folder -* stat.mode will be overwritten if you used a mode parameter -* contents will have it's position reset to the beginning if it is a stream -* @param folder destination folder -*/ -declare function dest(folder: string, opt?: { + * On write the stream will save the vinyl File to disk at the folder/cwd specified. + * After writing the file to disk, it will be emitted from the stream so you can keep piping these around. + * The file will be modified after being written to this stream: + * cwd, base, and path will be overwritten to match the folder + * stat.mode will be overwritten if you used a mode parameter + * contents will have it's position reset to the beginning if it is a stream + * @param folder destination folder + */ +export function dest(folder: string, opt?: { /** Specify the working directory the folder is relative to - * Default is process.cwd() - */ + * Default is process.cwd() + */ cwd?: string; /** Specify the mode the files should be created with - * Default is the mode of the input file (file.stat.mode) - * or the process mode if the input file has no mode property - */ + * Default is the mode of the input file (file.stat.mode) + * or the process mode if the input file has no mode property + */ mode?: number|string; /** Specify the mode the directory should be created with. Default is the process mode */ @@ -158,57 +158,56 @@ declare function dest(folder: string, opt?: { }): NodeJS.ReadWriteStream; /** -* On write the stream will save the vinyl File to disk at the folder/cwd specified. -* After writing the file to disk, it will be emitted from the stream so you can keep piping these around. -* The file will be modified after being written to this stream: -* cwd, base, and path will be overwritten to match the folder -* stat.mode will be overwritten if you used a mode parameter -* contents will have it's position reset to the beginning if it is a stream -* @param getFolderPath function that takes in a file and returns a folder path -*/ -declare function dest(getFolderPath: (file: File) => string): NodeJS.ReadWriteStream; + * On write the stream will save the vinyl File to disk at the folder/cwd specified. + * After writing the file to disk, it will be emitted from the stream so you can keep piping these around. + * The file will be modified after being written to this stream: + * cwd, base, and path will be overwritten to match the folder + * stat.mode will be overwritten if you used a mode parameter + * contents will have it's position reset to the beginning if it is a stream + * @param getFolderPath function that takes in a file and returns a folder path + */ +export function dest(getFolderPath: (file: File) => string): NodeJS.ReadWriteStream; /** -* On write the stream will create a symbolic link (i.e. symlink) on disk at the folder/cwd specified. -* After creating the symbolic link, it will be emitted from the stream so you can keep piping these around. -* The file will be modified after being written to this stream: -* cwd, base, and path will be overwritten to match the folder -*/ -declare function symlink(folder: string, opts?: { + * On write the stream will create a symbolic link (i.e. symlink) on disk at the folder/cwd specified. + * After creating the symbolic link, it will be emitted from the stream so you can keep piping these around. + * The file will be modified after being written to this stream: + * cwd, base, and path will be overwritten to match the folder + */ +export function symlink(folder: string, opts?: { /** - * Specify the working directory the folder is relative to - * Default is process.cwd() - */ + * Specify the working directory the folder is relative to + * Default is process.cwd() + */ cwd?: string; /** Specify the mode the directory should be created with. Default is the process mode */ mode?: number|string; /** - * Specify the mode the directory should be created with - * Default is the process mode - */ + * Specify the mode the directory should be created with + * Default is the process mode + */ dirMode?: number }): NodeJS.ReadWriteStream; /** -* On write the stream will create a symbolic link (i.e. symlink) on disk at the folder/cwd generated from getFolderPath. -* After creating the symbolic link, it will be emitted from the stream so you can keep piping these around. -* The file will be modified after being written to this stream: -* cwd, base, and path will be overwritten to match the folder -*/ -declare function symlink(getFolderPath: (File: File) => string, opts?: + * On write the stream will create a symbolic link (i.e. symlink) on disk at the folder/cwd generated from getFolderPath. + * After creating the symbolic link, it will be emitted from the stream so you can keep piping these around. + * The file will be modified after being written to this stream: + * cwd, base, and path will be overwritten to match the folder + */ +export function symlink(getFolderPath: (File: File) => string, opts?: { /** - * Specify the working directory the folder is relative to - * Default is process.cwd() - */ + * Specify the working directory the folder is relative to + * Default is process.cwd() + */ cwd?: string; /** - * Specify the mode the directory should be created with - * Default is the process mode - */ + * Specify the mode the directory should be created with + * Default is the process mode + */ dirMode?: number - }): NodeJS.ReadWriteStream; diff --git a/types/vinyl-fs/vinyl-fs-tests.ts b/types/vinyl-fs/vinyl-fs-tests.ts index 33d031f521..38585422c8 100644 --- a/types/vinyl-fs/vinyl-fs-tests.ts +++ b/types/vinyl-fs/vinyl-fs-tests.ts @@ -6,20 +6,20 @@ import * as path from 'path'; import * as fs from 'fs'; // require('graceful-fs'); // import bufEqual = require('buffer-equal'); -declare var bufEqual: any; +declare const bufEqual: any; // import through = require('through2'); -declare var through: any; +declare const through: any; import File = require('vinyl'); -// var spies = require('./spy'); -declare var spies: any; +// const spies = require('./spy'); +declare const spies: any; import * as should from 'should'; import 'mocha'; -declare var gulp: any; -declare var bufferStream: any; +declare const gulp: any; +let bufferStream: any; -var dataWrap = (fn: any) => { +let dataWrap = (fn: any) => { return (data: any, enc: any, cb: any) => { fn(data); cb(); @@ -27,9 +27,8 @@ var dataWrap = (fn: any) => { }; describe('source stream', () => { - it('should explode on invalid glob (empty)', done => { - var stream: any; + let stream: any; try { stream = gulp.src(); } catch (err) { @@ -40,7 +39,7 @@ describe('source stream', () => { }); it('should explode on invalid glob (number)', done => { - var stream: any; + let stream: any; try { stream = gulp.src(123); } catch (err) { @@ -51,7 +50,7 @@ describe('source stream', () => { }); it('should explode on invalid glob (empty array)', done => { - var stream: any; + let stream: any; try { stream = gulp.src([]); } catch (err) { @@ -62,26 +61,26 @@ describe('source stream', () => { }); it('should pass through writes', done => { - var expectedPath = path.join(__dirname, "./fixtures/test.coffee"); - var expectedContent = fs.readFileSync(expectedPath); + const expectedPath = path.join(__dirname, "./fixtures/test.coffee"); + const expectedContent = fs.readFileSync(expectedPath); - var expectedFile = new File({ + const expectedFile = new File({ base: __dirname, cwd: __dirname, path: expectedPath, contents: expectedContent }); - var onEnd = () => { + const onEnd = () => { buffered.length.should.equal(1); buffered[0].should.equal(expectedFile); bufEqual(buffered[0].contents, expectedContent).should.equal(true); done(); }; - var stream = vfs.src("./fixtures/nothing.coffee"); + const stream = vfs.src("./fixtures/nothing.coffee"); - var buffered: any[] = []; + const buffered: any[] = []; bufferStream = through.obj(dataWrap(buffered.push.bind(buffered)), onEnd); stream.pipe(bufferStream); stream.write(expectedFile); @@ -89,10 +88,10 @@ describe('source stream', () => { }); it('should glob a file with default settings', done => { - var expectedPath = path.join(__dirname, "./fixtures/test.coffee"); - var expectedContent = fs.readFileSync(expectedPath); + const expectedPath = path.join(__dirname, "./fixtures/test.coffee"); + const expectedContent = fs.readFileSync(expectedPath); - var onEnd = () => { + const onEnd = () => { buffered.length.should.equal(1); should.exist(buffered[0].stat); buffered[0].path.should.equal(expectedPath); @@ -101,18 +100,18 @@ describe('source stream', () => { done(); }; - var stream = vfs.src("./fixtures/*.coffee", { cwd: __dirname }); + const stream = vfs.src("./fixtures/*.coffee", { cwd: __dirname }); - var buffered: any[] = []; + const buffered: any[] = []; bufferStream = through.obj(dataWrap(buffered.push.bind(buffered)), onEnd); stream.pipe(bufferStream); }); it('should glob a file with default settings and relative cwd', done => { - var expectedPath = path.join(__dirname, "./fixtures/test.coffee"); - var expectedContent = fs.readFileSync(expectedPath); + const expectedPath = path.join(__dirname, "./fixtures/test.coffee"); + const expectedContent = fs.readFileSync(expectedPath); - var onEnd = () => { + const onEnd = () => { buffered.length.should.equal(1); should.exist(buffered[0].stat); buffered[0].path.should.equal(expectedPath); @@ -121,17 +120,17 @@ describe('source stream', () => { done(); }; - var stream = vfs.src("./fixtures/*.coffee", { cwd: path.relative(process.cwd(), __dirname) }); + const stream = vfs.src("./fixtures/*.coffee", { cwd: path.relative(process.cwd(), __dirname) }); - var buffered: any[] = []; + const buffered: any[] = []; bufferStream = through.obj(dataWrap(buffered.push.bind(buffered)), onEnd); stream.pipe(bufferStream); }); it('should glob a directory with default settings', done => { - var expectedPath = path.join(__dirname, "./fixtures/wow"); + const expectedPath = path.join(__dirname, "./fixtures/wow"); - var onEnd = () => { + const onEnd = () => { buffered.length.should.equal(1); buffered[0].path.should.equal(expectedPath); buffered[0].isNull().should.equal(true); @@ -139,18 +138,18 @@ describe('source stream', () => { done(); }; - var stream = vfs.src("./fixtures/wow/", { cwd: __dirname }); + const stream = vfs.src("./fixtures/wow/", { cwd: __dirname }); - var buffered: any[] = []; + const buffered: any[] = []; bufferStream = through.obj(dataWrap(buffered.push.bind(buffered)), onEnd); stream.pipe(bufferStream); }); it('should glob a file with with no contents', done => { - var expectedPath = path.join(__dirname, "./fixtures/test.coffee"); - var expectedContent = fs.readFileSync(expectedPath); + const expectedPath = path.join(__dirname, "./fixtures/test.coffee"); + const expectedContent = fs.readFileSync(expectedPath); - var onEnd = () => { + const onEnd = () => { buffered.length.should.equal(1); buffered[0].path.should.equal(expectedPath); buffered[0].isNull().should.equal(true); @@ -158,25 +157,25 @@ describe('source stream', () => { done(); }; - var stream = vfs.src("./fixtures/*.coffee", { cwd: __dirname, read: false }); + const stream = vfs.src("./fixtures/*.coffee", { cwd: __dirname, read: false }); - var buffered: any = []; + const buffered: any = []; bufferStream = through.obj(dataWrap(buffered.push.bind(buffered)), onEnd); stream.pipe(bufferStream); }); it('should glob a file with streaming contents', done => { - var expectedPath = path.join(__dirname, "./fixtures/test.coffee"); - var expectedContent = fs.readFileSync(expectedPath); + const expectedPath = path.join(__dirname, "./fixtures/test.coffee"); + const expectedContent = fs.readFileSync(expectedPath); - var onEnd = () => { + const onEnd = () => { buffered.length.should.equal(1); should.exist(buffered[0].stat); buffered[0].path.should.equal(expectedPath); buffered[0].isStream().should.equal(true); - var contentBuffer = new Buffer([]); - var contentBufferStream = through(dataWrap((data: any) => { + let contentBuffer = new Buffer([]); + const contentBufferStream = through(dataWrap((data: any) => { contentBuffer = Buffer.concat([contentBuffer, data]); })); buffered[0].contents.pipe(contentBufferStream); @@ -186,41 +185,40 @@ describe('source stream', () => { }); }; - var stream = vfs.src("./fixtures/*.coffee", { cwd: __dirname, buffer: false }); + const stream = vfs.src("./fixtures/*.coffee", { cwd: __dirname, buffer: false }); - var buffered: any = []; + const buffered: any = []; bufferStream = through.obj(dataWrap(buffered.push.bind(buffered)), onEnd); stream.pipe(bufferStream); }); - }); // from dest -// var vfs = require('../'); +// const vfs = require('../'); -// var path = require('path'); -// var fs = require('graceful-fs'); +// const path = require('path'); +// const fs = require('graceful-fs'); import rimraf = require('rimraf'); -// var bufEqual = require('buffer-equal'); -// var through = require('through2'); -// var File = require('vinyl'); +// const bufEqual = require('buffer-equal'); +// const through = require('through2'); +// const File = require('vinyl'); -// var should = require('should'); +// const should = require('should'); // require('mocha'); -var wipeOut = (cb: any) => { +let wipeOut = (cb: any) => { rimraf(path.join(__dirname, "./out-fixtures/"), cb); }; -var dataWrap = (fn: any) => { +dataWrap = (fn: any) => { return (data: any, enc: any, cb: any) => { fn(data); cb(); }; }; -var realMode = (n: any) => { +let realMode = (n: any) => { return n & parseInt("07777", 8); }; @@ -229,7 +227,7 @@ describe('dest stream', () => { afterEach(wipeOut); it('should explode on invalid folder', done => { - var stream: any; + let stream: any; try { stream = gulp.dest(); } catch (err) { @@ -240,24 +238,24 @@ describe('dest stream', () => { }); it('should pass through writes with cwd', done => { - var inputPath = path.join(__dirname, "./fixtures/test.coffee"); + const inputPath = path.join(__dirname, "./fixtures/test.coffee"); - var expectedFile = new File({ + const expectedFile = new File({ base: __dirname, cwd: __dirname, path: inputPath, contents: null }); - var onEnd = () => { + const onEnd = () => { buffered.length.should.equal(1); buffered[0].should.equal(expectedFile); done(); }; - var stream = vfs.dest("./out-fixtures/", { cwd: __dirname }); + const stream = vfs.dest("./out-fixtures/", { cwd: __dirname }); - var buffered: any[] = []; + const buffered: any[] = []; bufferStream = through.obj(dataWrap(buffered.push.bind(buffered)), onEnd); stream.pipe(bufferStream); stream.write(expectedFile); @@ -265,24 +263,24 @@ describe('dest stream', () => { }); it('should pass through writes with default cwd', done => { - var inputPath = path.join(__dirname, "./fixtures/test.coffee"); + const inputPath = path.join(__dirname, "./fixtures/test.coffee"); - var expectedFile = new File({ + const expectedFile = new File({ base: __dirname, cwd: __dirname, path: inputPath, contents: null }); - var onEnd = () => { + const onEnd = () => { buffered.length.should.equal(1); buffered[0].should.equal(expectedFile); done(); }; - var stream = vfs.dest(path.join(__dirname, "./out-fixtures/")); + const stream = vfs.dest(path.join(__dirname, "./out-fixtures/")); - var buffered: any[] = []; + const buffered: any[] = []; bufferStream = through.obj(dataWrap(buffered.push.bind(buffered)), onEnd); stream.pipe(bufferStream); stream.write(expectedFile); @@ -290,20 +288,20 @@ describe('dest stream', () => { }); it('should not write null files', done => { - var inputPath = path.join(__dirname, "./fixtures/test.coffee"); - var inputBase = path.join(__dirname, "./fixtures/"); - var expectedPath = path.join(__dirname, "./out-fixtures/test.coffee"); - var expectedCwd = __dirname; - var expectedBase = path.join(__dirname, "./out-fixtures"); + const inputPath = path.join(__dirname, "./fixtures/test.coffee"); + const inputBase = path.join(__dirname, "./fixtures/"); + const expectedPath = path.join(__dirname, "./out-fixtures/test.coffee"); + const expectedCwd = __dirname; + const expectedBase = path.join(__dirname, "./out-fixtures"); - var expectedFile = new File({ + const expectedFile = new File({ base: inputBase, cwd: __dirname, path: inputPath, contents: null }); - var onEnd = () => { + const onEnd = () => { buffered.length.should.equal(1); buffered[0].should.equal(expectedFile); buffered[0].cwd.should.equal(expectedCwd, 'cwd should have changed'); @@ -313,9 +311,9 @@ describe('dest stream', () => { done(); }; - var stream = vfs.dest("./out-fixtures/", { cwd: __dirname }); + const stream = vfs.dest("./out-fixtures/", { cwd: __dirname }); - var buffered: any[] = []; + const buffered: any[] = []; bufferStream = through.obj(dataWrap(buffered.push.bind(buffered)), onEnd); stream.pipe(bufferStream); stream.write(expectedFile); @@ -323,21 +321,21 @@ describe('dest stream', () => { }); it('should write buffer files to the right folder with relative cwd', done => { - var inputPath = path.join(__dirname, "./fixtures/test.coffee"); - var inputBase = path.join(__dirname, "./fixtures/"); - var expectedPath = path.join(__dirname, "./out-fixtures/test.coffee"); - var expectedCwd = __dirname; - var expectedBase = path.join(__dirname, "./out-fixtures"); - var expectedContents = fs.readFileSync(inputPath); + const inputPath = path.join(__dirname, "./fixtures/test.coffee"); + const inputBase = path.join(__dirname, "./fixtures/"); + const expectedPath = path.join(__dirname, "./out-fixtures/test.coffee"); + const expectedCwd = __dirname; + const expectedBase = path.join(__dirname, "./out-fixtures"); + const expectedContents = fs.readFileSync(inputPath); - var expectedFile = new File({ + const expectedFile = new File({ base: inputBase, cwd: __dirname, path: inputPath, contents: expectedContents }); - var onEnd = () => { + const onEnd = () => { buffered.length.should.equal(1); buffered[0].should.equal(expectedFile); buffered[0].cwd.should.equal(expectedCwd, 'cwd should have changed'); @@ -348,9 +346,9 @@ describe('dest stream', () => { done(); }; - var stream = vfs.dest("./out-fixtures/", { cwd: path.relative(process.cwd(), __dirname) }); + const stream = vfs.dest("./out-fixtures/", { cwd: path.relative(process.cwd(), __dirname) }); - var buffered: any = []; + const buffered: any = []; bufferStream = through.obj(dataWrap(buffered.push.bind(buffered)), onEnd); stream.pipe(bufferStream); stream.write(expectedFile); @@ -358,15 +356,15 @@ describe('dest stream', () => { }); it('should write buffer files to the right folder', done => { - var inputPath = path.join(__dirname, "./fixtures/test.coffee"); - var inputBase = path.join(__dirname, "./fixtures/"); - var expectedPath = path.join(__dirname, "./out-fixtures/test.coffee"); - var expectedContents = fs.readFileSync(inputPath); - var expectedCwd = __dirname; - var expectedBase = path.join(__dirname, "./out-fixtures"); - var expectedMode = parseInt("0655", 8); + const inputPath = path.join(__dirname, "./fixtures/test.coffee"); + const inputBase = path.join(__dirname, "./fixtures/"); + const expectedPath = path.join(__dirname, "./out-fixtures/test.coffee"); + const expectedContents = fs.readFileSync(inputPath); + const expectedCwd = __dirname; + const expectedBase = path.join(__dirname, "./out-fixtures"); + const expectedMode = parseInt("0655", 8); - var expectedFile = new File({ + const expectedFile = new File({ base: inputBase, cwd: __dirname, path: inputPath, @@ -376,7 +374,7 @@ describe('dest stream', () => { } }); - var onEnd = () => { + const onEnd = () => { buffered.length.should.equal(1); buffered[0].should.equal(expectedFile); buffered[0].cwd.should.equal(expectedCwd, 'cwd should have changed'); @@ -388,9 +386,9 @@ describe('dest stream', () => { done(); }; - var stream = vfs.dest("./out-fixtures/", { cwd: __dirname }); + const stream = vfs.dest("./out-fixtures/", { cwd: __dirname }); - var buffered: any[] = []; + const buffered: any[] = []; bufferStream = through.obj(dataWrap(buffered.push.bind(buffered)), onEnd); stream.pipe(bufferStream); stream.write(expectedFile); @@ -398,16 +396,16 @@ describe('dest stream', () => { }); it('should write streaming files to the right folder', done => { - var inputPath = path.join(__dirname, "./fixtures/test.coffee"); - var inputBase = path.join(__dirname, "./fixtures/"); - var expectedPath = path.join(__dirname, "./out-fixtures/test.coffee"); - var expectedContents = fs.readFileSync(inputPath); - var expectedCwd = __dirname; - var expectedBase = path.join(__dirname, "./out-fixtures"); - var expectedMode = parseInt("0655", 8); + const inputPath = path.join(__dirname, "./fixtures/test.coffee"); + const inputBase = path.join(__dirname, "./fixtures/"); + const expectedPath = path.join(__dirname, "./out-fixtures/test.coffee"); + const expectedContents = fs.readFileSync(inputPath); + const expectedCwd = __dirname; + const expectedBase = path.join(__dirname, "./out-fixtures"); + const expectedMode = parseInt("0655", 8); - var contentStream = through.obj(); - var expectedFile = new File({ + const contentStream = through.obj(); + const expectedFile = new File({ base: inputBase, cwd: __dirname, path: inputPath, @@ -417,7 +415,7 @@ describe('dest stream', () => { } }); - var onEnd = () => { + const onEnd = () => { buffered.length.should.equal(1); buffered[0].should.equal(expectedFile); buffered[0].cwd.should.equal(expectedCwd, 'cwd should have changed'); @@ -429,9 +427,9 @@ describe('dest stream', () => { done(); }; - var stream = vfs.dest("./out-fixtures/", { cwd: __dirname }); + const stream = vfs.dest("./out-fixtures/", { cwd: __dirname }); - var buffered: any = []; + const buffered: any = []; bufferStream = through.obj(dataWrap(buffered.push.bind(buffered)), onEnd); stream.pipe(bufferStream); stream.write(expectedFile); @@ -443,14 +441,14 @@ describe('dest stream', () => { }); it('should write directories to the right folder', done => { - var inputPath = path.join(__dirname, "./fixtures/test"); - var inputBase = path.join(__dirname, "./fixtures/"); - var expectedPath = path.join(__dirname, "./out-fixtures/test"); - var expectedCwd = __dirname; - var expectedBase = path.join(__dirname, "./out-fixtures"); - var expectedMode = parseInt("0655", 8); + const inputPath = path.join(__dirname, "./fixtures/test"); + const inputBase = path.join(__dirname, "./fixtures/"); + const expectedPath = path.join(__dirname, "./out-fixtures/test"); + const expectedCwd = __dirname; + const expectedBase = path.join(__dirname, "./out-fixtures"); + const expectedMode = parseInt("0655", 8); - var expectedFile = new File({ + const expectedFile = new File({ base: inputBase, cwd: __dirname, path: inputPath, @@ -461,7 +459,7 @@ describe('dest stream', () => { } }); - var onEnd = () => { + const onEnd = () => { buffered.length.should.equal(1); buffered[0].should.equal(expectedFile); buffered[0].cwd.should.equal(expectedCwd, 'cwd should have changed'); @@ -473,9 +471,9 @@ describe('dest stream', () => { done(); }; - var stream = vfs.dest("./out-fixtures/", { cwd: __dirname }); + const stream = vfs.dest("./out-fixtures/", { cwd: __dirname }); - var buffered: any[] = []; + const buffered: any[] = []; bufferStream = through.obj(dataWrap(buffered.push.bind(buffered)), onEnd); stream.pipe(bufferStream); stream.write(expectedFile); @@ -483,14 +481,14 @@ describe('dest stream', () => { }); it('should allow piping multiple dests in streaming mode', done => { - var inputPath1 = path.join(__dirname, "./out-fixtures/multiple-first"); - var inputPath2 = path.join(__dirname, "./out-fixtures/multiple-second"); - var inputBase = path.join(__dirname, "./out-fixtures/"); - var srcPath = path.join(__dirname, "./fixtures/test.coffee"); - var stream1 = vfs.dest('./out-fixtures/', { cwd: __dirname }); - var stream2 = vfs.dest('./out-fixtures/', { cwd: __dirname }); - var content = fs.readFileSync(srcPath); - var rename = through.obj((file: any, _: any, next: any) => { + const inputPath1 = path.join(__dirname, "./out-fixtures/multiple-first"); + const inputPath2 = path.join(__dirname, "./out-fixtures/multiple-second"); + const inputBase = path.join(__dirname, "./out-fixtures/"); + const srcPath = path.join(__dirname, "./fixtures/test.coffee"); + const stream1 = vfs.dest('./out-fixtures/', { cwd: __dirname }); + const stream2 = vfs.dest('./out-fixtures/', { cwd: __dirname }); + const content = fs.readFileSync(srcPath); + const rename = through.obj((file: any, _: any, next: any) => { file.path = inputPath2; this.push(file); next(); @@ -509,7 +507,7 @@ describe('dest stream', () => { done(); }); - var file = new File({ + const file = new File({ base: inputBase, path: inputPath1, cwd: __dirname, @@ -519,32 +517,28 @@ describe('dest stream', () => { stream1.write(file); stream1.end(); }); - }); - - // This test is from +const chmodSpy = spies.chmodSpy; +const statSpy = spies.statSpy; -var chmodSpy = spies.chmodSpy; -var statSpy = spies.statSpy; - -var wipeOut = (cb: any) => { +wipeOut = (cb: any) => { rimraf(path.join(__dirname, './out-fixtures/'), cb); spies.setError('false'); statSpy.reset(); chmodSpy.reset(); }; -var dataWrap = (fn: any) => { +dataWrap = (fn: any) => { return (data: any, enc: any, cb: any) => { fn(data); cb(); }; }; -var realMode = (n: any) => { +realMode = (n: any) => { return n & parseInt("07777", 8); }; @@ -553,7 +547,7 @@ describe('symlink stream', () => { afterEach(wipeOut); it('should explode on invalid folder', (done: any) => { - var stream: any; + let stream: any; try { stream = gulp.symlink(); } catch (err) { @@ -564,24 +558,24 @@ describe('symlink stream', () => { }); it('should pass through writes with cwd', done => { - var inputPath = path.join(__dirname, './fixtures/test.coffee'); + const inputPath = path.join(__dirname, './fixtures/test.coffee'); - var expectedFile = new File({ + const expectedFile = new File({ base: __dirname, cwd: __dirname, path: inputPath, contents: null }); - var onEnd = () => { + const onEnd = () => { buffered.length.should.equal(1); buffered[0].should.equal(expectedFile); done(); }; - var stream = vfs.symlink('./out-fixtures/', { cwd: __dirname }); + const stream = vfs.symlink('./out-fixtures/', { cwd: __dirname }); - var buffered: any[] = []; + const buffered: any[] = []; bufferStream = through.obj(dataWrap(buffered.push.bind(buffered)), onEnd); stream.pipe(bufferStream); stream.write(expectedFile); @@ -589,24 +583,24 @@ describe('symlink stream', () => { }); it('should pass through writes with default cwd', done => { - var inputPath = path.join(__dirname, './fixtures/test.coffee'); + const inputPath = path.join(__dirname, './fixtures/test.coffee'); - var expectedFile = new File({ + const expectedFile = new File({ base: __dirname, cwd: __dirname, path: inputPath, contents: null }); - var onEnd = () => { + const onEnd = () => { buffered.length.should.equal(1); buffered[0].should.equal(expectedFile); done(); }; - var stream = vfs.symlink(path.join(__dirname, './out-fixtures/')); + const stream = vfs.symlink(path.join(__dirname, './out-fixtures/')); - var buffered: any[] = []; + const buffered: any[] = []; bufferStream = through.obj(dataWrap(buffered.push.bind(buffered)), onEnd); stream.pipe(bufferStream); stream.write(expectedFile); @@ -614,21 +608,21 @@ describe('symlink stream', () => { }); it('should make link to the right folder with relative cwd', done => { - var inputPath = path.join(__dirname, './fixtures/test.coffee'); - var inputBase = path.join(__dirname, './fixtures/'); - var expectedPath = path.join(__dirname, './out-fixtures/test.coffee'); - var expectedCwd = __dirname; - var expectedBase = path.join(__dirname, './out-fixtures'); - var expectedContents = fs.readFileSync(inputPath); + const inputPath = path.join(__dirname, './fixtures/test.coffee'); + const inputBase = path.join(__dirname, './fixtures/'); + const expectedPath = path.join(__dirname, './out-fixtures/test.coffee'); + const expectedCwd = __dirname; + const expectedBase = path.join(__dirname, './out-fixtures'); + const expectedContents = fs.readFileSync(inputPath); - var expectedFile = new File({ + const expectedFile = new File({ base: inputBase, cwd: __dirname, path: inputPath, contents: expectedContents }); - var onEnd = () => { + const onEnd = () => { buffered.length.should.equal(1); buffered[0].should.equal(expectedFile); buffered[0].cwd.should.equal(__dirname, 'cwd should have changed'); @@ -640,9 +634,9 @@ describe('symlink stream', () => { done(); }; - var stream = vfs.symlink('./out-fixtures/', { cwd: path.relative(process.cwd(), __dirname) }); + const stream = vfs.symlink('./out-fixtures/', { cwd: path.relative(process.cwd(), __dirname) }); - var buffered: any = []; + const buffered: any = []; bufferStream = through.obj(dataWrap(buffered.push.bind(buffered)), onEnd); stream.pipe(bufferStream); stream.write(expectedFile); @@ -650,21 +644,21 @@ describe('symlink stream', () => { }); it('should write buffer files to the right folder with function and relative cwd', done => { - var inputPath = path.join(__dirname, './fixtures/test.coffee'); - var inputBase = path.join(__dirname, './fixtures/'); - var expectedPath = path.join(__dirname, './out-fixtures/test.coffee'); - var expectedCwd = __dirname; - var expectedBase = path.join(__dirname, './out-fixtures'); - var expectedContents = fs.readFileSync(inputPath); + const inputPath = path.join(__dirname, './fixtures/test.coffee'); + const inputBase = path.join(__dirname, './fixtures/'); + const expectedPath = path.join(__dirname, './out-fixtures/test.coffee'); + const expectedCwd = __dirname; + const expectedBase = path.join(__dirname, './out-fixtures'); + const expectedContents = fs.readFileSync(inputPath); - var expectedFile = new File({ + const expectedFile = new File({ base: inputBase, cwd: __dirname, path: inputPath, contents: expectedContents }); - var onEnd = () => { + const onEnd = () => { buffered.length.should.equal(1); buffered[0].should.equal(expectedFile); buffered[0].cwd.should.equal(__dirname, 'cwd should have changed'); @@ -676,13 +670,13 @@ describe('symlink stream', () => { done(); }; - var stream = vfs.symlink(file => { + const stream = vfs.symlink(file => { should.exist(file); file.should.equal(expectedFile); return './out-fixtures'; }, { cwd: path.relative(process.cwd(), __dirname) }); - var buffered: any[] = []; + const buffered: any[] = []; bufferStream = through.obj(dataWrap(buffered.push.bind(buffered)), onEnd); stream.pipe(bufferStream); stream.write(expectedFile); @@ -690,15 +684,15 @@ describe('symlink stream', () => { }); it('should write buffer files to the right folder', done => { - var inputPath = path.join(__dirname, './fixtures/test.coffee'); - var inputBase = path.join(__dirname, './fixtures/'); - var expectedPath = path.join(__dirname, './out-fixtures/test.coffee'); - var expectedContents = fs.readFileSync(inputPath); - var expectedCwd = __dirname; - var expectedBase = path.join(__dirname, './out-fixtures'); - var expectedMode = parseInt("0655", 8); + const inputPath = path.join(__dirname, './fixtures/test.coffee'); + const inputBase = path.join(__dirname, './fixtures/'); + const expectedPath = path.join(__dirname, './out-fixtures/test.coffee'); + const expectedContents = fs.readFileSync(inputPath); + const expectedCwd = __dirname; + const expectedBase = path.join(__dirname, './out-fixtures'); + const expectedMode = parseInt("0655", 8); - var expectedFile = new File({ + const expectedFile = new File({ base: inputBase, cwd: __dirname, path: inputPath, @@ -708,7 +702,7 @@ describe('symlink stream', () => { } }); - var onEnd = () => { + const onEnd = () => { buffered.length.should.equal(1); buffered[0].should.equal(expectedFile); buffered[0].cwd.should.equal(__dirname, 'cwd should have changed'); @@ -720,9 +714,9 @@ describe('symlink stream', () => { done(); }; - var stream = vfs.symlink('./out-fixtures/', { cwd: __dirname }); + const stream = vfs.symlink('./out-fixtures/', { cwd: __dirname }); - var buffered: any[] = []; + const buffered: any[] = []; bufferStream = through.obj(dataWrap(buffered.push.bind(buffered)), onEnd); stream.pipe(bufferStream); stream.write(expectedFile); @@ -730,16 +724,16 @@ describe('symlink stream', () => { }); it('should write streaming files to the right folder', done => { - var inputPath = path.join(__dirname, './fixtures/test.coffee'); - var inputBase = path.join(__dirname, './fixtures/'); - var expectedPath = path.join(__dirname, './out-fixtures/test.coffee'); - var expectedContents = fs.readFileSync(inputPath); - var expectedCwd = __dirname; - var expectedBase = path.join(__dirname, './out-fixtures'); - var expectedMode = parseInt("0655", 8); + const inputPath = path.join(__dirname, './fixtures/test.coffee'); + const inputBase = path.join(__dirname, './fixtures/'); + const expectedPath = path.join(__dirname, './out-fixtures/test.coffee'); + const expectedContents = fs.readFileSync(inputPath); + const expectedCwd = __dirname; + const expectedBase = path.join(__dirname, './out-fixtures'); + const expectedMode = parseInt("0655", 8); - var contentStream = through.obj(); - var expectedFile = new File({ + const contentStream = through.obj(); + const expectedFile = new File({ base: inputBase, cwd: __dirname, path: inputPath, @@ -749,7 +743,7 @@ describe('symlink stream', () => { } }); - var onEnd = () => { + const onEnd = () => { buffered.length.should.equal(1); buffered[0].should.equal(expectedFile); buffered[0].cwd.should.equal(__dirname, 'cwd should have changed'); @@ -761,9 +755,9 @@ describe('symlink stream', () => { done(); }; - var stream = vfs.symlink('./out-fixtures/', { cwd: __dirname }); + const stream = vfs.symlink('./out-fixtures/', { cwd: __dirname }); - var buffered: any[] = []; + const buffered: any[] = []; bufferStream = through.obj(dataWrap(buffered.push.bind(buffered)), onEnd); stream.pipe(bufferStream); stream.write(expectedFile); @@ -775,14 +769,14 @@ describe('symlink stream', () => { }); it('should write directories to the right folder', done => { - var inputPath = path.join(__dirname, './fixtures/wow'); - var inputBase = path.join(__dirname, './fixtures/'); - var expectedPath = path.join(__dirname, './out-fixtures/wow'); - var expectedCwd = __dirname; - var expectedBase = path.join(__dirname, './out-fixtures'); - var expectedMode = parseInt("0655", 8); + const inputPath = path.join(__dirname, './fixtures/wow'); + const inputBase = path.join(__dirname, './fixtures/'); + const expectedPath = path.join(__dirname, './out-fixtures/wow'); + const expectedCwd = __dirname; + const expectedBase = path.join(__dirname, './out-fixtures'); + const expectedMode = parseInt("0655", 8); - var expectedFile = new File({ + const expectedFile = new File({ base: inputBase, cwd: __dirname, path: inputPath, @@ -793,7 +787,7 @@ describe('symlink stream', () => { } }); - var onEnd = () => { + const onEnd = () => { buffered.length.should.equal(1); buffered[0].should.equal(expectedFile); buffered[0].cwd.should.equal(__dirname, 'cwd should have changed'); @@ -805,9 +799,9 @@ describe('symlink stream', () => { done(); }; - var stream = vfs.symlink('./out-fixtures/', { cwd: __dirname }); + const stream = vfs.symlink('./out-fixtures/', { cwd: __dirname }); - var buffered: any[] = []; + const buffered: any[] = []; bufferStream = through.obj(dataWrap(buffered.push.bind(buffered)), onEnd); stream.pipe(bufferStream); stream.write(expectedFile); @@ -815,32 +809,32 @@ describe('symlink stream', () => { }); it('should use different modes for files and directories', done => { - var inputBase = path.join(__dirname, './fixtures'); - var inputPath = path.join(__dirname, './fixtures/wow/suchempty'); - var expectedBase = path.join(__dirname, './out-fixtures/wow'); - var expectedDirMode = parseInt("0755", 8); - var expectedFileMode = parseInt("0655", 8); + const inputBase = path.join(__dirname, './fixtures'); + const inputPath = path.join(__dirname, './fixtures/wow/suchempty'); + const expectedBase = path.join(__dirname, './out-fixtures/wow'); + const expectedDirMode = parseInt("0755", 8); + const expectedFileMode = parseInt("0655", 8); - var firstFile = new File({ + const firstFile = new File({ base: inputBase, cwd: __dirname, path: inputPath, stat: fs.statSync(inputPath) }); - var onEnd = () => { + const onEnd = () => { realMode(fs.lstatSync(expectedBase).mode).should.equal(expectedDirMode); realMode(buffered[0].stat.mode).should.equal(expectedFileMode); done(); }; - var stream = vfs.symlink('./out-fixtures/', { + const stream = vfs.symlink('./out-fixtures/', { cwd: __dirname, mode: expectedFileMode, dirMode: expectedDirMode }); - var buffered: any[] = []; + const buffered: any[] = []; bufferStream = through.obj(dataWrap(buffered.push.bind(buffered)), onEnd); stream.pipe(bufferStream); @@ -849,15 +843,15 @@ describe('symlink stream', () => { }); it('should report IO errors', done => { - var inputPath = path.join(__dirname, './fixtures/test.coffee'); - var inputBase = path.join(__dirname, './fixtures/'); - var expectedPath = path.join(__dirname, './out-fixtures/test.coffee'); - var expectedContents = fs.readFileSync(inputPath); - var expectedCwd = __dirname; - var expectedBase = path.join(__dirname, './out-fixtures'); - var expectedMode = parseInt("0722", 8); + const inputPath = path.join(__dirname, './fixtures/test.coffee'); + const inputBase = path.join(__dirname, './fixtures/'); + const expectedPath = path.join(__dirname, './out-fixtures/test.coffee'); + const expectedContents = fs.readFileSync(inputPath); + const expectedCwd = __dirname; + const expectedBase = path.join(__dirname, './out-fixtures'); + const expectedMode = parseInt("0722", 8); - var expectedFile = new File({ + const expectedFile = new File({ base: inputBase, cwd: __dirname, path: inputPath, @@ -870,7 +864,7 @@ describe('symlink stream', () => { fs.mkdirSync(expectedBase); fs.chmodSync(expectedBase, 0); - var stream = vfs.symlink('./out-fixtures/', { cwd: __dirname }); + const stream = vfs.symlink('./out-fixtures/', { cwd: __dirname }); stream.on('error', (err: any) => { err.code.should.equal('EACCES'); done(); @@ -880,14 +874,14 @@ describe('symlink stream', () => { ['end', 'finish'].forEach(eventName => { it('should emit ' + eventName + ' event', done => { - var srcPath = path.join(__dirname, './fixtures/test.coffee'); - var stream = vfs.symlink('./out-fixtures/', { cwd: __dirname }); + const srcPath = path.join(__dirname, './fixtures/test.coffee'); + const stream = vfs.symlink('./out-fixtures/', { cwd: __dirname }); stream.on(eventName, () => { done(); }); - var file = new File({ + const file = new File({ path: srcPath, cwd: __dirname, contents: new Buffer("1234567890") @@ -898,13 +892,13 @@ describe('symlink stream', () => { }); }); it('should check if it"s a vinyl file', () => { - var srcPath = path.join(__dirname, './fixtures/test.coffee'); - var options = { + const srcPath = path.join(__dirname, './fixtures/test.coffee'); + const options = { path: srcPath, cwd: __dirname, contents: new Buffer("1234567890") }; - var file = new File(options); + const file = new File(options); File.isVinyl(file).should.equal(true); File.isVinyl(options).should.equal(false); }); diff --git a/types/vis/index.d.ts b/types/vis/index.d.ts index 0d94a44354..e4f8fe0dfd 100644 --- a/types/vis/index.d.ts +++ b/types/vis/index.d.ts @@ -71,7 +71,6 @@ interface PointItem extends DataItem { y: number; } - interface DataGroup { className?: string; content: string; @@ -154,14 +153,14 @@ interface TimelineOptions { groupEditable?: TimelineOptionsGroupEditableType; groupOrder?: TimelineOptionsGroupOrderType; groupOrderSwap?: TimelineOptionsGroupOrderSwapFunction; - groupTemplate?: () => void; // TODO + groupTemplate?(): void; // TODO height?: HeightWidthType; hiddenDates?: any; // TODO horizontalScroll?: boolean; itemsAlwaysDraggable?: boolean; locale?: string; locales?: any; // TODO - moment?: () => void; // TODO + moment?(): void; // TODO margin?: TimelineOptionsMarginType; max?: DateType; maxHeight?: HeightWidthType; @@ -171,15 +170,15 @@ interface TimelineOptions { moveable?: boolean; multiselect?: boolean; multiselectPerGroup?: boolean; - onAdd?: () => void; // TODO - onAddGroup?: () => void; // TODO - onUpdate?: () => void; // TODO - onMove?: () => void; // TODO - onMoveGroup?: () => void; // TODO - onMoving?: () => void; // TODO - onRemove?: () => void; // TODO - onRemoveGroup?: () => void; // TODO - order?: () => void; // TODO + onAdd?(): void; // TODO + onAddGroup?(): void; // TODO + onUpdate?(): void; // TODO + onMove?(): void; // TODO + onMoveGroup?(): void; // TODO + onMoving?(): void; // TODO + onRemove?(): void; // TODO + onRemoveGroup?(): void; // TODO + order?(): void; // TODO orientation?: TimelineOptionsOrientationType; rollingMode: boolean; selectable?: boolean; @@ -189,11 +188,11 @@ interface TimelineOptions { stack?: boolean; snap?: TimelineOptionsSnapFunction; start?: DateType; - template?: () => void; // TODO + template?(): void; // TODO throttleRedraw?: number; timeAxis?: TimelineTimeAxisOption; type?: string; - tooltipOnItemUpdateTime?: boolean | { template: (item: any) => any }; + tooltipOnItemUpdateTime?: boolean | { template(item: any): any }; verticalScroll?: boolean; width?: HeightWidthType; zoomable?: boolean; @@ -276,7 +275,6 @@ interface DataSetQueueOptions { } export class DataSet { - /** * Creates an instance of DataSet. * @@ -539,7 +537,7 @@ interface DataSelectionOptions { * * @memberOf DataSelectionOptions */ - filter?: (item: T) => boolean; + filter?(item: T): boolean; /** * Order the items by a field name or custom sort function. @@ -581,7 +579,7 @@ interface RangeType { interface DataAxisSideOption { range?: RangeType; - format?: () => string; + format?(): string; title?: TitleOption; } @@ -611,7 +609,7 @@ interface Graph2dDataAxisOption { interface Graph2dDrawPointsOption { enabled?: boolean; - onRender?: () => boolean; // TODO + onRender?(): boolean; // TODO size?: number; style: Graph2dDrawPointsStyle; } @@ -642,7 +640,7 @@ interface Graph2dOptions { legend?: Graph2dLegendOption; locale?: string; locales?: any; // TODO - moment?: () => void; // TODO + moment?(): void; // TODO max?: DateType; maxHeight?: HeightWidthType; maxMinorChars?: number; @@ -840,7 +838,6 @@ type NetworkEvents = * @implements {INetwork} */ export class Network { - /** * Creates an instance of Network. * @@ -1476,12 +1473,12 @@ export interface ViewPortOptions { offset?: Position; /** - * For animation you can either use a Boolean to use it with the default options or - * disable it or you can define the duration (in milliseconds) and easing function manually. - * - * @type {(IAnimationOptions | boolean)} - * @memberOf IFitOptions - */ + * For animation you can either use a Boolean to use it with the default options or + * disable it or you can define the duration (in milliseconds) and easing function manually. + * + * @type {(IAnimationOptions | boolean)} + * @memberOf IFitOptions + */ animation?: AnimationOptions | boolean; } @@ -1510,7 +1507,6 @@ export interface MoveToOptions extends ViewPortOptions { * @interface IAnimationOptions */ export interface AnimationOptions { - /** * The duration (in milliseconds). * @@ -1539,7 +1535,6 @@ export interface AnimationOptions { * @interface IFitOptions */ export interface FitOptions { - /** * The nodes can be used to zoom to fit only specific nodes in the view. * @@ -1583,7 +1578,6 @@ export interface BoundingBox { * @interface IClusterOptions */ export interface ClusterOptions { - /** * Optional for all but the cluster method. * The cluster module loops over all nodes that are selected to be in the cluster @@ -1593,7 +1587,7 @@ export interface ClusterOptions { * * @memberOf IClusterOptions */ - joinCondition?: (nodeOptions: any) => boolean; + joinCondition?(nodeOptions: any): boolean; /** * Optional. @@ -1605,7 +1599,7 @@ export interface ClusterOptions { * @type {(clusterOptions: any, childNodesOptions: any[], childEdgesOptions: any[])} * @memberOf IClusterOptions */ - processProperties?: (clusterOptions: any, childNodesOptions: any[], childEdgesOptions: any[]) => any; + processProperties?(clusterOptions: any, childNodesOptions: any[], childEdgesOptions: any[]): any; /** * Optional. @@ -1641,7 +1635,6 @@ export interface ClusterOptions { * @interface IOpenClusterOptions */ export interface OpenClusterOptions { - /** * A function that can be used to manually position the nodes after the cluster is opened. * The containedNodesPositions contain the positions of the nodes in the cluster at the @@ -1656,9 +1649,9 @@ export interface OpenClusterOptions { * * @memberOf IOpenClusterOptions */ - releaseFunction: ( + releaseFunction( clusterPosition: Position, - containedNodesPositions: { [nodeId: string]: Position }) => { [nodeId: string]: Position }; + containedNodesPositions: { [nodeId: string]: Position }): { [nodeId: string]: Position }; } export interface Position { @@ -1667,7 +1660,6 @@ export interface Position { } export interface Properties { - nodes: string[]; edges: string[]; @@ -1686,7 +1678,7 @@ export interface Properties { } export interface Callback { - callback?: (params?: any) => void; + callback?(params?: any): void; } export interface Data { diff --git a/types/vis/vis-tests.ts b/types/vis/vis-tests.ts index 2b3b28fb7b..354f766cb0 100644 --- a/types/vis/vis-tests.ts +++ b/types/vis/vis-tests.ts @@ -21,8 +21,8 @@ interface TestData { } // create a DataSet -var options = {}; -var data = new vis.DataSet(options); +let options = {}; +let data = new vis.DataSet(options); // add items // note that the data items can contain different properties and data formats @@ -45,15 +45,15 @@ data.update({ id: 2, group: 1 }); data.remove(4); // get all ids -var ids = data.getIds(); +const ids = data.getIds(); console.log('ids', ids); // get a specific item -var item1 = data.get(1); +const item1 = data.get(1); console.log('item1', item1); // retrieve a filtered subset of the data -var items = data.get({ +let items = data.get({ filter: (item) => { return item.group === 1; } @@ -61,7 +61,7 @@ var items = data.get({ console.log('filtered items', items); // retrieve formatted items -var items = data.get({ +items = data.get({ fields: ['id', 'date'], type: { date: 'ISODate' @@ -74,7 +74,7 @@ console.log('formatted items', items); // // create a DataSet -var data = new vis.DataSet(); +data = new vis.DataSet(); // subscribe to any change in the DataSet data.on('*', (event, properties, senderId) => { @@ -91,7 +91,7 @@ data.remove(1); // triggers an 'remove' event // // create a DataSet -var data = new vis.DataSet(); +data = new vis.DataSet(); // add items data.add([ @@ -111,7 +111,7 @@ data.remove(3); // // create a DataSet -var data = new vis.DataSet(); +data = new vis.DataSet(); data.add([ { id: 1, text: 'item 1', date: '2013-06-20', group: 1, first: true }, { id: 2, text: 'item 2', date: '2013-06-23', group: 2 }, @@ -120,7 +120,7 @@ data.add([ ]); // retrieve formatted items -var items = data.get({ +items = data.get({ fields: ['id', 'date', 'group'], // output the specified fields only type: { date: 'Date', // convert the date fields to Date objects @@ -128,19 +128,19 @@ var items = data.get({ } }); -var dataset = new vis.DataSet(); +const dataset = new vis.DataSet(); // retrieve all items having a property group with value 2 -var group2 = dataset.get({ +const group2 = dataset.get({ filter: (item) => { return (item.group === 2); } }); // retrieve all items having a property balance with a value above zero -var positiveBalance = dataset.get({ +const positiveBalance = dataset.get({ filter: (item) => { - return (item.balance > 0); + return item.balance !== undefined && item.balance > 0; } }); @@ -149,7 +149,7 @@ var positiveBalance = dataset.get({ // // create an array with nodes -var nodes = new vis.DataSet([ +const nodes = new vis.DataSet([ { id: 1, label: 'Node 1' }, { id: 2, label: 'Node 2' }, { id: 3, label: 'Node 3' }, @@ -158,7 +158,7 @@ var nodes = new vis.DataSet([ ]); // create an array with edges -var edges = new vis.DataSet([ +const edges = new vis.DataSet([ { from: 1, to: 3 }, { from: 1, to: 2 }, { from: 2, to: 4 }, @@ -166,21 +166,21 @@ var edges = new vis.DataSet([ ]); // create a network -var container = document.getElementById('mynetwork'); +const container = document.getElementById('mynetwork'); // provide the data in the vis format -var data2 = { nodes, edges }; -var options = {}; +const data2 = { nodes, edges }; +options = {}; // initialize your network! -var network = new vis.Network(container, data2, options); +const network = new vis.Network(container, data2, options); // // Test code sample from http://visjs.org/docs/network/configure.html# // // these are all options in full. -var options2 = { +const options2 = { configure: { enabled: true, filter: 'nodes,edges', @@ -189,4 +189,4 @@ var options2 = { } }; -network.setOptions(options2); \ No newline at end of file +network.setOptions(options2); diff --git a/types/voca/voca-tests.ts b/types/voca/voca-tests.ts index 51d159d8ca..2353521ca0 100644 --- a/types/voca/voca-tests.ts +++ b/types/voca/voca-tests.ts @@ -1,10 +1,10 @@ import v = require('voca'); -var str: string; -var num: number; -var bool: boolean; -var strAry: string[]; -var numAry: number[]; +let str: string; +let num: number; +let bool: boolean; +let strAry: string[]; +let numAry: number[]; // Case str = v.camelCase(); @@ -222,18 +222,18 @@ str = v.splice('new year', 0, 3, 'happy'); str = v.tr(); str = v.tr('hello', 'el', 'ip'); str = v.tr('Yes. The fire rises.', { - 'Yes': 'Awesome', - 'fire': 'flame' -}) + Yes: 'Awesome', + fire: 'flame' +}); str = v('hello').tr('el', 'ip').value(); str = v('Yes. The fire rises.').tr({ - 'Yes': 'Awesome', - 'fire': 'flame' + Yes: 'Awesome', + fire: 'flame' }).value(); str = v.chain('hello').tr('el', 'ip').value(); str = v.chain('Yes. The fire rises.').tr({ - 'Yes': 'Awesome', - 'fire': 'flame' + Yes: 'Awesome', + fire: 'flame' }).value(); str = v.trim(); @@ -349,5 +349,5 @@ str = v.stripTags('Winter is cold', ['b', 'i']); str = v.stripTags('Sun
    set', '', '-'); // Util -var voca: v.VocaStatic = v.noConflict(); -var version: string = v.version; +const voca: v.VocaStatic = v.noConflict(); +const version: string = v.version; diff --git a/types/web-animations-js/index.d.ts b/types/web-animations-js/index.d.ts new file mode 100644 index 0000000000..e0124cefd3 --- /dev/null +++ b/types/web-animations-js/index.d.ts @@ -0,0 +1,94 @@ +// Type definitions for web-animations-js 2.2 +// Project: https://github.com/web-animations/web-animations-js +// Definitions by: Kristian Moerch +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare type AnimationEffectTimingFillMode = "none" | "forwards" | "backwards" | "both" | "auto"; +declare type AnimationEffectTimingPlaybackDirection = "normal" | "reverse" | "alternate" | "alternate-reverse"; +declare type AnimationPlayState = "idle" | "pending" | "running" | "paused" | "finished"; + +declare class AnimationPlaybackEvent { + constructor(target: Animation, currentTime: number, timelineTime: number); + target: Animation; + currentTime: number; + timelineTime: number; + type: string; + bubbles: boolean; + cancelable: boolean; + currentTarget: Animation; + defaultPrevented: boolean; + eventPhase: number; + timeStamp: number; +} + +interface AnimationKeyFrame { + easing?: string; + offset?: number; + [key: string]: string | number | [string | number, string | number] | undefined; +} + +interface AnimationTimeline { + currentTime: number; + getAnimations(): Animation[]; + play(effect: KeyframeEffect): Animation; +} +interface AnimationEffectTiming { + delay?: number; + direction?: AnimationEffectTimingPlaybackDirection; + duration?: number; + easing?: string; + endDelay?: number; + fill?: AnimationEffectTimingFillMode; + iterationStart?: number; + iterations?: number; + playbackRate?: number; +} +declare class KeyframeEffect { + constructor(target: HTMLElement, effect: AnimationKeyFrame | AnimationKeyFrame[], timing: number | AnimationEffectTiming, id?: string); + activeDuration: number; + onsample: (timeFraction: number | null, effect: KeyframeEffect, animation: Animation) => void | undefined; + parent: KeyframeEffect | null; + target: HTMLElement; + timing: AnimationEffectTiming; + getFrames(): AnimationKeyFrame[]; + remove(): void; +} +interface AnimationEventListener { + (evt: AnimationPlaybackEvent): void; +} + +declare class Animation { + constructor(effect: KeyframeEffect, timeline?: AnimationTimeline); + currentTime: number; + id: string; + oncancel: AnimationEventListener; + onfinish: AnimationEventListener; + readonly playState: AnimationPlayState; + playbackRate: number; + startTime: number; + cancel(): void; + finish(): void; + pause(): void; + play(): void; + reverse(): void; + addEventListener(type: "finish", handler: AnimationEventListener): void; + removeEventListener(type: "finish", handler: AnimationEventListener): void; + effect: KeyframeEffect; + readonly finished: Promise; + readonly ready: Promise; + timeline: AnimationTimeline; +} + +declare class SequenceEffect extends KeyframeEffect { + constructor(effects: KeyframeEffect[]); +} +declare class GroupEffect extends KeyframeEffect { + constructor(effects: KeyframeEffect[]); +} +interface Element { + animate(effect: AnimationKeyFrame | AnimationKeyFrame[], timing: number | AnimationEffectTiming): Animation; + getAnimations(): Animation[]; +} +interface Document { + timeline: AnimationTimeline; +} diff --git a/types/web-animations-js/tsconfig.json b/types/web-animations-js/tsconfig.json new file mode 100644 index 0000000000..6f7d4d67cb --- /dev/null +++ b/types/web-animations-js/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es5", + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "web-animations-js-tests.ts" + ] +} diff --git a/types/web-animations-js/tslint.json b/types/web-animations-js/tslint.json new file mode 100644 index 0000000000..377cc837d4 --- /dev/null +++ b/types/web-animations-js/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } diff --git a/types/web-animations-js/web-animations-js-tests.ts b/types/web-animations-js/web-animations-js-tests.ts new file mode 100644 index 0000000000..d27a922a98 --- /dev/null +++ b/types/web-animations-js/web-animations-js-tests.ts @@ -0,0 +1,121 @@ +// From the documentation +function test_doc() { + const elem = document.createElement('div'); + const animation = elem.animate({ + opacity: [0.5, 1], + transform: ['scale(0.5)', 'scale(1)'] + }, { + direction: 'alternate', + duration: 500, + iterations: Infinity + }); +} +// From https://io2015codelabs.appspot.com/codelabs/web-animations-transitions-playbackcontrol +// To test KeyframeEffect, SequenceEffect and GroupEffect +function test_AnimationsApiNext() { + function buildFadeIn(target: HTMLElement) { + const steps = [ + { opacity: 0, transform: 'translate(0, 20em)' }, + { opacity: 1, transform: 'translate(0)' } + ]; + return new KeyframeEffect(target, steps, { + duration: 500, + delay: -1000, + fill: 'backwards', + easing: 'cubic-bezier(0.175, 0.885, 0.32, 1.275)' + }); + } + function buildFadeOut(target: HTMLElement) { + const angle = Math.pow((Math.random() * 16) - 6, 3); + const offset = (Math.random() * 20) - 10; + const transform = 'translate(' + offset + 'em, 20em) ' + + 'rotate(' + angle + 'deg) ' + + 'scale(0)'; + const steps = [ + { visibility: 'visible', opacity: 1, transform: 'none' }, + { visibility: 'visible', opacity: 0, transform: transform } + ]; + return new KeyframeEffect(target, steps, { + duration: 1500, + easing: 'ease-in' + }); + } + const effectNode = document.createElement('div'); + effectNode.className = 'circleEffect'; + const bounds = document.documentElement.getBoundingClientRect(); + effectNode.style.left = bounds.left + bounds.width / 2 + 'px'; + effectNode.style.top = bounds.top + bounds.height / 2 + 'px'; + const header = document.querySelector('header'); + if (header) { + header.appendChild(effectNode); + } + const newColor = 'hsl(' + Math.round(Math.random() * 255) + ', 46%, 42%)'; + effectNode.style.background = newColor; + const scaleSteps = [{ transform: 'scale(0)' }, { transform: 'scale(1)' }]; + const timing: AnimationEffectTiming = { duration: 2500, easing: 'ease-in-out', fill: "backwards" }; + const scaleEffect = new KeyframeEffect(effectNode, scaleSteps, timing); + const fadeEffect = new SequenceEffect([buildFadeOut(effectNode), buildFadeIn(effectNode)]); + const allEffects = [scaleEffect, fadeEffect]; + // Play all animations within this group. + const groupEffect = new GroupEffect(allEffects); + const anim = document.timeline.play(groupEffect); +} + +// https://developer.mozilla.org/en-US/docs/Web/API/Animation/Animation +// http://codepen.io/rachelnabors/pen/eJyWzm/?editors=0010 +function test_whiteRabbit() { + var whiteRabbit = document.getElementById("rabbit"); + if (whiteRabbit) { + var rabbitDownKeyframes = new KeyframeEffect( + whiteRabbit, + [ + { transform: 'translateY(0%)' }, + { transform: 'translateY(100%)' } + ], + { duration: 3000, fill: 'forwards' } + ); + var rabbitDownAnimation = new Animation(rabbitDownKeyframes, document.timeline); + // On tap or click, + whiteRabbit.addEventListener("mousedown", downHeGoes, false); + whiteRabbit.addEventListener("touchstart", downHeGoes, false); + + // Trigger a single-fire animation + function downHeGoes(event: Event) { + + // Remove those event listeners + whiteRabbit!.removeEventListener("mousedown", downHeGoes, false); + whiteRabbit!.removeEventListener("touchstart", downHeGoes, false); + + // Play rabbit animation + rabbitDownAnimation.play(); + + } + } + + +} +// Testing onsample +// https://github.com/web-animations/web-animations-js/releases +function test_onsample_And_addEventListener() { + var elem = document.createElement("div"); + if (elem) { + elem.style.width = '150px'; + elem.style.color = 'black'; + elem.textContent = "HELLO"; + document.body.appendChild(elem); + let myEffect = new KeyframeEffect(elem, [], 1000); + myEffect.onsample = (timeFraction, effect, animation) => { + console.log("fraction", timeFraction); + // After finish event, timeFraction is null + if (timeFraction) { + effect.target.style.opacity = timeFraction.toFixed(2); + } + }; + // onsample is write only + console.log(myEffect.onsample); // => undefined + var myAnimation = document.timeline.play(myEffect); + myAnimation.addEventListener("finish", (e) => { + console.log("finished", e); + }) + } +} diff --git a/types/webmidi/index.d.ts b/types/webmidi/index.d.ts index a103ea77dd..b1f3cb0f61 100644 --- a/types/webmidi/index.d.ts +++ b/types/webmidi/index.d.ts @@ -12,7 +12,7 @@ interface Navigator { } declare namespace WebMidi { - export interface MIDIOptions { + interface MIDIOptions { /** * This member informs the system whether the ability to send and receive system * exclusive messages is requested or allowed on a given MIDIAccess object. @@ -24,15 +24,15 @@ declare namespace WebMidi { * This is a maplike interface whose value is a MIDIInput instance and key is its * ID. */ - export type MIDIInputMap = Map; + type MIDIInputMap = Map; /** * This is a maplike interface whose value is a MIDIOutput instance and key is its * ID. */ - export type MIDIOutputMap = Map; + type MIDIOutputMap = Map; - export interface MIDIAccess extends EventTarget { + interface MIDIAccess extends EventTarget { /** * The MIDI input ports available to the system. */ @@ -47,7 +47,7 @@ declare namespace WebMidi { * The handler called when a new port is connected or an existing port changes the * state attribute. */ - onstatechange: (e: MIDIConnectionEvent) => void; + onstatechange(e: MIDIConnectionEvent): void; /** * This attribute informs the user whether system exclusive support is enabled on @@ -56,13 +56,13 @@ declare namespace WebMidi { sysexEnabled: boolean; } - export type MIDIPortType = "input" | "output"; + type MIDIPortType = "input" | "output"; - export type MIDIPortDeviceState = "disconnected" | "connected"; + type MIDIPortDeviceState = "disconnected" | "connected"; - export type MIDIPortConnectionState = "open" | "closed" | "pending"; + type MIDIPortConnectionState = "open" | "closed" | "pending"; - export interface MIDIPort extends EventTarget { + interface MIDIPort extends EventTarget { /** * A unique ID of the port. This can be used by developers to remember ports the * user has chosen for their application. @@ -104,7 +104,7 @@ declare namespace WebMidi { * The handler called when an existing port changes its state or connection * attributes. */ - onstatechange: (e: MIDIConnectionEvent) => void; + onstatechange(e: MIDIConnectionEvent): void; /** * Makes the MIDI device corresponding to the MIDIPort explicitly available. Note @@ -133,11 +133,11 @@ declare namespace WebMidi { close(): Promise; } - export interface MIDIInput extends MIDIPort { - onmidimessage: (e: MIDIMessageEvent) => void; + interface MIDIInput extends MIDIPort { + onmidimessage(e: MIDIMessageEvent): void; } - export interface MIDIOutput extends MIDIPort { + interface MIDIOutput extends MIDIPort { /** * Enqueues the message to be sent to the corresponding MIDI port. * @param data The data to be enqueued, with each sequence entry representing a single byte of data. @@ -156,7 +156,7 @@ declare namespace WebMidi { clear(): void; } - export interface MIDIMessageEvent extends Event { + interface MIDIMessageEvent extends Event { /** * A timestamp specifying when the event occurred. */ @@ -168,7 +168,7 @@ declare namespace WebMidi { data: Uint8Array; } - export interface MIDIMessageEventInit extends EventInit { + interface MIDIMessageEventInit extends EventInit { /** * A timestamp specifying when the event occurred. */ @@ -180,14 +180,14 @@ declare namespace WebMidi { data: Uint8Array; } - export interface MIDIConnectionEvent extends Event { + interface MIDIConnectionEvent extends Event { /** * The port that has been connected or disconnected. */ port: MIDIPort; } - export interface MIDIConnectionEventInit extends EventInit { + interface MIDIConnectionEventInit extends EventInit { /** * The port that has been connected or disconnected. */ diff --git a/types/webmidi/webmidi-tests.ts b/types/webmidi/webmidi-tests.ts index f361202895..6e9ca69a5f 100644 --- a/types/webmidi/webmidi-tests.ts +++ b/types/webmidi/webmidi-tests.ts @@ -1,6 +1,4 @@ - - -var onFulfilled = (item: WebMidi.MIDIAccess) => { +const onFulfilled = (item: WebMidi.MIDIAccess) => { this._midiPort = item; item.onstatechange = (event: WebMidi.MIDIConnectionEvent) => { @@ -11,14 +9,14 @@ var onFulfilled = (item: WebMidi.MIDIAccess) => { console.log("sysexenabled"); console.log(item.sysexEnabled); - var inputs = this._midiPort.inputs.values(); + const inputs = this._midiPort.inputs.values(); for (const o of inputs) { this._inputs.push(o); console.log(o); } - var outputs = item.outputs.values(); + const outputs = item.outputs.values(); for (const op of outputs) { this._outputs.push(op); op.send([ 0x90, 0x45, 0x7f ] ); @@ -31,7 +29,7 @@ var onFulfilled = (item: WebMidi.MIDIAccess) => { } }; -var onRejected = (e: Error) => { console.error(e); }; +const onRejected = (e: Error) => { console.error(e); }; if (navigator.requestMIDIAccess !== undefined) { navigator.requestMIDIAccess().then(onFulfilled, onRejected); diff --git a/types/webpack-chain/index.d.ts b/types/webpack-chain/index.d.ts index f6cfc40b25..dd7b0b0d63 100644 --- a/types/webpack-chain/index.d.ts +++ b/types/webpack-chain/index.d.ts @@ -9,187 +9,187 @@ import * as https from 'https'; export = Config; declare class Config { - devServer: Config.DevServer - entryPoints: Config.EntryPoints - module: Config.Module - node: Config.ChainedMap - output: Config.Output - performance: Config.Performance - plugins: Config.Plugins - resolve: Config.Resolve - resolveLoader: Config.ResolveLoader + devServer: Config.DevServer; + entryPoints: Config.EntryPoints; + module: Config.Module; + node: Config.ChainedMap; + output: Config.Output; + performance: Config.Performance; + plugins: Config.Plugins; + resolve: Config.Resolve; + resolveLoader: Config.ResolveLoader; - amd(value: { [moduleName: string]: boolean }): this - bail(value: boolean): this - cache(value: boolean | any): this - devtool(value: Config.DevTool): this - context(value: string): this - externals(value: webpack.ExternalsElement | webpack.ExternalsElement[]): this - loader(value: any): this - profile(value: boolean): this - recordsPath(value: string): this - recordsInputPath(value: string): this - recordsOutputPath(value: string): this - stats(value: webpack.Options.Stats): this - target(value: string): this - watch(value: boolean): this - watchOptions(value: webpack.Options.WatchOptions): this + amd(value: { [moduleName: string]: boolean }): this; + bail(value: boolean): this; + cache(value: boolean | any): this; + devtool(value: Config.DevTool): this; + context(value: string): this; + externals(value: webpack.ExternalsElement | webpack.ExternalsElement[]): this; + loader(value: any): this; + profile(value: boolean): this; + recordsPath(value: string): this; + recordsInputPath(value: string): this; + recordsOutputPath(value: string): this; + stats(value: webpack.Options.Stats): this; + target(value: string): this; + watch(value: boolean): this; + watchOptions(value: webpack.Options.WatchOptions): this; - entry(name: string): Config.ChainedSet - plugin(name: string): Config.Plugin + entry(name: string): Config.ChainedSet; + plugin(name: string): Config.Plugin; - toConfig(): webpack.Configuration - merge(obj: any): this + toConfig(): webpack.Configuration; + merge(obj: any): this; } declare namespace Config { - export class Chained { - end(): Parent + class Chained { + end(): Parent; } - export class TypedChainedMap extends Chained { - clear(): this - delete(key: string): this - has(key: string): boolean - get(key: string): Value - set(key: string, value: Value): this - merge(obj: { [key: string]: Value }): this - entries(): { [key: string]: Value } - values(): Array + class TypedChainedMap extends Chained { + clear(): this; + delete(key: string): this; + has(key: string): boolean; + get(key: string): Value; + set(key: string, value: Value): this; + merge(obj: { [key: string]: Value }): this; + entries(): { [key: string]: Value }; + values(): Value[]; } - export class ChainedMap extends TypedChainedMap {} + class ChainedMap extends TypedChainedMap {} - export class TypedChainedSet extends Chained { - add(value: Value): this - prepend(value: Value): this - clear(): this - delete(key: string): this - has(key: string): boolean - merge(arr: Array): this - values(): Array + class TypedChainedSet extends Chained { + add(value: Value): this; + prepend(value: Value): this; + clear(): this; + delete(key: string): this; + has(key: string): boolean; + merge(arr: Value[]): this; + values(): Value[]; } - export class ChainedSet extends TypedChainedSet {} + class ChainedSet extends TypedChainedSet {} - export class Plugins extends TypedChainedMap> {} + class Plugins extends TypedChainedMap> {} - export class Plugin extends ChainedMap { - init(value: (plugin: PluginClass, args: any[]) => webpack.Plugin): this - use(plugin: PluginClass, args?: any[]): this - tap(f: (args: any[]) => any[]): this + class Plugin extends ChainedMap { + init(value: (plugin: PluginClass, args: any[]) => webpack.Plugin): this; + use(plugin: PluginClass, args?: any[]): this; + tap(f: (args: any[]) => any[]): this; } - export class Module extends ChainedMap { - rules: TypedChainedMap - rule(name: string): Rule + class Module extends ChainedMap { + rules: TypedChainedMap; + rule(name: string): Rule; } - export class Output extends ChainedMap { - chunkFilename(value: string): this - crossOriginLoading(value: boolean | string): this - filename(value: string): this - library(value: string): this - libraryTarget(value: string): this - devtoolFallbackModuleFilenameTemplate(value: any): this - devtoolLineToLine(value: any): this - devtoolModuleFilenameTemplate(value: any): this - hashFunction(value: string): this - hashDigest(value: string): this - hashDigestLength(value: number): this - hashSalt(value: any): this - hotUpdateChunkFilename(value: string): this - hotUpdateFunction(value: any): this - hotUpdateMainFilename(value: string): this - jsonpFunction(value: string): this - path(value: string): this - pathinfo(value: boolean): this - publicPath(value: string): this - sourceMapFilename(value: string): this - sourcePrefix(value: string): this - strictModuleExceptionHandling(value: boolean): this - umdNamedDefine(value: boolean): this + class Output extends ChainedMap { + chunkFilename(value: string): this; + crossOriginLoading(value: boolean | string): this; + filename(value: string): this; + library(value: string): this; + libraryTarget(value: string): this; + devtoolFallbackModuleFilenameTemplate(value: any): this; + devtoolLineToLine(value: any): this; + devtoolModuleFilenameTemplate(value: any): this; + hashFunction(value: string): this; + hashDigest(value: string): this; + hashDigestLength(value: number): this; + hashSalt(value: any): this; + hotUpdateChunkFilename(value: string): this; + hotUpdateFunction(value: any): this; + hotUpdateMainFilename(value: string): this; + jsonpFunction(value: string): this; + path(value: string): this; + pathinfo(value: boolean): this; + publicPath(value: string): this; + sourceMapFilename(value: string): this; + sourcePrefix(value: string): this; + strictModuleExceptionHandling(value: boolean): this; + umdNamedDefine(value: boolean): this; } - export class DevServer extends ChainedMap { - clientLogLevel(value: 'none' | 'error' | 'warning' | 'info'): this - compress(value: boolean): this - contentBase(value: boolean | string | string[]): this - filename(value: string): this - headers(value: { [header: string]: string }): this - historyApiFallback(value: boolean | any): this - host(value: string): this - hot(value: boolean): this - hotOnly(value: boolean): this - https(value: boolean | https.ServerOptions): this - inline(value: boolean): this - lazy(value: boolean): this - noInfo(value: boolean): this - overlay(value: boolean | { warnings?: boolean, errors?: boolean }): this - port(value: number): this - proxy(value: any): this - quiet(value: boolean): this - setup(value: (expressApp: any) => void): this - stats(value: webpack.Options.Stats): this - watchContentBase(value: boolean): this + class DevServer extends ChainedMap { + clientLogLevel(value: 'none' | 'error' | 'warning' | 'info'): this; + compress(value: boolean): this; + contentBase(value: boolean | string | string[]): this; + filename(value: string): this; + headers(value: { [header: string]: string }): this; + historyApiFallback(value: boolean | any): this; + host(value: string): this; + hot(value: boolean): this; + hotOnly(value: boolean): this; + https(value: boolean | https.ServerOptions): this; + inline(value: boolean): this; + lazy(value: boolean): this; + noInfo(value: boolean): this; + overlay(value: boolean | { warnings?: boolean, errors?: boolean }): this; + port(value: number): this; + proxy(value: any): this; + quiet(value: boolean): this; + setup(value: (expressApp: any) => void): this; + stats(value: webpack.Options.Stats): this; + watchContentBase(value: boolean): this; } - export class Performance extends ChainedMap { - hints(value: boolean | 'error' | 'warning'): this - maxEntrypointSize(value: number): this - maxAssetSize(value: number): this - assetFilter(value: (assetFilename: string) => boolean): this + class Performance extends ChainedMap { + hints(value: boolean | 'error' | 'warning'): this; + maxEntrypointSize(value: number): this; + maxAssetSize(value: number): this; + assetFilter(value: (assetFilename: string) => boolean): this; } - export class EntryPoints extends TypedChainedMap> {} + class EntryPoints extends TypedChainedMap> {} - export class Resolve extends ChainedMap { - alias: TypedChainedMap - aliasFields: TypedChainedSet - descriptionFiles: TypedChainedSet - extensions: TypedChainedSet - mainFields: TypedChainedSet - mainFiles: TypedChainedSet - modules: TypedChainedSet - plugins: TypedChainedMap> + class Resolve extends ChainedMap { + alias: TypedChainedMap; + aliasFields: TypedChainedSet; + descriptionFiles: TypedChainedSet; + extensions: TypedChainedSet; + mainFields: TypedChainedSet; + mainFiles: TypedChainedSet; + modules: TypedChainedSet; + plugins: TypedChainedMap>; - enforceExtension(value: boolean): this - enforceModuleExtension(value: boolean): this - unsafeCache(value: boolean | RegExp | RegExp[]): this - symlinks(value: boolean): this - cachePredicate(value: (data: { path: string, request: string }) => boolean): this + enforceExtension(value: boolean): this; + enforceModuleExtension(value: boolean): this; + unsafeCache(value: boolean | RegExp | RegExp[]): this; + symlinks(value: boolean): this; + cachePredicate(value: (data: { path: string, request: string }) => boolean): this; - plugin(name: string): Plugin + plugin(name: string): Plugin; } - export class ResolveLoader extends ChainedMap { - extensions: TypedChainedSet - modules: TypedChainedSet - moduleExtensions: TypedChainedSet - packageMains: TypedChainedSet + class ResolveLoader extends ChainedMap { + extensions: TypedChainedSet; + modules: TypedChainedSet; + moduleExtensions: TypedChainedSet; + packageMains: TypedChainedSet; } - export class Rule extends ChainedMap { - uses: TypedChainedMap - include: TypedChainedSet - exclude: TypedChainedSet + class Rule extends ChainedMap { + uses: TypedChainedMap; + include: TypedChainedSet; + exclude: TypedChainedSet; - parser(value: { [optName: string]: any }): this - test(value: webpack.Condition | webpack.Condition[]): this - enforce(value: 'pre' | 'post'): this + parser(value: { [optName: string]: any }): this; + test(value: webpack.Condition | webpack.Condition[]): this; + enforce(value: 'pre' | 'post'): this; - use(name: string): Use - pre(): this - post(): this + use(name: string): Use; + pre(): this; + post(): this; } - type LoaderOptions = { [name: string]: any } + interface LoaderOptions { [name: string]: any; } - export class Use extends ChainedMap { - loader(value: string): this - options(value: LoaderOptions): this + class Use extends ChainedMap { + loader(value: string): this; + options(value: LoaderOptions): this; - tap(f: (options: LoaderOptions) => LoaderOptions): this + tap(f: (options: LoaderOptions) => LoaderOptions): this; } type DevTool = 'eval' | 'inline-source-map' | 'cheap-eval-source-map' | 'cheap-source-map' | @@ -204,9 +204,9 @@ declare namespace Config { '#@eval' | '#@inline-source-map' | '#@cheap-eval-source-map' | '#@cheap-source-map' | '#@cheap-module-eval-source-map' | '#@cheap-module-source-map' | '#@eval-source-map' | '#@source-map' | '#@nosources-source-map' | '#@hidden-source-map' | '#@nosources-source-map' | - boolean + boolean; interface PluginClass { - new (...opts: any[]): webpack.Plugin + new (...opts: any[]): webpack.Plugin; } } diff --git a/types/webpack-chain/webpack-chain-tests.ts b/types/webpack-chain/webpack-chain-tests.ts index da72bc6f9f..f955decd38 100644 --- a/types/webpack-chain/webpack-chain-tests.ts +++ b/types/webpack-chain/webpack-chain-tests.ts @@ -13,7 +13,7 @@ config .context('') .externals('foo') .externals(/node_modules/) - .externals({ 'test': false, 'foo': 'bar' }) + .externals({ test: false, foo: 'bar' }) .externals(['foo', 'bar']) .externals((context, request, cb) => cb(null, true)) .loader({}) diff --git a/types/webpack/index.d.ts b/types/webpack/index.d.ts index ee9ebd8be2..81085d39d8 100644 --- a/types/webpack/index.d.ts +++ b/types/webpack/index.d.ts @@ -826,6 +826,10 @@ declare namespace webpack { constructor(options?: (percentage: number, msg: string) => void); } + class EnvironmentPlugin extends Plugin { + constructor(envs: string[] | {[key: string]: any}); + } + class ProvidePlugin extends Plugin { constructor(definitions: {[key: string]: any}); } diff --git a/types/webpack/webpack-tests.ts b/types/webpack/webpack-tests.ts index aeb17e5d4c..e29df7cefb 100644 --- a/types/webpack/webpack-tests.ts +++ b/types/webpack/webpack-tests.ts @@ -421,6 +421,8 @@ plugin = new webpack.WatchIgnorePlugin(paths); plugin = new webpack.LoaderOptionsPlugin({ debug: true }); +plugin = new webpack.EnvironmentPlugin(['a', 'b']); +plugin = new webpack.EnvironmentPlugin({a: true, b: 'c'}); plugin = new webpack.ProgressPlugin((percent: number, message: string) => {}); // diff --git a/types/webtorrent/index.d.ts b/types/webtorrent/index.d.ts index 22c9417edd..ee2e42cf55 100644 --- a/types/webtorrent/index.d.ts +++ b/types/webtorrent/index.d.ts @@ -13,12 +13,12 @@ import { Wire } from 'bittorrent-protocol'; declare const WebTorrent: WebTorrent.WebTorrent; declare namespace WebTorrent { - export interface WebTorrent { + interface WebTorrent { new (config?: Options): Instance; (config?: Options): Instance; WEBRTC_SUPPORT: boolean; } - export interface Options { + interface Options { maxConns?: number; nodeId?: string | Buffer; peerId?: string | Buffer; @@ -27,16 +27,16 @@ declare namespace WebTorrent { webSeeds?: boolean; } - export interface TorrentOptions { + interface TorrentOptions { announce?: any[]; - getAnnounceOpts?: () => void; + getAnnounceOpts?(): void; maxWebConns?: number; path?: string; - store?: (chunkLength: number, storeOpts: { length: number, files: File[], torrent: Torrent, }) => any; + store?(chunkLength: number, storeOpts: { length: number, files: File[], torrent: Torrent, }): any; name?: string; } - export interface Instance extends NodeJS.EventEmitter { + interface Instance extends NodeJS.EventEmitter { on(event: 'torrent', callback: (torrent: Torrent) => void): this; on(event: 'error', callback: (err: Error | string) => void): this; @@ -63,7 +63,7 @@ declare namespace WebTorrent { readonly ratio: number; } - export interface Torrent extends NodeJS.EventEmitter { + interface Torrent extends NodeJS.EventEmitter { readonly infoHash: string; readonly magnetURI: string; @@ -127,7 +127,7 @@ declare namespace WebTorrent { on(event: 'noPeers', callback: (announceType: 'tracker' | 'dht') => void): this; } - export interface TorrentFile extends NodeJS.EventEmitter { + interface TorrentFile extends NodeJS.EventEmitter { readonly name: string; readonly path: string; diff --git a/types/webtorrent/webtorrent-tests.ts b/types/webtorrent/webtorrent-tests.ts index f0f80cb1b3..06d8f853f3 100644 --- a/types/webtorrent/webtorrent-tests.ts +++ b/types/webtorrent/webtorrent-tests.ts @@ -1,8 +1,8 @@ import * as WebTorrent from 'webtorrent'; import * as fs from 'fs'; -var client = new WebTorrent(); -var magnetURI = '...'; +const client = new WebTorrent(); +const magnetURI = '...'; client.add(magnetURI, {}, torrent => { // Got torrent metadata! @@ -25,7 +25,7 @@ client.add(magnetURI, {}, torrent => { file.getBlobURL((err, url) => { if (err) throw err; - var a = document.createElement('a'); + const a = document.createElement('a'); // a.download = file.name if (url) { a.href = url; @@ -61,7 +61,7 @@ client.seed('./file.txt', {}, torrent => { client.add(magnetURI, torrent => { // create HTTP server for this torrent - var server = torrent.createServer(); + const server = torrent.createServer(); server.listen(1234); // start the server listening to a port // visit http://localhost:/ to see a list of files diff --git a/types/wicg-mediasession/wicg-mediasession-tests.ts b/types/wicg-mediasession/wicg-mediasession-tests.ts index 78731a3222..88ab80afa1 100644 --- a/types/wicg-mediasession/wicg-mediasession-tests.ts +++ b/types/wicg-mediasession/wicg-mediasession-tests.ts @@ -1,4 +1,3 @@ - const tracks: string[] = ['chapter1.mp3', 'chapter2.mp3', 'chapter3.mp3']; let trackId = 0; diff --git a/types/wu/index.d.ts b/types/wu/index.d.ts index 3de797c454..733daa7141 100644 --- a/types/wu/index.d.ts +++ b/types/wu/index.d.ts @@ -7,7 +7,7 @@ declare namespace Wu { type Consumer = (t: T) => void; type Filter = (t: T) => boolean; - export interface WuStatic { + interface WuStatic { (iterable: Iterable): WuIterable; // only static chain(...iters: Array>): WuIterable; @@ -62,7 +62,7 @@ declare namespace Wu { tee(iter: Iterable): Array>; tee(n: number, iter: Iterable): Array>; } - export interface WuIterable extends IterableIterator { + interface WuIterable extends IterableIterator { // generated from section "copied to WuIterable" above via // sed -r 's/(, )?iter: Iterable<\w+>//' | // sed -r 's/^(\s+\w+)/\1/' | diff --git a/types/wu/wu-tests.ts b/types/wu/wu-tests.ts index e96324274b..90657734e7 100644 --- a/types/wu/wu-tests.ts +++ b/types/wu/wu-tests.ts @@ -1,6 +1,9 @@ // adapted from `cat wu.js/test/* |sed '/= require/d'> wu-tests.ts` -declare var describe: any, it: any, mocha: any, assert: { +declare const describe: any; +declare const it: any; +declare const mocha: any; +declare const assert: { iterable: any; eqSet(expected: Set, actual: Iterable): any; ok: any; @@ -18,7 +21,7 @@ assert.iterable = (thing: any) => { // iterator are in the |expected| set. assert.eqSet = (expected: any, actual: any) => { assert.iterable(actual); - for (var x of actual) { + for (const x of actual) { assert.ok(expected.has(x)); expected.delete(x); } @@ -96,23 +99,23 @@ describe("wu.count", () => { }); describe("wu.curryable", () => { it("should wait until its given enough arguments", () => { - var f = wu.curryable((a, b) => a + b); + const f = wu.curryable((a, b) => a + b); - var f0 = f()()()()(); + const f0 = f()()()()(); assert.equal(typeof f0, "function"); - var f1 = f(1); + const f1 = f(1); assert.equal(typeof f1, "function"); assert.equal(f1(2), 3); }); it("should just call the function when given enough arguments", () => { - var f = wu.curryable((a, b) => a + b); + const f = wu.curryable((a, b) => a + b); assert.equal(f(1, 2), 3); }); it("should expect the number of arguments we tell it to", () => { - var f = wu.curryable((...args) => 5, 5); + const f = wu.curryable((...args) => 5, 5); assert.equal(typeof f(1, 2, 3, 4), "function"); assert.equal(f(1, 2, 3, 4, 5), 5); }); diff --git a/types/xml/xml-tests.ts b/types/xml/xml-tests.ts index 7bc3cd61c0..54619959af 100644 --- a/types/xml/xml-tests.ts +++ b/types/xml/xml-tests.ts @@ -7,13 +7,12 @@ interface Tester { same(a: any, b: any): void; plan(id: number): void; ok(a: any): void; -}; +} function test(c: string, f: (t: Tester) => void) { return; } - test('no elements', t => { t.is(xml(), ''); t.is(xml([]), ''); @@ -162,4 +161,4 @@ test('xml declaration options', t => { t.is(xml([{a: 'test'}], {declaration: false}), '
    test'); t.is(xml([{a: 'test'}], {declaration: true, indent: '\n'}), '\ntest'); t.is(xml([{a: 'test'}], {}), 'test'); -}); \ No newline at end of file +}); diff --git a/types/xml2json/xml2json-tests.ts b/types/xml2json/xml2json-tests.ts index 409fc5f27e..fd8566ca52 100644 --- a/types/xml2json/xml2json-tests.ts +++ b/types/xml2json/xml2json-tests.ts @@ -1,15 +1,15 @@ import * as parser from 'xml2json'; -var xml = "bar"; +let xml = "bar"; // xml to json -var jsonString: string = parser.toJson(xml); +const jsonString: string = parser.toJson(xml); // json to xml -var xml: string = parser.toXml(jsonString); +xml = parser.toXml(jsonString); // xml to json in object mode and JsonOptions -var jsonObject: {} = parser.toJson(xml, { +const jsonObject: {} = parser.toJson(xml, { object: true, reversible: false, coerce: false, @@ -19,6 +19,6 @@ var jsonObject: {} = parser.toJson(xml, { }); // json to xml with XmlOptions -var xml: string = parser.toXml(jsonObject, { +xml = parser.toXml(jsonObject, { sanitize: true }); diff --git a/types/xmpp__jid/index.d.ts b/types/xmpp__jid/index.d.ts index b132680c72..a7b2e0fe7a 100644 --- a/types/xmpp__jid/index.d.ts +++ b/types/xmpp__jid/index.d.ts @@ -10,14 +10,14 @@ // Remove the `declare module` wrapper. // tslint:disable-next-line no-single-declare-module declare module "@xmpp/jid" { - export function createJID(local: string, domain: string, resource: string): JID; - export function equal(a: JID, b: JID): boolean; - export function is(a: any): boolean; + function createJID(local: string, domain: string, resource: string): JID; + function equal(a: JID, b: JID): boolean; + function is(a: any): boolean; /** * Created by marcneumann on 17.02.17. */ - export class JID { + class JID { local: string; domain: string; resource: string; @@ -30,17 +30,17 @@ declare module "@xmpp/jid" { /** * Convenience method to distinguish users - **/ + */ bare(): JID; /** * Comparison function - **/ + */ equals(other: JID): boolean; /** * http://xmpp.org/rfcs/rfc6122.html#addressing-localpart - **/ + */ setLocal(local: string, escape?: any): void; getLocal(unescape?: any): string; diff --git a/types/xrm/index.d.ts b/types/xrm/index.d.ts index 67c5a8e778..956dc969a2 100644 --- a/types/xrm/index.d.ts +++ b/types/xrm/index.d.ts @@ -11,19 +11,16 @@ declare var Xrm: Xrm.XrmStatic; declare function GetGlobalContext(): Xrm.Context; -interface Window -{ +interface Window { Xrm: Xrm.XrmStatic; GetGlobalContext(): Xrm.Context; } -declare namespace Xrm -{ +declare namespace Xrm { /** * Static xRM object. */ - export interface XrmStatic - { + interface XrmStatic { /** * Provides a namespace container for the context, data and ui objects. */ @@ -58,7 +55,7 @@ declare namespace Xrm * * @return The attribute. */ - getAttribute( attributeName: string ): T; + getAttribute(attributeName: string): T; /** * Gets an attribute matching attributeName. @@ -67,7 +64,7 @@ declare namespace Xrm * * @return The attribute. */ - getAttribute( attributeName: string ): Page.Attribute; + getAttribute(attributeName: string): Page.Attribute; /** * Gets an attribute by index. @@ -76,7 +73,7 @@ declare namespace Xrm * * @return The attribute. */ - getAttribute( index: number ): Page.Attribute; + getAttribute(index: number): Page.Attribute; /** * Gets an attribute. @@ -85,7 +82,7 @@ declare namespace Xrm * * @return An array of attribute. */ - getAttribute( delegateFunction: Collection.MatchingDelegate ): Page.Attribute[]; + getAttribute(delegateFunction: Collection.MatchingDelegate): Page.Attribute[]; /** * Gets all controls. @@ -102,7 +99,7 @@ declare namespace Xrm * * @return The control. */ - getControl( controlName: string ): T; + getControl(controlName: string): T; /** * Gets a control matching controlName. @@ -111,7 +108,7 @@ declare namespace Xrm * * @return The control. */ - getControl( controlName: string ): Page.Control; + getControl(controlName: string): Page.Control; /** * Gets a control by index. @@ -121,7 +118,7 @@ declare namespace Xrm * * @return The control. */ - getControl( index: number ): T; + getControl(index: number): T; /** * Gets a control by index. @@ -130,7 +127,7 @@ declare namespace Xrm * * @return The control. */ - getControl( index: number ): Page.Control; + getControl(index: number): Page.Control; /** * Gets a control. @@ -139,7 +136,7 @@ declare namespace Xrm * * @return An array of control. */ - getControl( delegateFunction: Collection.MatchingDelegate ): Page.Control[]; + getControl(delegateFunction: Collection.MatchingDelegate): Page.Control[]; }; /** @@ -152,7 +149,7 @@ declare namespace Xrm * @param {string} message The message. * @param {function()} onCloseCallback The "OK" callback. */ - alertDialog( message: string, onCloseCallback: () => void ): void; + alertDialog(message: string, onCloseCallback: () => void): void; /** * Displays a confirmation dialog, with "OK" and "Cancel" buttons. @@ -161,7 +158,7 @@ declare namespace Xrm * @param {function()} yesCloseCallback The "OK" callback. * @param {function()} noCloseCallback The "Cancel" callback. */ - confirmDialog( message: string, yesCloseCallback: () => void, noCloseCallback: () => void ): void; + confirmDialog(message: string, yesCloseCallback: () => void, noCloseCallback: () => void): void; /** * Query if 'entityType' is an Activity entity. @@ -170,7 +167,7 @@ declare namespace Xrm * * @return true if the entity is an Activity, false if not. */ - isActivityType( entityType: string ): boolean; + isActivityType(entityType: string): boolean; /** * Opens quick create. @@ -183,7 +180,7 @@ declare namespace Xrm * error. * @return {Async.XrmPromise} Returns an asynchronous promise. */ - openQuickCreate( entityLogicalName: string, createFromEntity?: Page.LookupValue, parameters?: Utility.OpenParameters ): + openQuickCreate(entityLogicalName: string, createFromEntity?: Page.LookupValue, parameters?: Utility.OpenParameters): Async.XrmPromise; /** @@ -194,7 +191,7 @@ declare namespace Xrm * @param {FormParameters} parameters (Optional) A dictionary object that passes extra query string parameters to the form. * @param {WindowOptions} windowOptions (Optional) Options for controlling the window. */ - openEntityForm( name: string, id?: string, parameters?: Utility.FormOpenParameters, windowOptions?: Utility.WindowOptions ): void; + openEntityForm(name: string, id?: string, parameters?: Utility.FormOpenParameters, windowOptions?: Utility.WindowOptions): void; /** * Opens an HTML Web Resource in a new browser window. @@ -217,7 +214,7 @@ declare namespace Xrm * data (identical to this method's webResourceData parameter) * formid */ - openWebResource( webResourceName: string, webResourceData?: string, width?: number, height?: number ): Window; + openWebResource(webResourceName: string, webResourceData?: string, width?: number, height?: number): Window; }; /** @@ -246,23 +243,22 @@ declare namespace Xrm /** * Client Types for Xrm.Page.context.getClient(). */ - export type Client = "Web" | "Outlook" | "Mobile"; + type Client = "Web" | "Outlook" | "Mobile"; /** * Client States for Xrm.Page.context.getClientState(). */ - export type ClientState = "Online" | "Offline"; + type ClientState = "Online" | "Offline"; /** * Themes for Xrm.Page.context.getCurrentTheme(). */ - export type Theme = "default" | "Office12Blue" | "Office14Silver"; + type Theme = "default" | "Office12Blue" | "Office14Silver"; /** * Interface for the client context. */ - export interface ClientContext - { + interface ClientContext { /** * Returns a value to indicate which client the script is executing in. * @@ -281,8 +277,7 @@ declare namespace Xrm /** * Interface for the xRM application context. */ - export interface Context - { + interface Context { /** * The client's context instance. */ @@ -390,7 +385,7 @@ declare namespace Xrm * * @remarks Format: "/"+ OrgName + sPath */ - prependOrgName( sPath: string ): string; + prependOrgName(sPath: string): string; } /** @@ -398,8 +393,7 @@ declare namespace Xrm * * @see {@link https://msdn.microsoft.com/en-us/library/dn481607.aspx#Anchor_2} for details. */ - export interface SaveOptions - { + interface SaveOptions { /** * Indicates whether to use the Book or Reschedule messages rather than the Create or Update messages. * Applicable to appointment, recurring appointment, or service activity records. @@ -410,8 +404,7 @@ declare namespace Xrm /** * Interface for the Xrm.Page.data object. */ - export interface Data - { + interface Data { /** * Asynchronously refreshes data on the form, without reloading the page. * @@ -419,7 +412,7 @@ declare namespace Xrm * * @return {Async.XrmPromise} Returns an asynchronous promise. */ - refresh( save: boolean ): Async.XrmPromise; + refresh(save: boolean): Async.XrmPromise; /** * Asynchronously saves the record. @@ -435,7 +428,7 @@ declare namespace Xrm * * @return {Async.XrmPromise} Returns an asynchronous promise. */ - save( saveOptions: SaveOptions ): Async.XrmPromise; + save(saveOptions: SaveOptions): Async.XrmPromise; /** * The record context of the form. @@ -453,8 +446,7 @@ declare namespace Xrm /** * Interface for the Xrm.Page.ui object. */ - export interface Ui - { + interface Ui { /** * Displays a form level notification. Any number of notifications can be displayed and will remain until removed using clearFormNotification. * The height of the notification area is limited so each new message will be added to the top. @@ -469,7 +461,7 @@ declare namespace Xrm * WARNING Notification will use the system warning icon. * INFO Notification will use the system info icon. */ - setFormNotification( message: string, level: Page.ui.FormNotificationLevel, uniqueId: string ): boolean; + setFormNotification(message: string, level: Page.ui.FormNotificationLevel, uniqueId: string): boolean; /** * Clears the form notification described by uniqueId. @@ -478,7 +470,7 @@ declare namespace Xrm * * @return True if it succeeds, otherwise false. */ - clearFormNotification( uniqueId: string ): boolean; + clearFormNotification(uniqueId: string): boolean; /** * Closes the form. @@ -563,8 +555,7 @@ declare namespace Xrm /** * Interface for methods to create and manage records in the mobile clients (for phones tablets). */ - export interface Mobile - { + interface Mobile { /** * Provides methods to create and manage records in the mobile clients while working in the offline mode. * @@ -578,8 +569,7 @@ declare namespace Xrm * * @see {@link https://msdn.microsoft.com/en-us/library/mt787123.aspx} for details. */ - export interface MobileOffline - { + interface MobileOffline { /** * Returns whether an entity is offline enabled. * @@ -587,7 +577,7 @@ declare namespace Xrm * * @return {boolean} True if the entity is offline enabled; otherwise False. */ - isOfflineEnabled( entityType: string ): boolean; + isOfflineEnabled(entityType: string): boolean; /** * Creates an entity record in mobile clients while working in the offline mode. @@ -603,7 +593,7 @@ declare namespace Xrm * Integer, Lookup, Memo, Money, Owner, Picklist, String, State * Status, UniqueIdentifier */ - createRecord( entityType: string, data: { [attributeName: string]: any } ): Async.XrmPromise; + createRecord(entityType: string, data: { [attributeName: string]: any }): Async.XrmPromise; /** * Retrieves an entity record in mobile clients while working in the offline mode. @@ -621,7 +611,7 @@ declare namespace Xrm * Integer, Lookup, Memo, Money, Owner, Picklist, String, State * Status, UniqueIdentifier */ - retrieveRecord( entityType: string, id: string, options: string ): Async.XrmPromise; + retrieveRecord(entityType: string, id: string, options: string): Async.XrmPromise; /** * Retrieves a collection of entity records in mobile clients while working in the offline mode. @@ -644,7 +634,7 @@ declare namespace Xrm * Integer, Lookup, Memo, Money, Owner, Picklist, String, State * Status, UniqueIdentifier */ - retrieveMultipleRecords( entityType: string, options: string, maxPageSize: number ): Async.XrmPromise; + retrieveMultipleRecords(entityType: string, options: string, maxPageSize: number): Async.XrmPromise; /** * Updates an entity record in mobile clients while working in the offline mode. @@ -661,7 +651,7 @@ declare namespace Xrm * Integer, Lookup, Memo, Money, Owner, Picklist, String, State * Status, UniqueIdentifier */ - updateRecord( entityType: string, id: string, data: { [attributeName: string]: any } ): Async.XrmPromise; + updateRecord(entityType: string, id: string, data: { [attributeName: string]: any }): Async.XrmPromise; /** * Deletes an entity record in mobile clients while working in the offline mode. @@ -673,25 +663,24 @@ declare namespace Xrm * * @remarks You cannot delete intersect and activity party entities. */ - deleteRecord( entityType: string, id: string ): Async.XrmPromise; + deleteRecord(entityType: string, id: string): Async.XrmPromise; } /** * A definition module for asynchronous interface declarations. */ - export module Async - { + namespace Async { /** * Called when the operation is successful. */ - export type SuccessCallbackDelegate = () => void; + type SuccessCallbackDelegate = () => void; /** * Called when the operation fails. * * @param {ErrorCallbackObject} error The error object. */ - export type ErrorCallbackDelegate = ( error: ErrorCallbackObject ) => void; + type ErrorCallbackDelegate = (error: ErrorCallbackObject) => void; /** * Called when the Xrm.Utility.openQuickCreate operation is successful and a new record has been created. @@ -700,7 +689,7 @@ declare namespace Xrm * * @see {Xrm.Utility.openQuickCreate} */ - export type QuickCreateSuccessCallbackDelegate = ( record: OpenQuickCreateSuccessCallbackObject ) => void; + type QuickCreateSuccessCallbackDelegate = (record: OpenQuickCreateSuccessCallbackObject) => void; /** * Called when the offline operation is successful. @@ -709,7 +698,7 @@ declare namespace Xrm * * @see {Xrm.Mobile.offline} */ - export type OfflineOperationSuccessCallbackDelegate = ( record: OfflineOperationSuccessCallbackObject ) => void; + type OfflineOperationSuccessCallbackDelegate = (record: OfflineOperationSuccessCallbackObject) => void; /** * Called when the offline retrieve multiple operation is successful. @@ -718,7 +707,7 @@ declare namespace Xrm * * @see {Xrm.Mobile.offline.retrieveMultipleRecords} */ - export type OfflineRetrieveMultipleSuccessCallbackDelegate = (resultSet: Array<{ [key: string]: any }>) => void; + type OfflineRetrieveMultipleSuccessCallbackDelegate = (resultSet: Array<{ [key: string]: any }>) => void; /** * Called when the operation fails. @@ -727,13 +716,12 @@ declare namespace Xrm * * @see {Xrm.Mobile.offline} */ - export type OfflineErrorCallbackDelegate = (error: OfflineErrorCallbackObject) => void; + type OfflineErrorCallbackDelegate = (error: OfflineErrorCallbackObject) => void; /** * Object passed to ErrorCallbackDelegate. */ - export interface ErrorCallbackObject - { + interface ErrorCallbackObject { /** * The error code. */ @@ -748,8 +736,7 @@ declare namespace Xrm /** * Object passed to QuickCreateSuccessCallbackDelegate. */ - export interface OpenQuickCreateSuccessCallbackObject - { + interface OpenQuickCreateSuccessCallbackObject { /** * A lookup value which identifies the record which has been created. */ @@ -759,8 +746,7 @@ declare namespace Xrm /** * Object passed to OfflineOperationSuccessCallbackDelegate; */ - export interface OfflineOperationSuccessCallbackObject - { + interface OfflineOperationSuccessCallbackObject { /** * GUID of the record; */ @@ -775,8 +761,7 @@ declare namespace Xrm /** * Object passed to OfflineErrorCallbackDelegate. */ - export interface OfflineErrorCallbackObject extends ErrorCallbackObject - { + interface OfflineErrorCallbackObject extends ErrorCallbackObject { /** * An internal error message that might contain additional details about the issue. */ @@ -789,70 +774,51 @@ declare namespace Xrm * @tparam TSuccessCallback Generic success callback parameter. * @tparam TErrorCallback Generic error callback parameter. */ - export interface XrmPromise - { + interface XrmPromise { /** * A basic 'then' promise. * * @param {SuccessCallbackDelegate} successCallback The success callback. * @param {ErrorCallbackDelegate} errorCallback The error callback. */ - then( successCallback: TSuccessCallback, errorCallback: TErrorCallback ): void; + then(successCallback: TSuccessCallback, errorCallback: TErrorCallback): void; } } /** * A definition module for collection interface declarations. */ - export module Collection - { + namespace Collection { /** - * Interface for a matching delegate. + * Called for each item in an array * - * @tparam T Generic type parameter. + * @param {T} item The item. + * @param {number} index Zero-based index of the item array. + * + * @return true if the item matches, false if it does not. */ - export interface MatchingDelegate - { - /** - * Called for each item in an array - * - * @param {T} item The item. - * @param {number} index Zero-based index of the item array. - * - * @return true if the item matches, false if it does not. - */ - ( item: T, index?: number ): boolean; - } + type MatchingDelegate = (item: T, index?: number) => boolean; /** - * Interface for iterative delegate. + * Called for each item in an array * - * @tparam T Generic type parameter. + * @param {T} item The item. + * @param {number} index Zero-based index of the item array. */ - export interface IterativeDelegate - { - /** - * Called for each item in an array - * - * @param {T} item The item. - * @param {number} index Zero-based index of the item array. - */ - ( item: T, index?: number ): void; - } + type IterativeDelegate = (item: T, index?: number) => void; /** * Interface for an item collection. * * @tparam T Generic type parameter. */ - export interface ItemCollection - { + interface ItemCollection { /** * Applies an operation to all items in this collection. * * @param {IterativeDelegate{T}} delegate An iterative delegate function */ - forEach( delegate: IterativeDelegate ): void; + forEach(delegate: IterativeDelegate): void; /** * Gets. @@ -861,7 +827,7 @@ declare namespace Xrm * * @return A T[] whose members have been validated by delegate. */ - get( delegate: MatchingDelegate ): T[]; + get(delegate: MatchingDelegate): T[]; /** * Gets the item given by the index. @@ -870,7 +836,7 @@ declare namespace Xrm * * @return The T in the itemNumber-th place. */ - get( itemNumber: number ): T; + get(itemNumber: number): T; /** * Gets the item given by the key. @@ -881,7 +847,7 @@ declare namespace Xrm * * @see {@link Xrm.Page.Control.getName()} for Control-naming schemes. */ - get( itemName: string ): T; + get(itemName: string): T; /** * Gets the entire array of T. @@ -904,73 +870,71 @@ declare namespace Xrm * * @see {@link http://msdn.microsoft.com/en-us/library/gg328255.aspx|Documentation} for details. */ - export module Page - { + namespace Page { /** * Requirement Level for Xrm.Page.Attribute.getRequiredLevel() and Xrm.Page.Attribute.setRequiredLevel(). */ - export type RequirementLevel = "none" | "recommended" | "required"; + type RequirementLevel = "none" | "recommended" | "required"; /** * Save Modes for Xrm.Page.Entity.save(). */ - export type SaveMode = "saveandclose" | "saveandnew"; + type SaveMode = "saveandclose" | "saveandnew"; /** * Status for Xrm.Page.Stage.getStatus(). */ - export type Status = "active" | "inactive"; + type Status = "active" | "inactive"; /** * Submit Mode for Xrm.Page.Attribute.getSubmitMode() and Xrm.Page.Attribute.setSubmitMode(). */ - export type SubmitMode = "always" | "dirty" | "never"; + type SubmitMode = "always" | "dirty" | "never"; /** * Control type for Xrm.Page.ui.QuickForm.getControlType(). */ - export type ControlQuickFormType = "quickform"; + type ControlQuickFormType = "quickform"; /** * Control types for Xrm.Page.Control.getControlType(). */ - export type ControlType = "standard" | "iframe" | "lookup" | "optionset" | "subgrid" | "webresource" | "notes" | "timercontrol" | "kbsearch" | ControlQuickFormType; + type ControlType = "standard" | "iframe" | "lookup" | "optionset" | "subgrid" | "webresource" | "notes" | "timercontrol" | "kbsearch" | ControlQuickFormType; /** * Date attribute formats for Xrm.Page.Attribute.getFormat(), used by DateAttribute. */ - export type DateAttributeFormat = "date" | "datetime"; + type DateAttributeFormat = "date" | "datetime"; /** * Integer attribute formats for Xrm.Page.Attribute.getFormat(), used by NumberAttribute. */ - export type IntegerAttributeFormat = "duration" | "none"; + type IntegerAttributeFormat = "duration" | "none"; /** * OptionSet attribute formats for Xrm.Page.Attribute.getFormat(), used by OptionSetAttribute. */ - export type OptionSetAttributeFormat = "language" | "timezone"; + type OptionSetAttributeFormat = "language" | "timezone"; /** * String attribute formats for Xrm.Page.Attribute.getFormat(), used by StringAttribute. */ - export type StringAttributeFormat = "email" | "phone" | "text" | "textarea" | "tickersymbol" | "url"; + type StringAttributeFormat = "email" | "phone" | "text" | "textarea" | "tickersymbol" | "url"; /** * Attribute types for Xrm.ui.ProcessMonitor Xrm.Page.Attribute.setDisplayState(). */ - export type AttributeType = "boolean" | "datetime" | "decimal" | "double" | "integer" | "lookup" | "memo" | "money" | "optionset" | "string"; + type AttributeType = "boolean" | "datetime" | "decimal" | "double" | "integer" | "lookup" | "memo" | "money" | "optionset" | "string"; /** * Attribute formats for Xrm.Page.Attribute.getFormat(). */ - export type AttributeFormat = DateAttributeFormat | IntegerAttributeFormat | OptionSetAttributeFormat | StringAttributeFormat; + type AttributeFormat = DateAttributeFormat | IntegerAttributeFormat | OptionSetAttributeFormat | StringAttributeFormat; /** * Interface for a CRM Business Process Flow instance. */ - export interface Process - { + interface Process { /** * Returns the unique identifier of the process. * @@ -1005,8 +969,7 @@ declare namespace Xrm /** * Interface for CRM Business Process Flow stages. */ - export interface Stage - { + interface Stage { /** * Returns an object with a getValue method which will return the integer value of the business process flow * category. @@ -1055,8 +1018,7 @@ declare namespace Xrm getSteps(): Step[]; } - export interface Step - { + interface Step { /** * Returns the logical name of the attribute associated to the step. * @@ -1088,8 +1050,7 @@ declare namespace Xrm /** * Interface for the event context. */ - export interface EventContext - { + interface EventContext { /** * Gets the Xrm context. * @@ -1130,7 +1091,7 @@ declare namespace Xrm * * @remarks Used to pass values between handlers of an event. */ - getSharedVariable( key: string ): T; + getSharedVariable(key: string): T; /** * Sets a shared variable. @@ -1141,25 +1102,19 @@ declare namespace Xrm * * @remarks Used to pass values between handlers of an event. */ - setSharedVariable( key: string, value: T ): void; + setSharedVariable(key: string, value: T): void; } /** - * Interface for a context-sensitive handler. + * Type for a context-sensitive handler. + * @param {EventContext} context The context. */ - export interface ContextSensitiveHandler - { - /** - * @param {EventContext} context The context. - */ - ( context: EventContext ): void; - } + type ContextSensitiveHandler = (context: EventContext) => void; /** * Interface for UI elements with labels. */ - export interface UiLabelElement - { + interface UiLabelElement { /** * Gets the label. * @@ -1172,14 +1127,13 @@ declare namespace Xrm * * @param {string} label The label. */ - setLabel( label: string ): void; + setLabel(label: string): void; } /** * Interface for UI elements which can have the visibility value read. */ - export interface UiCanGetVisibleElement - { + interface UiCanGetVisibleElement { /** * Gets the visibility state. * @@ -1191,34 +1145,31 @@ declare namespace Xrm /** * Interface for UI elements which can have the visibility value updated. */ - export interface UiCanSetVisibleElement - { + interface UiCanSetVisibleElement { /** * Sets the visibility state. * * @param {boolean} visible true to show, false to hide. */ - setVisible( visible: boolean ): void; + setVisible(visible: boolean): void; } /** * Base interface for standard UI elements. */ - export interface UiStandardElement extends UiCanGetVisibleElement, UiLabelElement - { + interface UiStandardElement extends UiCanGetVisibleElement, UiLabelElement { /** * Sets the visibility state. * * @param {boolean} visible true to show, false to hide. */ - setVisible( visible: boolean ): void; + setVisible(visible: boolean): void; } /** * Interface for focusable UI elements. */ - export interface UiFocusable - { + interface UiFocusable { /** * Sets focus on the element. */ @@ -1229,15 +1180,14 @@ declare namespace Xrm * Interface for controls which methods provide immediate feedback or take actions as user types in a control. * Contains methods which can be used to perform data validations in a control even before the user commits (saves) the value in a form. */ - export interface UiKeyPressable - { + interface UiKeyPressable { /** * Use this to add a function as an event handler for the keypress event so that the function is called when you type a character in the specific text or number field. * For a sample JavaScript code that uses the addOnKeyPress method to configure the auto-completion experience, see Sample: Auto-complete in CRM controls. * * @param {ContextSensitiveHandler} handler The function reference. */ - addOnKeyPress( handler: ContextSensitiveHandler ): void; + addOnKeyPress(handler: ContextSensitiveHandler): void; /** * Use this to manually fire an event handler that you created for a specific text or number field to be executed on the keypress event. @@ -1250,14 +1200,13 @@ declare namespace Xrm * Remarks: If an anonymous function is set using addOnKeyPress, it can’t be removed using this method. * @param {ContextSensitiveHandler} handler The function reference. */ - removeOnKeyPress( handler: ContextSensitiveHandler ): void; + removeOnKeyPress(handler: ContextSensitiveHandler): void; } /** * Interface for Result value of AutoCompleteResultSet */ - export interface AutoCompleteResult - { + interface AutoCompleteResult { /** * The Identifier */ @@ -1277,8 +1226,7 @@ declare namespace Xrm /** * Interface for command of AutoCompleteResultSet. This is displayed at the bottom of the auto complete view */ - export interface AutoCompleteCommand - { + interface AutoCompleteCommand { /** * The Identifier */ @@ -1303,8 +1251,7 @@ declare namespace Xrm /** * Interface for showAutoComplete argument */ - export interface AutoCompleteResultSet - { + interface AutoCompleteResultSet { /** * Results to show */ @@ -1319,8 +1266,7 @@ declare namespace Xrm /** * Interface for a Lookup value. */ - export interface LookupValue - { + interface LookupValue { /** * The identifier. */ @@ -1340,8 +1286,7 @@ declare namespace Xrm /** * Interface for an OptionSet value. */ - export interface OptionSetValue - { + interface OptionSetValue { /** * The label text. */ @@ -1356,8 +1301,7 @@ declare namespace Xrm /** * Interface for a privilege. */ - export interface Privilege - { + interface Privilege { /** * True if the user can read. */ @@ -1377,14 +1321,13 @@ declare namespace Xrm /** * Interface for an Entity attribute. */ - export interface Attribute - { + interface Attribute { /** * Adds a handler to be called when the attribute's value is changed. * * @param {ContextSensitiveHandler} handler The function reference. */ - addOnChange( handler: ContextSensitiveHandler ): void; + addOnChange(handler: ContextSensitiveHandler): void; /** * Fire all "on change" event handlers. @@ -1480,14 +1423,14 @@ declare namespace Xrm * * @param {ContextSensitiveHandler} handler The handler. */ - removeOnChange( handler: ContextSensitiveHandler ): void; + removeOnChange(handler: ContextSensitiveHandler): void; /** * Sets the required level. * * @param {string} requirementLevel The requirement level, as either "none", "required", or "recommended" */ - setRequiredLevel( requirementLevel: RequirementLevel ): void; + setRequiredLevel(requirementLevel: RequirementLevel): void; /** * Sets the submit mode. @@ -1496,7 +1439,7 @@ declare namespace Xrm * * @remarks The default value is "dirty" */ - setSubmitMode( submitMode: SubmitMode ): void; + setSubmitMode(submitMode: SubmitMode): void; /** * A collection of all the controls on the form that interface with this attribute. @@ -1515,7 +1458,7 @@ declare namespace Xrm * * @param {any} value The value. */ - setValue( value: any ): void; + setValue(value: any): void; } /** @@ -1523,8 +1466,7 @@ declare namespace Xrm * * @sa Attribute */ - export interface NumberAttribute extends Attribute - { + interface NumberAttribute extends Attribute { /** * Gets the attribute format. * @@ -1570,7 +1512,7 @@ declare namespace Xrm * * @remarks Attributes on Quick Create Forms will not save values set with this method. */ - setValue( value: number ): void; + setValue(value: number): void; /** * A collection of all the controls on the form that interface with this attribute. @@ -1583,8 +1525,7 @@ declare namespace Xrm * * @sa Attribute */ - export interface StringAttribute extends Attribute - { + interface StringAttribute extends Attribute { /** * Gets the attribute format. * @@ -1624,7 +1565,7 @@ declare namespace Xrm * address formatting. Attributes on Quick Create Forms will not save values set * with this method. */ - setValue( value: string ): void; + setValue(value: string): void; /** * A collection of all the controls on the form that interface with this attribute. @@ -1637,8 +1578,7 @@ declare namespace Xrm * * @sa Attribute */ - export interface EnumAttribute extends Attribute - { + interface EnumAttribute extends Attribute { /** * Gets the initial value of the attribute. * @@ -1654,8 +1594,7 @@ declare namespace Xrm * * @sa EnumAttribute */ - export interface BooleanAttribute extends EnumAttribute - { + interface BooleanAttribute extends EnumAttribute { /** * Gets the value. * @@ -1670,7 +1609,7 @@ declare namespace Xrm * * @remarks Attributes on Quick Create Forms will not save values set with this method. */ - setValue( value: boolean ): void; + setValue(value: boolean): void; } /** @@ -1678,8 +1617,7 @@ declare namespace Xrm * * @sa Attribute */ - export interface DateAttribute extends Attribute - { + interface DateAttribute extends Attribute { /** * Gets the attribute format. * @@ -1704,7 +1642,7 @@ declare namespace Xrm * * @remarks Attributes on Quick Create Forms will not save values set with this method. */ - setValue( value: Date ): void; + setValue(value: Date): void; /** * A collection of all the controls on the form that interface with this attribute. @@ -1717,8 +1655,7 @@ declare namespace Xrm * * @sa EnumAttribute */ - export interface OptionSetAttribute extends EnumAttribute - { + interface OptionSetAttribute extends EnumAttribute { /** * Gets the attribute format. * @@ -1736,7 +1673,7 @@ declare namespace Xrm * * @return The option. */ - getOption( value: number ): OptionSetValue; + getOption(value: number): OptionSetValue; /** * Gets the option matching a label. @@ -1745,7 +1682,7 @@ declare namespace Xrm * * @return The option. */ - getOption( label: string ): OptionSetValue; + getOption(label: string): OptionSetValue; /** * Gets all of the options. @@ -1785,7 +1722,7 @@ declare namespace Xrm * OptionSet attribute. Attributes on Quick Create Forms will not save values set * with this method. */ - setValue( value: number ): void; + setValue(value: number): void; /** * A collection of all the controls on the form that interface with this attribute. @@ -1798,8 +1735,7 @@ declare namespace Xrm * * @sa Attribute */ - export interface LookupAttribute extends Attribute - { + interface LookupAttribute extends Attribute { /** * Gets a boolean value indicating whether the Lookup is a multi-value PartyList. * @@ -1821,7 +1757,7 @@ declare namespace Xrm * * @remarks Attributes on Quick Create Forms will not save values set with this method. */ - setValue( value: LookupValue[] ): void; + setValue(value: LookupValue[]): void; /** * A collection of all the controls on the form that interface with this attribute. @@ -1832,14 +1768,13 @@ declare namespace Xrm /** * Interface for the form's record context, Xrm.Page.data.entity */ - export interface Entity - { + interface Entity { /** * Adds a handler to be called when the record is saved. * * @param {ContextSensitiveHandler} handler The handler. */ - addOnSave( handler: ContextSensitiveHandler ): void; + addOnSave(handler: ContextSensitiveHandler): void; /** * Gets an serialized-XML string representing data that will be passed to the server upon saving @@ -1890,7 +1825,7 @@ declare namespace Xrm * * @param {ContextSensitiveHandler} handler The handler. */ - removeOnSave( handler: ContextSensitiveHandler ): void; + removeOnSave(handler: ContextSensitiveHandler): void; /** * Saves the record. @@ -1907,7 +1842,7 @@ declare namespace Xrm * @param {string} saveMode (Optional) the save mode to save, as either "saveandclose" or * "saveandnew". */ - save( saveMode: SaveMode ): void; + save(saveMode: SaveMode): void; /** * The collection of attributes for the record. @@ -1918,8 +1853,7 @@ declare namespace Xrm /** * Interface for save event arguments. */ - export interface SaveEventArguments - { + interface SaveEventArguments { /** * Gets save mode, as an integer. * @@ -1958,13 +1892,11 @@ declare namespace Xrm /** * Module for the Xrm.Page.data API. */ - export module data - { + namespace data { /** * Interface for the Xrm.Page.data.process API. */ - export interface ProcessManager - { + interface ProcessManager { /** * Returns a Process object representing the active process. * @@ -1978,7 +1910,7 @@ declare namespace Xrm * @param {string} processId The Id of the process to make the active process. * @param {function} callbackFunction (Optional) a function to call when the operation is complete. */ - setActiveProcess( processId: string, callbackFunction?: ProcessCallbackDelegate ): void; + setActiveProcess(processId: string, callbackFunction?: ProcessCallbackDelegate): void; /** * Returns a Stage object representing the active stage. @@ -1993,7 +1925,7 @@ declare namespace Xrm * @param {string} stageId the Id of the stage to make the active stage. * @param {function} callbackFunction (Optional) a function to call when the operation is complete. */ - setActiveStage( stageId: string, callbackFunction?: ProcessCallbackDelegate ): void; + setActiveStage(stageId: string, callbackFunction?: ProcessCallbackDelegate): void; /** * Use this method to get a collection of stages currently in the active path with methods to interact with the @@ -2020,7 +1952,7 @@ declare namespace Xrm * list of enabled processes is the same ones a user can see in the UI if they * want to change the process manually. */ - getEnabledProcesses( callbackFunction: ( enabledProcesses: ProcessDictionary ) => void ): void; + getEnabledProcesses(callbackFunction: (enabledProcesses: ProcessDictionary) => void): void; /** * Use this method to get the currently selected stage. @@ -2040,7 +1972,7 @@ declare namespace Xrm * anonymous function if you may later want to remove the * event handler. */ - addOnStageChange( handler: ContextSensitiveHandler ): void; + addOnStageChange(handler: ContextSensitiveHandler): void; /** * Use this to add a function as an event handler for the OnStageSelected event so that it will be called @@ -2070,7 +2002,7 @@ declare namespace Xrm * @param {ContextSensitiveHandler} handler If an anonymous function is set using the addOnStageChange method it * cannot be removed using this method. */ - removeOnStageSelected( handler: ContextSensitiveHandler ): void; + removeOnStageSelected(handler: ContextSensitiveHandler): void; /** * Progresses to the next stage. @@ -2078,7 +2010,7 @@ declare namespace Xrm * @param {ProcessCallbackDelegate} callbackFunction (Optional) A function to call when the operation is * complete. */ - moveNext( callbackFunction?: ProcessCallbackDelegate ): void; + moveNext(callbackFunction?: ProcessCallbackDelegate): void; /** * Moves to the previous stage. @@ -2086,7 +2018,7 @@ declare namespace Xrm * @param {ProcessCallbackDelegate} callbackFunction (Optional) A function to call when the operation is * complete. */ - movePrevious( callbackFunction?: ProcessCallbackDelegate ): void; + movePrevious(callbackFunction?: ProcessCallbackDelegate): void; } /** @@ -2101,12 +2033,12 @@ declare namespace Xrm * as the active stage.) * unreachable (The stage exists on a different path.) */ - export type ProcessCallbackDelegate = ( status: string ) => void; + type ProcessCallbackDelegate = (status: string) => void; /** * Represents a key-value pair, where the key is the Process Flow's ID, and the value is the name thereof. */ - export interface ProcessDictionary { [index: string]: string; } + interface ProcessDictionary { [index: string]: string; } } /** @@ -2114,8 +2046,7 @@ declare namespace Xrm * * @sa UiElement */ - export interface Control extends UiLabelElement, UiCanGetVisibleElement - { + interface Control extends UiLabelElement, UiCanGetVisibleElement { /** * Gets the controls type. * @@ -2167,8 +2098,7 @@ declare namespace Xrm * * @sa Control */ - export interface StandardControl extends Control, UiStandardElement, UiFocusable - { + interface StandardControl extends Control, UiStandardElement, UiFocusable { /** * Clears the notification identified by uniqueId. * @@ -2178,7 +2108,7 @@ declare namespace Xrm * * @remarks If the uniqueId parameter is not used, the current notification shown will be removed. */ - clearNotification( uniqueId?: string ): boolean; + clearNotification(uniqueId?: string): boolean; /** * Gets a boolean value, indicating whether the control is disabled. @@ -2192,7 +2122,7 @@ declare namespace Xrm * * @param {boolean} disabled true to disable, false to enable. */ - setDisabled( disabled: boolean ): void; + setDisabled(disabled: boolean): void; /** * Sets a control-local notification message. @@ -2205,7 +2135,7 @@ declare namespace Xrm * @remarks When this method is used on Microsoft Dynamics CRM for tablets a red "X" icon * appears next to the control. Tapping on the icon will display the message. */ - setNotification( message: string, uniqueId: string ): boolean; + setNotification(message: string, uniqueId: string): boolean; /** * Gets the control's bound attribute. @@ -2232,8 +2162,7 @@ declare namespace Xrm * * @sa StandardControl */ - export interface AutoLookupControl extends StandardControl, UiKeyPressable - { + interface AutoLookupControl extends StandardControl, UiKeyPressable { /** * Gets the latest value in a control as the user types characters in a specific text or number field. * This method helps you to build interactive experiences by validating data and alerting users as they type characters in a control. @@ -2260,8 +2189,7 @@ declare namespace Xrm * * @sa StandardControl */ - export interface StringControl extends AutoLookupControl - { + interface StringControl extends AutoLookupControl { /** * Gets the control's bound attribute. * @@ -2275,8 +2203,7 @@ declare namespace Xrm * * @sa StandardControl */ - export interface NumberControl extends AutoLookupControl - { + interface NumberControl extends AutoLookupControl { /** * Gets the control's bound attribute. * @@ -2290,8 +2217,7 @@ declare namespace Xrm * * @sa StandardControl */ - export interface DateControl extends StandardControl - { + interface DateControl extends StandardControl { /** * Gets the control's bound attribute. * @@ -2311,7 +2237,7 @@ declare namespace Xrm * * @param {boolean} showTimeValue true to show, false to hide the time value. */ - setShowTime( showTimeValue: boolean ): void; + setShowTime(showTimeValue: boolean): void; } /** @@ -2319,14 +2245,13 @@ declare namespace Xrm * * @sa StandardControl */ - export interface LookupControl extends StandardControl - { + interface LookupControl extends StandardControl { /** * Adds a handler to the "pre search" event of the Lookup control. * * @param {Function} handler The handler. */ - addPreSearch( handler: ContextSensitiveHandler ): void; + addPreSearch(handler: ContextSensitiveHandler): void; /** * Adds an additional custom filter to the lookup, with the "AND" filter operator. @@ -2344,7 +2269,7 @@ declare namespace Xrm * * */ - addCustomFilter( filter: string, entityLogicalName?: string ): void; + addCustomFilter(filter: string, entityLogicalName?: string): void; /** * Adds a custom view for the Lookup dialog. @@ -2362,7 +2287,7 @@ declare namespace Xrm * Example viewId value: "{00000000-0000-0000-0000-000000000001}" * Layout XML Reference: {@link http://msdn.microsoft.com/en-us/library/gg334522.aspx} */ - addCustomView( viewId: string, entityName: string, viewDisplayName: string, fetchXml: string, layoutXml: string, isDefault: boolean ): void; + addCustomView(viewId: string, entityName: string, viewDisplayName: string, fetchXml: string, layoutXml: string, isDefault: boolean): void; /** * Gets the control's bound attribute. @@ -2385,7 +2310,7 @@ declare namespace Xrm * * @param {Function} handler The handler. */ - removePreSearch( handler: () => void ): void; + removePreSearch(handler: () => void): void; /** * Sets the Lookup's default view. @@ -2394,7 +2319,7 @@ declare namespace Xrm * * @remarks Example viewGuid value: "{00000000-0000-0000-0000-000000000000}" */ - setDefaultView( viewGuid: string ): void; + setDefaultView(viewGuid: string): void; } /** @@ -2402,8 +2327,7 @@ declare namespace Xrm * * @sa StandardControl */ - export interface OptionSetControl extends StandardControl - { + interface OptionSetControl extends StandardControl { /** * Adds an option. * @@ -2413,7 +2337,7 @@ declare namespace Xrm * @remarks This method does not check that the values within the options you add are valid. * If index is not provided, the new option will be added to the end of the list. */ - addOption( option: OptionSetValue, index?: number ): void; + addOption(option: OptionSetValue, index?: number): void; /** * Clears all options. @@ -2432,7 +2356,7 @@ declare namespace Xrm * * @param {number} value The value. */ - removeOption( value: number ): void; + removeOption(value: number): void; } /** @@ -2440,14 +2364,13 @@ declare namespace Xrm * * @sa Control */ - export interface GridControl extends Control - { + interface GridControl extends Control { /** * Use this method to add event handlers to the GridControl's OnLoad event. * * @param {Function} handler The event handler. */ - addOnLoad( handler: () => void ): void; + addOnLoad(handler: () => void): void; /** * This method returns context information about the GridControl. @@ -2489,7 +2412,7 @@ declare namespace Xrm * * @param {Function} handler The handler. */ - removeOnLoad( handler: () => void ): void; + removeOnLoad(handler: () => void): void; } /** @@ -2500,8 +2423,7 @@ declare namespace Xrm * @remarks An Iframe control provides additional methods, so use {@link IframeControl} where * appropriate. Silverlight controls should use {@link SilverlightControl}. */ - export interface FramedControl extends Control - { + interface FramedControl extends Control { /** * Gets the DOM element containing the control. * @@ -2527,7 +2449,7 @@ declare namespace Xrm * * @remarks Unavailable for Microsoft Dynamics CRM for tablets. */ - setSrc( src: string ): void; + setSrc(src: string): void; } /** @@ -2535,8 +2457,7 @@ declare namespace Xrm * * @sa FramedControl */ - export interface IframeControl extends FramedControl, UiCanSetVisibleElement - { + interface IframeControl extends FramedControl, UiCanSetVisibleElement { /** * Gets initial URL defined for the Iframe. * @@ -2552,8 +2473,7 @@ declare namespace Xrm * * @sa Control */ - export interface SilverlightControl extends Control - { + interface SilverlightControl extends Control { /** * Gets the query string value passed to Silverlight. * @@ -2570,7 +2490,7 @@ declare namespace Xrm * * @remarks Unavailable for Microsoft Dynamics CRM for tablets. */ - setData( data: string ): void; + setData(data: string): void; /** * Gets the DOM element containing the control. @@ -2588,8 +2508,7 @@ declare namespace Xrm * @sa UiElement * @sa UiFocusable */ - export interface Tab extends UiStandardElement, UiFocusable - { + interface Tab extends UiStandardElement, UiFocusable { /** * Gets display state of the tab. * @@ -2616,7 +2535,7 @@ declare namespace Xrm * * @param {string} displayState Display state of the tab, as either "expanded" or "collapsed" */ - setDisplayState(displayState: ui.DisplayState ): void; + setDisplayState(displayState: ui.DisplayState): void; /** * A reference to the collection of form sections within this tab. @@ -2629,8 +2548,7 @@ declare namespace Xrm * * @sa UiElement */ - export interface Section extends UiStandardElement - { + interface Section extends UiStandardElement { /** * Gets the name of the section. * @@ -2654,44 +2572,41 @@ declare namespace Xrm /** * Module for Xrm.Page.ui API. */ - export module ui - { + namespace ui { /** * Form Notification Levels for Xrm.Ui.setFormNotification(). */ - export type FormNotificationLevel = "ERROR" | "INFO" | "WARNING"; + type FormNotificationLevel = "ERROR" | "INFO" | "WARNING"; /** * Display States for Xrm.ui.ProcessMonitor.setDisplayState(). */ - export type DisplayState = "collapsed" | "expanded"; + type DisplayState = "collapsed" | "expanded"; /** * Interface for Xrm.Page.ui.process API */ - export interface ProcessManager - { + interface ProcessManager { /** * Sets display state of the process flow control. * * @param {string} displayState Display state of the process flow control, as either "expanded" or "collapsed" */ - setDisplayState( displayState: ui.DisplayState ): void; + setDisplayState(displayState: ui.DisplayState): void; /** * Sets the visibility state. * * @param {boolean} visible true to show, false to hide. */ - setVisible( visible: boolean ): void; + setVisible(visible: boolean): void; } /** * Interface for a grid. Use Grid methods to access information about data in the grid. Grid is returned by the * GridControl.getGrid method. */ - export interface Grid - { + interface Grid { /** * Returns a collection of every GridRow in the Grid. * @@ -2718,8 +2633,7 @@ declare namespace Xrm * Interface for a grid row. Use the GridRow.getData method to access the GridRowData. A collection of GridRow is * returned by Grid.getRows and Grid.getSelectedRows methods. */ - export interface GridRow - { + interface GridRow { /** * Returns the GridRowData for the GridRow. * @@ -2732,8 +2646,7 @@ declare namespace Xrm * Interface for grid row data. Use the GridRowData.getEntity method to access the GridEntity. GridRowData is * returned by the GridRow.getData method. */ - export interface GridRowData - { + interface GridRowData { /** * Returns the GridEntity for the GridRowData. * @@ -2746,8 +2659,7 @@ declare namespace Xrm * Interface for a grid entity. Use the GridEntity methods to access data about the specific records in the rows. * GridEntity is returned by the GridRowData.getEntity method. */ - export interface GridEntity - { + interface GridEntity { /** * Returns the logical name for the record in the row. * @@ -2783,8 +2695,7 @@ declare namespace Xrm * Interface for the view selector. Use the ViewSelector methods to get or set information about the view selector * of the grid control. */ - export interface ViewSelector - { + interface ViewSelector { /** * Use this method to get a reference to the current view. * @@ -2804,15 +2715,14 @@ declare namespace Xrm * * @param {ViewSelectorItem} viewSelectorItem The view selector item. */ - setCurrentView( viewSelectorItem: ViewSelectorItem ): void; + setCurrentView(viewSelectorItem: ViewSelectorItem): void; } /** * Interface for a view selector item. This object contains data that identifies a view. Use this as a parameter to * the ViewSelector.setCurrentView method. */ - export interface ViewSelectorItem - { + interface ViewSelectorItem { /** * Returns a LookupValue that references this view. * @@ -2826,8 +2736,7 @@ declare namespace Xrm * * @see {@link https://msdn.microsoft.com/en-us/library/mt736908.aspx#bkmk_isLoaded} for details. */ - export interface QuickForm extends Control, UiLabelElement, UiCanGetVisibleElement - { + interface QuickForm extends Control, UiLabelElement, UiCanGetVisibleElement { /** * Gets the constituent controls in a quick view control. * @@ -2847,7 +2756,7 @@ declare namespace Xrm * * @remarks Constituent controls in a quick view control are read only. */ - getControl( controlName: string ): T; + getControl(controlName: string): T; /** * Gets the constituent controls in a quick view control. @@ -2858,7 +2767,7 @@ declare namespace Xrm * * @remarks Constituent controls in a quick view control are read only. */ - getControl( controlName: string ): Page.Control; + getControl(controlName: string): Page.Control; /** * Gets a control by index. @@ -2870,7 +2779,7 @@ declare namespace Xrm * * @remarks Constituent controls in a quick view control are read only. */ - getControl( index: number ): T; + getControl(index: number): T; /** * Gets a control by index. @@ -2881,7 +2790,7 @@ declare namespace Xrm * * @remarks Constituent controls in a quick view control are read only. */ - getControl( index: number ): Page.Control; + getControl(index: number): Page.Control; /** * Gets the controls type. @@ -2915,8 +2824,7 @@ declare namespace Xrm * @sa UiElement * @sa UiFocusable */ - export interface NavigationItem extends UiStandardElement, UiFocusable - { + interface NavigationItem extends UiStandardElement, UiFocusable { /** * Gets the name of the item. * @@ -2928,8 +2836,7 @@ declare namespace Xrm /** * Interface for Xrm.Page.ui.navigation. */ - export interface Navigation - { + interface Navigation { /** * A reference to the collection of available navigation items. */ @@ -2939,8 +2846,7 @@ declare namespace Xrm /** * Interface for an entity's form selector item. */ - export interface FormItem - { + interface FormItem { /** * Gets the unique identifier of the form. * @@ -2964,8 +2870,7 @@ declare namespace Xrm /** * Interface for the form selector API. */ - export interface FormSelector - { + interface FormSelector { /** * Gets current form. * @@ -2987,22 +2892,21 @@ declare namespace Xrm * * @see {@link http://msdn.microsoft.com/en-us/library/gg328483.aspx} for details. */ - export module Url - { + namespace Url { /** * Command Bar Display options for Xrm.Url.FormOpenParameters.cmdbar, Xrm.Url.ViewOpenParameters.cmdbar, and Xrm.Utility.FormOpenParameters.cmdbar. */ - export type CmdBarDisplay = "true" | "false"; + type CmdBarDisplay = "true" | "false"; /** * Navigation Bar Display options for Xrm.Url.FormOpenParameters.navbar, Xrm.Url.ViewOpenParameters.navbar, and Xrm.Utility.FormOpenParameters.navbar. */ - export type NavBarDisplay = "entity" | "off" | "on"; + type NavBarDisplay = "entity" | "off" | "on"; /** * Report Open Action options for Xrm.Url.ReportOpenParameters.actions. */ - export type ReportAction = "filter" | "run"; + type ReportAction = "filter" | "run"; /** * Interface for defining parameters on a request to open a form with main.aspx (as with @@ -3014,8 +2918,7 @@ declare namespace Xrm * @remarks A member for "pagetype" is not provided. The value "entityrecord" is required in * the URL, for forms. Example: "pagetype=entityrecord" */ - export interface FormOpenParameters - { + interface FormOpenParameters { /** * The logical name of the entity. */ @@ -3026,7 +2929,7 @@ declare namespace Xrm * default field values for the form, or pass data to custom parameters that have been * customized for the form. See example below for setting the selected form. * - * @remarks Example: encodeURIComponent( "formid={8c9f3e6f-7839-e211-831e-00155db7d98f}" ); + * @remarks Example: encodeURIComponent("formid={8c9f3e6f-7839-e211-831e-00155db7d98f}"); */ extraqs?: string; @@ -3057,8 +2960,7 @@ declare namespace Xrm * @remarks A member for "pagetype" is not provided. The value "entitylist" is required in * the URL, for views. Example: "pagetype=entitylist" */ - export interface ViewOpenParameters - { + interface ViewOpenParameters { /** * The logical name of the entity. */ @@ -3102,8 +3004,7 @@ declare namespace Xrm * * @see {@link http://msdn.microsoft.com/en-us/library/gg328483.aspx} for details. */ - export interface DialogOpenParameters - { + interface DialogOpenParameters { /** * The unique identifier of the dialog, in Guid format, which is valid for the entity described * by: {@link EntityName} @@ -3128,8 +3029,7 @@ declare namespace Xrm * * @see {@link http://msdn.microsoft.com/en-us/library/gg328483.aspx} for details. */ - export interface ReportOpenParameters - { + interface ReportOpenParameters { /** * The action to perform, as either "run" or "filter". * @@ -3156,10 +3056,8 @@ declare namespace Xrm * * @see {@link http://msdn.microsoft.com/en-us/library/gg328255.aspx|Documentation} for details. */ - export module Utility - { - export interface OpenParameters - { + namespace Utility { + interface OpenParameters { /** * Additional parameters can be provided to the request, by overloading * this object with additional key and value pairs. This can only be used @@ -3172,8 +3070,7 @@ declare namespace Xrm /** * Interface for defining parameters on a Xrm.Utility.openEntityForm() request. */ - export interface FormOpenParameters extends OpenParameters - { + interface FormOpenParameters extends OpenParameters { /** * The identifier of the form to use, when several are available. */ @@ -3199,8 +3096,7 @@ declare namespace Xrm /** * Interface for window options. */ - export interface WindowOptions - { + interface WindowOptions { /** * Direct the form to open in a new window. */ @@ -3209,13 +3105,11 @@ declare namespace Xrm } } -declare namespace XrmEnum -{ +declare namespace XrmEnum { /** * Enumeration of entity form states/types. */ - export const enum FormType - { + const enum FormType { Undefined = 0, Create = 1, Update = 2, @@ -3227,8 +3121,7 @@ declare namespace XrmEnum /** * Enumeration of entity form save modes. */ - export const enum SaveMode - { + const enum SaveMode { Save = 1, SaveAndClose = 2, SaveAndNew = 59, @@ -3245,8 +3138,7 @@ declare namespace XrmEnum /** * Enumeration of stage categories. */ - export const enum StageCategory - { + const enum StageCategory { Qualify = 0, Develop = 1, Propose = 2, @@ -3259,8 +3151,7 @@ declare namespace XrmEnum /** * Enumeration of grid control context resolutions. */ - export const enum GridControlContext - { + const enum GridControlContext { Unknown = 0, RibbonContextForm = 1, RibbonContextListing = 2, @@ -3271,9 +3162,8 @@ declare namespace XrmEnum /** * An enumeration for view types. */ - export const enum ViewType - { + const enum ViewType { SystemView = 1039, UserView = 4230 } -} \ No newline at end of file +} diff --git a/types/xrm/tslint.json b/types/xrm/tslint.json index a11cf19d39..51ae1b527a 100644 --- a/types/xrm/tslint.json +++ b/types/xrm/tslint.json @@ -2,63 +2,16 @@ "extends": "../tslint.json", "rules": { // TODOs - "callable-types": false, "unified-signatures": false, "class-name": true, - "comment-format": [ - true, - "check-space" - ], "indent": [ true, "spaces" ], - "no-duplicate-variable": true, - "no-eval": true, - "no-internal-module": false, - "no-trailing-whitespace": false, - "no-var-keyword": true, - "one-line": [ - true, - "check-whitespace" - ], "quotemark": [ true, "double" ], - "semicolon": true, - "triple-equals": [ - true, - "allow-null-check" - ], - "align": [ - true, - "parameters", - "statements" - ], - "jsdoc-format": true, - "no-consecutive-blank-lines": true, - "typedef-whitespace": [ - true, - { - "call-signature": "nospace", - "index-signature": "nospace", - "parameter": "nospace", - "property-declaration": "nospace", - "variable-declaration": "nospace" - } - ], - "variable-name": [ - true, - "ban-keywords" - ], - "whitespace": [ - true, - "check-branch", - "check-decl", - "check-operator", - "check-separator", - "check-type" - ] + "jsdoc-format": true } } diff --git a/types/xrm/xrm-tests.ts b/types/xrm/xrm-tests.ts index 0ef578aac0..5d9d99b644 100644 --- a/types/xrm/xrm-tests.ts +++ b/types/xrm/xrm-tests.ts @@ -1,23 +1,18 @@ - /// Demonstrate usage in the browser's window object -window.Xrm.Utility.alertDialog( "message", () => {} ); +window.Xrm.Utility.alertDialog("message", () => {}); parent.Xrm.Page.context.getOrgLcid(); /// Demonstrate clientglobalcontext.d.ts -function _getContext() -{ +function _getContext() { const errorMessage = "Context is not available."; - if ( typeof GetGlobalContext !== "undefined" ) - { return GetGlobalContext(); } - else - { - if ( typeof Xrm !== "undefined" ) - { - return Xrm.Page.context; - } - else { throw new Error( errorMessage ); } + if (typeof GetGlobalContext !== "undefined") { + return GetGlobalContext(); + } else if (typeof Xrm !== "undefined") { + return Xrm.Page.context; + } else { + throw new Error(errorMessage); } } @@ -25,8 +20,7 @@ const crmContext = _getContext(); /// Demonstrate iterator typing -const grids = Xrm.Page.getControl(( control ) => -{ +const grids = Xrm.Page.getControl((control) => { return control.getControlType() === "subgrid"; }); @@ -34,8 +28,7 @@ const selectedGridReferences: Xrm.Page.LookupValue[] = []; /// Demonstrate iterator typing with v7.1 additions -grids.forEach(( gridControl: Xrm.Page.GridControl ) => -{ +grids.forEach((gridControl: Xrm.Page.GridControl) => { gridControl.getGrid().getSelectedRows().forEach((row) => { selectedGridReferences.push(row.getData().getEntity().getEntityReference()); }); @@ -43,72 +36,69 @@ grids.forEach(( gridControl: Xrm.Page.GridControl ) => /// Demonstrate generic overload vs typecast -const lookupAttribute = Xrm.Page.getControl( "customerid" ); -const lookupAttribute2 = Xrm.Page.getControl( "customerid" ); +const lookupAttribute = Xrm.Page.getControl("customerid"); +const lookupAttribute2 = Xrm.Page.getControl("customerid"); /// Demonstrate ES6 String literal syntax -lookupAttribute.addCustomFilter( ` +lookupAttribute.addCustomFilter(` -`, "account" ); +`, "account"); -lookupAttribute.addPreSearch(() => { alert( "A search was performed." ); }); +lookupAttribute.addPreSearch(() => { alert("A search was performed."); }); /// Demonstrate strong-typed attribute association with strong-typed control const lookupValues = lookupAttribute.getAttribute().getValue(); -if ( lookupValues !== null ) - if ( !lookupValues[0].id || !lookupValues[0].entityType ) +if (lookupValues !== null) + if (!lookupValues[0].id || !lookupValues[0].entityType) throw new Error("Invalid value in Lookup control."); /// Demonstrate v7.0 BPF API if (Xrm.Page.data.process != null) - Xrm.Page.data.process.moveNext(( status ) => { alert( `Process moved forward with status: ${status}` ); }); + Xrm.Page.data.process.moveNext((status) => { alert(`Process moved forward with status: ${status}`); }); /// Demonstrate v7.1 Quick Create form Xrm.Utility.openQuickCreate("account").then( - (object) => { if (object) alert( `Newly created record Id: ${object.savedEntityReference.id}` ); }, + (object) => { if (object) alert(`Newly created record Id: ${object.savedEntityReference.id}`); }, (error) => {console.log(`Code: ${error.errorCode}, Message: ${error.message}`); }); /// Make all controls visible. -// Xrm.Page.ui.controls.forEach(( control ) => { control.setVisible( true ); }); // No longer works +// Xrm.Page.ui.controls.forEach((control) => { control.setVisible(true); }); // No longer works Xrm.Page.ui.controls.forEach((control: Xrm.Page.StandardControl) => { control.setVisible(true); }); // Must cast to StandardControl /// Make all tabs and sections visible. -Xrm.Page.ui.tabs.forEach(( tab ) => -{ - tab.setVisible( true ); +Xrm.Page.ui.tabs.forEach((tab) => { + tab.setVisible(true); - tab.sections.forEach(( section ) => - { - section.setVisible( true ); + tab.sections.forEach((section) => { + section.setVisible(true); }); }); /// Demonstrate OnSave event context. -Xrm.Page.data.entity.addOnSave(( context ) => -{ +Xrm.Page.data.entity.addOnSave((context) => { const eventArgs = context.getEventArgs(); - if ( eventArgs.getSaveMode() === XrmEnum.SaveMode.AutoSave || eventArgs.getSaveMode() === XrmEnum.SaveMode.SaveAndClose ) + if (eventArgs.getSaveMode() === XrmEnum.SaveMode.AutoSave || eventArgs.getSaveMode() === XrmEnum.SaveMode.SaveAndClose) eventArgs.preventDefault(); }); /// Demonstrate ES6 String literal with templates -alert( `The current form type is: ${Xrm.Page.ui.getFormType() }` ); +alert(`The current form type is: ${Xrm.Page.ui.getFormType() }`); -alert( `The current entity type is: ${Xrm.Page.data.entity.getEntityName() }` ); +alert(`The current entity type is: ${Xrm.Page.data.entity.getEntityName() }`); /// Demonstrate Optionset Value as int in Turbo Forms -const optionSetAttribute = Xrm.Page.getAttribute( "statuscode" ); +const optionSetAttribute = Xrm.Page.getAttribute("statuscode"); const optionValue: number = optionSetAttribute.getOptions()[0].value; /// Demonstrate Control.setFocus(); diff --git a/types/xsd-schema-validator/index.d.ts b/types/xsd-schema-validator/index.d.ts index db867b4178..c4fd02e8f5 100644 --- a/types/xsd-schema-validator/index.d.ts +++ b/types/xsd-schema-validator/index.d.ts @@ -9,4 +9,4 @@ export function validateXML(xml: string|NodeJS.ReadableStream|{file: string}, pa valid: boolean; messages: string[]; result: string; -}) => void): void; \ No newline at end of file +}) => void): void; diff --git a/types/xsd-schema-validator/xsd-schema-validator-tests.ts b/types/xsd-schema-validator/xsd-schema-validator-tests.ts index d66148d219..21d8f3d2a4 100644 --- a/types/xsd-schema-validator/xsd-schema-validator-tests.ts +++ b/types/xsd-schema-validator/xsd-schema-validator-tests.ts @@ -1,7 +1,6 @@ import fs = require("fs"); import validator = require("xsd-schema-validator"); - validator.validateXML("", 'resources/foo.xsd', (err, result) => { if (err) { throw err; @@ -12,4 +11,4 @@ validator.validateXML(fs.createReadStream('some.xml'), "schema.xsd", (err) => { }); validator.validateXML({ file: "some.xml" }, "schema.xsd", (err) => { if (err) throw err; -}); \ No newline at end of file +}); diff --git a/types/yeoman-generator/yeoman-generator-tests.ts b/types/yeoman-generator/yeoman-generator-tests.ts index e54d0aae4a..f6655aab17 100644 --- a/types/yeoman-generator/yeoman-generator-tests.ts +++ b/types/yeoman-generator/yeoman-generator-tests.ts @@ -85,7 +85,6 @@ generator.runInstall('installer', 'pkg', {}); generator.runInstall('installer', 'pkg', { 'custom-option': 3 }, () => {}); generator.runInstall('installer', 'pkg', {}, () => {}, {}); - const composed1: Base = generator.composeWith('bootstrap', { sass: true }); const composed2: Base = generator.composeWith(require.resolve('generator-bootstrap/app/main.js'), { sass: true });