diff --git a/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md similarity index 100% rename from ISSUE_TEMPLATE.md rename to .github/ISSUE_TEMPLATE.md diff --git a/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md similarity index 100% rename from PULL_REQUEST_TEMPLATE.md rename to .github/PULL_REQUEST_TEMPLATE.md diff --git a/README.md b/README.md index 23bb52f13c..9dbb809b57 100644 --- a/README.md +++ b/README.md @@ -118,7 +118,7 @@ You may edit the `tsconfig.json` to add new files, to add `"target": "es6"` (nee 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 @@ -157,7 +157,7 @@ If a package was never on DefinitelyTyped, it does not need to be added to `notN To lint a package, just add a `tslint.json` to that package containing `{ "extends": "../tslint.json" }`. All new packages must be linted. If a `tslint.json` turns rules off, this is because that hasn't been fixed yet. For example: -```json +```js { "extends": "../tslint.json", "rules": { @@ -191,7 +191,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 +231,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,11 +250,15 @@ 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`. +#### The file history in GitHub looks incomplete. + +GitHub doesn't [support](http://stackoverflow.com/questions/5646174/how-to-make-github-follow-directory-history-after-renames) file history for renamed files. Use [`git log --follow`](https://www.git-scm.com/docs/git-log) instead. + ## License diff --git a/auth0-lock/package.json b/auth0-lock/package.json deleted file mode 100644 index 2d730992af..0000000000 --- a/auth0-lock/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "@types/auth0-js": "latest" - } -} diff --git a/auth0.widget/package.json b/auth0.widget/package.json deleted file mode 100644 index 2d730992af..0000000000 --- a/auth0.widget/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "@types/auth0-js": "latest" - } -} diff --git a/bignumber.js/bignumber.js-tests.ts b/bignumber.js/bignumber.js-tests.ts deleted file mode 100644 index a375fc60cd..0000000000 --- a/bignumber.js/bignumber.js-tests.ts +++ /dev/null @@ -1,445 +0,0 @@ -var x: BigNumber.BigNumber = new BigNumber(9) -var y = new BigNumber(x) - -BigNumber(435.345) - -new BigNumber('5032485723458348569331745.33434346346912144534543') -new BigNumber('4.321e+4') -new BigNumber('-735.0918e-430') -new BigNumber(Infinity) -new BigNumber(NaN) -new BigNumber('.5') -new BigNumber('+2') -new BigNumber(-10110100.1, 2) -new BigNumber(-0b10110100) -new BigNumber('123412421.234324', 5) -new BigNumber('ff.8', 16) -new BigNumber('0xff.8') - -new BigNumber(9, 2) - -new BigNumber(96517860459076817.4395) - -new BigNumber('blurgh') - -BigNumber.config({ DECIMAL_PLACES: 5 }) -new BigNumber(1.23456789) -new BigNumber(1.23456789, 10) - -BigNumber.config({ DECIMAL_PLACES: 5 }) -var BN = BigNumber.another({ DECIMAL_PLACES: 9 }) - -x = new BigNumber(1) -y = new BN(1) - -x.div(3) -y.div(3) - -BN = BigNumber.another() -BN.config({ DECIMAL_PLACES: 9 }) - -BigNumber.config({ DECIMAL_PLACES: 5 }) -BigNumber.set({ DECIMAL_PLACES: 5 }) -BigNumber.config(5) - -BigNumber.config({ ROUNDING_MODE: 0 }) -BigNumber.config(undefined, BigNumber.ROUND_UP) - -BigNumber.config({ EXPONENTIAL_AT: 2 }) -new BigNumber(12.3) -new BigNumber(123) -new BigNumber(0.123) -new BigNumber(0.0123) - -BigNumber.config({ EXPONENTIAL_AT: [-7, 20] }) -new BigNumber(123456789) -new BigNumber(0.000000123) - -BigNumber.config({ EXPONENTIAL_AT: 1e+9 }) - -BigNumber.config({ EXPONENTIAL_AT: 0 }) - -BigNumber.config({ RANGE: 500 }) -BigNumber.config().RANGE -new BigNumber('9.999e499') -new BigNumber('1e500') -new BigNumber('1e-499') -new BigNumber('1e-500') - -BigNumber.config({ RANGE: [-3, 4] }) -new BigNumber(99999) -new BigNumber(100000) -new BigNumber(0.001) -new BigNumber(0.0001) - -BigNumber.config({ ERRORS: false }) - -BigNumber.config({ CRYPTO: true }) -BigNumber.config().CRYPTO -BigNumber.random() - -BigNumber.config({ MODULO_MODE: BigNumber.EUCLID }) -BigNumber.config({ MODULO_MODE: 9 }) - -BigNumber.config({ POW_PRECISION: 100 }) - -BigNumber.config({ - FORMAT: { - decimalSeparator: '.', - groupSeparator: ',', - groupSize: 3, - secondaryGroupSize: 0, - fractionGroupSeparator: ' ', - fractionGroupSize: 0 - } -}); - -BigNumber.config({ - DECIMAL_PLACES: 40, - ROUNDING_MODE: BigNumber.ROUND_HALF_CEIL, - EXPONENTIAL_AT: [-10, 20], - RANGE: [-500, 500], - ERRORS: true, - CRYPTO: true, - MODULO_MODE: BigNumber.ROUND_FLOOR, - POW_PRECISION: 80, - FORMAT: { - groupSize: 3, - groupSeparator: ' ', - decimalSeparator: ',' - } -}); - -BigNumber.config(40, 7, [-10, 20], 500, 1, 1, 3, 80) - -var obj = BigNumber.config(); -obj.ERRORS -obj.RANGE - -x = new BigNumber('3257869345.0378653') -BigNumber.max(4e9, x, '123456789.9') - -var arr = [12, '13', new BigNumber(14)] -BigNumber.max(arr) - -x = new BigNumber('3257869345.0378653') -BigNumber.min(4e9, x, '123456789.9') - -arr = [2, new BigNumber(-14), '-15.9999', -12] -BigNumber.min(arr) - -BigNumber.config({ DECIMAL_PLACES: 10 }) -BigNumber.random() -BigNumber.random(20) - -BigNumber.config({ ROUNDING_MODE: BigNumber.ROUND_CEIL }) -BigNumber.config({ ROUNDING_MODE: 2 }) - -x = new BigNumber(-0.8) -y = x.absoluteValue() -var z = y.abs() - -x = new BigNumber(1.3) -x.ceil() -y = new BigNumber(-1.8) -y.ceil() - -x = new BigNumber(Infinity) -y = new BigNumber(5) -x.comparedTo(y) -x.comparedTo(x.minus(1)) -y.cmp(NaN) -y.cmp('110', 2) - -x = new BigNumber(123.45) -x.decimalPlaces() -y = new BigNumber('9.9e-101') -y.dp() - -x = new BigNumber(355) -y = new BigNumber(113) -x.dividedBy(y) -x.div(5) -x.div(47, 16) - -x = new BigNumber(5) -y = new BigNumber(3) -x.dividedToIntegerBy(y) -x.divToInt(0.7) -x.divToInt('0.f', 16) - -0 === 1e-324 -x = new BigNumber(0) -x.equals('1e-324') -BigNumber(-0).eq(x) -BigNumber(255).eq('ff', 16) - -y = new BigNumber(NaN) -y.equals(NaN) - -x = new BigNumber(1.8) -x.floor() -y = new BigNumber(-1.3) -y.floor() - -0.1 > (0.3 - 0.2) -x = new BigNumber(0.1) -x.greaterThan(BigNumber(0.3).minus(0.2)) -BigNumber(0).gt(x) -BigNumber(11, 3).gt(11.1, 2) - -x = new BigNumber(0.3).minus(0.2) -x.greaterThanOrEqualTo(0.1) -BigNumber(1).gte(x) -BigNumber(10, 18).gte('i', 36) - -x = new BigNumber(1) -x.isFinite() -y = new BigNumber(Infinity) -y.isFinite() - -x = new BigNumber(1) -x.isInteger() -y = new BigNumber(123.456) -y.isInt() - -x = new BigNumber(NaN) -x.isNaN() -y = new BigNumber('Infinity') -y.isNaN() - -x = new BigNumber(-0) -x.isNegative() -y = new BigNumber(2) -y.isNeg() - -x = new BigNumber(-0) -x.isZero() && x.isNeg() -y = new BigNumber(Infinity) -y.isZero() - -x = new BigNumber(0.3).minus(0.2) -x.lessThan(0.1) -BigNumber(0).lt(x) -BigNumber(11.1, 2).lt(11, 3) - -x = new BigNumber(0.1) -x.lessThanOrEqualTo(BigNumber(0.3).minus(0.2)) -BigNumber(-1).lte(x) -BigNumber(10, 18).lte('i', 36) - -x = new BigNumber(0.3) -x.minus(0.1) -x.sub(0.6, 20) - -x = new BigNumber(1) -x.modulo(0.9) -y = new BigNumber(33) -y.mod('a', 33) - -x = new BigNumber(1.8) -x.negated() -y = new BigNumber(-1.3) -y.neg() - -x = new BigNumber(0.1) -y = x.plus(0.2) -BigNumber(0.7).plus(x).add(y) -x.plus('0.1', 8) - -x = new BigNumber(1.234) -x.precision() -y = new BigNumber(987000) -y.sd() -y.sd(true) - -y = new BigNumber(x) -y.round() -y.round(1) -y.round(2) -y.round(10) -y.round(0, 1) -y.round(0, 6) -y.round(1, 1) -y.round(1, BigNumber.ROUND_HALF_EVEN) -y - -x = new BigNumber(1.23) -x.shift(3) -x.shift(-3) - -x = new BigNumber(16) -x.squareRoot() -y = new BigNumber(3) -y.sqrt() - -x = new BigNumber(0.6) -y = x.times(3) -BigNumber('7e+500').times(y) -x.times('-a', 16) - -BigNumber.config({ DECIMAL_PLACES: 5, ROUNDING_MODE: 4 }) -x = new BigNumber(9876.54321) - -x.toDigits() -x.toDigits(6) -x.toDigits(6, BigNumber.ROUND_UP) -x.toDigits(2) -x.toDigits(2, 1) -x - -y = new BigNumber(45.6) -y.toExponential() -y.toExponential(0) -y.toExponential(1) -y.toExponential(1, 1) -y.toExponential(3) - -y = new BigNumber(3.456) -y.toFixed() -y.toFixed(0) -y.toFixed(2) -y.toFixed(2, 1) -y.toFixed(5) - -var format = { - decimalSeparator: '.', - groupSeparator: ',', - groupSize: 3, - secondaryGroupSize: 0, - fractionGroupSeparator: ' ', - fractionGroupSize: 0 -} -BigNumber.config({ FORMAT: format }) - -x = new BigNumber('123456789.123456789') -x.toFormat() -x.toFormat(1) - -format.groupSeparator = ' ' -format.fractionGroupSize = 5 -x.toFormat() - -BigNumber.config({ - FORMAT: { - decimalSeparator: ',', - groupSeparator: '.', - groupSize: 3, - secondaryGroupSize: 2 - } -}) - -x.toFormat(6) - -x = new BigNumber(1.75) -x.toFraction() - -var pi = new BigNumber('3.14159265358') -pi.toFraction() -pi.toFraction(100000) -pi.toFraction(10000) -pi.toFraction(100) -pi.toFraction(10) -pi.toFraction(1) - -x = new BigNumber('177.7e+457') -y = new BigNumber(235.4325) -z = new BigNumber('0.0098074') - -var str = JSON.stringify([x, y, z]) - -JSON.parse(str, (key, val) => key === '' ? val : new BigNumber(val)) - -x = new BigNumber(456.789) -x.toNumber() -{ +x } - -y = new BigNumber('45987349857634085409857349856430985') -y.toNumber() - -z = new BigNumber(-0) -1 / +z -1 / z.toNumber() - -x = new BigNumber(0.7) -x.toPower(2) -BigNumber(3).pow(-2) - -y = new BigNumber(45.6) -x.toPrecision() -y.toPrecision() -x.toPrecision(1) -y.toPrecision(1) -y.toPrecision(2, 0) -y.toPrecision(2, 1) -x.toPrecision(5) -y.toPrecision(5) - -x = new BigNumber(750000) -x.toString() -BigNumber.config({ EXPONENTIAL_AT: 5 }) -x.toString() - -y = new BigNumber(362.875) -y.toString(2) -y.toString(9) -y.toString(32) - -BigNumber.config({ DECIMAL_PLACES: 4 }); -z = new BigNumber('1.23456789') -z.toString() -z.toString(10) - -x = new BigNumber(123.456) -x.truncated() -y = new BigNumber(-12.3) -y.trunc() - -x = new BigNumber('-0') -x.toString() -x.valueOf() -y = new BigNumber('1.777e+457') -y.valueOf() - -x = new BigNumber(0.123) -x.toExponential() -x.c -x.e -x.s - -z = new BigNumber('-123.4567000e+2') -z.toExponential() -z.c -z.e -z.s - -x = new BigNumber(3) -x instanceof BigNumber -x.isBigNumber - -BN = BigNumber.another(); - -y = new BN(3) -y instanceof BigNumber -y.isBigNumber - -y = new BigNumber(-0) -y.c -y.e -y.s - -try { - // ... -} catch (e) { - if (e instanceof Error && e.name == 'BigNumber Error') { - // ... - } -} - -x = new BigNumber("1.0") -y = new BigNumber("1.1000") -z = x.add(y) - -x = new BigNumber("1.20") -y = new BigNumber("3.45000") -z = x.mul(y) diff --git a/blueimp-md5/blueimp-md5-tests.ts b/blueimp-md5/blueimp-md5-tests.ts deleted file mode 100644 index 18edc69b57..0000000000 --- a/blueimp-md5/blueimp-md5-tests.ts +++ /dev/null @@ -1,6 +0,0 @@ - -import blueimp = require('blueimp-md5'); - -function hash(): boolean { - return blueimp.md5('hello world') === '5eb63bbbe01eeed093cb22bb8f5acdc3'; -} diff --git a/blueimp-md5/index.d.ts b/blueimp-md5/index.d.ts deleted file mode 100644 index b51f554e32..0000000000 --- a/blueimp-md5/index.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -// Type definitions for blueimp-md5 v1.1.0 -// Project: https://github.com/blueimp/JavaScript-MD5 -// Definitions by: Ray Martone -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -export declare function md5(value: string, key?: string, raw?: boolean): string; diff --git a/chokidar/chokidar-tests.ts b/chokidar/chokidar-tests.ts deleted file mode 100644 index a67638e927..0000000000 --- a/chokidar/chokidar-tests.ts +++ /dev/null @@ -1,47 +0,0 @@ - - -import fs = require('fs'); -import chokidar = require('chokidar'); - -var watcher = chokidar.watch('file, dir, or glob', { - ignored: /[\/\\]\./, persistent: true -}); - -var log = console.log.bind(console); - -let str: string; -let any: any; -let stats: fs.Stats; - -watcher - .on('add', path => { str = path; }) - .on('addDir', path => { str = path; }) - .on('change', path => { str = path; }) - .on('unlink', path => { str = path; }) - .on('unlinkDir', path => { str = path; }) - .on('error', (error) => { any = error; }) - .on('ready', () => { }) - .on('raw', (event, path, details) => { str = event; str = path; any = details; }) - -// 'add', 'addDir' and 'change' events also receive stat() results as second -// argument when available: http://nodejs.org/api/fs.html#fs_class_fs_stats -watcher.on('change', (path, _stats) => { - str = path; - stats = _stats; -}); - -// Watch new files. -watcher.add('new-file'); -watcher.add(['new-file-2', 'new-file-3', '**/other-file*']); - -// Un-watch some files. -watcher.unwatch('new-file*'); - -// Only needed if watching is `persistent: true`. -watcher.close(); - -// One-liner -chokidar.watch('.', {ignored: /[\/\\]\./}).on('all', (event, path) => { - str = event; - str = path; -}); \ No newline at end of file diff --git a/chokidar/index.d.ts b/chokidar/index.d.ts deleted file mode 100644 index ab37a73948..0000000000 --- a/chokidar/index.d.ts +++ /dev/null @@ -1,49 +0,0 @@ -// Type definitions for chokidar 1.4.3 -// Project: https://github.com/paulmillr/chokidar -// Definitions by: Stefan Steinhart -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -/// - -declare module "chokidar" -{ - export class FSWatcher - { - constructor(options?: WatchOptions); - add(fileDirOrGlob:string):void; - add(filesDirsOrGlobs:Array):void; - unwatch(fileDirOrGlob:string):void; - unwatch(filesDirsOrGlobs:Array):void; - getWatched():any; - on(event: 'add', fn: (path: string, stats?: fs.Stats) => void): this; - on(event: 'change', fn: (path: string, stats?: fs.Stats) => void): this; - on(event: 'unlink', fn: (path: string) => void): this; - on(event: 'raw', fn: (event: string, path:string, details:any) => void): this; - on(event: 'all', fn: (event: string, path: string) => void): this; - on(event: string, fn: (path: string) => void): this; - close(): this; - } - - interface WatchOptions - { - persistent?:boolean; - ignored?:any; - ignoreInitial?:boolean; - followSymlinks?:boolean; - cwd?:string; - usePolling?:boolean; - useFsEvents?:boolean; - alwaysStat?:boolean; - depth?:number; - interval?:number; - binaryInterval?:number; - ignorePermissionErrors?:boolean; - atomic?:boolean; - awaitWriteFinish?:any; - } - - import fs = require("fs"); - - export function watch(fileDirOrGlob:string, options?:WatchOptions):FSWatcher; - export function watch(filesDirsOrGlobs:Array, options?:WatchOptions):FSWatcher; -} diff --git a/cucumber/cucumber-tests.ts b/cucumber/cucumber-tests.ts deleted file mode 100644 index 3eb86b223f..0000000000 --- a/cucumber/cucumber-tests.ts +++ /dev/null @@ -1,134 +0,0 @@ -import * as assert from "power-assert"; -import cucumber = require("cucumber"); - -function StepSample() { - type Callback = cucumber.CallbackStepDefinition; - type Table = cucumber.TableDefinition; - type HookScenario = cucumber.HookScenario; - type Hooks = cucumber.Hooks; - var step = this; - var hook = this; - - hook.setWorldConstructor(function() { - this.visit = function(url: string, callback: Callback) { - callback(null, 'pending'); - } - }) - - hook.Before(function(scenario: HookScenario, callback: Callback){ - scenario.isFailed() && callback.pending(); - }); - - hook.Around(function(scenario: HookScenario, runScenario: (error:string, callback?:Function)=>void) { - scenario.isFailed() && runScenario(null, function(){ - console.log('finish tasks'); - }); - }); - - hook.registerHandler('AfterFeatures', function (event:any, callback:Function) { - callback(); - }); - - step.Given(/^I am on the Cucumber.js GitHub repository$/, function(callback:Callback) { - this.visit('https://github.com/cucumber/cucumber-js', callback); - }); - - step.When(/^I go to the README file$/, function(title:string, callback:Callback) { - callback(null, 'pending'); - }); - - step.Then(/^I should see "(.*)" as the page title$/, { timeout:60*1000}, function(title:string, callback:Callback) { - var pageTitle = this.browser.text('title'); - - if (title === pageTitle) { - callback(); - } else { - callback(new Error("Expected to be on page with title " + title)); - } - }); - - // Type for data_table.js on - // https://github.com/cucumber/cucumber-js/blob/a5fd8251918c278ab2e389226d165cedb44df14a/lib/cucumber/ast/data_table.js - - step.Given(/^a table step with Table raw$/, function(table:Table){ - var expected = [ - ['Cucumber', 'Cucumis sativus'], - ['Burr Gherkin', 'Cucumis anguria'] - ]; - - assert.deepEqual(table.raw(), expected); - }); - - step.Given(/^a table step with Table rows$/, function(table: Table){ - var expected = [ - ['Apricot', '5'], - ['Brocolli', '2'], - ['Cucumber', '10'] - ]; - assert.deepEqual(table.rows(), expected) - }); - - step.Given(/^a table step with Table rowHash$/, function(table:Table){ - var expected = { - 'Cucumber': 'Cucumis sativus', - 'Burr Gherkin': 'Cucumis anguria' - }; - assert.deepEqual(table.rowsHash(), expected) - }); - - step.Given(/^a table step$/, function(table:Table){ - var expected = [ - {'Vegetable': 'Apricot', 'Rating': '5'}, - {'Vegetable': 'Brocolli', 'Rating': '2'}, - {'Vegetable': 'Cucumber', 'Rating': '10'} - ]; - assert.deepEqual(table.hashes(), expected) - }); - - cucumber.defineSupportCode(function(step: cucumber.StepDefinitions){ - step.Given( /^a variable set to (\d+)$/, (x:string) => { - console.log("the number is: " + x); - } ); - }); - cucumber.defineSupportCode(function(step: Hooks){ - step.After((scenario: HookScenario, callback?: Callback) => { - console.log("After"); - callback(); - } ) - }); - - cucumber.defineSupportCode(function(hook: cucumber.Hooks){ - hook.addTransform({ - captureGroupRegexps: ['red|blue|green'], - transformer: (arg: string) => arg, - typeName: 'color' - }); - }); - - cucumber.defineSupportCode(function({After, Given}) { - Given( /^a variable set to (\d+)$/, (x:string) => { - console.log("the number is: " + x); - }); - After((scenario: HookScenario, callback?: Callback) => { - console.log("After"); - callback(); - }); - }); - - let fns : cucumber.SupportCodeConsumer[] = cucumber.getSupportCodeFns() - - cucumber.clearSupportCodeFns(); -} - -function registerListener(): cucumber.EventListener { - let listener = Object.assign(cucumber.Listener(), { - handleBeforeScenarioEvent: (scenario: cucumber.events.ScenarioPayload, callback: () => void) => { - - // do some interesting stuff ... - - callback(); - } - }); - - return listener; -} diff --git a/cucumber/index.d.ts b/cucumber/index.d.ts deleted file mode 100644 index 99f31c5372..0000000000 --- a/cucumber/index.d.ts +++ /dev/null @@ -1,224 +0,0 @@ -// Type definitions for cucumber-js -// Project: https://github.com/cucumber/cucumber-js -// Definitions by: Abraão Alves , Jan Molak -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -export = cucumber; - -declare namespace cucumber { - - export interface CallbackStepDefinition{ - pending : () => PromiseLike; - (error?:any, pending?: string):void; - } - - export interface TableDefinition{ - raw: () => Array; - rows: () => Array; - rowsHash: () => {}; - hashes: () => {}; - } - - type StepDefinitionParam = string | CallbackStepDefinition | TableDefinition; - - interface StepDefinitionCode { - (...stepArgs: Array): PromiseLike | any | void; - } - - interface StepDefinitionOptions{ - timeout?: number; - } - - export interface StepDefinitions { - Given(pattern: RegExp | string, options: StepDefinitionOptions, code: StepDefinitionCode): void; - Given(pattern: RegExp | string, code: StepDefinitionCode): void; - When(pattern: RegExp | string, options: StepDefinitionOptions, code: StepDefinitionCode): void; - When(pattern: RegExp | string, code: StepDefinitionCode): void; - Then(pattern: RegExp | string, options: StepDefinitionOptions, code: StepDefinitionCode): void; - Then(pattern: RegExp | string, code: StepDefinitionCode): void; - setDefaultTimeout(time:number): void; - } - - interface HookScenario{ - getKeyword():string; - getName():string; - getDescription():string; - getUri():string; - getLine():number; - getTags():string[]; - getException():Error; - getAttachments():any[]; - attach(data:any, mimeType?:string, callback?:(err?:any) => void):void; - isSuccessful():boolean; - isFailed():boolean; - isPending():boolean; - isUndefined():boolean; - isSkipped():boolean; - } - - interface HookCode { - (scenario: HookScenario, callback?: CallbackStepDefinition): void; - } - - interface AroundCode{ - (scenario: HookScenario, runScenario?: (error:string, callback?:Function)=>void): void; - } - - interface Transform { - captureGroupRegexps: Array; - transformer: (arg: string) => any; - typeName: string; - } - - export interface Hooks { - Before(code: HookCode): void; - After(code: HookCode): void; - Around(code: AroundCode):void; - setDefaultTimeout(time:number): void; - setWorldConstructor(world: () => void): void; - registerHandler(handlerOption:string, code:(event:any, callback:CallbackStepDefinition) =>void): void; - registerListener(listener: EventListener): void; - addTransform(transform: Transform): void; - } - - export class EventListener { - hear(event: events.Event, callback: ()=>void): void; - hasHandlerForEvent(event: events.Event): boolean; - buildHandlerNameForEvent(event: events.Event): string; - getHandlerForEvent(event: events.Event): EventHook; - buildHandlerName(shortName: string): string; - setHandlerForEvent(shortName: string, handler: EventListener): void; - } - - export function Listener(): EventListener; - - export namespace events { - - interface Event { - getName(): string; - getPayloadItem(name: string): EventPayload; - } - - interface EventPayload { - } - - interface FeaturesPayload extends EventPayload { - getFeatures(): any[]; // https://github.com/cucumber/cucumber-js/blob/dc698bf5bc10d591fa7adeec5fa21b2d90dc9679/lib/cucumber/runtime.js#L34 - } - - interface FeaturesResultPayload extends EventPayload { - getDuration(): any; - getScenarioCounts(): any; - getStepCounts(): any; - isSuccessful(): boolean; - } - - interface FeaturePayload extends EventPayload { - getStepKeywordByLines(): any; - getScenarioKeyword(): string; - getKeyword(): string; - getName(): string; - getDescription(): string; - getUri(): string; - getLine(): number; - getTags(): Tag[]; - getScenarios(): ScenarioPayload[]; - getPayloadItem(): FeaturePayload; - } - - interface ScenarioPayload extends EventPayload { - getName(): string; - getKeyword(): string; - getDescription(): string; - getFeature(): FeaturePayload; - getUri(): string; - getUris(): string[]; - getLine(): number; - getLines(): number[]; - getTags(): Tag[]; - getSteps(): any[]; - getPayloadItem(): ScenarioPayload; - } - - interface ScenarioResultPayload extends EventPayload { - getFailureException(): Error; - getScenario(): any; - getStatus(): any; - } - - interface StepPayload extends EventPayload { - isHidden(): boolean; - isOutlineStep(): boolean; - getKeyword(): string; - getName(): string; - hasUri(): boolean; - getUri(): string; - getLine(): number; - getPreviousStep(): any; - hasPreviousStep(): boolean; - getAttachment(): any; - getAttachmentContents(): any; - getDocString(): string; - getDataTable(): any; - hasAttachment(): boolean; - hasDocString(): boolean; - hasDataTable(): boolean; - ensureDataTableIsAttached(): void; - isOutcomeStep(): boolean; - isEventStep(): boolean; - hasOutcomeStepKeyword(): boolean; - hasEventStepKeyword(): boolean; - isRepeatingOutcomeStep(): boolean; - isRepeatingEventStep(): boolean; - hasRepeatStepKeyword(): boolean; - isPrecededByOutcomeStep(): boolean; - isPrecededByEventStep(): boolean; - } - - interface StepResultPayload extends EventPayload { - getAmbiguousStepDefinitions(): any[]; - getAttachments(): any[]; - getDuration(): any; - getFailureException(): Error; - getStep(): any; - getStepDefinition(): any; - getStatus(): any; - hasAttachments(): boolean; - } - - } - - interface Tag { - getName(): string; - getLine(): number; - } - - export interface Scenario { - getKeyword(): string; - getName(): string; - getDescription(): string; - getUri(): string; - getLine(): number; - getTags(): Tag[]; - getException(): Error; - getAttachments(): any[]; - attach(data: any, mimeType?: string, callback?: (err?: any) => void): void; - isSuccessful(): boolean; - isFailed(): boolean; - isPending(): boolean; - isUndefined(): boolean; - isSkipped(): boolean; - } - - interface EventHook { - (event: events.Event, callback?: ()=>void): void; - } - - export interface SupportCodeConsumer { - (stepDefinitions:StepDefinitions & Hooks):void; - } - - export function defineSupportCode(consumer:SupportCodeConsumer): void; - export function getSupportCodeFns(): SupportCodeConsumer[]; - export function clearSupportCodeFns(): void; -} diff --git a/d3-dsv/v0/d3-dsv-tests.ts b/d3-dsv/v0/d3-dsv-tests.ts deleted file mode 100644 index 587d4d5a55..0000000000 --- a/d3-dsv/v0/d3-dsv-tests.ts +++ /dev/null @@ -1,8 +0,0 @@ - - -import d3dsv = require("d3-dsv"); - -var csv = d3dsv(","); - -var rows = csv.parse("a,b,c\n1,2,3\n4,5,6"); - diff --git a/ej.web.all/tslint.json b/ej.web.all/tslint.json deleted file mode 100644 index b0b7c81ba5..0000000000 --- a/ej.web.all/tslint.json +++ /dev/null @@ -1 +0,0 @@ -{ "extends": "../tslint.json" } \ No newline at end of file diff --git a/fetch.io/index.d.ts b/fetch.io/index.d.ts deleted file mode 100644 index 3c4ff7d781..0000000000 --- a/fetch.io/index.d.ts +++ /dev/null @@ -1,126 +0,0 @@ -// Type definitions for fetch.io 3.1 -// Project: https://github.com/haoxins/fetch.io -// Definitions by: newraina -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -/// - - type TUrl = string; - - type TMethod = 'delete' | 'get' | 'head' | 'options' | 'post' | 'put'; - - interface Query { - [key: string]: number | boolean | string; - } - - interface Header { - [key: string]: string; - } - - interface Options extends RequestInit { - - prefix?: string; - - query?: Query; - - header?: Header; - - beforeRequest?(url: TUrl, body: BodyInit): boolean; - - afterResponse?(res: Response): void; - - afterJSON?(body: any): void; - } - - declare namespace FetchIo { - - class Request { - - constructor(method: TMethod, url: TUrl, options: Options) - - /** - * HTTP delete method - */ - delete: (url: TUrl) => this; - - /** - * HTTP get method - */ - get: (url: TUrl) => this; - - /** - * HTTP head method - */ - head: (url: TUrl) => this; - - /** - * HTTP options method - */ - options: (url: TUrl) => this; - - /** - * HTTP post method - */ - post: (url: TUrl) => this; - - /** - * HTTP put method - */ - put: (url: TUrl) => this; - - /** - * Set Options - */ - config(key: string, value: any): this - - config(opts: {[key: string]: any}): this - - /** - * Set Header - */ - set(key: string, value: any): this - - set(opts: {[key: string]: any}): this - - /** - * Set Content-Type - */ - type(type: 'json' | 'form' | 'urlencoded'): this - - /** - * Add query string - */ - query(object: {[key: string]: any}): this - - /** - * Send data - */ - send(data: {[key: string]: any}): this - - /** - * ppend formData - */ - append(key: string, value: string): this - - /** - * Get Response directly - */ - then(resolve: (value?: Response) => void, reject?: (reason?: any) => void): Promise - - /** - * Make Response to JSON - */ - json(strict?: boolean): Promise - - /** - * Make Response to string - */ - text(): Promise - } - - class Fetch extends Request { - constructor(options?: Options) - } -} - -export default FetchIo.Fetch; diff --git a/fix b/fix deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/google-protobuf/google-protobuf-tests.ts b/google-protobuf/google-protobuf-tests.ts deleted file mode 100644 index 76d4f19fcc..0000000000 --- a/google-protobuf/google-protobuf-tests.ts +++ /dev/null @@ -1,139 +0,0 @@ -import * as jspb from "google-protobuf"; - -/* This is a typescript version of a simple generated class from a proto file that is shown below. In order to make - this ES5 JS file into TypeScript there have been quite a few modifications, but the same calls are made to the library - classes. - - // FILE: simple.proto - syntax = "proto3"; - - package examplecom; - - message MySimple { - string my_string = 1; - bool my_bool = 2; - repeated string some_labels = 3; - } -*/ - -class MySimple extends jspb.Message { - constructor(opt_data?: any) { - super(); // This isn't actually called in the JS version of this file, but it's required by TS - jspb.Message.initialize(this, opt_data, 0, -1, MySimple.repeatedFields_, null); - }; - - static repeatedFields_ = [3]; - - toObject(opt_includeInstance: boolean): {} { - return MySimple.toObject(opt_includeInstance, this); - }; - - static toObject(includeInstance: boolean, msg: MySimple): {} { - const obj: {} = { - myString: jspb.Message.getFieldWithDefault(msg, 1, ""), - myBool: jspb.Message.getFieldWithDefault(msg, 2, false), - someLabelsList: jspb.Message.getField(msg, 3), - }; - - if (includeInstance) { - // This is commented out because it's not valid in TS, but it's a simple append to an object - // obj['$jspbMessageInstance'] = msg; - } - return obj; - }; - - static deserializeBinary(bytes: Uint8Array) { - const reader = new jspb.BinaryReader(bytes); - const msg = new MySimple(); - return MySimple.deserializeBinaryFromReader(msg, reader); - }; - - static deserializeBinaryFromReader(msg: MySimple, reader: jspb.BinaryReader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - const field = reader.getFieldNumber(); - switch (field) { - case 1: - const value1 = (reader.readString()); - msg.setMyString(value1); - break; - case 2: - const value2 = (reader.readBool()); - msg.setMyBool(value2); - break; - case 3: - const value3 = (reader.readString()); - msg.addSomeLabels(value3); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - - serializeBinary(): Uint8Array { - const writer = new jspb.BinaryWriter(); - MySimple.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - - static serializeBinaryToWriter(message: MySimple, writer: jspb.BinaryWriter) { - let f1 = message.getMyString(); - if (f1.length > 0) { - writer.writeString( - 1, - f1, - ); - } - const f2 = message.getMyBool(); - if (f2) { - writer.writeBool( - 2, - f2, - ); - } - const f3 = message.getSomeLabelsList(); - if (f3.length > 0) { - writer.writeRepeatedString( - 3, - f3, - ); - } - } - - getMyString(): string { - return jspb.Message.getFieldWithDefault(this, 1, ""); - } - - setMyString(value: string) { - jspb.Message.setField(this, 1, value); - } - - getMyBool(): boolean { - return jspb.Message.getFieldWithDefault(this, 2, false); - } - - setMyBool(value: boolean) { - jspb.Message.setField(this, 2, value); - } - - getSomeLabelsList(): string[] { - return jspb.Message.getField(this, 3); - } - - setSomeLabelsList(value: string[]) { - jspb.Message.setField(this, 3, value || []); - } - - addSomeLabels(value: string, opt_index?: number) { - jspb.Message.addToRepeatedField(this, 3, value, opt_index); - } - - clearSomeLabelsList() { - this.setSomeLabelsList([]); - } -} diff --git a/google-protobuf/index.d.ts b/google-protobuf/index.d.ts deleted file mode 100644 index cf6a7e218a..0000000000 --- a/google-protobuf/index.d.ts +++ /dev/null @@ -1,687 +0,0 @@ -// Type definitions for google-protobuf 3.2 -// Project: https://github.com/google/google-protobuf -// Definitions by: Marcus Longmuir -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -type ByteSource = ArrayBuffer|Uint8Array|number[]|string; -type ScalarFieldType = boolean|number|string; -type RepeatedFieldType = ScalarFieldType[] | Uint8Array[]; -type AnyFieldType = ScalarFieldType | RepeatedFieldType | Uint8Array; -type FieldValue = (string|number|boolean|Uint8Array|any/*This should be Array, but that isn't allowed*/|undefined) - -export abstract class Message { - getJsPbMessageId(): (string | undefined); - static initialize(msg: Message, - data: Message.MessageArray, - messageId: (string | number), - suggestedPivot: number, - repeatedFields: number[], - oneofFields?: number[][] | null): void; - static toObjectList(field: T[], - toObjectFn: (includeInstance: boolean, - data: T) => {}, - includeInstance?: boolean): {}[]; - static toObjectExtension(msg: Message, - obj: {}, - extensions: {[key: number]: ExtensionFieldInfo}, - getExtensionFn: (fieldInfo: ExtensionFieldInfo) => Message, - includeInstance?: boolean): void; - serializeBinaryExtensions(proto: Message, - writer: BinaryWriter, - extensions: {[key: number]: ExtensionFieldBinaryInfo}, - getExtensionFn: (fieldInfo: ExtensionFieldInfo) => T): void - readBinaryExtension(proto: Message, - reader: BinaryReader, - extensions: {[key: number]: ExtensionFieldBinaryInfo}, - setExtensionFn: (fieldInfo: ExtensionFieldInfo, - val: T) => void): void - static getField(msg: Message, - fieldNumber: number): FieldValue|null; - static getOptionalFloatingPointField(msg: Message, - fieldNumber: number): (number | undefined); - static getRepeatedFloatingPointField(msg: Message, - fieldNumber: number): number[]; - static bytesAsB64(bytes: Uint8Array): string; - static bytesAsU8(str: string): Uint8Array; - static bytesListAsB64(bytesList: Uint8Array[]): string[]; - static bytesListAsU8(strList: string[]): Uint8Array[]; - static getFieldWithDefault(msg: Message, - fieldNumber: number, - defaultValue: T): T; - static getMapField(msg: Message, - fieldNumber: number, - noLazyCreate: boolean, - valueCtor: typeof Message): Map; - static setField(msg: Message, - fieldNumber: number, - value: FieldValue): void; - static addToRepeatedField(msg: Message, - fieldNumber: number, - value: any, - index?: number): void; - static setOneofField(msg: Message, - fieldNumber: number, - oneof: number[], - value: FieldValue): void; - static computeOneofCase(msg: Message, - oneof: number[]): number; - static getWrapperField(msg: Message, - ctor: typeof Message, - fieldNumber: number, - required?: number): Message; - static getRepeatedWrapperField(msg: Message, - ctor: typeof Message, - fieldNumber: number): Message[]; - static setWrapperField(msg: Message, - fieldNumber: number, - value?: (Message|Map)): void; - static setOneofWrapperField(msg: Message, - fieldNumber: number, - oneof: number[], - value: any): void; - static setRepeatedWrapperField(msg: Message, - fieldNumber: number, - value: any): void; - static addToRepeatedWrapperField(msg: Message, - fieldNumber: number, - value: any, - ctor: typeof Message, - index: number): any; - static toMap(field: any[], - mapKeyGetterFn: (field: any) => string, - toObjectFn?: Message.StaticToObject, - includeInstance?: boolean): void; - toArray(): Message.MessageArray; - toString(): string; - getExtension(fieldInfo: ExtensionFieldInfo): T; - setExtension(fieldInfo: ExtensionFieldInfo, - value: T): void; - static difference(m1: T, - m2: T): T; - static equals(m1: Message, - m2: Message): boolean; - static compareExtensions(extension1: {}, - extension2: {}): boolean; - static compareFields(field1: any, - field2: any): boolean; - cloneMessage(): Message; - clone(): Message; - static clone(msg: T): T; - static cloneMessage(msg: T): T; - static copyInto(fromMessage: Message, - toMessage: Message): void; - static registerMessageType(id: number, - constructor: typeof Message): void; - - abstract serializeBinary(): Uint8Array; - abstract toObject(includeInstance?: boolean): {}; - - // These are `abstract static`, but that isn't allowed. Subclasses of Message will have these methods and properties - // and not having them on Message makes using this class for its intended purpose quite difficult. - static deserializeBinary(bytes: Uint8Array): Message; - static deserializeBinaryFromReader(message: Message, reader: BinaryReader): Message; - static serializeBinaryToWriter(message: Message, writer: BinaryWriter): void; - static toObject(includeInstance: boolean, msg: Message): {}; - static extensions: {[key: number]: ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: ExtensionFieldBinaryInfo}; -} - -export namespace Message { - export type MessageArray = any[]; // This type needs to reference itself - interface StaticToObject { - (includeInstance: boolean, - msg: Message): {}; - } -} - -export class ExtensionFieldInfo { - fieldIndex: number; - fieldName: number; - ctor: typeof Message; - toObjectFn: Message.StaticToObject; - isRepeated: number; - constructor(fieldIndex: number, - fieldName: {[key: string]: number}, - ctor: typeof Message, - toObjectFn: Message.StaticToObject, - isRepeated: number); - isMessageType(): boolean; -} - -export class ExtensionFieldBinaryInfo { - fieldInfo: ExtensionFieldInfo; - binaryReaderFn: BinaryRead; - binaryWriterFn: BinaryWrite; - opt_binaryMessageSerializeFn: (msg: Message, - writer: BinaryWriter) => void; - opt_binaryMessageDeserializeFn: (msg: Message, - reader: BinaryReader) => Message; - opt_isPacked: boolean; - constructor(fieldInfo: ExtensionFieldInfo, - binaryReaderFn: BinaryRead, - binaryWriterFn: BinaryWrite, - opt_binaryMessageSerializeFn: (msg: Message, - writer: BinaryWriter) => void, - opt_binaryMessageDeserializeFn: (msg: Message, - reader: BinaryReader) => Message, - opt_isPacked: boolean); -} - -export class Map { - constructor(arr: Array<[K, V]>, - valueCtor?: {new(init: any): V}); - toArray(): Array<[K, V]>; - toObject(includeInstance: boolean, - valueToObject: (includeInstance: boolean) => any): Array<[K, V]>; - static fromObject(entries: Array<[K, V]>, - valueCtor: any, - valueFromObject: any): Map; - getLength(): number; - clear(): void; - del(key: K): boolean; - getEntryList(): Array<[K, V]>; - entries(): Map.Iterator<[K, V]>; - keys(): Map.Iterator; - forEach(callback: (entry: V, - key: K) => void, - thisArg?: {}): void; - set(key: K, - value: V): void; - get(key: K): (V | undefined); - has(key: K): boolean; -} - -export namespace Map { - // This is implemented by jspb.Map.ArrayIteratorIterable_, but that class shouldn't be exported - interface Iterator { - next(): IteratorResult; - } - type IteratorResult = { - done: boolean, - value: T, - } -} - -interface BinaryReadReader { - (msg: any, - binaryReader: BinaryReader): void; -} - -interface BinaryRead { - (msg: any, - reader: BinaryReadReader): void; -} - -interface BinaryWriteCallback { - (value: any, - binaryWriter: BinaryWriter): void; -} - -interface BinaryWrite { - (fieldNumber: number, - value: any, - writerCallback: BinaryWriteCallback): void; -} - -export class BinaryReader { - constructor(bytes?: ByteSource, - start?: number, - length?: number); - static alloc(bytes?: ByteSource, - start?: number, - length?: number): BinaryReader; - alloc(bytes?: ByteSource, - start?: number, - length?: number): BinaryReader; - free(): void; - getFieldCursor(): number; - getCursor(): number; - getBuffer(): Uint8Array; - getFieldNumber(): number; - getWireType(): BinaryConstants.WireType; - isEndGroup(): boolean; - getError(): boolean; - setBlock(bytes?: ByteSource, - start?: number, - length?: number): void; - reset(): void; - advance(count: number): void; - nextField(): boolean; - unskipHeader(): void; - skipMatchingFields(): void; - skipVarintField(): void; - skipDelimitedField(): void; - skipFixed32Field(): void; - skipFixed64Field(): void; - skipGroup(): void; - skipField(): void; - registerReadCallback(callbackName: string, - callback: (binaryReader: BinaryReader) => any): void; - runReadCallback(callbackName: string): any; - readAny(fieldType: BinaryConstants.FieldType): AnyFieldType; - readMessage: BinaryRead; - readGroup(field: number, - message: Message, - reader: BinaryReadReader): void; - getFieldDecoder(): BinaryDecoder; - readInt32(): number; - readInt32String(): string; - readInt64(): number; - readInt64String(): string; - readUint32(): number; - readUint32String(): string; - readUint64(): number; - readUint64String(): string; - readSint32(): number; - readSint64(): number; - readSint64String(): string; - readFixed32(): number; - readFixed64(): number; - readFixed64String(): string; - readSfixed32(): number; - readSfixed32String(): string; - readSfixed64(): number; - readSfixed64String(): string; - readFloat(): number; - readDouble(): number; - readBool(): boolean; - readEnum(): number; - readString(): string; - readBytes(): Uint8Array; - readVarintHash64(): string; - readFixedHash64(): string; - readPackedInt32(): number[]; - readPackedInt32String(): string[]; - readPackedInt64(): number[]; - readPackedInt64String(): string[]; - readPackedUint32(): number[]; - readPackedUint32String(): string[]; - readPackedUint64(): number[]; - readPackedUint64String(): string[]; - readPackedSint32(): number[]; - readPackedSint64(): number[]; - readPackedSint64String(): string[]; - readPackedFixed32(): number[]; - readPackedFixed64(): number[]; - readPackedFixed64String(): string[]; - readPackedSfixed32(): number[]; - readPackedSfixed64(): number[]; - readPackedSfixed64String(): string[]; - readPackedFloat(): number[]; - readPackedDouble(): number[]; - readPackedBool(): boolean[]; - readPackedEnum(): number[]; - readPackedVarintHash64(): string[]; - readPackedFixedHash64(): string[]; -} - -export class BinaryWriter { - constructor(); - writeSerializedMessage(bytes: Uint8Array, - start: number, - end: number): void; - maybeWriteSerializedMessage(bytes?: Uint8Array, - start?: number, - end?: number): void; - reset(): void; - getResultBuffer(): Uint8Array; - getResultBase64String(): string; - beginSubMessage(field: number): void; - endSubMessage(field: number): void; - writeAny(fieldType: BinaryConstants.FieldType, - field: number, - value: AnyFieldType): void; - writeInt32(field: number, - value?: number): void; - writeInt32String(field: number, - value?: string): void; - writeInt64(field: number, - value?: number): void; - writeInt64String(field: number, - value?: string): void; - writeUint32(field: number, - value?: number): void; - writeUint32String(field: number, - value?: string): void; - writeUint64(field: number, - value?: number): void; - writeUint64String(field: number, - value?: string): void; - writeSint32(field: number, - value?: number): void; - writeSint64(field: number, - value?: number): void; - writeSint64String(field: number, - value?: string): void; - writeFixed32(field: number, - value?: number): void; - writeFixed64(field: number, - value?: number): void; - writeFixed64String(field: number, - value?: string): void; - writeSfixed32(field: number, - value?: number): void; - writeSfixed64(field: number, - value?: number): void; - writeSfixed64String(field: number, - value?: string): void; - writeFloat(field: number, - value?: number): void; - writeDouble(field: number, - value?: number): void; - writeBool(field: number, - value?: boolean): void; - writeEnum(field: number, - value?: number): void; - writeString(field: number, - value?: string): void; - writeBytes(field: number, - value?: ByteSource): void; - writeMessage: BinaryWrite; - writeGroup(field: number, - value: any, - writeCallback: BinaryWriteCallback): void; - writeFixedHash64(field: number, - value?: string): void; - writeVarintHash64(field: number, - value?: string): void; - writeRepeatedInt32(field: number, - value?: number[]): void; - writeRepeatedInt32String(field: number, - value?: string[]): void; - writeRepeatedInt64(field: number, - value?: number[]): void; - writeRepeatedInt64String(field: number, - value?: string[]): void; - writeRepeatedUint32(field: number, - value?: number[]): void; - writeRepeatedUint32String(field: number, - value?: string[]): void; - writeRepeatedUint64(field: number, - value?: number[]): void; - writeRepeatedUint64String(field: number, - value?: string[]): void; - writeRepeatedSint32(field: number, - value?: number[]): void; - writeRepeatedSint64(field: number, - value?: number[]): void; - writeRepeatedSint64String(field: number, - value?: string[]): void; - writeRepeatedFixed32(field: number, - value?: number[]): void; - writeRepeatedFixed64(field: number, - value?: number[]): void; - writeRepeatedFixed64String(field: number, - value?: string[]): void; - writeRepeatedSfixed32(field: number, - value?: number[]): void; - writeRepeatedSfixed64(field: number, - value?: number[]): void; - writeRepeatedSfixed64String(field: number, - value?: string[]): void; - writeRepeatedFloat(field: number, - value?: number[]): void; - writeRepeatedDouble(field: number, - value?: number[]): void; - writeRepeatedBool(field: number, - value?: boolean[]): void; - writeRepeatedEnum(field: number, - value?: number[]): void; - writeRepeatedString(field: number, - value?: string[]): void; - writeRepeatedBytes(field: number, - value?: ByteSource[]): void; - writeRepeatedMessage(field: number, - value: Message[], - writerCallback: BinaryWriteCallback): void; - writeRepeatedGroup(field: number, - value: Message[], - writerCallback: BinaryWriteCallback): void; - writeRepeatedFixedHash64(field: number, - value?: string[]): void; - writeRepeatedVarintHash64(field: number, - value?: string[]): void; - writePackedInt32(field: number, - value?: number[]): void; - writePackedInt32String(field: number, - value?: string[]): void; - writePackedInt64(field: number, - value?: number[]): void; - writePackedInt64String(field: number, - value?: string[]): void; - writePackedUint32(field: number, - value?: number[]): void; - writePackedUint32String(field: number, - value?: string[]): void; - writePackedUint64(field: number, - value?: number[]): void; - writePackedUint64String(field: number, - value?: string[]): void; - writePackedSint32(field: number, - value?: number[]): void; - writePackedSint64(field: number, - value?: number[]): void; - writePackedSint64String(field: number, - value?: string[]): void; - writePackedFixed32(field: number, - value?: number[]): void; - writePackedFixed64(field: number, - value?: number[]): void; - writePackedFixed64String(field: number, - value?: string[]): void; - writePackedSfixed32(field: number, - value?: number[]): void; - writePackedSfixed64(field: number, - value?: number[]): void; - writePackedSfixed64String(field: number, - value?: string[]): void; - writePackedFloat(field: number, - value?: number[]): void; - writePackedDouble(field: number, - value?: number[]): void; - writePackedBool(field: number, - value?: boolean[]): void; - writePackedEnum(field: number, - value?: number[]): void; - writePackedFixedHash64(field: number, - value?: string[]): void; - writePackedVarintHash64(field: number, - value?: string[]): void; -} - -export class BinaryEncoder { - constructor(); - length(): number; - end(): number[]; - writeSplitVarint64(lowBits: number, - highBits: number): void; - writeSplitFixed64(lowBits: number, - highBits: number): void; - writeUnsignedVarint32(value: number): void; - writeSignedVarint32(value: number): void; - writeUnsignedVarint64(value: number): void; - writeSignedVarint64(value: number): void; - writeZigzagVarint32(value: number): void; - writeZigzagVarint64(value: number): void; - writeZigzagVarint64String(value: string): void; - writeUint8(value: number): void; - writeUint16(value: number): void; - writeUint32(value: number): void; - writeUint64(value: number): void; - writeInt8(value: number): void; - writeInt16(value: number): void; - writeInt32(value: number): void; - writeInt64(value: number): void; - writeInt64String(value: string): void; - writeFloat(value: number): void; - writeDouble(value: number): void; - writeBool(value: boolean): void; - writeEnum(value: number): void; - writeBytes(bytes: Uint8Array): void; - writeVarintHash64(hash: string): void; - writeFixedHash64(hash: string): void; - writeString(value: string): number; -} - -export class BinaryDecoder { - constructor(bytes?: ByteSource, - start?: number, - length?: number) - static alloc(bytes?: ByteSource, - start?: number, - length?: number): BinaryDecoder; - free(): void; - clone(): BinaryDecoder; - clear(): void; - getBuffer(): Uint8Array; - setBlock(data: ByteSource, - start?: number, - length?: number): void; - getEnd(): number; - setEnd(end: number): void; - reset(): void; - getCursor(): number; - setCursor(cursor: number): void; - advance(count: number): void; - atEnd(): boolean; - pastEnd(): boolean; - getError(): boolean; - skipVarint(): void; - unskipVarint(value: number): void; - readUnsignedVarint32(): number; - readSignedVarint32(): number; - readUnsignedVarint32String(): number; - readSignedVarint32String(): number; - readZigzagVarint32(): number; - readUnsignedVarint64(): number; - readUnsignedVarint64String(): number; - readSignedVarint64(): number; - readSignedVarint64String(): number; - readZigzagVarint64(): number; - readZigzagVarint64String(): number; - readUint8(): number; - readUint16(): number; - readUint32(): number; - readUint64(): number; - readUint64String(): string; - readInt8(): number; - readInt16(): number; - readInt32(): number; - readInt64(): number; - readInt64String(): string; - readFloat(): number; - readDouble(): number; - readBool(): boolean; - readEnum(): number; - readString(length: number): string; - readStringWithLength(): string; - readBytes(length: number): Uint8Array; - readVarintHash64(): string; - readFixedHash64(): string; -} - -export class BinaryIterator { - constructor(decoder?: BinaryDecoder, - next?: () => number|boolean|string|null, - elements?: Array) - static alloc(decoder?: BinaryDecoder, - next?: () => number|boolean|string|null, - elements?: Array): BinaryIterator; - free(): void; - clear(): void; - get(): (ScalarFieldType | null); - atEnd(): boolean; - next(): (ScalarFieldType | null); -} - -export namespace BinaryConstants { - export enum FieldType { - INVALID = -1, - DOUBLE = 1, - FLOAT = 2, - INT64 = 3, - UINT64 = 4, - INT32 = 5, - FIXED64 = 6, - FIXED32 = 7, - BOOL = 8, - STRING = 9, - GROUP = 10, - MESSAGE = 11, - BYTES = 12, - UINT32 = 13, - ENUM = 14, - SFIXED32 = 15, - SFIXED64 = 16, - SINT32 = 17, - SINT64 = 18, - FHASH64 = 30, - VHASH64 = 31, - } - - export enum WireType { - INVALID = -1, - VARINT = 0, - FIXED64 = 1, - DELIMITED = 2, - START_GROUP = 3, - END_GROUP = 4, - FIXED32 = 5, - } - - const FieldTypeToWireType: (fieldType: FieldType) => WireType; - - const INVALID_FIELD_NUMBER: number; - const FLOAT32_EPS: number; - const FLOAT32_MIN: number; - const FLOAT32_MAX: number; - const FLOAT64_EPS: number; - const FLOAT64_MIN: number; - const FLOAT64_MAX: number; - const TWO_TO_20: number; - const TWO_TO_23: number; - const TWO_TO_31: number; - const TWO_TO_32: number; - const TWO_TO_52: number; - const TWO_TO_63: number; - const TWO_TO_64: number; - const ZERO_HASH: string; -} - -export namespace arith { - export class UInt64 { - lo: number; - hi: number; - constructor(lo: number, - hi: number); - cmp(other: UInt64): number; - rightShift(): UInt64; - leftShift(): UInt64; - msb(): boolean; - lsb(): boolean; - zero(): boolean; - add(other: UInt64): UInt64; - sub(other: UInt64): UInt64; - static mul32x32(a: number, - b: number): UInt64; - mul(a: number): UInt64; - div(divisor: number): [UInt64, UInt64]; - toString(): string; - static fromString(str: string): UInt64; - clone(): UInt64; - } - - export class Int64 { - lo: number; - hi: number; - constructor(lo: number, - hi: number); - add(other: Int64): Int64; - sub(other: Int64): Int64; - clone(): Int64; - toString(): string; - static fromString(str: string): Int64; - } -} - -// jspb.utils package excluded as it likely shouldn't be called by user code \ No newline at end of file diff --git a/google.analytics/index.d.ts b/google.analytics/index.d.ts deleted file mode 100644 index 0f86e0be40..0000000000 --- a/google.analytics/index.d.ts +++ /dev/null @@ -1,106 +0,0 @@ -// Type definitions for Google Analytics (Classic and Universal) -// Project: https://developers.google.com/analytics/devguides/collection/gajs/, https://developers.google.com/analytics/devguides/collection/analyticsjs/method-reference -// Definitions by: Ronnie Haakon Hegelund , Pat Kujawa -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -declare class Tracker { - _trackPageview(): void; - _getName(): string; - _getAccount(): string; - _getVersion(): string; - _getVisitorCustomVar(index: number): string; - _setAccount(): string; - _setCustomVar(index: number, name: string, value: string, opt_scope?: number): boolean; - _setSampleRate(newRate: string): void; - _setSessionCookieTimeout(cookieTimeoutMillis: number): void; - _setSiteSpeedSampleRate(sampleRate: number): void; - _setVisitorCookieTimeout(milliseconds: number): void; - _trackPageLoadTime(): void; -} - -interface GoogleAnalyticsCode { - push(commandArray: string[]): void; - push(func: Function): void; -} - -interface GoogleAnalyticsTracker { - _getTracker(account: string): Tracker; - _createTracker(opt_account: string, opt_name?: string): Tracker; - _getTrackerByName(opt_name?: string): Tracker; - _anonymizeIp(): void; -} - -interface GoogleAnalytics { - type: string; - src: string; - async: boolean; -} - -declare namespace UniversalAnalytics { - // https://developers.google.com/analytics/devguides/collection/analyticsjs/method-reference - - enum HitType { - 'pageview', 'screenview', 'event', 'transaction', 'item', 'social', 'exception', 'timing' - } - - interface ga { - l: number; - q: any[]; - - (command: 'send', hitType: 'event', eventCategory: string, eventAction: string, - eventLabel?: string, eventValue?: number, fieldsObject?: {}): void; - (command: 'send', hitType: 'event', fieldsObject: { - eventCategory: string, - eventAction: string, - eventLabel?: string, - eventValue?: number, - nonInteraction?: boolean}): void; - (command: 'send', fieldsObject: { - hitType: HitType, // 'event' - eventCategory: string, - eventAction: string, - eventLabel?: string, - eventValue?: number, - nonInteraction?: boolean}): void; - (command: 'send', hitType: 'pageview', page: string): void; - (command: 'send', hitType: 'social', - socialNetwork: string, socialAction: string, socialTarget: string): void; - (command: 'send', hitType: 'social', - fieldsObject: {socialNetwork: string, socialAction: string, socialTarget: string}): void; - (command: 'send', hitType: 'timing', - timingCategory: string, timingVar: string, timingValue: number): void; - (command: 'send', hitType: 'timing', - fieldsObject: {timingCategory: string, timingVar: string, timingValue: number}): void; - (command: 'send', fieldsObject: {}): void; - (command: string, hitType: HitType, ...fields: any[]): void; - - (command: 'create', trackingId: string, cookieDomain?: string, name?: string, fieldsObject?: {}): void; - (command: 'remove'): void; - - (command: string, ...fields: any[]): void; - - (readyCallback: (defaultTracker?: UniversalAnalytics.Tracker) => void): void; - - create(trackingId: string, cookieDomain: string, name: string, fieldsObject?: {}): UniversalAnalytics.Tracker; - create(trackingId: string, cookieDomain: string, fieldsObject?: {}): UniversalAnalytics.Tracker; - create(trackingId: string, fieldsObject?: {}): UniversalAnalytics.Tracker; - - getAll(): UniversalAnalytics.Tracker[]; - getByName(name: string): UniversalAnalytics.Tracker; - remove(name: string): void; - } - - interface Tracker { - get(fieldName: string): T; - send(hitType: string, opt_fieldObject?: {}): void; - set(fieldName: string, value: string): void; - set(fieldName: string, value: {}): void; - set(fieldName: string, value: number): void; - set(fieldName: string, value: boolean): void; - } -} - -declare var gaClassic: GoogleAnalytics; -declare var ga: UniversalAnalytics.ga; -declare var _gaq: GoogleAnalyticsCode; -declare var _gat: GoogleAnalyticsTracker; diff --git a/heatmap.js/index.d.ts b/heatmap.js/index.d.ts deleted file mode 100644 index d6907abe7b..0000000000 --- a/heatmap.js/index.d.ts +++ /dev/null @@ -1,140 +0,0 @@ -// Type definitions for heatmap.js v2.0 -// Project: https://github.com/pa7/heatmap.js/ -// Definitions by: Yang Guan -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -/// - -/* - * 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 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; -} diff --git a/heatmap.js/package.json b/heatmap.js/package.json deleted file mode 100644 index 711ba15e43..0000000000 --- a/heatmap.js/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "@types/leaflet": "^0.7" - } -} \ No newline at end of file diff --git a/highcharts/modules/map/index.d.ts b/highcharts/modules/map/index.d.ts deleted file mode 100644 index 9818729a62..0000000000 --- a/highcharts/modules/map/index.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -// Type definitions for Highmaps 4.2.7 -// Project: http://www.highcharts.com/products/highmaps -// Definitions by: Albert Ozimek -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -import { Static } from 'highcharts'; - -declare module 'highcharts' { - export interface Static { - mapChart(renderTo: string | HTMLElement, options: Options, callback?: (chart: ChartObject) => void): ChartObject; - } -} - diff --git a/highcharts/test/no-data-to-display.ts b/highcharts/test/no-data-to-display.ts deleted file mode 100644 index e2bb453714..0000000000 --- a/highcharts/test/no-data-to-display.ts +++ /dev/null @@ -1,8 +0,0 @@ -function test_NoDataToDisplay() { - var chart = $("#container").highcharts(); - var chartHasData = chart.hasData(); - chart.hideNoData(); - chart.showNoData("Custom no data message"); -} - -HighchartsNoDataToDisplay(Highcharts); \ No newline at end of file diff --git a/htmlhint/htmlhint-tests.ts b/htmlhint/htmlhint-tests.ts deleted file mode 100644 index 1a44c78888..0000000000 --- a/htmlhint/htmlhint-tests.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { HTMLHint, RuleSet } from "htmlhint"; - -const htmlHintRules: RuleSet = { - "tagname-lowercase": true, - "attr-lowercase": true, - "attr-value-double-quotes": true, - "doctype-first": true, - "tag-pair": true, - "spec-char-escape": true, - "id-unique": true, - "src-not-empty": true, - "attr-no-duplication": true, - "title-require": true -}; - -const result = HTMLHint.verify('', htmlHintRules); -const formatted = HTMLHint.format(result, { indent: 2 }); diff --git a/http-codes/index.d.ts b/http-codes/index.d.ts deleted file mode 100644 index e106812f0c..0000000000 --- a/http-codes/index.d.ts +++ /dev/null @@ -1,67 +0,0 @@ -// Type definitions for http-codes 1.0 -// Project: https://github.com/flesler/node-http-codes -// Definitions by: Mohamed Hegazy -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -export declare const ACCEPTED: number; -export declare const ALREADY_REPORTED: number; -export declare const BAD_GATEWAY: number; -export declare const BAD_REQUEST: number; -export declare const BANDWIDTH_LIMIT_EXCEEDED: number; -export declare const CONFLICT: number; -export declare const CONTINUE: number; -export declare const CREATED: number; -export declare const EXPECTATION_FAILED: number; -export declare const FAILED_DEPENDENCY: number; -export declare const FORBIDDEN: number; -export declare const FOUND: number; -export declare const GATEWAY_TIMEOUT: number; -export declare const GONE: number; -export declare const HTTP_VERSION_NOT_SUPPORTED: number; -export declare const IM_A_TEAPOT: number; -export declare const IM_USED: number; -export declare const INSUFFICIENT_STORAGE: number; -export declare const INTERNAL_SERVER_ERROR: number; -export declare const LENGTH_REQUIRED: number; -export declare const LOCKED: number; -export declare const LOOP_DETECTED: number; -export declare const METHOD_NOT_ALLOWED: number; -export declare const MISDIRECTED_REQUEST: number; -export declare const MOVED_PERMANENTLY: number; -export declare const MULTIPLE_CHOICES: number; -export declare const MULTI_STATUS: number; -export declare const NETWORK_AUTHENTICATION_REQUIRED: number; -export declare const NON_AUTHORITATIVE_INFORMATION: number; -export declare const NOT_ACCEPTABLE: number; -export declare const NOT_EXTENDED: number; -export declare const NOT_FOUND: number; -export declare const NOT_IMPLEMENTED: number; -export declare const NOT_MODIFIED: number; -export declare const NO_CONTENT: number; -export declare const OK: number; -export declare const PARTIAL_CONTENT: number; -export declare const PAYLOAD_TOO_LARGE: number; -export declare const PAYMENT_REQUIRED: number; -export declare const PERMANENT_REDIRECT: number; -export declare const PRECONDITION_FAILED: number; -export declare const PRECONDITION_REQUIRED: number; -export declare const PROCESSING: number; -export declare const PROXY_AUTHENTICATION_REQUIRED: number; -export declare const RANGE_NOT_SATISFIABLE: number; -export declare const REQUEST_HEADER_FIELDS_TOO_LARGE: number; -export declare const REQUEST_TIMEOUT: number; -export declare const RESET_CONTENT: number; -export declare const SEE_OTHER: number; -export declare const SERVICE_UNAVAILABLE: number; -export declare const SWITCHING_PROTOCOLS: number; -export declare const TEMPORARY_REDIRECT: number; -export declare const TOO_MANY_REQUESTS: number; -export declare const UNAUTHORIZED: number; -export declare const UNAVAILABLE_FOR_LEGAL_REASONS: number; -export declare const UNORDERED_COLLECTION: number; -export declare const UNPROCESSABLE_ENTITY: number; -export declare const UNSUPPORTED_MEDIA_TYPE: number; -export declare const UPGRADE_REQUIRED: number; -export declare const URI_TOO_LONG: number; -export declare const USE_PROXY: number; -export declare const VARIANT_ALSO_NEGOTIATES: number; diff --git a/jmespath/jmespath-tests.ts b/jmespath/jmespath-tests.ts deleted file mode 100644 index 04034acf67..0000000000 --- a/jmespath/jmespath-tests.ts +++ /dev/null @@ -1,6 +0,0 @@ -import jmespath = require("jmespath"); - -const a = jmespath.search({foo: {bar: {baz: [0, 1, 2, 3, 4]}}}, "foo.bar.baz[2]"); -const b = jmespath.search({foo: {bar: {baz: [0, 1, 2, 3, 4]}}}, "foo.bar") -const c = jmespath.search({"foo": [{"first": "a", "last": "b"}, {"first": "c", "last": "d"}]}, "foo[*].first"); -const d = jmespath.search({"foo": [{"age": 20}, {"age": 25}, {"age": 30}, {"age": 35}, {"age": 40}]}, "foo[?age > `30`]"); diff --git a/jquery-toastmessage-plugin/jquery-toastmessage-plugin-tests.ts b/jquery-toastmessage-plugin/jquery-toastmessage-plugin-tests.ts deleted file mode 100644 index f11813cfbb..0000000000 --- a/jquery-toastmessage-plugin/jquery-toastmessage-plugin-tests.ts +++ /dev/null @@ -1,85 +0,0 @@ -/* code examples from documentation */ - -$().toastmessage('showNoticeToast', 'some message here'); -$().toastmessage('showSuccessToast', "some message here"); -$().toastmessage('showWarningToast', "some message here"); -$().toastmessage('showErrorToast', "some message here"); - -// user configured toastmessage: -const toastObject = $().toastmessage('showToast', { - text : 'Hello World', - sticky : true, - position : 'top-right', - type : 'success', - close : function () {console.log("toast is closed ...");} -}); - -$().toastmessage('removeToast', toastObject); - -// reconfiguring the toasts as sticky -$().toastmessage({sticky : true}); - -// saving the newly created toast into a variable -var myToast = $().toastmessage('showNoticeToast', 'some message here'); - -// removing the toast -$().toastmessage('removeToast', myToast); - -// user configuration of all toastmessages to come: -$().toastmessage({ - text : 'Hello World', - sticky : true, - position : 'top-right', - type : 'success', - close : function () {console.log("toast is closed ...");} -}); - -$().toastmessage({ - inEffectDuration: 600, // in effect duration in miliseconds - stayTime: 3000, // time in miliseconds before the item has to disappear - text: '', // content of the item - sticky: false, // should the toast item sticky or not? - type: 'notice', // notice, warning, error, success - position: 'top-right', // top-left, top-center, top-right, middle-left, middle-center, middle-right - // Position of the toast container holding different toast. - // Position can be set only once at the very first call, - // changing the position after the first call does nothing - closeText: '', // text which will be shown as close button, - // set to '' when you want to introduce an image via css - close: undefined // callback function when the toastmessage is closed -}); - -/* code examples from tests */ - -$('.toast-container').remove(); - -$().toastmessage('showSuccessToast', "SUCCESS"); -$().toastmessage('showNoticeToast', "NOTICE"); -$().toastmessage('showWarningToast', "WARNING"); -$().toastmessage('showErrorToast', "ERROR"); -$().toastmessage({ - sticky : true, - position : 'top-right', - closeText: '' -}); -$().toastmessage('showToast', { - text : 'Success Dialog', - type : 'success' -}); -$().toastmessage('showToast', { - text : 'Success Dialog', - sticky : true, - position : 'top-right', - type : 'success', - closeText: '', - close : () => {} -}); -var toast = $().toastmessage('showToast', { - text : 'Success Dialog', - sticky : true, - position : 'top-right', - type : 'success', - closeText: '', - close : () => {} -}); -$().toastmessage('removeToast', toast, { close : () => {} }); diff --git a/jump.js/index.d.ts b/jump.js/index.d.ts deleted file mode 100644 index fdef97c712..0000000000 --- a/jump.js/index.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -// Type definitions for jump.js 1.0 -// Project: https://github.com/callmecavs/jump.js -// Definitions by: rhysd -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -declare type TransitionFunc = (t: number, b: number, c: number, d: number) => number; -declare interface JumpOptions { - duration?: number; - offset?: number; - callback?: () => void; - easing?: TransitionFunc; - a11y?: boolean; -} -declare type Jump = (target: string | Element | number, opts?: JumpOptions) => void; -declare const jump: Jump; -export = jump; diff --git a/koa-cache-control/tslint.json b/koa-cache-control/tslint.json deleted file mode 100644 index eb88e553a5..0000000000 --- a/koa-cache-control/tslint.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "../tslint.json", - - "noImplicitAny": "true", - "noImplicitThis": "true", - "strictNullChecks": "true" -} diff --git a/koa-compose/koa-compose-tests.ts b/koa-compose/koa-compose-tests.ts deleted file mode 100644 index 2b2a65038e..0000000000 --- a/koa-compose/koa-compose-tests.ts +++ /dev/null @@ -1,17 +0,0 @@ - -import compose = require('koa-compose'); - -var fn1: compose.Middleware = function(context: any, next: () => Promise): Promise { - return Promise - .resolve(console.log('in fn1')) - .then(() => next()); -}; - -var fn2: compose.Middleware = function(context: any, next: () => Promise): Promise { - return Promise - .resolve(console.log('in fn2')) - .then(() => next()); -}; - - -var fn = compose([fn1, fn2]); \ No newline at end of file diff --git a/kramed/kramed-tests.ts b/kramed/kramed-tests.ts deleted file mode 100644 index 0782742234..0000000000 --- a/kramed/kramed-tests.ts +++ /dev/null @@ -1,43 +0,0 @@ - -import { KramedOptions, kramed, KramedParser, KramedStatic, KramedRenderer } from 'kramed'; - -var options: KramedOptions = { - gfm: true, - tables: true, - breaks: false, - pedantic: false, - sanitize: true, - smartLists: true, - silent: false, - highlight: function (code: string, lang: string) { - return ''; - }, - langPrefix: 'lang-', - smartypants: false, - renderer: new kramed.Renderer() -}; - -function callback() { - console.log('callback called'); -} - -kramed.setOptions(options); - -console.log(kramed('i am using __kramdown__.')); -console.log(kramed('i am using __kramdown__.', options)); -console.log(kramed('i am using __kramdown__.', callback)); -console.log(kramed('i am using __kramdown__.', options, callback)); - -console.log(kramed.parse('i am using __kramdown__.')); -console.log(kramed.parse('i am using __kramdown__.', options)); -console.log(kramed.parse('i am using __kramdown__.', callback)); -console.log(kramed.parse('i am using __kramdown__.', options, callback)); - -var text = 'something'; -var tokens = kramed.lexer(text, options); -console.log(kramed.parser(tokens)); - -var renderer = new kramed.Renderer(); -renderer.heading = function(text, level, raw) { - return text + level.toString() + raw; -}; diff --git a/leaflet-curve/package.json b/leaflet-curve/package.json deleted file mode 100644 index 711ba15e43..0000000000 --- a/leaflet-curve/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "@types/leaflet": "^0.7" - } -} \ No newline at end of file diff --git a/leaflet-curve/tsconfig.json b/leaflet-curve/tsconfig.json deleted file mode 100644 index b093c40509..0000000000 --- a/leaflet-curve/tsconfig.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "compilerOptions": { - "module": "commonjs", - "lib": [ - "es6", - "dom" - ], - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": false, - "baseUrl": "../", - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.d.ts", - "leaflet-curve-tests.ts" - ] -} \ No newline at end of file diff --git a/leaflet-editable/package.json b/leaflet-editable/package.json deleted file mode 100644 index 711ba15e43..0000000000 --- a/leaflet-editable/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "@types/leaflet": "^0.7" - } -} \ No newline at end of file diff --git a/leaflet-geocoder-mapzen/package.json b/leaflet-geocoder-mapzen/package.json deleted file mode 100644 index 711ba15e43..0000000000 --- a/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/leaflet-imageoverlay-rotated/index.d.ts b/leaflet-imageoverlay-rotated/index.d.ts deleted file mode 100644 index acb4d7f172..0000000000 --- a/leaflet-imageoverlay-rotated/index.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -// Type definitions for leaflet-imageoverlay-rotated 0.1 -// Project: https://github.com/IvanSanchez/Leaflet.ImageOverlay.Rotated -// Definitions by: Thomas Kleinke -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -/// - -declare namespace L { - - namespace ImageOverlay { - - export interface Rotated extends L.ImageOverlay { - reposition(topleft: L.LatLngExpression, - topright: L.LatLngExpression, - bottomleft: L.LatLngExpression): void; - } - } - - namespace imageOverlay { - - export function rotated(imgSrc: string | HTMLImageElement | HTMLCanvasElement, - topleft: L.LatLngExpression, - topright: L.LatLngExpression, - bottomleft: L.LatLngExpression, - options?: L.ImageOverlayOptions): L.ImageOverlay.Rotated; - } -} diff --git a/leaflet-imageoverlay-rotated/leaflet-imageoverlay-rotated-tests.ts b/leaflet-imageoverlay-rotated/leaflet-imageoverlay-rotated-tests.ts deleted file mode 100644 index 1b2ffd6c20..0000000000 --- a/leaflet-imageoverlay-rotated/leaflet-imageoverlay-rotated-tests.ts +++ /dev/null @@ -1,10 +0,0 @@ -var topleft = L.latLng(40.52256691873593, -3.7743186950683594); -var topright = L.latLng(40.5210255066156, -3.7734764814376835); -var bottomleft = L.latLng(40.52180437272552, -3.7768453359603886); - -var overlay = L.imageOverlay.rotated("image.jpg", topleft, topright, bottomleft, { - opacity: 0.5, - interactive: true -}); - -overlay.reposition(topleft, topright, bottomleft); diff --git a/leaflet-label/package.json b/leaflet-label/package.json deleted file mode 100644 index 711ba15e43..0000000000 --- a/leaflet-label/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "@types/leaflet": "^0.7" - } -} \ No newline at end of file diff --git a/leaflet-markercluster/package.json b/leaflet-markercluster/package.json deleted file mode 100644 index b06daabe04..0000000000 --- a/leaflet-markercluster/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "@types/leaflet": "^1.0" - } -} \ No newline at end of file diff --git a/leaflet.awesome-markers/package.json b/leaflet.awesome-markers/package.json deleted file mode 100644 index 711ba15e43..0000000000 --- a/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/leaflet.fullscreen/package.json b/leaflet.fullscreen/package.json deleted file mode 100644 index 711ba15e43..0000000000 --- a/leaflet.fullscreen/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "@types/leaflet": "^0.7" - } -} \ No newline at end of file diff --git a/leaflet.fullscreen/tsconfig.json b/leaflet.fullscreen/tsconfig.json deleted file mode 100644 index c877e598cf..0000000000 --- a/leaflet.fullscreen/tsconfig.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "compilerOptions": { - "module": "commonjs", - "lib": [ - "es6", - "dom" - ], - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": false, - "baseUrl": "../", - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.d.ts", - "leaflet.fullscreen-tests.ts" - ] -} \ No newline at end of file diff --git a/linq4js/linq4js-tests.ts b/linq4js/linq4js-tests.ts deleted file mode 100644 index 9e0bbe7be5..0000000000 --- a/linq4js/linq4js-tests.ts +++ /dev/null @@ -1,5 +0,0 @@ -import "linq4js"; - -let array: Array = ["test", "test2", "test3", "test4", "test5"]; - -array.Add("test6").Remove("test3").Insert("test3", 2).Distinct().OrderBy(x => x).OrderByDescending(x => x).Select(x => x.length).Average(); \ No newline at end of file diff --git a/mapbox/index.d.ts b/mapbox/index.d.ts deleted file mode 100644 index 1e8a72020e..0000000000 --- a/mapbox/index.d.ts +++ /dev/null @@ -1,411 +0,0 @@ -// Type definitions for Mapbox 1.6 -// Project: https://www.mapbox.com/mapbox.js/ -// Definitions by: Maxime Fabre -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -/// - -////////////////////////////////////////////////////////////////////// -///////////////////////////// MAP OBJECT ///////////////////////////// -////////////////////////////////////////////////////////////////////// - -// Map -////////////////////////////////////////////////////////////////////// - -declare namespace L.mapbox { - var 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; - - interface MapOptions extends L.Map.MapOptions { - featureLayer?: FeatureLayerOptions; - gridLayer?: any; - tileLayer?: TileLayerOptions; - infoControl?: ControlOptions; - legendControl?: ControlOptions; - shareControl?: ShareControlOptions; - } - - type FilterFunction = (feature: any) => boolean; - - interface Map extends L.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; - - 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 { - export class config { - static FORCE_HTTPS: boolean; - - static HTTP_URLS: string[]; - - static HTTPS_URLS: string[]; - } -} diff --git a/mapbox/package.json b/mapbox/package.json deleted file mode 100644 index 711ba15e43..0000000000 --- a/mapbox/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "@types/leaflet": "^0.7" - } -} \ No newline at end of file diff --git a/mapbox/tsconfig.json b/mapbox/tsconfig.json deleted file mode 100644 index 0fdf82e942..0000000000 --- a/mapbox/tsconfig.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "compilerOptions": { - "module": "commonjs", - "lib": [ - "es6", - "dom" - ], - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": false, - "baseUrl": "../", - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.d.ts", - "mapbox-tests.ts" - ] -} \ No newline at end of file diff --git a/msgpack/index.d.ts b/msgpack/index.d.ts deleted file mode 100644 index 7d15442ce3..0000000000 --- a/msgpack/index.d.ts +++ /dev/null @@ -1,83 +0,0 @@ -// Type definitions for msgpack.js - MessagePack JavaScript Implementation -// Project: https://github.com/uupaa/msgpack.js/ -// 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; - - /** - * @param data string or ByteArray. - * - * @return string or ByteArray or undefined. unpack failed if undefined. - */ - unpack(data: any): any; - - worker: string; - - upload(url: string, option: MsgPackUploadOption, callback: MsgPackUploadCallback): 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; -} - -declare var msgpack: MsgPackStatic; diff --git a/msgpack/msgpack-tests.ts b/msgpack/msgpack-tests.ts deleted file mode 100644 index da0d12b926..0000000000 --- a/msgpack/msgpack-tests.ts +++ /dev/null @@ -1,28 +0,0 @@ - - -var packed = msgpack.pack(""); -msgpack.unpack(packed); - -var packedString = msgpack.pack("", true); -msgpack.unpack(packedString); - -var url = "http://example.com"; - -var uploadOption = { - data: "", - worker: false, - timeout: 10, - before: (xhr: XMLHttpRequest, option: MsgPackUploadOption) => { }, - after: (xhr: XMLHttpRequest, option: MsgPackUploadOption, result: MsgPackCallbackResult) => { } -}; -var uploadCallback = (data: string, option: MsgPackUploadOption, result: MsgPackCallbackResult) => { }; -msgpack.upload(url, uploadOption, uploadCallback); - -var downloadOption = { - worker: false, - timeout: 10, - before: (xhr: XMLHttpRequest, option: MsgPackDownloadOption) => { }, - after: (xhr: XMLHttpRequest, option: MsgPackDownloadOption, result: MsgPackCallbackResult) => { } -}; -var downloadCallback = (data: any, option: MsgPackDownloadOption, result: MsgPackCallbackResult) => { }; -msgpack.download(url, downloadOption, downloadCallback); diff --git a/nedb-logger/nedb-logger-tests.ts b/nedb-logger/nedb-logger-tests.ts deleted file mode 100644 index b6665ad44d..0000000000 --- a/nedb-logger/nedb-logger-tests.ts +++ /dev/null @@ -1,64 +0,0 @@ -/** - * Created by Joe Vanderstelt 2017-02-22. - */ - -/// - - -import * as es6styleimport from 'nedb-logger'; - -import Q = require('q'); -import nedblogger = require('nedb-logger'); - -class BaseCollection { - - private dataStore: nedblogger; - - constructor(dataStore: nedblogger) { - - this.dataStore = dataStore; - } - - insert(document: T): Q.Promise { - - var deferred = Q.defer(); - - this.dataStore.insert(document, function(err: Error, newDoc: T) { // Callback is optional - // newDoc is the newly inserted document, including its _id - if (err) { - deferred.reject(err); - } else { - deferred.resolve(newDoc); - } - }); - - return deferred.promise; - } - -} - -// Type 1: Persistent datastore with manual loading - -import Datastore = require('nedb-logger'); -var db = new Datastore({filename: 'path/to/datafile'}); - -var doc: any = { - hello: 'world' - , n: 5 - , today: new Date() - , nedbIsAwesome: true - , notthere: null - , notToBeSaved: undefined // Will not be saved - , fruits: ['apple', 'orange', 'pear'] - , infos: {name: 'nedb'} -}; - -db.insert(doc, function(err: Error, newDoc: any) { // Callback is optional - // newDoc is the newly inserted document, including its _id - // newDoc has no key called notToBeSaved since its value was undefined -}); - -db.insert([{a: 5}, {a: 42}], function(err: Error, newdocs: any[]) { - // Two documents were inserted in the database - // newDocs is an array with these documents, augmented with their _id -}); diff --git a/notNeededPackages.json b/notNeededPackages.json index af2743bacb..90a63f066e 100644 --- a/notNeededPackages.json +++ b/notNeededPackages.json @@ -5,12 +5,6 @@ "typingsPackageName": "ajv", "sourceRepoURL": "https://github.com/epoberezkin/ajv", "asOfVersion": "1.0.0" - }, - { - "libraryName": "Numbro", - "typingsPackageName": "numbro", - "sourceRepoURL": "https://github.com/foretagsplatsen/numbro/", - "asOfVersion": "1.9.3" }, { "libraryName": "antd", @@ -163,10 +157,10 @@ "asOfVersion": "1.0.0" }, { - "libraryName": "localforage", - "typingsPackageName": "localforage", - "sourceRepoURL": "https://github.com/localForage/localForage", - "asOfVersion": "0.0.34" + "libraryName": "localforage", + "typingsPackageName": "localforage", + "sourceRepoURL": "https://github.com/localForage/localForage", + "asOfVersion": "0.0.34" }, { "libraryName": "lower-case", @@ -204,6 +198,12 @@ "sourceRepoURL": "https://github.com/paularmstrong/normalizr", "asOfVersion": "2.0.18" }, + { + "libraryName": "Numbro", + "typingsPackageName": "numbro", + "sourceRepoURL": "https://github.com/foretagsplatsen/numbro/", + "asOfVersion": "1.9.3" + }, { "libraryName": "param-case", "typingsPackageName": "param-case", @@ -228,6 +228,12 @@ "sourceRepoURL": "https://github.com/pixijs/pixi-spine", "asOfVersion": "1.4.2" }, + { + "libraryName": "poly2tri.js", + "typingsPackageName": "poly2tri", + "sourceRepoURL": "https://github.com/r3mi/poly2tri.js", + "asOfVersion": "1.4.0" + }, { "libraryName": "Prando", "typingsPackageName": "prando", @@ -252,6 +258,18 @@ "sourceRepoURL": "https://github.com/reactjs/redux", "asOfVersion": "3.6.0" }, + { + "libraryName": "redux-persist", + "typingsPackageName": "redux-persist", + "sourceRepoURL": "https://github.com/rt2zz/redux-persist", + "asOfVersion": "4.3.1" + }, + { + "libraryName": "redux-persist-transform-compress", + "typingsPackageName": "redux-persist-transform-compress", + "sourceRepoURL": "https://github.com/rt2zz/redux-persist-transform-compress", + "asOfVersion": "4.2.0" + }, { "libraryName": "redux-saga", "typingsPackageName": "redux-saga", @@ -367,4 +385,4 @@ "asOfVersion": "1.2.0" } ] -} \ No newline at end of file +} diff --git a/parse-unit/parse-unit-tests.ts b/parse-unit/parse-unit-tests.ts deleted file mode 100644 index 772641c302..0000000000 --- a/parse-unit/parse-unit-tests.ts +++ /dev/null @@ -1,4 +0,0 @@ -import parse = require('parse-unit') -let [number, length] = parse('10px') -number === 50 -length === 'px' diff --git a/pixi.js/tslint.json b/pixi.js/tslint.json deleted file mode 100644 index 1c78047f30..0000000000 --- a/pixi.js/tslint.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "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" - ] - }, - "rules": { - "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" - ] - } -} \ No newline at end of file diff --git a/plotly.js/index.d.ts b/plotly.js/index.d.ts deleted file mode 100644 index 863c708abb..0000000000 --- a/plotly.js/index.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -// Type definitions for plotly.js -// Project: https://plot.ly/javascript/ -// Definitions by: Martin Duparc -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -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 -} - -interface PlotlyStatic { - newPlot(divid:string | HTMLElement, data:any[], layout?:any, config?:PlotlyConfig):void; -} - -declare module "plotly.js" { - export = plotly; -} - -declare var plotly:PlotlyStatic; diff --git a/poly2tri/index.d.ts b/poly2tri/index.d.ts deleted file mode 100644 index ed8d9e838f..0000000000 --- a/poly2tri/index.d.ts +++ /dev/null @@ -1,113 +0,0 @@ -// Type definitions for poly2tri v0.9.10 -// Project: http://github.com/r3mi/poly2tri.js/ -// Definitions by: Elemar Junior -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -declare namespace poly2tri { - - interface IPointLike { - x: number; - y: number; - } - - class Point implements IPointLike { - - x: number; - y: number; - - constructor(x: number, y: number); - - toString(): string; - - toJSON(): JSON; - - clone(): Point; - - set_zero(): Point; - - set(x: number, y: number): Point; - - negate(): Point; - - add(n: IPointLike): Point; - - sub(n: IPointLike): Point; - - mul(s: number): Point; - - length(): number; - - normalize(): number; - - equals(p: IPointLike): boolean; - - static negate(p: IPointLike): Point; - - static add(a: IPointLike, b: IPointLike): Point; - - static sub(a: IPointLike, b: IPointLike): Point; - - static mul(s: number, p: IPointLike): Point; - - static cross(a: number, b: number): number; - - static cross(a: IPointLike, b: number): number; - - static cross(a: IPointLike, b: IPointLike): number; - - static cross(a: number, b: IPointLike): number; - - static toStringBase(p: IPointLike): string; - - static toString(p: IPointLike): string; - - static compare(a: IPointLike, b: IPointLike): number; - - static equals(a: IPointLike, b: IPointLike): boolean; - - static dot(a: IPointLike, b: IPointLike): number; - } - - - class SweepContext { - constructor(contour: Array); - - constructor(contour: Array, options: JSON); - - addHole(polyline: Array): SweepContext; - - addHoles(holes: Array>): SweepContext; - - addPoint(point: IPointLike): SweepContext; - - addPoints(point: Array): SweepContext; - - triangulate(): SweepContext; - - getBoundingBox(): { min: IPointLike; max: IPointLike; }; - - getTriangles(): Array; - } - - class Triangle { - constructor(a: IPointLike, b: IPointLike, c: IPointLike); - - toString(): string; - - getPoint(index: number): IPointLike; - - getPoints(): Array; - - containsPoint(point: IPointLike): boolean; - - containsPoints(p1: IPointLike, p2: IPointLike): boolean; - - isInterior(): boolean; - } -} - - - - - - diff --git a/poly2tri/poly2tri-tests.ts b/poly2tri/poly2tri-tests.ts deleted file mode 100644 index 578596c8d1..0000000000 --- a/poly2tri/poly2tri-tests.ts +++ /dev/null @@ -1,92 +0,0 @@ - - -function initializeCDT(): poly2tri.SweepContext { - var contour = [ - new poly2tri.Point(100, 100), - new poly2tri.Point(100, 300), - new poly2tri.Point(300, 300), - new poly2tri.Point(300, 100) - ]; - - var swctx = new poly2tri.SweepContext(contour); - return swctx; -} - -function addHole() { - var swctx = initializeCDT(); - var hole = [ - new poly2tri.Point(200, 200), - new poly2tri.Point(200, 250), - new poly2tri.Point(250, 250) - ]; - swctx.addHole(hole); -} - -function addHoles() { - var swctx = initializeCDT(); - var hole1 = [ - new poly2tri.Point(200, 200), - new poly2tri.Point(200, 250), - new poly2tri.Point(250, 250) - ]; - - var hole2 = [ - new poly2tri.Point(110, 110), - new poly2tri.Point(110, 120), - new poly2tri.Point(120, 120) - ]; - - swctx.addHoles([hole1, hole2]); -} - -function addPoint() { - var swctx = initializeCDT(); - var point = new poly2tri.Point(150, 150); - swctx.addPoint(point); -} - -function addPoints() { - var swctx = initializeCDT(); - var point1 = new poly2tri.Point(150, 150); - var point2 = new poly2tri.Point(155, 155); - swctx.addPoints([point1, point2]); - swctx.addPoints([{x: 110, y: 120}]); -} - -function triangulate() { - var swctx = initializeCDT(); - swctx.triangulate(); - var triangles = swctx.getTriangles(); - - triangles.forEach(t => { - t.getPoints().forEach(p => { - console.log(p.x, p.y); - }); - var p1 = t.getPoint(0); - var p2 = t.getPoint(1); - var p3 = t.getPoint(2); - }); -} - -function chaining() { - var swctx = initializeCDT(); - - var hole1 = [ - new poly2tri.Point(200, 200), - new poly2tri.Point(200, 250), - new poly2tri.Point(250, 250) - ]; - - var hole2 = [ - new poly2tri.Point(110, 110), - new poly2tri.Point(110, 120), - new poly2tri.Point(120, 120) - ]; - - var holes = [hole1, hole2]; - var point1 = new poly2tri.Point(150, 150); - var point2 = new poly2tri.Point(155, 155); - var points = [point1, point2, { x: 153, y: 153 }]; - - var triangles = swctx.addHoles(holes).addPoints(points).triangulate().getTriangles(); -} diff --git a/prismjs/index.d.ts b/prismjs/index.d.ts deleted file mode 100644 index c3bbffae02..0000000000 --- a/prismjs/index.d.ts +++ /dev/null @@ -1,164 +0,0 @@ -// Type definitions for prism v1.4.4 -// Project: http://prismjs.com/ -// Definitions by: Erik Lieben -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -declare namespace PrismJS { - - /** - * The Prism object - */ - interface Prism { - - util: Util; - languages: Languages; - plugins: any; - - /** - * This is the most high-level function in Prism’s API. It fetches all the elements that have a .language-xxxx class and then calls Prism.highlightElement() on each one of them. - * - * @param {boolean} async - Whether to use Web Workers to improve performance and avoid blocking the UI when highlighting very large chunks of code. False by default. - * @param {(element:Element)=>void} callback? - An optional callback to be invoked after the highlighting is done. Mostly useful when async is true, since in that case, the highlighting is done asynchronously. - * @returns void - */ - highlightAll(async: boolean, callback?: (element: Element) => void): void; - - /** - * Highlights the code inside a single element. - * - * @param {Element} element - The element containing the code. It must have a class of language-xxxx to be processed, where xxxx is a valid language identifier. - * @param {boolean} async - Whether to use Web Workers to improve performance and avoid blocking the UI when highlighting very large chunks of code. False by default. - * @param {(element:Element)=>void} callback? - An optional callback to be invoked after the highlighting is done. Mostly useful when async is true, since in that case, the highlighting is done asynchronously. - * @returns void - */ - highlightElement(element: Element, async: boolean, callback?: (element: Element) => void): void; - - - /** - * Low-level function, only use if you know what you’re doing. It accepts a string of text as input and the language definitions to use, and returns a string with the HTML produced. - * - * @param {string} text - A string with the code to be highlighted. - * @param {LanguageDefinition} grammer - An object containing the tokens to use. Usually a language definition like Prism.languages.markup - * @param {LanguageDefinition} language - * @returns string - The highlighted HTML - */ - highlight(text: string, grammer: LanguageDefinition, language?: LanguageDefinition): string; - - /** - * This is the heart of Prism, and the most low-level function you can use. It accepts a string of text as input and the language definitions to use, - * and returns an array with the tokenized code. When the language definition includes nested tokens, the function is called recursively on each of - * these tokens. This method could be useful in other contexts as well, as a very crude parser. - * - * @param {string} text - A string with the code to be highlighted. - * @param {LanguageDefinition} grammar - An object containing the tokens to use. Usually a language definition like Prism.languages.markup - * @param {LanguageDefinition} language - * @returns Array - An array of strings, tokens (class Prism.Token) and other arrays. - */ - tokenize(text: string, grammar: LanguageDefinition, language?: LanguageDefinition): Array; - - fileHighlight(): void; - - hooks: Hooks; - } - - interface Environment { - element?: Element; - language?: LanguageDefinition; - grammer?: any; - code?: any; - highlightedCode?: any; - type?: string; - content?:string; - tag?: string; - classes?: Array; - attributes?: Array | Object; - parent?: Element; - } - - interface Identifier { - value: number; - } - - interface Util { - encode(tokens:Token | Array | string): Token | Array | string; - type(o: Object): string; - objId(obj: Object): Identifier; - clone(o: LanguageDefinition): LanguageDefinition; - } - - interface LanguageDefinition { - keyword?: RegExp | LanguageDefinition; - number?: RegExp | LanguageDefinition; - function?: RegExp | LanguageDefinition; - string?: RegExp | LanguageDefinition; - boolean?: RegExp | LanguageDefinition; - operator?: RegExp | LanguageDefinition; - punctuation?: RegExp | LanguageDefinition; - atrule?: RegExp | LanguageDefinition; - url?: RegExp | LanguageDefinition; - selector?: RegExp | LanguageDefinition; - property?: RegExp | LanguageDefinition; - important?: RegExp | LanguageDefinition; - style?: RegExp | LanguageDefinition; - - /** - * This option can be used to define one or more aliases for the matched token. The result will be, that the styles - * of the token and its aliases are combined. This can be useful, to combine the styling of a well known token, - * which is already supported by most of the themes, with a semantically correct token name. The option can be - * set to a string literal or an array of string literals. In the following example the token name latex-equation - * is not supported by any theme, but it will be highlighted the same as a string. - */ - alias?: string; - - pattern?: RegExp; - - /** - * This option mitigates JavaScript’s lack of lookbehind. When set to true, the first capturing group in the regex - * pattern is discarded when matching this token, so it effectively behaves as if it was lookbehind - */ - lookbehind?: boolean; - - /** - * This property accepts another object literal, with tokens that are allowed to be nested in this token. - * This makes it easier to define certain languages. However, keep in mind that they’re slower and if coded poorly, - * can even result in infinite recursion. For an example of nested tokens, check out the Markup language definition - */ - inside?: LanguageDefinition; - - /** - * Accepts an object literal with tokens and appends them to the end of the current object literal. - */ - rest?: Array; - } - - interface Languages extends Array { - - extend(id: string, redef: LanguageDefinition): LanguageDefinition; - - /** - * Insert a token before another token in a language literal - * As this needs to recreate the object (we cannot actually insert before keys in object literals), - * we cannot just provide an object, we need anobject and a key. - * @param inside The key (or language id) of the parent - * @param before The key to insert before. If not provided, the function appends instead. - * @param insert Object with the key/value pairs to insert - * @param root The object that contains `inside`. If equal to Prism.languages, it can be omitted. - */ - insertBefore(inside: string, before: string, insert: LanguageDefinition, root: Object): any; - } - - interface Hooks { - all: Array void>>; - add(name: string, callback: (env: Environment) => void):void; - run(name: string, env: Environment): void; - } - - interface Token { - type: string; - content: Token | Array | string; - alias: string; - stringify(o:string| Array, language: LanguageDefinition, parent: HTMLPreElement): string; - } -} - -declare var Prism : PrismJS.Prism; \ No newline at end of file diff --git a/prismjs/prismjs-tests.ts b/prismjs/prismjs-tests.ts deleted file mode 100644 index 6d87b9b217..0000000000 --- a/prismjs/prismjs-tests.ts +++ /dev/null @@ -1,10 +0,0 @@ - - -var element = document.createElement("code"); -var callback = (element: Element) => console.log(element); - -Prism.highlightElement(element, false, callback); -Prism.highlightElement(element, false); -Prism.highlightAll(true, callback); -Prism.highlightAll(true); - diff --git a/promised-temp/package.json b/promised-temp/package.json deleted file mode 100644 index 55849714d6..0000000000 --- a/promised-temp/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "dependencies": { - "@types/temp": "latest", - "@types/node": "latest" - } -} diff --git a/protractor-browser-logs/package.json b/protractor-browser-logs/package.json deleted file mode 100644 index 1f7874a30c..0000000000 --- a/protractor-browser-logs/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "dependencies": { - "protractor": "latest", - "@types/selenium-webdriver": "latest" - } -} diff --git a/protractor-helpers/index.d.ts b/protractor-helpers/index.d.ts deleted file mode 100644 index 92215ce4eb..0000000000 --- a/protractor-helpers/index.d.ts +++ /dev/null @@ -1,110 +0,0 @@ -// Type definitions for protractor-helpers v1.0.0 -// Project: https://github.com/wix/protractor-helpers -// Definitions by: John Cant -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.1 - -/// -/// - -// ElementArrayFinder - -declare namespace protractor { - interface ElementArrayFinder { - getByText(text: string) : protractor.ElementFinder; - $$data(hook: string) : protractor.ElementArrayFinder; - } - - interface ElementFinder { - $data(hook: string) : protractor.ElementFinder; - } -} - -// Globals - -declare function $data(hook: string) : protractor.ElementFinder; -declare function $$data(hook: string) : protractor.ElementArrayFinder; - - -// Locators - -// 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; - } -} - -// 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. - -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; - } -} - - -declare module "protractor-helpers" { - - function not(arg: webdriver.promise.IThenable) : webdriver.promise.IThenable; - - // 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 - -} diff --git a/protractor-helpers/package.json b/protractor-helpers/package.json deleted file mode 100644 index 2939ff6d12..0000000000 --- a/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/protractor-http-mock/package.json b/protractor-http-mock/package.json deleted file mode 100644 index 55eddeb1c7..0000000000 --- a/protractor-http-mock/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "@types/selenium-webdriver": "~2.44.28" - } -} diff --git a/qs/qs-tests.ts b/qs/qs-tests.ts deleted file mode 100644 index bcff0a0762..0000000000 --- a/qs/qs-tests.ts +++ /dev/null @@ -1,251 +0,0 @@ -import qs = require('qs'); -import * as assert from "power-assert"; - -qs.stringify({ a: 'b' }); -qs.stringify({ a: 'b', c: 'd' }, { delimiter: '&' }); - -qs.parse('a=b'); -qs.parse('a=b&c=d', { delimiter: '&' }); - -() => { - var obj = qs.parse('a=c'); - assert.deepEqual(obj, { a: 'c' }); - - var str = qs.stringify(obj); - assert.equal(str, 'a=c'); -} - -() => { - var plainObject = qs.parse('a[hasOwnProperty]=b', { plainObjects: true }); - assert.deepEqual(plainObject, { a: { hasOwnProperty: 'b' } }); -} - -() => { - var protoObject = qs.parse('a[hasOwnProperty]=b', { allowPrototypes: true }); - assert.deepEqual(protoObject, { a: { hasOwnProperty: 'b' } }); -} - -() => { - assert.deepEqual(qs.parse('a%5Bb%5D=c'), { - a: { b: 'c' } - }); -} - -() => { - assert.deepEqual(qs.parse('foo[bar][baz]=foobarbaz'), { - foo: { - bar: { - baz: 'foobarbaz' - } - } - }); -} - -() => { - var expected = { - a: { - b: { - c: { - d: { - e: { - f: { - '[g][h][i]': 'j' - } - } - } - } - } - } - }; - var string = 'a[b][c][d][e][f][g][h][i]=j'; - assert.deepEqual(qs.parse(string), expected); -} - -() => { - var deep = qs.parse('a[b][c][d][e][f][g][h][i]=j', { depth: 1 }); - assert.deepEqual(deep, { a: { b: { '[c][d][e][f][g][h][i]': 'j' } } }); -} - -() => { - var limited = qs.parse('a=b&c=d', { parameterLimit: 1 }); - assert.deepEqual(limited, { a: 'b' }); -} - -() => { - var delimited = qs.parse('a=b;c=d', { delimiter: ';' }); - assert.deepEqual(delimited, { a: 'b', c: 'd' }); -} - -() => { - var regexed = qs.parse('a=b;c=d,e=f', { delimiter: /[;,]/ }); - assert.deepEqual(regexed, { a: 'b', c: 'd', e: 'f' }); -} - -() => { - var withDots = qs.parse('a.b=c', { allowDots: true }); - assert.deepEqual(withDots, { a: { b: 'c' } }); -} - -() => { - var withArray = qs.parse('a[]=b&a[]=c'); - assert.deepEqual(withArray, { a: ['b', 'c'] }); -} - -() => { - var withIndexes = qs.parse('a[1]=c&a[0]=b'); - assert.deepEqual(withIndexes, { a: ['b', 'c'] }); -} - -() => { - var noSparse = qs.parse('a[1]=b&a[15]=c'); - assert.deepEqual(noSparse, { a: ['b', 'c'] }); -} - -() => { - var withEmptyString = qs.parse('a[]=&a[]=b'); - assert.deepEqual(withEmptyString, { a: ['', 'b'] }); - - var withIndexedEmptyString = qs.parse('a[0]=b&a[1]=&a[2]=c'); - assert.deepEqual(withIndexedEmptyString, { a: ['b', '', 'c'] }); -} - -() => { - var withMaxIndex = qs.parse('a[100]=b'); - assert.deepEqual(withMaxIndex, { a: { '100': 'b' } }); -} - -() => { - var withArrayLimit = qs.parse('a[1]=b', { arrayLimit: 0 }); - assert.deepEqual(withArrayLimit, { a: { '1': 'b' } }); -} - -() => { - var noParsingArrays = qs.parse('a[]=b', { parseArrays: false }); - assert.deepEqual(noParsingArrays, { a: { '0': 'b' } }); -} - -() => { - var mixedNotation = qs.parse('a[0]=b&a[b]=c'); - assert.deepEqual(mixedNotation, { a: { '0': 'b', b: 'c' } }); -} - -() => { - var arraysOfObjects = qs.parse('a[][b]=c'); - assert.deepEqual(arraysOfObjects, { a: [{ b: 'c' }] }); -} - -() => { - assert.equal(qs.stringify({ a: 'b' }), 'a=b'); - assert.equal(qs.stringify({ a: { b: 'c' } }), 'a%5Bb%5D=c'); -} - -() => { - var unencoded = qs.stringify({ a: { b: 'c' } }, { encode: false }); - assert.equal(unencoded, 'a[b]=c'); -} - -() => { - var encoded = qs.stringify({ a: { b: 'c' } }, { - encoder: function (str) { - // Passed in values `a`, `b`, `c` - return // Return encoded string - } - }) -} - -() => { - var decoded = qs.parse('x=z', { - decoder: function (str) { - // Passed in values `x`, `z` - return // Return decoded string - } - }) -} - -() => { - qs.stringify({ a: ['b', 'c', 'd'] }); - // 'a[0]=b&a[1]=c&a[2]=d' -} - -() => { - qs.stringify({ a: ['b', 'c', 'd'] }, { indices: false }); - // 'a=b&a=c&a=d' -} - -() => { - qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'indices' }) - // 'a[0]=b&a[1]=c' - qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'brackets' }) - // 'a[]=b&a[]=c' - qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'repeat' }) - // 'a=b&a=c' -} - -() => { - assert.equal(qs.stringify({ a: '' }), 'a='); -} - -() => { - assert.equal(qs.stringify({ a: null, b: undefined }), 'a='); -} - -() => { - assert.equal(qs.stringify({ a: 'b', c: 'd' }, { delimiter: ';' }), 'a=b;c=d'); -} - -() => { - qs.stringify({ a: 'b', c: 'd', e: { f: new Date(123), g: [2] } }, { filter: function (prefix, value) { - if (prefix == 'b') { - // Return an `undefined` value to omit a property. - return; - } - if (prefix == 'e[f]') { - return value.getTime(); - } - if (prefix == 'e[g][0]') { - return value * 2; - } - return value; - } }); - // 'a=b&c=d&e[f]=123&e[g][0]=4' - qs.stringify({ a: 'b', c: 'd', e: 'f' }, { filter: ['a', 'e'] }); - // 'a=b&e=f' - qs.stringify({ a: ['b', 'c', 'd'], e: 'f' }, { filter: ['a', 0, 2] }); -} - -() => { - var withNull = qs.stringify({ a: null, b: '' }); - assert.equal(withNull, 'a=&b='); -} - -() => { - var equalsInsensitive = qs.parse('a&b='); - assert.deepEqual(equalsInsensitive, { a: '', b: '' }); -} - -() => { - var strictNull = qs.stringify({ a: null, b: '' }, { strictNullHandling: true }); - assert.equal(strictNull, 'a&b='); -} - -() => { - var parsedStrictNull = qs.parse('a&b=', { strictNullHandling: true }); - assert.deepEqual(parsedStrictNull, { a: null, b: '' }); -} - -() => { - var nullsSkipped = qs.stringify({ a: 'b', c: null }, { skipNulls: true }); - assert.equal(nullsSkipped, 'a=b'); -} - -() => { - var encoder = () => {}; - var shiftJISEncoded = qs.stringify({ a: 'こんにちは!' }, { encoder: encoder }); - assert.equal(shiftJISEncoded, 'a=%82%B1%82%F1%82%C9%82%BF%82%CD%81I'); -} - -() => { - var decoder = () => {}; - var obj = qs.parse('a=%82%B1%82%F1%82%C9%82%BF%82%CD%81I', { decoder: decoder }); - assert.deepEqual(obj, { a: 'こんにちは!' }); -} diff --git a/query-string/query-string-tests.ts b/query-string/query-string-tests.ts deleted file mode 100644 index c5ec7b624d..0000000000 --- a/query-string/query-string-tests.ts +++ /dev/null @@ -1,34 +0,0 @@ - -import qs = require('query-string'); - - -namespace stringify_tests { - let result: string; - // test obj - result = qs.stringify({ - str: 'bar', - strArray: ['baz'], - num: 123, - numArray: [456], - bool: true, - boolArray: [false], - }); - - // test options - result = qs.stringify({ foo: 'bar' }, { strict: false }) - result = qs.stringify({ foo: 'bar' }, { encode: false }) - result = qs.stringify({ foo: 'bar' }, { strict: false, encode: false }) -} - -namespace parse_tests { - let result: { [key: string]: string | string[] | null }; - result = qs.parse('?foo=bar'); - result = qs.parse('#foo=bar'); - result = qs.parse('&foo=bar&foo=baz'); -} - -namespace extract_tests { - let result: string; - result = qs.extract('http://foo.bar/?abc=def&hij=klm'); - result = qs.extract('http://foo.bar/?foo=bar'); -} diff --git a/react-day-picker/index.d.ts b/react-day-picker/index.d.ts deleted file mode 100644 index 01c5492922..0000000000 --- a/react-day-picker/index.d.ts +++ /dev/null @@ -1,113 +0,0 @@ -// Type definitions for react-day-picker v1.2.0 -// Project: https://github.com/gpbl/react-day-picker -// Definitions by: Giampaolo Bellavite , Jason Killian -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.1 - -/// - -declare module "react-day-picker" { - import DayPicker = ReactDayPicker.DayPicker; - export = DayPicker; -} - -declare var DayPicker: typeof ReactDayPicker.DayPicker; - -declare namespace ReactDayPicker { - interface LocaleUtils { - formatMonthTitle: (month: Date, locale: string) => string; - formatWeekdayShort: (weekday: number, locale: string) => string; - formatWeekdayLong: (weekday: number, locale: string) => string; - getFirstDayOfWeek: (locale: string) => number; - getMonths: (locale: string) => string[]; - } - - interface DayModifiers { - selected?: boolean; - disabled?: boolean; - [name: string]: boolean | undefined; - } - - interface Modifiers { - [name: string]: (date: Date) => boolean; - } - - interface CaptionElementProps extends React.Props { - date?: Date; - localeUtils?: LocaleUtils; - locale?: string; - onClick?: React.MouseEventHandler<{}>; - } - - interface NavbarElementProps extends React.Props { - className?: string; - previousMonth?: Date; - nextMonth?: Date; - showPreviousButton?: boolean; - showNextButton?: boolean; - onPreviousClick(): void; - onNextClick(): void; - dir?: string; - localeUtils?: LocaleUtils; - locale?: string; - - } - - interface WeekdayElementProps extends React.Props { - weekday?: number; - className?: string; - localeUtils?: LocaleUtils; - locale?: string; - } - - interface Props extends React.Props{ - modifiers?: Modifiers; - initialMonth?: Date; - numberOfMonths?: number; - renderDay?: (date: Date) => number | string | JSX.Element; - enableOutsideDays?: boolean; - firstDayOfWeek?:number; - canChangeMonth?: boolean; - disabledDays?: (date: Date) => boolean; - fixedWeeks?: boolean; - fromMonth?: Date; - reverseMonths?: boolean; - toMonth?: Date; - localeUtils?: LocaleUtils; - locale?: string; - captionElement?: React.ReactElement; - onDayClick?: (e: React.SyntheticEvent<{}>, day: Date, modifiers: DayModifiers) => any; - onDayTouchTap?: (e: React.SyntheticEvent<{}>, day: Date, modifiers: DayModifiers) => any; - onDayMouseEnter?: (e: React.SyntheticEvent<{}>, day: Date, modifiers: DayModifiers) => any; - onDayMouseLeave?: (e: React.SyntheticEvent<{}>, day: Date, modifiers: DayModifiers) => any; - onDayTouchEnd?: (e: React.SyntheticEvent<{}>, day: Date, modifiers: DayModifiers) => any; - onDayTouchStart?: (e: React.SyntheticEvent<{}>, day: Date, modifiers: DayModifiers) => any; - navbarElement?: React.ReactElement; - weekdayElement?: React.ReactElement; - onMonthChange?: (month: Date) => any; - onCaptionClick?: (e: React.SyntheticEvent<{}>, month: Date) => any; - className?: string; - selectedDays?: (date: Date) => boolean; - style?: React.CSSProperties; - tabIndex?: number; - } - - class DayPicker extends React.Component { - showMonth(month: Date): void; - showPreviousMonth(): void; - showNextMonth(): void; - } - - namespace DayPicker { - var LocaleUtils: LocaleUtils; - namespace DateUtils { - function addMonths(d: Date, n: number): Date; - function clone(d: Date): Date; - function isSameDay(d1?: Date, d2?: Date): boolean; - function isPastDay(d: Date): boolean; - function isDayBetween(day: Date, startDate: Date, endDate: Date): boolean; - function addDayToRange(day: Date, range: { from?: Date, to?: Date }): { from?: Date, to?: Date }; - function isDayInRange(day: Date, range: { from?: Date, to?: Date }): boolean; - } - } -} diff --git a/react-day-picker/react-day-picker-tests.tsx b/react-day-picker/react-day-picker-tests.tsx deleted file mode 100644 index e8a17b5087..0000000000 --- a/react-day-picker/react-day-picker-tests.tsx +++ /dev/null @@ -1,39 +0,0 @@ -import * as React from 'react'; -import * as DayPicker2 from "react-day-picker"; - -function isSunday(day: Date) { - return day.getDay() === 0; -} - -// make sure global variable version works -function MyComponent2() { - return -} -DayPicker.DateUtils.clone(new Date()); -DayPicker.DateUtils.isDayInRange(new Date(), {from: new Date()}); - -// make sure imported version works -function MyComponent() { - return -} -DayPicker2.DateUtils.clone(new Date()); -DayPicker2.DateUtils.isDayInRange(new Date(), { from: new Date() }); - -// test interface for captionElement prop -interface MyCaptionProps extends ReactDayPicker.CaptionElementProps { } -class Caption extends React.Component { - render() { - const { date, locale, localeUtils, onClick } = this.props; - - if (!date || !localeUtils || typeof locale === 'undefined') { - return null - } - - return ( -
- { localeUtils.formatMonthTitle(date, locale) } -
- ); - } -} -}/> diff --git a/react-native/index.d.ts b/react-native/index.d.ts deleted file mode 100644 index 29dd9fa780..0000000000 --- a/react-native/index.d.ts +++ /dev/null @@ -1,8374 +0,0 @@ -// Type definitions for react-native 0.42 -// Project: https://github.com/facebook/react-native -// Definitions by: Needs A Maintainer -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.1 - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// -// USING: these definitions are meant to be used with the TSC compiler target set to ES6 -// -// USAGE EXAMPLES: check the RNTSExplorer project at https://github.com/bgrieder/RNTSExplorer -// -// CONTRIBUTING: please open pull requests -// -// CREDITS: This work is based on an original work made by Bernd Paradies: https://github.com/bparadie -// -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -import * as React from 'react'; - -export = React; - -//react-native "extends" react -declare module "react" { - export type MeasureOnSuccessCallback = ( - x: number, - y: number, - width: number, - height: number, - pageX: number, - pageY: number - ) => void - - export type MeasureInWindowOnSuccessCallback = ( - x: number, - y: number, - width: number, - height: number - ) => void - - export type MeasureLayoutOnSuccessCallback = ( - left: number, - top: number, - width: number, - height: number - ) => void - - /** - * EventSubscription represents a subscription to a particular event. It can - * remove its own subscription. - */ - interface EventSubscription { - - eventType: string; - key: number; - subscriber: EventSubscriptionVendor; - - /** - * @param {EventSubscriptionVendor} subscriber the subscriber that controls - * this subscription. - */ - new(subscriber: EventSubscriptionVendor): EventSubscription - - /** - * Removes this subscription from the subscriber that controls it. - */ - remove(): void - } - - /** - * EventSubscriptionVendor stores a set of EventSubscriptions that are - * subscribed to a particular event type. - */ - interface EventSubscriptionVendor { - - constructor(): EventSubscriptionVendor - - /** - * Adds a subscription keyed by an event type. - * - * @param {string} eventType - * @param {EventSubscription} subscription - */ - addSubscription(eventType: string, subscription: EventSubscription): EventSubscription - - /** - * Removes a bulk set of the subscriptions. - * - * @param {?string} eventType - Optional name of the event type whose - * registered supscriptions to remove, if null remove all subscriptions. - */ - removeAllSubscriptions(eventType?: string): void - - /** - * Removes a specific subscription. Instead of calling this function, call - * `subscription.remove()` directly. - * - * @param {object} subscription - */ - removeSubscription(subscription: any): void - - /** - * Returns the array of subscriptions that are currently registered for the - * given event type. - * - * Note: This array can be potentially sparse as subscriptions are deleted - * from it when they are removed. - * - * @param {string} eventType - * @returns {?array} - */ - getSubscriptionsForType(eventType: string): EventSubscription[] - } - - /** - * EmitterSubscription represents a subscription with listener and context data. - */ - interface EmitterSubscription extends EventSubscription { - emitter: EventEmitter - listener: () => any - context: any - - /** - * @param {EventEmitter} emitter - The event emitter that registered this - * subscription - * @param {EventSubscriptionVendor} subscriber - The subscriber that controls - * this subscription - * @param {function} listener - Function to invoke when the specified event is - * emitted - * @param {*} context - Optional context object to use when invoking the - * listener - */ - new(emitter: EventEmitter, subscriber: EventSubscriptionVendor, listener: () => any, context: any): EmitterSubscription - - /** - * Removes this subscription from the emitter that registered it. - * Note: we're overriding the `remove()` method of EventSubscription here - * but deliberately not calling `super.remove()` as the responsibility - * for removing the subscription lies with the EventEmitter. - */ - remove(): void - } - - interface EventEmitter { - /** - * @constructor - * - * @param {EventSubscriptionVendor} subscriber - Optional subscriber instance - * to use. If omitted, a new subscriber will be created for the emitter. - */ - new(subscriber?: EventSubscriptionVendor): EventEmitter - - /** - * Adds a listener to be invoked when events of the specified type are - * emitted. An optional calling context may be provided. The data arguments - * emitted will be passed to the listener function. - * - * @param {string} eventType - Name of the event to listen to - * @param {function} listener - Function to invoke when the specified event is - * emitted - * @param {*} context - Optional context object to use when invoking the - * listener - */ - addListener(eventType: string, listener: (...args: any[]) => any, context: any): EmitterSubscription - - /** - * Similar to addListener, except that the listener is removed after it is - * invoked once. - * - * @param {string} eventType - Name of the event to listen to - * @param {function} listener - Function to invoke only once when the - * specified event is emitted - * @param {*} context - Optional context object to use when invoking the - * listener - */ - once(eventType: string, listener: (...args: any[]) => any, context: any): EmitterSubscription - - /** - * Removes all of the registered listeners, including those registered as - * listener maps. - * - * @param {?string} eventType - Optional name of the event whose registered - * listeners to remove - */ - removeAllListeners(eventType?: string): void - - /** - * Provides an API that can be called during an eventing cycle to remove the - * last listener that was invoked. This allows a developer to provide an event - * object that can remove the listener (or listener map) during the - * invocation. - * - * If it is called when not inside of an emitting cycle it will throw. - * - * @throws {Error} When called not during an eventing cycle - * - * @example - * var subscription = emitter.addListenerMap({ - * someEvent: function(data, event) { - * console.log(data); - * emitter.removeCurrentListener(); - * } - * }); - * - * emitter.emit('someEvent', 'abc'); // logs 'abc' - * emitter.emit('someEvent', 'def'); // does not log anything - */ - removeCurrentListener(): void - - /** - * Removes a specific subscription. Called by the `remove()` method of the - * subscription itself to ensure any necessary cleanup is performed. - */ - removeSubscription(subscription: EmitterSubscription): void - - /** - * Returns an array of listeners that are currently registered for the given - * event. - * - * @param {string} eventType - Name of the event to query - * @returns {array} - */ - listeners(eventType: string): EmitterSubscription[] - - /** - * Emits an event of the given type with the given data. All handlers of that - * particular type will be notified. - * - * @param {string} eventType - Name of the event to emit - * @param {...*} Arbitrary arguments to be passed to each registered listener - * - * @example - * emitter.addListener('someEvent', function(message) { - * console.log(message); - * }); - * - * emitter.emit('someEvent', 'abc'); // logs 'abc' - */ - emit(eventType: string): void - - /** - * Removes the given listener for event of specific type. - * - * @param {string} eventType - Name of the event to emit - * @param {function} listener - Function to invoke when the specified event is - * emitted - * - * @example - * emitter.removeListener('someEvent', function(message) { - * console.log(message); - * }); // removes the listener if already registered - * - */ - removeListener(eventType: string, listener: (...args: any[]) => any): void - } - - /** NativeMethodsMixin provides methods to access the underlying native component directly. - * This can be useful in cases when you want to focus a view or measure its on-screen dimensions, - * for example. - * The methods described here are available on most of the default components provided by React Native. - * Note, however, that they are not available on composite components that aren't directly backed by a - * native view. This will generally include most components that you define in your own app. - * For more information, see [Direct Manipulation](http://facebook.github.io/react-native/docs/direct-manipulation.html). - * @see https://github.com/facebook/react-native/blob/master/Libraries/ReactIOS/NativeMethodsMixin.js - */ - export interface NativeMethodsMixinStatic { - /** - * Determines the location on screen, width, and height of the given view and - * returns the values via an async callback. If successful, the callback will - * be called with the following arguments: - * - * - x - * - y - * - width - * - height - * - pageX - * - pageY - * - * Note that these measurements are not available until after the rendering - * has been completed in native. If you need the measurements as soon as - * possible, consider using the [`onLayout` - * prop](docs/view.html#onlayout) instead. - */ - measure(callback: MeasureOnSuccessCallback): void; - - /** - * Determines the location of the given view in the window and returns the - * values via an async callback. If the React root view is embedded in - * another native view, this will give you the absolute coordinates. If - * successful, the callback will be called with the following - * arguments: - * - * - x - * - y - * - width - * - height - * - * Note that these measurements are not available until after the rendering - * has been completed in native. - */ - measureInWindow(callback: MeasureInWindowOnSuccessCallback): void; - - /** - * Like [`measure()`](#measure), but measures the view relative an ancestor, - * specified as `relativeToNativeNode`. This means that the returned x, y - * are relative to the origin x, y of the ancestor view. - * - * As always, to obtain a native node handle for a component, you can use - * `React.findNodeHandle(component)`. - */ - measureLayout( - relativeToNativeNode: number, - onSuccess: MeasureLayoutOnSuccessCallback, - onFail: () => void /* currently unused */ - ): void; - - /** - * This function sends props straight to native. They will not participate in - * future diff process - this means that if you do not include them in the - * next render, they will remain active (see [Direct - * Manipulation](docs/direct-manipulation.html)). - */ - setNativeProps(nativeProps: Object): void; - - /** - * Requests focus for the given input or view. The exact behavior triggered - * will depend on the platform and type of view. - */ - focus(): void; - - /** - * Removes focus from an input or view. This is the opposite of `focus()`. - */ - blur(): void; - - refs: { - [key: string]: Component - }; - } - - // see react-jsx.d.ts - export function createElement

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

; - - - export type Runnable = (appParameters: any) => void; - - - // Similar to React.SyntheticEvent except for nativeEvent - interface NativeSyntheticEvent { - bubbles: boolean - cancelable: boolean - currentTarget: EventTarget - defaultPrevented: boolean - eventPhase: number - isTrusted: boolean - nativeEvent: T - preventDefault(): void - stopPropagation(): void - target: EventTarget - timeStamp: Date - type: string - } - - export interface NativeTouchEvent { - /** - * Array of all touch events that have changed since the last event - */ - changedTouches: NativeTouchEvent[] - - /** - * The ID of the touch - */ - identifier: string - - /** - * The X position of the touch, relative to the element - */ - locationX: number - - /** - * The Y position of the touch, relative to the element - */ - locationY: number - - /** - * The X position of the touch, relative to the screen - */ - pageX: number - - /** - * The Y position of the touch, relative to the screen - */ - pageY: number - - /** - * The node id of the element receiving the touch event - */ - target: string - - /** - * A time identifier for the touch, useful for velocity calculation - */ - timestamp: number - - /** - * Array of all current touches on the screen - */ - touches: NativeTouchEvent[] - } - - export interface GestureResponderEvent extends NativeSyntheticEvent { - } - - - export interface PointProperties { - x: number - y: number - } - - export interface Insets { - top?: number - left?: number - bottom?: number - right?: number - } - - /** - * //FIXME: need to find documentation on which component is a TTouchable and can implement that interface - * @see React.DOMAtributes - */ - export interface Touchable { - onTouchStart?: (event: GestureResponderEvent) => void - onTouchMove?: (event: GestureResponderEvent) => void - onTouchEnd?: (event: GestureResponderEvent) => void - onTouchCancel?: (event: GestureResponderEvent) => void - onTouchEndCapture?: (event: GestureResponderEvent) => void - } - - export type ComponentProvider = () => React.ComponentClass - - export type AppConfig = { - appKey: string; - component?: ComponentProvider - run?: Runnable; - } - - // https://github.com/facebook/react-native/blob/master/Libraries/AppRegistry/AppRegistry.js - /** - * `AppRegistry` is the JS entry point to running all React Native apps. App - * root components should register themselves with - * `AppRegistry.registerComponent`, then the native system can load the bundle - * for the app and then actually run the app when it's ready by invoking - * `AppRegistry.runApplication`. - * - * To "stop" an application when a view should be destroyed, call - * `AppRegistry.unmountApplicationComponentAtRootTag` with the tag that was - * pass into `runApplication`. These should always be used as a pair. - * - * `AppRegistry` should be `require`d early in the `require` sequence to make - * sure the JS execution environment is setup before other modules are - * `require`d. - */ - export class AppRegistry { - static registerConfig(config: AppConfig[]): void; - - static registerComponent( appKey: string, getComponentFunc: ComponentProvider ): string; - - static registerRunnable(appKey: string, func: Runnable): string; - - static getAppKeys(): string[]; - - static unmountApplicationComponentAtRootTag(rootTag: number): void; - - static runApplication(appKey: string, appParameters: any): void; - } - - export interface LayoutAnimationTypes { - spring: string - linear: string - easeInEaseOut: string - easeIn: string - easeOut: string - } - - export interface LayoutAnimationProperties { - opacity: string - scaleXY: string - } - - export interface LayoutAnimationAnim { - duration?: number - delay?: number - springDamping?: number - initialVelocity?: number - type?: string //LayoutAnimationTypes - property?: string //LayoutAnimationProperties - } - - export interface LayoutAnimationConfig { - duration: number - create?: LayoutAnimationAnim - update?: LayoutAnimationAnim - delete?: LayoutAnimationAnim - } - - /** Automatically animates views to their new positions when the next layout happens. - * A common way to use this API is to call LayoutAnimation.configureNext before - * calling setState. */ - export interface LayoutAnimationStatic { - /** Schedules an animation to happen on the next layout. - * @param config Specifies animation properties: - * `duration` in milliseconds - * `create`, config for animating in new views (see Anim type) - * `update`, config for animating views that have been updated (see Anim type) - * @param onAnimationDidEnd Called when the animation finished. Only supported on iOS. - */ - configureNext: ( config: LayoutAnimationConfig, onAnimationDidEnd?: () => void ) => void - /** Helper for creating a config for configureNext. */ - create: (duration: number, type?: string, creationProp?: string) => LayoutAnimationConfig - Types: LayoutAnimationTypes - Properties: LayoutAnimationProperties - configChecker: (shapeTypes: {[key: string]: any}) => any - Presets: { - easeInEaseOut: LayoutAnimationConfig - linear: LayoutAnimationConfig - spring: LayoutAnimationConfig - } - easeInEaseOut: (config: LayoutAnimationConfig, onAnimationDidEnd?: () => void) => void - linear: (config: LayoutAnimationConfig, onAnimationDidEnd?: () => void) => void - spring: (config: LayoutAnimationConfig, onAnimationDidEnd?: () => void) => void - } - - export type FlexAlignType = "flex-start" | "flex-end" | "center" | "stretch"; - export type FlexJustifyType = "flex-start" | "flex-end" | "center" | "space-between" | "space-around"; - export type FlexDirection = "row" | "column" | "row-reverse" | "column-reverse"; - - /** - * Flex Prop Types - * @see https://facebook.github.io/react-native/docs/flexbox.html#proptypes - * @see LayoutPropTypes.js - */ - export interface FlexStyle { - - alignItems?: FlexAlignType; - alignSelf?: "auto" | FlexAlignType; - borderBottomWidth?: number - borderLeftWidth?: number - borderRightWidth?: number - borderTopWidth?: number - borderWidth?: number - bottom?: number - flex?: number - flexGrow?: number - flexShrink?: number - flexBasis?: number - flexDirection?: FlexDirection - flexWrap?: "wrap" | "nowrap" - height?: number - justifyContent?: FlexJustifyType - left?: number - minWidth?: number - maxWidth?: number - minHeight?: number - maxHeight?: number - margin?: number - marginBottom?: number - marginHorizontal?: number - marginLeft?: number - marginRight?: number - marginTop?: number - marginVertical?: number - overflow?: "visible" | "hidden" | "scroll" - padding?: number - paddingBottom?: number - paddingHorizontal?: number - paddingLeft?: number - paddingRight?: number - paddingTop?: number - paddingVertical?: number - position?: "absolute" | "relative" - right?: number - top?: number - width?: number - - /** - * @platform ios - */ - zIndex?: number - } - - /** - * @see ShadowPropTypesIOS.js - */ - export interface ShadowPropTypesIOSStatic { - /** - * Sets the drop shadow color - * @platform ios - */ - shadowColor: string - - /** - * Sets the drop shadow offset - * @platform ios - */ - shadowOffset: { width: number, height: number } - - /** - * Sets the drop shadow opacity (multiplied by the color's alpha component) - * @platform ios - */ - shadowOpacity: number - - /** - * Sets the drop shadow blur radius - * @platform ios - */ - shadowRadius: number - } - - type GetCurrentPositionOptions = { - timeout: number - maximumAge: number - enableHighAccuracy: boolean - distanceFilter: number - } - - type WatchPositionOptions = { - timeout: number - maximumAge: number - enableHighAccuracy: boolean - distanceFilter: number - } - - type GeolocationReturnType = { - coords: { - latitude: number - longitude: number - altitude?: number - accuracy?: number - altitudeAccuracy?: number - heading?: number - speed?: number - } - timestamp: number - } - - interface PerpectiveTransform { - perspective: number; - } - - interface RotateTransform { - rotate: string; - } - - interface RotateXTransform { - rotateX: string; - } - - interface RotateYTransform { - rotateY: string; - } - - interface RotateZTransform { - rotateZ: string; - } - - interface ScaleTransform { - scale: number; - } - - interface ScaleXTransform { - scaleX: number; - } - - interface ScaleYTransform { - scaleY: number; - } - - interface TranslateXTransform { - translateX: number; - } - - interface TranslateYTransform { - translateY: number; - } - - interface SkewXTransform { - skewX: string; - } - - interface SkewYTransform { - skewY: string; - } - - export interface TransformsStyle { - - transform?: (PerpectiveTransform|RotateTransform|RotateXTransform|RotateYTransform|RotateZTransform|ScaleTransform|ScaleXTransform|ScaleYTransform|TranslateXTransform|TranslateYTransform|SkewXTransform|SkewYTransform)[] - transformMatrix?: Array - rotation?: number - scaleX?: number - scaleY?: number - translateX?: number - translateY?: number - } - - - export interface StyleSheetProperties { - hairlineWidth: number - flatten(style: T): T - } - - export interface LayoutRectangle { - x: number; - y: number; - width: number; - height: number; - } - - // @see TextProperties.onLayout - export interface LayoutChangeEvent { - nativeEvent: { - layout: LayoutRectangle - } - } - - export interface TextStyleIOS extends ViewStyle { - letterSpacing?: number - textDecorationColor?: string - textDecorationStyle?: "solid" | "double" | "dotted" | "dashed" - writingDirection?: "auto" | "ltr" | "rtl" - } - - export interface TextStyleAndroid extends ViewStyle { - textAlignVertical?: "auto" | "top" | "bottom" | "center" - includeFontPadding?: boolean - } - - // @see https://facebook.github.io/react-native/docs/text.html#style - export interface TextStyle extends TextStyleIOS, TextStyleAndroid, ViewStyle { - color?: string - fontFamily?: string - fontSize?: number - fontStyle?: "normal" | "italic" - /** - * Specifies font weight. The values 'normal' and 'bold' are supported - * for most fonts. Not all fonts have a variant for each of the numeric - * values, in that case the closest one is chosen. - */ - fontWeight?: "normal" | "bold" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" - letterSpacing?: number - lineHeight?: number - /** - * Specifies text alignment. - * The value 'justify' is only supported on iOS. - */ - textAlign?: "auto" | "left" | "right" | "center" - textDecorationLine?: "none" | "underline" | "line-through" | "underline line-through" - textDecorationStyle?: "solid" | "double" | "dotted" | "dashed" - textDecorationColor?: string - textShadowColor?: string - textShadowOffset?: { width: number, height: number } - textShadowRadius?: number - testID?: string - } - - export interface TextPropertiesIOS { - /** - * Specifies whether fonts should scale to respect Text Size accessibility setting on iOS. The - * default is `true`. - */ - allowFontScaling?: boolean - - /** - * Specifies whether font should be scaled down automatically to fit given style constraints. - */ - adjustsFontSizeToFit?: boolean - - /** - * Specifies smallest possible scale a font can reach when adjustsFontSizeToFit is enabled. (values 0.01-1.0). - */ - minimumFontScale?: number - - /** - * When `true`, no visual change is made when text is pressed down. By - * default, a gray oval highlights the text on press down. - */ - suppressHighlighting?: boolean - } - - export interface TextPropertiesAndroid { - /** - * Lets the user select text, to use the native copy and paste functionality. - */ - selectable?: boolean - } - - // https://facebook.github.io/react-native/docs/text.html#props - export interface TextProperties extends TextPropertiesIOS, TextPropertiesAndroid, React.Props { - - /** - * When set to `true`, indicates that the view is an accessibility element. The default value - * for a `Text` element is `true`. - * - * See the - * [Accessibility guide](/react-native/docs/accessibility.html#accessible-ios-android) - * for more information. - */ - accessible?: boolean - - /** - * This can be one of the following values: - * - * - `head` - The line is displayed so that the end fits in the container and the missing text - * at the beginning of the line is indicated by an ellipsis glyph. e.g., "...wxyz" - * - `middle` - The line is displayed so that the beginning and end fit in the container and the - * missing text in the middle is indicated by an ellipsis glyph. "ab...yz" - * - `tail` - The line is displayed so that the beginning fits in the container and the - * missing text at the end of the line is indicated by an ellipsis glyph. e.g., "abcd..." - * - `clip` - Lines are not drawn past the edge of the text container. - * - * The default is `tail`. - * - * `numberOfLines` must be set in conjunction with this prop. - * - * > `clip` is working only for iOS - */ - ellipsizeMode?: 'head' | 'middle' | 'tail' | 'clip' - - /** - * Line Break mode. Works only with numberOfLines. - * clip is working only for iOS - */ - lineBreakMode?: 'head' | 'middle' | 'tail' | 'clip' - - /** - * Used to truncate the text with an ellipsis after computing the text - * layout, including line wrapping, such that the total number of lines - * does not exceed this number. - * - * This prop is commonly used with `ellipsizeMode`. - */ - numberOfLines?: number - - /** - * Invoked on mount and layout changes with - * - * {nativeEvent: { layout: {x, y, width, height}}}. - */ - onLayout?: (event: LayoutChangeEvent) => void - - /** - * This function is called on press. - * Text intrinsically supports press handling with a default highlight state (which can be disabled with suppressHighlighting). - */ - onPress?: () => void - - /** - * This function is called on long press. - * e.g., `onLongPress={this.increaseSize}>`` - */ - onLongPress?: () => void - - /** - * @see https://facebook.github.io/react-native/docs/text.html#style - */ - style?: TextStyle - - /** - * Used to locate this view in end-to-end tests. - */ - testID?: string - } - - /** - * A React component for displaying text which supports nesting, styling, and touch handling. - */ - export interface TextStatic extends NativeMethodsMixin, React.ClassicComponentClass { - - } - - type DataDetectorTypes = 'phoneNumber' | 'link' | 'address' | 'calendarEvent' | 'none' | 'all'; - - /** - * DocumentSelectionState is responsible for maintaining selection information - * for a document. - * - * It is intended for use by AbstractTextEditor-based components for - * identifying the appropriate start/end positions to modify the - * DocumentContent, and for programatically setting browser selection when - * components re-render. - */ - export interface DocumentSelectionState extends EventEmitter { - new(anchor: number, focus: number): DocumentSelectionState - - /** - * Apply an update to the state. If either offset value has changed, - * set the values and emit the `change` event. Otherwise no-op. - * - * @param {number} anchor - * @param {number} focus - */ - update(anchor: number, focus: number): void - - /** - * Given a max text length, constrain our selection offsets to ensure - * that the selection remains strictly within the text range. - * - * @param {number} maxLength - */ - constrainLength(maxLength: number): void - - focus(): void - blur(): void - hasFocus(): boolean - isCollapsed(): boolean - isBackward(): boolean - - getAnchorOffset(): number - getFocusOffset(): number - getStartOffset(): number - getEndOffset(): number - overlaps(start: number, end: number): boolean - } - - - /** - * IOS Specific properties for TextInput - * @see https://facebook.github.io/react-native/docs/textinput.html#props - */ - export interface TextInputIOSProperties { - - /** - * enum('never', 'while-editing', 'unless-editing', 'always') - * When the clear button should appear on the right side of the text view - */ - clearButtonMode?: 'never' | 'while-editing' | 'unless-editing' | 'always' - - /** - * If true, clears the text field automatically when editing begins - */ - clearTextOnFocus?: boolean - - /** - * Determines the types of data converted to clickable URLs in the text input. - * Only valid if `multiline={true}` and `editable={false}`. - * By default no data types are detected. - * - * You can provide one type or an array of many types. - * - * Possible values for `dataDetectorTypes` are: - * - * - `'phoneNumber'` - * - `'link'` - * - `'address'` - * - `'calendarEvent'` - * - `'none'` - * - `'all'` - */ - dataDetectorTypes?: DataDetectorTypes | DataDetectorTypes[] - - /** - * If true, the keyboard disables the return key when there is no text and automatically enables it when there is text. - * The default value is false. - */ - enablesReturnKeyAutomatically?: boolean - - /** - * Determines the color of the keyboard. - */ - keyboardAppearance?: 'default' | 'light' | 'dark' - - /** - * Callback that is called when a key is pressed. - * Pressed key value is passed as an argument to the callback handler. - * Fires before onChange callbacks. - */ - onKeyPress?: (key: string) => void - - /** - * See DocumentSelectionState.js, some state that is responsible for maintaining selection information for a document - */ - selectionState?: DocumentSelectionState - - - } - - /** - * Android Specific properties for TextInput - * @see https://facebook.github.io/react-native/docs/textinput.html#props - */ - export interface TextInputAndroidProperties { - - /** - * If defined, the provided image resource will be rendered on the left. - */ - inlineImageLeft?: string - - /** - * Padding between the inline image, if any, and the text input itself. - */ - inlineImagePadding?: number - - /** - * Sets the number of lines for a TextInput. - * Use it with multiline set to true to be able to fill the lines. - */ - numberOfLines?: number - - /** - * Sets the return key to the label. Use it instead of `returnKeyType`. - * @platform android - */ - returnKeyLabel?: string - - /** - * The color of the textInput underline. - */ - underlineColorAndroid?: string - } - - export type KeyboardType = "default" | "email-address" | "numeric" | "phone-pad" - export type KeyboardTypeIOS = "ascii-capable" | "numbers-and-punctuation" | "url" | "number-pad" | "name-phone-pad" | "decimal-pad" | "twitter" | "web-search" - - export type ReturnKeyType = "done" | "go" | "next" | "search" | "send" - export type ReturnKeyTypeAndroid = "none" | "previous" - export type ReturnKeyTypeIOS = "default" | "google" | "join" | "route" | "yahoo" | "emergency-call" - - /** - * @see https://facebook.github.io/react-native/docs/textinput.html#props - */ - export interface TextInputProperties extends ViewProperties, TextInputIOSProperties, TextInputAndroidProperties, React.Props { - - /** - * Can tell TextInput to automatically capitalize certain characters. - * characters: all characters, - * words: first letter of each word - * sentences: first letter of each sentence (default) - * none: don't auto capitalize anything - * - * https://facebook.github.io/react-native/docs/textinput.html#autocapitalize - */ - autoCapitalize?: "none" | "sentences" | "words" | "characters" - - /** - * If false, disables auto-correct. - * The default value is true. - */ - autoCorrect?: boolean - - /** - * If true, focuses the input on componentDidMount. - * The default value is false. - */ - autoFocus?: boolean - - /** - * If true, the text field will blur when submitted. - * The default value is true. - */ - blurOnSubmit?: boolean - - /** - * Provides an initial value that will change when the user starts typing. - * Useful for simple use-cases where you don't want to deal with listening to events - * and updating the value prop to keep the controlled state in sync. - */ - defaultValue?: string - - /** - * If false, text is not editable. The default value is true. - */ - editable?: boolean - - /** - * enum("default", 'numeric', 'email-address', "ascii-capable", 'numbers-and-punctuation', 'url', 'number-pad', 'phone-pad', 'name-phone-pad', 'decimal-pad', 'twitter', 'web-search') - * Determines which keyboard to open, e.g.numeric. - * The following values work across platforms: - default - numeric - email-address - phone-pad - */ - keyboardType?: KeyboardType | KeyboardTypeIOS - - /** - * Limits the maximum number of characters that can be entered. - * Use this instead of implementing the logic in JS to avoid flicker. - */ - maxLength?: number - - /** - * If true, the text input can be multiple lines. The default value is false. - */ - multiline?: boolean - - /** - * Callback that is called when the text input is blurred - */ - onBlur?: () => void - - /** - * Callback that is called when the text input's text changes. - */ - onChange?: (event: { nativeEvent: { text: string, contentSize: { width: number, height: number }, target: number, eventCount: number } }) => void - - /** - * Callback that is called when the text input's text changes. - * Changed text is passed as an argument to the callback handler. - */ - onChangeText?: (text: string) => void - - /** - * Callback that is called when the text input's content size changes. - * This will be called with - * `{ nativeEvent: { contentSize: { width, height } } }`. - * - * Only called for multiline text inputs. - */ - onContentSizeChange?: ( event: {nativeEvent: {contentSize: { width: number, height: number}}} ) => void - - /** - * Callback that is called when text input ends. - */ - onEndEditing?: (event: { nativeEvent: { text: string } }) => void - - /** - * Callback that is called when the text input is focused - */ - onFocus?: () => void - - /** - * Callback that is called when the text input selection is changed. - */ - onSelectionChange?: (event: { nativeEvent: { selection: { start: number, end: number }, target: number } }) => void - - /** - * Callback that is called when the text input's submit button is pressed. - */ - onSubmitEditing?: (event: { nativeEvent: { text: string } }) => void - - /** - * The string that will be rendered before text input has been entered - */ - placeholder?: string - - /** - * The text color of the placeholder string - */ - placeholderTextColor?: string - - /** - * enum('default', 'go', 'google', 'join', 'next', 'route', 'search', 'send', 'yahoo', 'done', 'emergency-call') - * Determines how the return key should look. - */ - returnKeyType?: ReturnKeyType | ReturnKeyTypeAndroid | ReturnKeyTypeIOS - - /** - * If true, the text input obscures the text entered so that sensitive text like passwords stay secure. - * The default value is false. - */ - secureTextEntry?: boolean - - /** - * If true, all text will automatically be selected on focus - */ - selectTextOnFocus?: boolean - - /** - * The start and end of the text input's selection. Set start and end to - * the same value to position the cursor. - */ - selection?: { start: number, end?: number } - - /** - * The highlight (and cursor on ios) color of the text input - */ - selectionColor?: string - - /** - * Styles - */ - style?: TextStyle - - /** - * Used to locate this view in end-to-end tests - */ - testID?: string - - /** - * The value to show for the text input. TextInput is a controlled component, - * which means the native value will be forced to match this value prop if provided. - * For most uses this works great, but in some cases this may cause flickering - one common cause is preventing edits by keeping value the same. - * In addition to simply setting the same value, either set editable={false}, - * or set/update maxLength to prevent unwanted edits without flicker. - */ - value?: string - - ref?: Ref - } - - /** - * This class is responsible for coordinating the "focused" - * state for TextInputs. All calls relating to the keyboard - * should be funneled through here - */ - interface TextInputState { - /** - * Returns the ID of the currently focused text field, if one exists - * If no text field is focused it returns null - */ - currentlyFocusedField(): number - - /** - * @param {number} TextInputID id of the text field to focus - * Focuses the specified text field - * noop if the text field was already focused - */ - focusTextInput(textFieldID?: number): void - - /** - * @param {number} textFieldID id of the text field to focus - * Unfocuses the specified text field - * noop if it wasn't focused - */ - blurTextInput(textFieldID?: number) : void - } - - /** - * @see https://facebook.github.io/react-native/docs/textinput.html#methods - */ - export interface TextInputStatic extends NativeMethodsMixin, TimerMixin, React.ComponentClass { - State: TextInputState - - /** - * Returns if the input is currently focused. - */ - isFocused: () => boolean - - /** - * Removes all text from the input. - */ - clear: () => void - } - - export type ToolbarAndroidAction = { - /** - * title: required, the title of this action - */ - title: string - - /** - * icon: the icon for this action, e.g. require('./some_icon.png') - */ - icon?: ImageURISource - - /** - * show: when to show this action as an icon or hide it in the overflow menu: always, ifRoom or never - */ - show?: "always" | "ifRoom" | "never" - - /** - * showWithText: boolean, whether to show text alongside the icon or not - */ - showWithText?: boolean - } - - export interface ToolbarAndroidProperties extends ViewProperties, React.Props { - - /** - * Sets possible actions on the toolbar as part of the action menu. These are displayed as icons - * or text on the right side of the widget. If they don't fit they are placed in an 'overflow' - * menu. - * - * This property takes an array of objects, where each object has the following keys: - * - * * `title`: **required**, the title of this action - * * `icon`: the icon for this action, e.g. `require('./some_icon.png')` - * * `show`: when to show this action as an icon or hide it in the overflow menu: `always`, - * `ifRoom` or `never` - * * `showWithText`: boolean, whether to show text alongside the icon or not - */ - actions?: ToolbarAndroidAction[] - - /** - * Sets the content inset for the toolbar ending edge. - * The content inset affects the valid area for Toolbar content other - * than the navigation button and menu. Insets define the minimum - * margin for these components and can be used to effectively align - * Toolbar content along well-known gridlines. - */ - contentInsetEnd?: number - - /** - * Sets the content inset for the toolbar starting edge. - * The content inset affects the valid area for Toolbar content - * other than the navigation button and menu. Insets define the - * minimum margin for these components and can be used to effectively - * align Toolbar content along well-known gridlines. - */ - contentInsetStart?: number - - /** - * Sets the toolbar logo. - */ - logo?: ImageURISource - - /** - * Sets the navigation icon. - */ - navIcon?: ImageURISource - - /** - * Callback that is called when an action is selected. The only - * argument that is passed to the callback is the position of the - * action in the actions array. - */ - onActionSelected?: (position: number) => void - - /** - * Callback called when the icon is selected. - */ - onIconClicked?: () => void - - /** - * Sets the overflow icon. - */ - overflowIcon?: ImageURISource - - /** - * Used to set the toolbar direction to RTL. - * In addition to this property you need to add - * android:supportsRtl="true" - * to your application AndroidManifest.xml and then call - * setLayoutDirection(LayoutDirection.RTL) in your MainActivity - * onCreate method. - */ - rtl?: boolean - - /** - * Sets the toolbar subtitle. - */ - subtitle?: string - - /** - * Sets the toolbar subtitle color. - */ - subtitleColor?: string - - /** - * Used to locate this view in end-to-end tests. - */ - testID?: string - - /** - * Sets the toolbar title. - */ - title?: string - - /** - * Sets the toolbar title color. - */ - titleColor?: string - - ref?: Ref - } - - /** - * React component that wraps the Android-only [`Toolbar` widget][0]. A Toolbar can display a logo, - * navigation icon (e.g. hamburger menu), a title & subtitle and a list of actions. The title and - * subtitle are expanded so the logo and navigation icons are displayed on the left, title and - * subtitle in the middle and the actions on the right. - * - * If the toolbar has an only child, it will be displayed between the title and actions. - * - * Although the Toolbar supports remote images for the logo, navigation and action icons, this - * should only be used in DEV mode where `require('./some_icon.png')` translates into a packager - * URL. In release mode you should always use a drawable resource for these icons. Using - * `require('./some_icon.png')` will do this automatically for you, so as long as you don't - * explicitly use e.g. `{uri: 'http://...'}`, you will be good. - * - * [0]: https://developer.android.com/reference/android/support/v7/widget/Toolbar.html - */ - export interface ToolbarAndroidStatic extends NativeMethodsMixin, React.ComponentClass { - - } - - - /** - * Gesture recognition on mobile devices is much more complicated than web. - * A touch can go through several phases as the app determines what the user's intention is. - * For example, the app needs to determine if the touch is scrolling, sliding on a widget, or tapping. - * This can even change during the duration of a touch. There can also be multiple simultaneous touches. - * - * The touch responder system is needed to allow components to negotiate these touch interactions - * without any additional knowledge about their parent or child components. - * This system is implemented in ResponderEventPlugin.js, which contains further details and documentation. - * - * Best Practices - * Users can feel huge differences in the usability of web apps vs. native, and this is one of the big causes. - * Every action should have the following attributes: - * Feedback/highlighting- show the user what is handling their touch, and what will happen when they release the gesture - * Cancel-ability- when making an action, the user should be able to abort it mid-touch by dragging their finger away - * - * These features make users more comfortable while using an app, - * because it allows people to experiment and interact without fear of making mistakes. - * - * TouchableHighlight and Touchable* - * The responder system can be complicated to use. - * So we have provided an abstract Touchable implementation for things that should be "tappable". - * This uses the responder system and allows you to easily configure tap interactions declaratively. - * Use TouchableHighlight anywhere where you would use a button or link on web. - */ - export interface GestureResponderHandlers { - - /** - * A view can become the touch responder by implementing the correct negotiation methods. - * There are two methods to ask the view if it wants to become responder: - */ - - /** - * Does this view want to become responder on the start of a touch? - */ - onStartShouldSetResponder?: (event: GestureResponderEvent) => boolean - - /** - * Called for every touch move on the View when it is not the responder: does this view want to "claim" touch responsiveness? - */ - onMoveShouldSetResponder?: (event: GestureResponderEvent) => boolean - - /** - * If the View returns true and attempts to become the responder, one of the following will happen: - */ - - onResponderEnd?: ( event: GestureResponderEvent ) => void - - /** - * The View is now responding for touch events. - * This is the time to highlight and show the user what is happening - */ - onResponderGrant?: (event: GestureResponderEvent) => void - - /** - * Something else is the responder right now and will not release it - */ - onResponderReject?: (event: GestureResponderEvent) => void - - /** - * If the view is responding, the following handlers can be called: - */ - - /** - * The user is moving their finger - */ - onResponderMove?: (event: GestureResponderEvent) => void - - /** - * Fired at the end of the touch, ie "touchUp" - */ - onResponderRelease?: (event: GestureResponderEvent) => void - - onResponderStart?: ( event: GestureResponderEvent ) => void - - /** - * Something else wants to become responder. - * Should this view release the responder? Returning true allows release - */ - onResponderTerminationRequest?: (event: GestureResponderEvent) => boolean - - /** - * The responder has been taken from the View. - * Might be taken by other views after a call to onResponderTerminationRequest, - * or might be taken by the OS without asking (happens with control center/ notification center on iOS) - */ - onResponderTerminate?: (event: GestureResponderEvent) => void - - /** - * onStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, - * where the deepest node is called first. - * That means that the deepest component will become responder when multiple Views return true for *ShouldSetResponder handlers. - * This is desirable in most cases, because it makes sure all controls and buttons are usable. - * - * However, sometimes a parent will want to make sure that it becomes responder. - * This can be handled by using the capture phase. - * Before the responder system bubbles up from the deepest component, - * it will do a capture phase, firing on*ShouldSetResponderCapture. - * So if a parent View wants to prevent the child from becoming responder on a touch start, - * it should have a onStartShouldSetResponderCapture handler which returns true. - */ - onStartShouldSetResponderCapture?: (event: GestureResponderEvent) => boolean - - /** - * onStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, - * where the deepest node is called first. - * That means that the deepest component will become responder when multiple Views return true for *ShouldSetResponder handlers. - * This is desirable in most cases, because it makes sure all controls and buttons are usable. - * - * However, sometimes a parent will want to make sure that it becomes responder. - * This can be handled by using the capture phase. - * Before the responder system bubbles up from the deepest component, - * it will do a capture phase, firing on*ShouldSetResponderCapture. - * So if a parent View wants to prevent the child from becoming responder on a touch start, - * it should have a onStartShouldSetResponderCapture handler which returns true. - */ - onMoveShouldSetResponderCapture?: () => void; - - } - - // @see https://facebook.github.io/react-native/docs/view.html#style - export interface ViewStyle extends FlexStyle, TransformsStyle { - backfaceVisibility?: "visible" | "hidden" - backgroundColor?: string; - borderBottomColor?: string; - borderBottomLeftRadius?: number; - borderBottomRightRadius?: number; - borderBottomWidth?: number; - borderColor?: string; - borderLeftColor?: string; - borderRadius?: number; - borderRightColor?: string; - borderRightWidth?: number; - borderStyle?: "solid" | "dotted" | "dashed" - borderTopColor?: string; - borderTopLeftRadius?: number; - borderTopRightRadius?: number; - borderTopWidth?: number - opacity?: number; - overflow?: "visible" | "hidden" - shadowColor?: string; - shadowOffset?: { width: number, height: number }; - shadowOpacity?: number; - shadowRadius?: number; - elevation?: number; - testID?: string; - } - - - export interface ViewPropertiesIOS { - - /** - * Provides additional traits to screen reader. - * By default no traits are provided unless specified otherwise in element - * - * @enum('none', 'button', 'link', 'header', 'search', 'image', 'selected', 'plays', 'key', 'text','summary', 'disabled', 'frequentUpdates', 'startsMedia', 'adjustable', 'allowsDirectInteraction', 'pageTurn') - */ - accessibilityTraits?: ViewAccessibilityTraits | ViewAccessibilityTraits[]; - - /** - * Whether this view should be rendered as a bitmap before compositing. - * - * On iOS, this is useful for animations and interactions that do not modify this component's dimensions nor its children; - * for example, when translating the position of a static view, rasterization allows the renderer to reuse a cached bitmap of a static view - * and quickly composite it during each frame. - * - * Rasterization incurs an off-screen drawing pass and the bitmap consumes memory. - * Test and measure when using this property. - */ - shouldRasterizeIOS?: boolean - } - - export interface ViewPropertiesAndroid { - - /** - * Indicates to accessibility services to treat UI component like a native one. - * Works for Android only. - * - * @enum('none', 'button', 'radiobutton_checked', 'radiobutton_unchecked' ) - */ - accessibilityComponentType?: 'none' | 'button' | 'radiobutton_checked' | 'radiobutton_unchecked' - - - /** - * Indicates to accessibility services whether the user should be notified when this view changes. - * Works for Android API >= 19 only. - * See http://developer.android.com/reference/android/view/View.html#attr_android:accessibilityLiveRegion for references. - */ - accessibilityLiveRegion?: 'none' | 'polite' | 'assertive' - - /** - * Views that are only used to layout their children or otherwise don't draw anything - * may be automatically removed from the native hierarchy as an optimization. - * Set this property to false to disable this optimization and ensure that this View exists in the native view hierarchy. - */ - collapsable?: boolean - - - /** - * Controls how view is important for accessibility which is if it fires accessibility events - * and if it is reported to accessibility services that query the screen. - * Works for Android only. See http://developer.android.com/reference/android/R.attr.html#importantForAccessibility for references. - * - * Possible values: - * 'auto' - The system determines whether the view is important for accessibility - default (recommended). - * 'yes' - The view is important for accessibility. - * 'no' - The view is not important for accessibility. - * 'no-hide-descendants' - The view is not important for accessibility, nor are any of its descendant views. - */ - importantForAccessibility?: 'auto' | 'yes' | 'no' | 'no-hide-descendants' - - - /** - * Whether this view needs to rendered offscreen and composited with an alpha in order to preserve 100% correct colors and blending behavior. - * The default (false) falls back to drawing the component and its children - * with an alpha applied to the paint used to draw each element instead of rendering the full component offscreen and compositing it back with an alpha value. - * This default may be noticeable and undesired in the case where the View you are setting an opacity on - * has multiple overlapping elements (e.g. multiple overlapping Views, or text and a background). - * - * Rendering offscreen to preserve correct alpha behavior is extremely expensive - * and hard to debug for non-native developers, which is why it is not turned on by default. - * If you do need to enable this property for an animation, - * consider combining it with renderToHardwareTextureAndroid if the view contents are static (i.e. it doesn't need to be redrawn each frame). - * If that property is enabled, this View will be rendered off-screen once, - * saved in a hardware texture, and then composited onto the screen with an alpha each frame without having to switch rendering targets on the GPU. - */ - needsOffscreenAlphaCompositing?: boolean - - - /** - * Whether this view should render itself (and all of its children) into a single hardware texture on the GPU. - * - * On Android, this is useful for animations and interactions that only modify opacity, rotation, translation, and/or scale: - * in those cases, the view doesn't have to be redrawn and display lists don't need to be re-executed. The texture can just be - * re-used and re-composited with different parameters. The downside is that this can use up limited video memory, so this prop should be set back to false at the end of the interaction/animation. - */ - renderToHardwareTextureAndroid?: boolean; - - } - - /** - * @see https://facebook.github.io/react-native/docs/view.html#props - */ - export interface ViewProperties extends ViewPropertiesAndroid, ViewPropertiesIOS, GestureResponderHandlers, Touchable, React.Props { - - /** - * Overrides the text that's read by the screen reader when the user interacts with the element. By default, the label is constructed by traversing all the children and accumulating all the Text nodes separated by space. - */ - accessibilityLabel?: string; - - /** - * When true, indicates that the view is an accessibility element. - * By default, all the touchable elements are accessible. - */ - accessible?: boolean; - - /** - * This defines how far a touch event can start away from the view. - * Typical interface guidelines recommend touch targets that are at least - * 30 - 40 points/density-independent pixels. If a Touchable view has - * a height of 20 the touchable height can be extended to 40 with - * hitSlop={{top: 10, bottom: 10, left: 0, right: 0}} - * NOTE The touch area never extends past the parent view bounds and - * the Z-index of sibling views always takes precedence if a touch - * hits two overlapping views. - */ - - hitSlop?: Insets - - /** - * When `accessible` is true, the system will try to invoke this function when the user performs accessibility tap gesture. - */ - onAcccessibilityTap?: () => void; - - /** - * Invoked on mount and layout changes with - * - * {nativeEvent: { layout: {x, y, width, height}}}. - */ - onLayout?: (event: LayoutChangeEvent) => void; - - /** - * When accessible is true, the system will invoke this function when the user performs the magic tap gesture. - */ - onMagicTap?: () => void; - - /** - * - * In the absence of auto property, none is much like CSS's none value. box-none is as if you had applied the CSS class: - * - * .box-none { - * pointer-events: none; - * } - * .box-none * { - * pointer-events: all; - * } - * - * box-only is the equivalent of - * - * .box-only { - * pointer-events: all; - * } - * .box-only * { - * pointer-events: none; - * } - * - * But since pointerEvents does not affect layout/appearance, and we are already deviating from the spec by adding additional modes, - * we opt to not include pointerEvents on style. On some platforms, we would need to implement it as a className anyways. Using style or not is an implementation detail of the platform. - */ - pointerEvents?: "box-none" | "none" | "box-only" | "auto" - - /** - * - * This is a special performance property exposed by RCTView and is useful for scrolling content when there are many subviews, - * most of which are offscreen. For this property to be effective, it must be applied to a view that contains many subviews that extend outside its bound. - * The subviews must also have overflow: hidden, as should the containing view (or one of its superviews). - */ - removeClippedSubviews?: boolean - - style?: ViewStyle; - - /** - * Used to locate this view in end-to-end tests. - */ - testID?: string; - } - - /** - * The most fundamental component for building UI, View is a container that supports layout with flexbox, style, some touch handling, - * and accessibility controls, and is designed to be nested inside other views and to have 0 to many children of any type. - * View maps directly to the native view equivalent on whatever platform React is running on, - * whether that is a UIView,

, android.view, etc. - */ - export interface ViewStatic extends NativeMethodsMixin, React.ClassicComponentClass { - AccessibilityTraits: [ - 'none', - 'button', - 'link', - 'header', - 'search', - 'image', - 'selected', - 'plays', - 'key', - 'text', - 'summary', - 'disabled', - 'frequentUpdates', - 'startsMedia', - 'adjustable', - 'allowsDirectInteraction', - 'pageTurn' - ] - - AccessibilityComponentType: [ - 'none', - 'button', - 'radiobutton_checked', - 'radiobutton_unchecked' - ], - - /** - * Is 3D Touch / Force Touch available (i.e. will touch events include `force`) - * @platform ios - */ - forceTouchAvailable: boolean, - } - - /** - * @see https://facebook.github.io/react-native/docs/viewpagerandroid.html#props - */ - - - export interface ViewPagerAndroidOnPageScrollEventData { - position: number; - offset: number; - } - - export interface ViewPagerAndroidOnPageSelectedEventData { - position: number; - } - - export interface ViewPagerAndroidProperties extends ViewProperties { - /** - * Index of initial page that should be selected. Use `setPage` method to - * update the page, and `onPageSelected` to monitor page changes - */ - initialPage?: number; - - /** - * When false, the content does not scroll. - * The default value is true. - */ - scrollEnabled?: boolean; - - /** - * Executed when transitioning between pages (ether because of animation for - * the requested page change or when user is swiping/dragging between pages) - * The `event.nativeEvent` object for this callback will carry following data: - * - position - index of first page from the left that is currently visible - * - offset - value from range [0,1) describing stage between page transitions. - * Value x means that (1 - x) fraction of the page at "position" index is - * visible, and x fraction of the next page is visible. - */ - onPageScroll?: (event: NativeSyntheticEvent) => void; - - /** - * This callback will be called once ViewPager finish navigating to selected page - * (when user swipes between pages). The `event.nativeEvent` object passed to this - * callback will have following fields: - * - position - index of page that has been selected - */ - onPageSelected?: (event: NativeSyntheticEvent) => void; - - /** - * Function called when the page scrolling state has changed. - * The page scrolling state can be in 3 states: - * - idle, meaning there is no interaction with the page scroller happening at the time - * - dragging, meaning there is currently an interaction with the page scroller - * - settling, meaning that there was an interaction with the page scroller, and the - * page scroller is now finishing it's closing or opening animation - */ - onPageScrollStateChanged?: (state: "Idle" | "Dragging" | "Settling") => void - - /** - * Determines whether the keyboard gets dismissed in response to a drag. - * - 'none' (the default), drags do not dismiss the keyboard. - * - 'on-drag', the keyboard is dismissed when a drag begins. - */ - keyboardDismissMode?: "none" | "on-drag" - - /** - * Blank space to show between pages. This is only visible while scrolling, pages are still - * edge-to-edge. - */ - pageMargin?: number - } - - export interface ViewPagerAndroidStatic extends NativeMethodsMixin, React.ComponentClass { - /** - * A helper function to scroll to a specific page in the ViewPager. - * The transition between pages will be animated. - */ - setPage(selectedPage: number): void - - /** - * A helper function to scroll to a specific page in the ViewPager. - * The transition between pages will *not* be animated. - */ - setPageWithoutAnimation(selectedPage: number): void - } - - /** - * It is a component to solve the common problem of views that need to move out of the way of the virtual keyboard. - * It can automatically adjust either its position or bottom padding based on the position of the keyboard. - */ - export interface KeyboardAvoidingViewStatic extends TimerMixin, React.ClassicComponentClass { - - } - - export interface KeyboardAvoidingViewProps extends ViewProperties, React.Props { - - behavior?: 'height' | 'position' | 'padding' - - /** - * The style of the content container(View) when behavior is 'position'. - */ - contentContainerStyle?: ViewStyle - - /** - * This is the distance between the top of the user screen and the react native view, - * may be non-zero in some use cases. - */ - keyboardVerticalOffset?: number - - ref?: Ref - } - - /** - * //FIXME: No documentation extracted from code comment on WebView.ios.js - */ - export interface NavState { - - url?: string - title?: string - loading?: boolean - canGoBack?: boolean - canGoForward?: boolean; - - [key: string]: any - } - - /** - * Passed data from WebView via window.postMessage. - */ - export interface WebViewMessageEventData { - /** - * The data sent from a WebView; can only be a string. - */ - data: string - } - - export interface WebViewPropertiesAndroid { - - /** - * Used for android only, JS is enabled by default for WebView on iOS - */ - javaScriptEnabled?: boolean - - /** - * Used on Android only, controls whether DOM Storage is enabled - * or not android - */ - domStorageEnabled?: boolean, - - /** - * Sets the user-agent for the WebView. - */ - userAgent?: string - } - - export interface WebViewIOSLoadRequestEvent { - target: number - canGoBack: boolean - lockIdentifier: number - loading: boolean - title: string - canGoForward: boolean - navigationType: 'other' | 'click' - url: string - } - - export interface WebViewPropertiesIOS { - - /** - * Determines whether HTML5 videos play inline or use the native - * full-screen controller. default value false - * NOTE : "In order * for video to play inline, not only does - * this property need to be set to true, but the video element - * in the HTML document must also include the webkit-playsinline - * attribute." - */ - allowsInlineMediaPlayback?: boolean - - /** - * Boolean value that determines whether the web view bounces - * when it reaches the edge of the content. The default value is `true`. - * @platform ios - */ - bounces?: boolean - - /** - * A floating-point number that determines how quickly the scroll - * view decelerates after the user lifts their finger. You may also - * use string shortcuts "normal" and "fast" which match the - * underlying iOS settings for UIScrollViewDecelerationRateNormal - * and UIScrollViewDecelerationRateFast respectively. - * - normal: 0.998 - fast: 0.99 (the default for iOS WebView) - */ - decelerationRate?: "normal" | "fast" | number - - /** - * Allows custom handling of any webview requests by a JS handler. - * Return true or false from this method to continue loading the - * request. - */ - onShouldStartLoadWithRequest?: (event: WebViewIOSLoadRequestEvent) => boolean - - /** - * Boolean value that determines whether scrolling is enabled in the - * `WebView`. The default value is `true`. - */ - scrollEnabled?: boolean - } - - export interface WebViewUriSource { - - /* - * The URI to load in the WebView. Can be a local or remote file. - */ - uri?: string; - - /* - * The HTTP Method to use. Defaults to GET if not specified. - * NOTE: On Android, only GET and POST are supported. - */ - method?: string; - - /* - * Additional HTTP headers to send with the request. - * NOTE: On Android, this can only be used with GET requests. - */ - headers?: any; - - /* - * The HTTP body to send with the request. This must be a valid - * UTF-8 string, and will be sent exactly as specified, with no - * additional encoding (e.g. URL-escaping or base64) applied. - * NOTE: On Android, this can only be used with POST requests. - */ - body?: string; - } - - export interface WebViewHtmlSource { - - /* - * A static HTML page to display in the WebView. - */ - html: string; - - /* - * The base URL to be used for any relative links in the HTML. - */ - baseUrl?: string; - } - - /** - * @see https://facebook.github.io/react-native/docs/webview.html#props - */ - export interface WebViewProperties extends ViewProperties, WebViewPropertiesAndroid, WebViewPropertiesIOS, React.Props { - - /** - * Controls whether to adjust the content inset for web views that are - * placed behind a navigation bar, tab bar, or toolbar. The default value - * is `true`. - */ - automaticallyAdjustContentInsets?: boolean - - /** - * The amount by which the web view content is inset from the edges of - * the scroll view. Defaults to {top: 0, left: 0, bottom: 0, right: 0}. - */ - contentInset?: Insets - - /** - * @deprecated - */ - html?: string - - /** - * Set this to provide JavaScript that will be injected into the web page - * when the view loads. - */ - injectedJavaScript?: string - - /** - * Invoked when load fails - */ - onError?: (event: NavState) => void - - /** - * Invoked when load finish - */ - onLoad?: (event: NavState) => void - - /** - * Invoked when load either succeeds or fails - */ - onLoadEnd?: (event: NavState) => void - - /** - * Invoked on load start - */ - onLoadStart?: (event: NavState) => void - - /** - * Invoked when window.postMessage is called from WebView. - */ - onMessage?: ( event: NativeSyntheticEvent ) => void - - /** - * Function that is invoked when the `WebView` loading starts or ends. - */ - onNavigationStateChange?: ( event: NavState ) => void - - /** - * Function that returns a view to show if there's an error. - */ - renderError?: () => React.ReactElement - - /** - * Function that returns a loading indicator. - */ - renderLoading?: () => React.ReactElement - - /** - * Boolean value that forces the `WebView` to show the loading view - * on the first load. - */ - startInLoadingState?: boolean - - style?: ViewStyle - - // Deprecated: Use the `source` prop instead. - url?: string - - source?: WebViewUriSource | WebViewHtmlSource | number - - /** - * Determines whether HTML5 audio & videos require the user to tap - * before they can start playing. The default value is false. - */ - mediaPlaybackRequiresUserAction?: boolean - - /** - * sets whether the webpage scales to fit the view and the user can change the scale - */ - scalesPageToFit?: boolean - - ref?: Ref - } - - - export interface WebViewStatic extends React.ClassicComponentClass { - - /** - * Go back one page in the webview's history. - */ - goBack: () => void - - /** - * Go forward one page in the webview's history. - */ - goForward: () => void - - /** - * Post a message to the WebView in the form of a string. - */ - postMessage: (message: string) => void - - /** - * Reloads the current page. - */ - reload: () => void - - /** - * Stop loading the current page. - */ - stopLoading(): void - - /** - * Returns the native webview node. - */ - getWebViewHandle: () => any - } - - - /** - * @see https://facebook.github.io/react-native/docs/segmentedcontrolios.html - * @see SegmentedControlIOS.ios.js - */ - export interface NativeSegmentedControlIOSChangeEvent { - value: string - selectedSegmentIndex: number - target: number - } - - export interface SegmentedControlIOSProperties extends ViewProperties, React.Props { - - /** - * If false the user won't be able to interact with the control. Default value is true. - */ - enabled?: boolean - - /** - * If true, then selecting a segment won't persist visually. - * The onValueChange callback will still work as expected. - */ - momentary?: boolean - - /** - * Callback that is called when the user taps a segment; - * passes the event as an argument - * @param event - */ - onChange?: (event: NativeSyntheticEvent) => void - - /** - * Callback that is called when the user taps a segment; passes the segment's value as an argument - * @param value - */ - onValueChange?: (value: string) => void - - /** - * The index in props.values of the segment to be (pre)selected. - */ - selectedIndex?: number - - /** - * Accent color of the control. - */ - tintColor?: string - - /** - * The labels for the control's segment buttons, in order. - */ - values?: string[] - - ref?: Ref - } - - /** - * Use `SegmentedControlIOS` to render a UISegmentedControl iOS. - * - * #### Programmatically changing selected index - * - * The selected index can be changed on the fly by assigning the - * selectIndex prop to a state variable, then changing that variable. - * Note that the state variable would need to be updated as the user - * selects a value and changes the index, as shown in the example below. - * - * ```` - * { - * this.setState({selectedIndex: event.nativeEvent.selectedSegmentIndex}); - * }} - * /> - * ```` - */ - export interface SegmentedControlIOSStatic extends NativeMethodsMixin, React.ClassicComponentClass { - - } - - - export interface NavigatorIOSProperties extends React.Props { - /** - * The default background color of the navigation bar. - */ - barTintColor?: string - - /** - * NavigatorIOS uses "route" objects to identify child views, their props, and navigation bar configuration. - * "push" and all the other navigation operations expect routes to be like this - */ - initialRoute: Route - - /** - * The default wrapper style for components in the navigator. - * A common use case is to set the backgroundColor for every page - */ - itemWrapperStyle?: ViewStyle - - /** - * Boolean value that indicates whether the interactive pop gesture is - * enabled. This is useful for enabling/disabling the back swipe navigation - * gesture. - * - * If this prop is not provided, the default behavior is for the back swipe - * gesture to be enabled when the navigation bar is shown and disabled when - * the navigation bar is hidden. Once you've provided the - * `interactivePopGestureEnabled` prop, you can never restore the default - * behavior. - */ - interactivePopGestureEnabled?: boolean - - /** - * A Boolean value that indicates whether the navigation bar is hidden - */ - navigationBarHidden?: boolean - - /** - * A Boolean value that indicates whether to hide the 1px hairline shadow - */ - shadowHidden?: boolean - - /** - * The color used for buttons in the navigation bar - */ - tintColor?: string - - /** - * The text color of the navigation bar title - */ - titleTextColor?: string - - /** - * A Boolean value that indicates whether the navigation bar is translucent - */ - translucent?: boolean - - /** - * NOT IN THE DOC BUT IN THE EXAMPLES - */ - style?: ViewStyle - } - - /** - * A navigator is an object of navigation functions that a view can call. - * It is passed as a prop to any component rendered by NavigatorIOS. - * - * Navigator functions are also available on the NavigatorIOS component: - * - * @see https://facebook.github.io/react-native/docs/navigatorios.html#navigator - */ - export interface NavigationIOS { - /** - * Navigate forward to a new route - */ - push: (route: Route) => void - - /** - * Go back one page - */ - pop: () => void - - /** - * Go back N pages at once. When N=1, behavior matches pop() - */ - popN: (n: number) => void - - /** - * Replace the route for the current page and immediately load the view for the new route - */ - replace: (route: Route) => void - - /** - * Replace the route/view for the previous page - */ - replacePrevious: (route: Route) => void - - /** - * Replaces the previous route/view and transitions back to it - */ - replacePreviousAndPop: (route: Route) => void - - /** - * Replaces the top item and popToTop - */ - resetTo: (route: Route) => void - - /** - * Go back to the item for a particular route object - */ - popToRoute(route: Route): void - - /** - * Go back to the top item - */ - popToTop(): void - } - - export interface NavigatorIOSStatic extends NavigationIOS, React.ComponentClass { - } - - - /** - * @see https://facebook.github.io/react-native/docs/activityindicator.html#props - */ - export interface ActivityIndicatorProperties extends ViewProperties, React.Props { - - /** - * Whether to show the indicator (true, the default) or hide it (false). - */ - animating?: boolean - - /** - * The foreground color of the spinner (default is gray). - */ - color?: string - - /** - * Whether the indicator should hide when not animating (true by default). - */ - hidesWhenStopped?: boolean - - /** - * Size of the indicator. - * Small has a height of 20, large has a height of 36. - * - * enum('small', 'large') - */ - size?: number | 'small' | 'large' - - style?: ViewStyle - - ref?: Ref - } - - export interface ActivityIndicatorStatic extends React.NativeMethodsMixin, React.ClassicComponentClass { - } - - - /** - * @see https://facebook.github.io/react-native/docs/activityindicatorios.html#props - */ - export interface ActivityIndicatorIOSProperties extends ViewProperties, React.Props { - - /** - * Whether to show the indicator (true, the default) or hide it (false). - */ - animating?: boolean - - /** - * The foreground color of the spinner (default is gray). - */ - color?: string - - /** - * Whether the indicator should hide when not animating (true by default). - */ - hidesWhenStopped?: boolean - - /** - * Invoked on mount and layout changes with - */ - onLayout?: (event: { nativeEvent: { layout: { x: number, y: number, width: number, height: number } } }) => void - - /** - * Size of the indicator. - * Small has a height of 20, large has a height of 36. - * - * enum('small', 'large') - */ - size?: 'small' | 'large' - - style?: ViewStyle - - ref?: Ref - } - - /** - * @Deprecated since version 0.28.0 - */ - export interface ActivityIndicatorIOSStatic extends React.ComponentClass { - } - - - export interface DatePickerIOSProperties extends ViewProperties, React.Props { - - /** - * The currently selected date. - */ - date: Date - - - /** - * Maximum date. - * Restricts the range of possible date/time values. - */ - maximumDate?: Date - - /** - * Maximum date. - * Restricts the range of possible date/time values. - */ - minimumDate?: Date - - /** - * enum(1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30) - * The interval at which minutes can be selected. - */ - minuteInterval?: number - - /** - * enum('date', 'time', 'datetime') - * The date picker mode. - */ - mode?: "date" | "time" | "datetime" - - /** - * Date change handler. - * This is called when the user changes the date or time in the UI. - * The first and only argument is a Date object representing the new date and time. - */ - onDateChange: ( newDate: Date ) => void - - /** - * Timezone offset in minutes. - * By default, the date picker will use the device's timezone. With this parameter, it is possible to force a certain timezone offset. - * For instance, to show times in Pacific Standard Time, pass -7 * 60. - */ - timeZoneOffsetInMinutes?: number - - ref?: Ref - } - - export interface DatePickerIOSStatic extends React.NativeMethodsMixin, React.ComponentClass { - } - - export interface DrawerSlideEvent extends NativeSyntheticEvent { - } - - /** - * @see DrawerLayoutAndroid.android.js - */ - export interface DrawerLayoutAndroidProperties extends ViewProperties, React.Props { - - /** - * Specifies the background color of the drawer. The default value - * is white. If you want to set the opacity of the drawer, use rgba. - * Example: - * return ( - * - * - *); - */ - drawerBackgroundColor?: string; - - /** - * Specifies the lock mode of the drawer. The drawer can be locked - * in 3 states: - * - * - unlocked (default), meaning that the drawer will respond - * (open/close) to touch gestures. - * - * - locked-closed, meaning that the drawer will stay closed and not - * respond to gestures. - * - * - locked-open, meaning that the drawer will stay opened and - * not respond to gestures. The drawer may still be opened and - * closed programmatically (openDrawer/closeDrawer). - */ - drawerLockMode?: "unlocked" | "locked-closed" | "locked-open"; - - /** - * Specifies the side of the screen from which the drawer will slide in. - * enum(DrawerLayoutAndroid.positions.Left, DrawerLayoutAndroid.positions.Right) - */ - drawerPosition?: number; - - /** - * Specifies the width of the drawer, more precisely the width of the - * view that be pulled in from the edge of the window. - */ - drawerWidth?: number; - - /** - * Determines whether the keyboard gets dismissed in response to a drag. - * - 'none' (the default), drags do not dismiss the keyboard. - * - 'on-drag', the keyboard is dismissed when a drag begins. - */ - keyboardDismissMode?: "none" | "on-drag" - - /** - * Function called whenever the navigation view has been closed. - */ - onDrawerClose?: () => void - - /** - * Function called whenever the navigation view has been opened. - */ - onDrawerOpen?: () => void - - /** - * Function called whenever there is an interaction with the navigation view. - * @param event - */ - onDrawerSlide?: (event: DrawerSlideEvent) => void - - /** - * Function called when the drawer state has changed. - * The drawer can be in 3 states: - * - idle, meaning there is no interaction with the navigation - * view happening at the time - * - dragging, meaning there is currently an interaction with the - * navigation view - * - settling, meaning that there was an interaction with the - * navigation view, and the navigation view is now finishing - * it's closing or opening animation - * @param event - */ - onDrawerStateChanged?: (event: "Idle" | "Dragging" | "Settling") => void - - /** - * The navigation view that will be rendered to the side of the - * screen and can be pulled in. - */ - renderNavigationView: () => JSX.Element - - /** - * Make the drawer take the entire screen and draw the background of - * the status bar to allow it to open over the status bar. It will - * only have an effect on API 21+. - */ - statusBarBackgroundColor?: string - - ref?: Ref - } - - interface DrawerPosition { - Left: number - Right: number - } - - export interface DrawerLayoutAndroidStatic extends NativeMethodsMixin, React.ClassicComponentClass { - - /** - * drawer's positions. - */ - positions: DrawerPosition - - /** - * Opens the drawer. - */ - openDrawer(): void - - /** - * Closes the drawer. - */ - closeDrawer(): void - } - - - /** - * @see PickerIOS.ios.js - */ - export interface PickerIOSItemProperties extends React.Props { - value?: string | number - label?: string - } - - /** - * @see PickerIOS.ios.js - */ - export interface PickerIOSItemStatic extends React.ComponentClass { - } - - /** - * @see Picker.js - */ - export interface PickerItemProperties extends React.Props { - label: string - value?: any - } - - export interface PickerItemStatic extends React.ComponentClass { - } - - export interface PickerPropertiesIOS extends ViewProperties, React.Props { - - /** - * Style to apply to each of the item labels. - * @platform ios - */ - itemStyle?: ViewStyle, - - ref?: Ref - } - - export interface PickerPropertiesAndroid extends ViewProperties, React.Props { - - /** - * If set to false, the picker will be disabled, i.e. the user will not be able to make a - * selection. - * @platform android - */ - enabled?: boolean - - /** - * On Android, specifies how to display the selection items when the user taps on the picker: - * - * - 'dialog': Show a modal dialog. This is the default. - * - 'dropdown': Shows a dropdown anchored to the picker view - * - * @platform android - */ - mode?: "dialog" | "dropdown" - - /** - * Prompt string for this picker, used on Android in dialog mode as the title of the dialog. - * @platform android - */ - prompt?: string - - ref?: Ref - } - - /** - * @see https://facebook.github.io/react-native/docs/picker.html - * @see Picker.js - */ - export interface PickerProperties extends PickerPropertiesIOS, PickerPropertiesAndroid, React.Props { - - /** - * Callback for when an item is selected. This is called with the - * following parameters: - * - itemValue: the value prop of the item that was selected - * - itemPosition: the index of the selected item in this picker - * @param itemValue - * @param itemPosition - */ - onValueChange?: (itemValue: any, itemPosition: number) => void - - /** - * Value matching value of one of the items. - * Can be a string or an integer. - */ - selectedValue?: any - - style?: ViewStyle - - /** - * Used to locate this view in end-to-end tests. - */ - testId?: string - - ref?: Ref - } - - /** - * @see https://facebook.github.io/react-native/docs/picker.html - * @see Picker.js - */ - export interface PickerStatic extends React.ComponentClass { - - /** - * On Android, display the options in a dialog. - */ - MODE_DIALOG: string - /** - * On Android, display the options in a dropdown (this is the default). - */ - MODE_DROPDOWN: string - - Item?: PickerItemStatic - } - - /** - * @see https://facebook.github.io/react-native/docs/pickerios.html - * @see PickerIOS.ios.js - */ - export interface PickerIOSProperties extends ViewProperties, React.Props { - - itemStyle?: TextStyle - onValueChange?: ( value: string | number ) => void - selectedValue?: string | number - - ref?: Ref - } - - /** - * @see https://facebook.github.io/react-native/docs/pickerios.html - * @see PickerIOS.ios.js - */ - export interface PickerIOSStatic extends NativeMethodsMixin, React.ClassicComponentClass { - - Item: PickerIOSItemStatic - } - - /** - * @see https://facebook.github.io/react-native/docs/progressbarandroid.html - * @see ProgressBarAndroid.android.js - */ - export interface ProgressBarAndroidProperties extends ViewProperties, React.Props { - - /** - * Style of the ProgressBar. One of: - Horizontal - Normal (default) - Small - Large - Inverse - SmallInverse - LargeInverse - */ - styleAttr?: "Horizontal" | "Normal" | "Small" | "Large" | "Inverse" | "SmallInverse" | "LargeInverse" - - /** - * If the progress bar will show indeterminate progress. - * Note that this can only be false if styleAttr is Horizontal. - */ - indeterminate?: boolean - - /** - * The progress value (between 0 and 1). - */ - progress?: number - - /** - * Color of the progress bar. - */ - color?: string - - /** - * Used to locate this view in end-to-end tests. - */ - testID?: string - - ref?: Ref - } - /** - * React component that wraps the Android-only `ProgressBar`. This component is used to indicate - * that the app is loading or there is some activity in the app. - */ - export interface ProgressBarAndroidStatic extends NativeMethodsMixin, React.ClassicComponentClass { - } - - /** - * @see https://facebook.github.io/react-native/docs/progressviewios.html - * @see ProgressViewIOS.ios.js - */ - export interface ProgressViewIOSProperties extends ViewProperties, React.Props { - - /** - * The progress bar style. - */ - progressViewStyle?: "default" | "bar" - - /** - * The progress value (between 0 and 1). - */ - progress?: number - - /** - * The tint color of the progress bar itself. - */ - progressTintColor?: string - - /** - * The tint color of the progress bar track. - */ - trackTintColor?: string - - /** - * A stretchable image to display as the progress bar. - */ - progressImage?: ImageURISource | ImageURISource[] - - /** - * A stretchable image to display behind the progress bar. - */ - trackImage?: ImageURISource | ImageURISource[] - - ref?: Ref - } - export interface ProgressViewIOSStatic extends NativeMethodsMixin, React.ClassicComponentClass { - } - - export interface RefreshControlPropertiesIOS extends ViewProperties, React.Props { - - /** - * The color of the refresh indicator. - */ - tintColor?: string - - /** - * The title displayed under the refresh indicator. - */ - title?: string - - /** - * Title color. - */ - titleColor?: string - - ref?: Ref - } - - export interface RefreshControlPropertiesAndroid extends ViewProperties, React.Props { - - /** - * The colors (at least one) that will be used to draw the refresh indicator. - */ - colors?: string[] - - /** - * Whether the pull to refresh functionality is enabled. - */ - enabled?: boolean - - /** - * The background color of the refresh indicator. - */ - progressBackgroundColor?: string - - /** - * Size of the refresh indicator, see RefreshControl.SIZE. - */ - size?: number - - /** - * Progress view top offset - * @platform android - */ - progressViewOffset?: number - - ref?: Ref - } - - export interface RefreshControlProperties extends RefreshControlPropertiesIOS, RefreshControlPropertiesAndroid, React.Props { - - /** - * Called when the view starts refreshing. - */ - onRefresh?: () => void - - /** - * Whether the view should be indicating an active refresh. - */ - refreshing: boolean - - ref?: Ref - } - - /** - * This component is used inside a ScrollView or ListView to add pull to refresh - * functionality. When the ScrollView is at `scrollY: 0`, swiping down - * triggers an `onRefresh` event. - * - * __Note:__ `refreshing` is a controlled prop, this is why it needs to be set to true - * in the `onRefresh` function otherwise the refresh indicator will stop immediately. - */ - export interface RefreshControlStatic extends NativeMethodsMixin, React.ClassicComponentClass { - SIZE: Object // Undocumented - } - - export interface RecyclerViewBackedScrollViewProperties extends ScrollViewProperties, React.Props { - ref?: Ref - } - - /** - * Wrapper around android native recycler view. - * - * It simply renders rows passed as children in a separate recycler view cells - * similarly to how `ScrollView` is doing it. Thanks to the fact that it uses - * native `RecyclerView` though, rows that are out of sight are going to be - * automatically detached (similarly on how this would work with - * `removeClippedSubviews = true` on a `ScrollView.js`). - * - * CAUTION: This is an experimental component and should only be used together - * with javascript implementation of list view (see ListView.js). In order to - * use it pass this component as `renderScrollComponent` to the list view. For - * now only horizontal scrolling is supported. - */ - export interface RecyclerViewBackedScrollViewStatic extends ScrollResponderMixin, React.ClassicComponentClass { - - /** - * A helper function to scroll to a specific point in the scrollview. - * This is currently used to help focus on child textviews, but can also - * be used to quickly scroll to any element we want to focus. Syntax: - * - * scrollResponderScrollTo(options: {x: number = 0; y: number = 0; animated: boolean = true}) - * - * Note: The weird argument signature is due to the fact that, for historical reasons, - * the function also accepts separate arguments as as alternative to the options object. - * This is deprecated due to ambiguity (y before x), and SHOULD NOT BE USED. - */ - scrollTo( - y?: number | { x?: number, y?: number, animated?: boolean }, - x?: number, - animated?: boolean - ): void; - - /** - * Returns a reference to the underlying scroll responder, which supports - * operations like `scrollTo`. All ScrollView-like components should - * implement this method so that they can be composed while providing access - * to the underlying scroll responder's methods. - */ - getScrollResponder(): JSX.Element; - } - - export interface SliderPropertiesIOS extends ViewProperties, React.Props { - - /** - * Assigns a maximum track image. Only static images are supported. - * The leftmost pixel of the image will be stretched to fill the track. - */ - maximumTrackImage?: ImageURISource - - /** - * The color used for the track to the right of the button. - * Overrides the default blue gradient image. - */ - maximumTrackTintColor?: string - - /** - * Assigns a minimum track image. Only static images are supported. - * The rightmost pixel of the image will be stretched to fill the track. - */ - minimumTrackImage?: ImageURISource - - /** - * The color used for the track to the left of the button. - * Overrides the default blue gradient image. - */ - minimumTrackTintColor?: string - - /** - * Sets an image for the thumb. Only static images are supported. - */ - thumbImage?: ImageURISource - - /** - * Assigns a single image for the track. Only static images - * are supported. The center pixel of the image will be stretched - * to fill the track. - */ - trackImage?: ImageURISource - - ref?: Ref - } - - export interface SliderProperties extends SliderPropertiesIOS, React.Props { - - /** - * If true the user won't be able to move the slider. - * Default value is false. - */ - disabled?: boolean - - /** - * Initial maximum value of the slider. Default value is 1. - */ - maximumValue?: number - - /** - * Initial minimum value of the slider. Default value is 0. - */ - minimumValue?: number - - /** - * Callback called when the user finishes changing the value (e.g. when the slider is released). - * @param value - */ - onSlidingComplete?: (value: number) => void - - /** - * Callback continuously called while the user is dragging the slider. - * @param value - */ - onValueChange?: (value: number) => void - - /** - * Step value of the slider. The value should be between 0 and (maximumValue - minimumValue). Default value is 0. - */ - step?: number - - /** - * Used to style and layout the Slider. See StyleSheet.js and ViewStylePropTypes.js for more info. - */ - style?: ViewStyle - - /** - * Used to locate this view in UI automation tests. - */ - testID?: string - - /** - * Initial value of the slider. The value should be between minimumValue - * and maximumValue, which default to 0 and 1 respectively. - * Default value is 0. - * This is not a controlled component, you don't need to update - * the value during dragging. - */ - value?: number - } - - /** - * A component used to select a single value from a range of values. - */ - export interface SliderStatic extends NativeMethodsMixin, React.ClassicComponentClass { - - } - - /** - * https://facebook.github.io/react-native/docs/switchios.html#props - */ - export interface SwitchIOSProperties extends ViewProperties, React.Props { - - /** - * If true the user won't be able to toggle the switch. Default value is false. - */ - disabled?: boolean - - /** - * Background color when the switch is turned on. - */ - onTintColor?: string - - /** - * Callback that is called when the user toggles the switch. - */ - onValueChange?: (value: boolean) => void - - /** - * Background color for the switch round button. - */ - thumbTintColor?: string - - /** - * Background color when the switch is turned off. - */ - tintColor?: string - - /** - * The value of the switch, if true the switch will be turned on. Default value is false. - */ - value?: boolean - - ref?: Ref - } - - /** - * - * Use SwitchIOS to render a boolean input on iOS. - * - * This is a controlled component, so you must hook in to the onValueChange callback and update the value prop in order for the component to update, - * otherwise the user's change will be reverted immediately to reflect props.value as the source of truth. - * - * @see https://facebook.github.io/react-native/docs/switchios.html - */ - export interface SwitchIOSStatic extends React.ComponentClass { - - } - - export type ImageResizeMode = "contain" | "cover" | "stretch" | "center" | "repeat" - - /** - * @see ImageResizeMode.js - */ - export interface ImageResizeModeStatic { - /** - * contain - The image will be resized such that it will be completely - * visible, contained within the frame of the View. - */ - contain: ImageResizeMode - /** - * cover - The image will be resized such that the entire area of the view - * is covered by the image, potentially clipping parts of the image. - */ - cover: ImageResizeMode - /** - * stretch - The image will be stretched to fill the entire frame of the - * view without clipping. This may change the aspect ratio of the image, - * distoring it. Only supported on iOS. - */ - stretch: ImageResizeMode - /** - * center - The image will be scaled down such that it is completely visible, - * if bigger than the area of the view. - * The image will not be scaled up. - */ - center: ImageResizeMode, - - /** - * repeat - The image will be repeated to cover the frame of the View. The - * image will keep it's size and aspect ratio. - */ - repeat: ImageResizeMode, - } - - export interface ShadowStyleIOS { - shadowColor?: string - shadowOffset?: {width: number, height: number} - shadowOpacity?: number - shadowRadius?: number - } - - /** - * Image style - * @see https://facebook.github.io/react-native/docs/image.html#style - */ - export interface ImageStyle extends FlexStyle, TransformsStyle, ShadowStyleIOS { - resizeMode?: ImageResizeMode - backfaceVisibility?: "visible" | "hidden" - borderBottomLeftRadius?: number - borderBottomRightRadius?: number - backgroundColor?: string - borderColor?: string - borderWidth?: number - borderRadius?: number - borderTopLeftRadius?: number - borderTopRightRadius?: number - overflow?: "visible" | "hidden" - overlayColor?: string - tintColor?: string - opacity?: number - } - - export interface ImagePropertiesIOS { - /** - * The text that's read by the screen reader when the user interacts with the image. - */ - accessibilityLabel?: string; - - /** - * When true, indicates the image is an accessibility element. - */ - accessible?: boolean; - - /** - * blurRadius: the blur radius of the blur filter added to the image - * @platform ios - */ - blurRadius?: number, - - /** - * When the image is resized, the corners of the size specified by capInsets will stay a fixed size, - * but the center content and borders of the image will be stretched. - * This is useful for creating resizable rounded buttons, shadows, and other resizable assets. - * More info on Apple documentation - */ - capInsets?: Insets - - /** - * A static image to display while downloading the final image off the network. - */ - defaultSource?: ImageURISource | number - - /** - * Invoked on load error with {nativeEvent: {error}} - */ - onError?: (error: { nativeEvent: any }) => void - - /** - * Invoked on download progress with {nativeEvent: {loaded, total}} - */ - onProgress?: () => void - - /** - * Invoked when a partial load of the image is complete. The definition of - * what constitutes a "partial load" is loader specific though this is meant - * for progressive JPEG loads. - * @platform ios - */ - onPartialLoad?: () => void, - } - - /* - * @see https://github.com/facebook/react-native/blob/master/Libraries/Image/ImageSourcePropType.js - */ - interface ImageURISource { - /** - * `uri` is a string representing the resource identifier for the image, which - * could be an http address, a local file path, or the name of a static image - * resource (which should be wrapped in the `require('./path/to/image.png')` - * function). - */ - uri?: string, - /** - * `bundle` is the iOS asset bundle which the image is included in. This - * will default to [NSBundle mainBundle] if not set. - * @platform ios - */ - bundle?: string, - /** - * `method` is the HTTP Method to use. Defaults to GET if not specified. - */ - method?: string, - /** - * `headers` is an object representing the HTTP headers to send along with the - * request for a remote image. - */ - headers?: {[key: string]: string}, - /** - * `body` is the HTTP body to send with the request. This must be a valid - * UTF-8 string, and will be sent exactly as specified, with no - * additional encoding (e.g. URL-escaping or base64) applied. - */ - body?: string, - /** - * `width` and `height` can be specified if known at build time, in which case - * these will be used to set the default `` component dimensions. - */ - width?: number, - height?: number, - /** - * `scale` is used to indicate the scale factor of the image. Defaults to 1.0 if - * unspecified, meaning that one image pixel equates to one display point / DIP. - */ - scale?: number, - } - - /** - * @see https://facebook.github.io/react-native/docs/image.html - */ - export interface ImageProperties extends ImagePropertiesIOS, React.Props { - fadeDuration?: number - /** - * onLayout function - * - * Invoked on mount and layout changes with - * - * {nativeEvent: { layout: {x, y, width, height}}}. - */ - onLayout?: (event: LayoutChangeEvent) => void; - - /** - * Invoked when load completes successfully - */ - onLoad?: () => void - - /** - * Invoked when load either succeeds or fails - */ - onLoadEnd?: () => void - - /** - * Invoked on load start - */ - onLoadStart?: () => void - - progressiveRenderingEnabled?: boolean - - /** - * Determines how to resize the image when the frame doesn't match the raw - * image dimensions. - * - * 'cover': Scale the image uniformly (maintain the image's aspect ratio) - * so that both dimensions (width and height) of the image will be equal - * to or larger than the corresponding dimension of the view (minus padding). - * - * 'contain': Scale the image uniformly (maintain the image's aspect ratio) - * so that both dimensions (width and height) of the image will be equal to - * or less than the corresponding dimension of the view (minus padding). - * - * 'stretch': Scale width and height independently, This may change the - * aspect ratio of the src. - * - * 'center': Scale the image down so that it is completely visible, - * if bigger than the area of the view. - * The image will not be scaled up. - */ - resizeMode?: 'cover' |'contain' |'stretch' |'center' - - /** - * The mechanism that should be used to resize the image when the image's dimensions - * differ from the image view's dimensions. Defaults to `auto`. - * - * - `auto`: Use heuristics to pick between `resize` and `scale`. - * - * - `resize`: A software operation which changes the encoded image in memory before it - * gets decoded. This should be used instead of `scale` when the image is much larger - * than the view. - * - * - `scale`: The image gets drawn downscaled or upscaled. Compared to `resize`, `scale` is - * faster (usually hardware accelerated) and produces higher quality images. This - * should be used if the image is smaller than the view. It should also be used if the - * image is slightly bigger than the view. - * - * More details about `resize` and `scale` can be found at http://frescolib.org/docs/resizing-rotating.html. - * - * @platform android - */ - resizeMethod?: 'auto' | 'resize' | 'scale' - - /** - * `uri` is a string representing the resource identifier for the image, which - * could be an http address, a local file path, or a static image - * resource (which should be wrapped in the `require('./path/to/image.png')` function). - * This prop can also contain several remote `uri`, specified together with - * their width and height. The native side will then choose the best `uri` to display - * based on the measured size of the image container. - */ - source: ImageURISource | ImageURISource[] - - /** - * similarly to `source`, this property represents the resource used to render - * the loading indicator for the image, displayed until image is ready to be - * displayed, typically after when it got downloaded from network. - */ - loadingIndicatorSource?: ImageURISource; - - /** - * - * Style - */ - style?: ImageStyle; - - /** - * A unique identifier for this element to be used in UI Automation testing scripts. - */ - testID?: string; - - } - - export interface ImageStatic extends React.NativeMethodsMixin, React.ComponentClass { - resizeMode: ImageResizeMode - getSize(uri: string, success: (width: number, height: number) => void, failure: (error: any) => void): any - prefetch(url: string): any - abortPrefetch?(requestId: number): void - queryCache?(urls: string[]): Promise> - } - - /** - * @see https://facebook.github.io/react-native/docs/listview.html#props - */ - export interface ListViewProperties extends ScrollViewProperties, React.Props { - - /** - * An instance of [ListView.DataSource](docs/listviewdatasource.html) to use - */ - dataSource: ListViewDataSource - - /** - * Flag indicating whether empty section headers should be rendered. - * In the future release empty section headers will be rendered by - * default, and the flag will be deprecated. If empty sections are not - * desired to be rendered their indices should be excluded from - * sectionID object. - */ - enableEmptySections?: boolean - - /** - * How many rows to render on initial component mount. Use this to make - * it so that the first screen worth of data apears at one time instead of - * over the course of multiple frames. - */ - initialListSize?: number - - /** - * (visibleRows, changedRows) => void - * - * Called when the set of visible rows changes. `visibleRows` maps - * { sectionID: { rowID: true }} for all the visible rows, and - * `changedRows` maps { sectionID: { rowID: true | false }} for the rows - * that have changed their visibility, with true indicating visible, and - * false indicating the view has moved out of view. - */ - onChangeVisibleRows?: (visibleRows: Array<{ [sectionId: string]: { [rowID: string]: boolean } }>, changedRows: Array<{ [sectionId: string]: { [rowID: string]: boolean } }>) => void - - /** - * Called when all rows have been rendered and the list has been scrolled - * to within onEndReachedThreshold of the bottom. The native scroll - * event is provided. - */ - onEndReached?: () => void - - /** - * Threshold in pixels for onEndReached. - */ - onEndReachedThreshold?: number - - /** - * Number of rows to render per event loop. - */ - pageSize?: number - - /** - * A performance optimization for improving scroll perf of - * large lists, used in conjunction with overflow: 'hidden' on the row - * containers. Use at your own risk. - */ - removeClippedSubviews?: boolean - - /** - * () => renderable - * - * The header and footer are always rendered (if these props are provided) - * on every render pass. If they are expensive to re-render, wrap them - * in StaticContainer or other mechanism as appropriate. Footer is always - * at the bottom of the list, and header at the top, on every render pass. - */ - renderFooter?: () => React.ReactElement - - /** - * () => renderable - * - * The header and footer are always rendered (if these props are provided) - * on every render pass. If they are expensive to re-render, wrap them - * in StaticContainer or other mechanism as appropriate. Footer is always - * at the bottom of the list, and header at the top, on every render pass. - */ - renderHeader?: () => React.ReactElement - - /** - * (rowData, sectionID, rowID) => renderable - * Takes a data entry from the data source and its ids and should return - * a renderable component to be rendered as the row. By default the data - * is exactly what was put into the data source, but it's also possible to - * provide custom extractors. - */ - renderRow: ( rowData: any, sectionID: string | number, rowID: string | number, highlightRow?: boolean ) => React.ReactElement - - - /** - * A function that returns the scrollable component in which the list rows are rendered. - * Defaults to returning a ScrollView with the given props. - */ - renderScrollComponent?: (props: ScrollViewProperties) => React.ReactElement - - /** - * (sectionData, sectionID) => renderable - * - * If provided, a sticky header is rendered for this section. The sticky - * behavior means that it will scroll with the content at the top of the - * section until it reaches the top of the screen, at which point it will - * stick to the top until it is pushed off the screen by the next section - * header. - */ - renderSectionHeader?: (sectionData: any, sectionId: string | number) => React.ReactElement - - - /** - * (sectionID, rowID, adjacentRowHighlighted) => renderable - * If provided, a renderable component to be rendered as the separator below each row - * but not the last row if there is a section header below. - * Take a sectionID and rowID of the row above and whether its adjacent row is highlighted. - */ - renderSeparator?: (sectionID: string | number, rowID: string | number, adjacentRowHighlighted?: boolean) => React.ReactElement - - /** - * How early to start rendering rows before they come on screen, in - * pixels. - */ - scrollRenderAheadDistance?: number - - /** - * An array of child indices determining which children get docked to the - * top of the screen when scrolling. For example, passing - * `stickyHeaderIndices={[0]}` will cause the first child to be fixed to the - * top of the scroll view. This property is not supported in conjunction - * with `horizontal={true}`. - * @platform ios - */ - stickyHeaderIndices?: number[] - - ref?: Ref - } - - - interface TimerMixin { - setTimeout: typeof setTimeout, - clearTimeout: typeof clearTimeout, - setInterval: typeof setInterval, - clearInterval: typeof clearInterval, - setImmediate: typeof setImmediate, - clearImmediate: typeof clearImmediate, - requestAnimationFrame: typeof requestAnimationFrame, - cancelAnimationFrame: typeof cancelAnimationFrame, - } - - export interface ListViewStatic extends ScrollResponderMixin, TimerMixin, React.ComponentClass { - DataSource: ListViewDataSource; - - /** - * Exports some data, e.g. for perf investigations or analytics. - */ - getMetrics: () => { - contentLength: number, - totalRows: number, - renderedRows: number, - visibleRows: number, - } - - /** - * Provides a handle to the underlying scroll responder. - */ - getScrollResponder: () => any, - - /** - * Scrolls to a given x, y offset, either immediately or with a smooth animation. - * - * See `ScrollView#scrollTo`. - */ - scrollTo: ( y?: number | { x?: number, y?: number, animated?: boolean } , x?: number, animated?: boolean ) => void, - } - - - export interface MapViewAnnotation { - latitude: number - longitude: number - animateDrop?: boolean - draggable?: boolean - onDragStateChange?: () => any, - onFocus?: () => any, - onBlur?: () => any, - title?: string - subtitle?: string - leftCalloutView?: ReactElement - rightCalloutView?: ReactElement - detailCalloutView?: ReactElement - tintColor?: string - image?: ImageURISource - view?: ReactElement - hasLeftCallout?: boolean - hasRightCallout?: boolean - onLeftCalloutPress?: () => void - onRightCalloutPress?: () => void - id?: string - } - - export interface MapViewRegion { - latitude: number - longitude: number - latitudeDelta?: number - longitudeDelta?: number - } - - export interface MapViewOverlay { - coordinates: ({ latitude: number, longitude: number })[] - lineWidth?: number - strokeColor?: string - fillColor?: string - id?: string - } - - export interface MapViewProperties extends ViewProperties, React.Props { - - /** - * If false points of interest won't be displayed on the map. - * Default value is true. - */ - showsPointsOfInterest?: boolean - - /** - * Map annotations with title/subtitle. - */ - annotations?: MapViewAnnotation[] - - /** - * If true the map will follow the user's location whenever it changes. - * Note that this has no effect unless showsUserLocation is enabled. - * Default value is true. - */ - followUserLocation?: boolean - - /** - * Insets for the map's legal label, originally at bottom left of the map. See EdgeInsetsPropType.js for more information. - */ - legalLabelInsets?: Insets - - /** - * The map type to be displayed. - * standard: standard road map (default) - * satellite: satellite view - * hybrid: satellite view with roads and points of interest overlayed - * - * enum('standard', 'satellite', 'hybrid') - */ - mapType?: 'standard' |'satellite' |'hybrid' - - /** - * Maximum size of area that can be displayed. - */ - maxDelta?: number - - /** - * Minimum size of area that can be displayed. - */ - minDelta?: number - - /** - * Map overlays - */ - overlays?: MapViewOverlay[] - - /** - * If false compass won't be displayed on the map. - * Default value is true. - */ - showsCompass?: boolean - - /** - * Callback that is called once, when the user taps an annotation. - */ - onAnnotationPress?: () => void - - /** - * Callback that is called continuously when the user is dragging the map. - */ - onRegionChange?: (region: MapViewRegion) => void - - /** - * Callback that is called once, when the user is done moving the map. - */ - onRegionChangeComplete?: (region: MapViewRegion) => void - - /** - * When this property is set to true and a valid camera is associated with the map, - * the camera’s pitch angle is used to tilt the plane of the map. - * - * When this property is set to false, the camera’s pitch angle is ignored and - * the map is always displayed as if the user is looking straight down onto it. - */ - pitchEnabled?: boolean - - /** - * The region to be displayed by the map. - * The region is defined by the center coordinates and the span of coordinates to display. - */ - region?: MapViewRegion - - /** - * When this property is set to true and a valid camera is associated with the map, - * the camera’s heading angle is used to rotate the plane of the map around its center point. - * - * When this property is set to false, the camera’s heading angle is ignored and the map is always oriented - * so that true north is situated at the top of the map view - */ - rotateEnabled?: boolean - - /** - * If false the user won't be able to change the map region being displayed. - * Default value is true. - */ - scrollEnabled?: boolean - - /** - * If true the app will ask for the user's location and focus on it. - * Default value is false. - * - * NOTE: You need to add NSLocationWhenInUseUsageDescription key in Info.plist to enable geolocation, - * otherwise it is going to fail silently! - */ - showsUserLocation?: boolean - - /** - * Used to style and layout the MapView. - * See StyleSheet.js and ViewStylePropTypes.js for more info. - */ - style?: ViewStyle - - /** - * If false the user won't be able to pinch/zoom the map. - * Default value is true. - */ - zoomEnabled?: boolean - - ref?: Ref - } - - /** - * @see https://facebook.github.io/react-native/docs/mapview.html#content - */ - export interface MapViewStatic extends React.NativeMethodsMixin, React.ComponentClass { - PinColors: { - RED: string, - GREEN: string, - PURPLE: string - } - } - - export interface ModalProperties extends React.Props { - - // Only `animated` is documented. The JS code says `animated` is - // deprecated and `animationType` is preferred. - animated?: boolean - /** - * The `animationType` prop controls how the modal animates. - * - * - `slide` slides in from the bottom - * - `fade` fades into view - * - `none` appears without an animation - */ - animationType?: "none" | "slide" | "fade" - /** - * The `transparent` prop determines whether your modal will fill the entire view. - * Setting this to `true` will render the modal over a transparent background. - */ - transparent?: boolean - /** - * The `visible` prop determines whether your modal is visible. - */ - visible?: boolean - /** - * The `onRequestClose` prop allows passing a function that will be called once the modal has been dismissed. - * _On the Android platform, this is a required function._ - */ - onRequestClose?: () => void - /** - * The `onShow` prop allows passing a function that will be called once the modal has been shown. - */ - onShow?: (event: NativeSyntheticEvent) => void - /** - * The `supportedOrientations` prop allows the modal to be rotated to any of the specified orientations. - * On iOS, the modal is still restricted by what's specified in your app's Info.plist's UISupportedInterfaceOrientations field. - * @platform ios - */ - supportedOrientations?: ('portrait' | 'portrait-upside-down' | 'landscape' | 'landscape-left' | 'landscape-right')[] - /** - * The `onOrientationChange` callback is called when the orientation changes while the modal is being displayed. - * The orientation provided is only 'portrait' or 'landscape'. This callback is also called on initial render, regardless of the current orientation. - * @platform ios - */ - onOrientationChange?: () => void - } - - export interface ModalStatic extends React.ComponentClass { - - } - - /** - * @see https://github.com/facebook/react-native/blob/0.34-stable\Libraries\Components\Touchable\Touchable.js - */ - interface TouchableMixin { - - /** - * Invoked when the item should be highlighted. Mixers should implement this - * to visually distinguish the `VisualRect` so that the user knows that - * releasing a touch will result in a "selection" (analog to click). - */ - touchableHandleActivePressIn(e: Event): void - - /** - * Invoked when the item is "active" (in that it is still eligible to become - * a "select") but the touch has left the `PressRect`. Usually the mixer will - * want to unhighlight the `VisualRect`. If the user (while pressing) moves - * back into the `PressRect` `touchableHandleActivePressIn` will be invoked - * again and the mixer should probably highlight the `VisualRect` again. This - * event will not fire on an `touchEnd/mouseUp` event, only move events while - * the user is depressing the mouse/touch. - */ - touchableHandleActivePressOut(e: Event): void - - /** - * Invoked when the item is "selected" - meaning the interaction ended by - * letting up while the item was either in the state - * `RESPONDER_ACTIVE_PRESS_IN` or `RESPONDER_INACTIVE_PRESS_IN`. - */ - touchableHandlePress(e: Event): void - - /** - * Invoked when the item is long pressed - meaning the interaction ended by - * letting up while the item was in `RESPONDER_ACTIVE_LONG_PRESS_IN`. If - * `touchableHandleLongPress` is *not* provided, `touchableHandlePress` will - * be called as it normally is. If `touchableHandleLongPress` is provided, by - * default any `touchableHandlePress` callback will not be invoked. To - * override this default behavior, override `touchableLongPressCancelsPress` - * to return false. As a result, `touchableHandlePress` will be called when - * lifting up, even if `touchableHandleLongPress` has also been called. - */ - touchableHandleLongPress(e: Event): void - - /** - * Returns the amount to extend the `HitRect` into the `PressRect`. Positive - * numbers mean the size expands outwards. - */ - touchableGetPressRectOffset(): Insets - - /** - * Returns the number of millis to wait before triggering a highlight. - */ - touchableGetHighlightDelayMS(): number - - // These methods are undocumented but still being used by TouchableMixin internals - touchableGetLongPressDelayMS(): number - touchableGetPressOutDelayMS(): number - touchableGetHitSlop(): Insets - } - - export interface TouchableWithoutFeedbackAndroidProperties { - - /** - * Indicates to accessibility services to treat UI component like a native one. - * Works for Android only. - * - * @enum('none', 'button', 'radiobutton_checked', 'radiobutton_unchecked' ) - */ - accessibilityComponentType?: 'none' | 'button' | 'radiobutton_checked' | 'radiobutton_unchecked' - } - - type ViewAccessibilityTraits = 'none' | 'button' | 'link' | 'header' | 'search' | 'image' | 'selected' | 'plays' | 'key' | 'text' | 'summary' | 'disabled' | 'frequentUpdates' | 'startsMedia' | 'adjustable' | 'allowsDirectInteraction' | 'pageTurn' - - export interface TouchableWithoutFeedbackIOSProperties { - - /** - * Provides additional traits to screen reader. - * By default no traits are provided unless specified otherwise in element - * - * @enum('none', 'button', 'link', 'header', 'search', 'image', 'selected', 'plays', 'key', 'text','summary', 'disabled', 'frequentUpdates', 'startsMedia', 'adjustable', 'allowsDirectInteraction', 'pageTurn') - */ - accessibilityTraits?: ViewAccessibilityTraits | ViewAccessibilityTraits[] - - } - - /** - * @see https://facebook.github.io/react-native/docs/touchablewithoutfeedback.html#props - */ - export interface TouchableWithoutFeedbackProperties extends TouchableWithoutFeedbackAndroidProperties, TouchableWithoutFeedbackIOSProperties { - - - /** - * Called when the touch is released, but not if cancelled (e.g. by a scroll that steals the responder lock). - */ - accessible?: boolean - - /** - * Delay in ms, from onPressIn, before onLongPress is called. - */ - delayLongPress?: number; - - /** - * Delay in ms, from the start of the touch, before onPressIn is called. - */ - delayPressIn?: number; - - /** - * Delay in ms, from the release of the touch, before onPressOut is called. - */ - delayPressOut?: number; - - /** - * If true, disable all interactions for this component. - */ - disabled?: boolean - - /** - * This defines how far your touch can start away from the button. - * This is added to pressRetentionOffset when moving off of the button. - * NOTE The touch area never extends past the parent view bounds and - * the Z-index of sibling views always takes precedence if a touch hits - * two overlapping views. - */ - hitSlop?: Insets - - /** - * Invoked on mount and layout changes with - * {nativeEvent: {layout: {x, y, width, height}}} - */ - onLayout?: (event: LayoutChangeEvent) => void - - onLongPress?: () => void; - - /** - * Called when the touch is released, - * but not if cancelled (e.g. by a scroll that steals the responder lock). - */ - onPress?: () => void; - - onPressIn?: () => void; - - onPressOut?: () => void; - - /** - * //FIXME: not in doc but available in examples - */ - style?: ViewStyle - - /** - * When the scroll view is disabled, this defines how far your - * touch may move off of the button, before deactivating the button. - * Once deactivated, try moving it back and you'll see that the button - * is once again reactivated! Move it back and forth several times - * while the scroll view is disabled. Ensure you pass in a constant - * to reduce memory allocations. - */ - pressRetentionOffset?: Insets - } - - - export interface TouchableWithoutFeedbackProps extends TouchableWithoutFeedbackProperties, React.Props { - - } - - /** - * Do not use unless you have a very good reason. - * All the elements that respond to press should have a visual feedback when touched. - * This is one of the primary reason a "web" app doesn't feel "native". - * - * @see https://facebook.github.io/react-native/docs/touchablewithoutfeedback.html - */ - export interface TouchableWithoutFeedbackStatic extends TimerMixin, TouchableMixin, React.ClassicComponentClass { - - } - - /** - * @see https://facebook.github.io/react-native/docs/touchablehighlight.html#props - */ - export interface TouchableHighlightProperties extends TouchableWithoutFeedbackProperties, React.Props { - - /** - * Determines what the opacity of the wrapped view should be when touch is active. - */ - activeOpacity?: number - - /** - * - * Called immediately after the underlay is hidden - */ - onHideUnderlay?: () => void - - /** - * Called immediately after the underlay is shown - */ - onShowUnderlay?: () => void - - /** - * @see https://facebook.github.io/react-native/docs/view.html#style - */ - style?: ViewStyle - - - /** - * The color of the underlay that will show through when the touch is active. - */ - underlayColor?: string - } - - /** - * A wrapper for making views respond properly to touches. - * On press down, the opacity of the wrapped view is decreased, - * which allows the underlay color to show through, darkening or tinting the view. - * The underlay comes from adding a view to the view hierarchy, - * which can sometimes cause unwanted visual artifacts if not used correctly, - * for example if the backgroundColor of the wrapped view isn't explicitly set to an opaque color. - * - * NOTE: TouchableHighlight supports only one child - * If you wish to have several child components, wrap them in a View. - * - * @see https://facebook.github.io/react-native/docs/touchablehighlight.html - */ - export interface TouchableHighlightStatic extends NativeMethodsMixin, TimerMixin, TouchableMixin, React.ClassicComponentClass { - } - - - /** - * @see https://facebook.github.io/react-native/docs/touchableopacity.html#props - */ - export interface TouchableOpacityProperties extends TouchableWithoutFeedbackProperties, React.Props { - /** - * Determines what the opacity of the wrapped view should be when touch is active. - * Defaults to 0.2 - */ - activeOpacity?: number - } - - /** - * A wrapper for making views respond properly to touches. - * On press down, the opacity of the wrapped view is decreased, dimming it. - * This is done without actually changing the view hierarchy, - * and in general is easy to add to an app without weird side-effects. - * - * @see https://facebook.github.io/react-native/docs/touchableopacity.html - */ - export interface TouchableOpacityStatic extends TimerMixin, TouchableMixin, NativeMethodsMixin, React.ClassicComponentClass { - /** - * Animate the touchable to a new opacity. - */ - setOpacityTo: (value: number) => void - } - - interface BaseBackgroundPropType { - type: string - } - - interface RippleBackgroundPropType extends BaseBackgroundPropType { - type: 'RippleAndroid' - color?: number, - borderless?: boolean - } - - interface ThemeAttributeBackgroundPropType extends BaseBackgroundPropType { - type: 'ThemeAttrAndroid' - attribute: string - } - - type BackgroundPropType = RippleBackgroundPropType | ThemeAttributeBackgroundPropType - - /** - * @see https://facebook.github.io/react-native/docs/touchableopacity.html#props - */ - export interface TouchableNativeFeedbackProperties extends TouchableWithoutFeedbackProperties, React.Props { - /** - * Determines the type of background drawable that's going to be used to display feedback. - * It takes an object with type property and extra data depending on the type. - * It's recommended to use one of the following static methods to generate that dictionary: - * 1) TouchableNativeFeedback.SelectableBackground() - will create object that represents android theme's default background for selectable elements (?android:attr/selectableItemBackground) - * 2) TouchableNativeFeedback.SelectableBackgroundBorderless() - will create object that represent android theme's default background for borderless selectable elements (?android:attr/selectableItemBackgroundBorderless). Available on android API level 21+ - * 3) TouchableNativeFeedback.Ripple(color, borderless) - will create object that represents ripple drawable with specified color (as a string). If property borderless evaluates to true the ripple will render outside of the view bounds (see native actionbar buttons as an example of that behavior). This background type is available on Android API level 21+ - */ - background?: BackgroundPropType - } - - /** - * A wrapper for making views respond properly to touches (Android only). - * On Android this component uses native state drawable to display touch feedback. - * At the moment it only supports having a single View instance as a child node, - * as it's implemented by replacing that View with another instance of RCTView node with some additional properties set. - * - * Background drawable of native feedback touchable can be customized with background property. - * - * @see https://facebook.github.io/react-native/docs/touchablenativefeedback.html#content - */ - export interface TouchableNativeFeedbackStatic extends TouchableMixin, React.ClassicComponentClass { - - /** - * Creates an object that represents android theme's default background for - * selectable elements (?android:attr/selectableItemBackground). - */ - SelectableBackground(): ThemeAttributeBackgroundPropType - - /** - * Creates an object that represent android theme's default background for borderless - * selectable elements (?android:attr/selectableItemBackgroundBorderless). - * Available on android API level 21+. - */ - SelectableBackgroundBorderless(): ThemeAttributeBackgroundPropType - - /** - * Creates an object that represents ripple drawable with specified color (as a - * string). If property `borderless` evaluates to true the ripple will - * render outside of the view bounds (see native actionbar buttons as an - * example of that behavior). This background type is available on Android - * API level 21+. - * - * @param color The ripple color - * @param borderless If the ripple can render outside it's bounds - */ - Ripple( color: string, borderless?: boolean ): RippleBackgroundPropType - } - - - export interface LeftToRightGesture { - // If the gesture can end and restart during one continuous touch - isDetachable: boolean; - // How far the swipe must drag to start transitioning - gestureDetectMovement: number; - // Amplitude of release velocity that is considered still - notMoving: number; - // Fraction of directional move required. - directionRatio: number; - // Velocity to transition with when the gesture release was "not moving" - snapVelocity: number; - // Region that can trigger swipe. iOS default is 30px from the left edge - edgeHitWidth: number; - // Ratio of gesture completion when non-velocity release will cause action - stillCompletionRatio: number; - fullDistance: any; - direction: string; - } - - export interface JumpGesture extends LeftToRightGesture{ - overswipe: { - frictionConstant: number - frictionByDistance: number - } - } - - // see /NavigatorSceneConfigs.js - export interface SceneConfig { - // A list of all gestures that are enabled on this scene - gestures?: { - pop?: LeftToRightGesture, - }, - - // Rebound spring parameters when transitioning FROM this scene - springFriction: number; - springTension: number; - - // Velocity to start at when transitioning without gesture - defaultTransitionVelocity: number; - - // Animation interpolators for horizontal transitioning: - animationInterpolators: { - into: () => boolean, - out: () => boolean - }; - } - - export interface JumpSceneConfig extends SceneConfig { - gestures: { - jumpBack: JumpGesture - jumpForward: JumpGesture - } - } - - // see /NavigatorSceneConfigs.js - export interface SceneConfigs { - PushFromRight: SceneConfig; - PushFromLeft: SceneConfig; - FloatFromRight: SceneConfig; - FloatFromLeft: SceneConfig; - FloatFromBottom: SceneConfig; - FloatFromBottomAndroid: SceneConfig; - FadeAndroid: SceneConfig; - HorizontalSwipeJump: SceneConfig; - HorizontalSwipeJumpFromRight: SceneConfig; - VerticalUpSwipeJump: SceneConfig; - VerticalDownSwipeJump: SceneConfig; - } - - export interface Route { - component?: React.ComponentClass - id?: string - title?: string - passProps?: Object; - - //anything else - [key: string]: any - - //Commonly found properties - backButtonTitle?: string - content?: string - message?: string; - index?: number - onRightButtonPress?: () => void - rightButtonTitle?: string - sceneConfig?: SceneConfig - wrapperStyle?: any - } - - - /** - * @see https://facebook.github.io/react-native/docs/navigator.html#content - */ - export interface NavigatorProperties extends React.Props { - /** - * Optional function that allows configuration about scene animations and gestures. - * Will be invoked with `route` and `routeStack` parameters, where `route` - * corresponds to the current scene being rendered by the `Navigator` and - * `routeStack` is the set of currently mounted routes that the navigator - * could transition to. The function should return a scene configuration object. - * @param route - * @param routeStack - */ - configureScene?: (route: Route, routeStack: Route[]) => SceneConfig - /** - * Specify a route to start on. - * A route is an object that the navigator will use to identify each scene to render. - * initialRoute must be a route in the initialRouteStack if both props are provided. - * The initialRoute will default to the last item in the initialRouteStack. - */ - initialRoute?: Route - /** - * Provide a set of routes to initially mount. - * Required if no initialRoute is provided. - * Otherwise, it will default to an array containing only the initialRoute - */ - initialRouteStack?: Route[] - - /** - * Optionally provide a navigation bar that persists across scene transitions - */ - navigationBar?: React.ReactElement - - /** - * Optionally provide the navigator object from a parent Navigator - */ - navigator?: Navigator - - /** - * @deprecated Use navigationContext.addListener('willfocus', callback) instead. - */ - onDidFocus?: Function - - /** - * @deprecated Use navigationContext.addListener('willfocus', callback) instead. - */ - onWillFocus?: Function - - /** - * Required function which renders the scene for a given route. - * Will be invoked with the route and the navigator object - * @param route - * @param navigator - */ - renderScene: ( route: Route, navigator: Navigator ) => React.ReactElement - - /** - * Styles to apply to the container of each scene - */ - sceneStyle?: ViewStyle - - } - - /** - * Class that contains the info and methods for app navigation. - */ - export interface NavigationContext { - parent: NavigationContext; - top: NavigationContext; - currentRoute: any; - appendChild(childContext: NavigationContext): void; - addListener(eventType: string, listener: () => void, useCapture?: boolean): NativeEventSubscription; - emit(eventType: string, data: any, didEmitCallback?: () => void): void; - dispose(): void; - } - - interface InteractionMixin { - createInteractionHandle(): number - clearInteractionHandle(clearHandle: number): void - /** - * Schedule work for after all interactions have completed. - * - * @param {function} callback - */ - runAfterInteractions(callback: () => any): void - } - - interface SubscribableMixin { - /** - * Special form of calling `addListener` that *guarantees* that a - * subscription *must* be tied to a component instance, and therefore will - * be cleaned up when the component is unmounted. It is impossible to create - * the subscription and pass it in - this method must be the one to create - * the subscription and therefore can guarantee it is retained in a way that - * will be cleaned up. - * - * @param {EventEmitter} eventEmitter emitter to subscribe to. - * @param {string} eventType Type of event to listen to. - * @param {function} listener Function to invoke when event occurs. - * @param {object} context Object to use as listener context. - */ - addListenerOn( eventEmitter: any, eventType: string, listener: () => any, context: any ): void - } - - /** - * Use Navigator to transition between different scenes in your app. - * To accomplish this, provide route objects to the navigator to identify each scene, - * and also a renderScene function that the navigator can use to render the scene for a given route. - * - * To change the animation or gesture properties of the scene, provide a configureScene prop to get the config object for a given route. - * See Navigator.SceneConfigs for default animations and more info on scene config options. - * @see https://facebook.github.io/react-native/docs/navigator.html - */ - export interface NavigatorStatic extends TimerMixin, InteractionMixin, SubscribableMixin, React.ComponentClass { - SceneConfigs: SceneConfigs; - NavigationBar: NavigatorStatic.NavigationBarStatic; - BreadcrumbNavigationBar: NavigatorStatic.BreadcrumbNavigationBarStatic; - - navigationContext: NavigationContext; - - /** - * returns the current list of routes - */ - getCurrentRoutes(): Route[]; - - /** - * Jump backward without unmounting the current scen - */ - jumpBack(): void; - - /** - * Jump forward to the next scene in the route stack - */ - jumpForward(): void; - - /** - * Transition to an existing scene without unmounting - */ - jumpTo(route: Route): void; - - /** - * Navigate forward to a new scene, squashing any scenes that you could jumpForward to - */ - push(route: Route): void; - - /** - * Transition back and unmount the current scene - */ - pop(): void; - - /** - * Go back N scenes at once. When N=1, behavior matches `pop()`. - * When N is invalid(negative or bigger than current routes count), do nothing. - * @param {number} n The number of scenes to pop. Should be an integer. - */ - popN(n: number): void - - /** - * Replace the current scene with a new route - */ - replace(route: Route): void; - - /** - * Replace a scene as specified by an index - */ - replaceAtIndex(route: Route, index: number): void; - - /** - * Replace the previous scene - */ - replacePrevious(route: Route): void; - - /** - * Reset every scene with an array of routes - */ - immediatelyResetRouteStack(routes: Route[]): void; - - /** - * Pop to a particular scene, as specified by its route. All scenes after it will be unmounted - */ - popToRoute(route: Route): void; - - /** - * Pop to the first scene in the stack, unmounting every other scene - */ - popToTop(): void; - - /** - * Replace the previous scene and pop to it. - */ - replacePreviousAndPop( route: Route ): void; - - /** - * Navigate to a new scene and reset route stack. - */ - resetTo( route: Route ): void; - - } - - namespace NavigatorStatic { - - - export interface NavState { - routeStack: Route[] - presentedIndex: number - } - - // @see NavigationBarStyle.ios.js - export interface NavigationBarStyle { - General: { - NavBarHeight: number - StatusBarHeight: number - TotalNavHeight: number - }, - Interpolators: { - // Animating *into* the center stage from the right - RightToCenter: () => boolean - // Animating out of the center stage, to the left - CenterToLeft: () => boolean - // Both stages (animating *past* the center stage) - RightToLeft: () => boolean - }, - Stages: { - Left: { - Title: FlexStyle - LeftButton: FlexStyle - RightButton: FlexStyle - }, - Center: { - Title: FlexStyle - LeftButton: FlexStyle - RightButton: FlexStyle - }, - Right: { - Title: FlexStyle - LeftButton: FlexStyle - RightButton: FlexStyle - }, - } - } - - - export interface NavigationBarRouteMapper { - Title: (route: Route, nav: Navigator, index: number, navState: NavState) => JSX.Element | null; - LeftButton: (route: Route, nav: Navigator, index: number, navState: NavState) => JSX.Element | null; - RightButton: (route: Route, nav: Navigator, index: number, navState: NavState) => JSX.Element | null; - } - - /** - * @see NavigatorNavigationBar.js - */ - export interface NavigationBarProperties extends React.Props { - navigator?: Navigator - routeMapper?: NavigationBarRouteMapper - navState?: NavState - navigationStyles?: NavigationBarStyle - style?: ViewStyle - } - - export interface NavigationBarStatic extends React.ComponentClass { - Styles: NavigationBarStyle - StylesAndroid: NavigationBarStyle; - StylesIOS: NavigationBarStyle; - - /** - * Stop transtion, immediately resets the cached state and re-render the - * whole view. - */ - immediatelyRefresh(): void; - } - - export type NavigationBar = NavigationBarStatic - export var NavigationBar: NavigationBarStatic - - - export interface BreadcrumbNavigationBarStyle { - //TODO &see NavigatorBreadcrumbNavigationBar.js - } - - export interface BreadcrumbNavigationBarRouteMapper { - rightContentForRoute: (route: Route, navigator: Navigator) => React.ReactElement - titleContentForRoute: (route: Route, navigator: Navigator) => React.ReactElement - iconForRoute: (route: Route, navigator: Navigator) => React.ReactElement - //in samples... - separatorForRoute: (route: Route, navigator: Navigator) => React.ReactElement - } - - /** - * @see NavigatorNavigationBar.js - */ - export interface BreadcrumbNavigationBarProperties extends React.Props { - navigator?: Navigator - routeMapper?: BreadcrumbNavigationBarRouteMapper - navState?: NavState - style?: ViewStyle - } - - export interface BreadcrumbNavigationBarStatic extends React.ComponentClass { - Styles: BreadcrumbNavigationBarStyle - - immediatelyRefresh(): void - } - - export type BreadcrumbNavigationBar = BreadcrumbNavigationBarStatic - var BreadcrumbNavigationBar: BreadcrumbNavigationBarStatic - - } - - // @see https://github.com/facebook/react-native/blob/0.34-stable\Libraries\StyleSheet\StyleSheetTypes.js - export namespace StyleSheet { - - type Style = ViewStyle | TextStyle | ImageStyle - - /** - * Creates a StyleSheet style reference from the given object. - */ - export function create( styles: T ): T; - - /** - * Flattens an array of style objects, into one aggregated style object. - * Alternatively, this method can be used to lookup IDs, returned by - * StyleSheet.register. - * - * > **NOTE**: Exercise caution as abusing this can tax you in terms of - * > optimizations. - * > - * > IDs enable optimizations through the bridge and memory in general. Refering - * > to style objects directly will deprive you of these optimizations. - * - * Example: - * ``` - * var styles = StyleSheet.create({ - * listItem: { - * flex: 1, - * fontSize: 16, - * color: 'white' - * }, - * selectedListItem: { - * color: 'green' - * } - * }); - * - * StyleSheet.flatten([styles.listItem, styles.selectedListItem]) - * // returns { flex: 1, fontSize: 16, color: 'green' } - * ``` - * Alternative use: - * ``` - * StyleSheet.flatten(styles.listItem); - * // return { flex: 1, fontSize: 16, color: 'white' } - * // Simply styles.listItem would return its ID (number) - * ``` - * This method internally uses `StyleSheetRegistry.getStyleByID(style)` - * to resolve style objects represented by IDs. Thus, an array of style - * objects (instances of StyleSheet.create), are individually resolved to, - * their respective objects, merged as one and then returned. This also explains - * the alternative use. - */ - export function flatten(style?: Style | Style[]): Style - - /** - * This is defined as the width of a thin line on the platform. It can be - * used as the thickness of a border or division between two elements. - * Example: - * ``` - * { - * borderBottomColor: '#bbb', - * borderBottomWidth: StyleSheet.hairlineWidth - * } - * ``` - * - * This constant will always be a round number of pixels (so a line defined - * by it look crisp) and will try to match the standard width of a thin line - * on the underlying platform. However, you should not rely on it being a - * constant size, because on different platforms and screen densities its - * value may be calculated differently. - */ - export var hairlineWidth: number - - /** - * A very common pattern is to create overlays with position absolute and zero positioning, - * so `absoluteFill` can be used for convenience and to reduce duplication of these repeated - * styles. - */ - export var absoluteFill: number - - /** - * Sometimes you may want `absoluteFill` but with a couple tweaks - `absoluteFillObject` can be - * used to create a customized entry in a `StyleSheet`, e.g.: - * - * const styles = StyleSheet.create({ - * wrapper: { - * ...StyleSheet.absoluteFillObject, - * top: 10, - * backgroundColor: 'transparent', - * }, - * }); - */ - export var absoluteFillObject: { - position: string - left: number - right: number - top: number - bottom: number - } - } - - export interface RelayProfiler { - attachProfileHandler( - name: string, - handler: (name: string, state?: any) => () => void - ): void, - - attachAggregateHandler( - name: string, - handler: (name: string, callback: () => void) => void - ): void, - } - - export interface SystraceStatic { - setEnabled(enabled: boolean): void - /** - * beginEvent/endEvent for starting and then ending a profile within the same call stack frame - **/ - beginEvent(profileName?: any, args?: any): void - endEvent(): void - /** - * beginAsyncEvent/endAsyncEvent for starting and then ending a profile where the end can either - * occur on another thread or out of the current stack frame, eg await - * the returned cookie variable should be used as input into the endAsyncEvent call to end the profile - **/ - beginAsyncEvent(profileName?: any): any - endAsyncEvent(profileName?: any, cookie?: any): void - /** - * counterEvent registers the value to the profileName on the systrace timeline - **/ - counterEvent(profileName?: any, value?: any): void - /** - * Relay profiles use await calls, so likely occur out of current stack frame - * therefore async variant of profiling is used - **/ - attachToRelayProfiler(relayProfiler: RelayProfiler): void - /* This is not called by default due to perf overhead but it's useful - if you want to find traces which spend too much time in JSON. */ - swizzleJSON(): void - /** - * Measures multiple methods of a class. For example, you can do: - * Systrace.measureMethods(JSON, 'JSON', ['parse', 'stringify']); - * - * @param object - * @param objectName - * @param methodNames Map from method names to method display names. - */ - measureMethods(object: any, objectName: string, methodNames: Array): void - /** - * Returns an profiled version of the input function. For example, you can: - * JSON.parse = Systrace.measure('JSON', 'parse', JSON.parse); - * - * @param objName - * @param fnName - * @param {function} func - * @return {function} replacement function - */ - measure(objName: string, fnName: string, func: Function): Function - } - - /** - * //FIXME: Could not find docs. Inferred from examples and jscode : ListViewDataSource.js - */ - export interface DataSourceAssetCallback { - rowHasChanged?: (r1: any, r2: any) => boolean - sectionHeaderHasChanged?: (h1: any, h2: any) => boolean - getRowData?: (dataBlob: any, sectionID: number | string, rowID: number | string) => T - getSectionHeaderData?: (dataBlob: any, sectionID: number | string) => T - } - - /** - * Provides efficient data processing and access to the - * `ListView` component. A `ListViewDataSource` is created with functions for - * extracting data from the input blob, and comparing elements (with default - * implementations for convenience). The input blob can be as simple as an - * array of strings, or an object with rows nested inside section objects. - * - * To update the data in the datasource, use `cloneWithRows` (or - * `cloneWithRowsAndSections` if you care about sections). The data in the - * data source is immutable, so you can't modify it directly. The clone methods - * suck in the new data and compute a diff for each row so ListView knows - * whether to re-render it or not. - */ - export interface ListViewDataSource { - /** - * You can provide custom extraction and `hasChanged` functions for section - * headers and rows. If absent, data will be extracted with the - * `defaultGetRowData` and `defaultGetSectionHeaderData` functions. - * - * The default extractor expects data of one of the following forms: - * - * { sectionID_1: { rowID_1: , ... }, ... } - * - * or - * - * { sectionID_1: [ , , ... ], ... } - * - * or - * - * [ [ , , ... ], ... ] - * - * The constructor takes in a params argument that can contain any of the - * following: - * - * - getRowData(dataBlob, sectionID, rowID); - * - getSectionHeaderData(dataBlob, sectionID); - * - rowHasChanged(prevRowData, nextRowData); - * - sectionHeaderHasChanged(prevSectionData, nextSectionData); - */ - new (onAsset: DataSourceAssetCallback): ListViewDataSource; - - /** - * Clones this `ListViewDataSource` with the specified `dataBlob` and - * `rowIdentities`. The `dataBlob` is just an aribitrary blob of data. At - * construction an extractor to get the interesting informatoin was defined - * (or the default was used). - * - * The `rowIdentities` is is a 2D array of identifiers for rows. - * ie. [['a1', 'a2'], ['b1', 'b2', 'b3'], ...]. If not provided, it's - * assumed that the keys of the section data are the row identities. - * - * Note: This function does NOT clone the data in this data source. It simply - * passes the functions defined at construction to a new data source with - * the data specified. If you wish to maintain the existing data you must - * handle merging of old and new data separately and then pass that into - * this function as the `dataBlob`. - */ - cloneWithRows(dataBlob: Array | { [key: string]: any }, rowIdentities?: Array): ListViewDataSource - - /** - * This performs the same function as the `cloneWithRows` function but here - * you also specify what your `sectionIdentities` are. If you don't care - * about sections you should safely be able to use `cloneWithRows`. - * - * `sectionIdentities` is an array of identifiers for sections. - * ie. ['s1', 's2', ...]. If not provided, it's assumed that the - * keys of dataBlob are the section identities. - * - * Note: this returns a new object! - */ - cloneWithRowsAndSections(dataBlob: Array | { [key: string]: any }, sectionIdentities?: Array, rowIdentities?: Array>): ListViewDataSource - - getRowCount(): number - getRowAndSectionCount(): number - - /** - * Returns if the row is dirtied and needs to be rerendered - */ - rowShouldUpdate(sectionIndex: number, rowIndex: number): boolean - - /** - * Gets the data required to render the row. - */ - getRowData(sectionIndex: number, rowIndex: number): any - - /** - * Gets the rowID at index provided if the dataSource arrays were flattened, - * or null of out of range indexes. - */ - getRowIDForFlatIndex(index: number): string - - /** - * Gets the sectionID at index provided if the dataSource arrays were flattened, - * or null for out of range indexes. - */ - getSectionIDForFlatIndex(index: number): string - - /** - * Returns an array containing the number of rows in each section - */ - getSectionLengths(): Array - - /** - * Returns if the section header is dirtied and needs to be rerendered - */ - sectionHeaderShouldUpdate(sectionIndex: number): boolean - - /** - * Gets the data required to render the section header - */ - getSectionHeaderData(sectionIndex: number): any - } - - - /** - * @see https://facebook.github.io/react-native/docs/tabbarios-item.html#props - */ - export interface TabBarItemProperties extends ViewProperties, React.Props { - - /** - * Little red bubble that sits at the top right of the icon. - */ - badge?: string | number - - /** - * A custom icon for the tab. It is ignored when a system icon is defined. - */ - icon?: ImageURISource - - /** - * Callback when this tab is being selected, - * you should change the state of your component to set selected={true}. - */ - onPress?: () => void - - /** - * If set to true it renders the image as original, - * it defaults to being displayed as a template - */ - renderAsOriginal?: boolean - - /** - * It specifies whether the children are visible or not. If you see a blank content, you probably forgot to add a selected one. - */ - selected?: boolean - - /** - * A custom icon when the tab is selected. - * It is ignored when a system icon is defined. If left empty, the icon will be tinted in blue. - */ - selectedIcon?: ImageURISource - - /** - * React style object. - */ - style?: ViewStyle - - /** - * Items comes with a few predefined system icons. - * Note that if you are using them, the title and selectedIcon will be overriden with the system ones. - * - * enum('bookmarks', 'contacts', 'downloads', 'favorites', 'featured', 'history', 'more', 'most-recent', 'most-viewed', 'recents', 'search', 'top-rated') - */ - systemIcon?: "bookmarks" | "contacts" | "downloads" | "favorites" | "featured" | "history" | "more" | "most-recent" | "most-viewed" | "recents" | "search" | "top-rated" - - /** - * Text that appears under the icon. It is ignored when a system icon is defined. - */ - title?: string - - ref?: Ref - } - - export interface TabBarItemStatic extends React.ComponentClass { - } - - /** - * @see https://facebook.github.io/react-native/docs/tabbarios.html#props - */ - export interface TabBarIOSProperties extends ViewProperties, React.Props { - - /** - * Background color of the tab bar - */ - barTintColor?: string - - /** - * Specifies tab bar item positioning. Available values are: - * - fill - distributes items across the entire width of the tab bar - * - center - centers item in the available tab bar space - * - auto (default) - distributes items dynamically according to the - * user interface idiom. In a horizontally compact environment (e.g. iPhone 5) - * this value defaults to `fill`, in a horizontally regular one (e.g. iPad) - * it defaults to center. - */ - itemPositioning?: 'fill' | 'center' | 'auto' - - /** - * Color of the currently selected tab icon - */ - tintColor?: string - - /** - * A Boolean value that indicates whether the tab bar is translucent - */ - translucent?: boolean - - /** - * Color of text on unselected tabs - */ - unselectedTintColor?: string - - ref?: Ref - } - - export interface TabBarIOSStatic extends React.ComponentClass { - Item: TabBarItemStatic; - } - - - export interface PixelRatioStatic { - - /* - Returns the device pixel density. Some examples: - PixelRatio.get() === 1 - mdpi Android devices (160 dpi) - PixelRatio.get() === 1.5 - hdpi Android devices (240 dpi) - PixelRatio.get() === 2 - iPhone 4, 4S - iPhone 5, 5c, 5s - iPhone 6 - xhdpi Android devices (320 dpi) - PixelRatio.get() === 3 - iPhone 6 plus - xxhdpi Android devices (480 dpi) - PixelRatio.get() === 3.5 - Nexus 6 - */ - get(): number; - - /* - Returns the scaling factor for font sizes. This is the ratio that is - used to calculate the absolute font size, so any elements that - heavily depend on that should use this to do calculations. - - If a font scale is not set, this returns the device pixel ratio. - - Currently this is only implemented on Android and reflects the user - preference set in Settings > Display > Font size, - on iOS it will always return the default pixel ratio. - */ - getFontScale(): number - - /** - * Converts a layout size (dp) to pixel size (px). - * Guaranteed to return an integer number. - * @param layoutSize - */ - getPixelSizeForLayoutSize(layoutSize: number): number - - /** - * Rounds a layout size (dp) to the nearest layout size that - * corresponds to an integer number of pixels. For example, - * on a device with a PixelRatio of 3, - * PixelRatio.roundToNearestPixel(8.4) = 8.33, - * which corresponds to exactly (8.33 * 3) = 25 pixels. - * @param layoutSize - */ - roundToNearestPixel(layoutSize: number): number - - /** - * No-op for iOS, but used on the web. Should not be documented. [sic] - */ - startDetecting(): void - } - - /** - * @see https://facebook.github.io/react-native/docs/platform-specific-code.html#content - */ - export type PlatformOSType = 'ios' | 'android' - - interface PlatformStatic { - OS: PlatformOSType - Version: number - - /** - * @see https://facebook.github.io/react-native/docs/platform-specific-code.html#content - */ - select( specifics: { ios?: T, android?: T} ): T; - } - - /** - * Deprecated - subclass NativeEventEmitter to create granular event modules instead of - * adding all event listeners directly to RCTDeviceEventEmitter. - */ - interface DeviceEventEmitterStatic extends EventEmitter { - sharedSubscriber: EventSubscriptionVendor - new(): DeviceEventEmitterStatic; - addListener( type: string, listener: ( data: T ) => void, context?: any ): EmitterSubscription; - } - - // Used by Dimensions below - export interface ScaledSize { - width: number; - height: number; - scale: number; - fontScale: number; - } - - /** - * Initial dimensions are set before `runApplication` is called so they should - * be available before any other require's are run, but may be updated later. - * - * Note: Although dimensions are available immediately, they may change (e.g - * due to device rotation) so any rendering logic or styles that depend on - * these constants should try to call this function on every render, rather - * than caching the value (for example, using inline styles rather than - * setting a value in a `StyleSheet`). - * - * Example: `var {height, width} = Dimensions.get('window');` - * - * @param {string} dim Name of dimension as defined when calling `set`. - * @returns {Object?} Value for the dimension. - * @see https://facebook.github.io/react-native/docs/dimensions.html#content - */ - export interface Dimensions { - /** - * Initial dimensions are set before runApplication is called so they - * should be available before any other require's are run, but may be - * updated later. - * Note: Although dimensions are available immediately, they may - * change (e.g due to device rotation) so any rendering logic or - * styles that depend on these constants should try to call this - * function on every render, rather than caching the value (for - * example, using inline styles rather than setting a value in a - * StyleSheet). - * Example: var {height, width} = Dimensions.get('window'); - @param {string} dim Name of dimension as defined when calling set. - @returns {Object?} Value for the dimension. - */ - get(dim: "window" | "screen"): ScaledSize; - - /** - * This should only be called from native code by sending the didUpdateDimensions event. - * @param {object} dims Simple string-keyed object of dimensions to set - */ - set( dims: {[key: string]: any} ): void - } - - export type SimpleTask = { - name: string - gen: () => void - } - export type PromiseTask = { - name: string - gen: () => Promise - } - - export type Handle = number - - export interface InteractionManagerStatic { - Events: { - interactionStart: string - interactionComplete: string - } - - addListener( - eventType: string, listener: Function, context?: Object): EmitterSubscription - - /** - * Schedule a function to run after all interactions have completed. - * Returns a cancellable - * @param fn - */ - runAfterInteractions( task: Function | SimpleTask | PromiseTask): - {then: Function, done: Function, cancel: Function} - - /** - * Notify manager that an interaction has started. - */ - createInteractionHandle(): Handle - - /** - * Notify manager that an interaction has completed. - */ - clearInteractionHandle(handle: Handle): void - - /** - * A positive number will use setTimeout to schedule any tasks after - * the eventLoopRunningTime hits the deadline value, otherwise all - * tasks will be executed in one setImmediate batch (default). - */ - setDeadline(deadline: number): void - } - - - export interface ScrollViewStyle extends FlexStyle, TransformsStyle { - - backfaceVisibility?: "visible" | "hidden" - backgroundColor?: string - borderColor?: string - borderTopColor?: string - borderRightColor?: string - borderBottomColor?: string - borderLeftColor?: string - borderRadius?: number - borderTopLeftRadius?: number - borderTopRightRadius?: number - borderBottomLeftRadius?: number - borderBottomRightRadius?: number - borderStyle?: "solid" | "dotted" | "dashed" - borderWidth?: number - borderTopWidth?: number - borderRightWidth?: number - borderBottomWidth?: number - borderLeftWidth?: number - opacity?: number - overflow?: "visible" | "hidden" - shadowColor?: string - shadowOffset?: { width: number; height: number } - shadowOpacity?: number - shadowRadius?: number - elevation?: number - } - - - interface ScrollResponderMixin extends SubscribableMixin { - /** - * Invoke this from an `onScroll` event. - */ - scrollResponderHandleScrollShouldSetResponder(): boolean - - /** - * Merely touch starting is not sufficient for a scroll view to become the - * responder. Being the "responder" means that the very next touch move/end - * event will result in an action/movement. - * - * Invoke this from an `onStartShouldSetResponder` event. - * - * `onStartShouldSetResponder` is used when the next move/end will trigger - * some UI movement/action, but when you want to yield priority to views - * nested inside of the view. - * - * There may be some cases where scroll views actually should return `true` - * from `onStartShouldSetResponder`: Any time we are detecting a standard tap - * that gives priority to nested views. - * - * - If a single tap on the scroll view triggers an action such as - * recentering a map style view yet wants to give priority to interaction - * views inside (such as dropped pins or labels), then we would return true - * from this method when there is a single touch. - * - * - Similar to the previous case, if a two finger "tap" should trigger a - * zoom, we would check the `touches` count, and if `>= 2`, we would return - * true. - * - */ - scrollResponderHandleStartShouldSetResponder(): boolean - - /** - * There are times when the scroll view wants to become the responder - * (meaning respond to the next immediate `touchStart/touchEnd`), in a way - * that *doesn't* give priority to nested views (hence the capture phase): - * - * - Currently animating. - * - Tapping anywhere that is not the focused input, while the keyboard is - * up (which should dismiss the keyboard). - * - * Invoke this from an `onStartShouldSetResponderCapture` event. - */ - scrollResponderHandleStartShouldSetResponderCapture(e: Event): boolean - - /** - * Invoke this from an `onResponderReject` event. - * - * Some other element is not yielding its role as responder. Normally, we'd - * just disable the `UIScrollView`, but a touch has already began on it, the - * `UIScrollView` will not accept being disabled after that. The easiest - * solution for now is to accept the limitation of disallowing this - * altogether. To improve this, find a way to disable the `UIScrollView` after - * a touch has already started. - */ - scrollResponderHandleResponderReject(): any - - /** - * We will allow the scroll view to give up its lock iff it acquired the lock - * during an animation. This is a very useful default that happens to satisfy - * many common user experiences. - * - * - Stop a scroll on the left edge, then turn that into an outer view's - * backswipe. - * - Stop a scroll mid-bounce at the top, continue pulling to have the outer - * view dismiss. - * - However, without catching the scroll view mid-bounce (while it is - * motionless), if you drag far enough for the scroll view to become - * responder (and therefore drag the scroll view a bit), any backswipe - * navigation of a swipe gesture higher in the view hierarchy, should be - * rejected. - */ - scrollResponderHandleTerminationRequest(): boolean - - /** - * Invoke this from an `onTouchEnd` event. - * - * @param {SyntheticEvent} e Event. - */ - scrollResponderHandleTouchEnd(e: Event): void - - /** - * Invoke this from an `onResponderRelease` event. - */ - scrollResponderHandleResponderRelease(e: Event): void - - scrollResponderHandleScroll(e: Event): void - - /** - * Invoke this from an `onResponderGrant` event. - */ - scrollResponderHandleResponderGrant(e: Event): void - - /** - * Unfortunately, `onScrollBeginDrag` also fires when *stopping* the scroll - * animation, and there's not an easy way to distinguish a drag vs. stopping - * momentum. - * - * Invoke this from an `onScrollBeginDrag` event. - */ - scrollResponderHandleScrollBeginDrag(e: Event): void - - /** - * Invoke this from an `onScrollEndDrag` event. - */ - scrollResponderHandleScrollEndDrag(e: Event): void - - /** - * Invoke this from an `onMomentumScrollBegin` event. - */ - scrollResponderHandleMomentumScrollBegin(e: Event): void - - /** - * Invoke this from an `onMomentumScrollEnd` event. - */ - scrollResponderHandleMomentumScrollEnd(e: Event): void - - /** - * Invoke this from an `onTouchStart` event. - * - * Since we know that the `SimpleEventPlugin` occurs later in the plugin - * order, after `ResponderEventPlugin`, we can detect that we were *not* - * permitted to be the responder (presumably because a contained view became - * responder). The `onResponderReject` won't fire in that case - it only - * fires when a *current* responder rejects our request. - * - * @param {SyntheticEvent} e Touch Start event. - */ - scrollResponderHandleTouchStart(e: Event): void - - /** - * Invoke this from an `onTouchMove` event. - * - * Since we know that the `SimpleEventPlugin` occurs later in the plugin - * order, after `ResponderEventPlugin`, we can detect that we were *not* - * permitted to be the responder (presumably because a contained view became - * responder). The `onResponderReject` won't fire in that case - it only - * fires when a *current* responder rejects our request. - * - * @param {SyntheticEvent} e Touch Start event. - */ - scrollResponderHandleTouchMove(e: Event): void - - /** - * A helper function for this class that lets us quickly determine if the - * view is currently animating. This is particularly useful to know when - * a touch has just started or ended. - */ - scrollResponderIsAnimating(): boolean - - /** - * Returns the node that represents native view that can be scrolled. - * Components can pass what node to use by defining a `getScrollableNode` - * function otherwise `this` is used. - */ - scrollResponderGetScrollableNode(): any - - /** - * A helper function to scroll to a specific point in the scrollview. - * This is currently used to help focus on child textviews, but can also - * be used to quickly scroll to any element we want to focus. Syntax: - * - * scrollResponderScrollTo(options: {x: number = 0; y: number = 0; animated: boolean = true}) - * - * Note: The weird argument signature is due to the fact that, for historical reasons, - * the function also accepts separate arguments as as alternative to the options object. - * This is deprecated due to ambiguity (y before x), and SHOULD NOT BE USED. - */ - scrollResponderScrollTo( x?: number | { x?: number, y?: number, animated?: boolean }, y?: number, animated?: boolean ): void, - - /** - * A helper function to zoom to a specific rect in the scrollview. The argument has the shape - * {x: number; y: number; width: number; height: number; animated: boolean = true} - * - * @platform ios - */ - scrollResponderZoomTo( - rect: { x: number, y: number, width: number, height: number, animated?: boolean }, - animated?: boolean // deprecated, put this inside the rect argument instead - ): void - - /** - * This method should be used as the callback to onFocus in a TextInputs' - * parent view. Note that any module using this mixin needs to return - * the parent view's ref in getScrollViewRef() in order to use this method. - * @param {any} nodeHandle The TextInput node handle - * @param {number} additionalOffset The scroll view's top "contentInset". - * Default is 0. - * @param {bool} preventNegativeScrolling Whether to allow pulling the content - * down to make it meet the keyboard's top. Default is false. - */ - scrollResponderScrollNativeHandleToKeyboard(nodeHandle: any, additionalOffset?: number, preventNegativeScrollOffset?: boolean): void - - /** - * The calculations performed here assume the scroll view takes up the entire - * screen - even if has some content inset. We then measure the offsets of the - * keyboard, and compensate both for the scroll view's "contentInset". - * - * @param {number} left Position of input w.r.t. table view. - * @param {number} top Position of input w.r.t. table view. - * @param {number} width Width of the text input. - * @param {number} height Height of the text input. - */ - scrollResponderInputMeasureAndScrollToKeyboard(left: number, top: number, width: number, height: number): void - - scrollResponderTextInputFocusError(e: Event): void - - /** - * `componentWillMount` is the closest thing to a standard "constructor" for - * React components. - * - * The `keyboardWillShow` is called before input focus. - */ - componentWillMount(): void - - /** - * Warning, this may be called several times for a single keyboard opening. - * It's best to store the information in this method and then take any action - * at a later point (either in `keyboardDidShow` or other). - * - * Here's the order that events occur in: - * - focus - * - willShow {startCoordinates, endCoordinates} several times - * - didShow several times - * - blur - * - willHide {startCoordinates, endCoordinates} several times - * - didHide several times - * - * The `ScrollResponder` providesModule callbacks for each of these events. - * Even though any user could have easily listened to keyboard events - * themselves, using these `props` callbacks ensures that ordering of events - * is consistent - and not dependent on the order that the keyboard events are - * subscribed to. This matters when telling the scroll view to scroll to where - * the keyboard is headed - the scroll responder better have been notified of - * the keyboard destination before being instructed to scroll to where the - * keyboard will be. Stick to the `ScrollResponder` callbacks, and everything - * will work. - * - * WARNING: These callbacks will fire even if a keyboard is displayed in a - * different navigation pane. Filter out the events to determine if they are - * relevant to you. (For example, only if you receive these callbacks after - * you had explicitly focused a node etc). - */ - scrollResponderKeyboardWillShow(e: Event): void - - scrollResponderKeyboardWillHide(e: Event): void - - scrollResponderKeyboardDidShow(e: Event): void - - scrollResponderKeyboardDidHide(e: Event): void - } - - export interface ScrollViewPropertiesIOS { - - /** - * When true the scroll view bounces horizontally when it reaches the end - * even if the content is smaller than the scroll view itself. The default - * value is true when `horizontal={true}` and false otherwise. - */ - alwaysBounceHorizontal?: boolean - /** - * When true the scroll view bounces vertically when it reaches the end - * even if the content is smaller than the scroll view itself. The default - * value is false when `horizontal={true}` and true otherwise. - */ - alwaysBounceVertical?: boolean - - /** - * Controls whether iOS should automatically adjust the content inset for scroll views that are placed behind a navigation bar or tab bar/ toolbar. - * The default value is true. - */ - automaticallyAdjustContentInsets?: boolean // true - - /** - * When true the scroll view bounces when it reaches the end of the - * content if the content is larger then the scroll view along the axis of - * the scroll direction. When false it disables all bouncing even if - * the `alwaysBounce*` props are true. The default value is true. - */ - bounces?: boolean - /** - * When true gestures can drive zoom past min/max and the zoom will animate - * to the min/max value at gesture end otherwise the zoom will not exceed - * the limits. - */ - bouncesZoom?: boolean - - /** - * When false once tracking starts won't try to drag if the touch moves. - * The default value is true. - */ - canCancelContentTouches?: boolean - - /** - * When true the scroll view automatically centers the content when the - * content is smaller than the scroll view bounds; when the content is - * larger than the scroll view this property has no effect. The default - * value is false. - */ - centerContent?: boolean - - /** - * The amount by which the scroll view content is inset from the edges of the scroll view. - * Defaults to {0, 0, 0, 0}. - */ - contentInset?: Insets // zeros - - /** - * Used to manually set the starting scroll offset. - * The default value is {x: 0, y: 0} - */ - contentOffset?: PointProperties // zeros - - /** - * A floating-point number that determines how quickly the scroll view - * decelerates after the user lifts their finger. Reasonable choices include - * - Normal: 0.998 (the default) - * - Fast: 0.9 - */ - decelerationRate?: "fast" | "normal" | number - - /** - * When true the ScrollView will try to lock to only vertical or horizontal - * scrolling while dragging. The default value is false. - */ - directionalLockEnabled?: boolean - - /** - * The style of the scroll indicators. - * - default (the default), same as black. - * - black, scroll indicator is black. This style is good against - * a white content background. - * - white, scroll indicator is white. This style is good against - * a black content background. - */ - indicatorStyle?: "default" | "black" | "white" - - /** - * The maximum allowed zoom scale. The default value is 1.0. - */ - maximumZoomScale?: number - - /** - * The minimum allowed zoom scale. The default value is 1.0. - */ - minimumZoomScale?: number - - /** - * Called when a scrolling animation ends. - */ - onScrollAnimationEnd?: () => void - - /** - * This controls how often the scroll event will be fired while scrolling (in events per seconds). - * A higher number yields better accuracy for code that is tracking the scroll position, - * but can lead to scroll performance problems due to the volume of information being send over the bridge. - * The default value is zero, which means the scroll event will be sent only once each time the view is scrolled. - */ - scrollEventThrottle?: number // null - - /** - * The amount by which the scroll view indicators are inset from the edges of the scroll view. - * This should normally be set to the same value as the contentInset. - * Defaults to {0, 0, 0, 0}. - */ - scrollIndicatorInsets?: Insets //zeroes - - /** - * When true the scroll view scrolls to top when the status bar is tapped. - * The default value is true. - */ - scrollsToTop?: boolean - - /** - * When snapToInterval is set, snapToAlignment will define the relationship of the the snapping to the scroll view. - * - start (the default) will align the snap at the left (horizontal) or top (vertical) - * - center will align the snap in the center - * - end will align the snap at the right (horizontal) or bottom (vertical) - */ - snapToAlignment?: "start" | "center" | "end" - - /** - * When set, causes the scroll view to stop at multiples of the value of snapToInterval. - * This can be used for paginating through children that have lengths smaller than the scroll view. - * Used in combination with snapToAlignment. - */ - snapToInterval?: number[] - - /** - * An array of child indices determining which children get docked to the - * top of the screen when scrolling. For example passing - * `stickyHeaderIndices={[0]}` will cause the first child to be fixed to the - * top of the scroll view. This property is not supported in conjunction - * with `horizontal={true}`. - */ - stickyHeaderIndices?: number[] - - /** - * The current scale of the scroll view content. The default value is 1.0. - */ - zoomScale?: number - } - - export interface ScrollViewPropertiesAndroid { - - /** - * Sometimes a scrollview takes up more space than its content fills. - * When this is the case, this prop will fill the rest of the - * scrollview with a color to avoid setting a background and creating - * unnecessary overdraw. This is an advanced optimization that is not - * needed in the general case. - */ - endFillColor?: string - - /** - * Tag used to log scroll performance on this scroll view. Will force - * momentum events to be turned on (see sendMomentumEvents). This doesn't do - * anything out of the box and you need to implement a custom native - * FpsListener for it to be useful. - * @platform android - */ - scrollPerfTag?: string - - /** - * Used to override default value of overScroll mode. - - * Possible values: - * - 'auto' - Default value, allow a user to over-scroll this view only if the content is large enough to meaningfully scroll. - * - 'always' - Always allow a user to over-scroll this view. - * - 'never' - Never allow a user to over-scroll this view. - */ - overScrollMode?: 'auto' | 'always' | 'never' - } - - export interface ScrollViewProperties extends ViewProperties, ScrollViewPropertiesIOS, ScrollViewPropertiesAndroid, Touchable, React.Props { - - /** - * These styles will be applied to the scroll view content container which - * wraps all of the child views. Example: - * - * return ( - * - * - * ); - * ... - * var styles = StyleSheet.create({ - * contentContainer: { - * paddingVertical: 20 - * } - * }); - */ - contentContainerStyle?: ViewStyle - - /** - * When true the scroll view's children are arranged horizontally in a row - * instead of vertically in a column. The default value is false. - */ - horizontal?: boolean - - /** - * Determines whether the keyboard gets dismissed in response to a drag. - * - 'none' (the default) drags do not dismiss the keyboard. - * - 'onDrag' the keyboard is dismissed when a drag begins. - * - 'interactive' the keyboard is dismissed interactively with the drag - * and moves in synchrony with the touch; dragging upwards cancels the - * dismissal. - */ - keyboardDismissMode?: 'none' | 'interactive' | 'on-drag' - - /** - * When false tapping outside of the focused text input when the keyboard - * is up dismisses the keyboard. When true the scroll view will not catch - * taps and the keyboard will not dismiss automatically. The default value - * is false. - */ - keyboardShouldPersistTaps?: boolean | 'always' | 'never' | 'handled' - - /** - * Called when scrollable content view of the ScrollView changes. - * Handler function is passed the content width and content height as parameters: (contentWidth, contentHeight) - * It's implemented using onLayout handler attached to the content container which this ScrollView renders. - * - */ - onContentSizeChange?: (w: number, h: number) => void - - /** - * Fires at most once per frame during scrolling. - * The frequency of the events can be contolled using the scrollEventThrottle prop. - */ - onScroll?: (event?: NativeSyntheticEvent) => void - - /** - * Fires if a user initiates a scroll gesture. - */ - onScrollBeginDrag?: (event?: NativeSyntheticEvent) => void - - /** - * Fires when a user has finished scrolling. - */ - onScrollEndDrag?: (event?: NativeSyntheticEvent) => void - - /** - * Fires when scroll view has finished moving - */ - onMomentumScrollEnd?: (event?: NativeSyntheticEvent) => void - - /** - * Fires when scroll view has begun moving - */ - onMomentumScrollBegin?: (event?: NativeSyntheticEvent) => void - - /** - * When true the scroll view stops on multiples of the scroll view's size - * when scrolling. This can be used for horizontal pagination. The default - * value is false. - */ - pagingEnabled?: boolean - - /** - * When false, the content does not scroll. The default value is true - */ - scrollEnabled?: boolean // true - - /** - * Experimental: When true offscreen child views (whose `overflow` value is - * `hidden`) are removed from their native backing superview when offscreen. - * This canimprove scrolling performance on long lists. The default value is - * false. - */ - removeClippedSubviews?: boolean - - /** - * When true, shows a horizontal scroll indicator. - */ - showsHorizontalScrollIndicator?: boolean - - /** - * When true, shows a vertical scroll indicator. - */ - showsVerticalScrollIndicator?: boolean - - /** - * Style - */ - style?: ScrollViewStyle - - /** - * A RefreshControl component, used to provide pull-to-refresh - * functionality for the ScrollView. - */ - refreshControl?: React.ReactElement - - ref?: Ref - } - - export interface ScrollViewProps extends ScrollViewProperties, React.Props { - ref?: Ref - } - - interface ScrollViewStatic extends ScrollResponderMixin, React.ComponentClass { - - /** - * Scrolls to a given x, y offset, either immediately or with a smooth animation. - * Syntax: - * - * scrollTo(options: {x: number = 0; y: number = 0; animated: boolean = true}) - * - * Note: The weird argument signature is due to the fact that, for historical reasons, - * the function also accepts separate arguments as as alternative to the options object. - * This is deprecated due to ambiguity (y before x), and SHOULD NOT BE USED. - */ - scrollTo( - y?: number | { x?: number, y?: number, animated?: boolean }, - x?: number, - animated?: boolean - ): void; - - /** - * Returns a reference to the underlying scroll responder, which supports - * operations like `scrollTo`. All ScrollView-like components should - * implement this method so that they can be composed while providing access - * to the underlying scroll responder's methods. - */ - getScrollResponder(): JSX.Element; - - getScrollableNode(): any; - - // Undocumented - getInnerViewNode(): any; - - // Deprecated, do not use. - scrollWithoutAnimationTo?: (y: number, x: number) => void - } - - - export interface NativeScrollRectangle { - left: number; - top: number; - bottom: number; - right: number; - } - - export interface NativeScrollPoint { - x: number; - y: number; - } - - export interface NativeScrollSize { - height: number; - width: number; - } - - export interface NativeScrollEvent { - contentInset: NativeScrollRectangle; - contentOffset: NativeScrollPoint; - contentSize: NativeScrollSize; - layoutMeasurement: NativeScrollSize; - zoomScale: number; - } - - export interface SnapshotViewIOSProperties extends ViewProperties, React.Props { - - // A callback when the Snapshot view is ready to be compared - onSnapshotReady(): any, - - // A name to identify the individual instance to the SnapshotView - testIdentifier : string, - - ref?: Ref - } - - export interface SnapshotViewIOSStatic extends NativeMethodsMixin, React.ComponentClass {} - - // Deduced from - // https://github.com/facebook/react-native/commit/052cd7eb8afa7a805ef13e940251be080499919c - - /** - * Data source wrapper around ListViewDataSource to allow for tracking of - * which row is swiped open and close opened row(s) when another row is swiped - * open. - * - * See https://github.com/facebook/react-native/pull/5602 for why - * ListViewDataSource is not subclassed. - */ - export interface SwipeableListViewDataSource { - cloneWithRowsAndSections(dataBlob: any, - sectionIdentities?: Array, - rowIdentities?: Array>): SwipeableListViewDataSource - getDataSource(): ListViewDataSource - getOpenRowID(): string - getFirstRowID(): string - setOpenRowID(rowID: string): SwipeableListViewDataSource - } - - export interface SwipeableListViewProps extends React.Props { - - /** - * To alert the user that swiping is possible, the first row can bounce - * on component mount. - */ - bounceFirstRowOnMount: boolean - - /** - * Use `SwipeableListView.getNewDataSource()` to get a data source to use, - * then use it just like you would a normal ListView data source - */ - dataSource: SwipeableListViewDataSource - - // Maximum distance to open to after a swipe - maxSwipeDistance: number - - // Callback method to render the swipeable view - renderRow: (rowData: any, sectionID: string | number, rowID: string | number, highlightRow?: boolean) => React.ReactElement - - // Callback method to render the view that will be unveiled on swipe - renderQuickActions(rowData: any, sectionID: string | number, rowID: string | number): React.ReactElement - } - - /** - * A container component that renders multiple SwipeableRow's in a ListView - * implementation. This is designed to be a drop-in replacement for the - * standard React Native `ListView`, so use it as if it were a ListView, but - * with extra props, i.e. - * - * let ds = SwipeableListView.getNewDataSource(); - * ds.cloneWithRowsAndSections(dataBlob, ?sectionIDs, ?rowIDs); - * // .. - * - * - * SwipeableRow can be used independently of this component, but the main - * benefit of using this component is - * - * - It ensures that at most 1 row is swiped open (auto closes others) - * - It can bounce the 1st row of the list so users know it's swipeable - * - More to come - */ - export interface SwipeableListViewStatic extends React.ComponentClass { - getNewDataSource(): SwipeableListViewDataSource - } - - - ////////////////////////////////////////////////////////////////////////// - // - // A P I s - // - ////////////////////////////////////////////////////////////////////////// - - /** - * @see: http://facebook.github.io/react-native/docs/actionsheetios.html#content - */ - export interface ActionSheetIOSOptions { - title?: string - options: string[] - cancelButtonIndex?: number - destructiveButtonIndex?: number - message?: string - } - - export interface ShareActionSheetIOSOptions { - message?: string - url?: string - subject?: string - /** The activities to exclude from the ActionSheet. - * For example: ['com.apple.UIKit.activity.PostToTwitter'] - */ - excludedActivityTypes?: string[] - } - - /** - * @see https://facebook.github.io/react-native/docs/actionsheetios.html#content - */ - export interface ActionSheetIOSStatic { - /** - * Display an iOS action sheet. The `options` object must contain one or more - * of: - * - `options` (array of strings) - a list of button titles (required) - * - `cancelButtonIndex` (int) - index of cancel button in `options` - * - `destructiveButtonIndex` (int) - index of destructive button in `options` - * - `title` (string) - a title to show above the action sheet - * - `message` (string) - a message to show below the title - */ - showActionSheetWithOptions: (options: ActionSheetIOSOptions, callback: (buttonIndex: number) => void) => void - - /** - * Display the iOS share sheet. The `options` object should contain - * one or both of `message` and `url` and can additionally have - * a `subject` or `excludedActivityTypes`: - * - * - `url` (string) - a URL to share - * - `message` (string) - a message to share - * - `subject` (string) - a subject for the message - * - `excludedActivityTypes` (array) - the activities to exclude from the ActionSheet - * - * NOTE: if `url` points to a local file, or is a base64-encoded - * uri, the file it points to will be loaded and shared directly. - * In this way, you can share images, videos, PDF files, etc. - */ - showShareActionSheetWithOptions: (options: ShareActionSheetIOSOptions, failureCallback: (error: Error) => void, successCallback: (success: boolean, method: string) => void) => void - } - - export type ShareContent = { - title?: string - message: string - } | { - title?: string - url: string - } - - export type ShareOptions = { - dialogTitle?: string - excludeActivityTypes?: Array - tintColor?: string - } - - export interface ShareStatic { - /** - * Open a dialog to share text content. - * - * In iOS, Returns a Promise which will be invoked an object containing `action`, `activityType`. - * If the user dismissed the dialog, the Promise will still be resolved with action being `Share.dismissedAction` - * and all the other keys being undefined. - * - * In Android, Returns a Promise which always be resolved with action being `Share.sharedAction`. - * - * ### Content - * - * - `message` - a message to share - * - `title` - title of the message - * - * #### iOS - * - * - `url` - an URL to share - * - * At least one of URL and message is required. - * - * ### Options - * - * #### iOS - * - * - `excludedActivityTypes` - * - `tintColor` - * - * #### Android - * - * - `dialogTitle` - * - */ - share(content: ShareContent, options: ShareOptions): Promise - sharedAction: string - dismissedAction: string - } - - /** - * @see https://facebook.github.io/react-native/docs/alert.html#content - */ - export interface AlertButton { - text?: string - onPress?: () => void - style?: "default" | "cancel" | "destructive" - } - - interface AlertOptions { - /** @platform android */ - cancelable?: boolean; - } - - /** - * Launches an alert dialog with the specified title and message. - * - * Optionally provide a list of buttons. Tapping any button will fire the - * respective onPress callback and dismiss the alert. By default, the only - * button will be an 'OK' button. - * - * This is an API that works both on iOS and Android and can show static - * alerts. To show an alert that prompts the user to enter some information, - * see `AlertIOS`; entering text in an alert is common on iOS only. - * - * ## iOS - * - * On iOS you can specify any number of buttons. Each button can optionally - * specify a style, which is one of 'default', 'cancel' or 'destructive'. - * - * ## Android - * - * On Android at most three buttons can be specified. Android has a concept - * of a neutral, negative and a positive button: - * - * - If you specify one button, it will be the 'positive' one (such as 'OK') - * - Two buttons mean 'negative', 'positive' (such as 'Cancel', 'OK') - * - Three buttons mean 'neutral', 'negative', 'positive' (such as 'Later', 'Cancel', 'OK') - * - * ``` - * // Works on both iOS and Android - * Alert.alert( - * 'Alert Title', - * 'My Alert Msg', - * [ - * {text: 'Ask me later', onPress: () => console.log('Ask me later pressed')}, - * {text: 'Cancel', onPress: () => console.log('Cancel Pressed'), style: 'cancel'}, - * {text: 'OK', onPress: () => console.log('OK Pressed')}, - * ] - * ) - * ``` - */ - export interface AlertStatic { - alert: (title: string, message?: string, buttons?: AlertButton[], options?: AlertOptions, type?: string) => void - } - - /** - * Wrapper around the Android native module. - */ - export interface AlertAndroidStatic { - alert: (title: string, message?: string, buttons?: AlertButton[], options?: AlertOptions) => void - } - - /** - * //FIXME: No documentation - inferred from RCTAdSupport.m - */ - export interface AdSupportIOSStatic { - getAdvertisingId: (onSuccess: (deviceId: string) => void, onFailure: (err: Error) => void) => void - getAdvertisingTrackingEnabled: (onSuccess: (hasTracking: boolean) => void, onFailure: (err: Error) => void) => void - } - - interface AlertIOSButton { - text: string - onPress?: () => void - style?: "default" | "cancel" | "destructive" - } - - export type AlertType = "default" | "plain-text" | "secure-text" | "login-password" - - /** - * @description - * `AlertIOS` provides functionality to create an iOS alert dialog with a - * message or create a prompt for user input. - * - * We recommend using the [`Alert.alert`](/docs/alert.html) method for - * cross-platform support if you don't need to create iOS-only prompts. - * - * @see https://facebook.github.io/react-native/docs/alertios.html#content - */ - export interface AlertIOSStatic { - - /** - * Create and display a popup alert. - * @static - * @method alert - * @param title The dialog's title. - * @param message An optional message that appears below - * the dialog's title. - * @param callbackOrButtons This optional argument should - * be either a single-argument function or an array of buttons. If passed - * a function, it will be called when the user taps 'OK'. - * - * If passed an array of button configurations, each button should include - * a `text` key, as well as optional `onPress` and `style` keys. `style` - * should be one of 'default', 'cancel' or 'destructive'. - * @param type Deprecated, do not use. - */ - alert: ( title: string, message?: string, callbackOrButtons?: (() => void) | Array, type?: AlertType ) => void - - /** - * Create and display a prompt to enter some text. - * @static - * @method prompt - * @param title The dialog's title. - * @param message An optional message that appears above the text - * input. - * @param callbackOrButtons This optional argument should - * be either a single-argument function or an array of buttons. If passed - * a function, it will be called with the prompt's value when the user - * taps 'OK'. - * - * If passed an array of button configurations, each button should include - * a `text` key, as well as optional `onPress` and `style` keys (see - * example). `style` should be one of 'default', 'cancel' or 'destructive'. - * @param type This configures the text input. One of 'plain-text', - * 'secure-text' or 'login-password'. - * @param defaultValue The default text in text input. - */ - prompt: ( title: string, message?: string, callbackOrButtons?: ((value: string) => void) | Array, type?: AlertType, defaultValue?: string ) => void - } - - /** - * AppStateIOS can tell you if the app is in the foreground or background, - * and notify you when the state changes. - * - * AppStateIOS is frequently used to determine the intent and proper behavior - * when handling push notifications. - * - * iOS App States - * active - The app is running in the foreground - * background - The app is running in the background. The user is either in another app or on the home screen - * inactive - This is a transition state that currently never happens for typical React Native apps. - * - * For more information, see Apple's documentation: https://developer.apple.com/library/ios/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/TheAppLifeCycle/TheAppLifeCycle.html - * - * @see https://facebook.github.io/react-native/docs/appstateios.html#content - */ - export type AppStateEvent = "change" | "memoryWarning" - export type AppStateStatus = "active" | "background" | "inactive" - - export interface AppStateStatic { - - currentState: string - - /** - * Add a handler to AppState changes by listening to the change event - * type and providing the handler - */ - addEventListener(type: AppStateEvent, listener: (state: AppStateStatus) => void): void - - /** - * Remove a handler by passing the change event type and the handler - */ - removeEventListener(type: AppStateEvent, listener: (state: AppStateStatus) => void): void - } - - /** - * AsyncStorage is a simple, unencrypted, asynchronous, persistent, key-value storage - * system that is global to the app. It should be used instead of LocalStorage. - * - * It is recommended that you use an abstraction on top of `AsyncStorage` - * instead of `AsyncStorage` directly for anything more than light usage since - * it operates globally. - * - * On iOS, `AsyncStorage` is backed by native code that stores small values in a - * serialized dictionary and larger values in separate files. On Android, - * `AsyncStorage` will use either [RocksDB](http://rocksdb.org/) or SQLite - * based on what is available. - * - * @see https://facebook.github.io/react-native/docs/asyncstorage.html#content - */ - export interface AsyncStorageStatic { - - /** - * Fetches key and passes the result to callback, along with an Error if there is any. - */ - getItem(key: string, callback?: (error?: Error, result?: string) => void): Promise - - /** - * Sets value for key and calls callback on completion, along with an Error if there is any - */ - setItem(key: string, value: string, callback?: (error?: Error) => void): Promise - - removeItem(key: string, callback?: (error?: Error) => void): Promise - - /** - * Merges existing value with input value, assuming they are stringified json. Returns a Promise object. - * Not supported by all native implementation - */ - mergeItem(key: string, value: string, callback?: (error?: Error) => void): Promise - - /** - * Erases all AsyncStorage for all clients, libraries, etc. You probably don't want to call this. - * Use removeItem or multiRemove to clear only your own keys instead. - */ - clear(callback?: (error?: Error) => void): Promise - - /** - * Gets all keys known to the app, for all callers, libraries, etc - */ - getAllKeys(callback?: (error?: Error, keys?: string[]) => void): Promise - - /** - * multiGet invokes callback with an array of key-value pair arrays that matches the input format of multiSet - */ - multiGet(keys: string[], callback?: (errors?: Error[], result?: [string, string][]) => void): Promise<[string, string][]> - - /** - * multiSet and multiMerge take arrays of key-value array pairs that match the output of multiGet, - * - * multiSet([['k1', 'val1'], ['k2', 'val2']], cb); - */ - multiSet(keyValuePairs: string[][], callback?: (errors?: Error[]) => void): Promise - - /** - * Delete all the keys in the keys array. - */ - multiRemove(keys: string[], callback?: (errors?: Error[]) => void): Promise - - /** - * Merges existing values with input values, assuming they are stringified json. - * Returns a Promise object. - * - * Not supported by all native implementations. - */ - multiMerge(keyValuePairs: string[][], callback?: (errors?: Error[]) => void): Promise - } - - export type BackPressEventName = "hardwareBackPress" - - /** - * Detect hardware back button presses, and programmatically invoke the - * default back button functionality to exit the app if there are no - * listeners or if none of the listeners return true. - * Methods don't have more detailed documentation as of 0.25. - */ - export interface BackAndroidStatic { - exitApp(): void; - addEventListener(eventName: BackPressEventName, handler: () => void): void; - removeEventListener(eventName: BackPressEventName, handler: () => void): void; - } - - export interface ButtonProperties { - title: string; - onPress: () => any; - color?: string; - accessibilityLabel?: string; - disabled?: boolean; - } - - export interface ButtonStatic extends ComponentClass { - } - - export type CameraRollGroupType = "Album" | "All" | "Event" | "Faces" | "Library" | "PhotoStream" | "SavedPhotos"; - export type CameraRollAssetType = "All" | "Videos" | "Photos"; - - export interface CameraRollFetchParams { - first: number; - after?: string; - groupTypes?: CameraRollGroupType - groupName?: string - assetType?: CameraRollAssetType - } - - export interface CameraRollNodeInfo { - image: Image; - group_name: string; - timestamp: number; - location: any; - } - - export interface CameraRollEdgeInfo { - node: CameraRollNodeInfo; - } - - export interface CameraRollAssetInfo { - edges: CameraRollEdgeInfo[]; - page_info: { - has_next_page: boolean; - end_cursor: string; - }; - } - - export interface GetPhotosParamType { - first: number - after?: string - groupTypes?: CameraRollGroupType - groupName?: string - assetType?: CameraRollAssetType - mimeTypes?: string[] - } - - export interface GetPhotosReturnType { - edges: { - node: { - type: string - group_name: string - image: { - uri: string - height: number - width: number - isStored?: boolean - } - timestamp: number - location: { - latitude: number - longitude: number - altitude: number - heading: number - speed: number - } - } - }[] - - page_info: { - has_next_page: boolean - start_cursor?: string - end_cursor?: string - } - } - - /** - * CameraRoll provides access to the local camera roll / gallery. - * Before using this you must link the RCTCameraRoll library. - * You can refer to (Linking)[https://facebook.github.io/react-native/docs/linking-libraries-ios.html] for help. - */ - export interface CameraRollStatic { - - GroupTypesOptions: CameraRollGroupType[] //'Album','All','Event','Faces','Library','PhotoStream','SavedPhotos' - AssetTypeOptions: CameraRollAssetType[] // "All", "Videos", "Photos" - - /** - * Saves the image to the camera roll / gallery. - * - * @tag On Android, this is a local URI, such as "file:///sdcard/img.png". - * On iOS, the tag can be one of the following: - * local URI - * assets-library tag - * a tag not maching any of the above, which means the image data will be stored in memory (and consume memory as long as the process is alive) - * - * @deprecated use saveToCameraRoll instead - */ - saveImageWithTag(tag: string): Promise - - /** - * Saves the photo or video to the camera roll / gallery. - * - * On Android, the tag must be a local image or video URI, such as `"file:///sdcard/img.png"`. - * - * On iOS, the tag can be any image URI (including local, remote asset-library and base64 data URIs) - * or a local video file URI (remote or data URIs are not supported for saving video at this time). - * - * If the tag has a file extension of .mov or .mp4, it will be inferred as a video. Otherwise - * it will be treated as a photo. To override the automatic choice, you can pass an optional - * `type` parameter that must be one of 'photo' or 'video'. - * - * Returns a Promise which will resolve with the new URI. - */ - saveToCameraRoll(tag: string, type?: 'photo' | 'video'): Promise - - /** - * Saves the photo or video to the camera roll / gallery. - * - * On Android, the tag must be a local image or video URI, such as `"file:///sdcard/img.png"`. - * - * On iOS, the tag can be any image URI (including local, remote asset-library and base64 data URIs) - * or a local video file URI (remote or data URIs are not supported for saving video at this time). - * - * If the tag has a file extension of .mov or .mp4, it will be inferred as a video. Otherwise - * it will be treated as a photo. To override the automatic choice, you can pass an optional - * `type` parameter that must be one of 'photo' or 'video'. - * - * Returns a Promise which will resolve with the new URI. - */ - saveToCameraRoll(tag: string, type?: 'photo' | 'video'): Promise - - /** - * Invokes callback with photo identifier objects from the local camera roll of the device matching shape defined by getPhotosReturnChecker. - * - * @param {object} params See getPhotosParamChecker. - */ - getPhotos(params: GetPhotosParamType): Promise; - } - - /** Clipboard gives you an interface for setting and getting content from Clipboard on both iOS and Android */ - export interface ClipboardStatic { - getString(): Promise; - setString(content: string): void; - } - - export interface DatePickerAndroidOpenOption { - date?: Date | number - minDate?: Date | number - maxDate?: Date | number - } - - // Deduced from DatePickerAndroid.android.js - export interface DatePickerAndroidOpenReturn { - action: string // "dateSetAction" | "dismissedAction" - year?: number - month?: number - day?: number - } - - export interface DatePickerAndroidStatic { - /* - Opens the standard Android date picker dialog. - - The available keys for the options object are: - * date (Date object or timestamp in milliseconds) - date to show by default - * minDate (Date object or timestamp in milliseconds) - minimum date that can be selected - * maxDate (Date object or timestamp in milliseconds) - maximum date that can be selected - - Returns a Promise which will be invoked an object containing action, year, month (0-11), day if the user picked a date. If the user dismissed the dialog, the Promise will still be resolved with action being DatePickerAndroid.dismissedAction and all the other keys being undefined. Always check whether the action before reading the values. - - Note the native date picker dialog has some UI glitches on Android 4 and lower when using the minDate and maxDate options. - */ - open(options?: DatePickerAndroidOpenOption): Promise - - /** - * A date has been selected. - */ - dateSetAction: string - - /** - * The dialog has been dismissed. - */ - dismissedAction: string - } - - export interface FetchableListenable { - fetch: () => Promise - - /** - * eventName is expected to be `change` - * //FIXME: No doc - inferred from NetInfo.js - */ - addEventListener: (eventName: string, listener: (result: T) => void) => void - - /** - * eventName is expected to be `change` - * //FIXME: No doc - inferred from NetInfo.js - */ - removeEventListener: (eventName: string, listener: (result: T) => void) => void - } - - export interface IntentAndroidStatic { - /** - * Starts a corresponding external activity for the given URL. - - For example, if the URL is "https://www.facebook.com", the system browser will be opened, or the "choose application" dialog will be shown. - - You can use other URLs, like a location (e.g. "geo:37.484847,-122.148386"), a contact, or any other URL that can be opened with {@code Intent.ACTION_VIEW}. - - NOTE: This method will fail if the system doesn't know how to open the specified URL. If you're passing in a non-http(s) URL, it's best to check {@code canOpenURL} first. - - NOTE: For web URLs, the protocol ("http://", "https://") must be set accordingly! - - @deprecated - */ - openURL(url: string): void - - /** - * Determine whether or not an installed app can handle a given URL. - - You can use other URLs, like a location (e.g. "geo:37.484847,-122.148386"), a contact, or any other URL that can be opened with {@code Intent.ACTION_VIEW}. - - NOTE: For web URLs, the protocol ("http://", "https://") must be set accordingly! - - @param URL the URL to open - - @deprecated - */ - canOpenURL(url: string, callback: (supported: boolean) => void): void - - /** - * If the app launch was triggered by an app link with {@code Intent.ACTION_VIEW}, it will give the link url, otherwise it will give null - - Refer http://developer.android.com/training/app-indexing/deep-linking.html#handling-intents - - @deprecated - */ - getInitialURL(callback: (url: string) => void): void - } - - export interface LinkingStatic extends NativeEventEmitter { - /** - * Add a handler to Linking changes by listening to the `url` event type - * and providing the handler - */ - addEventListener(type: string, handler: (event: { url: string }) => void): void - - /** - * Remove a handler by passing the `url` event type and the handler - */ - removeEventListener(type: string, handler: (event: { url: string }) => void): void - - /** - * Try to open the given url with any of the installed apps. - * You can use other URLs, like a location (e.g. "geo:37.484847,-122.148386"), a contact, or any other URL that can be opened with the installed apps. - * NOTE: This method will fail if the system doesn't know how to open the specified URL. If you're passing in a non-http(s) URL, it's best to check {@code canOpenURL} first. - * NOTE: For web URLs, the protocol ("http://", "https://") must be set accordingly! - */ - openURL(url: string): Promise - - /** - * Determine whether or not an installed app can handle a given URL. - * NOTE: For web URLs, the protocol ("http://", "https://") must be set accordingly! - * NOTE: As of iOS 9, your app needs to provide the LSApplicationQueriesSchemes key inside Info.plist. - * @param URL the URL to open - */ - canOpenURL(url: string): Promise - - /** - * If the app launch was triggered by an app link with, it will give the link url, otherwise it will give null - * NOTE: To support deep linking on Android, refer http://developer.android.com/training/app-indexing/deep-linking.html#handling-intents - */ - getInitialURL(): Promise - } - - export interface LinkingIOSStatic { - /** - * Add a handler to LinkingIOS changes by listening to the url event type and providing the handler - @deprecated - */ - addEventListener(type: string, handler: (event: { url: string }) => void): void - - /** - * Remove a handler by passing the url event type and the handler - @deprecated - */ - removeEventListener(type: string, handler: (event: { url: string }) => void): void - - /** - * Try to open the given url with any of the installed apps. - @deprecated - */ - openURL(url: string): void - - /** - * Determine whether or not an installed app can handle a given URL. The callback function will be called with bool supported as the only argument - NOTE: As of iOS 9, your app needs to provide the LSApplicationQueriesSchemes key inside Info.plist. - @deprecated - */ - canOpenURL(url: string, callback: (supported: boolean) => void): void - - /** - * If the app launch was triggered by an app link, it will pop the link url, otherwise it will return null - @deprecated - */ - popInitialURL(): string; - } - - - /** - * NetInfo exposes info about online/offline status - * - * Asynchronously determine if the device is online and on a cellular network. - * - * - `none` - device is offline - * - `wifi` - device is online and connected via wifi, or is the iOS simulator - * - `cell` - device is connected via Edge, 3G, WiMax, or LTE - * - `unknown` - error case and the network status is unknown - * @see https://facebook.github.io/react-native/docs/netinfo.html#content - */ - - // This is from code, a few items more than documentation@0.25 - export type NetInfoReturnType = "none" | "wifi" | "cell" | "unknown" | - "NONE" | "MOBILE" | "WIFI" | "MOBILE_MMS" | "MOBILE_SUPL" | "MOBILE_DUN" | - "MOBILE_HIPRI" | "WIMAX" | "BLUETOOTH" | "DUMMY" | "ETHERNET" | "MOBILE_FOTA" | - "MOBILE_IMS" | "MOBILE_CBS" | "WIFI_P2P" | "MOBILE_IA" | "MOBILE_EMERGENCY" | - "PROXY" | "VPN" | "UNKNOWN" - - export interface NetInfoStatic extends FetchableListenable { - - /** - * - * Available on all platforms. - * Asynchronously fetch a boolean to determine internet connectivity. - */ - isConnected: FetchableListenable - - /** - * Available on Android. Detect if the current active connection is - * metered or not. A network is classified as metered when the user is - * sensitive to heavy data usage on that connection due to monetary - * costs, data limitations or battery/performance issues. - */ - isConnectionExpensive: Promise - } - - - export interface PanResponderGestureState { - - /** - * ID of the gestureState- persisted as long as there at least one touch on - */ - stateID: number - - /** - * the latest screen coordinates of the recently-moved touch - */ - moveX: number - - /** - * the latest screen coordinates of the recently-moved touch - */ - moveY: number - - /** - * the screen coordinates of the responder grant - */ - x0: number - - /** - * the screen coordinates of the responder grant - */ - y0: number - - /** - * accumulated distance of the gesture since the touch started - */ - dx: number - - /** - * accumulated distance of the gesture since the touch started - */ - dy: number - - /** - * current velocity of the gesture - */ - vx: number - - /** - * current velocity of the gesture - */ - vy: number - - /** - * Number of touches currently on screen - */ - numberActiveTouches: number - - - // All `gestureState` accounts for timeStamps up until: - _accountsForMovesUpTo: number - } - - - /** - * @see documentation of GestureResponderHandlers - */ - export interface PanResponderCallbacks { - onMoveShouldSetPanResponder?: (e: GestureResponderEvent, gestureState: PanResponderGestureState) => boolean - onStartShouldSetPanResponder?: (e: GestureResponderEvent, gestureState: PanResponderGestureState) => void - onPanResponderGrant?: (e: GestureResponderEvent, gestureState: PanResponderGestureState) => void - onPanResponderMove?: (e: GestureResponderEvent, gestureState: PanResponderGestureState) => void - onPanResponderRelease?: (e: GestureResponderEvent, gestureState: PanResponderGestureState) => void - onPanResponderTerminate?: (e: GestureResponderEvent, gestureState: PanResponderGestureState) => void - - onMoveShouldSetPanResponderCapture?: (e: GestureResponderEvent, gestureState: PanResponderGestureState) => boolean - onStartShouldSetPanResponderCapture?: (e: GestureResponderEvent, gestureState: PanResponderGestureState) => boolean - onPanResponderReject?: (e: GestureResponderEvent, gestureState: PanResponderGestureState) => void - onPanResponderStart?: (e: GestureResponderEvent, gestureState: PanResponderGestureState) => void - onPanResponderEnd?: (e: GestureResponderEvent, gestureState: PanResponderGestureState) => void - onPanResponderTerminationRequest?: (e: GestureResponderEvent, gestureState: PanResponderGestureState) => boolean - } - - export interface PanResponderInstance { - panHandlers: GestureResponderHandlers - } - - /** - * PanResponder reconciles several touches into a single gesture. - * It makes single-touch gestures resilient to extra touches, - * and can be used to recognize simple multi-touch gestures. - * - * It provides a predictable wrapper of the responder handlers provided by the gesture responder system. - * For each handler, it provides a new gestureState object alongside the normal event. - */ - export interface PanResponderStatic { - /** - * @param config Enhanced versions of all of the responder callbacks - * that provide not only the typical `ResponderSyntheticEvent`, but also the - * `PanResponder` gesture state. Simply replace the word `Responder` with - * `PanResponder` in each of the typical `onResponder*` callbacks. For - * example, the `config` object would look like: - * - * - `onMoveShouldSetPanResponder: (e, gestureState) => {...}` - * - `onMoveShouldSetPanResponderCapture: (e, gestureState) => {...}` - * - `onStartShouldSetPanResponder: (e, gestureState) => {...}` - * - `onStartShouldSetPanResponderCapture: (e, gestureState) => {...}` - * - `onPanResponderReject: (e, gestureState) => {...}` - * - `onPanResponderGrant: (e, gestureState) => {...}` - * - `onPanResponderStart: (e, gestureState) => {...}` - * - `onPanResponderEnd: (e, gestureState) => {...}` - * - `onPanResponderRelease: (e, gestureState) => {...}` - * - `onPanResponderMove: (e, gestureState) => {...}` - * - `onPanResponderTerminate: (e, gestureState) => {...}` - * - `onPanResponderTerminationRequest: (e, gestureState) => {...}` - * - * In general, for events that have capture equivalents, we update the - * gestureState once in the capture phase and can use it in the bubble phase - * as well. - * - * Be careful with onStartShould* callbacks. They only reflect updated - * `gestureState` for start/end events that bubble/capture to the Node. - * Once the node is the responder, you can rely on every start/end event - * being processed by the gesture and `gestureState` being updated - * accordingly. (numberActiveTouches) may not be totally accurate unless you - * are the responder. - */ - create(config: PanResponderCallbacks): PanResponderInstance - } - - export interface Rationale { - title: string - message: string - } - - export type Permission = "android.permission.READ_CALENDAR" | "android.permission.WRITE_CALENDAR" | "android.permission.CAMERA" | "android.permission.READ_CONTACTS" | "android.permission.WRITE_CONTACTS" | "android.permission.GET_ACCOUNTS" | "android.permission.ACCESS_FINE_LOCATION" | "android.permission.ACCESS_COARSE_LOCATION" | "android.permission.RECORD_AUDIO" | "android.permission.READ_PHONE_STATE" | "android.permission.CALL_PHONE" | "android.permission.READ_CALL_LOG" | "android.permission.WRITE_CALL_LOG" | "com.android.voicemail.permission.ADD_VOICEMAIL" | "android.permission.USE_SIP" | "android.permission.PROCESS_OUTGOING_CALLS" | "android.permission.BODY_SENSORS" | "android.permission.SEND_SMS" | "android.permission.RECEIVE_SMS" | "android.permission.READ_SMS" | "android.permission.RECEIVE_WAP_PUSH" | "android.permission.RECEIVE_MMS" | "android.permission.READ_EXTERNAL_STORAGE" | "android.permission.WRITE_EXTERNAL_STORAGE" - - export interface PermissionsAndroidStatic { - /** - * A list of specified "dangerous" permissions that require prompting the user - */ - PERMISSIONS: {[key: string]: Permission} - new(): PermissionsAndroidStatic - /** - * Returns a promise resolving to a boolean value as to whether the specified - * permissions has been granted - */ - checkPermission(permission: Permission): Promise - /** - * Prompts the user to enable a permission and returns a promise resolving to a - * boolean value indicating whether the user allowed or denied the request - * - * If the optional rationale argument is included (which is an object with a - * `title` and `message`), this function checks with the OS whether it is - * necessary to show a dialog explaining why the permission is needed - * (https://developer.android.com/training/permissions/requesting.html#explain) - * and then shows the system permission dialog - */ - requestPermission(permission: Permission, rationale?: Rationale): Promise - } - - export interface PushNotificationPermissions { - alert?: boolean - badge?: boolean - sound?: boolean - } - - export interface PushNotification { - - - /** - * An alias for `getAlert` to get the notification's main message string - */ - getMessage(): string | Object - - /** - * Gets the sound string from the `aps` object - */ - getSound(): string - - /** - * Gets the notification's main message from the `aps` object - */ - getAlert(): string | Object - - /** - * Gets the badge count number from the `aps` object - */ - getBadgeCount(): number - - /** - * Gets the data object on the notif - */ - getData(): Object - - } - - - type PresentLocalNotificationDetails = { - alertBody: string - alertAction: string - soundName?: string - category?: string - userInfo?: Object - applicationIconBadgeNumber?: number - } - - type ScheduleLocalNotificationDetails = { - fireDate: Date - alertBody: string - alertAction: string - soundName?: string - category?: string - userInfo?: Object - applicationIconBadgeNumber?: number - } - - export type PushNotificationEventName = "notification" | "localNotification" | "register" | "registrationError" - - /** - * Handle push notifications for your app, including permission handling and icon badge number. - * @see https://facebook.github.io/react-native/docs/pushnotificationios.html#content - * - * //FIXME: BGR: The documentation seems completely off compared to the actual js implementation. I could never get the example to run - */ - export interface PushNotificationIOSStatic { - - /** - * Schedules the localNotification for immediate presentation. - * details is an object containing: - * alertBody : The message displayed in the notification alert. - * alertAction : The "action" displayed beneath an actionable notification. Defaults to "view"; - * soundName : The sound played when the notification is fired (optional). - * category : The category of this notification, required for actionable notifications (optional). - * userInfo : An optional object containing additional notification data. - * applicationIconBadgeNumber (optional) : The number to display as the app's icon badge. The default value of this property is 0, which means that no badge is displayed. - */ - presentLocalNotification(details: PresentLocalNotificationDetails): void - - /** - * Schedules the localNotification for future presentation. - * details is an object containing: - * fireDate : The date and time when the system should deliver the notification. - * alertBody : The message displayed in the notification alert. - * alertAction : The "action" displayed beneath an actionable notification. Defaults to "view"; - * soundName : The sound played when the notification is fired (optional). - * category : The category of this notification, required for actionable notifications (optional). - * userInfo : An optional object containing additional notification data. - * applicationIconBadgeNumber (optional) : The number to display as the app's icon badge. Setting the number to 0 removes the icon badge. - */ - scheduleLocalNotification(details: ScheduleLocalNotificationDetails): void - - /** - * Cancels all scheduled localNotifications - */ - cancelAllLocalNotifications(): void - - /** - * Cancel local notifications. - * Optionally restricts the set of canceled notifications to those notifications whose userInfo fields match the corresponding fields in the userInfo argument. - */ - cancelLocalNotifications(userInfo: Object): void - - /** - * Sets the badge number for the app icon on the home screen - */ - setApplicationIconBadgeNumber(number: number): void - - /** - * Gets the current badge number for the app icon on the home screen - */ - getApplicationIconBadgeNumber(callback: (badge: number) => void): void - - /** - * Gets the local notifications that are currently scheduled. - */ - getScheduledLocalNotifications(callback: (notifications: ScheduleLocalNotificationDetails[]) => void): void - - /** - * Attaches a listener to remote notifications while the app is running in the - * foreground or the background. - * - * The handler will get be invoked with an instance of `PushNotificationIOS` - * - * The type MUST be 'notification' - */ - addEventListener( type: PushNotificationEventName, handler: ( notification: PushNotification ) => void ):void - - /** - * Removes the event listener. Do this in `componentWillUnmount` to prevent - * memory leaks - */ - removeEventListener( type: PushNotificationEventName, handler: ( notification: PushNotification ) => void ): void - - /** - * Requests all notification permissions from iOS, prompting the user's - * dialog box. - */ - requestPermissions(permissions?: PushNotificationPermissions[]): void - - /** - * Requests all notification permissions from iOS, prompting the user's - * dialog box. - */ - requestPermissions( permissions?: PushNotificationPermissions ): Promise - - /** - * Unregister for all remote notifications received via Apple Push - * Notification service. - * You should call this method in rare circumstances only, such as when - * a new version of the app removes support for all types of remote - * notifications. Users can temporarily prevent apps from receiving - * remote notifications through the Notifications section of the - * Settings app. Apps unregistered through this method can always - * re-register. - */ - abandonPermissions(): void - - /** - * See what push permissions are currently enabled. `callback` will be - * invoked with a `permissions` object: - * - * - `alert` :boolean - * - `badge` :boolean - * - `sound` :boolean - */ - checkPermissions(callback: (permissions: PushNotificationPermissions) => void): void - - /** - * This method returns a promise that resolves to either the notification - * object if the app was launched by a push notification, or `null` otherwise. - */ - getInitialNotification(): PushNotification - } - - export interface SettingsStatic { - get(key: string): any - set(settings: Object): void - watchKeys(keys: string | Array, callback: (() => void)): number - clearWatch(watchId: number): void - } - - - /** - * @enum('default', 'light-content') - */ - export type StatusBarStyle = "default" | "light-content" - - /** - * @enum('fade', 'slide') - */ - export type StatusBarAnimation = "none" | "fade" | "slide" - - export interface StatusBarPropertiesIOS extends React.Props { - /** - * Sets the color of the status bar text. - */ - barStyle?: StatusBarStyle - - /** - * If the network activity indicator should be visible. - */ - networkActivityIndicatorVisible?: boolean - - /** - * The transition effect when showing and hiding the status bar using - * the hidden prop. Defaults to 'fade'. - */ - showHideTransition?: "fade" | "slide" - } - - export interface StatusBarPropertiesAndroid extends React.Props { - /** - * The background color of the status bar. - */ - backgroundColor?: string - - /** - * If the status bar is translucent. When translucent is set to true, - * the app will draw under the status bar. This is useful when using a - * semi transparent status bar color. - */ - translucent?: boolean - } - - export interface StatusBarProperties extends StatusBarPropertiesIOS, StatusBarPropertiesAndroid, React.Props { - - /** - * If the transition between status bar property changes should be - * animated. Supported for backgroundColor, barStyle and hidden. - */ - animated?: boolean - - /** - * If the status bar is hidden. - */ - hidden?: boolean - } - - export interface StatusBarStatic extends React.ComponentClass { - - /** - * The current height of the status bar on the device. - * @platform android - */ - currentHeight?: number - - /** - * Show or hide the status bar - * @param hidden The dialog's title. - * @param animation Optional animation when - * changing the status bar hidden property. - */ - setHidden: (hidden: boolean, animation?: StatusBarAnimation) => void - - /** - * Set the status bar style - * @param style Status bar style to set - * @param animated Animate the style change. - */ - setBarStyle: (style: StatusBarStyle, animated?: boolean) => void - - /** - * Control the visibility of the network activity indicator - * @param visible Show the indicator. - */ - setNetworkActivityIndicatorVisible: (visible: boolean) => void - - /** - * Set the background color for the status bar - * @param color Background color. - * @param animated Animate the style change. - */ - setBackgroundColor: (color: string, animated?: boolean) => void - - /** - * Control the translucency of the status bar - * @param translucent Set as translucent. - */ - setTranslucent: (translucent: boolean) => void - } - - /** - * StatusBarIOS is deprecated. - * Use `StatusBar` for mutating the status bar. - */ - export interface StatusBarIOSStatic extends NativeEventEmitter { - } - - type TimePickerAndroidOpenOptions = { - hour?: number - minute?: number - is24Hour?: boolean - } - - /** - * Opens the standard Android time picker dialog. - * - * ### Example - * - * ``` - * try { - * const {action, hour, minute} = await TimePickerAndroid.open({ - * hour: 14, - * minute: 0, - * is24Hour: false, // Will display '2 PM' - * }); - * if (action !== TimePickerAndroid.dismissedAction) { - * // Selected hour (0-23), minute (0-59) - * } - * } catch ({code, message}) { - * console.warn('Cannot open time picker', message); - * } - * ``` - */ - export interface TimePickerAndroidStatic { - - /** - * Opens the standard Android time picker dialog. - * - * The available keys for the `options` object are: - * * `hour` (0-23) - the hour to show, defaults to the current time - * * `minute` (0-59) - the minute to show, defaults to the current time - * * `is24Hour` (boolean) - If `true`, the picker uses the 24-hour format. If `false`, - * the picker shows an AM/PM chooser. If undefined, the default for the current locale - * is used. - * - * Returns a Promise which will be invoked an object containing `action`, `hour` (0-23), - * `minute` (0-59) if the user picked a time. If the user dismissed the dialog, the Promise will - * still be resolved with action being `TimePickerAndroid.dismissedAction` and all the other keys - * being undefined. **Always** check whether the `action` before reading the values. - */ - open(options: TimePickerAndroidOpenOptions): Promise<{ action: string, hour: number, minute: number }> - - /** - * A time has been selected. - */ - timeSetAction: string - - /** - * The dialog has been dismissed. - */ - dismissedAction: string - } - - /** - * This exposes the native ToastAndroid module as a JS module. This has a function 'show' - * which takes the following parameters: - * - * 1. String message: A string with the text to toast - * 2. int duration: The duration of the toast. May be ToastAndroid.SHORT or ToastAndroid.LONG - * - * There is also a function `showWithGravity` to specify the layout gravity. May be - * ToastAndroid.TOP, ToastAndroid.BOTTOM, ToastAndroid.CENTER - */ - export interface ToastAndroidStatic { - /** - * String message: A string with the text to toast - * int duration: The duration of the toast. - * May be ToastAndroid.SHORT or ToastAndroid.LONG - */ - show(message: string, duration: number): void - /** `gravity` may be ToastAndroid.TOP, ToastAndroid.BOTTOM, ToastAndroid.CENTER */ - showWithGravity( - message: string, - duration: number, - gravity: number - ): void - // Toast duration constants - SHORT: number - LONG: number - // Toast gravity constants - TOP: number - BOTTOM: number - CENTER: number - } - - export interface UIManagerStatic { - /** - * Capture an image of the screen, window or an individual view. The image - * will be stored in a temporary file that will only exist for as long as the - * app is running. - * - * The `view` argument can be the literal string `window` if you want to - * capture the entire window, or it can be a reference to a specific - * React Native component. - * - * The `options` argument may include: - * - width/height (number) - the width and height of the image to capture. - * - format (string) - either 'png' or 'jpeg'. Defaults to 'png'. - * - quality (number) - the quality when using jpeg. 0.0 - 1.0 (default). - * - * Returns a Promise (tempFilePath) - * @platform ios - */ - takeSnapshot: ( - view ?: 'window' | ReactElement | number, - options ?: { - width ?: number, - height ?: number, - format ?: 'png' | 'jpeg', - quality ?: number, - } - ) => Promise - } - - export interface SwitchPropertiesIOS extends ViewProperties, React.Props { - - /** - * Background color when the switch is turned on. - */ - onTintColor?: string - - /** - * Color of the foreground switch grip. - */ - thumbTintColor?: string - - /** - * Background color when the switch is turned off. - */ - tintColor?: string - - ref?: Ref - } - - export interface SwitchProperties extends SwitchPropertiesIOS, React.Props { - - /** - * If true the user won't be able to toggle the switch. - * Default value is false. - */ - disabled?: boolean - - /** - * Invoked with the new value when the value changes. - */ - onValueChange?: (value: boolean) => void - - /** - * Used to locate this view in end-to-end tests. - */ - testID?: string - - /** - * The value of the switch. If true the switch will be turned on. - * Default value is false. - */ - value?: boolean - style?: ViewStyle - } - - /** - * Renders a boolean input. - * - * This is a controlled component that requires an `onValueChange` callback that - * updates the `value` prop in order for the component to reflect user actions. - * If the `value` prop is not updated, the component will continue to render - * the supplied `value` prop instead of the expected result of any user actions. - */ - export interface SwitchStatic extends NativeMethodsMixin, React.ClassicComponentClass { - - } - - /** - * NOTE: `VibrationIOS` is being deprecated. Use `Vibration` instead. - * - * The Vibration API is exposed at VibrationIOS.vibrate(). - * On iOS, calling this function will trigger a one second vibration. - * The vibration is asynchronous so this method will return immediately. - * - * There will be no effect on devices that do not support Vibration, eg. the iOS simulator. - * - * Vibration patterns are currently unsupported. - * - * @see https://facebook.github.io/react-native/docs/vibrationios.html#content - */ - export interface VibrationIOSStatic { - /** - * @deprecated - */ - vibrate(): void - } - - /** - * The Vibration API is exposed at `Vibration.vibrate()`. - * The vibration is asynchronous so this method will return immediately. - * - * There will be no effect on devices that do not support Vibration, eg. the simulator. - * - * **Note for android** - * add `` to `AndroidManifest.xml` - * - * **Android Usage:** - * - * [0, 500, 200, 500] - * V(0.5s) --wait(0.2s)--> V(0.5s) - * - * [300, 500, 200, 500] - * --wait(0.3s)--> V(0.5s) --wait(0.2s)--> V(0.5s) - * - * **iOS Usage:** - * if first argument is 0, it will not be included in pattern array. - * - * [0, 1000, 2000, 3000] - * V(fixed) --wait(1s)--> V(fixed) --wait(2s)--> V(fixed) --wait(3s)--> V(fixed) - */ - export interface VibrationStatic { - vibrate(pattern: number | number[], repeat: boolean): void - - /** - * Stop vibration - */ - cancel(): void - } - - /** - * This class implements common easing functions. The math is pretty obscure, - * but this cool website has nice visual illustrations of what they represent: - * http://xaedes.de/dev/transitions/ - */ - export type EasingFunction = (value: number) => number; - export interface EasingStatic { - step0: EasingFunction; - step1: EasingFunction; - linear: EasingFunction; - ease: EasingFunction; - quad: EasingFunction; - cubic: EasingFunction; - poly: EasingFunction; - sin: EasingFunction; - circle: EasingFunction; - exp: EasingFunction; - elastic: EasingFunction; - back(s: number): EasingFunction; - bounce: EasingFunction; - bezier(x1: number, - y1: number, - x2: number, - y2: number): EasingFunction; - in(easing: EasingFunction): EasingFunction; - out(easing: EasingFunction): EasingFunction; - inOut(easing: EasingFunction): EasingFunction; - } - - export module Animated { - // Most (all?) functions where AnimatedValue is used any subclass of Animated can be used as well. - type AnimatedValue = Animated; - type AnimatedValueXY = ValueXY; - - type Base = Animated; - - class Animated { - // Internal class, no public API. - } - - class AnimatedWithChildren extends Animated { - // Internal class, no public API. - } - - class AnimatedInterpolation extends AnimatedWithChildren { - interpolate(config: InterpolationConfigType): AnimatedInterpolation; - } - - type ExtrapolateType = 'extend' | 'identity' | 'clamp'; - - type InterpolationConfigType = { - inputRange: number[]; - outputRange: (number[] | string[]); - easing?: ((input: number) => number); - extrapolate?: ExtrapolateType; - extrapolateLeft?: ExtrapolateType; - extrapolateRight?: ExtrapolateType; - }; - - type ValueListenerCallback = (state: { value: number }) => void; - - /** - * Standard value for driving animations. One `Animated.Value` can drive - * multiple properties in a synchronized fashion, but can only be driven by one - * mechanism at a time. Using a new mechanism (e.g. starting a new animation, - * or calling `setValue`) will stop any previous ones. - */ - export class Value extends AnimatedWithChildren { - constructor(value: number); - - /** - * Directly set the value. This will stop any animations running on the value - * and update all the bound properties. - */ - setValue(value: number): void; - - /** - * Sets an offset that is applied on top of whatever value is set, whether via - * `setValue`, an animation, or `Animated.event`. Useful for compensating - * things like the start of a pan gesture. - */ - setOffset(offset: number): void; - - /** - * Merges the offset value into the base value and resets the offset to zero. - * The final output of the value is unchanged. - */ - flattenOffset(): void; - - /** - * Adds an asynchronous listener to the value so you can observe updates from - * animations. This is useful because there is no way to - * synchronously read the value because it might be driven natively. - */ - addListener(callback: ValueListenerCallback): string; - - removeListener(id: string): void; - - removeAllListeners(): void; - - /** - * Stops any running animation or tracking. `callback` is invoked with the - * final value after stopping the animation, which is useful for updating - * state to match the animation position with layout. - */ - stopAnimation(callback?: (value: number) => void): void; - - /** - * Interpolates the value before updating the property, e.g. mapping 0-1 to - * 0-10. - */ - interpolate(config: InterpolationConfigType): AnimatedInterpolation; - } - - type ValueXYListenerCallback = (value: { x: number; y: number }) => void; - - /** - * 2D Value for driving 2D animations, such as pan gestures. Almost identical - * API to normal `Animated.Value`, but multiplexed. Contains two regular - * `Animated.Value`s under the hood. - */ - export class ValueXY extends AnimatedWithChildren { - x: AnimatedValue; - y: AnimatedValue; - - constructor(valueIn?: { x: number | AnimatedValue; y: number | AnimatedValue }); - - setValue(value: { x: number; y: number }): void; - - setOffset(offset: { x: number; y: number }): void; - - flattenOffset(): void - - stopAnimation(callback?: (value: {x: number, y: number}) => void): void; - - addListener(callback: ValueXYListenerCallback): string; - - removeListener(id: string): void; - - /** - * Converts `{x, y}` into `{left, top}` for use in style, e.g. - * - *```javascript - * style={this.state.anim.getLayout()} - *``` - */ - getLayout(): { [key: string]: AnimatedValue }; - - /** - * Converts `{x, y}` into a useable translation transform, e.g. - * - *```javascript - * style={{ - * transform: this.state.anim.getTranslateTransform() - * }} - *``` - */ - getTranslateTransform(): { [key: string]: AnimatedValue }[]; - - } - - type EndResult = { finished: boolean }; - type EndCallback = (result: EndResult) => void; - - interface CompositeAnimation { - start: (callback?: EndCallback) => void; - stop: () => void; - } - - interface AnimationConfig { - isInteraction?: boolean; - useNativeDriver?: boolean; - } - - /** - * Animates a value from an initial velocity to zero based on a decay - * coefficient. - */ - export function decay( - value: AnimatedValue | AnimatedValueXY, - config: DecayAnimationConfig - ): CompositeAnimation; - - interface DecayAnimationConfig extends AnimationConfig { - velocity: number | { x: number, y: number }; - deceleration?: number; - } - - /** - * Animates a value along a timed easing curve. The `Easing` module has tons - * of pre-defined curves, or you can use your own function. - */ - export var timing: ( - value: AnimatedValue | AnimatedValueXY, - config: TimingAnimationConfig - ) => CompositeAnimation; - - interface TimingAnimationConfig extends AnimationConfig { - toValue: number | AnimatedValue | { x: number, y: number } | AnimatedValueXY; - easing?: (value: number) => number; - duration?: number; - delay?: number; - } - - interface SpringAnimationConfig extends AnimationConfig { - toValue: number | AnimatedValue | { x: number, y: number } | AnimatedValueXY; - overshootClamping?: boolean; - restDisplacementThreshold?: number; - restSpeedThreshold?: number; - velocity?: number | { x: number, y: number }; - bounciness?: number; - speed?: number; - tension?: number; - friction?: number; - } - - /** - * Creates a new Animated value composed from two Animated values added - * together. - */ - export function add( - a: Animated, - b: Animated - ): AnimatedAddition; - - class AnimatedAddition extends AnimatedInterpolation { } - - /** - * Creates a new Animated value composed from two Animated values multiplied - * together. - */ - export function multiply( - a: Animated, - b: Animated - ): AnimatedMultiplication; - - class AnimatedMultiplication extends AnimatedInterpolation { } - - /** - * Creates a new Animated value that is the (non-negative) modulo of the - * provided Animated value - */ - export function modulo( - a: Animated, - modulus: number - ): AnimatedModulo; - - class AnimatedModulo extends AnimatedInterpolation { } - - /** - * Create a new Animated value that is limited between 2 values. It uses the - * difference between the last value so even if the value is far from the bounds - * it will start changing when the value starts getting closer again. - * (`value = clamp(value + diff, min, max)`). - * - * This is useful with scroll events, for example, to show the navbar when - * scrolling up and to hide it when scrolling down. - */ - export function diffClamp(a: Animated, min: number, max: number): AnimatedDiffClamp; - - class AnimatedDiffClamp extends AnimatedInterpolation {} - - /** - * Starts an animation after the given delay. - */ - export function delay(time: number): CompositeAnimation; - - /** - * Starts an array of animations in order, waiting for each to complete - * before starting the next. If the current running animation is stopped, no - * following animations will be started. - */ - export function sequence( - animations: Array - ): CompositeAnimation; - - /** - * Array of animations may run in parallel (overlap), but are started in - * sequence with successive delays. Nice for doing trailing effects. - */ - - export function stagger( - time: number, - animations: Array - ): CompositeAnimation - - /** - * 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 ( - value: AnimatedValue | AnimatedValueXY, - config: SpringAnimationConfig - ): CompositeAnimation; - - type ParallelConfig = { - stopTogether?: boolean; // If one is stopped, stop all. default: true - } - - /** - * Starts an array of animations all at the same time. By default, if one - * of the animations is stopped, they will all be stopped. You can override - * this with the `stopTogether` flag. - */ - export function parallel ( - animations: Array, - config?: ParallelConfig - ): CompositeAnimation; - - type Mapping = { [key: string]: Mapping } | AnimatedValue; - interface EventConfig { - listener?: Function - } - - /** - * Takes an array of mappings and extracts values from each arg accordingly, - * then calls `setValue` on the mapped outputs. e.g. - * - *```javascript - * onScroll={Animated.event( - * [{nativeEvent: {contentOffset: {x: this._scrollX}}}] - * {listener}, // Optional async listener - * ) - * ... - * onPanResponderMove: Animated.event([ - * null, // raw event arg ignored - * {dx: this._panX}, // gestureState arg - * ]), - *``` - */ - export function event ( - argMapping: Mapping[], - config?: EventConfig - ): (...args: any[]) => void; - - /** - * Make any React component Animatable. Used to create `Animated.View`, etc. - */ - export function createAnimatedComponent (component: any) : any; - - /** - * Animated variants of the basic native views. Accepts Animated.Value for - * props and style. - */ - export var View: any; - export var Image: any; - export var Text: any; - } - - export interface I18nManagerStatic { - isRTL: boolean - allowRTL: (allowRTL: boolean) => {} - forceRTL: (forceRTL: boolean) => {} - } - - export interface GeolocationStatic { - /* - * Invokes the success callback once with the latest location info. Supported - * options: timeout (ms), maximumAge (ms), enableHighAccuracy (bool) - * On Android, this can return almost immediately if the location is cached or - * request an update, which might take a while. - */ - getCurrentPosition(geo_success: (position: GeolocationReturnType) => void, geo_error?: (error: Error) => void, geo_options?: GetCurrentPositionOptions): void - - /* - * Invokes the success callback whenever the location changes. Supported - * options: timeout (ms), maximumAge (ms), enableHighAccuracy (bool), distanceFilter(m) - */ - watchPosition(success: (position: Geolocation) => void, error?: (error: Error) => void, options?: WatchPositionOptions): void - - clearWatch(watchID: number): void - - stopObserving(): void - } - - export interface OpenCameraDialogOptions { - /** Defaults to false */ - videoMode?: boolean - } - - export interface OpenSelectDialogOptions { - /** Defaults to true */ - showImages?: boolean - /** Defaults to false */ - showVideos?: boolean - } - - /** [imageURL|tempImageTag, height, width] */ - export type ImagePickerResult = [string, number, number] - - export interface ImagePickerIOSStatic { - canRecordVideos(callback: (value: boolean) => void): void - canUseCamera(callback: (value: boolean) => void): void - openCameraDialog(config: OpenCameraDialogOptions, successCallback: (args:ImagePickerResult) => void, cancelCallback: (args:any[]) => void): void - openSelectDialog(config: OpenSelectDialogOptions, successCallback: (args:ImagePickerResult) => void, cancelCallback: (args:any[]) => void): void - } - - export interface ImageStoreStatic { - /** - * Check if the ImageStore contains image data for the specified URI. - * @platform ios - */ - hasImageForTag(uri: string, callback: (hasImage: boolean) => void): void - /** - * Delete an image from the ImageStore. Images are stored in memory and - * must be manually removed when you are finished with them, otherwise they - * will continue to use up RAM until the app is terminated. It is safe to - * call `removeImageForTag()` without first calling `hasImageForTag()`, it - * will simply fail silently. - * @platform ios - */ - removeImageForTag(uri: string): void - /** - * Stores a base64-encoded image in the ImageStore, and returns a URI that - * can be used to access or display the image later. Images are stored in - * memory only, and must be manually deleted when you are finished with - * them by calling `removeImageForTag()`. - * - * Note that it is very inefficient to transfer large quantities of binary - * data between JS and native code, so you should avoid calling this more - * than necessary. - * @platform ios - */ - addImageFromBase64( - base64ImageData: string, - success: (uri: string) => void, - failure: (error: any) => void - ): void - /** - * Retrieves the base64-encoded data for an image in the ImageStore. If the - * specified URI does not match an image in the store, the failure callback - * will be called. - * - * Note that it is very inefficient to transfer large quantities of binary - * data between JS and native code, so you should avoid calling this more - * than necessary. To display an image in the ImageStore, you can just pass - * the URI to an `` component; there is no need to retrieve the - * base64 data. - */ - getBase64ForTag( - uri: string, - success: (base64ImageData: string) => void, - failure: (error: any) => void - ): void - } - - // Network Polyfill - // TODO: Add proper support for fetch - export type fetch = (url: string, options?: Object) => Promise - export const fetch: fetch; - - // Timers polyfill - export type timedScheduler = (fn: string | Function, time: number) => number - export type untimedScheduler = (fn: string | Function) => number - export type setTimeout = timedScheduler - export type setInterval = timedScheduler - export type setImmediate = untimedScheduler - export type requestAnimationFrame = untimedScheduler - - export type schedulerCanceller = (id: number) => void - export type clearTimeout = schedulerCanceller - export type clearInterval = schedulerCanceller - export type clearImmediate = schedulerCanceller - export type cancelAnimationFrame = schedulerCanceller - - - export interface TabsReducerStatic { - JumpToAction(index: number): any; - } - - export type TabsReducerFunction = (params: any) => any; - - export interface NavigationTab { - key: string; - } - - export interface NavigationAction { - type: string; - } - - export interface NavigationRoute { - key: string; - title?: string; - } - - export interface NavigationState extends NavigationRoute { - index: number; - routes: NavigationRoute[]; - } - - export type NavigationRenderer = ( - route: NavigationState, - onNavigate: (action: NavigationAction) => boolean - ) => JSX.Element; - - interface SubViewProps extends NavigationSceneRendererProps { - onNavigateBack?(): void; - } - - type SubViewRenderer = (subViewProps: SubViewProps) => JSX.Element | null; - - export interface NavigationHeaderProps extends NavigationSceneRendererProps { - onNavigateBack?(): void, - renderLeftComponent?: SubViewRenderer, - renderRightComponent?: SubViewRenderer, - renderTitleComponent?: SubViewRenderer, - style?: ViewStyle, - viewProps?: any, - statusBarHeight?: number | NavigationAnimatedValue - } - - export interface NavigationHeaderStatic extends React.ComponentClass { - Title: NavigationHeaderTitleStatic - HEIGHT: number - } - - export interface NavigationHeaderTitleProps { - children?: JSX.Element, - style?: ViewStyle, - textStyle?: TextStyle, - viewProps?: any - } - - export interface NavigationHeaderTitleStatic extends React.ComponentClass { - } - - export interface NavigationCardStackProps { - /** - * Custom style applied to the card. - */ - cardStyle?: ViewStyle - /** - * Custom style interpolator for the card. - */ - cardStyleInterpolator?: (props: NavigationSceneRendererProps) => ViewStyle; - /** - * Direction of the cards movement. Value could be `horizontal` or - * `vertical`. Default value is `horizontal`. - */ - direction?: 'horizontal' | 'vertical' - /** - * The distance from the edge of the card which gesture response can start - * for. Defaults value is `30`. - */ - gestureResponseDistance?: number - /** - * Enable gestures. Default value is true - */ - enableGestures?: boolean, - /** - * The controlled navigation state. Typically, the navigation state - * look like this: - * - * ```js - * const navigationState = { - * index: 0, // the index of the selected route. - * routes: [ // A list of routes. - * {key: 'page 1'}, // The 1st route. - * {key: 'page 2'}, // The second route. - * ], - * }; - * ``` - */ - navigationState: NavigationState, - /** - * Callback that is called when the "back" action is performed. - * This happens when the back button is pressed or the back gesture is - * performed. - */ - onNavigateBack?: Function, - /** - * Function that renders the header. - */ - renderHeader?: NavigationSceneRenderer, - /** - * Function that renders the a scene for a route. - */ - renderScene: NavigationSceneRenderer, - /** - * Custom style applied to the cards stack. - */ - style?: ViewStyle, - } - - // Object Instances - - export type NavigationAnimatedValue = Animated.Value; - - // Value & Structs. - - export type NavigationGestureDirection = 'horizontal' | 'vertical'; - - export type NavigationLayout = { - height: NavigationAnimatedValue, - initHeight: number, - initWidth: number, - isMeasured: boolean, - width: NavigationAnimatedValue, - }; - - export type NavigationScene = { - index: number, - isActive: boolean, - isStale: boolean, - key: string, - route: NavigationRoute, - }; - - // Similar to `NavigationTransitionProps`, except that the prop `scene` - // represents the scene for the renderer to render. - export interface NavigationSceneRendererProps { - layout: NavigationLayout, - navigationState: NavigationState, - position: NavigationAnimatedValue, - progress: NavigationAnimatedValue, - scenes: Array, - scene: NavigationScene, - gestureResponseDistance?: number, - } - - export interface NavigationSceneRenderer extends React.StatelessComponent { - } - - export interface NavigationPropTypes { - // helpers - extractSceneRendererProps(props: NavigationSceneRendererProps): NavigationSceneRendererProps - - // Bundled propTypes. - SceneRendererProps: { - layout: string, - navigationState: string, - position: string, - progress: string, - scene: string, - scenes: NavigationScene[], - } - - // propTypes - SceneRenderer: any, // TODO: fix this - action: NavigationAction, - navigationState: NavigationState, - navigationRoute: NavigationRoute, - panHandlers: GestureResponderHandlers, - } - - export interface NavigationCardProps extends React.ComponentClass { - onComponentRef: (ref: any) => void, - onNavigateBack?: Function, - panHandlers?: GestureResponderHandlers, - pointerEvents: string, - renderScene: NavigationSceneRenderer, - style?: ViewStyle, - } - - export interface NavigationCardStackStatic extends React.ComponentClass { - } - - export interface NavigationCardStatic extends React.ComponentClass { - } - - /** - * Utilities to perform atomic operation with navigate state and routes. - * - * ```javascript - * const state1 = {key: 'page 1'}; - * const state2 = NavigationStateUtils.push(state1, {key: 'page 2'}); - * ``` - */ - export interface NavigationStateUtils { - get(state: NavigationState, key: string): NavigationRoute - indexOf(state: NavigationState, key: string): number - has(state: NavigationState, key: string): boolean - push(state: NavigationState, route: NavigationRoute): NavigationState - pop(state: NavigationState): NavigationState - jumpToIndex(state: NavigationState, index: number): NavigationState - jumpTo(state: NavigationState, key: string): NavigationState - back(state: NavigationState): NavigationState - forward(state: NavigationState): NavigationState - replaceAt( - state: NavigationState, - key: string, - route: NavigationRoute - ): NavigationState - replaceAtIndex( - state: NavigationState, - index: number, - route: NavigationRoute - ): NavigationState - reset( - state: NavigationState, - routes: Array, - index?: number - ): NavigationState - } - - export type NavigationTransitionProps = { - // The layout of the transitioner of the scenes. - layout: NavigationLayout, - - // The navigation state of the transitioner. - navigationState: NavigationState, - - // The progressive index of the transitioner's navigation state. - position: NavigationAnimatedValue, - - // The value that represents the progress of the transition when navigation - // state changes from one to another. Its numberic value will range from 0 - // to 1. - // progress.__getAnimatedValue() < 1 : transtion is happening. - // progress.__getAnimatedValue() == 1 : transtion completes. - progress: NavigationAnimatedValue, - - // All the scenes of the transitioner. - scenes: Array, - - // The active scene, corresponding to the route at - // `navigationState.routes[navigationState.index]`. - scene: NavigationScene, - - // The gesture distance for `horizontal` and `vertical` transitions - gestureResponseDistance?: number, - } - export type NavigationTransitionSpec = { - duration?: number, - // An easing function from `Easing`. - easing?: EasingFunction, - // A timing function such as `Animated.timing`. - timing?: (value: NavigationAnimatedValue, config: any) => any, - } - export interface NavigationTransitionerProps { - configureTransition?: ( - a: NavigationTransitionProps, - b?: NavigationTransitionProps - ) => NavigationTransitionSpec, - navigationState: NavigationState, - onTransitionEnd?: () => void, - onTransitionStart?: () => void, - render: (a: NavigationTransitionProps, b?: NavigationTransitionProps) => any, - style: any, - } - - export interface NavigationTransitioner extends React.ComponentClass { - } - - export interface NavigationCard extends React.ComponentClass { - } - - export interface NavigationExperimentalStatic { - // Core - StateUtils: NavigationStateUtils - - // Views - Transitioner: NavigationTransitioner, - - //AnimatedView: NavigationAnimatedViewStatic; - // CustomComponents: - Card: NavigationCard, - CardStack: NavigationCardStackStatic; - Header: NavigationHeaderStatic; - - PropTypes: NavigationPropTypes, - } - - // - // Interfacing with Native Modules - // https://facebook.github.io/react-native/docs/native-modules-ios.html - // - - export interface NativeEventSubscription { - /** - * Call this method to un-subscribe from a native-event - */ - remove(): void; - } - - /** - * Receive events from native-code - * Deprecated - subclass NativeEventEmitter to create granular event modules instead of - * adding all event listeners directly to RCTNativeAppEventEmitter. - * @see https://github.com/facebook/react-native/blob/0.34-stable\Libraries\EventEmitter\RCTNativeAppEventEmitter.js - * @see https://facebook.github.io/react-native/docs/native-modules-ios.html#sending-events-to-javascript - */ - type RCTNativeAppEventEmitter = DeviceEventEmitterStatic - - interface ImageCropData { - /** - * The top-left corner of the cropped image, specified in the original - * image's coordinate space. - */ - offset: { - x: number; - y: number; - } - - /** - * The size (dimensions) of the cropped image, specified in the original - * image's coordinate space. - */ - size: { - width: number; - height: number; - } - - /** - * (Optional) size to scale the cropped image to. - */ - displaySize?: { width: number, height: number } - - /** - * (Optional) the resizing mode to use when scaling the image. If the - * `displaySize` param is not specified, this has no effect. - */ - resizeMode?: 'contain' | 'cover' | 'stretch' - } - - interface ImageEditorStatic { - /** - * Crop the image specified by the URI param. If URI points to a remote - * image, it will be downloaded automatically. If the image cannot be - * loaded/downloaded, the failure callback will be called. - * - * If the cropping process is successful, the resultant cropped image - * will be stored in the ImageStore, and the URI returned in the success - * callback will point to the image in the store. Remember to delete the - * cropped image from the ImageStore when you are done with it. - */ - cropImage( uri: string, cropData: ImageCropData, success: (uri: string) => void, failure: (error: Object) => void ): void - } - - export interface ARTShapeProps { - d: string, - strokeWidth: number, - strokeDash?: number[], - stroke: string - } - - export interface ARTSurfaceProps { - style: ViewStyle, - width: number, - height: number - } - - export interface ShapeStatic extends React.ComponentClass { - } - - export interface SurfaceStatic extends React.ComponentClass { - } - - export interface ARTStatic { - Shape: ShapeStatic, - Surface: SurfaceStatic - } - - export interface KeyboardStatic extends NativeEventEmitter { - dismiss: ()=>void - } - - ////////////////////////////////////////////////////////////////////////// - // - // R E - E X P O R T S - // - ////////////////////////////////////////////////////////////////////////// - - // TODO: The following components need to be added - // - [ ] ART - export var ART: ARTStatic - export type ART = ARTStatic - - export var ActivityIndicator: ActivityIndicatorStatic - export type ActivityIndicator = ActivityIndicatorStatic - - export var ActivityIndicatorIOS: ActivityIndicatorIOSStatic - export type ActivityIndicatorIOS = ActivityIndicatorIOSStatic - - export var DatePickerIOS: DatePickerIOSStatic - export type DatePickerIOS = DatePickerIOSStatic - - export var DrawerLayoutAndroid: DrawerLayoutAndroidStatic - export type DrawerLayoutAndroid = DrawerLayoutAndroidStatic - - export var Image: ImageStatic - export type Image = ImageStatic - - export var ImagePickerIOS: ImagePickerIOSStatic - export type ImagePickerIOS = ImagePickerIOSStatic - - export var LayoutAnimation: LayoutAnimationStatic - export type LayoutAnimation = LayoutAnimationStatic - - export var ListView: ListViewStatic - export type ListView = ListViewStatic - - export var MapView: MapViewStatic - export type MapView = MapViewStatic - - export var Modal: ModalStatic - export type Modal = ModalStatic - - export var Navigator: NavigatorStatic - export type Navigator = NavigatorStatic - - export var NavigatorIOS: NavigatorIOSStatic - export type NavigatorIOS = NavigatorIOSStatic - - export var Picker: PickerStatic - export type Picker = PickerStatic - - export var PickerIOS: PickerIOSStatic - export type PickerIOS = PickerIOSStatic - - export var ProgressBarAndroid: ProgressBarAndroidStatic - export type ProgressBarAndroid = ProgressBarAndroidStatic - - export var ProgressViewIOS: ProgressViewIOSStatic - export type ProgressViewIOS = ProgressViewIOSStatic - - export var RefreshControl: RefreshControlStatic - export type RefreshControl = RefreshControlStatic - - export var RecyclerViewBackedScrollView: RecyclerViewBackedScrollViewStatic - export type RecyclerViewBackedScrollView = RecyclerViewBackedScrollViewStatic - - export var SegmentedControlIOS: SegmentedControlIOSStatic - export type SegmentedControlIOS = SegmentedControlIOSStatic - - export var Slider: SliderStatic - export type Slider = SliderStatic - - export var SliderIOS: SliderStatic - export type SliderIOS = SliderStatic - - export var StatusBar: StatusBarStatic - export type StatusBar = StatusBarStatic - - export var ScrollView: ScrollViewStatic - export type ScrollView = ScrollViewStatic - - export var SnapshotViewIOS: SnapshotViewIOSStatic - export type SnapshotViewIOS = SnapshotViewIOSStatic - - export var Systrace: SystraceStatic - export type Systrace = SystraceStatic - - export var SwipeableListView: SwipeableListViewStatic - export type SwipeableListView = SwipeableListViewStatic - - export var Switch: SwitchStatic - export type Switch = SwitchStatic - - export var SwitchIOS: SwitchIOSStatic - export type SwitchIOS = SwitchIOSStatic - - export var TabBarIOS: TabBarIOSStatic - export type TabBarIOS = TabBarIOSStatic - - export var Text: TextStatic - export type Text = TextStatic - - export var TextInput: TextInputStatic - export type TextInput = TextInputStatic - - export var ToolbarAndroid: ToolbarAndroidStatic - export type ToolbarAndroid = ToolbarAndroidStatic - - export var TouchableHighlight: TouchableHighlightStatic - export type TouchableHighlight = TouchableHighlightStatic - - export var TouchableNativeFeedback: TouchableNativeFeedbackStatic - export type TouchableNativeFeedback = TouchableNativeFeedbackStatic - - export var TouchableOpacity: TouchableOpacityStatic - export type TouchableOpacity = TouchableOpacityStatic - - export var TouchableWithoutFeedback: TouchableWithoutFeedbackStatic - export type TouchableWithoutFeedback = TouchableWithoutFeedbackStatic - - export var View: ViewStatic - export type View = ViewStatic - - export var ViewPagerAndroid: ViewPagerAndroidStatic - export type ViewPagerAndroid = ViewPagerAndroidStatic - - export var WebView: WebViewStatic - export type WebView = WebViewStatic - - - //////////// APIS ////////////// - export var ActionSheetIOS: ActionSheetIOSStatic - export type ActionSheetIOS = ActionSheetIOSStatic - - export var Share: ShareStatic - export type Share = ShareStatic - - export var AdSupportIOS: AdSupportIOSStatic - export type AdSupportIOS = AdSupportIOSStatic - - export var Alert: AlertStatic - export type Alert = AlertStatic - - export var AlertAndroid: AlertAndroidStatic - export type AlertAndroid = AlertAndroidStatic - - export var AlertIOS: AlertIOSStatic - export type AlertIOS = AlertIOSStatic - - export var AppState: AppStateStatic; - export type AppState = AppStateStatic; - - export var AppStateIOS: AppStateStatic - export type AppStateIOS = AppStateStatic - - export var AsyncStorage: AsyncStorageStatic - export type AsyncStorage = AsyncStorageStatic - - export var BackAndroid: BackAndroidStatic - export type BackAndroid = BackAndroidStatic - - export var Button: ButtonStatic - export type Button = ButtonStatic - - export var CameraRoll: CameraRollStatic - export type CameraRoll = CameraRollStatic - - export var Clipboard: ClipboardStatic - export type Clipboard = ClipboardStatic - - export var DatePickerAndroid: DatePickerAndroidStatic - export type DatePickerAndroid = DatePickerAndroidStatic - - export var Geolocation: GeolocationStatic - export type Geolocation = GeolocationStatic - - /** http://facebook.github.io/react-native/blog/2016/08/19/right-to-left-support-for-react-native-apps.html */ - export var I18nManager: I18nManagerStatic - export type I18nManager = I18nManagerStatic - - export var ImageEditor: ImageEditorStatic - export type ImageEditor = ImageEditorStatic - - export var ImageStore: ImageStoreStatic - export type ImageStore = ImageStoreStatic - - export var InteractionManager: InteractionManagerStatic - - export var IntentAndroid: IntentAndroidStatic - export type IntentAndroid = IntentAndroidStatic - - export var Keyboard: KeyboardStatic - - export var KeyboardAvoidingView: KeyboardAvoidingViewStatic - export type KeyboardAvoidingView = KeyboardAvoidingViewStatic - - export var Linking: LinkingStatic - export type Linking = LinkingStatic - - export var LinkingIOS: LinkingIOSStatic - export type LinkingIOS = LinkingIOSStatic - - export var NativeMethodsMixin: NativeMethodsMixinStatic - export type NativeMethodsMixin = NativeMethodsMixinStatic - - export var NativeComponent: NativeMethodsMixinStatic - export type NativeComponent = NativeMethodsMixinStatic - - export var NetInfo: NetInfoStatic - export type NetInfo = NetInfoStatic - - export var PanResponder: PanResponderStatic - export type PanResponder = PanResponderStatic - - export var PermissionsAndroid: PermissionsAndroidStatic - export type PermissionsAndroid = PermissionsAndroidStatic - - export var PushNotificationIOS: PushNotificationIOSStatic - export type PushNotificationIOS = PushNotificationIOSStatic - - export var Settings: SettingsStatic - export type Settings = SettingsStatic - - export var StatusBarIOS: StatusBarIOSStatic - export type StatusBarIOS = StatusBarIOSStatic - - export var TimePickerAndroid: TimePickerAndroidStatic - export type TimePickerAndroid = TimePickerAndroidStatic - - export var ToastAndroid: ToastAndroidStatic - export type ToastAndroid = ToastAndroidStatic - - export var UIManager: UIManagerStatic - export type UIManager = UIManagerStatic - - export var VibrationIOS: VibrationIOSStatic - export type VibrationIOS = VibrationIOSStatic - - export var Vibration: VibrationStatic - export type Vibration = VibrationStatic - - export var Dimensions: Dimensions; - export var ShadowPropTypesIOS: ShadowPropTypesIOSStatic; - - export type NavigationExperimental = NavigationExperimentalStatic; - export var NavigationExperimental: NavigationExperimentalStatic; - - export type Easing = EasingStatic; - export var Easing: EasingStatic; - - //////////// Plugins ////////////// - - export var DeviceEventEmitter: DeviceEventEmitterStatic - /** - * Abstract base class for implementing event-emitting modules. This implements - * a subset of the standard EventEmitter node module API. - */ - export interface NativeEventEmitter extends EventEmitter {} - export var NativeEventEmitter: NativeEventEmitter - /** - * Deprecated - subclass NativeEventEmitter to create granular event modules instead of - * adding all event listeners directly to RCTNativeAppEventEmitter. - */ - export var NativeAppEventEmitter: RCTNativeAppEventEmitter - /** - * Native Modules written in ObjectiveC/Swift/Java exposed via the RCTBridge - * Define lazy getters for each module. These will return the module if already loaded, or load it if not. - * See https://facebook.github.io/react-native/docs/native-modules-ios.html - * Use: - * const MyModule = NativeModules.ModuleName - */ - export var NativeModules: any - export var Platform: PlatformStatic - export var PixelRatio: PixelRatioStatic - - export interface ComponentInterface

{ - name?: string; - displayName?: string; - propTypes: P - } - - /** - * Used to create React components that directly wrap native component - * implementations. Config information is extracted from data exported from the - * UIManager module. You should also wrap the native component in a - * hand-written component with full propTypes definitions and other - * documentation - pass the hand-written component in as `componentInterface` to - * verify all the native props are documented via `propTypes`. - * - * If some native props shouldn't be exposed in the wrapper interface, you can - * pass null for `componentInterface` and call `verifyPropTypes` directly - * with `nativePropsToIgnore`; - * - * Common types are lined up with the appropriate prop differs with - * `TypeToDifferMap`. Non-scalar types not in the map default to `deepDiffer`. - */ - export function requireNativeComponent

( - viewName: string, - componentInterface?: ComponentInterface

, - extraConfig?: {nativeOnly?: any} - ): React.ComponentClass

; - - export function processColor(color: any): number; - - ////////////////////////////////////////////////////////////////////////// - // - // Additional ( and controversial) - // - ////////////////////////////////////////////////////////////////////////// - - export function __spread(target: any, ...sources: any[]): any; - - export interface GlobalStatic { - - /** - * Accepts a function as its only argument and calls that function before the next repaint. - * It is an essential building block for animations that underlies all of the JavaScript-based animation APIs. - * In general, you shouldn't need to call this yourself - the animation API's will manage frame updates for you. - * @see https://facebook.github.io/react-native/docs/animations.html#requestanimationframe - */ - requestAnimationFrame(fn: () => void): void; - - } - - // - // Add-Ons - // - namespace addons { - - //FIXME: Documentation ? - export interface TestModuleStatic { - - verifySnapshot: (done: (indicator?: any) => void) => void - markTestPassed: (indicator: any) => void - markTestCompleted: () => void - } - - export var TestModule: TestModuleStatic - export type TestModule = TestModuleStatic - } - - // - // Prop Types - // - export var ColorPropType: Requireable - export var EdgeInsetsPropType: Requireable - export var PointPropType: Requireable -} - -declare global { - const global: React.GlobalStatic; - function require(name: string): any; - - /** - * This variable is set to true when react-native is running in Dev mode - * Typical usage: - * if (__DEV__) console.log('Running in dev mode') - */ - var __DEV__: boolean -} diff --git a/react-notification-system-redux/index.d.ts b/react-notification-system-redux/index.d.ts deleted file mode 100644 index 5820a48da5..0000000000 --- a/react-notification-system-redux/index.d.ts +++ /dev/null @@ -1,40 +0,0 @@ -// Type definitions for react-notification-system-redux 1.0 -// Project: https://github.com/gor181/react-notification-system-redux -// Definitions by: Karol Janyst -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.1 - -import { Component } from "react"; -import { Action } from "redux"; -import { Attributes, Notification } from "react-notification-system"; - -export as namespace Notifications; - -export = Notifications; - -declare class Notifications extends Component {} - -declare namespace Notifications { - - export type NotificationsState = Notification[]; - - export type NotificationLevel = "error" | "warning" | "info" | "success"; - - export type NotificationsReducer = (state: NotificationsState, action: A) => NotificationsState; - - export type NotificationShow = (opts?: Notification) => Action; - - export interface NotificationsProps extends Attributes { - notifications?: Notification[]; - } - - export 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; -} - diff --git a/react-paginate/react-paginate-tests.tsx b/react-paginate/react-paginate-tests.tsx deleted file mode 100644 index 42a7c49c30..0000000000 --- a/react-paginate/react-paginate-tests.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import * as React from "react"; -import ReactPaginate = require("react-paginate"); - -class Test extends React.Component<{}, {}> { - public render() { - return ( - - ); - } -} diff --git a/react-sticky/index.d.ts b/react-sticky/index.d.ts deleted file mode 100644 index 2126d582ef..0000000000 --- a/react-sticky/index.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -// Type definitions for react-sticky 5.0 -// Project: https://github.com/captivationsoftware/react-sticky -// Definitions by: Matej Lednicky , Curtis Warren -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.1 - -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; - -} - diff --git a/react-svg-pan-zoom/index.d.ts b/react-svg-pan-zoom/index.d.ts deleted file mode 100644 index 837890a507..0000000000 --- a/react-svg-pan-zoom/index.d.ts +++ /dev/null @@ -1,198 +0,0 @@ -// Type definitions for react-svg-pan-zoom 2.5 -// Project: https://github.com/chrvadala/react-svg-pan-zoom#readme -// Definitions by: Huy Nguyen -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.2 -import * as React from 'react'; - -declare module 'react-svg-pan-zoom' { - - // 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 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 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 -} - - diff --git a/reactcss/index.d.ts b/reactcss/index.d.ts deleted file mode 100644 index 2d571674f7..0000000000 --- a/reactcss/index.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Type definitions for ReactCSS v1.0.0 -// Project: http://reactcss.com/ -// Definitions by: Karol Janyst -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.1 - -import * as React from "react" - - -interface LoopableProps { - "first-child"?: boolean - "last-child"?: boolean - even?: boolean - odd?: boolean - [nthChild: string]: boolean -} - -interface HoverProps { - hover?: boolean -} - -interface Classes { - default: any - [scope: string]: any -} - -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 diff --git a/reactcss/reactcss-tests.tsx b/reactcss/reactcss-tests.tsx deleted file mode 100644 index 058958c7bf..0000000000 --- a/reactcss/reactcss-tests.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import * as React from "react" -import { StatelessComponent } from "react" -import { render } from "react-dom" -import { default as reactCSS, hover, loop, LoopableProps, HoverProps } from "reactcss" - -interface TestProps extends HoverProps { } - -var styles: any = reactCSS({ - default: {}, - hover: {} -}, { hover: true }) - -var loopProps: LoopableProps = loop(1, 10) - -var TestComponent: StatelessComponent -var Test = hover(TestComponent) - -render( - , - document.getElementById("main") -) diff --git a/reduce-reducers/reduce-reducers-tests.ts b/reduce-reducers/reduce-reducers-tests.ts deleted file mode 100644 index d5eeb02633..0000000000 --- a/reduce-reducers/reduce-reducers-tests.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { - Reducer, - Action, -} from 'redux'; -import reduceReducers from 'reduce-reducers'; - -interface TestStore { - 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); diff --git a/redux-logger/index.d.ts b/redux-logger/index.d.ts deleted file mode 100644 index 257f070d44..0000000000 --- a/redux-logger/index.d.ts +++ /dev/null @@ -1,49 +0,0 @@ -// Type definitions for redux-logger v2.6.0 -// Project: https://github.com/fcomb/redux-logger -// Definitions by: Alexander Rusakov -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -import * as Redux from "redux"; - -// Trickery to get TypeScript to accept that our anonymous, non-default export is a function. -// see https://github.com/Microsoft/TypeScript/issues/3612 for more -declare namespace createLogger { - export type LoggerPredicate = (getState: () => any, action: any) => boolean; - - export type StateToString = (state: any) => string; - export type ActionToString = (action: any) => string; - export type ErrorToString = (error: any, prevState: any) => string; - - export interface ColorsObject { - title?: boolean | ActionToString; - prevState?: boolean | StateToString; - action?: boolean | ActionToString; - nextState?: boolean | StateToString; - error?: boolean | ErrorToString; - } - - export interface LevelObject { - prevState?: string | boolean | StateToString; - action?: string | boolean | ActionToString; - nextState?: string | boolean | StateToString; - error?: string | boolean | ErrorToString; - } - - export interface ReduxLoggerOptions { - level?: string | ActionToString | LevelObject; - duration?: boolean; - timestamp?: boolean; - colors?: ColorsObject; - logger?: any; - logErrors?: boolean; - collapsed?: boolean | LoggerPredicate; - predicate?: LoggerPredicate; - stateTransformer?: (state: any) => any; - actionTransformer?: (action: any) => any; - errorTransformer?: (error: any) => any; - diff?: boolean; - diffPredicate?: LoggerPredicate; - } -} -declare function createLogger(options?: createLogger.ReduxLoggerOptions): Redux.Middleware; -export = createLogger; diff --git a/redux-persist-transform-compress/index.d.ts b/redux-persist-transform-compress/index.d.ts deleted file mode 100644 index 2f8fb7f366..0000000000 --- a/redux-persist-transform-compress/index.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -// Type definitions for redux-persist-transform-compress 4.1 -// Project: https://github.com/rt2zz/redux-persist-transform-compress -// Definitions by: Karol Janyst -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -import { PersistConfig, PersistTransformer } from "redux-persist"; - -export = createCompressor; -declare function createCompressor (config?: PersistConfig): PersistTransformer; diff --git a/redux-persist-transform-compress/redux-persist-transform-compress-tests.ts b/redux-persist-transform-compress/redux-persist-transform-compress-tests.ts deleted file mode 100644 index b445171cb9..0000000000 --- a/redux-persist-transform-compress/redux-persist-transform-compress-tests.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { createStore, Reducer, Store } from "redux" -import { createPersistor, Persistor, PersistTransformer } from "redux-persist" -import createCompressor = require("redux-persist-transform-compress") - -const reducer: Reducer = (state: any, action: any) => ({}) - -const compressor: PersistTransformer = createCompressor({ whitelist : ["foo"] }) - -const store: Store = createStore(reducer) - -const persistor: Persistor = createPersistor(store, { transforms : [compressor] }) diff --git a/redux-persist-transform-encrypt/index.d.ts b/redux-persist-transform-encrypt/index.d.ts deleted file mode 100644 index 048f02221f..0000000000 --- a/redux-persist-transform-encrypt/index.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -// Type definitions for redux-persist-transform-encrypt 0.1 -// Project: https://github.com/maxdeviant/redux-persist-transform-encrypt#readme -// Definitions by: Karol Janyst -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -import { PersistTransformer } from "redux-persist"; - -export as namespace ReduxPersistEncryptor; - -export = createEncryptor; - -declare function createEncryptor (config: createEncryptor.EncryptorConfig): PersistTransformer; - -declare namespace createEncryptor { - export interface EncryptorConfig { - secretKey: string; - } -} diff --git a/redux-persist-transform-encrypt/redux-persist-transform-encrypt-tests.ts b/redux-persist-transform-encrypt/redux-persist-transform-encrypt-tests.ts deleted file mode 100644 index b3a70dc776..0000000000 --- a/redux-persist-transform-encrypt/redux-persist-transform-encrypt-tests.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { createStore, Reducer, Store } from "redux" -import { createPersistor, Persistor, PersistTransformer } from "redux-persist" -import { EncryptorConfig } from "redux-persist-transform-encrypt" -import * as createEncryptor from "redux-persist-transform-encrypt" - -const reducer: Reducer = (state: any, action: any) => ({}) - -const config: EncryptorConfig = { secretKey : "foo" } -const encryptor: PersistTransformer = createEncryptor(config) - -const store: Store = createStore(reducer) - -const persistor: Persistor = createPersistor(store, { transforms : [encryptor] }) diff --git a/redux-persist-transform-filter/redux-persist-transform-filter-tests.ts b/redux-persist-transform-filter/redux-persist-transform-filter-tests.ts deleted file mode 100644 index a19f7610e4..0000000000 --- a/redux-persist-transform-filter/redux-persist-transform-filter-tests.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { createStore, Reducer, Store } from "redux" -import { createPersistor, Persistor, PersistTransformer } from "redux-persist" -import createFilter from "redux-persist-transform-filter" - -const reducer: Reducer = (state: any, action: any) => ({}) - -const filter: PersistTransformer = createFilter( - "foo", - ["foo.bar"], - ["fizz.buzz"] -) - -const store: Store = createStore(reducer) - -const persistor: Persistor = createPersistor(store, { transforms : [filter] }) diff --git a/redux-persist/constants.d.ts b/redux-persist/constants.d.ts deleted file mode 100644 index 93d3249dda..0000000000 --- a/redux-persist/constants.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export const KEY_PREFIX: string; -export const REHYDRATE: string; diff --git a/redux-persist/index.d.ts b/redux-persist/index.d.ts deleted file mode 100644 index c8d099d5e6..0000000000 --- a/redux-persist/index.d.ts +++ /dev/null @@ -1,66 +0,0 @@ -// Type definitions for redux-persist 4.0 -// Project: https://github.com/rt2zz/redux-persist -// Definitions by: Karol Janyst -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -import { Action, GenericStoreEnhancer, Store } from "redux"; - -export interface PersistAction extends Action { - payload?: S; - error?: any; -} - -export interface PersistorRehydrateOptions { - serial?: boolean; -} - -export interface Persistor { - purge(keys?: string[]): void; - rehydrate(incoming: A, options?: PersistorRehydrateOptions): A; - pause(): void; - resume(): void; -} - -export type PersistCallback = (err: any, response?: A) => void; - -export interface PersistTransformer { - in(state: any, key: string): any; - out(state: any, key: string): any; -} - -export interface PersistStorage { - setItem(key: string, value: any, callback?: PersistCallback): Promise; - getItem(key: string, callback?: PersistCallback): Promise; - removeItem(key: string, callback?: PersistCallback): Promise; - getAllKeys(callback?: PersistCallback): Promise; - [key: string]: any; -} - -export type PersistStateReconciler = (state: A, inboundState: B, reducedState: C, log?: boolean) => C; - -export interface PersistAutoRehydrateConfig { - stateReconcile?: PersistStateReconciler; -} - -export interface PersistConfig { - whitelist?: string[]; - blacklist?: string[]; - transforms?: PersistTransformer[]; - storage?: PersistStorage; - debounce?: number; - keyPrefix?: string; - serialize?: (data: any) => string; - deserialize?: (data: string) => any; -} - -export function autoRehydrate (config?: PersistAutoRehydrateConfig): GenericStoreEnhancer; - -export function createPersistor (store: Store, config?: PersistConfig): Persistor; - -export function createTransform (inbound: any, outbound: any, config?: PersistConfig): PersistTransformer; - -export function getStoredState(config?: PersistConfig, callback?: PersistCallback): Promise; - -export function persistStore (store: Store, config?: PersistConfig, callback?: PersistCallback): Persistor; - -export function purgeStoredState (config?: PersistConfig, keys?: string[]): Promise; diff --git a/redux-persist/package.json b/redux-persist/package.json deleted file mode 100644 index 36ce503807..0000000000 --- a/redux-persist/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "redux": "^3.6.0" - } -} diff --git a/redux-persist/redux-persist-tests.ts b/redux-persist/redux-persist-tests.ts deleted file mode 100644 index 59885a292a..0000000000 --- a/redux-persist/redux-persist-tests.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { createStore, Store, Reducer } from "redux" -import { - autoRehydrate, - createPersistor, - createTransform, - getStoredState, - persistStore, - purgeStoredState, - PersistConfig, - PersistAutoRehydrateConfig, - PersistCallback, - Persistor, - PersistorRehydrateOptions, - PersistTransformer -} from "redux-persist" -import { KEY_PREFIX, REHYDRATE } from "redux-persist/constants" -import { asyncLocalStorage, asyncSessionStorage } from "redux-persist/storages" - -const reducer: Reducer = (state: any, action: any) => ({}) - -const persistCallback: PersistCallback = (err: any, response: any) => {} - -const transform: PersistTransformer = createTransform({}, {}, { whitelist : ["foo"] }) - -const persistConfig: PersistConfig = { - blacklist : ["foo"], - whitelist : ["bar"], - storage : asyncLocalStorage, - transforms : [transform], - debounce : 1000, - keyPrefix : KEY_PREFIX -} - -const rehydrateOptions: PersistorRehydrateOptions = { serial : true } - -const autoRehydrateConfig: PersistAutoRehydrateConfig = { - stateReconcile: (state: any, inboundState: any, reducedState: any, log: boolean) => ({}) -} - -const store: Store = createStore(reducer, autoRehydrate(autoRehydrateConfig)) -const persistor: Persistor = persistStore(store, persistConfig, persistCallback) - -purgeStoredState({ whitelist : ["foo"] }, ["bar"]) - -getStoredState(persistConfig, (err: any, restoredState: any) => { - const store: Store = createStore(reducer, restoredState) - const persistor: Persistor = createPersistor(store, persistConfig) - const secondaryPersistor: Persistor = createPersistor(store, { storage : asyncSessionStorage }) - persistor.pause() - persistor.resume() - persistor.purge(["foo", "bar"]) - persistor.rehydrate(restoredState, rehydrateOptions) -}) diff --git a/redux-persist/storages.d.ts b/redux-persist/storages.d.ts deleted file mode 100644 index b798ed2664..0000000000 --- a/redux-persist/storages.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { PersistStorage } from "redux-persist"; - -export const asyncLocalStorage: PersistStorage; -export const asyncSessionStorage: PersistStorage; diff --git a/redux-persist/tsconfig.json b/redux-persist/tsconfig.json deleted file mode 100644 index 53bbe4f198..0000000000 --- a/redux-persist/tsconfig.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "compilerOptions": { - "module": "commonjs", - "lib": [ - "es6" - ], - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": true, - "baseUrl": "../", - "typeRoots": [ - "../" - ], - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.d.ts", - "constants.d.ts", - "storages.d.ts", - "redux-persist-tests.ts" - ] -} \ No newline at end of file diff --git a/redux-promise-middleware/package.json b/redux-promise-middleware/package.json deleted file mode 100644 index 36ce503807..0000000000 --- a/redux-promise-middleware/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "redux": "^3.6.0" - } -} diff --git a/redux-router/package.json b/redux-router/package.json deleted file mode 100644 index 36ce503807..0000000000 --- a/redux-router/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "redux": "^3.6.0" - } -} diff --git a/rx-lite-backpressure/rx-lite-backpressure-tests.ts b/rx-lite-backpressure/rx-lite-backpressure-tests.ts deleted file mode 100644 index 6c312691f7..0000000000 --- a/rx-lite-backpressure/rx-lite-backpressure-tests.ts +++ /dev/null @@ -1,19 +0,0 @@ -// Tests for RxJS-BackPressure TypeScript definitions -// Tests by Igor Oleinikov - -function testPausable() { - var o: Rx.Observable = {} as any; - - var pauser = new Rx.Subject(); - - var p = o.pausable(pauser); - p = o.pausableBuffered(pauser); -} - -function testControlled() { - var o: Rx.Observable = {} as any; - var c = o.controlled(); - - var d: Rx.IDisposable = c.request(); - d = c.request(5); -} diff --git a/scripts/fix-tslint.ts b/scripts/fix-tslint.ts index 940257e945..a54f4c7386 100644 --- a/scripts/fix-tslint.ts +++ b/scripts/fix-tslint.ts @@ -2,16 +2,11 @@ /// -import assert = require("assert"); -import * as fs from 'fs'; -import * as path from 'path'; +import * as fs from "fs"; +import * as path from "path"; import JSON = require("comment-json"); -function repeat(s: string, count: number) { - return Array(count + 1).join(s); -} - -const home = path.join(__dirname, '..'); +const home = path.join(__dirname, "..", "types"); for (const dirName of fs.readdirSync(home)) { if (dirName.startsWith(".") || dirName === "node_modules" || dirName === "scripts") { diff --git a/scripts/lint.js b/scripts/lint.js index 4d47ce3406..84ef71259d 100644 --- a/scripts/lint.js +++ b/scripts/lint.js @@ -4,9 +4,11 @@ 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(pkg, symlinkedTslintPath)) ? symlinkedTslintPath : "../node_modules/tslint"; +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); @@ -17,7 +19,7 @@ console.log(cmd); try { // Child process writes directly to our own stdout - execSync(cmd, { cwd: pkg, stdio: "inherit" }); + execSync(cmd, { cwd: pkgPath, stdio: "inherit" }); } catch (_) { // Process should have printed out error info } diff --git a/scripts/not-needed.js b/scripts/not-needed.js index 2462f3f2e2..e17b3ac6ce 100644 --- a/scripts/not-needed.js +++ b/scripts/not-needed.js @@ -13,7 +13,7 @@ if (process.argv.length !== 5 && process.argv.length !== 6) { process.exit(1); } -rmdirRecursive(typingsPackageName); +rmdirRecursive(path.join("types", typingsPackageName)); const notNeededPackages = JSON.parse(fs.readFileSync("notNeededPackages.json", "utf-8")); notNeededPackages.packages.push({ libraryName, typingsPackageName, sourceRepoURL, asOfVersion }); notNeededPackages.packages.sort((x, y) => x.typingsPackageName < y.typingsPackageName ? -1 : 1); diff --git a/scripts/tsconfig.json b/scripts/tsconfig.json index f0f0258c77..899f96af64 100644 --- a/scripts/tsconfig.json +++ b/scripts/tsconfig.json @@ -4,9 +4,13 @@ "target": "es6", "noImplicitAny": true, "strictNullChecks": true, - "baseUrl": "../", + "noImplicitReturns": true, + "noImplicitThis": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "baseUrl": "../types", "typeRoots": [ - "../" + "../types" ], "types": [], "forceConsistentCasingInFileNames": true diff --git a/tinymce/tinymce-tests.ts b/tinymce/tinymce-tests.ts deleted file mode 100644 index 18dd5cfbc7..0000000000 --- a/tinymce/tinymce-tests.ts +++ /dev/null @@ -1,17 +0,0 @@ -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'); diff --git a/toastr/index.d.ts b/toastr/index.d.ts deleted file mode 100644 index 5cd8b30c82..0000000000 --- a/toastr/index.d.ts +++ /dev/null @@ -1,226 +0,0 @@ -// Type definitions for Toastr 2.1.3 -// Project: https://github.com/CodeSeven/toastr -// Definitions by: Boris Yankov -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - - -/// - -interface ToastrOptions { - /** - * Optionally override the animation easing to show or hide the toasts. Default is swing. swing and linear are built into jQuery. - */ - showEasing?: string; - /** - * Optionally override the animation easing to show or hide the toasts. Default is swing. swing and linear are built into jQuery. - */ - hideEasing?: string; - /** - * Use the jQuery show/hide method of your choice. These default to fadeIn/fadeOut. The methods fadeIn/fadeOut, slideDown/slideUp, and show/hide are built into jQuery. - */ - showMethod?: string; - /** - * Use the jQuery show/hide method of your choice. These default to fadeIn/fadeOut. The methods fadeIn/fadeOut, slideDown/slideUp, and show/hide are built into jQuery. - */ - hideMethod?: string; - /** - * Should a close button be shown - */ - closeButton?: boolean; - /** - * Html for the close button - */ - closeHtml?: string; - /** - * Should clicking on toast dismiss it? - */ - tapToDismiss?: boolean; - /** - * CSS class the toast element will be given - */ - toastClass?: string; - /** - * Id toast container will be given - */ - containerId?: string; - /** - * Should debug details be outputted to the console - */ - debug?: boolean; - /** - * Time in milliseconds the toast should take to show - */ - showDuration?: number; - /** - * onShown function callback - **/ - onShown?: () => void; - /** - * Time in milliseconds the toast should take to hide - */ - hideDuration?: number; - /** - * onHidden function callback - **/ - onHidden?: () => void; - /** - * Time in milliseconds the toast should be displayed after mouse over - */ - extendedTimeOut?: number; - iconClasses?: { - /** - * Icon to use on error toasts - */ - error: string; - /** - * Icon to use on info toasts - */ - info: string; - /** - * Icon to use on success toasts - */ - success: string; - /** - * Icon to use on warning toasts - */ - warning: string; - }; - /** - * Icon to use for toast - */ - iconClass?: string; - /** - * Where toast should be displayed - */ - positionClass?: string; - /** - * Where toast should be displayed - background - */ - backgroundpositionClass?: string; - /** - * Time in milliseconds that the toast should be displayed - */ - timeOut?: number; - /** - * CSS class the title element will be given - */ - titleClass?: string; - /** - * CSS class the message element will be given - */ - messageClass?: string; - /** - * Set newest toast to appear on top - **/ - newestOnTop?: boolean; - /** - * The element to put the toastr container - **/ - target?: string; - /** - * Rather than having identical toasts stack, set the preventDuplicates property to true. Duplicates are matched to the previous toast based on their message content. - */ - preventDuplicates?: boolean; - /** - * Visually indicates how long before a toast expires. - */ - progressBar?: boolean; - /** - * Function to execute on toast click - */ - onclick?: () => void; - /** - * Set if toastr should parse containing html - **/ - allowHtml?: boolean; - /** - * Set if toastr should escape html - **/ - escapeHtml?: boolean; -} - -interface ToastrDisplayMethod { - /** - * Create a toast - * - * @param message Message to display in toast - */ - (message: string): JQuery; - /** - * Create a toast - * - * @param message Message to display in toast - * @param title Title to display on toast - */ - (message: string, title: string): JQuery; - /** - * Create a toast - * - * @param message Message to display in toast - * @param title Title to display on toast - * @param overrides Option values for toast - */ - (message: string, title: string, overrides: ToastrOptions): JQuery; -} - -interface Toastr { - /** - * Clear toasts - */ - clear: { - /** - * Clear all toasts - */ - (): void; - /** - * Clear specific toast - * - * @param toast Toast to clear - */ - (toast: JQuery): void; - /** - * Clear specific toast - * - * @param toast Toast to clear - * @param clearOptions force clearing a toast, ignoring focus - */ - (toast: JQuery, clearOptions: { force: boolean }): void; - }; - /** - * Removes all toasts (without animation) - */ - remove: { - (): void; - }; - /** - * Create an error toast - */ - error: ToastrDisplayMethod; - /** - * Create an info toast - */ - info: ToastrDisplayMethod; - /** - * Create an options object - */ - options: ToastrOptions; - /** - * Create a success toast - */ - success: ToastrDisplayMethod; - /** - * Create a warning toast - */ - warning: ToastrDisplayMethod; - /** - * Get toastr version - */ - version: string; - - [key: string]: any; -} - -declare var toastr: Toastr; -declare module "toastr" { - export = toastr; -} diff --git a/tslint.json b/tslint.json deleted file mode 100644 index 7847d36674..0000000000 --- a/tslint.json +++ /dev/null @@ -1 +0,0 @@ -{ "extends": "./node_modules/types-publisher/tslint-definitions.json" } diff --git a/3d-bin-packing/3d-bin-packing-tests.ts b/types/3d-bin-packing/3d-bin-packing-tests.ts similarity index 100% rename from 3d-bin-packing/3d-bin-packing-tests.ts rename to types/3d-bin-packing/3d-bin-packing-tests.ts diff --git a/3d-bin-packing/index.d.ts b/types/3d-bin-packing/index.d.ts similarity index 100% rename from 3d-bin-packing/index.d.ts rename to types/3d-bin-packing/index.d.ts diff --git a/3d-bin-packing/tsconfig.json b/types/3d-bin-packing/tsconfig.json similarity index 100% rename from 3d-bin-packing/tsconfig.json rename to types/3d-bin-packing/tsconfig.json diff --git a/ably/ably-tests.ts b/types/ably/ably-tests.ts similarity index 100% rename from ably/ably-tests.ts rename to types/ably/ably-tests.ts diff --git a/ably/index.d.ts b/types/ably/index.d.ts similarity index 99% rename from ably/index.d.ts rename to types/ably/index.d.ts index a6ea5785ac..b8d1eb9bfe 100644 --- a/ably/index.d.ts +++ b/types/ably/index.d.ts @@ -444,7 +444,7 @@ declare namespace ablyLib { } } -export declare class Rest { +export class Rest { constructor(options: ablyLib.ClientOptions | string); static Crypto: ablyLib.Crypto; static Message: ablyLib.MessageStatic; @@ -456,7 +456,7 @@ export declare class Rest { time: (paramsOrCallback?: ablyLib.timeCallback | any, callback?: ablyLib.timeCallback) => void; } -export declare class Realtime { +export class Realtime { constructor(options: ablyLib.ClientOptions | string); static Crypto: ablyLib.Crypto; static Message: ablyLib.MessageStatic; diff --git a/ably/tsconfig.json b/types/ably/tsconfig.json similarity index 100% rename from ably/tsconfig.json rename to types/ably/tsconfig.json diff --git a/ably/tslint.json b/types/ably/tslint.json similarity index 100% rename from ably/tslint.json rename to types/ably/tslint.json diff --git a/abs/abs-tests.ts b/types/abs/abs-tests.ts similarity index 100% rename from abs/abs-tests.ts rename to types/abs/abs-tests.ts diff --git a/abs/index.d.ts b/types/abs/index.d.ts similarity index 100% rename from abs/index.d.ts rename to types/abs/index.d.ts diff --git a/abs/tsconfig.json b/types/abs/tsconfig.json similarity index 100% rename from abs/tsconfig.json rename to types/abs/tsconfig.json diff --git a/abs/tslint.json b/types/abs/tslint.json similarity index 100% rename from abs/tslint.json rename to types/abs/tslint.json diff --git a/absolute/absolute-tests.ts b/types/absolute/absolute-tests.ts similarity index 100% rename from absolute/absolute-tests.ts rename to types/absolute/absolute-tests.ts diff --git a/absolute/index.d.ts b/types/absolute/index.d.ts similarity index 100% rename from absolute/index.d.ts rename to types/absolute/index.d.ts diff --git a/absolute/tsconfig.json b/types/absolute/tsconfig.json similarity index 100% rename from absolute/tsconfig.json rename to types/absolute/tsconfig.json diff --git a/acc-wizard/acc-wizard-tests.ts b/types/acc-wizard/acc-wizard-tests.ts similarity index 100% rename from acc-wizard/acc-wizard-tests.ts rename to types/acc-wizard/acc-wizard-tests.ts diff --git a/acc-wizard/index.d.ts b/types/acc-wizard/index.d.ts similarity index 100% rename from acc-wizard/index.d.ts rename to types/acc-wizard/index.d.ts diff --git a/acc-wizard/tsconfig.json b/types/acc-wizard/tsconfig.json similarity index 100% rename from acc-wizard/tsconfig.json rename to types/acc-wizard/tsconfig.json diff --git a/accepts/accepts-tests.ts b/types/accepts/accepts-tests.ts similarity index 100% rename from accepts/accepts-tests.ts rename to types/accepts/accepts-tests.ts diff --git a/accepts/index.d.ts b/types/accepts/index.d.ts similarity index 97% rename from accepts/index.d.ts rename to types/accepts/index.d.ts index a12dcaf5c9..1fef801986 100644 --- a/accepts/index.d.ts +++ b/types/accepts/index.d.ts @@ -4,11 +4,11 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace accepts { - export interface Headers { + interface Headers { [key: string]: string | string[]; } - export interface Accepts { + interface Accepts { /** * Return the first accepted charset. If nothing in `charsets` is accepted, then `false` is returned. */ diff --git a/accepts/tsconfig.json b/types/accepts/tsconfig.json similarity index 100% rename from accepts/tsconfig.json rename to types/accepts/tsconfig.json diff --git a/accepts/tslint.json b/types/accepts/tslint.json similarity index 100% rename from accepts/tslint.json rename to types/accepts/tslint.json diff --git a/accounting/accounting-tests.ts b/types/accounting/accounting-tests.ts similarity index 100% rename from accounting/accounting-tests.ts rename to types/accounting/accounting-tests.ts diff --git a/accounting/index.d.ts b/types/accounting/index.d.ts similarity index 100% rename from accounting/index.d.ts rename to types/accounting/index.d.ts diff --git a/accounting/tsconfig.json b/types/accounting/tsconfig.json similarity index 100% rename from accounting/tsconfig.json rename to types/accounting/tsconfig.json diff --git a/accounting/tslint.json b/types/accounting/tslint.json similarity index 100% rename from accounting/tslint.json rename to types/accounting/tslint.json diff --git a/ace/index.d.ts b/types/ace/index.d.ts similarity index 100% rename from ace/index.d.ts rename to types/ace/index.d.ts diff --git a/ace/test/anchor.ts b/types/ace/test/anchor.ts similarity index 100% rename from ace/test/anchor.ts rename to types/ace/test/anchor.ts diff --git a/ace/test/background_tokenizer.ts b/types/ace/test/background_tokenizer.ts similarity index 100% rename from ace/test/background_tokenizer.ts rename to types/ace/test/background_tokenizer.ts diff --git a/ace/test/default.ts b/types/ace/test/default.ts similarity index 100% rename from ace/test/default.ts rename to types/ace/test/default.ts diff --git a/ace/test/document.ts b/types/ace/test/document.ts similarity index 100% rename from ace/test/document.ts rename to types/ace/test/document.ts diff --git a/ace/test/edit_session.ts b/types/ace/test/edit_session.ts similarity index 100% rename from ace/test/edit_session.ts rename to types/ace/test/edit_session.ts diff --git a/ace/test/editor1.ts b/types/ace/test/editor1.ts similarity index 100% rename from ace/test/editor1.ts rename to types/ace/test/editor1.ts diff --git a/ace/test/editor_highlight_selected_word.ts b/types/ace/test/editor_highlight_selected_word.ts similarity index 100% rename from ace/test/editor_highlight_selected_word.ts rename to types/ace/test/editor_highlight_selected_word.ts diff --git a/ace/test/editor_navigation.ts b/types/ace/test/editor_navigation.ts similarity index 100% rename from ace/test/editor_navigation.ts rename to types/ace/test/editor_navigation.ts diff --git a/ace/test/editor_text_edit.ts b/types/ace/test/editor_text_edit.ts similarity index 100% rename from ace/test/editor_text_edit.ts rename to types/ace/test/editor_text_edit.ts diff --git a/ace/test/multi_select.ts b/types/ace/test/multi_select.ts similarity index 100% rename from ace/test/multi_select.ts rename to types/ace/test/multi_select.ts diff --git a/ace/test/placeholder.ts b/types/ace/test/placeholder.ts similarity index 100% rename from ace/test/placeholder.ts rename to types/ace/test/placeholder.ts diff --git a/ace/test/range.ts b/types/ace/test/range.ts similarity index 100% rename from ace/test/range.ts rename to types/ace/test/range.ts diff --git a/ace/test/range_list.ts b/types/ace/test/range_list.ts similarity index 100% rename from ace/test/range_list.ts rename to types/ace/test/range_list.ts diff --git a/ace/test/search.ts b/types/ace/test/search.ts similarity index 100% rename from ace/test/search.ts rename to types/ace/test/search.ts diff --git a/ace/test/selection.ts b/types/ace/test/selection.ts similarity index 100% rename from ace/test/selection.ts rename to types/ace/test/selection.ts diff --git a/ace/test/token_iterator.ts b/types/ace/test/token_iterator.ts similarity index 100% rename from ace/test/token_iterator.ts rename to types/ace/test/token_iterator.ts diff --git a/ace/test/virtual_renderer.ts b/types/ace/test/virtual_renderer.ts similarity index 100% rename from ace/test/virtual_renderer.ts rename to types/ace/test/virtual_renderer.ts diff --git a/ace/tsconfig.json b/types/ace/tsconfig.json similarity index 100% rename from ace/tsconfig.json rename to types/ace/tsconfig.json diff --git a/acl/index.d.ts b/types/acl/index.d.ts similarity index 100% rename from acl/index.d.ts rename to types/acl/index.d.ts diff --git a/acl/test/index.ts b/types/acl/test/index.ts similarity index 100% rename from acl/test/index.ts rename to types/acl/test/index.ts diff --git a/acl/test/mongodbBackend.ts b/types/acl/test/mongodbBackend.ts similarity index 100% rename from acl/test/mongodbBackend.ts rename to types/acl/test/mongodbBackend.ts diff --git a/acl/test/redisBackend.ts b/types/acl/test/redisBackend.ts similarity index 100% rename from acl/test/redisBackend.ts rename to types/acl/test/redisBackend.ts diff --git a/acl/tsconfig.json b/types/acl/tsconfig.json similarity index 100% rename from acl/tsconfig.json rename to types/acl/tsconfig.json diff --git a/acorn/README.md b/types/acorn/README.md similarity index 100% rename from acorn/README.md rename to types/acorn/README.md diff --git a/acorn/acorn-tests.ts b/types/acorn/acorn-tests.ts similarity index 100% rename from acorn/acorn-tests.ts rename to types/acorn/acorn-tests.ts diff --git a/acorn/index.d.ts b/types/acorn/index.d.ts similarity index 100% rename from acorn/index.d.ts rename to types/acorn/index.d.ts diff --git a/acorn/tsconfig.json b/types/acorn/tsconfig.json similarity index 100% rename from acorn/tsconfig.json rename to types/acorn/tsconfig.json diff --git a/actioncable/actioncable-tests.ts b/types/actioncable/actioncable-tests.ts similarity index 100% rename from actioncable/actioncable-tests.ts rename to types/actioncable/actioncable-tests.ts diff --git a/actioncable/index.d.ts b/types/actioncable/index.d.ts similarity index 100% rename from actioncable/index.d.ts rename to types/actioncable/index.d.ts diff --git a/actioncable/tsconfig.json b/types/actioncable/tsconfig.json similarity index 100% rename from actioncable/tsconfig.json rename to types/actioncable/tsconfig.json diff --git a/activex-data-objects/activex-data-objects-tests.ts b/types/activex-data-objects/activex-data-objects-tests.ts similarity index 100% rename from activex-data-objects/activex-data-objects-tests.ts rename to types/activex-data-objects/activex-data-objects-tests.ts diff --git a/activex-data-objects/index.d.ts b/types/activex-data-objects/index.d.ts similarity index 100% rename from activex-data-objects/index.d.ts rename to types/activex-data-objects/index.d.ts diff --git a/activex-data-objects/tsconfig.json b/types/activex-data-objects/tsconfig.json similarity index 100% rename from activex-data-objects/tsconfig.json rename to types/activex-data-objects/tsconfig.json diff --git a/activex-scripting-runtime/activex-scripting-runtime-tests.ts b/types/activex-scripting-runtime/activex-scripting-runtime-tests.ts similarity index 100% rename from activex-scripting-runtime/activex-scripting-runtime-tests.ts rename to types/activex-scripting-runtime/activex-scripting-runtime-tests.ts diff --git a/activex-scripting-runtime/index.d.ts b/types/activex-scripting-runtime/index.d.ts similarity index 100% rename from activex-scripting-runtime/index.d.ts rename to types/activex-scripting-runtime/index.d.ts diff --git a/activex-scripting-runtime/tsconfig.json b/types/activex-scripting-runtime/tsconfig.json similarity index 100% rename from activex-scripting-runtime/tsconfig.json rename to types/activex-scripting-runtime/tsconfig.json diff --git a/activex-windows-image-acquisition/activex-windows-image-acquisition-tests.ts b/types/activex-windows-image-acquisition/activex-windows-image-acquisition-tests.ts similarity index 100% rename from activex-windows-image-acquisition/activex-windows-image-acquisition-tests.ts rename to types/activex-windows-image-acquisition/activex-windows-image-acquisition-tests.ts diff --git a/activex-windows-image-acquisition/index.d.ts b/types/activex-windows-image-acquisition/index.d.ts similarity index 100% rename from activex-windows-image-acquisition/index.d.ts rename to types/activex-windows-image-acquisition/index.d.ts diff --git a/activex-windows-image-acquisition/tsconfig.json b/types/activex-windows-image-acquisition/tsconfig.json similarity index 100% rename from activex-windows-image-acquisition/tsconfig.json rename to types/activex-windows-image-acquisition/tsconfig.json diff --git a/adal/adal-angular.d.ts b/types/adal/adal-angular.d.ts similarity index 100% rename from adal/adal-angular.d.ts rename to types/adal/adal-angular.d.ts diff --git a/adal/index.d.ts b/types/adal/index.d.ts similarity index 100% rename from adal/index.d.ts rename to types/adal/index.d.ts diff --git a/adal/test/angular.ts b/types/adal/test/angular.ts similarity index 100% rename from adal/test/angular.ts rename to types/adal/test/angular.ts diff --git a/adal/test/index.ts b/types/adal/test/index.ts similarity index 100% rename from adal/test/index.ts rename to types/adal/test/index.ts diff --git a/adal/tsconfig.json b/types/adal/tsconfig.json similarity index 100% rename from adal/tsconfig.json rename to types/adal/tsconfig.json diff --git a/add2home/add2home-tests.ts b/types/add2home/add2home-tests.ts similarity index 100% rename from add2home/add2home-tests.ts rename to types/add2home/add2home-tests.ts diff --git a/add2home/index.d.ts b/types/add2home/index.d.ts similarity index 100% rename from add2home/index.d.ts rename to types/add2home/index.d.ts diff --git a/add2home/tsconfig.json b/types/add2home/tsconfig.json similarity index 100% rename from add2home/tsconfig.json rename to types/add2home/tsconfig.json diff --git a/adm-zip/adm-zip-tests.ts b/types/adm-zip/adm-zip-tests.ts similarity index 100% rename from adm-zip/adm-zip-tests.ts rename to types/adm-zip/adm-zip-tests.ts diff --git a/adm-zip/index.d.ts b/types/adm-zip/index.d.ts similarity index 100% rename from adm-zip/index.d.ts rename to types/adm-zip/index.d.ts diff --git a/adm-zip/tsconfig.json b/types/adm-zip/tsconfig.json similarity index 100% rename from adm-zip/tsconfig.json rename to types/adm-zip/tsconfig.json diff --git a/ag-grid/ag-grid-tests.ts b/types/ag-grid/ag-grid-tests.ts similarity index 100% rename from ag-grid/ag-grid-tests.ts rename to types/ag-grid/ag-grid-tests.ts diff --git a/ag-grid/index.d.ts b/types/ag-grid/index.d.ts similarity index 100% rename from ag-grid/index.d.ts rename to types/ag-grid/index.d.ts diff --git a/ag-grid/tsconfig.json b/types/ag-grid/tsconfig.json similarity index 100% rename from ag-grid/tsconfig.json rename to types/ag-grid/tsconfig.json diff --git a/agenda/agenda-tests.ts b/types/agenda/agenda-tests.ts similarity index 100% rename from agenda/agenda-tests.ts rename to types/agenda/agenda-tests.ts diff --git a/agenda/index.d.ts b/types/agenda/index.d.ts similarity index 100% rename from agenda/index.d.ts rename to types/agenda/index.d.ts diff --git a/agenda/tsconfig.json b/types/agenda/tsconfig.json similarity index 100% rename from agenda/tsconfig.json rename to types/agenda/tsconfig.json diff --git a/alertify/alertify-tests.ts b/types/alertify/alertify-tests.ts similarity index 100% rename from alertify/alertify-tests.ts rename to types/alertify/alertify-tests.ts diff --git a/alertify/index.d.ts b/types/alertify/index.d.ts similarity index 100% rename from alertify/index.d.ts rename to types/alertify/index.d.ts diff --git a/alertify/tsconfig.json b/types/alertify/tsconfig.json similarity index 100% rename from alertify/tsconfig.json rename to types/alertify/tsconfig.json diff --git a/alexa-sdk/alexa-sdk-tests.ts b/types/alexa-sdk/alexa-sdk-tests.ts similarity index 100% rename from alexa-sdk/alexa-sdk-tests.ts rename to types/alexa-sdk/alexa-sdk-tests.ts diff --git a/alexa-sdk/index.d.ts b/types/alexa-sdk/index.d.ts similarity index 100% rename from alexa-sdk/index.d.ts rename to types/alexa-sdk/index.d.ts diff --git a/alexa-sdk/tsconfig.json b/types/alexa-sdk/tsconfig.json similarity index 100% rename from alexa-sdk/tsconfig.json rename to types/alexa-sdk/tsconfig.json diff --git a/algoliasearch/algoliasearch-tests.ts b/types/algoliasearch/algoliasearch-tests.ts similarity index 100% rename from algoliasearch/algoliasearch-tests.ts rename to types/algoliasearch/algoliasearch-tests.ts diff --git a/algoliasearch/index.d.ts b/types/algoliasearch/index.d.ts similarity index 100% rename from algoliasearch/index.d.ts rename to types/algoliasearch/index.d.ts diff --git a/algoliasearch/tsconfig.json b/types/algoliasearch/tsconfig.json similarity index 100% rename from algoliasearch/tsconfig.json rename to types/algoliasearch/tsconfig.json diff --git a/alt/alt-tests.ts b/types/alt/alt-tests.ts similarity index 100% rename from alt/alt-tests.ts rename to types/alt/alt-tests.ts diff --git a/alt/index.d.ts b/types/alt/index.d.ts similarity index 100% rename from alt/index.d.ts rename to types/alt/index.d.ts diff --git a/alt/tsconfig.json b/types/alt/tsconfig.json similarity index 100% rename from alt/tsconfig.json rename to types/alt/tsconfig.json diff --git a/amazon-product-api/amazon-product-api-tests.ts b/types/amazon-product-api/amazon-product-api-tests.ts similarity index 100% rename from amazon-product-api/amazon-product-api-tests.ts rename to types/amazon-product-api/amazon-product-api-tests.ts diff --git a/amazon-product-api/index.d.ts b/types/amazon-product-api/index.d.ts similarity index 100% rename from amazon-product-api/index.d.ts rename to types/amazon-product-api/index.d.ts diff --git a/amazon-product-api/tsconfig.json b/types/amazon-product-api/tsconfig.json similarity index 100% rename from amazon-product-api/tsconfig.json rename to types/amazon-product-api/tsconfig.json diff --git a/amcharts/index.d.ts b/types/amcharts/index.d.ts similarity index 100% rename from amcharts/index.d.ts rename to types/amcharts/index.d.ts diff --git a/amcharts/tsconfig.json b/types/amcharts/tsconfig.json similarity index 100% rename from amcharts/tsconfig.json rename to types/amcharts/tsconfig.json diff --git a/amplify-deferred/amplify-deferred-tests.ts b/types/amplify-deferred/amplify-deferred-tests.ts similarity index 100% rename from amplify-deferred/amplify-deferred-tests.ts rename to types/amplify-deferred/amplify-deferred-tests.ts diff --git a/amplify-deferred/index.d.ts b/types/amplify-deferred/index.d.ts similarity index 100% rename from amplify-deferred/index.d.ts rename to types/amplify-deferred/index.d.ts diff --git a/amplify-deferred/tsconfig.json b/types/amplify-deferred/tsconfig.json similarity index 100% rename from amplify-deferred/tsconfig.json rename to types/amplify-deferred/tsconfig.json diff --git a/amplify-deferred/tslint.json b/types/amplify-deferred/tslint.json similarity index 100% rename from amplify-deferred/tslint.json rename to types/amplify-deferred/tslint.json diff --git a/amplify/amplify-tests.ts b/types/amplify/amplify-tests.ts similarity index 99% rename from amplify/amplify-tests.ts rename to types/amplify/amplify-tests.ts index b4f98ccd5b..8cce567960 100644 --- a/amplify/amplify-tests.ts +++ b/types/amplify/amplify-tests.ts @@ -257,4 +257,3 @@ amplify.request({ error: (data, status) => { } }); - diff --git a/amplify/index.d.ts b/types/amplify/index.d.ts similarity index 99% rename from amplify/index.d.ts rename to types/amplify/index.d.ts index 1e62e57a01..5cb03e5b1d 100644 --- a/amplify/index.d.ts +++ b/types/amplify/index.d.ts @@ -34,7 +34,6 @@ declare namespace amplify { } interface Request { - /*** * Request a resource. * resourceId: Identifier string for the resource. @@ -118,7 +117,6 @@ declare namespace amplify { } interface Store extends StorageTypeStore { - /*** * IE 8+, Firefox 3.5+, Safari 4+, Chrome, Opera 10.5+, iPhone 2+, Android 2+ */ @@ -143,12 +141,9 @@ declare namespace amplify { * An in-memory store is provided as a fallback if none of the other storage types are available. */ memory: StorageTypeStore; - - } interface Static { - subscribe: Subscribe; /*** diff --git a/amplify/tsconfig.json b/types/amplify/tsconfig.json similarity index 100% rename from amplify/tsconfig.json rename to types/amplify/tsconfig.json diff --git a/amplify/tslint.json b/types/amplify/tslint.json similarity index 100% rename from amplify/tslint.json rename to types/amplify/tslint.json diff --git a/amplitude-js/amplitude-js-tests.ts b/types/amplitude-js/amplitude-js-tests.ts similarity index 100% rename from amplitude-js/amplitude-js-tests.ts rename to types/amplitude-js/amplitude-js-tests.ts diff --git a/amplitude-js/index.d.ts b/types/amplitude-js/index.d.ts similarity index 100% rename from amplitude-js/index.d.ts rename to types/amplitude-js/index.d.ts diff --git a/amplitude-js/tsconfig.json b/types/amplitude-js/tsconfig.json similarity index 100% rename from amplitude-js/tsconfig.json rename to types/amplitude-js/tsconfig.json diff --git a/amqp-rpc/amqp-rpc-tests.ts b/types/amqp-rpc/amqp-rpc-tests.ts similarity index 100% rename from amqp-rpc/amqp-rpc-tests.ts rename to types/amqp-rpc/amqp-rpc-tests.ts diff --git a/amqp-rpc/index.d.ts b/types/amqp-rpc/index.d.ts similarity index 100% rename from amqp-rpc/index.d.ts rename to types/amqp-rpc/index.d.ts diff --git a/amqp-rpc/tsconfig.json b/types/amqp-rpc/tsconfig.json similarity index 100% rename from amqp-rpc/tsconfig.json rename to types/amqp-rpc/tsconfig.json diff --git a/amqplib/amqplib-tests.ts b/types/amqplib/amqplib-tests.ts similarity index 100% rename from amqplib/amqplib-tests.ts rename to types/amqplib/amqplib-tests.ts diff --git a/amqplib/callback_api.d.ts b/types/amqplib/callback_api.d.ts similarity index 100% rename from amqplib/callback_api.d.ts rename to types/amqplib/callback_api.d.ts diff --git a/amqplib/index.d.ts b/types/amqplib/index.d.ts similarity index 100% rename from amqplib/index.d.ts rename to types/amqplib/index.d.ts diff --git a/amqplib/properties.d.ts b/types/amqplib/properties.d.ts similarity index 100% rename from amqplib/properties.d.ts rename to types/amqplib/properties.d.ts diff --git a/amqplib/tsconfig.json b/types/amqplib/tsconfig.json similarity index 100% rename from amqplib/tsconfig.json rename to types/amqplib/tsconfig.json diff --git a/amqplib/tslint.json b/types/amqplib/tslint.json similarity index 100% rename from amqplib/tslint.json rename to types/amqplib/tslint.json diff --git a/analytics-node/analytics-node-tests.ts b/types/analytics-node/analytics-node-tests.ts similarity index 100% rename from analytics-node/analytics-node-tests.ts rename to types/analytics-node/analytics-node-tests.ts diff --git a/analytics-node/index.d.ts b/types/analytics-node/index.d.ts similarity index 100% rename from analytics-node/index.d.ts rename to types/analytics-node/index.d.ts diff --git a/analytics-node/tsconfig.json b/types/analytics-node/tsconfig.json similarity index 100% rename from analytics-node/tsconfig.json rename to types/analytics-node/tsconfig.json diff --git a/angular-agility/angular-agility-tests.ts b/types/angular-agility/angular-agility-tests.ts similarity index 100% rename from angular-agility/angular-agility-tests.ts rename to types/angular-agility/angular-agility-tests.ts diff --git a/angular-agility/index.d.ts b/types/angular-agility/index.d.ts similarity index 100% rename from angular-agility/index.d.ts rename to types/angular-agility/index.d.ts diff --git a/angular-agility/tsconfig.json b/types/angular-agility/tsconfig.json similarity index 100% rename from angular-agility/tsconfig.json rename to types/angular-agility/tsconfig.json diff --git a/angular-animate/index.d.ts b/types/angular-animate/index.d.ts similarity index 100% rename from angular-animate/index.d.ts rename to types/angular-animate/index.d.ts diff --git a/angular-animate/tsconfig.json b/types/angular-animate/tsconfig.json similarity index 100% rename from angular-animate/tsconfig.json rename to types/angular-animate/tsconfig.json diff --git a/angular-bootstrap-calendar/angular-bootstrap-calendar-tests.ts b/types/angular-bootstrap-calendar/angular-bootstrap-calendar-tests.ts similarity index 100% rename from angular-bootstrap-calendar/angular-bootstrap-calendar-tests.ts rename to types/angular-bootstrap-calendar/angular-bootstrap-calendar-tests.ts diff --git a/angular-bootstrap-calendar/index.d.ts b/types/angular-bootstrap-calendar/index.d.ts similarity index 100% rename from angular-bootstrap-calendar/index.d.ts rename to types/angular-bootstrap-calendar/index.d.ts diff --git a/angular-bootstrap-calendar/package.json b/types/angular-bootstrap-calendar/package.json similarity index 100% rename from angular-bootstrap-calendar/package.json rename to types/angular-bootstrap-calendar/package.json diff --git a/angular-bootstrap-calendar/tsconfig.json b/types/angular-bootstrap-calendar/tsconfig.json similarity index 100% rename from angular-bootstrap-calendar/tsconfig.json rename to types/angular-bootstrap-calendar/tsconfig.json diff --git a/angular-bootstrap-lightbox/angular-bootstrap-lightbox-tests.ts b/types/angular-bootstrap-lightbox/angular-bootstrap-lightbox-tests.ts similarity index 100% rename from angular-bootstrap-lightbox/angular-bootstrap-lightbox-tests.ts rename to types/angular-bootstrap-lightbox/angular-bootstrap-lightbox-tests.ts diff --git a/angular-bootstrap-lightbox/index.d.ts b/types/angular-bootstrap-lightbox/index.d.ts similarity index 100% rename from angular-bootstrap-lightbox/index.d.ts rename to types/angular-bootstrap-lightbox/index.d.ts diff --git a/angular-bootstrap-lightbox/tsconfig.json b/types/angular-bootstrap-lightbox/tsconfig.json similarity index 100% rename from angular-bootstrap-lightbox/tsconfig.json rename to types/angular-bootstrap-lightbox/tsconfig.json diff --git a/angular-breadcrumb/index.d.ts b/types/angular-breadcrumb/index.d.ts similarity index 100% rename from angular-breadcrumb/index.d.ts rename to types/angular-breadcrumb/index.d.ts diff --git a/angular-breadcrumb/tsconfig.json b/types/angular-breadcrumb/tsconfig.json similarity index 100% rename from angular-breadcrumb/tsconfig.json rename to types/angular-breadcrumb/tsconfig.json diff --git a/angular-clipboard/angular-clipboard-tests.ts b/types/angular-clipboard/angular-clipboard-tests.ts similarity index 100% rename from angular-clipboard/angular-clipboard-tests.ts rename to types/angular-clipboard/angular-clipboard-tests.ts diff --git a/angular-clipboard/index.d.ts b/types/angular-clipboard/index.d.ts similarity index 100% rename from angular-clipboard/index.d.ts rename to types/angular-clipboard/index.d.ts diff --git a/angular-clipboard/tsconfig.json b/types/angular-clipboard/tsconfig.json similarity index 100% rename from angular-clipboard/tsconfig.json rename to types/angular-clipboard/tsconfig.json diff --git a/angular-cookie/angular-cookie-tests.ts b/types/angular-cookie/angular-cookie-tests.ts similarity index 100% rename from angular-cookie/angular-cookie-tests.ts rename to types/angular-cookie/angular-cookie-tests.ts diff --git a/angular-cookie/index.d.ts b/types/angular-cookie/index.d.ts similarity index 100% rename from angular-cookie/index.d.ts rename to types/angular-cookie/index.d.ts diff --git a/angular-cookie/tsconfig.json b/types/angular-cookie/tsconfig.json similarity index 100% rename from angular-cookie/tsconfig.json rename to types/angular-cookie/tsconfig.json diff --git a/angular-cookies/index.d.ts b/types/angular-cookies/index.d.ts similarity index 100% rename from angular-cookies/index.d.ts rename to types/angular-cookies/index.d.ts diff --git a/angular-cookies/tsconfig.json b/types/angular-cookies/tsconfig.json similarity index 100% rename from angular-cookies/tsconfig.json rename to types/angular-cookies/tsconfig.json diff --git a/angular-deferred-bootstrap/angular-deferred-bootstrap-tests.ts b/types/angular-deferred-bootstrap/angular-deferred-bootstrap-tests.ts similarity index 100% rename from angular-deferred-bootstrap/angular-deferred-bootstrap-tests.ts rename to types/angular-deferred-bootstrap/angular-deferred-bootstrap-tests.ts diff --git a/angular-deferred-bootstrap/index.d.ts b/types/angular-deferred-bootstrap/index.d.ts similarity index 100% rename from angular-deferred-bootstrap/index.d.ts rename to types/angular-deferred-bootstrap/index.d.ts diff --git a/angular-deferred-bootstrap/tsconfig.json b/types/angular-deferred-bootstrap/tsconfig.json similarity index 100% rename from angular-deferred-bootstrap/tsconfig.json rename to types/angular-deferred-bootstrap/tsconfig.json diff --git a/angular-dialog-service/angular-dialog-service-tests.ts b/types/angular-dialog-service/angular-dialog-service-tests.ts similarity index 100% rename from angular-dialog-service/angular-dialog-service-tests.ts rename to types/angular-dialog-service/angular-dialog-service-tests.ts diff --git a/angular-dialog-service/index.d.ts b/types/angular-dialog-service/index.d.ts similarity index 100% rename from angular-dialog-service/index.d.ts rename to types/angular-dialog-service/index.d.ts diff --git a/angular-dialog-service/tsconfig.json b/types/angular-dialog-service/tsconfig.json similarity index 100% rename from angular-dialog-service/tsconfig.json rename to types/angular-dialog-service/tsconfig.json diff --git a/angular-dynamic-locale/angular-dynamic-locale-tests.ts b/types/angular-dynamic-locale/angular-dynamic-locale-tests.ts similarity index 100% rename from angular-dynamic-locale/angular-dynamic-locale-tests.ts rename to types/angular-dynamic-locale/angular-dynamic-locale-tests.ts diff --git a/angular-dynamic-locale/index.d.ts b/types/angular-dynamic-locale/index.d.ts similarity index 100% rename from angular-dynamic-locale/index.d.ts rename to types/angular-dynamic-locale/index.d.ts diff --git a/angular-dynamic-locale/tsconfig.json b/types/angular-dynamic-locale/tsconfig.json similarity index 100% rename from angular-dynamic-locale/tsconfig.json rename to types/angular-dynamic-locale/tsconfig.json diff --git a/angular-environment/angular-environment-tests.ts b/types/angular-environment/angular-environment-tests.ts similarity index 100% rename from angular-environment/angular-environment-tests.ts rename to types/angular-environment/angular-environment-tests.ts diff --git a/angular-environment/index.d.ts b/types/angular-environment/index.d.ts similarity index 100% rename from angular-environment/index.d.ts rename to types/angular-environment/index.d.ts diff --git a/angular-environment/tsconfig.json b/types/angular-environment/tsconfig.json similarity index 100% rename from angular-environment/tsconfig.json rename to types/angular-environment/tsconfig.json diff --git a/angular-es/angular-es-tests.ts b/types/angular-es/angular-es-tests.ts similarity index 100% rename from angular-es/angular-es-tests.ts rename to types/angular-es/angular-es-tests.ts diff --git a/angular-es/index.d.ts b/types/angular-es/index.d.ts similarity index 100% rename from angular-es/index.d.ts rename to types/angular-es/index.d.ts diff --git a/angular-es/tsconfig.json b/types/angular-es/tsconfig.json similarity index 100% rename from angular-es/tsconfig.json rename to types/angular-es/tsconfig.json diff --git a/angular-feature-flags/angular-feature-flags-tests.ts b/types/angular-feature-flags/angular-feature-flags-tests.ts similarity index 100% rename from angular-feature-flags/angular-feature-flags-tests.ts rename to types/angular-feature-flags/angular-feature-flags-tests.ts diff --git a/angular-feature-flags/index.d.ts b/types/angular-feature-flags/index.d.ts similarity index 100% rename from angular-feature-flags/index.d.ts rename to types/angular-feature-flags/index.d.ts diff --git a/angular-feature-flags/tsconfig.json b/types/angular-feature-flags/tsconfig.json similarity index 100% rename from angular-feature-flags/tsconfig.json rename to types/angular-feature-flags/tsconfig.json diff --git a/angular-file-saver/angular-file-saver-tests.ts b/types/angular-file-saver/angular-file-saver-tests.ts similarity index 100% rename from angular-file-saver/angular-file-saver-tests.ts rename to types/angular-file-saver/angular-file-saver-tests.ts diff --git a/angular-file-saver/index.d.ts b/types/angular-file-saver/index.d.ts similarity index 87% rename from angular-file-saver/index.d.ts rename to types/angular-file-saver/index.d.ts index 7e1fb90b16..2fb846eef4 100644 --- a/angular-file-saver/index.d.ts +++ b/types/angular-file-saver/index.d.ts @@ -3,13 +3,12 @@ // Definitions by: Donald Nairn // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// - -declare namespace angular { +import * as angular from 'angular'; +declare module 'angular' { /** * A core Angular factory proving FileSaver functionality. */ - interface FileSaver { + export interface FileSaver { /** * Immediately starts saving a file * @param data: a Blob instance; @@ -18,4 +17,4 @@ declare namespace angular { */ saveAs(blob: Blob, fileName: string, disableBOM?: boolean): void; } -} \ No newline at end of file +} diff --git a/angular-file-saver/tsconfig.json b/types/angular-file-saver/tsconfig.json similarity index 100% rename from angular-file-saver/tsconfig.json rename to types/angular-file-saver/tsconfig.json diff --git a/angular-formly/angular-formly-tests.ts b/types/angular-formly/angular-formly-tests.ts similarity index 98% rename from angular-formly/angular-formly-tests.ts rename to types/angular-formly/angular-formly-tests.ts index 83f13af2d4..b78c8a1257 100644 --- a/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/angular-formly/index.d.ts b/types/angular-formly/index.d.ts similarity index 99% rename from angular-formly/index.d.ts rename to types/angular-formly/index.d.ts index aed12f5360..d37228fb79 100644 --- a/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/angular-formly/tsconfig.json b/types/angular-formly/tsconfig.json similarity index 100% rename from angular-formly/tsconfig.json rename to types/angular-formly/tsconfig.json diff --git a/angular-fullscreen/angular-fullscreen-tests.ts b/types/angular-fullscreen/angular-fullscreen-tests.ts similarity index 100% rename from angular-fullscreen/angular-fullscreen-tests.ts rename to types/angular-fullscreen/angular-fullscreen-tests.ts diff --git a/angular-fullscreen/index.d.ts b/types/angular-fullscreen/index.d.ts similarity index 100% rename from angular-fullscreen/index.d.ts rename to types/angular-fullscreen/index.d.ts diff --git a/angular-fullscreen/tsconfig.json b/types/angular-fullscreen/tsconfig.json similarity index 100% rename from angular-fullscreen/tsconfig.json rename to types/angular-fullscreen/tsconfig.json diff --git a/angular-gettext/angular-gettext-tests.ts b/types/angular-gettext/angular-gettext-tests.ts similarity index 100% rename from angular-gettext/angular-gettext-tests.ts rename to types/angular-gettext/angular-gettext-tests.ts diff --git a/angular-gettext/index.d.ts b/types/angular-gettext/index.d.ts similarity index 100% rename from angular-gettext/index.d.ts rename to types/angular-gettext/index.d.ts diff --git a/angular-gettext/tsconfig.json b/types/angular-gettext/tsconfig.json similarity index 100% rename from angular-gettext/tsconfig.json rename to types/angular-gettext/tsconfig.json diff --git a/angular-google-analytics/angular-google-analytics-tests.ts b/types/angular-google-analytics/angular-google-analytics-tests.ts similarity index 100% rename from angular-google-analytics/angular-google-analytics-tests.ts rename to types/angular-google-analytics/angular-google-analytics-tests.ts diff --git a/angular-google-analytics/index.d.ts b/types/angular-google-analytics/index.d.ts similarity index 100% rename from angular-google-analytics/index.d.ts rename to types/angular-google-analytics/index.d.ts diff --git a/angular-google-analytics/tsconfig.json b/types/angular-google-analytics/tsconfig.json similarity index 100% rename from angular-google-analytics/tsconfig.json rename to types/angular-google-analytics/tsconfig.json diff --git a/angular-gridster/angular-gridster-tests.ts b/types/angular-gridster/angular-gridster-tests.ts similarity index 100% rename from angular-gridster/angular-gridster-tests.ts rename to types/angular-gridster/angular-gridster-tests.ts diff --git a/angular-gridster/index.d.ts b/types/angular-gridster/index.d.ts similarity index 99% rename from angular-gridster/index.d.ts rename to types/angular-gridster/index.d.ts index fc0e990d41..272470bc6f 100644 --- a/angular-gridster/index.d.ts +++ b/types/angular-gridster/index.d.ts @@ -8,11 +8,8 @@ import * as angular from "angular"; export default "gridster"; declare module "angular" { - - export namespace gridster { - + namespace gridster { interface GridsterConfig { - // number of columns in the grid columns?: number; // whether to push other items out of the way @@ -83,7 +80,6 @@ declare module "angular" { // options to pass to resizable handler resizable?: { - // whether the items are resizable enabled?: boolean; @@ -103,7 +99,6 @@ declare module "angular" { // options to pass to draggable handler draggable?: { - // whether the items are resizable enabled?: boolean; @@ -128,7 +123,6 @@ declare module "angular" { } interface StandardGridsterItem { - // width of the item expressed in terms of number of columns it will occupy sizeX: number; diff --git a/angular-gridster/tsconfig.json b/types/angular-gridster/tsconfig.json similarity index 100% rename from angular-gridster/tsconfig.json rename to types/angular-gridster/tsconfig.json diff --git a/angular-gridster/tslint.json b/types/angular-gridster/tslint.json similarity index 100% rename from angular-gridster/tslint.json rename to types/angular-gridster/tslint.json diff --git a/angular-growl-v2/angular-growl-v2-tests.ts b/types/angular-growl-v2/angular-growl-v2-tests.ts similarity index 100% rename from angular-growl-v2/angular-growl-v2-tests.ts rename to types/angular-growl-v2/angular-growl-v2-tests.ts diff --git a/angular-growl-v2/index.d.ts b/types/angular-growl-v2/index.d.ts similarity index 100% rename from angular-growl-v2/index.d.ts rename to types/angular-growl-v2/index.d.ts diff --git a/angular-growl-v2/tsconfig.json b/types/angular-growl-v2/tsconfig.json similarity index 100% rename from angular-growl-v2/tsconfig.json rename to types/angular-growl-v2/tsconfig.json diff --git a/angular-hotkeys/angular-hotkeys-tests.ts b/types/angular-hotkeys/angular-hotkeys-tests.ts similarity index 100% rename from angular-hotkeys/angular-hotkeys-tests.ts rename to types/angular-hotkeys/angular-hotkeys-tests.ts diff --git a/angular-hotkeys/index.d.ts b/types/angular-hotkeys/index.d.ts similarity index 100% rename from angular-hotkeys/index.d.ts rename to types/angular-hotkeys/index.d.ts diff --git a/angular-hotkeys/tsconfig.json b/types/angular-hotkeys/tsconfig.json similarity index 100% rename from angular-hotkeys/tsconfig.json rename to types/angular-hotkeys/tsconfig.json diff --git a/angular-http-auth/angular-http-auth-tests.ts b/types/angular-http-auth/angular-http-auth-tests.ts similarity index 100% rename from angular-http-auth/angular-http-auth-tests.ts rename to types/angular-http-auth/angular-http-auth-tests.ts diff --git a/angular-http-auth/index.d.ts b/types/angular-http-auth/index.d.ts similarity index 100% rename from angular-http-auth/index.d.ts rename to types/angular-http-auth/index.d.ts diff --git a/angular-http-auth/tsconfig.json b/types/angular-http-auth/tsconfig.json similarity index 100% rename from angular-http-auth/tsconfig.json rename to types/angular-http-auth/tsconfig.json diff --git a/angular-httpi/angular-httpi-tests.ts b/types/angular-httpi/angular-httpi-tests.ts similarity index 100% rename from angular-httpi/angular-httpi-tests.ts rename to types/angular-httpi/angular-httpi-tests.ts diff --git a/angular-httpi/index.d.ts b/types/angular-httpi/index.d.ts similarity index 100% rename from angular-httpi/index.d.ts rename to types/angular-httpi/index.d.ts diff --git a/angular-httpi/tsconfig.json b/types/angular-httpi/tsconfig.json similarity index 100% rename from angular-httpi/tsconfig.json rename to types/angular-httpi/tsconfig.json diff --git a/angular-idle/angular-idle-tests.ts b/types/angular-idle/angular-idle-tests.ts similarity index 100% rename from angular-idle/angular-idle-tests.ts rename to types/angular-idle/angular-idle-tests.ts diff --git a/angular-idle/index.d.ts b/types/angular-idle/index.d.ts similarity index 100% rename from angular-idle/index.d.ts rename to types/angular-idle/index.d.ts diff --git a/angular-idle/tsconfig.json b/types/angular-idle/tsconfig.json similarity index 100% rename from angular-idle/tsconfig.json rename to types/angular-idle/tsconfig.json diff --git a/angular-jwt/angular-jwt-tests.ts b/types/angular-jwt/angular-jwt-tests.ts similarity index 100% rename from angular-jwt/angular-jwt-tests.ts rename to types/angular-jwt/angular-jwt-tests.ts diff --git a/angular-jwt/index.d.ts b/types/angular-jwt/index.d.ts similarity index 100% rename from angular-jwt/index.d.ts rename to types/angular-jwt/index.d.ts diff --git a/angular-jwt/tsconfig.json b/types/angular-jwt/tsconfig.json similarity index 100% rename from angular-jwt/tsconfig.json rename to types/angular-jwt/tsconfig.json diff --git a/angular-load/angular-load-tests.ts b/types/angular-load/angular-load-tests.ts similarity index 100% rename from angular-load/angular-load-tests.ts rename to types/angular-load/angular-load-tests.ts diff --git a/angular-load/index.d.ts b/types/angular-load/index.d.ts similarity index 100% rename from angular-load/index.d.ts rename to types/angular-load/index.d.ts diff --git a/angular-load/tsconfig.json b/types/angular-load/tsconfig.json similarity index 100% rename from angular-load/tsconfig.json rename to types/angular-load/tsconfig.json diff --git a/angular-loading-bar/angular-loading-bar-tests.ts b/types/angular-loading-bar/angular-loading-bar-tests.ts similarity index 100% rename from angular-loading-bar/angular-loading-bar-tests.ts rename to types/angular-loading-bar/angular-loading-bar-tests.ts diff --git a/angular-loading-bar/index.d.ts b/types/angular-loading-bar/index.d.ts similarity index 100% rename from angular-loading-bar/index.d.ts rename to types/angular-loading-bar/index.d.ts diff --git a/angular-loading-bar/tsconfig.json b/types/angular-loading-bar/tsconfig.json similarity index 100% rename from angular-loading-bar/tsconfig.json rename to types/angular-loading-bar/tsconfig.json diff --git a/angular-local-storage/angular-local-storage-tests.ts b/types/angular-local-storage/angular-local-storage-tests.ts similarity index 100% rename from angular-local-storage/angular-local-storage-tests.ts rename to types/angular-local-storage/angular-local-storage-tests.ts diff --git a/angular-local-storage/index.d.ts b/types/angular-local-storage/index.d.ts similarity index 100% rename from angular-local-storage/index.d.ts rename to types/angular-local-storage/index.d.ts diff --git a/angular-local-storage/tsconfig.json b/types/angular-local-storage/tsconfig.json similarity index 100% rename from angular-local-storage/tsconfig.json rename to types/angular-local-storage/tsconfig.json diff --git a/angular-localforage/angular-localforage-tests.ts b/types/angular-localforage/angular-localforage-tests.ts similarity index 100% rename from angular-localforage/angular-localforage-tests.ts rename to types/angular-localforage/angular-localforage-tests.ts diff --git a/angular-localforage/index.d.ts b/types/angular-localforage/index.d.ts similarity index 100% rename from angular-localforage/index.d.ts rename to types/angular-localforage/index.d.ts diff --git a/types/angular-localforage/package.json b/types/angular-localforage/package.json new file mode 100644 index 0000000000..07bf3d2615 --- /dev/null +++ b/types/angular-localforage/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "localforage": "^1.5.0" + } +} \ No newline at end of file diff --git a/angular-localforage/tsconfig.json b/types/angular-localforage/tsconfig.json similarity index 100% rename from angular-localforage/tsconfig.json rename to types/angular-localforage/tsconfig.json diff --git a/angular-locker/angular-locker-tests.ts b/types/angular-locker/angular-locker-tests.ts similarity index 100% rename from angular-locker/angular-locker-tests.ts rename to types/angular-locker/angular-locker-tests.ts diff --git a/angular-locker/index.d.ts b/types/angular-locker/index.d.ts similarity index 100% rename from angular-locker/index.d.ts rename to types/angular-locker/index.d.ts diff --git a/angular-locker/tsconfig.json b/types/angular-locker/tsconfig.json similarity index 100% rename from angular-locker/tsconfig.json rename to types/angular-locker/tsconfig.json diff --git a/angular-material/angular-material-tests.ts b/types/angular-material/angular-material-tests.ts similarity index 100% rename from angular-material/angular-material-tests.ts rename to types/angular-material/angular-material-tests.ts diff --git a/angular-material/index.d.ts b/types/angular-material/index.d.ts similarity index 100% rename from angular-material/index.d.ts rename to types/angular-material/index.d.ts diff --git a/angular-material/tsconfig.json b/types/angular-material/tsconfig.json similarity index 100% rename from angular-material/tsconfig.json rename to types/angular-material/tsconfig.json diff --git a/angular-media-queries/angular-media-queries-tests.ts b/types/angular-media-queries/angular-media-queries-tests.ts similarity index 100% rename from angular-media-queries/angular-media-queries-tests.ts rename to types/angular-media-queries/angular-media-queries-tests.ts diff --git a/angular-media-queries/index.d.ts b/types/angular-media-queries/index.d.ts similarity index 100% rename from angular-media-queries/index.d.ts rename to types/angular-media-queries/index.d.ts diff --git a/angular-media-queries/tsconfig.json b/types/angular-media-queries/tsconfig.json similarity index 100% rename from angular-media-queries/tsconfig.json rename to types/angular-media-queries/tsconfig.json diff --git a/angular-meteor/angular-meteor-tests.ts b/types/angular-meteor/angular-meteor-tests.ts similarity index 100% rename from angular-meteor/angular-meteor-tests.ts rename to types/angular-meteor/angular-meteor-tests.ts diff --git a/angular-meteor/index.d.ts b/types/angular-meteor/index.d.ts similarity index 100% rename from angular-meteor/index.d.ts rename to types/angular-meteor/index.d.ts diff --git a/angular-meteor/tsconfig.json b/types/angular-meteor/tsconfig.json similarity index 100% rename from angular-meteor/tsconfig.json rename to types/angular-meteor/tsconfig.json diff --git a/angular-mocks/angular-mocks-tests.ts b/types/angular-mocks/angular-mocks-tests.ts similarity index 100% rename from angular-mocks/angular-mocks-tests.ts rename to types/angular-mocks/angular-mocks-tests.ts diff --git a/angular-mocks/index.d.ts b/types/angular-mocks/index.d.ts similarity index 100% rename from angular-mocks/index.d.ts rename to types/angular-mocks/index.d.ts diff --git a/angular-mocks/mocks.d.ts b/types/angular-mocks/mocks.d.ts similarity index 100% rename from angular-mocks/mocks.d.ts rename to types/angular-mocks/mocks.d.ts diff --git a/angular-mocks/tsconfig.json b/types/angular-mocks/tsconfig.json similarity index 100% rename from angular-mocks/tsconfig.json rename to types/angular-mocks/tsconfig.json diff --git a/angular-modal/angular-modal-tests.ts b/types/angular-modal/angular-modal-tests.ts similarity index 100% rename from angular-modal/angular-modal-tests.ts rename to types/angular-modal/angular-modal-tests.ts diff --git a/angular-modal/index.d.ts b/types/angular-modal/index.d.ts similarity index 100% rename from angular-modal/index.d.ts rename to types/angular-modal/index.d.ts diff --git a/angular-modal/tsconfig.json b/types/angular-modal/tsconfig.json similarity index 100% rename from angular-modal/tsconfig.json rename to types/angular-modal/tsconfig.json diff --git a/angular-notifications/angular-notifications-tests.ts b/types/angular-notifications/angular-notifications-tests.ts similarity index 100% rename from angular-notifications/angular-notifications-tests.ts rename to types/angular-notifications/angular-notifications-tests.ts diff --git a/angular-notifications/index.d.ts b/types/angular-notifications/index.d.ts similarity index 100% rename from angular-notifications/index.d.ts rename to types/angular-notifications/index.d.ts diff --git a/angular-notifications/tsconfig.json b/types/angular-notifications/tsconfig.json similarity index 100% rename from angular-notifications/tsconfig.json rename to types/angular-notifications/tsconfig.json diff --git a/angular-notify/angular-notify-tests.ts b/types/angular-notify/angular-notify-tests.ts similarity index 100% rename from angular-notify/angular-notify-tests.ts rename to types/angular-notify/angular-notify-tests.ts diff --git a/angular-notify/index.d.ts b/types/angular-notify/index.d.ts similarity index 100% rename from angular-notify/index.d.ts rename to types/angular-notify/index.d.ts diff --git a/angular-notify/tsconfig.json b/types/angular-notify/tsconfig.json similarity index 100% rename from angular-notify/tsconfig.json rename to types/angular-notify/tsconfig.json diff --git a/angular-oauth2/angular-oauth2-tests.ts b/types/angular-oauth2/angular-oauth2-tests.ts similarity index 100% rename from angular-oauth2/angular-oauth2-tests.ts rename to types/angular-oauth2/angular-oauth2-tests.ts diff --git a/angular-oauth2/index.d.ts b/types/angular-oauth2/index.d.ts similarity index 95% rename from angular-oauth2/index.d.ts rename to types/angular-oauth2/index.d.ts index e6b9592874..23df762df1 100644 --- a/angular-oauth2/index.d.ts +++ b/types/angular-oauth2/index.d.ts @@ -6,8 +6,8 @@ import * as angular from 'angular'; declare module 'angular' { - export namespace oauth2 { - interface OAuthConfig { + namespace oauth2 { + interface OAuthConfig { baseUrl: string; clientId: string; clientSecret?: string; @@ -43,7 +43,5 @@ declare module 'angular' { interface OAuthTokenProvider { configure(params: OAuthTokenConfig): OAuthTokenConfig; } - } } - diff --git a/angular-oauth2/tsconfig.json b/types/angular-oauth2/tsconfig.json similarity index 100% rename from angular-oauth2/tsconfig.json rename to types/angular-oauth2/tsconfig.json diff --git a/angular-oauth2/tslint.json b/types/angular-oauth2/tslint.json similarity index 100% rename from angular-oauth2/tslint.json rename to types/angular-oauth2/tslint.json diff --git a/angular-odata-resources/angular-odata-resources-tests.ts b/types/angular-odata-resources/angular-odata-resources-tests.ts similarity index 100% rename from angular-odata-resources/angular-odata-resources-tests.ts rename to types/angular-odata-resources/angular-odata-resources-tests.ts diff --git a/angular-odata-resources/index.d.ts b/types/angular-odata-resources/index.d.ts similarity index 100% rename from angular-odata-resources/index.d.ts rename to types/angular-odata-resources/index.d.ts diff --git a/angular-odata-resources/tsconfig.json b/types/angular-odata-resources/tsconfig.json similarity index 100% rename from angular-odata-resources/tsconfig.json rename to types/angular-odata-resources/tsconfig.json diff --git a/angular-permission/angular-permission-tests.ts b/types/angular-permission/angular-permission-tests.ts similarity index 100% rename from angular-permission/angular-permission-tests.ts rename to types/angular-permission/angular-permission-tests.ts diff --git a/angular-permission/index.d.ts b/types/angular-permission/index.d.ts similarity index 100% rename from angular-permission/index.d.ts rename to types/angular-permission/index.d.ts diff --git a/angular-permission/tsconfig.json b/types/angular-permission/tsconfig.json similarity index 100% rename from angular-permission/tsconfig.json rename to types/angular-permission/tsconfig.json diff --git a/angular-promise-tracker/angular-promise-tracker-tests.ts b/types/angular-promise-tracker/angular-promise-tracker-tests.ts similarity index 100% rename from angular-promise-tracker/angular-promise-tracker-tests.ts rename to types/angular-promise-tracker/angular-promise-tracker-tests.ts diff --git a/angular-promise-tracker/index.d.ts b/types/angular-promise-tracker/index.d.ts similarity index 100% rename from angular-promise-tracker/index.d.ts rename to types/angular-promise-tracker/index.d.ts diff --git a/angular-promise-tracker/tsconfig.json b/types/angular-promise-tracker/tsconfig.json similarity index 100% rename from angular-promise-tracker/tsconfig.json rename to types/angular-promise-tracker/tsconfig.json diff --git a/angular-q-spread/angular-q-spread-tests.ts b/types/angular-q-spread/angular-q-spread-tests.ts similarity index 100% rename from angular-q-spread/angular-q-spread-tests.ts rename to types/angular-q-spread/angular-q-spread-tests.ts diff --git a/angular-q-spread/index.d.ts b/types/angular-q-spread/index.d.ts similarity index 100% rename from angular-q-spread/index.d.ts rename to types/angular-q-spread/index.d.ts diff --git a/angular-q-spread/tsconfig.json b/types/angular-q-spread/tsconfig.json similarity index 100% rename from angular-q-spread/tsconfig.json rename to types/angular-q-spread/tsconfig.json diff --git a/angular-resource/angular-resource-tests.ts b/types/angular-resource/angular-resource-tests.ts similarity index 100% rename from angular-resource/angular-resource-tests.ts rename to types/angular-resource/angular-resource-tests.ts diff --git a/angular-resource/index.d.ts b/types/angular-resource/index.d.ts similarity index 100% rename from angular-resource/index.d.ts rename to types/angular-resource/index.d.ts diff --git a/angular-resource/tsconfig.json b/types/angular-resource/tsconfig.json similarity index 100% rename from angular-resource/tsconfig.json rename to types/angular-resource/tsconfig.json diff --git a/angular-route/angular-route-tests.ts b/types/angular-route/angular-route-tests.ts similarity index 100% rename from angular-route/angular-route-tests.ts rename to types/angular-route/angular-route-tests.ts diff --git a/angular-route/index.d.ts b/types/angular-route/index.d.ts similarity index 100% rename from angular-route/index.d.ts rename to types/angular-route/index.d.ts diff --git a/angular-route/tsconfig.json b/types/angular-route/tsconfig.json similarity index 100% rename from angular-route/tsconfig.json rename to types/angular-route/tsconfig.json diff --git a/angular-sanitize/angular-sanitize-tests.ts b/types/angular-sanitize/angular-sanitize-tests.ts similarity index 100% rename from angular-sanitize/angular-sanitize-tests.ts rename to types/angular-sanitize/angular-sanitize-tests.ts diff --git a/angular-sanitize/index.d.ts b/types/angular-sanitize/index.d.ts similarity index 100% rename from angular-sanitize/index.d.ts rename to types/angular-sanitize/index.d.ts diff --git a/angular-sanitize/tsconfig.json b/types/angular-sanitize/tsconfig.json similarity index 100% rename from angular-sanitize/tsconfig.json rename to types/angular-sanitize/tsconfig.json diff --git a/angular-scenario/index.d.ts b/types/angular-scenario/index.d.ts similarity index 100% rename from angular-scenario/index.d.ts rename to types/angular-scenario/index.d.ts diff --git a/angular-scenario/tsconfig.json b/types/angular-scenario/tsconfig.json similarity index 100% rename from angular-scenario/tsconfig.json rename to types/angular-scenario/tsconfig.json diff --git a/angular-scroll/angular-scroll-tests.ts b/types/angular-scroll/angular-scroll-tests.ts similarity index 100% rename from angular-scroll/angular-scroll-tests.ts rename to types/angular-scroll/angular-scroll-tests.ts diff --git a/angular-scroll/index.d.ts b/types/angular-scroll/index.d.ts similarity index 100% rename from angular-scroll/index.d.ts rename to types/angular-scroll/index.d.ts diff --git a/angular-scroll/tsconfig.json b/types/angular-scroll/tsconfig.json similarity index 100% rename from angular-scroll/tsconfig.json rename to types/angular-scroll/tsconfig.json diff --git a/angular-signalr-hub/angular-signalr-hub-tests.ts b/types/angular-signalr-hub/angular-signalr-hub-tests.ts similarity index 100% rename from angular-signalr-hub/angular-signalr-hub-tests.ts rename to types/angular-signalr-hub/angular-signalr-hub-tests.ts diff --git a/angular-signalr-hub/index.d.ts b/types/angular-signalr-hub/index.d.ts similarity index 100% rename from angular-signalr-hub/index.d.ts rename to types/angular-signalr-hub/index.d.ts diff --git a/angular-signalr-hub/tsconfig.json b/types/angular-signalr-hub/tsconfig.json similarity index 100% rename from angular-signalr-hub/tsconfig.json rename to types/angular-signalr-hub/tsconfig.json diff --git a/angular-spinner/angular-spinner-tests.ts b/types/angular-spinner/angular-spinner-tests.ts similarity index 100% rename from angular-spinner/angular-spinner-tests.ts rename to types/angular-spinner/angular-spinner-tests.ts diff --git a/angular-spinner/index.d.ts b/types/angular-spinner/index.d.ts similarity index 100% rename from angular-spinner/index.d.ts rename to types/angular-spinner/index.d.ts diff --git a/angular-spinner/tsconfig.json b/types/angular-spinner/tsconfig.json similarity index 100% rename from angular-spinner/tsconfig.json rename to types/angular-spinner/tsconfig.json diff --git a/angular-storage/angular-storage-tests.ts b/types/angular-storage/angular-storage-tests.ts similarity index 100% rename from angular-storage/angular-storage-tests.ts rename to types/angular-storage/angular-storage-tests.ts diff --git a/angular-storage/index.d.ts b/types/angular-storage/index.d.ts similarity index 100% rename from angular-storage/index.d.ts rename to types/angular-storage/index.d.ts diff --git a/angular-storage/tsconfig.json b/types/angular-storage/tsconfig.json similarity index 100% rename from angular-storage/tsconfig.json rename to types/angular-storage/tsconfig.json diff --git a/angular-strap/angular-strap-tests.ts b/types/angular-strap/angular-strap-tests.ts similarity index 100% rename from angular-strap/angular-strap-tests.ts rename to types/angular-strap/angular-strap-tests.ts diff --git a/angular-strap/index.d.ts b/types/angular-strap/index.d.ts similarity index 100% rename from angular-strap/index.d.ts rename to types/angular-strap/index.d.ts diff --git a/angular-strap/tsconfig.json b/types/angular-strap/tsconfig.json similarity index 100% rename from angular-strap/tsconfig.json rename to types/angular-strap/tsconfig.json diff --git a/angular-toastr/angular-toastr-tests.ts b/types/angular-toastr/angular-toastr-tests.ts similarity index 100% rename from angular-toastr/angular-toastr-tests.ts rename to types/angular-toastr/angular-toastr-tests.ts diff --git a/angular-toastr/index.d.ts b/types/angular-toastr/index.d.ts similarity index 100% rename from angular-toastr/index.d.ts rename to types/angular-toastr/index.d.ts diff --git a/angular-toastr/tsconfig.json b/types/angular-toastr/tsconfig.json similarity index 100% rename from angular-toastr/tsconfig.json rename to types/angular-toastr/tsconfig.json diff --git a/angular-toasty/angular-toasty-tests.ts b/types/angular-toasty/angular-toasty-tests.ts similarity index 100% rename from angular-toasty/angular-toasty-tests.ts rename to types/angular-toasty/angular-toasty-tests.ts diff --git a/angular-toasty/index.d.ts b/types/angular-toasty/index.d.ts similarity index 100% rename from angular-toasty/index.d.ts rename to types/angular-toasty/index.d.ts diff --git a/angular-toasty/tsconfig.json b/types/angular-toasty/tsconfig.json similarity index 100% rename from angular-toasty/tsconfig.json rename to types/angular-toasty/tsconfig.json diff --git a/angular-touchspin/angular-touchspin-tests.ts b/types/angular-touchspin/angular-touchspin-tests.ts similarity index 100% rename from angular-touchspin/angular-touchspin-tests.ts rename to types/angular-touchspin/angular-touchspin-tests.ts diff --git a/angular-touchspin/index.d.ts b/types/angular-touchspin/index.d.ts similarity index 100% rename from angular-touchspin/index.d.ts rename to types/angular-touchspin/index.d.ts diff --git a/angular-touchspin/tsconfig.json b/types/angular-touchspin/tsconfig.json similarity index 100% rename from angular-touchspin/tsconfig.json rename to types/angular-touchspin/tsconfig.json diff --git a/angular-translate/angular-translate-tests.ts b/types/angular-translate/angular-translate-tests.ts similarity index 100% rename from angular-translate/angular-translate-tests.ts rename to types/angular-translate/angular-translate-tests.ts diff --git a/angular-translate/index.d.ts b/types/angular-translate/index.d.ts similarity index 100% rename from angular-translate/index.d.ts rename to types/angular-translate/index.d.ts diff --git a/angular-translate/tsconfig.json b/types/angular-translate/tsconfig.json similarity index 100% rename from angular-translate/tsconfig.json rename to types/angular-translate/tsconfig.json diff --git a/angular-ui-bootstrap/angular-ui-bootstrap-tests.ts b/types/angular-ui-bootstrap/angular-ui-bootstrap-tests.ts similarity index 100% rename from angular-ui-bootstrap/angular-ui-bootstrap-tests.ts rename to types/angular-ui-bootstrap/angular-ui-bootstrap-tests.ts diff --git a/angular-ui-bootstrap/index.d.ts b/types/angular-ui-bootstrap/index.d.ts similarity index 100% rename from angular-ui-bootstrap/index.d.ts rename to types/angular-ui-bootstrap/index.d.ts diff --git a/angular-ui-bootstrap/tsconfig.json b/types/angular-ui-bootstrap/tsconfig.json similarity index 100% rename from angular-ui-bootstrap/tsconfig.json rename to types/angular-ui-bootstrap/tsconfig.json diff --git a/angular-ui-notification/angular-ui-notification-tests.ts b/types/angular-ui-notification/angular-ui-notification-tests.ts similarity index 100% rename from angular-ui-notification/angular-ui-notification-tests.ts rename to types/angular-ui-notification/angular-ui-notification-tests.ts diff --git a/angular-ui-notification/index.d.ts b/types/angular-ui-notification/index.d.ts similarity index 100% rename from angular-ui-notification/index.d.ts rename to types/angular-ui-notification/index.d.ts diff --git a/angular-ui-notification/tsconfig.json b/types/angular-ui-notification/tsconfig.json similarity index 100% rename from angular-ui-notification/tsconfig.json rename to types/angular-ui-notification/tsconfig.json diff --git a/angular-ui-router-default/angular-ui-router-default-tests.ts b/types/angular-ui-router-default/angular-ui-router-default-tests.ts similarity index 100% rename from angular-ui-router-default/angular-ui-router-default-tests.ts rename to types/angular-ui-router-default/angular-ui-router-default-tests.ts diff --git a/angular-ui-router-default/index.d.ts b/types/angular-ui-router-default/index.d.ts similarity index 100% rename from angular-ui-router-default/index.d.ts rename to types/angular-ui-router-default/index.d.ts diff --git a/angular-ui-router-default/tsconfig.json b/types/angular-ui-router-default/tsconfig.json similarity index 100% rename from angular-ui-router-default/tsconfig.json rename to types/angular-ui-router-default/tsconfig.json diff --git a/angular-ui-router-uib-modal/angular-ui-router-uib-modal-tests.ts b/types/angular-ui-router-uib-modal/angular-ui-router-uib-modal-tests.ts similarity index 100% rename from angular-ui-router-uib-modal/angular-ui-router-uib-modal-tests.ts rename to types/angular-ui-router-uib-modal/angular-ui-router-uib-modal-tests.ts diff --git a/angular-ui-router-uib-modal/index.d.ts b/types/angular-ui-router-uib-modal/index.d.ts similarity index 100% rename from angular-ui-router-uib-modal/index.d.ts rename to types/angular-ui-router-uib-modal/index.d.ts diff --git a/angular-ui-router-uib-modal/tsconfig.json b/types/angular-ui-router-uib-modal/tsconfig.json similarity index 100% rename from angular-ui-router-uib-modal/tsconfig.json rename to types/angular-ui-router-uib-modal/tsconfig.json diff --git a/angular-ui-router/angular-ui-router-tests.ts b/types/angular-ui-router/angular-ui-router-tests.ts similarity index 100% rename from angular-ui-router/angular-ui-router-tests.ts rename to types/angular-ui-router/angular-ui-router-tests.ts diff --git a/angular-ui-router/index.d.ts b/types/angular-ui-router/index.d.ts similarity index 100% rename from angular-ui-router/index.d.ts rename to types/angular-ui-router/index.d.ts diff --git a/angular-ui-router/tsconfig.json b/types/angular-ui-router/tsconfig.json similarity index 100% rename from angular-ui-router/tsconfig.json rename to types/angular-ui-router/tsconfig.json diff --git a/angular-ui-scroll/angular-ui-scroll-tests.ts b/types/angular-ui-scroll/angular-ui-scroll-tests.ts similarity index 100% rename from angular-ui-scroll/angular-ui-scroll-tests.ts rename to types/angular-ui-scroll/angular-ui-scroll-tests.ts diff --git a/angular-ui-scroll/index.d.ts b/types/angular-ui-scroll/index.d.ts similarity index 100% rename from angular-ui-scroll/index.d.ts rename to types/angular-ui-scroll/index.d.ts diff --git a/angular-ui-scroll/tsconfig.json b/types/angular-ui-scroll/tsconfig.json similarity index 100% rename from angular-ui-scroll/tsconfig.json rename to types/angular-ui-scroll/tsconfig.json diff --git a/angular-ui-sortable/angular-ui-sortable-tests.ts b/types/angular-ui-sortable/angular-ui-sortable-tests.ts similarity index 100% rename from angular-ui-sortable/angular-ui-sortable-tests.ts rename to types/angular-ui-sortable/angular-ui-sortable-tests.ts diff --git a/angular-ui-sortable/index.d.ts b/types/angular-ui-sortable/index.d.ts similarity index 100% rename from angular-ui-sortable/index.d.ts rename to types/angular-ui-sortable/index.d.ts diff --git a/angular-ui-sortable/tsconfig.json b/types/angular-ui-sortable/tsconfig.json similarity index 100% rename from angular-ui-sortable/tsconfig.json rename to types/angular-ui-sortable/tsconfig.json diff --git a/angular-ui-tree/angular-ui-tree-tests.ts b/types/angular-ui-tree/angular-ui-tree-tests.ts similarity index 100% rename from angular-ui-tree/angular-ui-tree-tests.ts rename to types/angular-ui-tree/angular-ui-tree-tests.ts diff --git a/angular-ui-tree/index.d.ts b/types/angular-ui-tree/index.d.ts similarity index 100% rename from angular-ui-tree/index.d.ts rename to types/angular-ui-tree/index.d.ts diff --git a/angular-ui-tree/tsconfig.json b/types/angular-ui-tree/tsconfig.json similarity index 100% rename from angular-ui-tree/tsconfig.json rename to types/angular-ui-tree/tsconfig.json diff --git a/angular-websocket/angular-websocket-tests.ts b/types/angular-websocket/angular-websocket-tests.ts similarity index 100% rename from angular-websocket/angular-websocket-tests.ts rename to types/angular-websocket/angular-websocket-tests.ts diff --git a/angular-websocket/index.d.ts b/types/angular-websocket/index.d.ts similarity index 100% rename from angular-websocket/index.d.ts rename to types/angular-websocket/index.d.ts diff --git a/angular-websocket/tsconfig.json b/types/angular-websocket/tsconfig.json similarity index 100% rename from angular-websocket/tsconfig.json rename to types/angular-websocket/tsconfig.json diff --git a/angular-wizard/angular-wizard-tests.ts b/types/angular-wizard/angular-wizard-tests.ts similarity index 100% rename from angular-wizard/angular-wizard-tests.ts rename to types/angular-wizard/angular-wizard-tests.ts diff --git a/angular-wizard/index.d.ts b/types/angular-wizard/index.d.ts similarity index 100% rename from angular-wizard/index.d.ts rename to types/angular-wizard/index.d.ts diff --git a/angular-wizard/tsconfig.json b/types/angular-wizard/tsconfig.json similarity index 100% rename from angular-wizard/tsconfig.json rename to types/angular-wizard/tsconfig.json diff --git a/angular-xeditable/angular-xeditable-tests.ts b/types/angular-xeditable/angular-xeditable-tests.ts similarity index 100% rename from angular-xeditable/angular-xeditable-tests.ts rename to types/angular-xeditable/angular-xeditable-tests.ts diff --git a/angular-xeditable/index.d.ts b/types/angular-xeditable/index.d.ts similarity index 100% rename from angular-xeditable/index.d.ts rename to types/angular-xeditable/index.d.ts diff --git a/angular-xeditable/tsconfig.json b/types/angular-xeditable/tsconfig.json similarity index 100% rename from angular-xeditable/tsconfig.json rename to types/angular-xeditable/tsconfig.json diff --git a/angular.throttle/angular.throttle-tests.ts b/types/angular.throttle/angular.throttle-tests.ts similarity index 100% rename from angular.throttle/angular.throttle-tests.ts rename to types/angular.throttle/angular.throttle-tests.ts diff --git a/angular.throttle/index.d.ts b/types/angular.throttle/index.d.ts similarity index 100% rename from angular.throttle/index.d.ts rename to types/angular.throttle/index.d.ts diff --git a/angular.throttle/tsconfig.json b/types/angular.throttle/tsconfig.json similarity index 100% rename from angular.throttle/tsconfig.json rename to types/angular.throttle/tsconfig.json diff --git a/angular/README.md b/types/angular/README.md similarity index 100% rename from angular/README.md rename to types/angular/README.md diff --git a/angular/UNUSED_FILES.txt b/types/angular/UNUSED_FILES.txt similarity index 100% rename from angular/UNUSED_FILES.txt rename to types/angular/UNUSED_FILES.txt diff --git a/angular/angular-component-router.d.ts b/types/angular/angular-component-router.d.ts similarity index 99% rename from angular/angular-component-router.d.ts rename to types/angular/angular-component-router.d.ts index 92458331d6..da3afc7a71 100644 --- a/angular/angular-component-router.d.ts +++ b/types/angular/angular-component-router.d.ts @@ -178,6 +178,7 @@ declare namespace angular { registry: RouteRegistry; parent: Router; hostComponent: any; + currentInstruction: Instruction; /** * Constructs a child router. You probably don't need to use this unless you're writing a reusable diff --git a/angular/angular-tests.ts b/types/angular/angular-tests.ts similarity index 100% rename from angular/angular-tests.ts rename to types/angular/angular-tests.ts diff --git a/angular/index.d.ts b/types/angular/index.d.ts similarity index 99% rename from angular/index.d.ts rename to types/angular/index.d.ts index 5d47751844..485ad9ebb3 100644 --- a/angular/index.d.ts +++ b/types/angular/index.d.ts @@ -26,7 +26,6 @@ import ng = angular; // ng module (angular.js) /////////////////////////////////////////////////////////////////////////////// declare namespace angular { - type Injectable = T | Array; // not directly implemented, but ensures that constructed class implements $get @@ -344,7 +343,6 @@ declare namespace angular { * see https://docs.angularjs.org/api/ng/type/form.FormController */ interface IFormController { - /** * Indexer which should return ng.INgModelController for most properties but cannot because of "All named properties must be assignable to string indexer type" constraint - see https://github.com/Microsoft/TypeScript/issues/272 */ @@ -532,7 +530,6 @@ declare namespace angular { * see https://docs.angularjs.org/api/ng/directive/ngRepeat */ interface IRepeatScope extends IScope { - /** * iterator offset of the repeated element (0..length-1). */ @@ -562,7 +559,6 @@ declare namespace angular { * true if the iterator position $index is odd (otherwise false). */ $odd: boolean; - } interface IAngularEvent { @@ -1944,8 +1940,7 @@ declare namespace angular { /////////////////////////////////////////////////////////////////////////// // AUTO module (angular.js) /////////////////////////////////////////////////////////////////////////// - export namespace auto { - + namespace auto { /////////////////////////////////////////////////////////////////////// // InjectorService // see http://docs.angularjs.org/api/AUTO.$injector diff --git a/angular/tsconfig.json b/types/angular/tsconfig.json similarity index 100% rename from angular/tsconfig.json rename to types/angular/tsconfig.json diff --git a/angular/tslint.json b/types/angular/tslint.json similarity index 100% rename from angular/tslint.json rename to types/angular/tslint.json diff --git a/angularfire/angularfire-tests.ts b/types/angularfire/angularfire-tests.ts similarity index 100% rename from angularfire/angularfire-tests.ts rename to types/angularfire/angularfire-tests.ts diff --git a/angularfire/index.d.ts b/types/angularfire/index.d.ts similarity index 100% rename from angularfire/index.d.ts rename to types/angularfire/index.d.ts diff --git a/angularfire/tsconfig.json b/types/angularfire/tsconfig.json similarity index 100% rename from angularfire/tsconfig.json rename to types/angularfire/tsconfig.json diff --git a/angularlocalstorage/angularlocalstorage-tests.ts b/types/angularlocalstorage/angularlocalstorage-tests.ts similarity index 100% rename from angularlocalstorage/angularlocalstorage-tests.ts rename to types/angularlocalstorage/angularlocalstorage-tests.ts diff --git a/angularlocalstorage/index.d.ts b/types/angularlocalstorage/index.d.ts similarity index 100% rename from angularlocalstorage/index.d.ts rename to types/angularlocalstorage/index.d.ts diff --git a/angularlocalstorage/tsconfig.json b/types/angularlocalstorage/tsconfig.json similarity index 100% rename from angularlocalstorage/tsconfig.json rename to types/angularlocalstorage/tsconfig.json diff --git a/angulartics/angulartics-tests.ts b/types/angulartics/angulartics-tests.ts similarity index 100% rename from angulartics/angulartics-tests.ts rename to types/angulartics/angulartics-tests.ts diff --git a/angulartics/index.d.ts b/types/angulartics/index.d.ts similarity index 100% rename from angulartics/index.d.ts rename to types/angulartics/index.d.ts diff --git a/angulartics/tsconfig.json b/types/angulartics/tsconfig.json similarity index 100% rename from angulartics/tsconfig.json rename to types/angulartics/tsconfig.json diff --git a/animation-frame/animation-frame-tests.ts b/types/animation-frame/animation-frame-tests.ts similarity index 100% rename from animation-frame/animation-frame-tests.ts rename to types/animation-frame/animation-frame-tests.ts diff --git a/animation-frame/index.d.ts b/types/animation-frame/index.d.ts similarity index 100% rename from animation-frame/index.d.ts rename to types/animation-frame/index.d.ts diff --git a/animation-frame/tsconfig.json b/types/animation-frame/tsconfig.json similarity index 100% rename from animation-frame/tsconfig.json rename to types/animation-frame/tsconfig.json diff --git a/ansi-styles/ansi-styles-tests.ts b/types/ansi-styles/ansi-styles-tests.ts similarity index 100% rename from ansi-styles/ansi-styles-tests.ts rename to types/ansi-styles/ansi-styles-tests.ts diff --git a/ansi-styles/index.d.ts b/types/ansi-styles/index.d.ts similarity index 100% rename from ansi-styles/index.d.ts rename to types/ansi-styles/index.d.ts diff --git a/ansi-styles/tsconfig.json b/types/ansi-styles/tsconfig.json similarity index 100% rename from ansi-styles/tsconfig.json rename to types/ansi-styles/tsconfig.json diff --git a/ansicolors/index.d.ts b/types/ansicolors/index.d.ts similarity index 100% rename from ansicolors/index.d.ts rename to types/ansicolors/index.d.ts diff --git a/ansicolors/tsconfig.json b/types/ansicolors/tsconfig.json similarity index 100% rename from ansicolors/tsconfig.json rename to types/ansicolors/tsconfig.json diff --git a/any-db-transaction/any-db-transaction-tests.ts b/types/any-db-transaction/any-db-transaction-tests.ts similarity index 100% rename from any-db-transaction/any-db-transaction-tests.ts rename to types/any-db-transaction/any-db-transaction-tests.ts diff --git a/any-db-transaction/index.d.ts b/types/any-db-transaction/index.d.ts similarity index 100% rename from any-db-transaction/index.d.ts rename to types/any-db-transaction/index.d.ts diff --git a/any-db-transaction/tsconfig.json b/types/any-db-transaction/tsconfig.json similarity index 100% rename from any-db-transaction/tsconfig.json rename to types/any-db-transaction/tsconfig.json diff --git a/any-db/any-db-tests.ts b/types/any-db/any-db-tests.ts similarity index 100% rename from any-db/any-db-tests.ts rename to types/any-db/any-db-tests.ts diff --git a/any-db/index.d.ts b/types/any-db/index.d.ts similarity index 100% rename from any-db/index.d.ts rename to types/any-db/index.d.ts diff --git a/any-db/tsconfig.json b/types/any-db/tsconfig.json similarity index 100% rename from any-db/tsconfig.json rename to types/any-db/tsconfig.json diff --git a/anybar/anybar-tests.ts b/types/anybar/anybar-tests.ts similarity index 100% rename from anybar/anybar-tests.ts rename to types/anybar/anybar-tests.ts diff --git a/anybar/index.d.ts b/types/anybar/index.d.ts similarity index 100% rename from anybar/index.d.ts rename to types/anybar/index.d.ts diff --git a/anybar/tsconfig.json b/types/anybar/tsconfig.json similarity index 100% rename from anybar/tsconfig.json rename to types/anybar/tsconfig.json diff --git a/anydb-sql-migrations/anydb-sql-migrations-tests.ts b/types/anydb-sql-migrations/anydb-sql-migrations-tests.ts similarity index 100% rename from anydb-sql-migrations/anydb-sql-migrations-tests.ts rename to types/anydb-sql-migrations/anydb-sql-migrations-tests.ts diff --git a/anydb-sql-migrations/index.d.ts b/types/anydb-sql-migrations/index.d.ts similarity index 100% rename from anydb-sql-migrations/index.d.ts rename to types/anydb-sql-migrations/index.d.ts diff --git a/anydb-sql-migrations/tsconfig.json b/types/anydb-sql-migrations/tsconfig.json similarity index 100% rename from anydb-sql-migrations/tsconfig.json rename to types/anydb-sql-migrations/tsconfig.json diff --git a/anydb-sql/anydb-sql-tests.ts b/types/anydb-sql/anydb-sql-tests.ts similarity index 100% rename from anydb-sql/anydb-sql-tests.ts rename to types/anydb-sql/anydb-sql-tests.ts diff --git a/anydb-sql/index.d.ts b/types/anydb-sql/index.d.ts similarity index 100% rename from anydb-sql/index.d.ts rename to types/anydb-sql/index.d.ts diff --git a/anydb-sql/tsconfig.json b/types/anydb-sql/tsconfig.json similarity index 100% rename from anydb-sql/tsconfig.json rename to types/anydb-sql/tsconfig.json diff --git a/apex.js/apex.js-tests.ts b/types/apex.js/apex.js-tests.ts similarity index 100% rename from apex.js/apex.js-tests.ts rename to types/apex.js/apex.js-tests.ts diff --git a/apex.js/index.d.ts b/types/apex.js/index.d.ts similarity index 100% rename from apex.js/index.d.ts rename to types/apex.js/index.d.ts diff --git a/apex.js/tsconfig.json b/types/apex.js/tsconfig.json similarity index 100% rename from apex.js/tsconfig.json rename to types/apex.js/tsconfig.json diff --git a/apex.js/tslint.json b/types/apex.js/tslint.json similarity index 100% rename from apex.js/tslint.json rename to types/apex.js/tslint.json diff --git a/aphrodite/aphrodite-tests.tsx b/types/aphrodite/aphrodite-tests.tsx similarity index 100% rename from aphrodite/aphrodite-tests.tsx rename to types/aphrodite/aphrodite-tests.tsx diff --git a/aphrodite/index.d.ts b/types/aphrodite/index.d.ts similarity index 100% rename from aphrodite/index.d.ts rename to types/aphrodite/index.d.ts diff --git a/aphrodite/no-important/index.d.ts b/types/aphrodite/no-important/index.d.ts similarity index 100% rename from aphrodite/no-important/index.d.ts rename to types/aphrodite/no-important/index.d.ts diff --git a/aphrodite/tsconfig.json b/types/aphrodite/tsconfig.json similarity index 100% rename from aphrodite/tsconfig.json rename to types/aphrodite/tsconfig.json diff --git a/api-error-handler/api-error-handler-tests.ts b/types/api-error-handler/api-error-handler-tests.ts similarity index 100% rename from api-error-handler/api-error-handler-tests.ts rename to types/api-error-handler/api-error-handler-tests.ts diff --git a/api-error-handler/index.d.ts b/types/api-error-handler/index.d.ts similarity index 100% rename from api-error-handler/index.d.ts rename to types/api-error-handler/index.d.ts diff --git a/api-error-handler/tsconfig.json b/types/api-error-handler/tsconfig.json similarity index 100% rename from api-error-handler/tsconfig.json rename to types/api-error-handler/tsconfig.json diff --git a/apigee-access/apigee-access-tests.ts b/types/apigee-access/apigee-access-tests.ts similarity index 100% rename from apigee-access/apigee-access-tests.ts rename to types/apigee-access/apigee-access-tests.ts diff --git a/apigee-access/index.d.ts b/types/apigee-access/index.d.ts similarity index 100% rename from apigee-access/index.d.ts rename to types/apigee-access/index.d.ts diff --git a/apigee-access/tsconfig.json b/types/apigee-access/tsconfig.json similarity index 100% rename from apigee-access/tsconfig.json rename to types/apigee-access/tsconfig.json diff --git a/apn/apn-tests.ts b/types/apn/apn-tests.ts similarity index 100% rename from apn/apn-tests.ts rename to types/apn/apn-tests.ts diff --git a/apn/index.d.ts b/types/apn/index.d.ts similarity index 100% rename from apn/index.d.ts rename to types/apn/index.d.ts diff --git a/apn/tsconfig.json b/types/apn/tsconfig.json similarity index 100% rename from apn/tsconfig.json rename to types/apn/tsconfig.json diff --git a/app-root-path/app-root-path-tests.ts b/types/app-root-path/app-root-path-tests.ts similarity index 100% rename from app-root-path/app-root-path-tests.ts rename to types/app-root-path/app-root-path-tests.ts diff --git a/app-root-path/index.d.ts b/types/app-root-path/index.d.ts similarity index 100% rename from app-root-path/index.d.ts rename to types/app-root-path/index.d.ts diff --git a/app-root-path/tsconfig.json b/types/app-root-path/tsconfig.json similarity index 100% rename from app-root-path/tsconfig.json rename to types/app-root-path/tsconfig.json diff --git a/appframework/appframework-tests.ts b/types/appframework/appframework-tests.ts similarity index 100% rename from appframework/appframework-tests.ts rename to types/appframework/appframework-tests.ts diff --git a/appframework/index.d.ts b/types/appframework/index.d.ts similarity index 100% rename from appframework/index.d.ts rename to types/appframework/index.d.ts diff --git a/appframework/tsconfig.json b/types/appframework/tsconfig.json similarity index 100% rename from appframework/tsconfig.json rename to types/appframework/tsconfig.json diff --git a/types/applepayjs/applepayjs-tests.ts b/types/applepayjs/applepayjs-tests.ts new file mode 100644 index 0000000000..26c61396ae --- /dev/null +++ b/types/applepayjs/applepayjs-tests.ts @@ -0,0 +1,273 @@ +// 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..52af393ebd --- /dev/null +++ b/types/applepayjs/index.d.ts @@ -0,0 +1,576 @@ +// 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..0344a1a3fa --- /dev/null +++ b/types/applepayjs/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "../tslint.json" +} diff --git a/appletvjs/README.md b/types/appletvjs/README.md similarity index 100% rename from appletvjs/README.md rename to types/appletvjs/README.md diff --git a/appletvjs/appletvjs-tests.ts b/types/appletvjs/appletvjs-tests.ts similarity index 100% rename from appletvjs/appletvjs-tests.ts rename to types/appletvjs/appletvjs-tests.ts diff --git a/appletvjs/index.d.ts b/types/appletvjs/index.d.ts similarity index 100% rename from appletvjs/index.d.ts rename to types/appletvjs/index.d.ts diff --git a/appletvjs/tsconfig.json b/types/appletvjs/tsconfig.json similarity index 100% rename from appletvjs/tsconfig.json rename to types/appletvjs/tsconfig.json diff --git a/applicationinsights-js/applicationinsights-js-tests.ts b/types/applicationinsights-js/applicationinsights-js-tests.ts similarity index 95% rename from applicationinsights-js/applicationinsights-js-tests.ts rename to types/applicationinsights-js/applicationinsights-js-tests.ts index 06a7d06bc5..66bc1f268d 100644 --- a/applicationinsights-js/applicationinsights-js-tests.ts +++ b/types/applicationinsights-js/applicationinsights-js-tests.ts @@ -31,7 +31,7 @@ var config: Microsoft.ApplicationInsights.IConfig = { }; var appInsights: Microsoft.ApplicationInsights.IAppInsights = { - config: config, + config, context: null, queue: null, @@ -128,7 +128,8 @@ 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(Microsoft.ApplicationInsights.Telemetry.Exception.dataType, exceptionObj); +var 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); context.track(exceptionEnvelope); @@ -146,13 +147,15 @@ 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(Microsoft.ApplicationInsights.Telemetry.PageViewPerformance.dataType, pageViewPerfObj); +var 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); 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(Microsoft.ApplicationInsights.Telemetry.RemoteDependencyData.dataType, remoteDepObj); +var 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); context.track(pageViewPerfEnvelope); diff --git a/applicationinsights-js/index.d.ts b/types/applicationinsights-js/index.d.ts similarity index 99% rename from applicationinsights-js/index.d.ts rename to types/applicationinsights-js/index.d.ts index c032919618..ede1584bb5 100644 --- a/applicationinsights-js/index.d.ts +++ b/types/applicationinsights-js/index.d.ts @@ -306,7 +306,6 @@ declare module Microsoft.Telemetry { } declare module Microsoft.ApplicationInsights.Telemetry { - class Event implements Microsoft.ApplicationInsights.ISerializable { static envelopeType: string; static dataType: string; @@ -794,7 +793,7 @@ declare module Microsoft.ApplicationInsights { } declare module 'applicationinsights-js' { - export let AppInsights: Microsoft.ApplicationInsights.IAppInsights; + const AppInsights: Microsoft.ApplicationInsights.IAppInsights; } declare var appInsights: Microsoft.ApplicationInsights.IAppInsights; \ No newline at end of file diff --git a/applicationinsights-js/tsconfig.json b/types/applicationinsights-js/tsconfig.json similarity index 100% rename from applicationinsights-js/tsconfig.json rename to types/applicationinsights-js/tsconfig.json diff --git a/applicationinsights-js/tslint.json b/types/applicationinsights-js/tslint.json similarity index 100% rename from applicationinsights-js/tslint.json rename to types/applicationinsights-js/tslint.json diff --git a/applicationinsights/applicationinsights-tests.ts b/types/applicationinsights/applicationinsights-tests.ts similarity index 100% rename from applicationinsights/applicationinsights-tests.ts rename to types/applicationinsights/applicationinsights-tests.ts diff --git a/applicationinsights/index.d.ts b/types/applicationinsights/index.d.ts similarity index 100% rename from applicationinsights/index.d.ts rename to types/applicationinsights/index.d.ts diff --git a/applicationinsights/tsconfig.json b/types/applicationinsights/tsconfig.json similarity index 100% rename from applicationinsights/tsconfig.json rename to types/applicationinsights/tsconfig.json diff --git a/arbiter/arbiter-tests.ts b/types/arbiter/arbiter-tests.ts similarity index 100% rename from arbiter/arbiter-tests.ts rename to types/arbiter/arbiter-tests.ts diff --git a/arbiter/index.d.ts b/types/arbiter/index.d.ts similarity index 100% rename from arbiter/index.d.ts rename to types/arbiter/index.d.ts diff --git a/arbiter/tsconfig.json b/types/arbiter/tsconfig.json similarity index 100% rename from arbiter/tsconfig.json rename to types/arbiter/tsconfig.json diff --git a/arcgis-js-api/arcgis-js-api-tests.ts b/types/arcgis-js-api/arcgis-js-api-tests.ts similarity index 100% rename from arcgis-js-api/arcgis-js-api-tests.ts rename to types/arcgis-js-api/arcgis-js-api-tests.ts diff --git a/arcgis-js-api/index.d.ts b/types/arcgis-js-api/index.d.ts similarity index 100% rename from arcgis-js-api/index.d.ts rename to types/arcgis-js-api/index.d.ts diff --git a/arcgis-js-api/tsconfig.json b/types/arcgis-js-api/tsconfig.json similarity index 100% rename from arcgis-js-api/tsconfig.json rename to types/arcgis-js-api/tsconfig.json diff --git a/arcgis-js-api/v3/arcgis-js-api-tests.ts b/types/arcgis-js-api/v3/arcgis-js-api-tests.ts similarity index 100% rename from arcgis-js-api/v3/arcgis-js-api-tests.ts rename to types/arcgis-js-api/v3/arcgis-js-api-tests.ts diff --git a/arcgis-js-api/v3/index.d.ts b/types/arcgis-js-api/v3/index.d.ts similarity index 100% rename from arcgis-js-api/v3/index.d.ts rename to types/arcgis-js-api/v3/index.d.ts diff --git a/arcgis-js-api/v3/tsconfig.json b/types/arcgis-js-api/v3/tsconfig.json similarity index 100% rename from arcgis-js-api/v3/tsconfig.json rename to types/arcgis-js-api/v3/tsconfig.json diff --git a/arcgis-rest-api/arcgis-rest-api-tests.ts b/types/arcgis-rest-api/arcgis-rest-api-tests.ts similarity index 100% rename from arcgis-rest-api/arcgis-rest-api-tests.ts rename to types/arcgis-rest-api/arcgis-rest-api-tests.ts diff --git a/arcgis-rest-api/index.d.ts b/types/arcgis-rest-api/index.d.ts similarity index 100% rename from arcgis-rest-api/index.d.ts rename to types/arcgis-rest-api/index.d.ts diff --git a/arcgis-rest-api/tsconfig.json b/types/arcgis-rest-api/tsconfig.json similarity index 100% rename from arcgis-rest-api/tsconfig.json rename to types/arcgis-rest-api/tsconfig.json diff --git a/arcgis-rest-api/tslint.json b/types/arcgis-rest-api/tslint.json similarity index 100% rename from arcgis-rest-api/tslint.json rename to types/arcgis-rest-api/tslint.json diff --git a/arcgis-to-geojson-utils/arcgis-to-geojson-utils-tests.ts b/types/arcgis-to-geojson-utils/arcgis-to-geojson-utils-tests.ts similarity index 100% rename from arcgis-to-geojson-utils/arcgis-to-geojson-utils-tests.ts rename to types/arcgis-to-geojson-utils/arcgis-to-geojson-utils-tests.ts diff --git a/arcgis-to-geojson-utils/index.d.ts b/types/arcgis-to-geojson-utils/index.d.ts similarity index 100% rename from arcgis-to-geojson-utils/index.d.ts rename to types/arcgis-to-geojson-utils/index.d.ts diff --git a/arcgis-to-geojson-utils/tsconfig.json b/types/arcgis-to-geojson-utils/tsconfig.json similarity index 100% rename from arcgis-to-geojson-utils/tsconfig.json rename to types/arcgis-to-geojson-utils/tsconfig.json diff --git a/arcgis-to-geojson-utils/tslint.json b/types/arcgis-to-geojson-utils/tslint.json similarity index 100% rename from arcgis-to-geojson-utils/tslint.json rename to types/arcgis-to-geojson-utils/tslint.json diff --git a/archiver/archiver-tests.ts b/types/archiver/archiver-tests.ts similarity index 100% rename from archiver/archiver-tests.ts rename to types/archiver/archiver-tests.ts diff --git a/archiver/index.d.ts b/types/archiver/index.d.ts similarity index 100% rename from archiver/index.d.ts rename to types/archiver/index.d.ts diff --git a/archiver/tsconfig.json b/types/archiver/tsconfig.json similarity index 100% rename from archiver/tsconfig.json rename to types/archiver/tsconfig.json diff --git a/archy/archy-tests.ts b/types/archy/archy-tests.ts similarity index 100% rename from archy/archy-tests.ts rename to types/archy/archy-tests.ts diff --git a/archy/index.d.ts b/types/archy/index.d.ts similarity index 100% rename from archy/index.d.ts rename to types/archy/index.d.ts diff --git a/archy/tsconfig.json b/types/archy/tsconfig.json similarity index 100% rename from archy/tsconfig.json rename to types/archy/tsconfig.json diff --git a/argparse/argparse-tests.ts b/types/argparse/argparse-tests.ts similarity index 100% rename from argparse/argparse-tests.ts rename to types/argparse/argparse-tests.ts diff --git a/argparse/index.d.ts b/types/argparse/index.d.ts similarity index 100% rename from argparse/index.d.ts rename to types/argparse/index.d.ts diff --git a/argparse/tsconfig.json b/types/argparse/tsconfig.json similarity index 100% rename from argparse/tsconfig.json rename to types/argparse/tsconfig.json diff --git a/argv/argv-tests.ts b/types/argv/argv-tests.ts similarity index 100% rename from argv/argv-tests.ts rename to types/argv/argv-tests.ts diff --git a/argv/index.d.ts b/types/argv/index.d.ts similarity index 100% rename from argv/index.d.ts rename to types/argv/index.d.ts diff --git a/argv/tsconfig.json b/types/argv/tsconfig.json similarity index 100% rename from argv/tsconfig.json rename to types/argv/tsconfig.json diff --git a/array-find-index/array-find-index-tests.ts b/types/array-find-index/array-find-index-tests.ts similarity index 100% rename from array-find-index/array-find-index-tests.ts rename to types/array-find-index/array-find-index-tests.ts diff --git a/array-find-index/index.d.ts b/types/array-find-index/index.d.ts similarity index 100% rename from array-find-index/index.d.ts rename to types/array-find-index/index.d.ts diff --git a/array-find-index/tsconfig.json b/types/array-find-index/tsconfig.json similarity index 100% rename from array-find-index/tsconfig.json rename to types/array-find-index/tsconfig.json diff --git a/array-find-index/tslint.json b/types/array-find-index/tslint.json similarity index 100% rename from array-find-index/tslint.json rename to types/array-find-index/tslint.json diff --git a/array-foreach/array-foreach-tests.ts b/types/array-foreach/array-foreach-tests.ts similarity index 100% rename from array-foreach/array-foreach-tests.ts rename to types/array-foreach/array-foreach-tests.ts diff --git a/array-foreach/index.d.ts b/types/array-foreach/index.d.ts similarity index 100% rename from array-foreach/index.d.ts rename to types/array-foreach/index.d.ts diff --git a/array-foreach/tsconfig.json b/types/array-foreach/tsconfig.json similarity index 100% rename from array-foreach/tsconfig.json rename to types/array-foreach/tsconfig.json diff --git a/array-uniq/array-uniq-tests.ts b/types/array-uniq/array-uniq-tests.ts similarity index 100% rename from array-uniq/array-uniq-tests.ts rename to types/array-uniq/array-uniq-tests.ts diff --git a/array-uniq/index.d.ts b/types/array-uniq/index.d.ts similarity index 100% rename from array-uniq/index.d.ts rename to types/array-uniq/index.d.ts diff --git a/array-uniq/tsconfig.json b/types/array-uniq/tsconfig.json similarity index 100% rename from array-uniq/tsconfig.json rename to types/array-uniq/tsconfig.json diff --git a/array-uniq/tslint.json b/types/array-uniq/tslint.json similarity index 100% rename from array-uniq/tslint.json rename to types/array-uniq/tslint.json diff --git a/artyom.js/artyom.js-tests.ts b/types/artyom.js/artyom.js-tests.ts similarity index 100% rename from artyom.js/artyom.js-tests.ts rename to types/artyom.js/artyom.js-tests.ts diff --git a/artyom.js/index.d.ts b/types/artyom.js/index.d.ts similarity index 99% rename from artyom.js/index.d.ts rename to types/artyom.js/index.d.ts index 0b0f253827..ae120015ca 100644 --- a/artyom.js/index.d.ts +++ b/types/artyom.js/index.d.ts @@ -164,7 +164,6 @@ interface SpeechSynthesisVoice { } declare namespace Artyom { - interface ArtyomDevice { isChrome(): boolean; isMobile(): boolean; @@ -235,7 +234,7 @@ declare namespace Artyom { onend(): void; } - export interface ArtyomJS { + interface ArtyomJS { /** * Contains some basic information that artyom needs to know as the type of device and browser * @see http://ourcodeworld.com/projects/projects-documentation/6/read-doc/artyom-device/artyom-js @@ -499,13 +498,12 @@ declare namespace Artyom { /** * ArtyomBuilder bla, bla... */ - export class ArtyomBuilder { + class ArtyomBuilder { /** * Method to bla, bla, bla... */ static getInstance(): ArtyomJS } - } // tslint:disable-next-line:export-just-namespace diff --git a/artyom.js/tsconfig.json b/types/artyom.js/tsconfig.json similarity index 100% rename from artyom.js/tsconfig.json rename to types/artyom.js/tsconfig.json diff --git a/artyom.js/tslint.json b/types/artyom.js/tslint.json similarity index 100% rename from artyom.js/tslint.json rename to types/artyom.js/tslint.json diff --git a/asana/asana-tests.ts b/types/asana/asana-tests.ts similarity index 100% rename from asana/asana-tests.ts rename to types/asana/asana-tests.ts diff --git a/asana/index.d.ts b/types/asana/index.d.ts similarity index 100% rename from asana/index.d.ts rename to types/asana/index.d.ts diff --git a/asana/tsconfig.json b/types/asana/tsconfig.json similarity index 100% rename from asana/tsconfig.json rename to types/asana/tsconfig.json diff --git a/asciify/asciify-tests.ts b/types/asciify/asciify-tests.ts similarity index 100% rename from asciify/asciify-tests.ts rename to types/asciify/asciify-tests.ts diff --git a/asciify/index.d.ts b/types/asciify/index.d.ts similarity index 100% rename from asciify/index.d.ts rename to types/asciify/index.d.ts diff --git a/asciify/tsconfig.json b/types/asciify/tsconfig.json similarity index 100% rename from asciify/tsconfig.json rename to types/asciify/tsconfig.json diff --git a/asn1js/asn1js-tests.ts b/types/asn1js/asn1js-tests.ts similarity index 100% rename from asn1js/asn1js-tests.ts rename to types/asn1js/asn1js-tests.ts diff --git a/asn1js/index.d.ts b/types/asn1js/index.d.ts similarity index 100% rename from asn1js/index.d.ts rename to types/asn1js/index.d.ts diff --git a/asn1js/tsconfig.json b/types/asn1js/tsconfig.json similarity index 100% rename from asn1js/tsconfig.json rename to types/asn1js/tsconfig.json diff --git a/aspnet-identity-pw/aspnet-identity-pw-tests.ts b/types/aspnet-identity-pw/aspnet-identity-pw-tests.ts similarity index 100% rename from aspnet-identity-pw/aspnet-identity-pw-tests.ts rename to types/aspnet-identity-pw/aspnet-identity-pw-tests.ts diff --git a/aspnet-identity-pw/index.d.ts b/types/aspnet-identity-pw/index.d.ts similarity index 100% rename from aspnet-identity-pw/index.d.ts rename to types/aspnet-identity-pw/index.d.ts diff --git a/aspnet-identity-pw/tsconfig.json b/types/aspnet-identity-pw/tsconfig.json similarity index 100% rename from aspnet-identity-pw/tsconfig.json rename to types/aspnet-identity-pw/tsconfig.json diff --git a/assert-plus/assert-plus-tests.ts b/types/assert-plus/assert-plus-tests.ts similarity index 100% rename from assert-plus/assert-plus-tests.ts rename to types/assert-plus/assert-plus-tests.ts diff --git a/assert-plus/index.d.ts b/types/assert-plus/index.d.ts similarity index 100% rename from assert-plus/index.d.ts rename to types/assert-plus/index.d.ts diff --git a/assert-plus/tsconfig.json b/types/assert-plus/tsconfig.json similarity index 100% rename from assert-plus/tsconfig.json rename to types/assert-plus/tsconfig.json diff --git a/assert-plus/tslint.json b/types/assert-plus/tslint.json similarity index 100% rename from assert-plus/tslint.json rename to types/assert-plus/tslint.json diff --git a/assertion-error/assertion-error-tests.ts b/types/assertion-error/assertion-error-tests.ts similarity index 100% rename from assertion-error/assertion-error-tests.ts rename to types/assertion-error/assertion-error-tests.ts diff --git a/assertion-error/index.d.ts b/types/assertion-error/index.d.ts similarity index 100% rename from assertion-error/index.d.ts rename to types/assertion-error/index.d.ts diff --git a/assertion-error/tsconfig.json b/types/assertion-error/tsconfig.json similarity index 100% rename from assertion-error/tsconfig.json rename to types/assertion-error/tsconfig.json diff --git a/assertsharp/assertsharp-tests.ts b/types/assertsharp/assertsharp-tests.ts similarity index 100% rename from assertsharp/assertsharp-tests.ts rename to types/assertsharp/assertsharp-tests.ts diff --git a/assertsharp/index.d.ts b/types/assertsharp/index.d.ts similarity index 100% rename from assertsharp/index.d.ts rename to types/assertsharp/index.d.ts diff --git a/assertsharp/tsconfig.json b/types/assertsharp/tsconfig.json similarity index 100% rename from assertsharp/tsconfig.json rename to types/assertsharp/tsconfig.json diff --git a/async-lock/async-lock-tests.ts b/types/async-lock/async-lock-tests.ts similarity index 100% rename from async-lock/async-lock-tests.ts rename to types/async-lock/async-lock-tests.ts diff --git a/async-lock/index.d.ts b/types/async-lock/index.d.ts similarity index 100% rename from async-lock/index.d.ts rename to types/async-lock/index.d.ts diff --git a/async-lock/tsconfig.json b/types/async-lock/tsconfig.json similarity index 100% rename from async-lock/tsconfig.json rename to types/async-lock/tsconfig.json diff --git a/async-polling/async-polling-tests.ts b/types/async-polling/async-polling-tests.ts similarity index 100% rename from async-polling/async-polling-tests.ts rename to types/async-polling/async-polling-tests.ts diff --git a/async-polling/index.d.ts b/types/async-polling/index.d.ts similarity index 100% rename from async-polling/index.d.ts rename to types/async-polling/index.d.ts diff --git a/async-polling/tsconfig.json b/types/async-polling/tsconfig.json similarity index 100% rename from async-polling/tsconfig.json rename to types/async-polling/tsconfig.json diff --git a/async-writer/async-writer-tests.ts b/types/async-writer/async-writer-tests.ts similarity index 100% rename from async-writer/async-writer-tests.ts rename to types/async-writer/async-writer-tests.ts diff --git a/async-writer/index.d.ts b/types/async-writer/index.d.ts similarity index 100% rename from async-writer/index.d.ts rename to types/async-writer/index.d.ts diff --git a/async-writer/tsconfig.json b/types/async-writer/tsconfig.json similarity index 100% rename from async-writer/tsconfig.json rename to types/async-writer/tsconfig.json diff --git a/async/index.d.ts b/types/async/index.d.ts similarity index 83% rename from async/index.d.ts rename to types/async/index.d.ts index 62e047b209..33bb1a6c0e 100644 --- a/async/index.d.ts +++ b/types/async/index.d.ts @@ -90,34 +90,34 @@ interface AsyncCargo { interface Async { // Collections - each(arr: T[], iterator: AsyncIterator, callback?: ErrorCallback): void; + each(arr: T[] | IterableIterator, iterator: AsyncIterator, callback?: ErrorCallback): void; each(arr: Dictionary, iterator: AsyncIterator, callback?: ErrorCallback): void; eachSeries: typeof async.each; - eachLimit(arr: T[], limit: number, iterator: AsyncIterator, callback?: ErrorCallback): void; + eachLimit(arr: T[] | IterableIterator, limit: number, iterator: AsyncIterator, callback?: ErrorCallback): void; eachLimit(arr: Dictionary, limit: number, iterator: AsyncIterator, callback?: ErrorCallback): void; forEach: typeof async.each; forEachSeries: typeof async.each; forEachLimit: typeof async.eachLimit; - forEachOf(obj: T[], iterator: AsyncForEachOfIterator, callback?: ErrorCallback): void; + forEachOf(obj: T[] | IterableIterator, iterator: AsyncForEachOfIterator, callback?: ErrorCallback): void; forEachOf(obj: Dictionary, iterator: AsyncForEachOfIterator, callback?: ErrorCallback): void; forEachOfSeries: typeof async.forEachOf; - forEachOfLimit(obj: T[], limit: number, iterator: AsyncForEachOfIterator, callback?: ErrorCallback): void; + forEachOfLimit(obj: T[] | IterableIterator, limit: number, iterator: AsyncForEachOfIterator, callback?: ErrorCallback): void; forEachOfLimit(obj: Dictionary, limit: number, iterator: AsyncForEachOfIterator, callback?: ErrorCallback): void; eachOf: typeof async.forEachOf; eachOfSeries: typeof async.forEachOf; eachOfLimit: typeof async.forEachOfLimit; - map(arr: T[], iterator: AsyncResultIterator, callback?: AsyncResultArrayCallback): void; + map(arr: T[] | IterableIterator, iterator: AsyncResultIterator, callback?: AsyncResultArrayCallback): void; map(arr: Dictionary, iterator: AsyncResultIterator, callback?: AsyncResultArrayCallback): void; mapSeries: typeof async.map; - mapLimit(arr: T[], limit: number, iterator: AsyncResultIterator, callback?: AsyncResultArrayCallback): void; + mapLimit(arr: T[] | IterableIterator, limit: number, iterator: AsyncResultIterator, callback?: AsyncResultArrayCallback): void; mapLimit(arr: Dictionary, limit: number, iterator: AsyncResultIterator, callback?: AsyncResultArrayCallback): void; mapValuesLimit(obj: Dictionary, limit: number, iteratee: (value: T, key: string, callback: AsyncResultCallback) => void, callback: AsyncResultObjectCallback): void; mapValues(obj: Dictionary, iteratee: (value: T, key: string, callback: AsyncResultCallback) => void, callback: AsyncResultObjectCallback): void; mapValuesSeries: typeof async.mapValues; - filter(arr: T[], iterator: AsyncBooleanIterator, callback?: AsyncResultArrayCallback): void; + filter(arr: T[] | IterableIterator, iterator: AsyncBooleanIterator, callback?: AsyncResultArrayCallback): void; filter(arr: Dictionary, iterator: AsyncBooleanIterator, callback?: AsyncResultArrayCallback): void; filterSeries: typeof async.filter; - filterLimit(arr: T[], limit: number, iterator: AsyncBooleanIterator, callback?: AsyncResultArrayCallback): void; + filterLimit(arr: T[] | IterableIterator, limit: number, iterator: AsyncBooleanIterator, callback?: AsyncResultArrayCallback): void; filterLimit(arr: Dictionary, limit: number, iterator: AsyncBooleanIterator, callback?: AsyncResultArrayCallback): void; select: typeof async.filter; selectSeries: typeof async.filter; @@ -125,38 +125,38 @@ interface Async { reject: typeof async.filter; rejectSeries: typeof async.filter; rejectLimit: typeof async.filterLimit; - reduce(arr: T[], memo: R, iterator: AsyncMemoIterator, callback?: AsyncResultCallback): void; + reduce(arr: T[] | IterableIterator, memo: R, iterator: AsyncMemoIterator, callback?: AsyncResultCallback): void; inject: typeof async.reduce; foldl: typeof async.reduce; reduceRight: typeof async.reduce; foldr: typeof async.reduce; - detect(arr: T[], iterator: AsyncBooleanIterator, callback?: AsyncResultCallback): void; + detect(arr: T[] | IterableIterator, iterator: AsyncBooleanIterator, callback?: AsyncResultCallback): void; detect(arr: Dictionary, iterator: AsyncBooleanIterator, callback?: AsyncResultCallback): void; detectSeries: typeof async.detect; - detectLimit(arr: T[], limit: number, iterator: AsyncBooleanIterator, callback?: AsyncResultCallback): void; + detectLimit(arr: T[] | IterableIterator, limit: number, iterator: AsyncBooleanIterator, callback?: AsyncResultCallback): void; detectLimit(arr: Dictionary, limit: number, iterator: AsyncBooleanIterator, callback?: AsyncResultCallback): void; find: typeof async.detect; findSeries: typeof async.detect; findLimit: typeof async.detectLimit; - sortBy(arr: T[], iterator: AsyncResultIterator, callback?: AsyncResultArrayCallback): void; - some(arr: T[], iterator: AsyncBooleanIterator, callback?: AsyncBooleanResultCallback): void; + sortBy(arr: T[] | IterableIterator, iterator: AsyncResultIterator, callback?: AsyncResultArrayCallback): void; + some(arr: T[] | IterableIterator, iterator: AsyncBooleanIterator, callback?: AsyncBooleanResultCallback): void; some(arr: Dictionary, iterator: AsyncBooleanIterator, callback?: AsyncBooleanResultCallback): void; someSeries: typeof async.some; - someLimit(arr: T[], limit: number, iterator: AsyncBooleanIterator, callback?: AsyncBooleanResultCallback): void; + someLimit(arr: T[] | IterableIterator, limit: number, iterator: AsyncBooleanIterator, callback?: AsyncBooleanResultCallback): void; someLimit(arr: Dictionary, limit: number, iterator: AsyncBooleanIterator, callback?: AsyncBooleanResultCallback): void; any: typeof async.some; anySeries: typeof async.someSeries; anyLimit: typeof async.someLimit; - every(arr: T[], iterator: AsyncBooleanIterator, callback?: AsyncBooleanResultCallback): void; + every(arr: T[] | IterableIterator, iterator: AsyncBooleanIterator, callback?: AsyncBooleanResultCallback): void; every(arr: Dictionary, iterator: AsyncBooleanIterator, callback?: AsyncBooleanResultCallback): void; everySeries: typeof async.every; - everyLimit(arr: T[], limit: number, iterator: AsyncBooleanIterator, callback?: AsyncBooleanResultCallback): void; + everyLimit(arr: T[] | IterableIterator, limit: number, iterator: AsyncBooleanIterator, callback?: AsyncBooleanResultCallback): void; everyLimit(arr: Dictionary, limit: number, iterator: AsyncBooleanIterator, callback?: AsyncBooleanResultCallback): void; all: typeof async.every; allSeries: typeof async.every; allLimit: typeof async.everyLimit; - concat(arr: T[], iterator: AsyncResultIterator, callback?: AsyncResultArrayCallback): void; + concat(arr: T[] | IterableIterator, iterator: AsyncResultIterator, callback?: AsyncResultArrayCallback): void; concat(arr: Dictionary, iterator: AsyncResultIterator, callback?: AsyncResultArrayCallback): void; concatSeries: typeof async.concat; diff --git a/types/async/test/es6-generators.ts b/types/async/test/es6-generators.ts new file mode 100644 index 0000000000..2a7328a09a --- /dev/null +++ b/types/async/test/es6-generators.ts @@ -0,0 +1,54 @@ +function* collectionGenerator(): IterableIterator { } + +function funcMapIterator(value: T, callback: AsyncResultCallback) { } +function funcMapComplete(error: E, results: T[]) { } + +function booleanIterator(v: T, cb: (err: Error, res: boolean) => void) { } + +function eachIterator(item: T, callback: (err: Error) => void) { } +function eachOfIterator(item: T, key: K, callback: (err: Error) => void) { } + +function concatIterator(item: T, callback: (err: E, res: R[]) => void) { } + +async.map(collectionGenerator(), funcMapIterator, funcMapComplete) +async.mapSeries(collectionGenerator(), funcMapIterator, funcMapComplete) +async.mapLimit(collectionGenerator(), 2, funcMapIterator, funcMapComplete) + +async.filter(collectionGenerator(), booleanIterator, function (err: Error, results: any[]) { }) +async.filterSeries(collectionGenerator(), booleanIterator, function (err: Error, results: any[]) { }) +async.filterLimit(collectionGenerator(), 2, booleanIterator, function (err: Error, results: any[]) { }) +async.select(collectionGenerator(), booleanIterator, function (err: Error, results: any[]) { }) +async.selectSeries(collectionGenerator(), booleanIterator, function (err: Error, results: any[]) { }) +async.selectLimit(collectionGenerator(), 2, booleanIterator, function (err: Error, results: any[]) { }) + +async.reject(collectionGenerator(), booleanIterator, function (err: Error, results: any[]) { }) +async.rejectSeries(collectionGenerator(), booleanIterator, function (err: Error, results: any[]) { }) +async.rejectLimit(collectionGenerator(), 2, booleanIterator, function (err: Error, results: any[]) { }) + +async.each(collectionGenerator(), eachIterator, function (err: Error) { }) +async.eachLimit(collectionGenerator(), 2, eachIterator, function (err: Error) { }) +async.eachSeries(collectionGenerator(), eachIterator, function (err: Error) { }) +async.eachOf(collectionGenerator(), eachOfIterator, function (err: Error) { }) +async.eachOfLimit(collectionGenerator(), 2, eachOfIterator, function (err: Error) { }) +async.eachOfSeries(collectionGenerator(), eachOfIterator, function (err: Error) { }) +async.forEach(collectionGenerator(), eachIterator, function (err: Error) { }) +async.forEachLimit(collectionGenerator(), 2, eachIterator, function (err: Error) { }) +async.forEachSeries(collectionGenerator(), eachIterator, function (err: Error) { }) +async.forEachOf(collectionGenerator(), eachOfIterator, function (err: Error) { }) +async.forEachOfLimit(collectionGenerator(), 2, eachOfIterator, function (err: Error) { }) +async.forEachOfSeries(collectionGenerator(), eachOfIterator, function (err: Error) { }) + +async.every(collectionGenerator(), booleanIterator, function (err: Error, res: boolean) { }) +async.everyLimit(collectionGenerator(), 2, booleanIterator, function (err: Error, res: boolean) { }) +async.everySeries(collectionGenerator(), booleanIterator, function (err: Error, res: boolean) { }) + +async.some(collectionGenerator(), booleanIterator, function (err: Error, res: boolean) { }) +async.someLimit(collectionGenerator(), 2, booleanIterator, function (err: Error, res: boolean) { }) +async.someSeries(collectionGenerator(), booleanIterator, function (err: Error, res: boolean) { }) + +async.detect(collectionGenerator(), booleanIterator, function (err: Error, res: boolean) { }) +async.detectLimit(collectionGenerator(), 2, booleanIterator, function (err: Error, res: boolean) { }) +async.detectSeries(collectionGenerator(), booleanIterator, function (err: Error, res: boolean) { }) + +async.concat(collectionGenerator(), concatIterator, (err: Error, res: any[]) => { }) +async.concatSeries(collectionGenerator(), concatIterator, (err: Error, res: any[]) => { }) diff --git a/async/test/explicit.ts b/types/async/test/explicit.ts similarity index 100% rename from async/test/explicit.ts rename to types/async/test/explicit.ts diff --git a/async/test/index.ts b/types/async/test/index.ts similarity index 100% rename from async/test/index.ts rename to types/async/test/index.ts diff --git a/types/async/tsconfig.json b/types/async/tsconfig.json new file mode 100644 index 0000000000..46ac98ea58 --- /dev/null +++ b/types/async/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "target": "es6", + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "test/index.ts", + "test/explicit.ts", + "test/es6-generators.ts" + ] +} diff --git a/asyncblock/asyncblock-tests.ts b/types/asyncblock/asyncblock-tests.ts similarity index 100% rename from asyncblock/asyncblock-tests.ts rename to types/asyncblock/asyncblock-tests.ts diff --git a/asyncblock/index.d.ts b/types/asyncblock/index.d.ts similarity index 100% rename from asyncblock/index.d.ts rename to types/asyncblock/index.d.ts diff --git a/asyncblock/tsconfig.json b/types/asyncblock/tsconfig.json similarity index 100% rename from asyncblock/tsconfig.json rename to types/asyncblock/tsconfig.json diff --git a/atmosphere/atmosphere-tests.ts b/types/atmosphere/atmosphere-tests.ts similarity index 100% rename from atmosphere/atmosphere-tests.ts rename to types/atmosphere/atmosphere-tests.ts diff --git a/atmosphere/index.d.ts b/types/atmosphere/index.d.ts similarity index 100% rename from atmosphere/index.d.ts rename to types/atmosphere/index.d.ts diff --git a/atmosphere/tsconfig.json b/types/atmosphere/tsconfig.json similarity index 100% rename from atmosphere/tsconfig.json rename to types/atmosphere/tsconfig.json diff --git a/atom-keymap/.editorconfig b/types/atom-keymap/.editorconfig similarity index 100% rename from atom-keymap/.editorconfig rename to types/atom-keymap/.editorconfig diff --git a/atom-keymap/atom-keymap-tests.ts b/types/atom-keymap/atom-keymap-tests.ts similarity index 100% rename from atom-keymap/atom-keymap-tests.ts rename to types/atom-keymap/atom-keymap-tests.ts diff --git a/atom-keymap/index.d.ts b/types/atom-keymap/index.d.ts similarity index 100% rename from atom-keymap/index.d.ts rename to types/atom-keymap/index.d.ts diff --git a/atom-keymap/tsconfig.json b/types/atom-keymap/tsconfig.json similarity index 100% rename from atom-keymap/tsconfig.json rename to types/atom-keymap/tsconfig.json diff --git a/atom/api-docs.d.ts b/types/atom/api-docs.d.ts similarity index 100% rename from atom/api-docs.d.ts rename to types/atom/api-docs.d.ts diff --git a/atom/atom-tests.ts b/types/atom/atom-tests.ts similarity index 100% rename from atom/atom-tests.ts rename to types/atom/atom-tests.ts diff --git a/atom/index.d.ts b/types/atom/index.d.ts similarity index 100% rename from atom/index.d.ts rename to types/atom/index.d.ts diff --git a/atom/tsconfig.json b/types/atom/tsconfig.json similarity index 100% rename from atom/tsconfig.json rename to types/atom/tsconfig.json diff --git a/atpl/atpl-tests.ts b/types/atpl/atpl-tests.ts similarity index 100% rename from atpl/atpl-tests.ts rename to types/atpl/atpl-tests.ts diff --git a/atpl/index.d.ts b/types/atpl/index.d.ts similarity index 100% rename from atpl/index.d.ts rename to types/atpl/index.d.ts diff --git a/atpl/tsconfig.json b/types/atpl/tsconfig.json similarity index 100% rename from atpl/tsconfig.json rename to types/atpl/tsconfig.json diff --git a/aurelia-knockout/aurelia-knockout-tests.ts b/types/aurelia-knockout/aurelia-knockout-tests.ts similarity index 99% rename from aurelia-knockout/aurelia-knockout-tests.ts rename to types/aurelia-knockout/aurelia-knockout-tests.ts index 6944ab5889..cf769d0dc2 100644 --- a/aurelia-knockout/aurelia-knockout-tests.ts +++ b/types/aurelia-knockout/aurelia-knockout-tests.ts @@ -1,6 +1,4 @@ - export class ViewModel { - constructor(private knockoutBindable: KnockoutBindable) { } diff --git a/aurelia-knockout/index.d.ts b/types/aurelia-knockout/index.d.ts similarity index 96% rename from aurelia-knockout/index.d.ts rename to types/aurelia-knockout/index.d.ts index 2ccec60b46..6f04567a5f 100644 --- a/aurelia-knockout/index.d.ts +++ b/types/aurelia-knockout/index.d.ts @@ -3,8 +3,7 @@ // Definitions by: Christian Kotzbauer // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -declare interface KnockoutBindable { - +interface KnockoutBindable { /** * Applys all values from a data object (usually the activation data) to the corresponding instance fields * in the current view model if they are marked as @bindable. By default all matching values from the data object diff --git a/aurelia-knockout/tsconfig.json b/types/aurelia-knockout/tsconfig.json similarity index 100% rename from aurelia-knockout/tsconfig.json rename to types/aurelia-knockout/tsconfig.json diff --git a/aurelia-knockout/tslint.json b/types/aurelia-knockout/tslint.json similarity index 100% rename from aurelia-knockout/tslint.json rename to types/aurelia-knockout/tslint.json diff --git a/auth0-angular/auth0-angular-tests.ts b/types/auth0-angular/auth0-angular-tests.ts similarity index 100% rename from auth0-angular/auth0-angular-tests.ts rename to types/auth0-angular/auth0-angular-tests.ts diff --git a/auth0-angular/index.d.ts b/types/auth0-angular/index.d.ts similarity index 100% rename from auth0-angular/index.d.ts rename to types/auth0-angular/index.d.ts diff --git a/auth0-angular/tsconfig.json b/types/auth0-angular/tsconfig.json similarity index 100% rename from auth0-angular/tsconfig.json rename to types/auth0-angular/tsconfig.json diff --git a/auth0-js/auth0-js-tests.ts b/types/auth0-js/auth0-js-tests.ts similarity index 100% rename from auth0-js/auth0-js-tests.ts rename to types/auth0-js/auth0-js-tests.ts diff --git a/auth0-js/index.d.ts b/types/auth0-js/index.d.ts similarity index 100% rename from auth0-js/index.d.ts rename to types/auth0-js/index.d.ts diff --git a/auth0-js/tsconfig.json b/types/auth0-js/tsconfig.json similarity index 100% rename from auth0-js/tsconfig.json rename to types/auth0-js/tsconfig.json diff --git a/auth0-js/v7/auth0-js-tests.ts b/types/auth0-js/v7/auth0-js-tests.ts similarity index 100% rename from auth0-js/v7/auth0-js-tests.ts rename to types/auth0-js/v7/auth0-js-tests.ts diff --git a/auth0-js/v7/index.d.ts b/types/auth0-js/v7/index.d.ts similarity index 100% rename from auth0-js/v7/index.d.ts rename to types/auth0-js/v7/index.d.ts diff --git a/auth0-js/v7/tsconfig.json b/types/auth0-js/v7/tsconfig.json similarity index 100% rename from auth0-js/v7/tsconfig.json rename to types/auth0-js/v7/tsconfig.json diff --git a/auth0-lock/auth0-lock-tests.ts b/types/auth0-lock/auth0-lock-tests.ts similarity index 100% rename from auth0-lock/auth0-lock-tests.ts rename to types/auth0-lock/auth0-lock-tests.ts diff --git a/auth0-lock/index.d.ts b/types/auth0-lock/index.d.ts similarity index 100% rename from auth0-lock/index.d.ts rename to types/auth0-lock/index.d.ts diff --git a/auth0-lock/tsconfig.json b/types/auth0-lock/tsconfig.json similarity index 100% rename from auth0-lock/tsconfig.json rename to types/auth0-lock/tsconfig.json diff --git a/auth0.widget/auth0.widget-tests.ts b/types/auth0.widget/auth0.widget-tests.ts similarity index 100% rename from auth0.widget/auth0.widget-tests.ts rename to types/auth0.widget/auth0.widget-tests.ts diff --git a/auth0.widget/index.d.ts b/types/auth0.widget/index.d.ts similarity index 100% rename from auth0.widget/index.d.ts rename to types/auth0.widget/index.d.ts diff --git a/auth0.widget/tsconfig.json b/types/auth0.widget/tsconfig.json similarity index 100% rename from auth0.widget/tsconfig.json rename to types/auth0.widget/tsconfig.json diff --git a/auth0/auth0-tests.ts b/types/auth0/auth0-tests.ts similarity index 100% rename from auth0/auth0-tests.ts rename to types/auth0/auth0-tests.ts diff --git a/auth0/index.d.ts b/types/auth0/index.d.ts similarity index 100% rename from auth0/index.d.ts rename to types/auth0/index.d.ts diff --git a/auth0/tsconfig.json b/types/auth0/tsconfig.json similarity index 100% rename from auth0/tsconfig.json rename to types/auth0/tsconfig.json diff --git a/auto-launch/auto-launch-tests.ts b/types/auto-launch/auto-launch-tests.ts similarity index 100% rename from auto-launch/auto-launch-tests.ts rename to types/auto-launch/auto-launch-tests.ts diff --git a/auto-launch/index.d.ts b/types/auto-launch/index.d.ts similarity index 100% rename from auto-launch/index.d.ts rename to types/auto-launch/index.d.ts diff --git a/auto-launch/tsconfig.json b/types/auto-launch/tsconfig.json similarity index 100% rename from auto-launch/tsconfig.json rename to types/auto-launch/tsconfig.json diff --git a/autobahn/autobahn-tests.ts b/types/autobahn/autobahn-tests.ts similarity index 100% rename from autobahn/autobahn-tests.ts rename to types/autobahn/autobahn-tests.ts diff --git a/autobahn/index.d.ts b/types/autobahn/index.d.ts similarity index 100% rename from autobahn/index.d.ts rename to types/autobahn/index.d.ts diff --git a/autobahn/tsconfig.json b/types/autobahn/tsconfig.json similarity index 100% rename from autobahn/tsconfig.json rename to types/autobahn/tsconfig.json diff --git a/autobind-decorator/autobind-decorator-tests.ts b/types/autobind-decorator/autobind-decorator-tests.ts similarity index 100% rename from autobind-decorator/autobind-decorator-tests.ts rename to types/autobind-decorator/autobind-decorator-tests.ts diff --git a/autobind-decorator/index.d.ts b/types/autobind-decorator/index.d.ts similarity index 100% rename from autobind-decorator/index.d.ts rename to types/autobind-decorator/index.d.ts diff --git a/autobind-decorator/tsconfig.json b/types/autobind-decorator/tsconfig.json similarity index 100% rename from autobind-decorator/tsconfig.json rename to types/autobind-decorator/tsconfig.json diff --git a/autolinker/autolinker-tests.ts b/types/autolinker/autolinker-tests.ts similarity index 100% rename from autolinker/autolinker-tests.ts rename to types/autolinker/autolinker-tests.ts diff --git a/autolinker/index.d.ts b/types/autolinker/index.d.ts similarity index 100% rename from autolinker/index.d.ts rename to types/autolinker/index.d.ts diff --git a/autolinker/tsconfig.json b/types/autolinker/tsconfig.json similarity index 100% rename from autolinker/tsconfig.json rename to types/autolinker/tsconfig.json diff --git a/autoprefixer-core/autoprefixer-core-tests.ts b/types/autoprefixer-core/autoprefixer-core-tests.ts similarity index 100% rename from autoprefixer-core/autoprefixer-core-tests.ts rename to types/autoprefixer-core/autoprefixer-core-tests.ts diff --git a/autoprefixer-core/index.d.ts b/types/autoprefixer-core/index.d.ts similarity index 100% rename from autoprefixer-core/index.d.ts rename to types/autoprefixer-core/index.d.ts diff --git a/autoprefixer-core/tsconfig.json b/types/autoprefixer-core/tsconfig.json similarity index 100% rename from autoprefixer-core/tsconfig.json rename to types/autoprefixer-core/tsconfig.json diff --git a/autoprefixer/autoprefixer-tests.ts b/types/autoprefixer/autoprefixer-tests.ts similarity index 100% rename from autoprefixer/autoprefixer-tests.ts rename to types/autoprefixer/autoprefixer-tests.ts diff --git a/autoprefixer/index.d.ts b/types/autoprefixer/index.d.ts similarity index 82% rename from autoprefixer/index.d.ts rename to types/autoprefixer/index.d.ts index 0a01c34d9a..b5249746d1 100644 --- a/autoprefixer/index.d.ts +++ b/types/autoprefixer/index.d.ts @@ -6,8 +6,7 @@ import { Plugin, Transformer as PostcssTransformer } from 'postcss'; declare namespace autoprefixer { - - export interface Options { + interface Options { browsers?: string[]; env?: string; cascade?: boolean; @@ -19,11 +18,11 @@ declare namespace autoprefixer { stats?: any; } - export interface Transformer extends PostcssTransformer { + interface Transformer extends PostcssTransformer { info(): string; } - export interface Autoprefixer extends Plugin { + interface Autoprefixer extends Plugin { (opts?: Options): Transformer; } } diff --git a/autoprefixer/package.json b/types/autoprefixer/package.json similarity index 100% rename from autoprefixer/package.json rename to types/autoprefixer/package.json diff --git a/autoprefixer/tsconfig.json b/types/autoprefixer/tsconfig.json similarity index 100% rename from autoprefixer/tsconfig.json rename to types/autoprefixer/tsconfig.json diff --git a/autoprefixer/tslint.json b/types/autoprefixer/tslint.json similarity index 100% rename from autoprefixer/tslint.json rename to types/autoprefixer/tslint.json diff --git a/autosize/autosize-tests.ts b/types/autosize/autosize-tests.ts similarity index 100% rename from autosize/autosize-tests.ts rename to types/autosize/autosize-tests.ts diff --git a/autosize/index.d.ts b/types/autosize/index.d.ts similarity index 100% rename from autosize/index.d.ts rename to types/autosize/index.d.ts diff --git a/autosize/tsconfig.json b/types/autosize/tsconfig.json similarity index 100% rename from autosize/tsconfig.json rename to types/autosize/tsconfig.json diff --git a/avoscloud-sdk/avoscloud-sdk-tests.ts b/types/avoscloud-sdk/avoscloud-sdk-tests.ts similarity index 100% rename from avoscloud-sdk/avoscloud-sdk-tests.ts rename to types/avoscloud-sdk/avoscloud-sdk-tests.ts diff --git a/avoscloud-sdk/index.d.ts b/types/avoscloud-sdk/index.d.ts similarity index 100% rename from avoscloud-sdk/index.d.ts rename to types/avoscloud-sdk/index.d.ts diff --git a/avoscloud-sdk/tsconfig.json b/types/avoscloud-sdk/tsconfig.json similarity index 100% rename from avoscloud-sdk/tsconfig.json rename to types/avoscloud-sdk/tsconfig.json diff --git a/awesomplete/awesomplete-tests.ts b/types/awesomplete/awesomplete-tests.ts similarity index 94% rename from awesomplete/awesomplete-tests.ts rename to types/awesomplete/awesomplete-tests.ts index 7998dc49e3..5a33aeb135 100644 --- a/awesomplete/awesomplete-tests.ts +++ b/types/awesomplete/awesomplete-tests.ts @@ -54,7 +54,7 @@ new Awesomplete('input[data-multiple]', { var ajax = new XMLHttpRequest(); ajax.open("GET", "https://restcountries.eu/rest/v1/lang/fr", true); ajax.onload = () => { - var list = JSON.parse(ajax.responseText).map((i: any) => { return i.name; }); - new Awesomplete(document.querySelector("#ajax-example input"), { list: list }); + var list = JSON.parse(ajax.responseText).map((i: any) => i.name); + new Awesomplete(document.querySelector("#ajax-example input"), { list }); }; ajax.send(); diff --git a/awesomplete/index.d.ts b/types/awesomplete/index.d.ts similarity index 95% rename from awesomplete/index.d.ts rename to types/awesomplete/index.d.ts index 9b8976cfd1..41abc36be6 100644 --- a/awesomplete/index.d.ts +++ b/types/awesomplete/index.d.ts @@ -41,7 +41,7 @@ declare namespace Awesomplete { type Suggestion = string | {label: string | any, value: string | any} | [string, string]; interface Options { - list?: string | string[] | Element | { label: string, value: any }[] | [string, string][]; + list?: string | string[] | Element | Array<{ label: string, value: any }> | Array<[string, string]>; minChars?: number; maxItems?: number; autoFirst?: boolean; diff --git a/awesomplete/tsconfig.json b/types/awesomplete/tsconfig.json similarity index 100% rename from awesomplete/tsconfig.json rename to types/awesomplete/tsconfig.json diff --git a/awesomplete/tslint.json b/types/awesomplete/tslint.json similarity index 100% rename from awesomplete/tslint.json rename to types/awesomplete/tslint.json diff --git a/aws-iot-device-sdk/aws-iot-device-sdk-tests.ts b/types/aws-iot-device-sdk/aws-iot-device-sdk-tests.ts similarity index 100% rename from aws-iot-device-sdk/aws-iot-device-sdk-tests.ts rename to types/aws-iot-device-sdk/aws-iot-device-sdk-tests.ts diff --git a/aws-iot-device-sdk/index.d.ts b/types/aws-iot-device-sdk/index.d.ts similarity index 100% rename from aws-iot-device-sdk/index.d.ts rename to types/aws-iot-device-sdk/index.d.ts diff --git a/aws-iot-device-sdk/tsconfig.json b/types/aws-iot-device-sdk/tsconfig.json similarity index 100% rename from aws-iot-device-sdk/tsconfig.json rename to types/aws-iot-device-sdk/tsconfig.json 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/redux-persist-transform-filter/tsconfig.json b/types/aws-lambda-mock-context/tsconfig.json similarity index 89% rename from redux-persist-transform-filter/tsconfig.json rename to types/aws-lambda-mock-context/tsconfig.json index ac08736562..bdfad87be5 100644 --- a/redux-persist-transform-filter/tsconfig.json +++ b/types/aws-lambda-mock-context/tsconfig.json @@ -17,6 +17,6 @@ }, "files": [ "index.d.ts", - "redux-persist-transform-filter-tests.ts" + "aws-lambda-mock-context-tests.ts" ] } \ No newline at end of file diff --git a/nedb/tslint.json b/types/aws-lambda-mock-context/tslint.json similarity index 100% rename from nedb/tslint.json rename to types/aws-lambda-mock-context/tslint.json diff --git a/aws-lambda/aws-lambda-tests.ts b/types/aws-lambda/aws-lambda-tests.ts similarity index 79% rename from aws-lambda/aws-lambda-tests.ts rename to types/aws-lambda/aws-lambda-tests.ts index 1ffdb2980b..3aede36d4c 100644 --- a/aws-lambda/aws-lambda-tests.ts +++ b/types/aws-lambda/aws-lambda-tests.ts @@ -12,11 +12,50 @@ var context: AWSLambda.Context; var identity: AWSLambda.CognitoIdentity; var proxyResult: AWSLambda.ProxyResult; var snsEvt: AWSLambda.SNSEvent; -var snsEvtRecs: Array; +var snsEvtRecs: AWSLambda.SNSEventRecord[]; var snsEvtRec: AWSLambda.SNSEventRecord; var snsMsg: AWSLambda.SNSMessage; var snsMsgAttr: AWSLambda.SNSMessageAttribute; var snsMsgAttrs: AWSLambda.SNSMessageAttributes; +var S3CreateEvent: AWSLambda.S3CreateEvent = { + Records: [{ + eventVersion: 'string', + eventSource: 'string', + awsRegion: 'string', + eventTime: 'string', + eventName: 'string', + userIdentity: { + principalId: 'string' + }, + requestParameters: { + sourceIPAddress: 'string' + }, + responseElements: { + 'x-amz-request-id': 'string', + 'x-amz-id-2': 'string' + }, + s3: { + s3SchemaVersion: 'string', + configurationId: 'string', + bucket: { + name: 'string', + ownerIdentity: { + principalId: 'string' + }, + arn: 'string' + }, + object: { + key: 'string', + size: 1, + eTag: 'string', + versionId: 'string', + sequencer: 'string' + } + } + } + ] +}; + /* API Gateway Event */ str = apiGwEvt.body; @@ -78,7 +117,7 @@ num = proxyResult.statusCode; proxyResult.headers["example"] = str; proxyResult.headers["example"] = b; proxyResult.headers["example"] = num; -str = proxyResult.body +str = proxyResult.body; /* Context */ b = context.callbackWaitsForEmptyEventLoop; @@ -142,5 +181,5 @@ context.fail(error); context.fail(str); /* Handler */ -let handler: AWSLambda.Handler = (event: any, context: AWSLambda.Context, cb: AWSLambda.Callback) => {}; -let proxyHandler: AWSLambda.ProxyHandler = (event: AWSLambda.APIGatewayEvent, context: AWSLambda.Context, cb: AWSLambda.ProxyCallback) => {}; +let handler: AWSLambda.Handler = (event: any, context: AWSLambda.Context, cb: AWSLambda.Callback) => { }; +let proxyHandler: AWSLambda.ProxyHandler = (event: AWSLambda.APIGatewayEvent, context: AWSLambda.Context, cb: AWSLambda.ProxyCallback) => { }; diff --git a/aws-lambda/index.d.ts b/types/aws-lambda/index.d.ts similarity index 81% rename from aws-lambda/index.d.ts rename to types/aws-lambda/index.d.ts index 83579b4d0d..c5e49d54c6 100644 --- a/aws-lambda/index.d.ts +++ b/types/aws-lambda/index.d.ts @@ -1,6 +1,6 @@ // Type definitions for AWS Lambda // Project: http://docs.aws.amazon.com/lambda -// Definitions by: James Darbyshire , Michael Skarum , Stef Heyenrath , Toby Hede , Rich Buggy +// Definitions by: James Darbyshire , Michael Skarum , Stef Heyenrath , Toby Hede , Rich Buggy , Simon Ramsay // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // API Gateway "event" @@ -74,6 +74,49 @@ interface SNSEvent { Records: Array; } +/** + * S3Create event + * https://docs.aws.amazon.com/AmazonS3/latest/dev/notification-content-structure.html + */ +interface S3CreateEvent { + Records: [{ + eventVersion: string; + eventSource: string; + awsRegion: string + eventTime: string; + eventName: string; + userIdentity: { + principalId: string; + }, + requestParameters: { + sourceIPAddress: string; + }, + responseElements: { + 'x-amz-request-id': string; + 'x-amz-id-2': string; + }, + s3: { + s3SchemaVersion: string; + configurationId: string; + bucket: { + name: string; + ownerIdentity: { + principalId: string; + }, + arn: string; + }, + object: { + key: string; + size: number; + eTag: string; + versionId: string; + sequencer: string; + } + } + } + ]; +} + // Context // http://docs.aws.amazon.com/lambda/latest/dg/nodejs-prog-model-context.html interface Context { diff --git a/aws-lambda/tsconfig.json b/types/aws-lambda/tsconfig.json similarity index 100% rename from aws-lambda/tsconfig.json rename to types/aws-lambda/tsconfig.json diff --git a/aws-sdk/aws-sdk-tests.ts b/types/aws-sdk/aws-sdk-tests.ts similarity index 100% rename from aws-sdk/aws-sdk-tests.ts rename to types/aws-sdk/aws-sdk-tests.ts diff --git a/aws-sdk/index.d.ts b/types/aws-sdk/index.d.ts similarity index 100% rename from aws-sdk/index.d.ts rename to types/aws-sdk/index.d.ts diff --git a/aws-sdk/tsconfig.json b/types/aws-sdk/tsconfig.json similarity index 100% rename from aws-sdk/tsconfig.json rename to types/aws-sdk/tsconfig.json diff --git a/aws-serverless-express/aws-serverless-express-tests.ts b/types/aws-serverless-express/aws-serverless-express-tests.ts similarity index 100% rename from aws-serverless-express/aws-serverless-express-tests.ts rename to types/aws-serverless-express/aws-serverless-express-tests.ts diff --git a/aws-serverless-express/index.d.ts b/types/aws-serverless-express/index.d.ts similarity index 100% rename from aws-serverless-express/index.d.ts rename to types/aws-serverless-express/index.d.ts diff --git a/aws-serverless-express/middleware.d.ts b/types/aws-serverless-express/middleware.d.ts similarity index 100% rename from aws-serverless-express/middleware.d.ts rename to types/aws-serverless-express/middleware.d.ts diff --git a/aws-serverless-express/tsconfig.json b/types/aws-serverless-express/tsconfig.json similarity index 100% rename from aws-serverless-express/tsconfig.json rename to types/aws-serverless-express/tsconfig.json diff --git a/aws-serverless-express/tslint.json b/types/aws-serverless-express/tslint.json similarity index 100% rename from aws-serverless-express/tslint.json rename to types/aws-serverless-express/tslint.json diff --git a/aws4/aws4-tests.ts b/types/aws4/aws4-tests.ts similarity index 100% rename from aws4/aws4-tests.ts rename to types/aws4/aws4-tests.ts diff --git a/aws4/index.d.ts b/types/aws4/index.d.ts similarity index 100% rename from aws4/index.d.ts rename to types/aws4/index.d.ts diff --git a/aws4/tsconfig.json b/types/aws4/tsconfig.json similarity index 100% rename from aws4/tsconfig.json rename to types/aws4/tsconfig.json diff --git a/axe-core/axe-core-tests.ts b/types/axe-core/axe-core-tests.ts similarity index 100% rename from axe-core/axe-core-tests.ts rename to types/axe-core/axe-core-tests.ts diff --git a/axe-core/index.d.ts b/types/axe-core/index.d.ts similarity index 100% rename from axe-core/index.d.ts rename to types/axe-core/index.d.ts diff --git a/axe-core/tsconfig.json b/types/axe-core/tsconfig.json similarity index 100% rename from axe-core/tsconfig.json rename to types/axe-core/tsconfig.json diff --git a/axel/axel-tests.ts b/types/axel/axel-tests.ts similarity index 100% rename from axel/axel-tests.ts rename to types/axel/axel-tests.ts diff --git a/axel/index.d.ts b/types/axel/index.d.ts similarity index 100% rename from axel/index.d.ts rename to types/axel/index.d.ts diff --git a/axel/tsconfig.json b/types/axel/tsconfig.json similarity index 100% rename from axel/tsconfig.json rename to types/axel/tsconfig.json diff --git a/azure-mobile-apps/azure-mobile-apps-tests.ts b/types/azure-mobile-apps/azure-mobile-apps-tests.ts similarity index 100% rename from azure-mobile-apps/azure-mobile-apps-tests.ts rename to types/azure-mobile-apps/azure-mobile-apps-tests.ts diff --git a/azure-mobile-apps/index.d.ts b/types/azure-mobile-apps/index.d.ts similarity index 100% rename from azure-mobile-apps/index.d.ts rename to types/azure-mobile-apps/index.d.ts diff --git a/azure-mobile-apps/tsconfig.json b/types/azure-mobile-apps/tsconfig.json similarity index 100% rename from azure-mobile-apps/tsconfig.json rename to types/azure-mobile-apps/tsconfig.json diff --git a/azure-mobile-services-client/azure-mobile-services-client-tests.ts b/types/azure-mobile-services-client/azure-mobile-services-client-tests.ts similarity index 100% rename from azure-mobile-services-client/azure-mobile-services-client-tests.ts rename to types/azure-mobile-services-client/azure-mobile-services-client-tests.ts diff --git a/azure-mobile-services-client/index.d.ts b/types/azure-mobile-services-client/index.d.ts similarity index 100% rename from azure-mobile-services-client/index.d.ts rename to types/azure-mobile-services-client/index.d.ts diff --git a/azure-mobile-services-client/tsconfig.json b/types/azure-mobile-services-client/tsconfig.json similarity index 100% rename from azure-mobile-services-client/tsconfig.json rename to types/azure-mobile-services-client/tsconfig.json diff --git a/azure-sb/azure-sb-tests.ts b/types/azure-sb/azure-sb-tests.ts similarity index 100% rename from azure-sb/azure-sb-tests.ts rename to types/azure-sb/azure-sb-tests.ts diff --git a/azure-sb/index.d.ts b/types/azure-sb/index.d.ts similarity index 100% rename from azure-sb/index.d.ts rename to types/azure-sb/index.d.ts diff --git a/azure-sb/tsconfig.json b/types/azure-sb/tsconfig.json similarity index 100% rename from azure-sb/tsconfig.json rename to types/azure-sb/tsconfig.json diff --git a/azure/azure-tests.ts b/types/azure/azure-tests.ts similarity index 100% rename from azure/azure-tests.ts rename to types/azure/azure-tests.ts diff --git a/azure/index.d.ts b/types/azure/index.d.ts similarity index 100% rename from azure/index.d.ts rename to types/azure/index.d.ts diff --git a/azure/tsconfig.json b/types/azure/tsconfig.json similarity index 100% rename from azure/tsconfig.json rename to types/azure/tsconfig.json diff --git a/b_/b_-tests.ts b/types/b_/b_-tests.ts similarity index 100% rename from b_/b_-tests.ts rename to types/b_/b_-tests.ts diff --git a/b_/index.d.ts b/types/b_/index.d.ts similarity index 100% rename from b_/index.d.ts rename to types/b_/index.d.ts diff --git a/b_/tsconfig.json b/types/b_/tsconfig.json similarity index 100% rename from b_/tsconfig.json rename to types/b_/tsconfig.json diff --git a/b_/tslint.json b/types/b_/tslint.json similarity index 100% rename from b_/tslint.json rename to types/b_/tslint.json diff --git a/babel-code-frame/babel-code-frame-tests.ts b/types/babel-code-frame/babel-code-frame-tests.ts similarity index 100% rename from babel-code-frame/babel-code-frame-tests.ts rename to types/babel-code-frame/babel-code-frame-tests.ts diff --git a/babel-code-frame/index.d.ts b/types/babel-code-frame/index.d.ts similarity index 100% rename from babel-code-frame/index.d.ts rename to types/babel-code-frame/index.d.ts diff --git a/babel-code-frame/tsconfig.json b/types/babel-code-frame/tsconfig.json similarity index 100% rename from babel-code-frame/tsconfig.json rename to types/babel-code-frame/tsconfig.json diff --git a/babel-code-frame/tslint.json b/types/babel-code-frame/tslint.json similarity index 100% rename from babel-code-frame/tslint.json rename to types/babel-code-frame/tslint.json diff --git a/babel-core/babel-core-tests.ts b/types/babel-core/babel-core-tests.ts similarity index 100% rename from babel-core/babel-core-tests.ts rename to types/babel-core/babel-core-tests.ts diff --git a/babel-core/index.d.ts b/types/babel-core/index.d.ts similarity index 100% rename from babel-core/index.d.ts rename to types/babel-core/index.d.ts diff --git a/babel-core/tsconfig.json b/types/babel-core/tsconfig.json similarity index 100% rename from babel-core/tsconfig.json rename to types/babel-core/tsconfig.json diff --git a/babel-generator/babel-generator-tests.ts b/types/babel-generator/babel-generator-tests.ts similarity index 100% rename from babel-generator/babel-generator-tests.ts rename to types/babel-generator/babel-generator-tests.ts diff --git a/babel-generator/index.d.ts b/types/babel-generator/index.d.ts similarity index 100% rename from babel-generator/index.d.ts rename to types/babel-generator/index.d.ts diff --git a/babel-generator/tsconfig.json b/types/babel-generator/tsconfig.json similarity index 100% rename from babel-generator/tsconfig.json rename to types/babel-generator/tsconfig.json diff --git a/babel-template/babel-template-tests.ts b/types/babel-template/babel-template-tests.ts similarity index 100% rename from babel-template/babel-template-tests.ts rename to types/babel-template/babel-template-tests.ts diff --git a/babel-template/index.d.ts b/types/babel-template/index.d.ts similarity index 100% rename from babel-template/index.d.ts rename to types/babel-template/index.d.ts diff --git a/babel-template/tsconfig.json b/types/babel-template/tsconfig.json similarity index 100% rename from babel-template/tsconfig.json rename to types/babel-template/tsconfig.json diff --git a/babel-traverse/babel-traverse-tests.ts b/types/babel-traverse/babel-traverse-tests.ts similarity index 100% rename from babel-traverse/babel-traverse-tests.ts rename to types/babel-traverse/babel-traverse-tests.ts diff --git a/babel-traverse/index.d.ts b/types/babel-traverse/index.d.ts similarity index 100% rename from babel-traverse/index.d.ts rename to types/babel-traverse/index.d.ts diff --git a/babel-traverse/tsconfig.json b/types/babel-traverse/tsconfig.json similarity index 100% rename from babel-traverse/tsconfig.json rename to types/babel-traverse/tsconfig.json diff --git a/babel-types/babel-types-tests.ts b/types/babel-types/babel-types-tests.ts similarity index 100% rename from babel-types/babel-types-tests.ts rename to types/babel-types/babel-types-tests.ts diff --git a/babel-types/index.d.ts b/types/babel-types/index.d.ts similarity index 100% rename from babel-types/index.d.ts rename to types/babel-types/index.d.ts diff --git a/babel-types/tsconfig.json b/types/babel-types/tsconfig.json similarity index 100% rename from babel-types/tsconfig.json rename to types/babel-types/tsconfig.json diff --git a/babelify/babelify-tests.ts b/types/babelify/babelify-tests.ts similarity index 100% rename from babelify/babelify-tests.ts rename to types/babelify/babelify-tests.ts diff --git a/babelify/index.d.ts b/types/babelify/index.d.ts similarity index 100% rename from babelify/index.d.ts rename to types/babelify/index.d.ts diff --git a/babelify/tsconfig.json b/types/babelify/tsconfig.json similarity index 100% rename from babelify/tsconfig.json rename to types/babelify/tsconfig.json diff --git a/babylon/babylon-tests.ts b/types/babylon/babylon-tests.ts similarity index 100% rename from babylon/babylon-tests.ts rename to types/babylon/babylon-tests.ts diff --git a/babylon/index.d.ts b/types/babylon/index.d.ts similarity index 100% rename from babylon/index.d.ts rename to types/babylon/index.d.ts diff --git a/babylon/tsconfig.json b/types/babylon/tsconfig.json similarity index 100% rename from babylon/tsconfig.json rename to types/babylon/tsconfig.json diff --git a/babylonjs/babylonjs-tests.ts b/types/babylonjs/babylonjs-tests.ts similarity index 100% rename from babylonjs/babylonjs-tests.ts rename to types/babylonjs/babylonjs-tests.ts diff --git a/babylonjs/index.d.ts b/types/babylonjs/index.d.ts similarity index 100% rename from babylonjs/index.d.ts rename to types/babylonjs/index.d.ts diff --git a/babylonjs/tsconfig.json b/types/babylonjs/tsconfig.json similarity index 100% rename from babylonjs/tsconfig.json rename to types/babylonjs/tsconfig.json diff --git a/babyparse/babyparse-tests.ts b/types/babyparse/babyparse-tests.ts similarity index 100% rename from babyparse/babyparse-tests.ts rename to types/babyparse/babyparse-tests.ts diff --git a/babyparse/index.d.ts b/types/babyparse/index.d.ts similarity index 100% rename from babyparse/index.d.ts rename to types/babyparse/index.d.ts diff --git a/babyparse/tsconfig.json b/types/babyparse/tsconfig.json similarity index 100% rename from babyparse/tsconfig.json rename to types/babyparse/tsconfig.json diff --git a/backbone-associations/backbone-associations-tests.ts b/types/backbone-associations/backbone-associations-tests.ts similarity index 100% rename from backbone-associations/backbone-associations-tests.ts rename to types/backbone-associations/backbone-associations-tests.ts diff --git a/backbone-associations/index.d.ts b/types/backbone-associations/index.d.ts similarity index 100% rename from backbone-associations/index.d.ts rename to types/backbone-associations/index.d.ts diff --git a/backbone-associations/tsconfig.json b/types/backbone-associations/tsconfig.json similarity index 100% rename from backbone-associations/tsconfig.json rename to types/backbone-associations/tsconfig.json diff --git a/backbone-fetch-cache/backbone-fetch-cache-tests.ts b/types/backbone-fetch-cache/backbone-fetch-cache-tests.ts similarity index 100% rename from backbone-fetch-cache/backbone-fetch-cache-tests.ts rename to types/backbone-fetch-cache/backbone-fetch-cache-tests.ts diff --git a/backbone-fetch-cache/index.d.ts b/types/backbone-fetch-cache/index.d.ts similarity index 100% rename from backbone-fetch-cache/index.d.ts rename to types/backbone-fetch-cache/index.d.ts diff --git a/backbone-fetch-cache/tsconfig.json b/types/backbone-fetch-cache/tsconfig.json similarity index 100% rename from backbone-fetch-cache/tsconfig.json rename to types/backbone-fetch-cache/tsconfig.json diff --git a/backbone-relational/backbone-relational-tests.ts b/types/backbone-relational/backbone-relational-tests.ts similarity index 100% rename from backbone-relational/backbone-relational-tests.ts rename to types/backbone-relational/backbone-relational-tests.ts diff --git a/backbone-relational/index.d.ts b/types/backbone-relational/index.d.ts similarity index 100% rename from backbone-relational/index.d.ts rename to types/backbone-relational/index.d.ts diff --git a/backbone-relational/tsconfig.json b/types/backbone-relational/tsconfig.json similarity index 100% rename from backbone-relational/tsconfig.json rename to types/backbone-relational/tsconfig.json diff --git a/backbone.layoutmanager/backbone.layoutmanager-tests.ts b/types/backbone.layoutmanager/backbone.layoutmanager-tests.ts similarity index 100% rename from backbone.layoutmanager/backbone.layoutmanager-tests.ts rename to types/backbone.layoutmanager/backbone.layoutmanager-tests.ts diff --git a/backbone.layoutmanager/index.d.ts b/types/backbone.layoutmanager/index.d.ts similarity index 100% rename from backbone.layoutmanager/index.d.ts rename to types/backbone.layoutmanager/index.d.ts diff --git a/backbone.layoutmanager/tsconfig.json b/types/backbone.layoutmanager/tsconfig.json similarity index 100% rename from backbone.layoutmanager/tsconfig.json rename to types/backbone.layoutmanager/tsconfig.json diff --git a/backbone.localstorage/backbone.localstorage-tests.ts b/types/backbone.localstorage/backbone.localstorage-tests.ts similarity index 100% rename from backbone.localstorage/backbone.localstorage-tests.ts rename to types/backbone.localstorage/backbone.localstorage-tests.ts diff --git a/backbone.localstorage/index.d.ts b/types/backbone.localstorage/index.d.ts similarity index 100% rename from backbone.localstorage/index.d.ts rename to types/backbone.localstorage/index.d.ts diff --git a/backbone.localstorage/tsconfig.json b/types/backbone.localstorage/tsconfig.json similarity index 100% rename from backbone.localstorage/tsconfig.json rename to types/backbone.localstorage/tsconfig.json diff --git a/backbone.marionette/backbone.marionette-tests.ts b/types/backbone.marionette/backbone.marionette-tests.ts similarity index 97% rename from backbone.marionette/backbone.marionette-tests.ts rename to types/backbone.marionette/backbone.marionette-tests.ts index b5eb9d07c6..2c1f5b68bd 100644 --- a/backbone.marionette/backbone.marionette-tests.ts +++ b/types/backbone.marionette/backbone.marionette-tests.ts @@ -66,11 +66,11 @@ namespace MarionetteTests { let regions: {[key: string]: Marionette.Region} = this.layoutView.getRegions(); let prefix: string = this.layoutView.childViewEventPrefix; let region: Marionette.Region = this.layoutView.removeRegion('main'); - let layout: Marionette.LayoutView = this.layoutView.destroy(); + let layout: Marionette.View = this.layoutView.destroy(); } } - class AppLayoutView extends Marionette.LayoutView { + class AppLayoutView extends Marionette.View { constructor() { super({ el: 'body' }); } @@ -111,7 +111,7 @@ namespace MarionetteTests { } - class MyView extends Marionette.ItemView { + class MyView extends Marionette.View { behaviors: any; constructor(model: MyModel) { @@ -189,7 +189,7 @@ namespace MarionetteTests { constructor() { super(); this.childView = MyView; - this.childEvents = { + this.childViewEvents = { render: function () { console.log("a childView has been rendered"); } diff --git a/backbone.marionette/index.d.ts b/types/backbone.marionette/index.d.ts similarity index 90% rename from backbone.marionette/index.d.ts rename to types/backbone.marionette/index.d.ts index edaab2c2d6..d24f9d64f9 100644 --- a/backbone.marionette/index.d.ts +++ b/types/backbone.marionette/index.d.ts @@ -4,6 +4,7 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped import * as Backbone from 'backbone'; +import * as Radio from 'backbone.radio'; export as namespace Marionette; export = Marionette; @@ -22,8 +23,6 @@ declare module 'backbone' { findByIndex(index: number): TView; findByCid(cid: string): TView; remove(view: TView): void; - call(method: any): void; - apply(method: any, args?: any[]): void; //mixins from Collection (copied from Backbone's Collection declaration) @@ -180,6 +179,27 @@ declare namespace Marionette { * backbone conventions and utilities like initialize and Backbone.Events. */ class Object extends Backbone.Events { + + /** + * Defines the Radio channel that will be used for the requests and/or events + */ + channelName: string; + + /** + * Returns a Radio.Channel instance using 'channelName' + */ + getChannel(): Backbone.Radio.Channel; + + /** + * Defines an events hash with the events to be listened and its respective handlers + */ + radioEvents: any; + + /** + * Defines an events hash with the requests to be replied and its respective handlers + */ + radioRequests: any; + /** * Initialize is called immediately after the Object has been instantiated, * and is invoked with the same arguments that the constructor received. @@ -750,7 +770,7 @@ declare namespace Marionette { /** * View implements a destroy method, which is called by the region managers automatically. As part of the implementation. */ - destroy(...args: any[]): void; + destroy(...args: any[]): View; /** * In several cases you need to access ui elements inside the view to @@ -772,12 +792,37 @@ declare namespace Marionette { triggerMethod(name: string, ...args: any[]): any; /** - * Called on the view instance when the view has been rendered and - * displayed. This event can be used to react to when a view has been - * shown via a region. A common use case for the onShow method is to - * use it to add children views. + * Item views will serialize a model or collection, by default, by calling + * .toJSON on either the model or collection. If both a model and + * collection are attached to an item view, the model will be used as the + * data source. The results of the data serialization will be passed to + * the template that is rendered. + * + * If you need custom serialization for your data, you can provide a serializeData + * method on your view. It must return a valid JSON object, as if you had + * called .toJSON on a model or collection. */ - onShow(): void; + serializeData(): any; + + /** + * Renders the view. It is unwise to override the render method of any + * Marionette view. Instead, you should use the onBeforeRender and + * onRender callbacks to layer in additional functionality to the + * rendering of your view. + */ + render(): any; + + /** + * Triggered before an ItemView is rendered. + */ + onBeforeRender(): void; + + /** + * Triggered after the view has been rendered. You can implement this in + * your view to provide custom code for dealing with the view's el after + * it has been rendered. + */ + onRender(): void; /** * Triggered just after the view has been destroyed. @@ -814,49 +859,65 @@ declare namespace Marionette { isDestroyed: boolean; supportsRenderLifecycle: boolean; supportsDestroyLifecycle: boolean; - } - - /** - * An ItemView is a view that represents a single item. That item may be - * a Backbone.Model or may be a Backbone.Collection. Whichever it is though, - * it will be treated as a single item. - */ - class ItemView extends View { - - constructor(options?: Backbone.ViewOptions); /** - * Item views will serialize a model or collection, by default, by calling - * .toJSON on either the model or collection. If both a model and - * collection are attached to an item view, the model will be used as the - * data source. The results of the data serialization will be passed to - * the template that is rendered. - * - * If you need custom serialization for your data, you can provide a serializeData - * method on your view. It must return a valid JSON object, as if you had - * called .toJSON on a model or collection. + * If you have the need to replace the Region with a region class of your + * own implementation, you can specify an alternate class to use with this + * property. */ - serializeData(): any; + regionClass: any; /** - * Renders the view. It is unwise to override the render method of any - * Marionette view. Instead, you should use the onBeforeRender and - * onRender callbacks to layer in additional functionality to the - * rendering of your view. - */ - render(): ItemView; + * Regions hash or a method returning the regions hash that maps + * regions/selectors to methods on your View. + **/ + regions(): any; + + /** Adds a region to the layout view. */ + addRegion(name: string, definition: any): Region; /** - * Triggered before an ItemView is rendered. + * Add multiple regions as a {name: definition, name2: def2} object literal. */ - onBeforeRender(): void; + addRegions(regions: any): any; + + /** Returns a region from the layout view */ + getRegion(name: string): Region; /** - * Triggered after the view has been rendered. You can implement this in - * your view to provide custom code for dealing with the view's el after - * it has been rendered. + * Removes the region with the specified name. + * @param name the name of the region to remove. */ - onRender(): void; + removeRegion(name: string): Region; + + /** Enable easy overriding of the default `RegionManager` + * for customized region interactions and business specific + * view logic for better control over single regions. + */ + getRegionManager(): RegionManager; + + /** + * Show a view into the region specified by `regionName`. + */ + showChildView(regionName: string, view: any, options?: RegionShowOptions): void; + + /** + * Get the current view that is shown in the region specified by + * `regionName`. + */ + getChildView(regionName: string): Backbone.View; + + /** + * Returns all regions from the layout view. The results contains an + * Object hash that has `string`s as keys and `Region`s as values. + */ + getRegions(): {[key: string]: Region}; + + /** + * You can customize the event prefix for events that are forwarded through + * the layout view with this property. + */ + childViewEventPrefix: string; } @@ -928,12 +989,12 @@ declare namespace Marionette { childViewEventPrefix: string; /** - * You can specify a childEvents hash or method which allows you to - * capture all bubbling childEvents without having to manually set bindings. + * You can specify a childViewEvents hash or method which allows you to + * capture all bubbling childViewEvents without having to manually set bindings. * The keys of the hash can either be a function or a string that is the * name of a method on the collection view. */ - childEvents: any; + childViewEvents: any; /** * When a collection has no children, and you need to render a view other than @@ -1034,37 +1095,9 @@ declare namespace Marionette { */ attachHtml(collectionView: CollectionView, childView: TView, index: number): void; - /** - * The value returned by this method is the ChildView class that will be - * instantiated when a Model needs to be initially rendered. This method - * also gives you the ability to customize per Model ChildViews. - */ - getChildView(item: M): new (...args:any[]) => TView; - - /** - * If you need the emptyView's class chosen dynamically, specify - * getEmptyView. - */ - getEmptyView(): any; - /** Serialize a collection by serializing each of its models. */ serializeCollection(): any; - /** - * Attaches the content of a given view. - * This method can be overridden to optimize rendering, - * or to render in a non standard way. - * - * For example, using `innerHTML` instead of `$el.html` - * - * @example - * attachElContent: function(html) { - * this.el.innerHTML = html; - * return this; - * } - */ - attachElContent(html: string): ItemView; - /** * Reorder DOM after sorting. When your element's rendering * do not use their index, you can pass reorderOnSort: true @@ -1132,165 +1165,6 @@ declare namespace Marionette { onRemoveChild(childView: TView): void; } - /** - * A CompositeView extends from CollectionView to be used as a composite view - * for scenarios where it should represent both a branch and leaf in a tree - * structure, or for scenarios where a collection needs to be rendered within - * a wrapper template. - */ - class CompositeView> extends CollectionView { - - constructor(options?: CollectionViewOptions); - - /** - * Each childView will be rendered using the childView's template. The - * CompositeView's template is rendered and the childView's templates are - * added to this. - */ - childView: new (...args:any[]) => TView; - - /** - * By default the composite view uses the same attachHtml method that the - * collection view provides. This means the view will call jQuery's - * .append to move the HTML contents from the child view instance in to - * the collection view's el. - * This is typically not very useful as a composite view will usually render - * a container DOM element in which the child views should be placed. - * This can be either a string or a function returning a string. - */ - childViewContainer: any; - - /** - * Renders the view. - */ - render(): CompositeView; - - /** - * Invoked before the model has been rendered - */ - onBeforeRenderTemplate(): void; - - /** - * Invoked after the model has been rendered. - */ - onRenderTemplate(): void; - - /** - * Invoked before the collection of models is rendered - */ - onBeforeRenderCollection(): void; - - /** - * Invoked after the collection of models has been rendered - */ - onRenderCollection(): void; - } - - interface LayoutViewOptions extends Backbone.ViewOptions { - /** - * The LayoutView takes an additional parameter where you can pass the regions as option on creation. - */ - regions?:any; - - /** - * This option removes the layoutView from the DOM before destroying the - * children preventing repaints as each option is removed. However, it - * makes it difficult to do close animations for a child view (false by - * default) - */ - destroyImmediate?: boolean; - } - - /** - * A LayoutView is a hybrid of an ItemView and a collection of Region objects. - * They are ideal for rendering application layouts with multiple sub-regions - * managed by specified region managers. - * A layoutView can also act as a composite-view to aggregate multiple views - * and sub-application areas of the screen allowing applications to attach - * multiple region managers to dynamically rendered HTML. - * You can create complex views by nesting layoutView managers within Regions. - */ - class LayoutView extends ItemView { - /** - * If you have the need to replace the Region with a region class of your - * own implementation, you can specify an alternate class to use with this - * property. - */ - regionClass: any; - - /** - * Constructor. - * A hash that can contain a regions hash that allows you to specify regions per - * LayoutView instance. - */ - constructor(options?: LayoutViewOptions); - - /** - * Handle destroying regions, and then destroy the view itself. - */ - destroy(): LayoutView; - - /** - * Regions hash or a method returning the regions hash that maps - * regions/selectors to methods on your View. - **/ - regions(): any; - - /** Adds a region to the layout view. */ - addRegion(name: string, definition: any): Region; - - /** - * Add multiple regions as a {name: definition, name2: def2} object literal. - */ - addRegions(regions: any): any; - - /** Returns a region from the layout view */ - getRegion(name: string): Region; - - /** - * Renders the view. It will use the existing region objects the first - * time it is called. Subsequent calls will destroy the views that the - * regions are showing and then reset the `el` for the regions to the - * newly rendered DOM elements. - */ - render(): LayoutView; - - /** - * Removes the region with the specified name. - * @param name the name of the region to remove. - */ - removeRegion(name: string): Region; - - /** Enable easy overriding of the default `RegionManager` - * for customized region interactions and business specific - * view logic for better control over single regions. - */ - getRegionManager(): RegionManager; - - /** - * Show a view into the region specified by `regionName`. - */ - showChildView(regionName: string, view: any, options?: RegionShowOptions): void; - - /** - * Get the current view that is shown in the region specified by - * `regionName`. - */ - getChildView(regionName: string): Backbone.View; - - /** - * Returns all regions from the layout view. The results contains an - * Object hash that has `string`s as keys and `Region`s as values. - */ - getRegions(): {[key: string]: Region}; - - /** - * You can customize the event prefix for events that are forwarded through - * the layout view with this property. - */ - childViewEventPrefix: string; - } - interface AppRouterOptions extends Backbone.RouterOptions { /** * The appRoutes. @@ -1437,7 +1311,7 @@ declare namespace Marionette { options: any; - /** + /** * Behaviors can have their own ui hash, which will be mixed into the ui * hash of its associated View instance. ui elements defined on either the * Behavior or the View will be made available within events and triggers. diff --git a/backbone.marionette/tsconfig.json b/types/backbone.marionette/tsconfig.json similarity index 100% rename from backbone.marionette/tsconfig.json rename to types/backbone.marionette/tsconfig.json diff --git a/backbone.paginator/backbone.paginator-tests.ts b/types/backbone.paginator/backbone.paginator-tests.ts similarity index 100% rename from backbone.paginator/backbone.paginator-tests.ts rename to types/backbone.paginator/backbone.paginator-tests.ts diff --git a/backbone.paginator/index.d.ts b/types/backbone.paginator/index.d.ts similarity index 100% rename from backbone.paginator/index.d.ts rename to types/backbone.paginator/index.d.ts diff --git a/backbone.paginator/tsconfig.json b/types/backbone.paginator/tsconfig.json similarity index 100% rename from backbone.paginator/tsconfig.json rename to types/backbone.paginator/tsconfig.json diff --git a/backbone.radio/backbone.radio-tests.ts b/types/backbone.radio/backbone.radio-tests.ts similarity index 100% rename from backbone.radio/backbone.radio-tests.ts rename to types/backbone.radio/backbone.radio-tests.ts diff --git a/backbone.radio/index.d.ts b/types/backbone.radio/index.d.ts similarity index 100% rename from backbone.radio/index.d.ts rename to types/backbone.radio/index.d.ts diff --git a/backbone.radio/tsconfig.json b/types/backbone.radio/tsconfig.json similarity index 100% rename from backbone.radio/tsconfig.json rename to types/backbone.radio/tsconfig.json diff --git a/backbone/backbone-tests.ts b/types/backbone/backbone-tests.ts similarity index 100% rename from backbone/backbone-tests.ts rename to types/backbone/backbone-tests.ts diff --git a/backbone/index.d.ts b/types/backbone/index.d.ts similarity index 100% rename from backbone/index.d.ts rename to types/backbone/index.d.ts diff --git a/backbone/tsconfig.json b/types/backbone/tsconfig.json similarity index 100% rename from backbone/tsconfig.json rename to types/backbone/tsconfig.json diff --git a/backgrid/backgrid-tests.ts b/types/backgrid/backgrid-tests.ts similarity index 100% rename from backgrid/backgrid-tests.ts rename to types/backgrid/backgrid-tests.ts diff --git a/backgrid/index.d.ts b/types/backgrid/index.d.ts similarity index 100% rename from backgrid/index.d.ts rename to types/backgrid/index.d.ts diff --git a/backgrid/tsconfig.json b/types/backgrid/tsconfig.json similarity index 100% rename from backgrid/tsconfig.json rename to types/backgrid/tsconfig.json diff --git a/backlog-js/backlog-js-tests.ts b/types/backlog-js/backlog-js-tests.ts similarity index 100% rename from backlog-js/backlog-js-tests.ts rename to types/backlog-js/backlog-js-tests.ts diff --git a/backlog-js/index.d.ts b/types/backlog-js/index.d.ts similarity index 100% rename from backlog-js/index.d.ts rename to types/backlog-js/index.d.ts diff --git a/backlog-js/tsconfig.json b/types/backlog-js/tsconfig.json similarity index 100% rename from backlog-js/tsconfig.json rename to types/backlog-js/tsconfig.json diff --git a/baconjs/.editorconfig b/types/baconjs/.editorconfig similarity index 100% rename from baconjs/.editorconfig rename to types/baconjs/.editorconfig diff --git a/baconjs/baconjs-tests.ts b/types/baconjs/baconjs-tests.ts similarity index 100% rename from baconjs/baconjs-tests.ts rename to types/baconjs/baconjs-tests.ts diff --git a/baconjs/index.d.ts b/types/baconjs/index.d.ts similarity index 100% rename from baconjs/index.d.ts rename to types/baconjs/index.d.ts diff --git a/baconjs/tsconfig.json b/types/baconjs/tsconfig.json similarity index 100% rename from baconjs/tsconfig.json rename to types/baconjs/tsconfig.json diff --git a/barcode/barcode-tests.ts b/types/barcode/barcode-tests.ts similarity index 100% rename from barcode/barcode-tests.ts rename to types/barcode/barcode-tests.ts diff --git a/barcode/index.d.ts b/types/barcode/index.d.ts similarity index 100% rename from barcode/index.d.ts rename to types/barcode/index.d.ts diff --git a/barcode/tsconfig.json b/types/barcode/tsconfig.json similarity index 100% rename from barcode/tsconfig.json rename to types/barcode/tsconfig.json diff --git a/bardjs/bardjs-tests.ts b/types/bardjs/bardjs-tests.ts similarity index 100% rename from bardjs/bardjs-tests.ts rename to types/bardjs/bardjs-tests.ts diff --git a/bardjs/index.d.ts b/types/bardjs/index.d.ts similarity index 100% rename from bardjs/index.d.ts rename to types/bardjs/index.d.ts diff --git a/bardjs/tsconfig.json b/types/bardjs/tsconfig.json similarity index 100% rename from bardjs/tsconfig.json rename to types/bardjs/tsconfig.json diff --git a/base-64/base-64-tests.ts b/types/base-64/base-64-tests.ts similarity index 100% rename from base-64/base-64-tests.ts rename to types/base-64/base-64-tests.ts diff --git a/base-64/index.d.ts b/types/base-64/index.d.ts similarity index 100% rename from base-64/index.d.ts rename to types/base-64/index.d.ts diff --git a/base-64/tsconfig.json b/types/base-64/tsconfig.json similarity index 100% rename from base-64/tsconfig.json rename to types/base-64/tsconfig.json diff --git a/base-64/tslint.json b/types/base-64/tslint.json similarity index 100% rename from base-64/tslint.json rename to types/base-64/tslint.json diff --git a/base-x/base-x-tests.ts b/types/base-x/base-x-tests.ts similarity index 100% rename from base-x/base-x-tests.ts rename to types/base-x/base-x-tests.ts diff --git a/base-x/index.d.ts b/types/base-x/index.d.ts similarity index 100% rename from base-x/index.d.ts rename to types/base-x/index.d.ts diff --git a/base-x/tsconfig.json b/types/base-x/tsconfig.json similarity index 100% rename from base-x/tsconfig.json rename to types/base-x/tsconfig.json diff --git a/base16/base16-tests.ts b/types/base16/base16-tests.ts similarity index 100% rename from base16/base16-tests.ts rename to types/base16/base16-tests.ts diff --git a/base16/index.d.ts b/types/base16/index.d.ts similarity index 100% rename from base16/index.d.ts rename to types/base16/index.d.ts diff --git a/base16/tsconfig.json b/types/base16/tsconfig.json similarity index 100% rename from base16/tsconfig.json rename to types/base16/tsconfig.json diff --git a/base64-js/base64-js-tests.ts b/types/base64-js/base64-js-tests.ts similarity index 100% rename from base64-js/base64-js-tests.ts rename to types/base64-js/base64-js-tests.ts diff --git a/base64-js/index.d.ts b/types/base64-js/index.d.ts similarity index 100% rename from base64-js/index.d.ts rename to types/base64-js/index.d.ts diff --git a/base64-js/tsconfig.json b/types/base64-js/tsconfig.json similarity index 100% rename from base64-js/tsconfig.json rename to types/base64-js/tsconfig.json diff --git a/base64-js/tslint.json b/types/base64-js/tslint.json similarity index 100% rename from base64-js/tslint.json rename to types/base64-js/tslint.json diff --git a/base64url/base64url-tests.ts b/types/base64url/base64url-tests.ts similarity index 100% rename from base64url/base64url-tests.ts rename to types/base64url/base64url-tests.ts diff --git a/base64url/index.d.ts b/types/base64url/index.d.ts similarity index 100% rename from base64url/index.d.ts rename to types/base64url/index.d.ts diff --git a/base64url/tsconfig.json b/types/base64url/tsconfig.json similarity index 100% rename from base64url/tsconfig.json rename to types/base64url/tsconfig.json diff --git a/bases/bases-tests.ts b/types/bases/bases-tests.ts similarity index 100% rename from bases/bases-tests.ts rename to types/bases/bases-tests.ts diff --git a/bases/index.d.ts b/types/bases/index.d.ts similarity index 100% rename from bases/index.d.ts rename to types/bases/index.d.ts diff --git a/bases/tsconfig.json b/types/bases/tsconfig.json similarity index 100% rename from bases/tsconfig.json rename to types/bases/tsconfig.json diff --git a/basic-auth/basic-auth-tests.ts b/types/basic-auth/basic-auth-tests.ts similarity index 100% rename from basic-auth/basic-auth-tests.ts rename to types/basic-auth/basic-auth-tests.ts diff --git a/basic-auth/index.d.ts b/types/basic-auth/index.d.ts similarity index 100% rename from basic-auth/index.d.ts rename to types/basic-auth/index.d.ts diff --git a/basic-auth/tsconfig.json b/types/basic-auth/tsconfig.json similarity index 100% rename from basic-auth/tsconfig.json rename to types/basic-auth/tsconfig.json diff --git a/batch-stream/batch-stream-tests.ts b/types/batch-stream/batch-stream-tests.ts similarity index 100% rename from batch-stream/batch-stream-tests.ts rename to types/batch-stream/batch-stream-tests.ts diff --git a/batch-stream/index.d.ts b/types/batch-stream/index.d.ts similarity index 100% rename from batch-stream/index.d.ts rename to types/batch-stream/index.d.ts diff --git a/batch-stream/tsconfig.json b/types/batch-stream/tsconfig.json similarity index 100% rename from batch-stream/tsconfig.json rename to types/batch-stream/tsconfig.json diff --git a/bazinga-translator/bazinga-translator-tests.ts b/types/bazinga-translator/bazinga-translator-tests.ts similarity index 100% rename from bazinga-translator/bazinga-translator-tests.ts rename to types/bazinga-translator/bazinga-translator-tests.ts diff --git a/bazinga-translator/index.d.ts b/types/bazinga-translator/index.d.ts similarity index 100% rename from bazinga-translator/index.d.ts rename to types/bazinga-translator/index.d.ts diff --git a/bazinga-translator/tsconfig.json b/types/bazinga-translator/tsconfig.json similarity index 100% rename from bazinga-translator/tsconfig.json rename to types/bazinga-translator/tsconfig.json diff --git a/bcrypt-nodejs/bcrypt-nodejs-tests.ts b/types/bcrypt-nodejs/bcrypt-nodejs-tests.ts similarity index 100% rename from bcrypt-nodejs/bcrypt-nodejs-tests.ts rename to types/bcrypt-nodejs/bcrypt-nodejs-tests.ts diff --git a/bcrypt-nodejs/index.d.ts b/types/bcrypt-nodejs/index.d.ts similarity index 100% rename from bcrypt-nodejs/index.d.ts rename to types/bcrypt-nodejs/index.d.ts diff --git a/bcrypt-nodejs/tsconfig.json b/types/bcrypt-nodejs/tsconfig.json similarity index 100% rename from bcrypt-nodejs/tsconfig.json rename to types/bcrypt-nodejs/tsconfig.json diff --git a/bcrypt/bcrypt-tests.ts b/types/bcrypt/bcrypt-tests.ts similarity index 100% rename from bcrypt/bcrypt-tests.ts rename to types/bcrypt/bcrypt-tests.ts diff --git a/bcrypt/index.d.ts b/types/bcrypt/index.d.ts similarity index 100% rename from bcrypt/index.d.ts rename to types/bcrypt/index.d.ts diff --git a/bcrypt/tsconfig.json b/types/bcrypt/tsconfig.json similarity index 100% rename from bcrypt/tsconfig.json rename to types/bcrypt/tsconfig.json diff --git a/bcryptjs/bcryptjs-tests.ts b/types/bcryptjs/bcryptjs-tests.ts similarity index 100% rename from bcryptjs/bcryptjs-tests.ts rename to types/bcryptjs/bcryptjs-tests.ts diff --git a/bcryptjs/index.d.ts b/types/bcryptjs/index.d.ts similarity index 100% rename from bcryptjs/index.d.ts rename to types/bcryptjs/index.d.ts diff --git a/bcryptjs/tsconfig.json b/types/bcryptjs/tsconfig.json similarity index 100% rename from bcryptjs/tsconfig.json rename to types/bcryptjs/tsconfig.json diff --git a/benchmark/benchmark-tests.ts b/types/benchmark/benchmark-tests.ts similarity index 100% rename from benchmark/benchmark-tests.ts rename to types/benchmark/benchmark-tests.ts diff --git a/benchmark/index.d.ts b/types/benchmark/index.d.ts similarity index 100% rename from benchmark/index.d.ts rename to types/benchmark/index.d.ts diff --git a/benchmark/tsconfig.json b/types/benchmark/tsconfig.json similarity index 100% rename from benchmark/tsconfig.json rename to types/benchmark/tsconfig.json diff --git a/better-curry/better-curry-tests.ts b/types/better-curry/better-curry-tests.ts similarity index 100% rename from better-curry/better-curry-tests.ts rename to types/better-curry/better-curry-tests.ts diff --git a/better-curry/index.d.ts b/types/better-curry/index.d.ts similarity index 100% rename from better-curry/index.d.ts rename to types/better-curry/index.d.ts diff --git a/better-curry/tsconfig.json b/types/better-curry/tsconfig.json similarity index 100% rename from better-curry/tsconfig.json rename to types/better-curry/tsconfig.json diff --git a/bezier-easing/bezier-easing-tests.ts b/types/bezier-easing/bezier-easing-tests.ts similarity index 100% rename from bezier-easing/bezier-easing-tests.ts rename to types/bezier-easing/bezier-easing-tests.ts diff --git a/bezier-easing/index.d.ts b/types/bezier-easing/index.d.ts similarity index 100% rename from bezier-easing/index.d.ts rename to types/bezier-easing/index.d.ts diff --git a/bezier-easing/tsconfig.json b/types/bezier-easing/tsconfig.json similarity index 100% rename from bezier-easing/tsconfig.json rename to types/bezier-easing/tsconfig.json diff --git a/bezier-js/bezier-js-tests.ts b/types/bezier-js/bezier-js-tests.ts similarity index 100% rename from bezier-js/bezier-js-tests.ts rename to types/bezier-js/bezier-js-tests.ts diff --git a/bezier-js/index.d.ts b/types/bezier-js/index.d.ts similarity index 100% rename from bezier-js/index.d.ts rename to types/bezier-js/index.d.ts diff --git a/bezier-js/tsconfig.json b/types/bezier-js/tsconfig.json similarity index 100% rename from bezier-js/tsconfig.json rename to types/bezier-js/tsconfig.json diff --git a/bgiframe/index.d.ts b/types/bgiframe/index.d.ts similarity index 100% rename from bgiframe/index.d.ts rename to types/bgiframe/index.d.ts diff --git a/bgiframe/tsconfig.json b/types/bgiframe/tsconfig.json similarity index 100% rename from bgiframe/tsconfig.json rename to types/bgiframe/tsconfig.json diff --git a/big-integer/big-integer-tests.ts b/types/big-integer/big-integer-tests.ts similarity index 100% rename from big-integer/big-integer-tests.ts rename to types/big-integer/big-integer-tests.ts diff --git a/big-integer/index.d.ts b/types/big-integer/index.d.ts similarity index 100% rename from big-integer/index.d.ts rename to types/big-integer/index.d.ts diff --git a/big-integer/tsconfig.json b/types/big-integer/tsconfig.json similarity index 100% rename from big-integer/tsconfig.json rename to types/big-integer/tsconfig.json diff --git a/big.js/big.js-tests.ts b/types/big.js/big.js-tests.ts similarity index 100% rename from big.js/big.js-tests.ts rename to types/big.js/big.js-tests.ts diff --git a/big.js/index.d.ts b/types/big.js/index.d.ts similarity index 100% rename from big.js/index.d.ts rename to types/big.js/index.d.ts diff --git a/big.js/tsconfig.json b/types/big.js/tsconfig.json similarity index 100% rename from big.js/tsconfig.json rename to types/big.js/tsconfig.json diff --git a/bigi/bigi-tests.ts b/types/bigi/bigi-tests.ts similarity index 100% rename from bigi/bigi-tests.ts rename to types/bigi/bigi-tests.ts diff --git a/bigi/index.d.ts b/types/bigi/index.d.ts similarity index 100% rename from bigi/index.d.ts rename to types/bigi/index.d.ts diff --git a/bigi/tsconfig.json b/types/bigi/tsconfig.json similarity index 100% rename from bigi/tsconfig.json rename to types/bigi/tsconfig.json diff --git a/bigi/tslint.json b/types/bigi/tslint.json similarity index 100% rename from bigi/tslint.json rename to types/bigi/tslint.json diff --git a/bigint/bigint-tests.ts b/types/bigint/bigint-tests.ts similarity index 100% rename from bigint/bigint-tests.ts rename to types/bigint/bigint-tests.ts diff --git a/bigint/index.d.ts b/types/bigint/index.d.ts similarity index 100% rename from bigint/index.d.ts rename to types/bigint/index.d.ts diff --git a/bigint/tsconfig.json b/types/bigint/tsconfig.json similarity index 100% rename from bigint/tsconfig.json rename to types/bigint/tsconfig.json diff --git a/bignum/bignum-tests.ts b/types/bignum/bignum-tests.ts similarity index 100% rename from bignum/bignum-tests.ts rename to types/bignum/bignum-tests.ts diff --git a/bignum/index.d.ts b/types/bignum/index.d.ts similarity index 100% rename from bignum/index.d.ts rename to types/bignum/index.d.ts diff --git a/bignum/tsconfig.json b/types/bignum/tsconfig.json similarity index 100% rename from bignum/tsconfig.json rename to types/bignum/tsconfig.json diff --git a/types/bignumber.js/bignumber.js-tests.ts b/types/bignumber.js/bignumber.js-tests.ts new file mode 100644 index 0000000000..9dc96dd7ea --- /dev/null +++ b/types/bignumber.js/bignumber.js-tests.ts @@ -0,0 +1,443 @@ +var x: BigNumber.BigNumber = new BigNumber(9); +var y = new BigNumber(x); + +BigNumber(435.345); + +new BigNumber('5032485723458348569331745.33434346346912144534543'); +new BigNumber('4.321e+4'); +new BigNumber('-735.0918e-430'); +new BigNumber(Infinity); +new BigNumber(NaN); +new BigNumber('.5'); +new BigNumber('+2'); +new BigNumber(-10110100.1, 2); +new BigNumber(-0b10110100); +new BigNumber('123412421.234324', 5); +new BigNumber('ff.8', 16); +new BigNumber('0xff.8'); + +new BigNumber(9, 2); + +new BigNumber(96517860459076817.4395); + +new BigNumber('blurgh'); + +BigNumber.config({ DECIMAL_PLACES: 5 }); +new BigNumber(1.23456789); +new BigNumber(1.23456789, 10); + +BigNumber.config({ DECIMAL_PLACES: 5 }); +var BN = BigNumber.another({ DECIMAL_PLACES: 9 }); + +x = new BigNumber(1); +y = new BN(1); + +x.div(3); +y.div(3); + +BN = BigNumber.another(); +BN.config({ DECIMAL_PLACES: 9 }); + +BigNumber.config({ DECIMAL_PLACES: 5 }); +BigNumber.set({ DECIMAL_PLACES: 5 }); +BigNumber.config(5); + +BigNumber.config({ ROUNDING_MODE: 0 }); +BigNumber.config(undefined, BigNumber.ROUND_UP); + +BigNumber.config({ EXPONENTIAL_AT: 2 }); +new BigNumber(12.3); +new BigNumber(123); +new BigNumber(0.123); +new BigNumber(0.0123); + +BigNumber.config({ EXPONENTIAL_AT: [-7, 20] }); +new BigNumber(123456789); +new BigNumber(0.000000123); + +BigNumber.config({ EXPONENTIAL_AT: 1e+9 }); + +BigNumber.config({ EXPONENTIAL_AT: 0 }); + +BigNumber.config({ RANGE: 500 }); +BigNumber.config().RANGE; +new BigNumber('9.999e499'); +new BigNumber('1e500'); +new BigNumber('1e-499'); +new BigNumber('1e-500'); + +BigNumber.config({ RANGE: [-3, 4] }); +new BigNumber(99999); +new BigNumber(100000); +new BigNumber(0.001); +new BigNumber(0.0001); + +BigNumber.config({ ERRORS: false }); + +BigNumber.config({ CRYPTO: true }); +BigNumber.config().CRYPTO; +BigNumber.random(); + +BigNumber.config({ MODULO_MODE: BigNumber.EUCLID }); +BigNumber.config({ MODULO_MODE: 9 }); + +BigNumber.config({ POW_PRECISION: 100 }); + +BigNumber.config({ + FORMAT: { + decimalSeparator: '.', + groupSeparator: ',', + groupSize: 3, + secondaryGroupSize: 0, + fractionGroupSeparator: ' ', + fractionGroupSize: 0 + } +}); + +BigNumber.config({ + DECIMAL_PLACES: 40, + ROUNDING_MODE: BigNumber.ROUND_HALF_CEIL, + EXPONENTIAL_AT: [-10, 20], + RANGE: [-500, 500], + ERRORS: true, + CRYPTO: true, + MODULO_MODE: BigNumber.ROUND_FLOOR, + POW_PRECISION: 80, + FORMAT: { + groupSize: 3, + groupSeparator: ' ', + decimalSeparator: ',' + } +}); + +BigNumber.config(40, 7, [-10, 20], 500, 1, 1, 3, 80); + +var obj = BigNumber.config(); +obj.ERRORS; +obj.RANGE; + +x = new BigNumber('3257869345.0378653'); +BigNumber.max(4e9, x, '123456789.9'); + +var arr = [12, '13', new BigNumber(14)]; +BigNumber.max(arr); + +x = new BigNumber('3257869345.0378653'); +BigNumber.min(4e9, x, '123456789.9'); + +arr = [2, new BigNumber(-14), '-15.9999', -12]; +BigNumber.min(arr); + +BigNumber.config({ DECIMAL_PLACES: 10 }); +BigNumber.random(); +BigNumber.random(20); + +BigNumber.config({ ROUNDING_MODE: BigNumber.ROUND_CEIL }); +BigNumber.config({ ROUNDING_MODE: 2 }); + +x = new BigNumber(-0.8); +y = x.absoluteValue(); +var z = y.abs(); + +x = new BigNumber(1.3); +x.ceil(); +y = new BigNumber(-1.8); +y.ceil(); + +x = new BigNumber(Infinity); +y = new BigNumber(5); +x.comparedTo(y); +x.comparedTo(x.minus(1)); +y.cmp(NaN); +y.cmp('110', 2); + +x = new BigNumber(123.45); +x.decimalPlaces(); +y = new BigNumber('9.9e-101'); +y.dp(); + +x = new BigNumber(355); +y = new BigNumber(113); +x.dividedBy(y); +x.div(5); +x.div(47, 16); + +x = new BigNumber(5); +y = new BigNumber(3); +x.dividedToIntegerBy(y); +x.divToInt(0.7); +x.divToInt('0.f', 16); + +0 === 1e-324; +x = new BigNumber(0); +x.equals('1e-324'); +BigNumber(-0).eq(x); +BigNumber(255).eq('ff', 16); + +y = new BigNumber(NaN); +y.equals(NaN); + +x = new BigNumber(1.8); +x.floor(); +y = new BigNumber(-1.3); +y.floor(); + +0.1 > (0.3 - 0.2); +x = new BigNumber(0.1); +x.greaterThan(BigNumber(0.3).minus(0.2)); +BigNumber(0).gt(x); +BigNumber(11, 3).gt(11.1, 2); + +x = new BigNumber(0.3).minus(0.2); +x.greaterThanOrEqualTo(0.1); +BigNumber(1).gte(x); +BigNumber(10, 18).gte('i', 36); + +x = new BigNumber(1); +x.isFinite(); +y = new BigNumber(Infinity); +y.isFinite(); + +x = new BigNumber(1); +x.isInteger(); +y = new BigNumber(123.456); +y.isInt(); + +x = new BigNumber(NaN); +x.isNaN(); +y = new BigNumber('Infinity'); +y.isNaN(); + +x = new BigNumber(-0); +x.isNegative(); +y = new BigNumber(2); +y.isNeg(); + +x = new BigNumber(-0); +x.isZero() && x.isNeg(); +y = new BigNumber(Infinity); +y.isZero(); + +x = new BigNumber(0.3).minus(0.2); +x.lessThan(0.1); +BigNumber(0).lt(x); +BigNumber(11.1, 2).lt(11, 3); + +x = new BigNumber(0.1); +x.lessThanOrEqualTo(BigNumber(0.3).minus(0.2)); +BigNumber(-1).lte(x); +BigNumber(10, 18).lte('i', 36); + +x = new BigNumber(0.3); +x.minus(0.1); +x.sub(0.6, 20); + +x = new BigNumber(1); +x.modulo(0.9); +y = new BigNumber(33); +y.mod('a', 33); + +x = new BigNumber(1.8); +x.negated(); +y = new BigNumber(-1.3); +y.neg(); + +x = new BigNumber(0.1); +y = x.plus(0.2); +BigNumber(0.7).plus(x).add(y); +x.plus('0.1', 8); + +x = new BigNumber(1.234); +x.precision(); +y = new BigNumber(987000); +y.sd(); +y.sd(true); + +y = new BigNumber(x); +y.round(); +y.round(1); +y.round(2); +y.round(10); +y.round(0, 1); +y.round(0, 6); +y.round(1, 1); +y.round(1, BigNumber.ROUND_HALF_EVEN); + +x = new BigNumber(1.23); +x.shift(3); +x.shift(-3); + +x = new BigNumber(16); +x.squareRoot(); +y = new BigNumber(3); +y.sqrt(); + +x = new BigNumber(0.6); +y = x.times(3); +BigNumber('7e+500').times(y); +x.times('-a', 16); + +BigNumber.config({ DECIMAL_PLACES: 5, ROUNDING_MODE: 4 }); +x = new BigNumber(9876.54321); + +x.toDigits(); +x.toDigits(6); +x.toDigits(6, BigNumber.ROUND_UP); +x.toDigits(2); +x.toDigits(2, 1); + +y = new BigNumber(45.6); +y.toExponential(); +y.toExponential(0); +y.toExponential(1); +y.toExponential(1, 1); +y.toExponential(3); + +y = new BigNumber(3.456); +y.toFixed(); +y.toFixed(0); +y.toFixed(2); +y.toFixed(2, 1); +y.toFixed(5); + +var format = { + decimalSeparator: '.', + groupSeparator: ',', + groupSize: 3, + secondaryGroupSize: 0, + fractionGroupSeparator: ' ', + fractionGroupSize: 0 +}; +BigNumber.config({ FORMAT: format }); + +x = new BigNumber('123456789.123456789'); +x.toFormat(); +x.toFormat(1); + +format.groupSeparator = ' '; +format.fractionGroupSize = 5; +x.toFormat(); + +BigNumber.config({ + FORMAT: { + decimalSeparator: ',', + groupSeparator: '.', + groupSize: 3, + secondaryGroupSize: 2 + } +}); + +x.toFormat(6); + +x = new BigNumber(1.75); +x.toFraction(); + +var pi = new BigNumber('3.14159265358'); +pi.toFraction(); +pi.toFraction(100000); +pi.toFraction(10000); +pi.toFraction(100); +pi.toFraction(10); +pi.toFraction(1); + +x = new BigNumber('177.7e+457'); +y = new BigNumber(235.4325); +z = new BigNumber('0.0098074'); + +var str = JSON.stringify([x, y, z]); + +JSON.parse(str, (key, val) => key === '' ? val : new BigNumber(val)); + +x = new BigNumber(456.789); +x.toNumber(); +{ +x; } + +y = new BigNumber('45987349857634085409857349856430985'); +y.toNumber(); + +z = new BigNumber(-0); +1 / +z; +1 / z.toNumber(); + +x = new BigNumber(0.7); +x.toPower(2); +BigNumber(3).pow(-2); + +y = new BigNumber(45.6); +x.toPrecision(); +y.toPrecision(); +x.toPrecision(1); +y.toPrecision(1); +y.toPrecision(2, 0); +y.toPrecision(2, 1); +x.toPrecision(5); +y.toPrecision(5); + +x = new BigNumber(750000); +x.toString(); +BigNumber.config({ EXPONENTIAL_AT: 5 }); +x.toString(); + +y = new BigNumber(362.875); +y.toString(2); +y.toString(9); +y.toString(32); + +BigNumber.config({ DECIMAL_PLACES: 4 }); +z = new BigNumber('1.23456789'); +z.toString(); +z.toString(10); + +x = new BigNumber(123.456); +x.truncated(); +y = new BigNumber(-12.3); +y.trunc(); + +x = new BigNumber('-0'); +x.toString(); +x.valueOf(); +y = new BigNumber('1.777e+457'); +y.valueOf(); + +x = new BigNumber(0.123); +x.toExponential(); +x.c; +x.e; +x.s; + +z = new BigNumber('-123.4567000e+2'); +z.toExponential(); +z.c; +z.e; +z.s; + +x = new BigNumber(3); +x instanceof BigNumber; +x.isBigNumber; + +BN = BigNumber.another(); + +y = new BN(3); +y instanceof BigNumber; +y.isBigNumber; + +y = new BigNumber(-0); +y.c; +y.e; +y.s; + +try { + // ... +} catch (e) { + if (e instanceof Error && e.name === 'BigNumber Error') { + // ... + } +} + +x = new BigNumber("1.0"); +y = new BigNumber("1.1000"); +z = x.add(y); + +x = new BigNumber("1.20"); +y = new BigNumber("3.45000"); +z = x.mul(y); diff --git a/bignumber.js/index.d.ts b/types/bignumber.js/index.d.ts similarity index 94% rename from bignumber.js/index.d.ts rename to types/bignumber.js/index.d.ts index d94be507c7..10423b1ed3 100644 --- a/bignumber.js/index.d.ts +++ b/types/bignumber.js/index.d.ts @@ -10,9 +10,7 @@ export as namespace BigNumber; export = BigNumber; declare namespace BigNumber { - interface FormatConfig { - /** * The decimal separator. */ @@ -45,9 +43,8 @@ declare namespace BigNumber { } interface BigNumberConfig { - /** - * The maximum number of decimal places of the results of operations involving division, + * The maximum number of decimal places of the results of operations involving division, * i.e. division, square root and base conversion operations, and power operations with negative exponents. */ DECIMAL_PLACES: number; @@ -59,56 +56,56 @@ declare namespace BigNumber { /** * The exponent value(s) at which `toString` returns exponential notation. - * + * * If a single number is assigned, the value is the exponent magnitude. - * - * If an array of two numbers is assigned then the first number is the negative exponent value at and beneath which exponential notation is used, + * + * If an array of two numbers is assigned then the first number is the negative exponent value at and beneath which exponential notation is used, * and the second number is the positive exponent value at and above which the same. */ EXPONENTIAL_AT: number | number[]; /** * The exponent value(s) beyond which overflow to `Infinity` and underflow to zero occurs. - * - * If a single number is assigned, it is the maximum exponent magnitude: - * values wth a positive exponent of greater magnitude become `Infinity` + * + * If a single number is assigned, it is the maximum exponent magnitude: + * values wth a positive exponent of greater magnitude become `Infinity` * and those with a negative exponent of greater magnitude become zero. - * + * * If an array of two numbers is assigned then the first number is the negative exponent limit and the second number is the positive exponent limit. */ RANGE: number | number[]; /** * The value that determines whether BigNumber Errors are thrown. - * + * * If `ERRORS` is false, no errors will be thrown. */ ERRORS: boolean | 0 | 1; /** * The value that determines whether cryptographically-secure pseudo-random number generation is used. - * - * If `CRYPTO` is set to `true` then the `random` method will generate random digits using `crypto.getRandomValues` in browsers that support it, + * + * If `CRYPTO` is set to `true` then the `random` method will generate random digits using `crypto.getRandomValues` in browsers that support it, * or `crypto.randomBytes` if using a version of Node.js that supports it. - * + * * If neither function is supported by the host environment then attempting to set `CRYPTO` to `true` will fail, and if `ERRORS` is `true` an exception will be thrown. - * + * * If `CRYPTO` is `false` then the source of randomness used will be `Math.random` (which is assumed to generate at least `30` bits of randomness). */ CRYPTO: boolean | 0 | 1; /** * The modulo mode used when calculating the modulus: `a mod n`. - * + * * The quotient, `q = a / n`, is calculated according to the `ROUNDING_MODE` that corresponds to the chosen `MODULO_MODE`. - * + * * The remainder, `r`, is calculated as: `r = a - n * q`. */ MODULO_MODE: ModuloMode; /** * The maximum number of significant digits of the result of the power operation (unless a modulus is specified). - * + * * If set to `0`, the number of signifcant digits will not be limited. */ POW_PRECISION: number; @@ -116,15 +113,14 @@ declare namespace BigNumber { /** * The `FORMAT` object configures the format of the string returned by the toFormat method. */ - FORMAT: Partial + FORMAT: Partial; } type NumberLike = number | string | BigNumber; - type RoundingMode = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 - type ModuloMode = RoundingMode | 9 + type RoundingMode = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8; + type ModuloMode = RoundingMode | 9; interface BigNumberStatic { - /** * Returns a new instance of a BigNumber object. */ @@ -142,7 +138,7 @@ declare namespace BigNumber { /** * Configures the settings for this particular BigNumber constructor. - * + * */ config(obj?: Partial): BigNumberConfig; @@ -201,17 +197,17 @@ declare namespace BigNumber { /** * Returns a new BigNumber with a pseudo-random value equal to or greater than `0` and less than `1`. - * + * * The return value will have `dp` decimal places (or less if trailing zeros are produced). * If `dp` is omitted then the number of decimal places will default to the current `DECIMAL_PLACES` setting. - * - * Depending on the value of this BigNumber constructor's `CRYPTO` setting and the support for the `crypto` object in the host environment, - * the random digits of the return value are generated by either - * `Math.random` (fastest), - * `crypto.getRandomValues` (Web Cryptography API in recent browsers) + * + * Depending on the value of this BigNumber constructor's `CRYPTO` setting and the support for the `crypto` object in the host environment, + * the random digits of the return value are generated by either + * `Math.random` (fastest), + * `crypto.getRandomValues` (Web Cryptography API in recent browsers) * or `crypto.randomBytes` (Node.js). - * - * If `CRYPTO` is `true`, i.e. one of the `crypto` methods is to be used, + * + * If `CRYPTO` is `true`, i.e. one of the `crypto` methods is to be used, * the value of a returned BigNumber should be cryptographically-secure and statistically indistinguishable from a random value. */ random(dp?: number): BigNumber; @@ -267,15 +263,14 @@ declare namespace BigNumber { ROUND_HALF_FLOOR: 8; /** - * The remainder is always positive. - * + * The remainder is always positive. + * * Euclidian division: `q = sign(n) * floor(a / abs(n))` */ EUCLID: 9; } interface BigNumber { - /** * Returns a BigNumber whose value is the absolute value, i.e. the magnitude, of the value of this BigNumber. */ @@ -293,26 +288,26 @@ declare namespace BigNumber { /** * Returns - * + * * `1` if the value of this BigNumber is greater than the value of `n` - * + * * `-1` if the value of this BigNumber is less than the value of `n` - * + * * `0` if this BigNumber and `n` have the same value - * + * * `null` if the value of either this BigNumber or `n` is `NaN` */ comparedTo(n: NumberLike, base?: number): 1 | -1 | 0 | null; /** * Returns - * + * * `1` if the value of this BigNumber is greater than the value of `n` - * + * * `-1` if the value of this BigNumber is less than the value of `n` - * + * * `0` if this BigNumber and `n` have the same value - * + * * `null` if the value of either this BigNumber or `n` is `NaN` */ cmp(n: NumberLike, base?: number): 1 | -1 | 0 | null; @@ -348,15 +343,15 @@ declare namespace BigNumber { divToInt(n: NumberLike, base?: number): BigNumber; /** - * Returns `true` if the value of this BigNumber equals the value of `n`, otherwise returns `false`. - * + * Returns `true` if the value of this BigNumber equals the value of `n`, otherwise returns `false`. + * * As with JavaScript, `NaN` does not equal `NaN`. */ equals(n: NumberLike, base?: number): boolean; /** - * Returns `true` if the value of this BigNumber equals the value of `n`, otherwise returns `false`. - * + * Returns `true` if the value of this BigNumber equals the value of `n`, otherwise returns `false`. + * * As with JavaScript, `NaN` does not equal `NaN`. */ eq(n: NumberLike, base?: number): boolean; @@ -388,7 +383,7 @@ declare namespace BigNumber { /** * Returns `true` if the value of this BigNumber is a finite number, otherwise returns `false`. - * + * * The only possible non-finite values of a BigNumber are `NaN`, `Infinity` and `-Infinity`. */ isFinite(): boolean; @@ -434,12 +429,12 @@ declare namespace BigNumber { lt(n: NumberLike, base?: number): boolean; /** - * Returns `true` if the value of this BigNumber is less than or equal to the value of `n`, otherwise returns + * Returns `true` if the value of this BigNumber is less than or equal to the value of `n`, otherwise returns */ lessThanOrEqualTo(n: NumberLike, base?: number): boolean; /** - * Returns `true` if the value of this BigNumber is less than or equal to the value of `n`, otherwise returns + * Returns `true` if the value of this BigNumber is less than or equal to the value of `n`, otherwise returns */ lte(n: NumberLike, base?: number): boolean; @@ -455,18 +450,18 @@ declare namespace BigNumber { /** * Returns a BigNumber whose value is the value of this BigNumber modulo `n`, i.e. the integer remainder of dividing this BigNumber by `n`. - * - * The value returned, and in particular its sign, is dependent on the value of the `MODULO_MODE` setting of this BigNumber constructor. - * If it is `1` (default value), the result will have the same sign as this BigNumber, + * + * The value returned, and in particular its sign, is dependent on the value of the `MODULO_MODE` setting of this BigNumber constructor. + * If it is `1` (default value), the result will have the same sign as this BigNumber, * and it will match that of Javascript's `%` operator (within the limits of double precision) and BigDecimal's `remainder` method. */ modulo(n: NumberLike, base?: number): BigNumber; /** * Returns a BigNumber whose value is the value of this BigNumber modulo `n`, i.e. the integer remainder of dividing this BigNumber by `n`. - * - * The value returned, and in particular its sign, is dependent on the value of the `MODULO_MODE` setting of this BigNumber constructor. - * If it is `1` (default value), the result will have the same sign as this BigNumber, + * + * The value returned, and in particular its sign, is dependent on the value of the `MODULO_MODE` setting of this BigNumber constructor. + * If it is `1` (default value), the result will have the same sign as this BigNumber, * and it will match that of Javascript's `%` operator (within the limits of double precision) and BigDecimal's `remainder` method. */ mod(n: NumberLike, base?: number): BigNumber; @@ -493,44 +488,44 @@ declare namespace BigNumber { /** * Returns the number of significant digits of the value of this BigNumber. - * + * * If `z` is `true` or `1` then any trailing zeros of the integer part of a number are counted as significant digits, otherwise they are not. */ precision(z?: boolean | 0 | 1): number; /** * Returns the number of significant digits of the value of this BigNumber. - * + * * If `z` is `true` or `1` then any trailing zeros of the integer part of a number are counted as significant digits, otherwise they are not. */ sd(z?: boolean | 0 | 1): number; /** * Returns a BigNumber whose value is the value of this BigNumber rounded by rounding mode `rm` to a maximum of `dp` decimal places. - * + * * If `dp` is omitted, or is `null` or `undefined`, the return value is `n` rounded to a whole number. - * + * * If `rm` is omitted, or is `null` or `undefined`, `ROUNDING_MODE` is used. */ round(dp?: number, rm?: RoundingMode): BigNumber; /** * Returns a BigNumber whose value is the value of this BigNumber shifted `n` places. - * + * * The shift is of the decimal point, i.e. of powers of ten, and is to the left if `n` is negative or to the right if `n` is positive. */ shift(n: number): BigNumber; /** * Returns a BigNumber whose value is the square root of the value of this BigNumber, rounded according to the current `DECIMAL_PLACES` and `ROUNDING_MODE` configuration. - * + * * The return value will be correctly rounded, i.e. rounded as if the result was first calculated to an infinite number of correct digits before rounding. */ squareRoot(): BigNumber; /** * Returns a BigNumber whose value is the square root of the value of this BigNumber, rounded according to the current `DECIMAL_PLACES` and `ROUNDING_MODE` configuration. - * + * * The return value will be correctly rounded, i.e. rounded as if the result was first calculated to an infinite number of correct digits before rounding. */ sqrt(): BigNumber; @@ -547,36 +542,36 @@ declare namespace BigNumber { /** * Returns a BigNumber whose value is the value of this BigNumber rounded to `sd` significant digits using rounding mode `rm`. - * + * * If `sd` is omitted or is `null` or `undefined`, the return value will not be rounded. - * + * * If `rm` is omitted or is `null` or `undefined`, ROUNDING_MODE will be used. */ toDigits(sd?: number, rm?: RoundingMode): BigNumber; /** - * Returns a string representing the value of this BigNumber in exponential notation rounded using rounding mode `rm` to `dp` decimal places, + * Returns a string representing the value of this BigNumber in exponential notation rounded using rounding mode `rm` to `dp` decimal places, * i.e with one digit before the decimal point and `dp` digits after it. - * + * * If the value of this BigNumber in exponential notation has fewer than `dp` fraction digits, the return value will be appended with zeros accordingly. - * + * * If `dp` is omitted, or is `null` or `undefined`, the number of digits after the decimal point defaults to the minimum number of digits necessary to represent the value exactly. - * + * * If `rm` is omitted or is `null` or `undefined`, `ROUNDING_MODE` is used. */ toExponential(dp?: number, rm?: RoundingMode): string; /** * Returns a string representing the value of this BigNumber in normal (fixed-point) notation rounded to `dp` decimal places using rounding mode `rm`. - * + * * If the value of this BigNumber in normal notation has fewer than `dp` fraction digits, the return value will be appended with zeros accordingly. - * + * * Unlike `Number.prototype.toFixed`, which returns exponential notation if a number is greater or equal to `10e21`, this method will always return normal notation. - * - * If `dp` is omitted or is `null` or `undefined`, the return value will be unrounded and in normal notation. + * + * If `dp` is omitted or is `null` or `undefined`, the return value will be unrounded and in normal notation. * This is also unlike `Number.prototype.toFixed`, which returns the value to zero decimal places. * It is useful when fixed-point notation is required and the current `EXPONENTIAL_AT` setting causes `toString` to return exponential notation. - * + * * If `rm` is omitted or is `null` or `undefined`, `ROUNDING_MODE` is used. */ toFixed(dp?: number, rm?: RoundingMode): string; @@ -584,17 +579,17 @@ declare namespace BigNumber { /** * Returns a string representing the value of this BigNumber in normal (fixed-point) notation rounded to `dp` decimal places using rounding mode `rm`, * and formatted according to the properties of the `FORMAT` object. - * + * * If `dp` is omitted or is `null` or `undefined`, then the return value is not rounded to a fixed number of decimal places. - * + * * If `rm` is omitted or is `null` or `undefined`, `ROUNDING_MODE` is used. */ toFormat(dp?: number, rm?: RoundingMode): string; /** - * Returns a string array representing the value of this BigNumber as a simple fraction with an integer numerator and an integer denominator. + * Returns a string array representing the value of this BigNumber as a simple fraction with an integer numerator and an integer denominator. * The denominator will be a positive non-zero value less than or equal to `max`. - * + * * If a maximum denominator, `max`, is not specified, or is `null` or `undefined`, the denominator will be the lowest value necessary to represent the number exactly. */ toFraction(max?: NumberLike): [string, string]; @@ -606,32 +601,32 @@ declare namespace BigNumber { /** * Returns the value of this BigNumber as a JavaScript number primitive. - * + * * Type coercion with, for example, the unary plus operator will also work, except that a BigNumber with the value minus zero will be converted to positive zero. */ toNumber(): number; /** * Returns a BigNumber whose value is the value of this BigNumber raised to the power `n`, and optionally modulo a modulus `m`. - * + * * If `n` is negative the result is rounded according to the current `DECIMAL_PLACES` and `ROUNDING_MODE` configuration. */ toPower(n: number, m?: NumberLike): BigNumber; /** * Returns a BigNumber whose value is the value of this BigNumber raised to the power `n`, and optionally modulo a modulus `m`. - * + * * If `n` is negative the result is rounded according to the current `DECIMAL_PLACES` and `ROUNDING_MODE` configuration. */ pow(n: number, m?: NumberLike): BigNumber; /** * Returns a string representing the value of this BigNumber rounded to `sd` significant digits using rounding mode `rm`. - * + * * If `sd` is less than the number of digits necessary to represent the integer part of the value in normal (fixed-point) notation, then exponential notation is used. - * + * * If `sd` is omitted, or is `null` or `undefined`, then the return value is the same as `n.toString()`. - * + * * If `rm` is omitted or is `null` or `undefined`, `ROUNDING_MODE` is used. */ toPrecision(sd?: number, rm?: RoundingMode): string; diff --git a/bignumber.js/tsconfig.json b/types/bignumber.js/tsconfig.json similarity index 100% rename from bignumber.js/tsconfig.json rename to types/bignumber.js/tsconfig.json diff --git a/bignumber.js/tslint.json b/types/bignumber.js/tslint.json similarity index 100% rename from bignumber.js/tslint.json rename to types/bignumber.js/tslint.json diff --git a/bigscreen/bigscreen-tests.ts b/types/bigscreen/bigscreen-tests.ts similarity index 100% rename from bigscreen/bigscreen-tests.ts rename to types/bigscreen/bigscreen-tests.ts diff --git a/bigscreen/index.d.ts b/types/bigscreen/index.d.ts similarity index 100% rename from bigscreen/index.d.ts rename to types/bigscreen/index.d.ts diff --git a/bigscreen/tsconfig.json b/types/bigscreen/tsconfig.json similarity index 100% rename from bigscreen/tsconfig.json rename to types/bigscreen/tsconfig.json diff --git a/bind-ponyfill/bind-ponyfill-tests.ts b/types/bind-ponyfill/bind-ponyfill-tests.ts similarity index 100% rename from bind-ponyfill/bind-ponyfill-tests.ts rename to types/bind-ponyfill/bind-ponyfill-tests.ts diff --git a/bind-ponyfill/index.d.ts b/types/bind-ponyfill/index.d.ts similarity index 100% rename from bind-ponyfill/index.d.ts rename to types/bind-ponyfill/index.d.ts diff --git a/bind-ponyfill/tsconfig.json b/types/bind-ponyfill/tsconfig.json similarity index 100% rename from bind-ponyfill/tsconfig.json rename to types/bind-ponyfill/tsconfig.json diff --git a/bingmaps/Microsoft.Maps.AdvancedShapes.d.ts b/types/bingmaps/Microsoft.Maps.AdvancedShapes.d.ts similarity index 100% rename from bingmaps/Microsoft.Maps.AdvancedShapes.d.ts rename to types/bingmaps/Microsoft.Maps.AdvancedShapes.d.ts diff --git a/bingmaps/Microsoft.Maps.Directions.d.ts b/types/bingmaps/Microsoft.Maps.Directions.d.ts similarity index 100% rename from bingmaps/Microsoft.Maps.Directions.d.ts rename to types/bingmaps/Microsoft.Maps.Directions.d.ts diff --git a/bingmaps/Microsoft.Maps.Search.d.ts b/types/bingmaps/Microsoft.Maps.Search.d.ts similarity index 100% rename from bingmaps/Microsoft.Maps.Search.d.ts rename to types/bingmaps/Microsoft.Maps.Search.d.ts diff --git a/bingmaps/Microsoft.Maps.Themes.BingTheme.d.ts b/types/bingmaps/Microsoft.Maps.Themes.BingTheme.d.ts similarity index 100% rename from bingmaps/Microsoft.Maps.Themes.BingTheme.d.ts rename to types/bingmaps/Microsoft.Maps.Themes.BingTheme.d.ts diff --git a/bingmaps/Microsoft.Maps.Traffic.d.ts b/types/bingmaps/Microsoft.Maps.Traffic.d.ts similarity index 100% rename from bingmaps/Microsoft.Maps.Traffic.d.ts rename to types/bingmaps/Microsoft.Maps.Traffic.d.ts diff --git a/bingmaps/Microsoft.Maps.VenueMaps.d.ts b/types/bingmaps/Microsoft.Maps.VenueMaps.d.ts similarity index 100% rename from bingmaps/Microsoft.Maps.VenueMaps.d.ts rename to types/bingmaps/Microsoft.Maps.VenueMaps.d.ts diff --git a/bingmaps/UNUSED_FILES.txt b/types/bingmaps/UNUSED_FILES.txt similarity index 100% rename from bingmaps/UNUSED_FILES.txt rename to types/bingmaps/UNUSED_FILES.txt diff --git a/bingmaps/bingmaps-tests.ts b/types/bingmaps/bingmaps-tests.ts similarity index 100% rename from bingmaps/bingmaps-tests.ts rename to types/bingmaps/bingmaps-tests.ts diff --git a/bingmaps/index.d.ts b/types/bingmaps/index.d.ts similarity index 100% rename from bingmaps/index.d.ts rename to types/bingmaps/index.d.ts diff --git a/bingmaps/tsconfig.json b/types/bingmaps/tsconfig.json similarity index 100% rename from bingmaps/tsconfig.json rename to types/bingmaps/tsconfig.json diff --git a/bintrees/bintrees-tests.ts b/types/bintrees/bintrees-tests.ts similarity index 100% rename from bintrees/bintrees-tests.ts rename to types/bintrees/bintrees-tests.ts diff --git a/bintrees/index.d.ts b/types/bintrees/index.d.ts similarity index 100% rename from bintrees/index.d.ts rename to types/bintrees/index.d.ts diff --git a/bintrees/tsconfig.json b/types/bintrees/tsconfig.json similarity index 100% rename from bintrees/tsconfig.json rename to types/bintrees/tsconfig.json diff --git a/bip21/bip21-tests.ts b/types/bip21/bip21-tests.ts similarity index 100% rename from bip21/bip21-tests.ts rename to types/bip21/bip21-tests.ts diff --git a/bip21/index.d.ts b/types/bip21/index.d.ts similarity index 100% rename from bip21/index.d.ts rename to types/bip21/index.d.ts diff --git a/bip21/tsconfig.json b/types/bip21/tsconfig.json similarity index 100% rename from bip21/tsconfig.json rename to types/bip21/tsconfig.json diff --git a/bit-array/bit-array-tests.ts b/types/bit-array/bit-array-tests.ts similarity index 100% rename from bit-array/bit-array-tests.ts rename to types/bit-array/bit-array-tests.ts diff --git a/bit-array/index.d.ts b/types/bit-array/index.d.ts similarity index 100% rename from bit-array/index.d.ts rename to types/bit-array/index.d.ts diff --git a/bit-array/tsconfig.json b/types/bit-array/tsconfig.json similarity index 100% rename from bit-array/tsconfig.json rename to types/bit-array/tsconfig.json diff --git a/bitcoinjs-lib/bitcoinjs-lib-tests.ts b/types/bitcoinjs-lib/bitcoinjs-lib-tests.ts similarity index 100% rename from bitcoinjs-lib/bitcoinjs-lib-tests.ts rename to types/bitcoinjs-lib/bitcoinjs-lib-tests.ts diff --git a/bitcoinjs-lib/index.d.ts b/types/bitcoinjs-lib/index.d.ts similarity index 100% rename from bitcoinjs-lib/index.d.ts rename to types/bitcoinjs-lib/index.d.ts diff --git a/bitcoinjs-lib/tsconfig.json b/types/bitcoinjs-lib/tsconfig.json similarity index 100% rename from bitcoinjs-lib/tsconfig.json rename to types/bitcoinjs-lib/tsconfig.json diff --git a/bitcoinjs-lib/tslint.json b/types/bitcoinjs-lib/tslint.json similarity index 100% rename from bitcoinjs-lib/tslint.json rename to types/bitcoinjs-lib/tslint.json diff --git a/bittorrent-protocol/bittorrent-protocol-tests.ts b/types/bittorrent-protocol/bittorrent-protocol-tests.ts similarity index 78% rename from bittorrent-protocol/bittorrent-protocol-tests.ts rename to types/bittorrent-protocol/bittorrent-protocol-tests.ts index 1d0d17793a..f5f6b4649f 100644 --- a/bittorrent-protocol/bittorrent-protocol-tests.ts +++ b/types/bittorrent-protocol/bittorrent-protocol-tests.ts @@ -1,9 +1,16 @@ import * as Protocol from 'bittorrent-protocol'; import * as net from 'net'; +class TestExtension implements Protocol.Extension { + constructor(protected wire: Protocol.Wire) { } + name = 'extname'; +} + net.createServer(socket => { var wire = new Protocol(); + wire.use(TestExtension); + // pipe to and from the protocol socket.pipe(wire).pipe(socket); diff --git a/bittorrent-protocol/index.d.ts b/types/bittorrent-protocol/index.d.ts similarity index 83% rename from bittorrent-protocol/index.d.ts rename to types/bittorrent-protocol/index.d.ts index be1a60b179..6d838a90f5 100644 --- a/bittorrent-protocol/index.d.ts +++ b/types/bittorrent-protocol/index.d.ts @@ -1,6 +1,6 @@ -// Type definitions for bittorrent-protocol 2.1 +// Type definitions for bittorrent-protocol 2.2 // Project: https://github.com/feross/bittorrent-protocol#readme -// Definitions by: Tomasz Łaziuk +// Definitions by: Feross Aboukhadijeh , Tomasz Łaziuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// @@ -15,18 +15,18 @@ declare namespace BittorrentProtocol { (): Wire; } + export interface ExtensionConstructor { + new (wire: Wire): Extension; + } + export interface Extension { - //tslint:disable-next-line:no-misused-new - could use class instead of interface but class is not extendible - constructor(wire: Wire): this; - onHandshake?: () => void; - onExtendedHandshake?: () => void; - onMessage?: () => void; + onHandshake?: (infoHash: string, peerId: string, extensions: { [name: string]: boolean }) => void; + onExtendedHandshake?: (handshake: { [key: string]: any }) => void; + onMessage?: (buf: Buffer) => void; name: string; } export interface Request { - //tslint:disable-next-line:no-misused-new - could use class instead of interface but class is not extendible - constructor(piece: number, offset: number, length: number, callback: () => void): this; piece: number; offset: number; length: number; @@ -52,7 +52,7 @@ declare namespace BittorrentProtocol { destroy(): void; - use(ext: Extension): void; + use(ext: ExtensionConstructor): void; handshake(infoHash: string | Buffer, peerId: string | Buffer, extensions?: any): void; diff --git a/bittorrent-protocol/tsconfig.json b/types/bittorrent-protocol/tsconfig.json similarity index 100% rename from bittorrent-protocol/tsconfig.json rename to types/bittorrent-protocol/tsconfig.json diff --git a/bittorrent-protocol/tslint.json b/types/bittorrent-protocol/tslint.json similarity index 100% rename from bittorrent-protocol/tslint.json rename to types/bittorrent-protocol/tslint.json diff --git a/bitwise-xor/bitwise-xor-tests.ts b/types/bitwise-xor/bitwise-xor-tests.ts similarity index 100% rename from bitwise-xor/bitwise-xor-tests.ts rename to types/bitwise-xor/bitwise-xor-tests.ts diff --git a/bitwise-xor/index.d.ts b/types/bitwise-xor/index.d.ts similarity index 100% rename from bitwise-xor/index.d.ts rename to types/bitwise-xor/index.d.ts diff --git a/bitwise-xor/tsconfig.json b/types/bitwise-xor/tsconfig.json similarity index 100% rename from bitwise-xor/tsconfig.json rename to types/bitwise-xor/tsconfig.json diff --git a/bl/bl-tests.ts b/types/bl/bl-tests.ts similarity index 100% rename from bl/bl-tests.ts rename to types/bl/bl-tests.ts diff --git a/bl/index.d.ts b/types/bl/index.d.ts similarity index 100% rename from bl/index.d.ts rename to types/bl/index.d.ts diff --git a/bl/tsconfig.json b/types/bl/tsconfig.json similarity index 100% rename from bl/tsconfig.json rename to types/bl/tsconfig.json diff --git a/blacklist/blacklist-tests.ts b/types/blacklist/blacklist-tests.ts similarity index 100% rename from blacklist/blacklist-tests.ts rename to types/blacklist/blacklist-tests.ts diff --git a/blacklist/index.d.ts b/types/blacklist/index.d.ts similarity index 100% rename from blacklist/index.d.ts rename to types/blacklist/index.d.ts diff --git a/blacklist/tsconfig.json b/types/blacklist/tsconfig.json similarity index 100% rename from blacklist/tsconfig.json rename to types/blacklist/tsconfig.json diff --git a/blacklist/tslint.json b/types/blacklist/tslint.json similarity index 100% rename from blacklist/tslint.json rename to types/blacklist/tslint.json diff --git a/blazy/blazy-tests.ts b/types/blazy/blazy-tests.ts similarity index 100% rename from blazy/blazy-tests.ts rename to types/blazy/blazy-tests.ts diff --git a/blazy/index.d.ts b/types/blazy/index.d.ts similarity index 100% rename from blazy/index.d.ts rename to types/blazy/index.d.ts diff --git a/blazy/tsconfig.json b/types/blazy/tsconfig.json similarity index 100% rename from blazy/tsconfig.json rename to types/blazy/tsconfig.json diff --git a/blessed/blessed-tests.ts b/types/blessed/blessed-tests.ts similarity index 100% rename from blessed/blessed-tests.ts rename to types/blessed/blessed-tests.ts diff --git a/blessed/index.d.ts b/types/blessed/index.d.ts similarity index 100% rename from blessed/index.d.ts rename to types/blessed/index.d.ts diff --git a/blessed/tsconfig.json b/types/blessed/tsconfig.json similarity index 100% rename from blessed/tsconfig.json rename to types/blessed/tsconfig.json diff --git a/blissfuljs/blissfuljs-tests.ts b/types/blissfuljs/blissfuljs-tests.ts similarity index 100% rename from blissfuljs/blissfuljs-tests.ts rename to types/blissfuljs/blissfuljs-tests.ts diff --git a/blissfuljs/index.d.ts b/types/blissfuljs/index.d.ts similarity index 100% rename from blissfuljs/index.d.ts rename to types/blissfuljs/index.d.ts diff --git a/blissfuljs/tsconfig.json b/types/blissfuljs/tsconfig.json similarity index 100% rename from blissfuljs/tsconfig.json rename to types/blissfuljs/tsconfig.json diff --git a/blob-stream/blob-stream-tests.ts b/types/blob-stream/blob-stream-tests.ts similarity index 100% rename from blob-stream/blob-stream-tests.ts rename to types/blob-stream/blob-stream-tests.ts diff --git a/blob-stream/index.d.ts b/types/blob-stream/index.d.ts similarity index 100% rename from blob-stream/index.d.ts rename to types/blob-stream/index.d.ts diff --git a/blob-stream/tsconfig.json b/types/blob-stream/tsconfig.json similarity index 100% rename from blob-stream/tsconfig.json rename to types/blob-stream/tsconfig.json diff --git a/blocks/blocks-tests.ts b/types/blocks/blocks-tests.ts similarity index 100% rename from blocks/blocks-tests.ts rename to types/blocks/blocks-tests.ts diff --git a/blocks/index.d.ts b/types/blocks/index.d.ts similarity index 100% rename from blocks/index.d.ts rename to types/blocks/index.d.ts diff --git a/blocks/tsconfig.json b/types/blocks/tsconfig.json similarity index 100% rename from blocks/tsconfig.json rename to types/blocks/tsconfig.json diff --git a/types/bloomfilter/bloomfilter-tests.ts b/types/bloomfilter/bloomfilter-tests.ts new file mode 100644 index 0000000000..650cc97eb4 --- /dev/null +++ b/types/bloomfilter/bloomfilter-tests.ts @@ -0,0 +1,11 @@ +import { BloomFilter } from 'bloomfilter'; +function test_bloomfilter() { + const m: number = 10; + const k: number = 2; + + const bloomFilter = new BloomFilter(m, k); + const array: Int32Array[] = bloomFilter.buckets; + const length: number = bloomFilter.buckets.length; + bloomFilter.add('someString'); + const test: boolean = bloomFilter.test('someString'); +} diff --git a/types/bloomfilter/index.d.ts b/types/bloomfilter/index.d.ts new file mode 100644 index 0000000000..00ed408c6d --- /dev/null +++ b/types/bloomfilter/index.d.ts @@ -0,0 +1,14 @@ +// Type definitions for BloomFilter 0.1 +// Project: https://github.com/jasondavies/bloomfilter.js +// Definitions by: slawiko +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export class BloomFilter { + buckets: Int32Array[]; + + constructor(m: number, k: number); + + add(value: any): void; + + test(value: any): boolean; +} diff --git a/types/bloomfilter/tsconfig.json b/types/bloomfilter/tsconfig.json new file mode 100644 index 0000000000..b8bae54b77 --- /dev/null +++ b/types/bloomfilter/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", + "bloomfilter-tests.ts" + ] +} diff --git a/csprng/tslint.json b/types/bloomfilter/tslint.json similarity index 100% rename from csprng/tslint.json rename to types/bloomfilter/tslint.json diff --git a/blue-tape/blue-tape-tests.ts b/types/blue-tape/blue-tape-tests.ts similarity index 100% rename from blue-tape/blue-tape-tests.ts rename to types/blue-tape/blue-tape-tests.ts diff --git a/blue-tape/index.d.ts b/types/blue-tape/index.d.ts similarity index 100% rename from blue-tape/index.d.ts rename to types/blue-tape/index.d.ts diff --git a/blue-tape/tsconfig.json b/types/blue-tape/tsconfig.json similarity index 100% rename from blue-tape/tsconfig.json rename to types/blue-tape/tsconfig.json diff --git a/bluebird-global/bluebird-global-tests.ts b/types/bluebird-global/bluebird-global-tests.ts similarity index 100% rename from bluebird-global/bluebird-global-tests.ts rename to types/bluebird-global/bluebird-global-tests.ts diff --git a/bluebird-global/index.d.ts b/types/bluebird-global/index.d.ts similarity index 100% rename from bluebird-global/index.d.ts rename to types/bluebird-global/index.d.ts diff --git a/bluebird-global/tsconfig.json b/types/bluebird-global/tsconfig.json similarity index 100% rename from bluebird-global/tsconfig.json rename to types/bluebird-global/tsconfig.json diff --git a/bluebird-global/tslint.json b/types/bluebird-global/tslint.json similarity index 100% rename from bluebird-global/tslint.json rename to types/bluebird-global/tslint.json diff --git a/bluebird-retry/bluebird-retry-tests.ts b/types/bluebird-retry/bluebird-retry-tests.ts similarity index 100% rename from bluebird-retry/bluebird-retry-tests.ts rename to types/bluebird-retry/bluebird-retry-tests.ts diff --git a/bluebird-retry/index.d.ts b/types/bluebird-retry/index.d.ts similarity index 100% rename from bluebird-retry/index.d.ts rename to types/bluebird-retry/index.d.ts diff --git a/bluebird-retry/tsconfig.json b/types/bluebird-retry/tsconfig.json similarity index 100% rename from bluebird-retry/tsconfig.json rename to types/bluebird-retry/tsconfig.json diff --git a/bluebird/bluebird-tests.ts b/types/bluebird/bluebird-tests.ts similarity index 100% rename from bluebird/bluebird-tests.ts rename to types/bluebird/bluebird-tests.ts diff --git a/bluebird/index.d.ts b/types/bluebird/index.d.ts similarity index 98% rename from bluebird/index.d.ts rename to types/bluebird/index.d.ts index 3508a4e742..e9a79d8834 100644 --- a/bluebird/index.d.ts +++ b/types/bluebird/index.d.ts @@ -533,11 +533,11 @@ declare class Bluebird implements Bluebird.Thenable, Bluebird.Inspection(arg1: A1 | Bluebird.Thenable, handler: (arg1?: A1) => R | Bluebird.Thenable): Bluebird; - static join(arg1: A1 | Bluebird.Thenable, arg2: A2 | Bluebird.Thenable, handler: (arg1?: A1, arg2?: A2) => R | Bluebird.Thenable): Bluebird; - static join(arg1: A1 | Bluebird.Thenable, arg2: A2 | Bluebird.Thenable, arg3: A3 | Bluebird.Thenable, handler: (arg1?: A1, arg2?: A2, arg3?: A3) => R | Bluebird.Thenable): Bluebird; - static join(arg1: A1 | Bluebird.Thenable, arg2: A2 | Bluebird.Thenable, arg3: A3 | Bluebird.Thenable, arg4: A4 | Bluebird.Thenable, handler: (arg1?: A1, arg2?: A2, arg3?: A3, arg4?: A4) => R | Bluebird.Thenable): Bluebird; - static join(arg1: A1 | Bluebird.Thenable, arg2: A2 | Bluebird.Thenable, arg3: A3 | Bluebird.Thenable, arg4: A4 | Bluebird.Thenable, arg5: A5 | Bluebird.Thenable, handler: (arg1?: A1, arg2?: A2, arg3?: A3, arg4?: A4, arg5?: A5) => R | Bluebird.Thenable): Bluebird; + static join(arg1: A1 | Bluebird.Thenable, handler: (arg1: A1) => R | Bluebird.Thenable): Bluebird; + static join(arg1: A1 | Bluebird.Thenable, arg2: A2 | Bluebird.Thenable, handler: (arg1: A1, arg2: A2) => R | Bluebird.Thenable): Bluebird; + static join(arg1: A1 | Bluebird.Thenable, arg2: A2 | Bluebird.Thenable, arg3: A3 | Bluebird.Thenable, handler: (arg1: A1, arg2: A2, arg3: A3) => R | Bluebird.Thenable): Bluebird; + static join(arg1: A1 | Bluebird.Thenable, arg2: A2 | Bluebird.Thenable, arg3: A3 | Bluebird.Thenable, arg4: A4 | Bluebird.Thenable, handler: (arg1: A1, arg2: A2, arg3: A3, arg4: A4) => R | Bluebird.Thenable): Bluebird; + static join(arg1: A1 | Bluebird.Thenable, arg2: A2 | Bluebird.Thenable, arg3: A3 | Bluebird.Thenable, arg4: A4 | Bluebird.Thenable, arg5: A5 | Bluebird.Thenable, handler: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5) => R | Bluebird.Thenable): Bluebird; // variadic array /** @deprecated use .all instead */ diff --git a/bluebird/tsconfig.json b/types/bluebird/tsconfig.json similarity index 100% rename from bluebird/tsconfig.json rename to types/bluebird/tsconfig.json diff --git a/bluebird/v1/bluebird-tests.ts b/types/bluebird/v1/bluebird-tests.ts similarity index 100% rename from bluebird/v1/bluebird-tests.ts rename to types/bluebird/v1/bluebird-tests.ts diff --git a/bluebird/v1/index.d.ts b/types/bluebird/v1/index.d.ts similarity index 100% rename from bluebird/v1/index.d.ts rename to types/bluebird/v1/index.d.ts diff --git a/bluebird/v1/tsconfig.json b/types/bluebird/v1/tsconfig.json similarity index 100% rename from bluebird/v1/tsconfig.json rename to types/bluebird/v1/tsconfig.json diff --git a/bluebird/v2/bluebird-tests.ts b/types/bluebird/v2/bluebird-tests.ts similarity index 100% rename from bluebird/v2/bluebird-tests.ts rename to types/bluebird/v2/bluebird-tests.ts diff --git a/bluebird/v2/index.d.ts b/types/bluebird/v2/index.d.ts similarity index 100% rename from bluebird/v2/index.d.ts rename to types/bluebird/v2/index.d.ts diff --git a/bluebird/v2/tsconfig.json b/types/bluebird/v2/tsconfig.json similarity index 100% rename from bluebird/v2/tsconfig.json rename to types/bluebird/v2/tsconfig.json diff --git a/types/blueimp-md5/blueimp-md5-tests.ts b/types/blueimp-md5/blueimp-md5-tests.ts new file mode 100644 index 0000000000..0b59ae2f24 --- /dev/null +++ b/types/blueimp-md5/blueimp-md5-tests.ts @@ -0,0 +1,5 @@ +import md5 = require("blueimp-md5"); + +function hash1(): string { + return md5('hello world'); +} diff --git a/types/blueimp-md5/index.d.ts b/types/blueimp-md5/index.d.ts new file mode 100644 index 0000000000..881d5c7afe --- /dev/null +++ b/types/blueimp-md5/index.d.ts @@ -0,0 +1,7 @@ +// Type definitions for blueimp-md5 v2.7.0 +// Project: https://github.com/blueimp/JavaScript-MD5 +// Definitions by: Ray Martone , Mikael Kohlmyr +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare function md5(value: string, key?: string, raw?: boolean): string; +export = md5; diff --git a/blueimp-md5/tsconfig.json b/types/blueimp-md5/tsconfig.json similarity index 100% rename from blueimp-md5/tsconfig.json rename to types/blueimp-md5/tsconfig.json diff --git a/body-parser/body-parser-tests.ts b/types/body-parser/body-parser-tests.ts similarity index 100% rename from body-parser/body-parser-tests.ts rename to types/body-parser/body-parser-tests.ts diff --git a/body-parser/index.d.ts b/types/body-parser/index.d.ts similarity index 69% rename from body-parser/index.d.ts rename to types/body-parser/index.d.ts index c0ce775bb0..2b17b20ed4 100644 --- a/body-parser/index.d.ts +++ b/types/body-parser/index.d.ts @@ -13,36 +13,34 @@ import { Request, RequestHandler, Response } from 'express'; declare function bodyParser(options?: bodyParser.OptionsJson & bodyParser.OptionsText & bodyParser.OptionsUrlencoded): RequestHandler; declare namespace bodyParser { - - export interface Options { + 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; } - export interface OptionsJson extends Options { + interface OptionsJson extends Options { reviever?: (key: string, value: any) => any; strict?: boolean; } - export interface OptionsText extends Options { + interface OptionsText extends Options { defaultCharset?: string; } - export interface OptionsUrlencoded extends Options { + interface OptionsUrlencoded extends Options { extended?: boolean; parameterLimit?: number; } - export function json(options?: OptionsJson): RequestHandler; + function json(options?: OptionsJson): RequestHandler; - export function raw(options?: Options): RequestHandler; + function raw(options?: Options): RequestHandler; - export function text(options?: OptionsText): RequestHandler; - - export function urlencoded(options?: OptionsUrlencoded): RequestHandler; + function text(options?: OptionsText): RequestHandler; + function urlencoded(options?: OptionsUrlencoded): RequestHandler; } export = bodyParser; diff --git a/body-parser/tsconfig.json b/types/body-parser/tsconfig.json similarity index 100% rename from body-parser/tsconfig.json rename to types/body-parser/tsconfig.json diff --git a/body-parser/tslint.json b/types/body-parser/tslint.json similarity index 100% rename from body-parser/tslint.json rename to types/body-parser/tslint.json diff --git a/bonjour/bonjour-tests.ts b/types/bonjour/bonjour-tests.ts similarity index 100% rename from bonjour/bonjour-tests.ts rename to types/bonjour/bonjour-tests.ts diff --git a/bonjour/index.d.ts b/types/bonjour/index.d.ts similarity index 100% rename from bonjour/index.d.ts rename to types/bonjour/index.d.ts diff --git a/bonjour/tsconfig.json b/types/bonjour/tsconfig.json similarity index 100% rename from bonjour/tsconfig.json rename to types/bonjour/tsconfig.json diff --git a/bookshelf/bookshelf-tests.ts b/types/bookshelf/bookshelf-tests.ts similarity index 100% rename from bookshelf/bookshelf-tests.ts rename to types/bookshelf/bookshelf-tests.ts diff --git a/bookshelf/index.d.ts b/types/bookshelf/index.d.ts similarity index 99% rename from bookshelf/index.d.ts rename to types/bookshelf/index.d.ts index c7947579c8..398534806d 100644 --- a/bookshelf/index.d.ts +++ b/types/bookshelf/index.d.ts @@ -2,7 +2,7 @@ // Project: http://bookshelfjs.org/ // Definitions by: Andrew Schurman // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.1 +// TypeScript Version: 2.2 import Knex = require('knex'); import knex = require('knex'); diff --git a/bookshelf/tsconfig.json b/types/bookshelf/tsconfig.json similarity index 100% rename from bookshelf/tsconfig.json rename to types/bookshelf/tsconfig.json diff --git a/boolify-string/boolify-string-tests.ts b/types/boolify-string/boolify-string-tests.ts similarity index 100% rename from boolify-string/boolify-string-tests.ts rename to types/boolify-string/boolify-string-tests.ts diff --git a/boolify-string/index.d.ts b/types/boolify-string/index.d.ts similarity index 100% rename from boolify-string/index.d.ts rename to types/boolify-string/index.d.ts diff --git a/boolify-string/tsconfig.json b/types/boolify-string/tsconfig.json similarity index 100% rename from boolify-string/tsconfig.json rename to types/boolify-string/tsconfig.json diff --git a/boom/boom-tests.ts b/types/boom/boom-tests.ts similarity index 100% rename from boom/boom-tests.ts rename to types/boom/boom-tests.ts diff --git a/boom/index.d.ts b/types/boom/index.d.ts similarity index 100% rename from boom/index.d.ts rename to types/boom/index.d.ts diff --git a/boom/tsconfig.json b/types/boom/tsconfig.json similarity index 100% rename from boom/tsconfig.json rename to types/boom/tsconfig.json diff --git a/bootbox/bootbox-tests.ts b/types/bootbox/bootbox-tests.ts similarity index 100% rename from bootbox/bootbox-tests.ts rename to types/bootbox/bootbox-tests.ts diff --git a/bootbox/index.d.ts b/types/bootbox/index.d.ts similarity index 100% rename from bootbox/index.d.ts rename to types/bootbox/index.d.ts diff --git a/bootbox/tsconfig.json b/types/bootbox/tsconfig.json similarity index 100% rename from bootbox/tsconfig.json rename to types/bootbox/tsconfig.json diff --git a/bootpag/bootpag-tests.ts b/types/bootpag/bootpag-tests.ts similarity index 100% rename from bootpag/bootpag-tests.ts rename to types/bootpag/bootpag-tests.ts diff --git a/bootpag/index.d.ts b/types/bootpag/index.d.ts similarity index 100% rename from bootpag/index.d.ts rename to types/bootpag/index.d.ts diff --git a/bootpag/tsconfig.json b/types/bootpag/tsconfig.json similarity index 100% rename from bootpag/tsconfig.json rename to types/bootpag/tsconfig.json diff --git a/bootstrap-datepicker/bootstrap-datepicker-tests.ts b/types/bootstrap-datepicker/bootstrap-datepicker-tests.ts similarity index 100% rename from bootstrap-datepicker/bootstrap-datepicker-tests.ts rename to types/bootstrap-datepicker/bootstrap-datepicker-tests.ts diff --git a/bootstrap-datepicker/index.d.ts b/types/bootstrap-datepicker/index.d.ts similarity index 100% rename from bootstrap-datepicker/index.d.ts rename to types/bootstrap-datepicker/index.d.ts diff --git a/bootstrap-datepicker/tsconfig.json b/types/bootstrap-datepicker/tsconfig.json similarity index 100% rename from bootstrap-datepicker/tsconfig.json rename to types/bootstrap-datepicker/tsconfig.json diff --git a/bootstrap-fileinput/index.d.ts b/types/bootstrap-fileinput/index.d.ts similarity index 100% rename from bootstrap-fileinput/index.d.ts rename to types/bootstrap-fileinput/index.d.ts diff --git a/bootstrap-fileinput/tsconfig.json b/types/bootstrap-fileinput/tsconfig.json similarity index 100% rename from bootstrap-fileinput/tsconfig.json rename to types/bootstrap-fileinput/tsconfig.json diff --git a/bootstrap-maxlength/bootstrap-maxlength-tests.ts b/types/bootstrap-maxlength/bootstrap-maxlength-tests.ts similarity index 100% rename from bootstrap-maxlength/bootstrap-maxlength-tests.ts rename to types/bootstrap-maxlength/bootstrap-maxlength-tests.ts diff --git a/bootstrap-maxlength/index.d.ts b/types/bootstrap-maxlength/index.d.ts similarity index 100% rename from bootstrap-maxlength/index.d.ts rename to types/bootstrap-maxlength/index.d.ts diff --git a/bootstrap-maxlength/tsconfig.json b/types/bootstrap-maxlength/tsconfig.json similarity index 100% rename from bootstrap-maxlength/tsconfig.json rename to types/bootstrap-maxlength/tsconfig.json diff --git a/bootstrap-notify/bootstrap-notify-tests.ts b/types/bootstrap-notify/bootstrap-notify-tests.ts similarity index 100% rename from bootstrap-notify/bootstrap-notify-tests.ts rename to types/bootstrap-notify/bootstrap-notify-tests.ts diff --git a/bootstrap-notify/index.d.ts b/types/bootstrap-notify/index.d.ts similarity index 100% rename from bootstrap-notify/index.d.ts rename to types/bootstrap-notify/index.d.ts diff --git a/bootstrap-notify/tsconfig.json b/types/bootstrap-notify/tsconfig.json similarity index 100% rename from bootstrap-notify/tsconfig.json rename to types/bootstrap-notify/tsconfig.json diff --git a/bootstrap-select/bootstrap-select-tests.ts b/types/bootstrap-select/bootstrap-select-tests.ts similarity index 100% rename from bootstrap-select/bootstrap-select-tests.ts rename to types/bootstrap-select/bootstrap-select-tests.ts diff --git a/bootstrap-select/index.d.ts b/types/bootstrap-select/index.d.ts similarity index 100% rename from bootstrap-select/index.d.ts rename to types/bootstrap-select/index.d.ts diff --git a/bootstrap-select/tsconfig.json b/types/bootstrap-select/tsconfig.json similarity index 100% rename from bootstrap-select/tsconfig.json rename to types/bootstrap-select/tsconfig.json diff --git a/bootstrap-slider/bootstrap-slider-tests.ts b/types/bootstrap-slider/bootstrap-slider-tests.ts similarity index 100% rename from bootstrap-slider/bootstrap-slider-tests.ts rename to types/bootstrap-slider/bootstrap-slider-tests.ts diff --git a/bootstrap-slider/index.d.ts b/types/bootstrap-slider/index.d.ts similarity index 100% rename from bootstrap-slider/index.d.ts rename to types/bootstrap-slider/index.d.ts diff --git a/bootstrap-slider/tsconfig.json b/types/bootstrap-slider/tsconfig.json similarity index 100% rename from bootstrap-slider/tsconfig.json rename to types/bootstrap-slider/tsconfig.json diff --git a/bootstrap-switch/bootstrap-switch-tests.ts b/types/bootstrap-switch/bootstrap-switch-tests.ts similarity index 100% rename from bootstrap-switch/bootstrap-switch-tests.ts rename to types/bootstrap-switch/bootstrap-switch-tests.ts diff --git a/bootstrap-switch/index.d.ts b/types/bootstrap-switch/index.d.ts similarity index 100% rename from bootstrap-switch/index.d.ts rename to types/bootstrap-switch/index.d.ts diff --git a/bootstrap-switch/tsconfig.json b/types/bootstrap-switch/tsconfig.json similarity index 100% rename from bootstrap-switch/tsconfig.json rename to types/bootstrap-switch/tsconfig.json diff --git a/bootstrap-table/bootstrap-table-tests.ts b/types/bootstrap-table/bootstrap-table-tests.ts similarity index 100% rename from bootstrap-table/bootstrap-table-tests.ts rename to types/bootstrap-table/bootstrap-table-tests.ts diff --git a/bootstrap-table/index.d.ts b/types/bootstrap-table/index.d.ts similarity index 100% rename from bootstrap-table/index.d.ts rename to types/bootstrap-table/index.d.ts diff --git a/bootstrap-table/tsconfig.json b/types/bootstrap-table/tsconfig.json similarity index 100% rename from bootstrap-table/tsconfig.json rename to types/bootstrap-table/tsconfig.json diff --git a/bootstrap-touchspin/bootstrap-touchspin-tests.ts b/types/bootstrap-touchspin/bootstrap-touchspin-tests.ts similarity index 100% rename from bootstrap-touchspin/bootstrap-touchspin-tests.ts rename to types/bootstrap-touchspin/bootstrap-touchspin-tests.ts diff --git a/bootstrap-touchspin/index.d.ts b/types/bootstrap-touchspin/index.d.ts similarity index 100% rename from bootstrap-touchspin/index.d.ts rename to types/bootstrap-touchspin/index.d.ts diff --git a/bootstrap-touchspin/tsconfig.json b/types/bootstrap-touchspin/tsconfig.json similarity index 100% rename from bootstrap-touchspin/tsconfig.json rename to types/bootstrap-touchspin/tsconfig.json diff --git a/bootstrap-validator/bootstrap-validator-tests.ts b/types/bootstrap-validator/bootstrap-validator-tests.ts similarity index 100% rename from bootstrap-validator/bootstrap-validator-tests.ts rename to types/bootstrap-validator/bootstrap-validator-tests.ts diff --git a/bootstrap-validator/index.d.ts b/types/bootstrap-validator/index.d.ts similarity index 100% rename from bootstrap-validator/index.d.ts rename to types/bootstrap-validator/index.d.ts diff --git a/bootstrap-validator/tsconfig.json b/types/bootstrap-validator/tsconfig.json similarity index 100% rename from bootstrap-validator/tsconfig.json rename to types/bootstrap-validator/tsconfig.json diff --git a/bootstrap-validator/tslint.json b/types/bootstrap-validator/tslint.json similarity index 100% rename from bootstrap-validator/tslint.json rename to types/bootstrap-validator/tslint.json diff --git a/bootstrap.paginator/index.d.ts b/types/bootstrap.paginator/index.d.ts similarity index 100% rename from bootstrap.paginator/index.d.ts rename to types/bootstrap.paginator/index.d.ts diff --git a/bootstrap.paginator/tsconfig.json b/types/bootstrap.paginator/tsconfig.json similarity index 100% rename from bootstrap.paginator/tsconfig.json rename to types/bootstrap.paginator/tsconfig.json diff --git a/bootstrap.timepicker/index.d.ts b/types/bootstrap.timepicker/index.d.ts similarity index 100% rename from bootstrap.timepicker/index.d.ts rename to types/bootstrap.timepicker/index.d.ts diff --git a/bootstrap.timepicker/tsconfig.json b/types/bootstrap.timepicker/tsconfig.json similarity index 100% rename from bootstrap.timepicker/tsconfig.json rename to types/bootstrap.timepicker/tsconfig.json diff --git a/bootstrap.v3.datetimepicker/bootstrap.v3.datetimepicker-tests.ts b/types/bootstrap.v3.datetimepicker/bootstrap.v3.datetimepicker-tests.ts similarity index 99% rename from bootstrap.v3.datetimepicker/bootstrap.v3.datetimepicker-tests.ts rename to types/bootstrap.v3.datetimepicker/bootstrap.v3.datetimepicker-tests.ts index 575f72b7cb..70c8f8a586 100644 --- a/bootstrap.v3.datetimepicker/bootstrap.v3.datetimepicker-tests.ts +++ b/types/bootstrap.v3.datetimepicker/bootstrap.v3.datetimepicker-tests.ts @@ -116,7 +116,6 @@ function test_timeZone() { strFormats = dp.timeZone() as string; } - function test_widgetParent() { let nullW: null = null; let str: string = "myId"; diff --git a/bootstrap.v3.datetimepicker/index.d.ts b/types/bootstrap.v3.datetimepicker/index.d.ts similarity index 96% rename from bootstrap.v3.datetimepicker/index.d.ts rename to types/bootstrap.v3.datetimepicker/index.d.ts index d8ec008dca..653135057d 100644 --- a/bootstrap.v3.datetimepicker/index.d.ts +++ b/types/bootstrap.v3.datetimepicker/index.d.ts @@ -49,9 +49,9 @@ export interface Datetimepicker { hide(): void; /**Returns the components current options object. * Note that the changing the values of the returned object does not change the components actual configuration. */ - options(): DatetimepickerOptions + options(): DatetimepickerOptions; /**Takes an object variable with option key:value properties and configures the component. Use this to update multiple options on the component. */ - options(options: DatetimepickerOptions): void + options(options: DatetimepickerOptions): void; /**Shows the widget * Emits: * - dp.show - if the widget was hidden before that call @@ -85,14 +85,14 @@ export interface Datetimepicker { /**Returns the options.daysOfWeekDisabled configuration * IMPORTANT! Throws exception if not set explicitly https://github.com/Eonasdan/bootstrap-datetimepicker/issues/1459 */ - daysOfWeekDisabled(): Array; + daysOfWeekDisabled(): number[]; /**Takes an [ Number:0 to 6 ] and disallow the user to select weekdays that exist in this array. * This has lower priority over the options.minDate, options.maxDate, options.disabledDates and options.enabledDates configuration settings. * Emits: * - dp.change - if the currently selected moment falls in the values passed on the daysOfWeek parameter. * - dp.error - if the currently selected moment falls in the values passed on the daysOfWeek parameter. */ - daysOfWeekDisabled(days: Array): void; + daysOfWeekDisabled(days: number[]): void; /**Returns the options.dayViewHeaderFormat option. */ dayViewHeaderFormat(): string; /**Used to customize the header of the day view. */ @@ -117,22 +117,22 @@ export interface Datetimepicker { */ disabledDates(dates: boolean | Array): void; /**Returns the options.disabledHours option. - * NOTES: probably should be: disabledHours(): boolean | Array; see: DatetimepickerOptions + * NOTES: probably should be: disabledHours(): boolean | number[]; see: DatetimepickerOptions */ disabledHours(): boolean | any; /**Must be in 24 hour format. Will disallow hour selections (much like disabledTimeIntervals) but will affect all days. * Like en/disabledDates, the en/disabledHours options are mutually exclusive and will reset one of the options back to false. */ - disabledHours(value: boolean | Array): void; + disabledHours(value: boolean | number[]): void; /**Returns the options.disabledTimeIntervals option, or... not exactly * IMPORTANT! Creates an object from the options.disabledTimeIntervals with the keys being numbers, the values being the moment arrays. * eg { "0": [, ], "1": [...] } * https://github.com/Eonasdan/bootstrap-datetimepicker/issues/1498 */ - disabledTimeIntervals(): boolean | Array>; + disabledTimeIntervals(): boolean | moment.Moment[][]; /**Disables time selection between the given moments * eg: [[moment({ h: 0 }), moment({ h: 8 })], [moment({ h: 18 }), moment({ h: 24 })]] */ - disabledTimeIntervals(value: boolean | Array>): void; + disabledTimeIntervals(value: boolean | moment.Moment[][]): void; /**Returns the options.enabledDates option * NOTES: probably should be: enabledDates(): boolean | Array; see: DatetimepickerOptions */ @@ -144,12 +144,12 @@ export interface Datetimepicker { */ enabledDates(dates: boolean | Array): void; /**Returns the options.enabledHours option. - * NOTES: probably should be: enabledHours(): boolean | Array; see: DatetimepickerOptions + * NOTES: probably should be: enabledHours(): boolean | number[]; see: DatetimepickerOptions */ enabledHours(): boolean | any; /**Must be in 24 hour format. Will allow hour selections (much like enabledTimeIntervals) but will affect all days. * Like en/disabledDates, the en/disabledHours options are mutually exclusive and will reset one of the options back to false. */ - enabledHours(value: boolean | Array): void; + enabledHours(value: boolean | number[]): void; /**Returns a boolean or array with the options.extraFormats option configuration */ extraFormats(): boolean | Array; /**Takes an array of valid input moment format options, or boolean:false */ @@ -303,7 +303,7 @@ export interface Datetimepicker { */ viewMode(value: string): void; /**Returns a $(element) variable with the currently set options.widgetParent option. */ - widgetParent(): string | JQuery | null + widgetParent(): string | JQuery | null; /**Takes a string or $(element) value. */ widgetParent(widgetParent: string | JQuery | null): void; /**Returns the options.widgetPositioning object */ @@ -332,7 +332,7 @@ export interface DatetimepickerOptions { * Accepts: array of numbers from 0-6 * @default: false */ - daysOfWeekDisabled?: Array | boolean; + daysOfWeekDisabled?: number[] | boolean; /**Changes the heading of the datepicker when in "days" view. * @default: "MMMM YYYY" */ @@ -358,12 +358,12 @@ export interface DatetimepickerOptions { * eg disabledHours = [0, 1]; -> disabledHours will be { "0": true, "1": true } * https://github.com/Eonasdan/bootstrap-datetimepicker/issues/1499 */ - disabledHours?: boolean | Array | any; + disabledHours?: boolean | number[] | any; /**Disables time selection between the given moments * eg: [[moment({ h: 0 }), moment({ h: 8 })], [moment({ h: 18 }), moment({ h: 24 })]] * @default: false */ - disabledTimeIntervals?: boolean | Array>; + disabledTimeIntervals?: boolean | moment.Moment[][]; /**Disables selection of dates NOT in the array, e.g. holidays * @default: false * IMPORTANT! The getter returns an Object NOT an Array, with keys being the dates, values being true. @@ -377,7 +377,7 @@ export interface DatetimepickerOptions { * eg enabledHours = [0, 1]; -> enabledHours will be { "0": true, "1": true } * https://github.com/Eonasdan/bootstrap-datetimepicker/issues/1499 */ - enabledHours?: boolean | Array; + enabledHours?: boolean | number[]; /**Allows for several input formats to be valid. See: https://github.com/Eonasdan/bootstrap-datetimepicker/pull/666 * @default: false */ @@ -566,7 +566,6 @@ type EventName = "dp.show" | "dp.hide" | "dp.error"; declare global { interface JQuery { - datetimepicker(options?: DatetimepickerOptions): JQuery; data(key: "DateTimePicker"): Datetimepicker; @@ -575,21 +574,21 @@ declare global { on(events: "dp.change", selector: string, handler: (eventobject: ChangeEvent) => any): JQuery; on(events: "dp.change", selector: string, data: any, handler?: (eventobject: ChangeEvent) => any): JQuery; - off(events: "dp.change", handler: (eventobject: ChangeEvent) => any): JQuery; - off(events: "dp.change", selector?: string, handler?: (eventobject: ChangeEvent) => any): JQuery; + on(events: "dp.update", handler: (eventObject: UpdateEvent) => any): JQuery; + on(events: "dp.update", selector: string, handler: (eventobject: UpdateEvent) => any): JQuery; + on(events: "dp.update", selector: string, data: any, handler?: (eventobject: UpdateEvent) => any): JQuery; on(events: EventName , handler: (eventObject: Event) => any): JQuery; on(events: EventName, selector: string, handler: (eventobject: Event) => any): JQuery; on(events: EventName, selector: string, data: any, handler?: (eventobject: Event) => any): JQuery; - off(events: EventName, handler: (eventobject: Event) => any): JQuery; - off(events: EventName, selector?: string, handler?: (eventobject: Event) => any): JQuery; - - on(events: "dp.update", handler: (eventObject: UpdateEvent) => any): JQuery; - on(events: "dp.update", selector: string, handler: (eventobject: UpdateEvent) => any): JQuery; - on(events: "dp.update", selector: string, data: any, handler?: (eventobject: UpdateEvent) => any): JQuery; + off(events: "dp.change", handler: (eventobject: ChangeEvent) => any): JQuery; + off(events: "dp.change", selector?: string, handler?: (eventobject: ChangeEvent) => any): JQuery; off(events: "dp.update", handler: (eventobject: UpdateEvent) => any): JQuery; off(events: "dp.update", selector?: string, handler?: (eventobject: UpdateEvent) => any): JQuery; + + off(events: EventName, handler: (eventobject: Event) => any): JQuery; + off(events: EventName, selector?: string, handler?: (eventobject: Event) => any): JQuery; } } diff --git a/bootstrap.v3.datetimepicker/package.json b/types/bootstrap.v3.datetimepicker/package.json similarity index 100% rename from bootstrap.v3.datetimepicker/package.json rename to types/bootstrap.v3.datetimepicker/package.json diff --git a/bootstrap.v3.datetimepicker/tsconfig.json b/types/bootstrap.v3.datetimepicker/tsconfig.json similarity index 100% rename from bootstrap.v3.datetimepicker/tsconfig.json rename to types/bootstrap.v3.datetimepicker/tsconfig.json diff --git a/bootstrap.v3.datetimepicker/tslint.json b/types/bootstrap.v3.datetimepicker/tslint.json similarity index 100% rename from bootstrap.v3.datetimepicker/tslint.json rename to types/bootstrap.v3.datetimepicker/tslint.json diff --git a/bootstrap.v3.datetimepicker/v3/index.d.ts b/types/bootstrap.v3.datetimepicker/v3/index.d.ts similarity index 100% rename from bootstrap.v3.datetimepicker/v3/index.d.ts rename to types/bootstrap.v3.datetimepicker/v3/index.d.ts diff --git a/bootstrap.v3.datetimepicker/v3/package.json b/types/bootstrap.v3.datetimepicker/v3/package.json similarity index 100% rename from bootstrap.v3.datetimepicker/v3/package.json rename to types/bootstrap.v3.datetimepicker/v3/package.json diff --git a/bootstrap.v3.datetimepicker/v3/tsconfig.json b/types/bootstrap.v3.datetimepicker/v3/tsconfig.json similarity index 100% rename from bootstrap.v3.datetimepicker/v3/tsconfig.json rename to types/bootstrap.v3.datetimepicker/v3/tsconfig.json diff --git a/bootstrap/bootstrap-tests.ts b/types/bootstrap/bootstrap-tests.ts similarity index 100% rename from bootstrap/bootstrap-tests.ts rename to types/bootstrap/bootstrap-tests.ts diff --git a/bootstrap/index.d.ts b/types/bootstrap/index.d.ts similarity index 100% rename from bootstrap/index.d.ts rename to types/bootstrap/index.d.ts diff --git a/bootstrap/tsconfig.json b/types/bootstrap/tsconfig.json similarity index 100% rename from bootstrap/tsconfig.json rename to types/bootstrap/tsconfig.json diff --git a/bounce.js/bounce.js-tests.ts b/types/bounce.js/bounce.js-tests.ts similarity index 100% rename from bounce.js/bounce.js-tests.ts rename to types/bounce.js/bounce.js-tests.ts diff --git a/bounce.js/index.d.ts b/types/bounce.js/index.d.ts similarity index 100% rename from bounce.js/index.d.ts rename to types/bounce.js/index.d.ts diff --git a/bounce.js/tsconfig.json b/types/bounce.js/tsconfig.json similarity index 100% rename from bounce.js/tsconfig.json rename to types/bounce.js/tsconfig.json diff --git a/bowser/bowser-tests.ts b/types/bowser/bowser-tests.ts similarity index 100% rename from bowser/bowser-tests.ts rename to types/bowser/bowser-tests.ts diff --git a/bowser/index.d.ts b/types/bowser/index.d.ts similarity index 100% rename from bowser/index.d.ts rename to types/bowser/index.d.ts diff --git a/bowser/tsconfig.json b/types/bowser/tsconfig.json similarity index 100% rename from bowser/tsconfig.json rename to types/bowser/tsconfig.json diff --git a/box2d/README.md b/types/box2d/README.md similarity index 100% rename from box2d/README.md rename to types/box2d/README.md diff --git a/box2d/box2d-tests.ts b/types/box2d/box2d-tests.ts similarity index 100% rename from box2d/box2d-tests.ts rename to types/box2d/box2d-tests.ts diff --git a/box2d/index.d.ts b/types/box2d/index.d.ts similarity index 100% rename from box2d/index.d.ts rename to types/box2d/index.d.ts diff --git a/box2d/tsconfig.json b/types/box2d/tsconfig.json similarity index 100% rename from box2d/tsconfig.json rename to types/box2d/tsconfig.json diff --git a/braintree-web/braintree-web-tests.ts b/types/braintree-web/braintree-web-tests.ts similarity index 100% rename from braintree-web/braintree-web-tests.ts rename to types/braintree-web/braintree-web-tests.ts diff --git a/braintree-web/index.d.ts b/types/braintree-web/index.d.ts similarity index 100% rename from braintree-web/index.d.ts rename to types/braintree-web/index.d.ts diff --git a/braintree-web/tsconfig.json b/types/braintree-web/tsconfig.json similarity index 100% rename from braintree-web/tsconfig.json rename to types/braintree-web/tsconfig.json diff --git a/breeze/breeze-tests.ts b/types/breeze/breeze-tests.ts similarity index 100% rename from breeze/breeze-tests.ts rename to types/breeze/breeze-tests.ts diff --git a/breeze/index.d.ts b/types/breeze/index.d.ts similarity index 93% rename from breeze/index.d.ts rename to types/breeze/index.d.ts index 8cc109d746..323e9a8f87 100644 --- a/breeze/index.d.ts +++ b/types/breeze/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Breeze 1.5.x +// Type definitions for Breeze 1.6.3 // Project: http://www.breezejs.com/ // Definitions by: Boris Yankov , IdeaBlade // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -12,7 +12,10 @@ // Updated Jan 20 2015 for Breeze 1.5.2 and merging changes from DefinitelyTyped // Updated Feb 28 2015 add any/all clause on Predicate // Updated Jun 27 2016 - Marcel Good (www.ideablade.com) -// Updated Jul 28 2016 - Serkan "coni2k" Holat +// Updated Jun 29 2016 - Marcel Good (www.ideablade.com) +// Updated Jul 15 2016 - Added methods to JsonResultsAdapter - Steve Schmitt +// Updated Sep 23 2016 - Added core methods +// Updated March 5 2017 - Eliminate promises.IPromise and replace with Promise declare namespace breeze.core { @@ -89,6 +92,19 @@ declare namespace breeze.core { export function stringStartsWith(str: string, prefix: string): boolean; export function stringEndsWith(str: string, suffix: string): boolean; export function formatString(format: string, ...args: any[]): string; + + /** Change text to title case with spaces, e.g. 'myPropertyName12' to 'My Property Name 12' */ + export function titleCase(str: string): string; + + /** Return the ES5 property descriptor for the property, which may be on a prototype of the object */ + export function getPropertyDescriptor(obj: any, propertyName: string): PropertyDescriptor + + /** safely perform toJSON logic on objects with cycles. Replacer function can map or exclude properties. */ + export function toJSONSafe(obj: any, replacer: (prop: string, val: any) => any): any + + /** Default value replacer for toJSONSafe. Replaces entityAspect and other internal properties with undefined. */ + export function toJSONSafeReplacer(prop: string, val: any): any + } declare namespace breeze { @@ -214,19 +230,23 @@ declare namespace breeze { export class DataServiceAdapter { checkForRecomposition(interfaceInitializedArgs: { interfaceName: string; isDefault: boolean }): void; initialize(): void; - fetchMetadata(metadataStore: MetadataStore, dataService: DataService): breeze.promises.IPromise; - executeQuery(mappingContext: { getUrl: () => string; query: EntityQuery; dataService: DataService }): breeze.promises.IPromise; - saveChanges(saveContext: { resourceName: string; dataService: DataService }, saveBundle: Object): breeze.promises.IPromise; + fetchMetadata(metadataStore: MetadataStore, dataService: DataService): Promise; + executeQuery(mappingContext: { getUrl: () => string; query: EntityQuery; dataService: DataService }): Promise; + saveChanges(saveContext: { resourceName: string; dataService: DataService }, saveBundle: Object): Promise; JsonResultsAdapter: JsonResultsAdapter; } export class JsonResultsAdapter { name: string; extractResults: (data: {}) => {}; + extractSaveResults: (data: {}) => any[]; + extractKeyMappings: (data: {}) => KeyMapping[]; visitNode: (node: {}, queryContext: QueryContext, nodeContext: NodeContext) => { entityType?: EntityType; nodeId?: any; nodeRefId?: any; ignore?: boolean; }; constructor(config: { name: string; extractResults?: (data: {}) => {}; + extractSaveResults?: (data: {}) => any[]; + extractKeyMappings?: (data: {}) => KeyMapping[]; visitNode: (node: {}, queryContext: QueryContext, nodeContext: NodeContext) => { entityType?: EntityType; nodeId?: any; nodeRefId?: any; ignore?: boolean; }; }); } @@ -241,6 +261,7 @@ declare namespace breeze { export interface NodeContext { nodeType: string; + propertyName: string; } export class DataTypeSymbol extends breeze.core.EnumSymbol { @@ -333,8 +354,8 @@ declare namespace breeze { isNavigationPropertyLoaded(navigationProperty: string): boolean; isNavigationPropertyLoaded(navigationProperty: NavigationProperty): boolean; - loadNavigationProperty(navigationProperty: string, callback?: Function, errorCallback?: Function): breeze.promises.IPromise; - loadNavigationProperty(navigationProperty: NavigationProperty, callback?: Function, errorCallback?: Function): breeze.promises.IPromise; + loadNavigationProperty(navigationProperty: string, callback?: Function, errorCallback?: Function): Promise; + loadNavigationProperty(navigationProperty: NavigationProperty, callback?: Function, errorCallback?: Function): Promise; rejectChanges(): void; @@ -423,16 +444,16 @@ declare namespace breeze { createEntity(typeName: string, config?: {}, entityState?: EntityStateSymbol, mergeStrategy?: MergeStrategySymbol): Entity; createEntity(entityType: EntityType, config?: {}, entityState?: EntityStateSymbol, mergeStrategy?: MergeStrategySymbol): Entity; detachEntity(entity: Entity): boolean; - executeQuery(query: string, callback?: ExecuteQuerySuccessCallback, errorCallback?: ExecuteQueryErrorCallback): breeze.promises.IPromise; - executeQuery(query: EntityQuery, callback?: ExecuteQuerySuccessCallback, errorCallback?: ExecuteQueryErrorCallback): breeze.promises.IPromise; + executeQuery(query: string, callback?: ExecuteQuerySuccessCallback, errorCallback?: ExecuteQueryErrorCallback): Promise; + executeQuery(query: EntityQuery, callback?: ExecuteQuerySuccessCallback, errorCallback?: ExecuteQueryErrorCallback): Promise; executeQueryLocally(query: EntityQuery): Entity[]; exportEntities(entities?: Entity[], includeMetadata?: boolean): string; exportEntities(entities?: Entity[], options?: ExportEntitiesOptions): any; // string | Object - fetchEntityByKey(typeName: string, keyValue: any, checkLocalCacheFirst?: boolean): breeze.promises.IPromise; - fetchEntityByKey(typeName: string, keyValues: any[], checkLocalCacheFirst?: boolean): breeze.promises.IPromise; - fetchEntityByKey(entityKey: EntityKey): breeze.promises.IPromise; - fetchMetadata(callback?: (schema: any) => void, errorCallback?: breeze.core.ErrorCallback): breeze.promises.IPromise; + fetchEntityByKey(typeName: string, keyValue: any, checkLocalCacheFirst?: boolean): Promise; + fetchEntityByKey(typeName: string, keyValues: any[], checkLocalCacheFirst?: boolean): Promise; + fetchEntityByKey(entityKey: EntityKey): Promise; + fetchMetadata(callback?: (schema: any) => void, errorCallback?: breeze.core.ErrorCallback): Promise; generateTempKeyValue(entity: Entity): any; getChanges(): Entity[]; getChanges(entityTypeName: string): Entity[]; @@ -466,7 +487,7 @@ declare namespace breeze { importEntities(exportedData: Object, config?: { mergeStrategy?: MergeStrategySymbol; metadataVersionFn?: (any: any) => void }): { entities: Entity[]; tempKeyMapping: { [key: string]: EntityKey } }; rejectChanges(): Entity[]; - saveChanges(entities?: Entity[], saveOptions?: SaveOptions, callback?: SaveChangesSuccessCallback, errorCallback?: SaveChangesErrorCallback): breeze.promises.IPromise; + saveChanges(entities?: Entity[], saveOptions?: SaveOptions, callback?: SaveChangesSuccessCallback, errorCallback?: SaveChangesErrorCallback): Promise; setProperties(config: EntityManagerProperties): void; } @@ -554,7 +575,7 @@ declare namespace breeze { /** Create query from an expression tree */ constructor(tree: Object); - execute(callback?: ExecuteQuerySuccessCallback, errorCallback?: ExecuteQueryErrorCallback): breeze.promises.IPromise; + execute(callback?: ExecuteQuerySuccessCallback, errorCallback?: ExecuteQueryErrorCallback): Promise; executeLocally(): Entity[]; expand(propertyPaths: string[]): EntityQuery; expand(propertyPaths: string): EntityQuery; @@ -591,6 +612,8 @@ declare namespace breeze { where(property: string, filterop: FilterQueryOpSymbol, property2: string, filterop2: FilterQueryOpSymbol, value: any): EntityQuery; // for any/all clauses where(property: string, filterop: string, property2: string, filterop2: string, value: any): EntityQuery; // for any/all clauses where(predicate: FilterQueryOpSymbol): EntityQuery; + where(anArray: IRecursiveArray): EntityQuery; + withParameters(params: Object): EntityQuery; toJSON(): string; @@ -721,13 +744,14 @@ declare namespace breeze { addDataService(dataService: DataService, shouldOverwrite?: boolean): void; addEntityType(structuralType: IStructuralType): void; exportMetadata(): string; - fetchMetadata(dataService: string, callback?: (data: any) => void, errorCallback?: breeze.core.ErrorCallback): breeze.promises.IPromise; - fetchMetadata(dataService: DataService, callback?: (data: any) => void, errorCallback?: breeze.core.ErrorCallback): breeze.promises.IPromise; + fetchMetadata(dataService: string, callback?: (data: any) => void, errorCallback?: breeze.core.ErrorCallback): Promise; + fetchMetadata(dataService: DataService, callback?: (data: any) => void, errorCallback?: breeze.core.ErrorCallback): Promise; getDataService(serviceName: string): DataService; getEntityType(entityTypeName: string, okIfNotFound?: boolean): IStructuralType; getEntityTypes(): IStructuralType[]; hasMetadataFor(serviceName: string): boolean; static importMetadata(exportedString: string): MetadataStore; + static normalizeTypeName(typeName: string): string; importMetadata(exportedString: string, allowMerge?: boolean): MetadataStore; isEmpty(): boolean; registerEntityTypeCtor(entityTypeName: string, entityCtor: Function, initializationFn?: (entity: Entity) => void, noTrackingFn?: (node: Object, entityType: EntityType) => Object): void; @@ -796,7 +820,7 @@ declare namespace breeze { export interface IRecursiveArray { [i: number]: T | IRecursiveArray; } - + export class Predicate { constructor(); constructor(property: string, operator: string, value: any); @@ -904,10 +928,16 @@ declare namespace breeze { export interface SaveResult { entities: Entity[]; - keyMappings: any; + keyMappings: KeyMapping[]; XHR: XMLHttpRequest; } + export interface KeyMapping { + entityTypeName: string; + tempValue: any; + realValue: any; + } + export class ValidationError { key: string; context: any; @@ -993,7 +1023,7 @@ declare namespace breeze { /** Creates a regular expression validator with a fixed expression. */ static makeRegExpValidator(validatorName: string, expression: RegExp, defaultMessage: string, context?: any): Validator; - /** Run this validator against the specified value. + /** Run this validator against the specified value. @param value {Object} Value to validate @param additionalContext {Object} Any additional contextual information that the Validator can make use of. @return {ValidationError|null} A ValidationError if validation fails, null otherwise */ @@ -1044,20 +1074,16 @@ declare namespace breeze.config { @return {an instance of the specified adapter} **/ export function getAdapterInstance(interfaceName: string, adapterName?: string): Object; - - export interface Adapter { - getRoutePrefix: Function - } /** - Initializes a single adapter implementation. Initialization means either newing a instance of the + Initializes a single adapter implementation. Initialization means either newing a instance of the specified interface and then calling "initialize" on it or simply calling "initialize" on the instance if it already exists. @param interfaceName {String} The name of the interface to which the adapter to initialize belongs. @param adapterName {String} - The name of a previously registered adapter to initialize. - @param isDefault=true {Boolean} - Whether to make this the default "adapter" for this interface. + @param isDefault=true {Boolean} - Whether to make this the default "adapter" for this interface. @return {an instance of the specified adapter} **/ - export function initializeAdapterInstance(interfaceName: string, adapterName: string, isDefault?: boolean): Adapter; + export function initializeAdapterInstance(interfaceName: string, adapterName: string, isDefault?: boolean): Object; export interface AdapterInstancesConfig { /** the name of a previously registered "ajax" adapter */ @@ -1080,15 +1106,15 @@ declare namespace breeze.config { export var objectRegistry: Object; /** Method use to register implementations of standard breeze interfaces. Calls to this method are usually - made as the last step within an adapter implementation. + made as the last step within an adapter implementation. @param interfaceName {String} - one of the following interface names "ajax", "dataService" or "modelLibrary" - @param adapterCtor {Function} - an ctor function that returns an instance of the specified interface. + @param adapterCtor {Function} - an ctor function that returns an instance of the specified interface. **/ export function registerAdapter(interfaceName: string, adapterCtor: Function): void; export function registerFunction(fn: Function, fnName: string): void; export function registerType(ctor: Function, typeName: string): void; //static setProperties(config: Object): void; //deprecated - /** + /** Set the promise implementation, if Q.js is not found. @param q - implementation of promise. @see http://wiki.commonjs.org/wiki/Promises/A */ @@ -1101,27 +1127,17 @@ declare namespace breeze.config { /** Promises interface used by Breeze. Usually implemented by Q (https://github.com/kriskowal/q) or angular.$q using breeze.config.setQ(impl) */ declare namespace breeze.promises { - export interface IPromise { - then(onFulfill: (value: T) => U, onReject?: (reason: any) => U): IPromise; - then(onFulfill: (value: T) => IPromise, onReject?: (reason: any) => U): IPromise; - then(onFulfill: (value: T) => U, onReject?: (reason: any) => IPromise): IPromise; - then(onFulfill: (value: T) => IPromise, onReject?: (reason: any) => IPromise): IPromise; - catch(onRejected: (reason: any) => U): IPromise; - catch(onRejected: (reason: any) => IPromise): IPromise; - finally(finallyCallback: () => any): IPromise; - } - export interface IDeferred { - promise: IPromise; + promise: Promise; resolve(value: T): void; reject(reason: any): void; } export interface IPromiseService { defer(): IDeferred; - reject(reason?: any): IPromise; - resolve(object: T): IPromise; - resolve(object: IPromise): IPromise; + reject(reason?: any): Promise; + resolve(object: T): Promise; + resolve(object: Promise): Promise; } } diff --git a/breeze/tsconfig.json b/types/breeze/tsconfig.json similarity index 100% rename from breeze/tsconfig.json rename to types/breeze/tsconfig.json diff --git a/brorand/brorand-tests.ts b/types/brorand/brorand-tests.ts similarity index 100% rename from brorand/brorand-tests.ts rename to types/brorand/brorand-tests.ts diff --git a/brorand/index.d.ts b/types/brorand/index.d.ts similarity index 100% rename from brorand/index.d.ts rename to types/brorand/index.d.ts diff --git a/brorand/tsconfig.json b/types/brorand/tsconfig.json similarity index 100% rename from brorand/tsconfig.json rename to types/brorand/tsconfig.json diff --git a/browser-bunyan/browser-bunyan-tests.ts b/types/browser-bunyan/browser-bunyan-tests.ts similarity index 83% rename from browser-bunyan/browser-bunyan-tests.ts rename to types/browser-bunyan/browser-bunyan-tests.ts index ffb2ebf7a7..47f439a07e 100644 --- a/browser-bunyan/browser-bunyan-tests.ts +++ b/types/browser-bunyan/browser-bunyan-tests.ts @@ -1,6 +1,6 @@ import * as bunyan from "browser-bunyan"; -var log = bunyan.createLogger({ +const log = bunyan.createLogger({ name: 'play', serializers: bunyan.stdSerializers }); diff --git a/browser-bunyan/index.d.ts b/types/browser-bunyan/index.d.ts similarity index 85% rename from browser-bunyan/index.d.ts rename to types/browser-bunyan/index.d.ts index f2981bfacd..bb243e4324 100644 --- a/browser-bunyan/index.d.ts +++ b/types/browser-bunyan/index.d.ts @@ -6,7 +6,7 @@ import bunyan = require("bunyan"); declare module "bunyan" { - export function ConsoleFormattedStream(): void; + function ConsoleFormattedStream(): void; } export = bunyan; diff --git a/browser-bunyan/tsconfig.json b/types/browser-bunyan/tsconfig.json similarity index 100% rename from browser-bunyan/tsconfig.json rename to types/browser-bunyan/tsconfig.json diff --git a/browser-bunyan/tslint.json b/types/browser-bunyan/tslint.json similarity index 100% rename from browser-bunyan/tslint.json rename to types/browser-bunyan/tslint.json diff --git a/browser-fingerprint/browser-fingerprint-tests.ts b/types/browser-fingerprint/browser-fingerprint-tests.ts similarity index 100% rename from browser-fingerprint/browser-fingerprint-tests.ts rename to types/browser-fingerprint/browser-fingerprint-tests.ts diff --git a/browser-fingerprint/index.d.ts b/types/browser-fingerprint/index.d.ts similarity index 100% rename from browser-fingerprint/index.d.ts rename to types/browser-fingerprint/index.d.ts diff --git a/browser-fingerprint/tsconfig.json b/types/browser-fingerprint/tsconfig.json similarity index 100% rename from browser-fingerprint/tsconfig.json rename to types/browser-fingerprint/tsconfig.json diff --git a/browser-fingerprint/tslint.json b/types/browser-fingerprint/tslint.json similarity index 100% rename from browser-fingerprint/tslint.json rename to types/browser-fingerprint/tslint.json diff --git a/browser-harness/browser-harness-tests.ts b/types/browser-harness/browser-harness-tests.ts similarity index 100% rename from browser-harness/browser-harness-tests.ts rename to types/browser-harness/browser-harness-tests.ts diff --git a/browser-harness/index.d.ts b/types/browser-harness/index.d.ts similarity index 100% rename from browser-harness/index.d.ts rename to types/browser-harness/index.d.ts diff --git a/browser-harness/tsconfig.json b/types/browser-harness/tsconfig.json similarity index 100% rename from browser-harness/tsconfig.json rename to types/browser-harness/tsconfig.json diff --git a/browser-pack/browser-pack-tests.ts b/types/browser-pack/browser-pack-tests.ts similarity index 100% rename from browser-pack/browser-pack-tests.ts rename to types/browser-pack/browser-pack-tests.ts diff --git a/browser-pack/index.d.ts b/types/browser-pack/index.d.ts similarity index 100% rename from browser-pack/index.d.ts rename to types/browser-pack/index.d.ts diff --git a/browser-pack/tsconfig.json b/types/browser-pack/tsconfig.json similarity index 100% rename from browser-pack/tsconfig.json rename to types/browser-pack/tsconfig.json diff --git a/browser-resolve/browser-resolve-tests.ts b/types/browser-resolve/browser-resolve-tests.ts similarity index 100% rename from browser-resolve/browser-resolve-tests.ts rename to types/browser-resolve/browser-resolve-tests.ts diff --git a/browser-resolve/index.d.ts b/types/browser-resolve/index.d.ts similarity index 100% rename from browser-resolve/index.d.ts rename to types/browser-resolve/index.d.ts diff --git a/browser-resolve/tsconfig.json b/types/browser-resolve/tsconfig.json similarity index 100% rename from browser-resolve/tsconfig.json rename to types/browser-resolve/tsconfig.json diff --git a/browser-sync/browser-sync-tests.ts b/types/browser-sync/browser-sync-tests.ts similarity index 100% rename from browser-sync/browser-sync-tests.ts rename to types/browser-sync/browser-sync-tests.ts diff --git a/browser-sync/index.d.ts b/types/browser-sync/index.d.ts similarity index 100% rename from browser-sync/index.d.ts rename to types/browser-sync/index.d.ts diff --git a/browser-sync/tsconfig.json b/types/browser-sync/tsconfig.json similarity index 100% rename from browser-sync/tsconfig.json rename to types/browser-sync/tsconfig.json diff --git a/browserify/browserify-tests.ts b/types/browserify/browserify-tests.ts similarity index 100% rename from browserify/browserify-tests.ts rename to types/browserify/browserify-tests.ts diff --git a/browserify/index.d.ts b/types/browserify/index.d.ts similarity index 100% rename from browserify/index.d.ts rename to types/browserify/index.d.ts diff --git a/browserify/tsconfig.json b/types/browserify/tsconfig.json similarity index 100% rename from browserify/tsconfig.json rename to types/browserify/tsconfig.json diff --git a/bs58/bs58-tests.ts b/types/bs58/bs58-tests.ts similarity index 100% rename from bs58/bs58-tests.ts rename to types/bs58/bs58-tests.ts diff --git a/bs58/index.d.ts b/types/bs58/index.d.ts similarity index 100% rename from bs58/index.d.ts rename to types/bs58/index.d.ts diff --git a/bs58/tsconfig.json b/types/bs58/tsconfig.json similarity index 100% rename from bs58/tsconfig.json rename to types/bs58/tsconfig.json diff --git a/bson/bson-tests.ts b/types/bson/bson-tests.ts similarity index 100% rename from bson/bson-tests.ts rename to types/bson/bson-tests.ts diff --git a/bson/index.d.ts b/types/bson/index.d.ts similarity index 98% rename from bson/index.d.ts rename to types/bson/index.d.ts index 517ed8ede9..e34462b2b7 100644 --- a/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/bson/tsconfig.json b/types/bson/tsconfig.json similarity index 100% rename from bson/tsconfig.json rename to types/bson/tsconfig.json diff --git a/bucks/bucks-tests.ts b/types/bucks/bucks-tests.ts similarity index 100% rename from bucks/bucks-tests.ts rename to types/bucks/bucks-tests.ts diff --git a/bucks/index.d.ts b/types/bucks/index.d.ts similarity index 100% rename from bucks/index.d.ts rename to types/bucks/index.d.ts diff --git a/bucks/tsconfig.json b/types/bucks/tsconfig.json similarity index 100% rename from bucks/tsconfig.json rename to types/bucks/tsconfig.json diff --git a/buffer-compare/buffer-compare-tests.ts b/types/buffer-compare/buffer-compare-tests.ts similarity index 100% rename from buffer-compare/buffer-compare-tests.ts rename to types/buffer-compare/buffer-compare-tests.ts diff --git a/buffer-compare/index.d.ts b/types/buffer-compare/index.d.ts similarity index 100% rename from buffer-compare/index.d.ts rename to types/buffer-compare/index.d.ts diff --git a/buffer-compare/tsconfig.json b/types/buffer-compare/tsconfig.json similarity index 100% rename from buffer-compare/tsconfig.json rename to types/buffer-compare/tsconfig.json diff --git a/buffer-equal/buffer-equal-tests.ts b/types/buffer-equal/buffer-equal-tests.ts similarity index 100% rename from buffer-equal/buffer-equal-tests.ts rename to types/buffer-equal/buffer-equal-tests.ts diff --git a/buffer-equal/index.d.ts b/types/buffer-equal/index.d.ts similarity index 100% rename from buffer-equal/index.d.ts rename to types/buffer-equal/index.d.ts diff --git a/buffer-equal/tsconfig.json b/types/buffer-equal/tsconfig.json similarity index 100% rename from buffer-equal/tsconfig.json rename to types/buffer-equal/tsconfig.json diff --git a/buffers/buffers-tests.ts b/types/buffers/buffers-tests.ts similarity index 100% rename from buffers/buffers-tests.ts rename to types/buffers/buffers-tests.ts diff --git a/buffers/index.d.ts b/types/buffers/index.d.ts similarity index 100% rename from buffers/index.d.ts rename to types/buffers/index.d.ts diff --git a/buffers/tsconfig.json b/types/buffers/tsconfig.json similarity index 100% rename from buffers/tsconfig.json rename to types/buffers/tsconfig.json diff --git a/bufferstream/bufferstream-tests.ts b/types/bufferstream/bufferstream-tests.ts similarity index 80% rename from bufferstream/bufferstream-tests.ts rename to types/bufferstream/bufferstream-tests.ts index 06cbd43e28..609e8828c7 100644 --- a/bufferstream/bufferstream-tests.ts +++ b/types/bufferstream/bufferstream-tests.ts @@ -1,8 +1,6 @@ - - import BufferStream = require('bufferstream'); -var stream = new BufferStream({encoding: 'utf8', size: 'flexible'}); +const stream = new BufferStream({encoding: 'utf8', size: 'flexible'}); stream.enable(); stream.disable(); stream.split('//', ':'); @@ -11,4 +9,3 @@ stream.on('split', (chunk: any, token: any) => { }); stream.write("buffer:stream//23"); console.log(stream.toString()); - diff --git a/bufferstream/index.d.ts b/types/bufferstream/index.d.ts similarity index 97% rename from bufferstream/index.d.ts rename to types/bufferstream/index.d.ts index 1d1ffcdb10..0642fd8740 100644 --- a/bufferstream/index.d.ts +++ b/types/bufferstream/index.d.ts @@ -59,9 +59,9 @@ declare class BufferStream extends stream.Duplex { */ length: number; } // https://github.com/dodo/node-bufferstream/blob/master/src/buffer-stream.coffee#L28 -declare namespace BufferStream { - export interface Opts { +declare namespace BufferStream { + interface Opts { /* default encoding for writing strings */ @@ -85,5 +85,5 @@ declare namespace BufferStream { // String or Buffer split?: any; } - export var fn: {warn: boolean}; + const fn: {warn: boolean}; } diff --git a/bufferstream/postbuffer.d.ts b/types/bufferstream/postbuffer.d.ts similarity index 100% rename from bufferstream/postbuffer.d.ts rename to types/bufferstream/postbuffer.d.ts diff --git a/bufferstream/tsconfig.json b/types/bufferstream/tsconfig.json similarity index 100% rename from bufferstream/tsconfig.json rename to types/bufferstream/tsconfig.json diff --git a/bufferstream/tslint.json b/types/bufferstream/tslint.json similarity index 100% rename from bufferstream/tslint.json rename to types/bufferstream/tslint.json diff --git a/bugsnag/bugsnag-tests.ts b/types/bugsnag/bugsnag-tests.ts similarity index 100% rename from bugsnag/bugsnag-tests.ts rename to types/bugsnag/bugsnag-tests.ts diff --git a/bugsnag/index.d.ts b/types/bugsnag/index.d.ts similarity index 100% rename from bugsnag/index.d.ts rename to types/bugsnag/index.d.ts diff --git a/bugsnag/tsconfig.json b/types/bugsnag/tsconfig.json similarity index 100% rename from bugsnag/tsconfig.json rename to types/bugsnag/tsconfig.json diff --git a/bull/bull-tests.tsx b/types/bull/bull-tests.tsx similarity index 100% rename from bull/bull-tests.tsx rename to types/bull/bull-tests.tsx diff --git a/bull/index.d.ts b/types/bull/index.d.ts similarity index 100% rename from bull/index.d.ts rename to types/bull/index.d.ts diff --git a/bull/tsconfig.json b/types/bull/tsconfig.json similarity index 100% rename from bull/tsconfig.json rename to types/bull/tsconfig.json diff --git a/bunnymq/bunnymq-tests.ts b/types/bunnymq/bunnymq-tests.ts similarity index 100% rename from bunnymq/bunnymq-tests.ts rename to types/bunnymq/bunnymq-tests.ts diff --git a/bunnymq/index.d.ts b/types/bunnymq/index.d.ts similarity index 100% rename from bunnymq/index.d.ts rename to types/bunnymq/index.d.ts diff --git a/bunnymq/tsconfig.json b/types/bunnymq/tsconfig.json similarity index 100% rename from bunnymq/tsconfig.json rename to types/bunnymq/tsconfig.json diff --git a/bunyan-blackhole/bunyan-blackhole-tests.ts b/types/bunyan-blackhole/bunyan-blackhole-tests.ts similarity index 91% rename from bunyan-blackhole/bunyan-blackhole-tests.ts rename to types/bunyan-blackhole/bunyan-blackhole-tests.ts index ef2096a4c8..553d6f52ea 100644 --- a/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/bunyan-blackhole/index.d.ts b/types/bunyan-blackhole/index.d.ts similarity index 100% rename from bunyan-blackhole/index.d.ts rename to types/bunyan-blackhole/index.d.ts diff --git a/bunyan-blackhole/tsconfig.json b/types/bunyan-blackhole/tsconfig.json similarity index 100% rename from bunyan-blackhole/tsconfig.json rename to types/bunyan-blackhole/tsconfig.json diff --git a/bunyan-blackhole/tslint.json b/types/bunyan-blackhole/tslint.json similarity index 100% rename from bunyan-blackhole/tslint.json rename to types/bunyan-blackhole/tslint.json diff --git a/bunyan-config/bunyan-config-tests.ts b/types/bunyan-config/bunyan-config-tests.ts similarity index 100% rename from bunyan-config/bunyan-config-tests.ts rename to types/bunyan-config/bunyan-config-tests.ts diff --git a/bunyan-config/index.d.ts b/types/bunyan-config/index.d.ts similarity index 100% rename from bunyan-config/index.d.ts rename to types/bunyan-config/index.d.ts diff --git a/bunyan-config/tsconfig.json b/types/bunyan-config/tsconfig.json similarity index 100% rename from bunyan-config/tsconfig.json rename to types/bunyan-config/tsconfig.json diff --git a/bunyan-logentries/bunyan-logentries-tests.ts b/types/bunyan-logentries/bunyan-logentries-tests.ts similarity index 100% rename from bunyan-logentries/bunyan-logentries-tests.ts rename to types/bunyan-logentries/bunyan-logentries-tests.ts diff --git a/bunyan-logentries/index.d.ts b/types/bunyan-logentries/index.d.ts similarity index 100% rename from bunyan-logentries/index.d.ts rename to types/bunyan-logentries/index.d.ts diff --git a/bunyan-logentries/tsconfig.json b/types/bunyan-logentries/tsconfig.json similarity index 100% rename from bunyan-logentries/tsconfig.json rename to types/bunyan-logentries/tsconfig.json diff --git a/bunyan-prettystream/bunyan-prettystream-tests.ts b/types/bunyan-prettystream/bunyan-prettystream-tests.ts similarity index 100% rename from bunyan-prettystream/bunyan-prettystream-tests.ts rename to types/bunyan-prettystream/bunyan-prettystream-tests.ts diff --git a/bunyan-prettystream/index.d.ts b/types/bunyan-prettystream/index.d.ts similarity index 100% rename from bunyan-prettystream/index.d.ts rename to types/bunyan-prettystream/index.d.ts diff --git a/bunyan-prettystream/tsconfig.json b/types/bunyan-prettystream/tsconfig.json similarity index 100% rename from bunyan-prettystream/tsconfig.json rename to types/bunyan-prettystream/tsconfig.json diff --git a/bunyan/bunyan-tests.ts b/types/bunyan/bunyan-tests.ts similarity index 100% rename from bunyan/bunyan-tests.ts rename to types/bunyan/bunyan-tests.ts diff --git a/bunyan/index.d.ts b/types/bunyan/index.d.ts similarity index 100% rename from bunyan/index.d.ts rename to types/bunyan/index.d.ts diff --git a/bunyan/tsconfig.json b/types/bunyan/tsconfig.json similarity index 100% rename from bunyan/tsconfig.json rename to types/bunyan/tsconfig.json diff --git a/busboy/busboy-tests.ts b/types/busboy/busboy-tests.ts similarity index 100% rename from busboy/busboy-tests.ts rename to types/busboy/busboy-tests.ts diff --git a/busboy/index.d.ts b/types/busboy/index.d.ts similarity index 100% rename from busboy/index.d.ts rename to types/busboy/index.d.ts diff --git a/busboy/tsconfig.json b/types/busboy/tsconfig.json similarity index 100% rename from busboy/tsconfig.json rename to types/busboy/tsconfig.json diff --git a/business-rules-engine/Utils.d.ts b/types/business-rules-engine/Utils.d.ts similarity index 100% rename from business-rules-engine/Utils.d.ts rename to types/business-rules-engine/Utils.d.ts diff --git a/business-rules-engine/Validation.d.ts b/types/business-rules-engine/Validation.d.ts similarity index 100% rename from business-rules-engine/Validation.d.ts rename to types/business-rules-engine/Validation.d.ts diff --git a/business-rules-engine/business-rules-engine-tests.ts b/types/business-rules-engine/business-rules-engine-tests.ts similarity index 100% rename from business-rules-engine/business-rules-engine-tests.ts rename to types/business-rules-engine/business-rules-engine-tests.ts diff --git a/business-rules-engine/index.d.ts b/types/business-rules-engine/index.d.ts similarity index 100% rename from business-rules-engine/index.d.ts rename to types/business-rules-engine/index.d.ts diff --git a/business-rules-engine/node-validators.d.ts b/types/business-rules-engine/node-validators.d.ts similarity index 100% rename from business-rules-engine/node-validators.d.ts rename to types/business-rules-engine/node-validators.d.ts diff --git a/business-rules-engine/package.json b/types/business-rules-engine/package.json similarity index 100% rename from business-rules-engine/package.json rename to types/business-rules-engine/package.json diff --git a/business-rules-engine/tsconfig.json b/types/business-rules-engine/tsconfig.json similarity index 100% rename from business-rules-engine/tsconfig.json rename to types/business-rules-engine/tsconfig.json diff --git a/bwip-js/bwip-js-tests.ts b/types/bwip-js/bwip-js-tests.ts similarity index 100% rename from bwip-js/bwip-js-tests.ts rename to types/bwip-js/bwip-js-tests.ts diff --git a/bwip-js/index.d.ts b/types/bwip-js/index.d.ts similarity index 100% rename from bwip-js/index.d.ts rename to types/bwip-js/index.d.ts diff --git a/bwip-js/tsconfig.json b/types/bwip-js/tsconfig.json similarity index 100% rename from bwip-js/tsconfig.json rename to types/bwip-js/tsconfig.json diff --git a/byline/byline-tests.ts b/types/byline/byline-tests.ts similarity index 100% rename from byline/byline-tests.ts rename to types/byline/byline-tests.ts diff --git a/byline/index.d.ts b/types/byline/index.d.ts similarity index 100% rename from byline/index.d.ts rename to types/byline/index.d.ts diff --git a/byline/tsconfig.json b/types/byline/tsconfig.json similarity index 100% rename from byline/tsconfig.json rename to types/byline/tsconfig.json diff --git a/bytebuffer/bytebuffer-tests.ts b/types/bytebuffer/bytebuffer-tests.ts similarity index 100% rename from bytebuffer/bytebuffer-tests.ts rename to types/bytebuffer/bytebuffer-tests.ts diff --git a/bytebuffer/index.d.ts b/types/bytebuffer/index.d.ts similarity index 100% rename from bytebuffer/index.d.ts rename to types/bytebuffer/index.d.ts diff --git a/bytebuffer/tsconfig.json b/types/bytebuffer/tsconfig.json similarity index 100% rename from bytebuffer/tsconfig.json rename to types/bytebuffer/tsconfig.json diff --git a/bytes/bytes-tests.ts b/types/bytes/bytes-tests.ts similarity index 100% rename from bytes/bytes-tests.ts rename to types/bytes/bytes-tests.ts diff --git a/bytes/index.d.ts b/types/bytes/index.d.ts similarity index 100% rename from bytes/index.d.ts rename to types/bytes/index.d.ts diff --git a/bytes/tsconfig.json b/types/bytes/tsconfig.json similarity index 100% rename from bytes/tsconfig.json rename to types/bytes/tsconfig.json diff --git a/c3/c3-tests.ts b/types/c3/c3-tests.ts similarity index 100% rename from c3/c3-tests.ts rename to types/c3/c3-tests.ts diff --git a/c3/index.d.ts b/types/c3/index.d.ts similarity index 100% rename from c3/index.d.ts rename to types/c3/index.d.ts diff --git a/c3/tsconfig.json b/types/c3/tsconfig.json similarity index 100% rename from c3/tsconfig.json rename to types/c3/tsconfig.json diff --git a/cache-manager/cache-manager-tests.ts b/types/cache-manager/cache-manager-tests.ts similarity index 100% rename from cache-manager/cache-manager-tests.ts rename to types/cache-manager/cache-manager-tests.ts diff --git a/cache-manager/index.d.ts b/types/cache-manager/index.d.ts similarity index 100% rename from cache-manager/index.d.ts rename to types/cache-manager/index.d.ts diff --git a/cache-manager/tsconfig.json b/types/cache-manager/tsconfig.json similarity index 100% rename from cache-manager/tsconfig.json rename to types/cache-manager/tsconfig.json diff --git a/cachefactory/cachefactory-tests.ts b/types/cachefactory/cachefactory-tests.ts similarity index 100% rename from cachefactory/cachefactory-tests.ts rename to types/cachefactory/cachefactory-tests.ts diff --git a/cachefactory/index.d.ts b/types/cachefactory/index.d.ts similarity index 100% rename from cachefactory/index.d.ts rename to types/cachefactory/index.d.ts diff --git a/cachefactory/tsconfig.json b/types/cachefactory/tsconfig.json similarity index 100% rename from cachefactory/tsconfig.json rename to types/cachefactory/tsconfig.json diff --git a/cal-heatmap/cal-heatmap-tests.ts b/types/cal-heatmap/cal-heatmap-tests.ts similarity index 100% rename from cal-heatmap/cal-heatmap-tests.ts rename to types/cal-heatmap/cal-heatmap-tests.ts diff --git a/cal-heatmap/index.d.ts b/types/cal-heatmap/index.d.ts similarity index 100% rename from cal-heatmap/index.d.ts rename to types/cal-heatmap/index.d.ts diff --git a/cal-heatmap/tsconfig.json b/types/cal-heatmap/tsconfig.json similarity index 100% rename from cal-heatmap/tsconfig.json rename to types/cal-heatmap/tsconfig.json diff --git a/callsite/callsite-tests.ts b/types/callsite/callsite-tests.ts similarity index 100% rename from callsite/callsite-tests.ts rename to types/callsite/callsite-tests.ts diff --git a/callsite/index.d.ts b/types/callsite/index.d.ts similarity index 100% rename from callsite/index.d.ts rename to types/callsite/index.d.ts diff --git a/callsite/tsconfig.json b/types/callsite/tsconfig.json similarity index 100% rename from callsite/tsconfig.json rename to types/callsite/tsconfig.json diff --git a/calq/calq-tests.ts b/types/calq/calq-tests.ts similarity index 100% rename from calq/calq-tests.ts rename to types/calq/calq-tests.ts diff --git a/calq/index.d.ts b/types/calq/index.d.ts similarity index 100% rename from calq/index.d.ts rename to types/calq/index.d.ts diff --git a/calq/tsconfig.json b/types/calq/tsconfig.json similarity index 100% rename from calq/tsconfig.json rename to types/calq/tsconfig.json diff --git a/camelcase-keys/camelcase-keys-tests.ts b/types/camelcase-keys/camelcase-keys-tests.ts similarity index 100% rename from camelcase-keys/camelcase-keys-tests.ts rename to types/camelcase-keys/camelcase-keys-tests.ts diff --git a/camelcase-keys/index.d.ts b/types/camelcase-keys/index.d.ts similarity index 100% rename from camelcase-keys/index.d.ts rename to types/camelcase-keys/index.d.ts diff --git a/camelcase-keys/tsconfig.json b/types/camelcase-keys/tsconfig.json similarity index 100% rename from camelcase-keys/tsconfig.json rename to types/camelcase-keys/tsconfig.json diff --git a/camelcase-keys/tslint.json b/types/camelcase-keys/tslint.json similarity index 100% rename from camelcase-keys/tslint.json rename to types/camelcase-keys/tslint.json diff --git a/camelcase/camelcase-tests.ts b/types/camelcase/camelcase-tests.ts similarity index 100% rename from camelcase/camelcase-tests.ts rename to types/camelcase/camelcase-tests.ts diff --git a/camelcase/index.d.ts b/types/camelcase/index.d.ts similarity index 100% rename from camelcase/index.d.ts rename to types/camelcase/index.d.ts diff --git a/camelcase/tsconfig.json b/types/camelcase/tsconfig.json similarity index 100% rename from camelcase/tsconfig.json rename to types/camelcase/tsconfig.json diff --git a/camljs/camljs-tests.ts b/types/camljs/camljs-tests.ts similarity index 100% rename from camljs/camljs-tests.ts rename to types/camljs/camljs-tests.ts diff --git a/camljs/index.d.ts b/types/camljs/index.d.ts similarity index 100% rename from camljs/index.d.ts rename to types/camljs/index.d.ts diff --git a/camljs/tsconfig.json b/types/camljs/tsconfig.json similarity index 100% rename from camljs/tsconfig.json rename to types/camljs/tsconfig.json diff --git a/camo/camo-tests.ts b/types/camo/camo-tests.ts similarity index 100% rename from camo/camo-tests.ts rename to types/camo/camo-tests.ts diff --git a/camo/index.d.ts b/types/camo/index.d.ts similarity index 100% rename from camo/index.d.ts rename to types/camo/index.d.ts diff --git a/camo/tsconfig.json b/types/camo/tsconfig.json similarity index 100% rename from camo/tsconfig.json rename to types/camo/tsconfig.json diff --git a/cannon/cannon-tests.ts b/types/cannon/cannon-tests.ts similarity index 100% rename from cannon/cannon-tests.ts rename to types/cannon/cannon-tests.ts diff --git a/cannon/index.d.ts b/types/cannon/index.d.ts similarity index 100% rename from cannon/index.d.ts rename to types/cannon/index.d.ts diff --git a/cannon/tsconfig.json b/types/cannon/tsconfig.json similarity index 100% rename from cannon/tsconfig.json rename to types/cannon/tsconfig.json diff --git a/canvas-gauges/canvas-gauges-tests.ts b/types/canvas-gauges/canvas-gauges-tests.ts similarity index 100% rename from canvas-gauges/canvas-gauges-tests.ts rename to types/canvas-gauges/canvas-gauges-tests.ts diff --git a/canvas-gauges/index.d.ts b/types/canvas-gauges/index.d.ts similarity index 93% rename from canvas-gauges/index.d.ts rename to types/canvas-gauges/index.d.ts index 6ba360a7ea..e5b4f69047 100644 --- a/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/canvas-gauges/tsconfig.json b/types/canvas-gauges/tsconfig.json similarity index 100% rename from canvas-gauges/tsconfig.json rename to types/canvas-gauges/tsconfig.json diff --git a/canvasjs/canvasjs-tests.ts b/types/canvasjs/canvasjs-tests.ts similarity index 100% rename from canvasjs/canvasjs-tests.ts rename to types/canvasjs/canvasjs-tests.ts diff --git a/canvasjs/index.d.ts b/types/canvasjs/index.d.ts similarity index 100% rename from canvasjs/index.d.ts rename to types/canvasjs/index.d.ts diff --git a/canvasjs/tsconfig.json b/types/canvasjs/tsconfig.json similarity index 100% rename from canvasjs/tsconfig.json rename to types/canvasjs/tsconfig.json diff --git a/cash/index.d.ts b/types/cash/index.d.ts similarity index 100% rename from cash/index.d.ts rename to types/cash/index.d.ts diff --git a/cash/tsconfig.json b/types/cash/tsconfig.json similarity index 100% rename from cash/tsconfig.json rename to types/cash/tsconfig.json diff --git a/casperjs/index.d.ts b/types/casperjs/index.d.ts similarity index 99% rename from casperjs/index.d.ts rename to types/casperjs/index.d.ts index f252509af3..e8388d17c7 100644 --- a/casperjs/index.d.ts +++ b/types/casperjs/index.d.ts @@ -39,7 +39,7 @@ export class Casper { download(url: string, target?: string, method?: string, data?: any): Casper; each(array: T[], fn: (this: Casper, item: T, index: number) => void): Casper; echo(message: string, style?: string): Casper; - evaluate(fn: () => T, ...args: any[]): T + evaluate(fn: (...args: any[]) => T, ...args: any[]): T evaluateOrDie(fn: () => any, message?: string, status?: number): Casper; exit(status?: number): Casper; exists(selector: string): boolean; diff --git a/casperjs/tsconfig.json b/types/casperjs/tsconfig.json similarity index 100% rename from casperjs/tsconfig.json rename to types/casperjs/tsconfig.json diff --git a/cassandra-driver/cassandra-driver-tests.ts b/types/cassandra-driver/cassandra-driver-tests.ts similarity index 100% rename from cassandra-driver/cassandra-driver-tests.ts rename to types/cassandra-driver/cassandra-driver-tests.ts diff --git a/cassandra-driver/index.d.ts b/types/cassandra-driver/index.d.ts similarity index 100% rename from cassandra-driver/index.d.ts rename to types/cassandra-driver/index.d.ts diff --git a/cassandra-driver/tsconfig.json b/types/cassandra-driver/tsconfig.json similarity index 100% rename from cassandra-driver/tsconfig.json rename to types/cassandra-driver/tsconfig.json diff --git a/cbor/cbor-tests.ts b/types/cbor/cbor-tests.ts similarity index 100% rename from cbor/cbor-tests.ts rename to types/cbor/cbor-tests.ts diff --git a/cbor/index.d.ts b/types/cbor/index.d.ts similarity index 100% rename from cbor/index.d.ts rename to types/cbor/index.d.ts diff --git a/cbor/tsconfig.json b/types/cbor/tsconfig.json similarity index 100% rename from cbor/tsconfig.json rename to types/cbor/tsconfig.json diff --git a/chai-as-promised/chai-as-promised-tests.ts b/types/chai-as-promised/chai-as-promised-tests.ts similarity index 99% rename from chai-as-promised/chai-as-promised-tests.ts rename to types/chai-as-promised/chai-as-promised-tests.ts index d9f681769b..7dceef924a 100644 --- a/chai-as-promised/chai-as-promised-tests.ts +++ b/types/chai-as-promised/chai-as-promised-tests.ts @@ -1,6 +1,5 @@ import chai = require('chai'); import chaiAsPromised = require('chai-as-promised'); -import Q = require('q'); chai.use(chaiAsPromised); @@ -45,7 +44,7 @@ thenableNum.should.be.fulfilled.then(function () { thenableNum.should.equal("after"); }).should.notify(() => console.log('done')); -Q.all([ +Promise.all([ thenableNum.should.become("happy"), thenableNum.should.eventually.have.property("fun times"), thenableNum.should.be.rejectedWith(TypeError, "only joyful types are allowed") diff --git a/chai-as-promised/index.d.ts b/types/chai-as-promised/index.d.ts similarity index 100% rename from chai-as-promised/index.d.ts rename to types/chai-as-promised/index.d.ts diff --git a/chai-as-promised/tsconfig.json b/types/chai-as-promised/tsconfig.json similarity index 100% rename from chai-as-promised/tsconfig.json rename to types/chai-as-promised/tsconfig.json diff --git a/chai-datetime/chai-datetime-tests.ts b/types/chai-datetime/chai-datetime-tests.ts similarity index 100% rename from chai-datetime/chai-datetime-tests.ts rename to types/chai-datetime/chai-datetime-tests.ts diff --git a/chai-datetime/index.d.ts b/types/chai-datetime/index.d.ts similarity index 100% rename from chai-datetime/index.d.ts rename to types/chai-datetime/index.d.ts diff --git a/chai-datetime/tsconfig.json b/types/chai-datetime/tsconfig.json similarity index 100% rename from chai-datetime/tsconfig.json rename to types/chai-datetime/tsconfig.json diff --git a/chai-dom/chai-dom-tests.ts b/types/chai-dom/chai-dom-tests.ts similarity index 100% rename from chai-dom/chai-dom-tests.ts rename to types/chai-dom/chai-dom-tests.ts diff --git a/chai-dom/index.d.ts b/types/chai-dom/index.d.ts similarity index 100% rename from chai-dom/index.d.ts rename to types/chai-dom/index.d.ts diff --git a/chai-dom/tsconfig.json b/types/chai-dom/tsconfig.json similarity index 100% rename from chai-dom/tsconfig.json rename to types/chai-dom/tsconfig.json diff --git a/chai-enzyme/chai-enzyme-tests.tsx b/types/chai-enzyme/chai-enzyme-tests.tsx similarity index 100% rename from chai-enzyme/chai-enzyme-tests.tsx rename to types/chai-enzyme/chai-enzyme-tests.tsx diff --git a/chai-enzyme/index.d.ts b/types/chai-enzyme/index.d.ts similarity index 100% rename from chai-enzyme/index.d.ts rename to types/chai-enzyme/index.d.ts diff --git a/chai-enzyme/tsconfig.json b/types/chai-enzyme/tsconfig.json similarity index 100% rename from chai-enzyme/tsconfig.json rename to types/chai-enzyme/tsconfig.json diff --git a/chai-fuzzy/chai-fuzzy-tests.ts b/types/chai-fuzzy/chai-fuzzy-tests.ts similarity index 100% rename from chai-fuzzy/chai-fuzzy-tests.ts rename to types/chai-fuzzy/chai-fuzzy-tests.ts diff --git a/chai-fuzzy/index.d.ts b/types/chai-fuzzy/index.d.ts similarity index 100% rename from chai-fuzzy/index.d.ts rename to types/chai-fuzzy/index.d.ts diff --git a/chai-fuzzy/tsconfig.json b/types/chai-fuzzy/tsconfig.json similarity index 100% rename from chai-fuzzy/tsconfig.json rename to types/chai-fuzzy/tsconfig.json diff --git a/chai-http/chai-http-tests.ts b/types/chai-http/chai-http-tests.ts similarity index 100% rename from chai-http/chai-http-tests.ts rename to types/chai-http/chai-http-tests.ts diff --git a/chai-http/index.d.ts b/types/chai-http/index.d.ts similarity index 100% rename from chai-http/index.d.ts rename to types/chai-http/index.d.ts diff --git a/chai-http/tsconfig.json b/types/chai-http/tsconfig.json similarity index 100% rename from chai-http/tsconfig.json rename to types/chai-http/tsconfig.json diff --git a/chai-jquery/chai-jquery-tests.ts b/types/chai-jquery/chai-jquery-tests.ts similarity index 100% rename from chai-jquery/chai-jquery-tests.ts rename to types/chai-jquery/chai-jquery-tests.ts diff --git a/chai-jquery/index.d.ts b/types/chai-jquery/index.d.ts similarity index 100% rename from chai-jquery/index.d.ts rename to types/chai-jquery/index.d.ts diff --git a/chai-jquery/tsconfig.json b/types/chai-jquery/tsconfig.json similarity index 100% rename from chai-jquery/tsconfig.json rename to types/chai-jquery/tsconfig.json diff --git a/chai-json-schema/chai-json-schema-tests.ts b/types/chai-json-schema/chai-json-schema-tests.ts similarity index 99% rename from chai-json-schema/chai-json-schema-tests.ts rename to types/chai-json-schema/chai-json-schema-tests.ts index 5d4715a76e..7273ac60cc 100644 --- a/chai-json-schema/chai-json-schema-tests.ts +++ b/types/chai-json-schema/chai-json-schema-tests.ts @@ -65,4 +65,3 @@ const data2 = [true, 123]; expect(chai.tv4.validate(data1, schema)).to.be.true; expect(chai.tv4.validate(data2, schema)).to.be.false; - diff --git a/chai-json-schema/index.d.ts b/types/chai-json-schema/index.d.ts similarity index 87% rename from chai-json-schema/index.d.ts rename to types/chai-json-schema/index.d.ts index 1498510f9f..69aec8bec7 100644 --- a/chai-json-schema/index.d.ts +++ b/types/chai-json-schema/index.d.ts @@ -9,16 +9,16 @@ import tv4 = require('tv4'); declare global { namespace Chai { - export interface Assert { + interface Assert { jsonSchema(value: any, schema: any, msg?: string): void; notJsonSchema(value: any, schema: any, msg?: string): void; } - export interface LanguageChains { + interface LanguageChains { jsonSchema(schema: any, msg?: string): void; } - export interface ChaiStatic { + interface ChaiStatic { tv4: tv4.TV4; } } diff --git a/chai-json-schema/tsconfig.json b/types/chai-json-schema/tsconfig.json similarity index 100% rename from chai-json-schema/tsconfig.json rename to types/chai-json-schema/tsconfig.json diff --git a/chai-json-schema/tslint.json b/types/chai-json-schema/tslint.json similarity index 100% rename from chai-json-schema/tslint.json rename to types/chai-json-schema/tslint.json diff --git a/chai-oequal/chai-oequal-tests.ts b/types/chai-oequal/chai-oequal-tests.ts similarity index 100% rename from chai-oequal/chai-oequal-tests.ts rename to types/chai-oequal/chai-oequal-tests.ts diff --git a/chai-oequal/index.d.ts b/types/chai-oequal/index.d.ts similarity index 100% rename from chai-oequal/index.d.ts rename to types/chai-oequal/index.d.ts diff --git a/chai-oequal/tsconfig.json b/types/chai-oequal/tsconfig.json similarity index 100% rename from chai-oequal/tsconfig.json rename to types/chai-oequal/tsconfig.json diff --git a/chai-oequal/tslint.json b/types/chai-oequal/tslint.json similarity index 100% rename from chai-oequal/tslint.json rename to types/chai-oequal/tslint.json diff --git a/chai-spies/chai-spies-tests.ts b/types/chai-spies/chai-spies-tests.ts similarity index 100% rename from chai-spies/chai-spies-tests.ts rename to types/chai-spies/chai-spies-tests.ts diff --git a/chai-spies/index.d.ts b/types/chai-spies/index.d.ts similarity index 100% rename from chai-spies/index.d.ts rename to types/chai-spies/index.d.ts diff --git a/chai-spies/tsconfig.json b/types/chai-spies/tsconfig.json similarity index 100% rename from chai-spies/tsconfig.json rename to types/chai-spies/tsconfig.json diff --git a/chai-string/chai-string-tests.ts b/types/chai-string/chai-string-tests.ts similarity index 100% rename from chai-string/chai-string-tests.ts rename to types/chai-string/chai-string-tests.ts diff --git a/chai-string/index.d.ts b/types/chai-string/index.d.ts similarity index 100% rename from chai-string/index.d.ts rename to types/chai-string/index.d.ts diff --git a/chai-string/tsconfig.json b/types/chai-string/tsconfig.json similarity index 100% rename from chai-string/tsconfig.json rename to types/chai-string/tsconfig.json diff --git a/chai-subset/chai-subset-tests.ts b/types/chai-subset/chai-subset-tests.ts similarity index 85% rename from chai-subset/chai-subset-tests.ts rename to types/chai-subset/chai-subset-tests.ts index 33cf036cf8..717f86cb33 100644 --- a/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/chai-subset/index.d.ts b/types/chai-subset/index.d.ts similarity index 100% rename from chai-subset/index.d.ts rename to types/chai-subset/index.d.ts diff --git a/chai-subset/tsconfig.json b/types/chai-subset/tsconfig.json similarity index 100% rename from chai-subset/tsconfig.json rename to types/chai-subset/tsconfig.json diff --git a/chai-subset/tslint.json b/types/chai-subset/tslint.json similarity index 100% rename from chai-subset/tslint.json rename to types/chai-subset/tslint.json diff --git a/chai-things/chai-things-tests.ts b/types/chai-things/chai-things-tests.ts similarity index 100% rename from chai-things/chai-things-tests.ts rename to types/chai-things/chai-things-tests.ts diff --git a/chai-things/index.d.ts b/types/chai-things/index.d.ts similarity index 100% rename from chai-things/index.d.ts rename to types/chai-things/index.d.ts diff --git a/chai-things/tsconfig.json b/types/chai-things/tsconfig.json similarity index 100% rename from chai-things/tsconfig.json rename to types/chai-things/tsconfig.json diff --git a/chai-xml/chai-xml-tests.ts b/types/chai-xml/chai-xml-tests.ts similarity index 100% rename from chai-xml/chai-xml-tests.ts rename to types/chai-xml/chai-xml-tests.ts diff --git a/chai-xml/index.d.ts b/types/chai-xml/index.d.ts similarity index 100% rename from chai-xml/index.d.ts rename to types/chai-xml/index.d.ts diff --git a/chai-xml/tsconfig.json b/types/chai-xml/tsconfig.json similarity index 100% rename from chai-xml/tsconfig.json rename to types/chai-xml/tsconfig.json diff --git a/chai-xml/tslint.json b/types/chai-xml/tslint.json similarity index 100% rename from chai-xml/tslint.json rename to types/chai-xml/tslint.json diff --git a/chai/chai-tests.ts b/types/chai/chai-tests.ts similarity index 100% rename from chai/chai-tests.ts rename to types/chai/chai-tests.ts diff --git a/chai/index.d.ts b/types/chai/index.d.ts similarity index 100% rename from chai/index.d.ts rename to types/chai/index.d.ts diff --git a/chai/tsconfig.json b/types/chai/tsconfig.json similarity index 100% rename from chai/tsconfig.json rename to types/chai/tsconfig.json diff --git a/chai/v2/index.d.ts b/types/chai/v2/index.d.ts similarity index 100% rename from chai/v2/index.d.ts rename to types/chai/v2/index.d.ts diff --git a/chai/v2/tsconfig.json b/types/chai/v2/tsconfig.json similarity index 100% rename from chai/v2/tsconfig.json rename to types/chai/v2/tsconfig.json diff --git a/chalk/chalk-tests.ts b/types/chalk/chalk-tests.ts similarity index 100% rename from chalk/chalk-tests.ts rename to types/chalk/chalk-tests.ts diff --git a/chalk/index.d.ts b/types/chalk/index.d.ts similarity index 100% rename from chalk/index.d.ts rename to types/chalk/index.d.ts diff --git a/chalk/tsconfig.json b/types/chalk/tsconfig.json similarity index 100% rename from chalk/tsconfig.json rename to types/chalk/tsconfig.json diff --git a/chance/chance-tests.ts b/types/chance/chance-tests.ts similarity index 100% rename from chance/chance-tests.ts rename to types/chance/chance-tests.ts diff --git a/chance/index.d.ts b/types/chance/index.d.ts similarity index 100% rename from chance/index.d.ts rename to types/chance/index.d.ts diff --git a/chance/tsconfig.json b/types/chance/tsconfig.json similarity index 100% rename from chance/tsconfig.json rename to types/chance/tsconfig.json diff --git a/change-emitter/change-emitter-tests.ts b/types/change-emitter/change-emitter-tests.ts similarity index 100% rename from change-emitter/change-emitter-tests.ts rename to types/change-emitter/change-emitter-tests.ts diff --git a/change-emitter/index.d.ts b/types/change-emitter/index.d.ts similarity index 100% rename from change-emitter/index.d.ts rename to types/change-emitter/index.d.ts diff --git a/change-emitter/tsconfig.json b/types/change-emitter/tsconfig.json similarity index 100% rename from change-emitter/tsconfig.json rename to types/change-emitter/tsconfig.json diff --git a/charm/charm-tests.ts b/types/charm/charm-tests.ts similarity index 100% rename from charm/charm-tests.ts rename to types/charm/charm-tests.ts diff --git a/charm/index.d.ts b/types/charm/index.d.ts similarity index 100% rename from charm/index.d.ts rename to types/charm/index.d.ts diff --git a/charm/tsconfig.json b/types/charm/tsconfig.json similarity index 100% rename from charm/tsconfig.json rename to types/charm/tsconfig.json diff --git a/charm/tslint.json b/types/charm/tslint.json similarity index 100% rename from charm/tslint.json rename to types/charm/tslint.json diff --git a/chart.js/chart.js-tests.ts b/types/chart.js/chart.js-tests.ts similarity index 100% rename from chart.js/chart.js-tests.ts rename to types/chart.js/chart.js-tests.ts diff --git a/chart.js/index.d.ts b/types/chart.js/index.d.ts similarity index 99% rename from chart.js/index.d.ts rename to types/chart.js/index.d.ts index 43192689c1..cad58a2aa8 100644 --- a/chart.js/index.d.ts +++ b/types/chart.js/index.d.ts @@ -413,16 +413,16 @@ declare namespace Chart { } export interface TimeScale extends ChartScales { - format?: string; displayFormats?: TimeDisplayFormat; isoWeekday?: boolean; max?: string; min?: string; parser?: string | ((arg: any) => any); - round?: string; + round?: TimeUnit; tooltipFormat?: string; unit?: TimeUnit; unitStepSize?: number; + minUnit?: TimeUnit; } export interface RadialLinearScale { diff --git a/chart.js/tsconfig.json b/types/chart.js/tsconfig.json similarity index 100% rename from chart.js/tsconfig.json rename to types/chart.js/tsconfig.json diff --git a/chartist/chartist-tests.ts b/types/chartist/chartist-tests.ts similarity index 100% rename from chartist/chartist-tests.ts rename to types/chartist/chartist-tests.ts diff --git a/chartist/index.d.ts b/types/chartist/index.d.ts similarity index 100% rename from chartist/index.d.ts rename to types/chartist/index.d.ts diff --git a/chartist/tsconfig.json b/types/chartist/tsconfig.json similarity index 100% rename from chartist/tsconfig.json rename to types/chartist/tsconfig.json diff --git a/chartjs/chartjs-tests.ts b/types/chartjs/chartjs-tests.ts similarity index 100% rename from chartjs/chartjs-tests.ts rename to types/chartjs/chartjs-tests.ts diff --git a/chartjs/index.d.ts b/types/chartjs/index.d.ts similarity index 100% rename from chartjs/index.d.ts rename to types/chartjs/index.d.ts diff --git a/chartjs/tsconfig.json b/types/chartjs/tsconfig.json similarity index 100% rename from chartjs/tsconfig.json rename to types/chartjs/tsconfig.json diff --git a/cheap-ruler/cheap-ruler-tests.ts b/types/cheap-ruler/cheap-ruler-tests.ts similarity index 100% rename from cheap-ruler/cheap-ruler-tests.ts rename to types/cheap-ruler/cheap-ruler-tests.ts diff --git a/cheap-ruler/index.d.ts b/types/cheap-ruler/index.d.ts similarity index 100% rename from cheap-ruler/index.d.ts rename to types/cheap-ruler/index.d.ts diff --git a/cheap-ruler/tsconfig.json b/types/cheap-ruler/tsconfig.json similarity index 100% rename from cheap-ruler/tsconfig.json rename to types/cheap-ruler/tsconfig.json diff --git a/checkstyle-formatter/index.d.ts b/types/checkstyle-formatter/index.d.ts similarity index 100% rename from checkstyle-formatter/index.d.ts rename to types/checkstyle-formatter/index.d.ts diff --git a/checkstyle-formatter/tsconfig.json b/types/checkstyle-formatter/tsconfig.json similarity index 100% rename from checkstyle-formatter/tsconfig.json rename to types/checkstyle-formatter/tsconfig.json diff --git a/checkstyle-formatter/tslint.json b/types/checkstyle-formatter/tslint.json similarity index 100% rename from checkstyle-formatter/tslint.json rename to types/checkstyle-formatter/tslint.json diff --git a/checksum/checksum-tests.ts b/types/checksum/checksum-tests.ts similarity index 100% rename from checksum/checksum-tests.ts rename to types/checksum/checksum-tests.ts diff --git a/checksum/index.d.ts b/types/checksum/index.d.ts similarity index 100% rename from checksum/index.d.ts rename to types/checksum/index.d.ts diff --git a/checksum/tsconfig.json b/types/checksum/tsconfig.json similarity index 100% rename from checksum/tsconfig.json rename to types/checksum/tsconfig.json diff --git a/cheerio/cheerio-tests.ts b/types/cheerio/cheerio-tests.ts similarity index 100% rename from cheerio/cheerio-tests.ts rename to types/cheerio/cheerio-tests.ts diff --git a/cheerio/index.d.ts b/types/cheerio/index.d.ts similarity index 99% rename from cheerio/index.d.ts rename to types/cheerio/index.d.ts index f3615674f5..4096a0f9c2 100644 --- a/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/cheerio/tsconfig.json b/types/cheerio/tsconfig.json similarity index 100% rename from cheerio/tsconfig.json rename to types/cheerio/tsconfig.json diff --git a/chocolatechipjs/chocolatechipjs-tests.ts b/types/chocolatechipjs/chocolatechipjs-tests.ts similarity index 100% rename from chocolatechipjs/chocolatechipjs-tests.ts rename to types/chocolatechipjs/chocolatechipjs-tests.ts diff --git a/chocolatechipjs/index.d.ts b/types/chocolatechipjs/index.d.ts similarity index 100% rename from chocolatechipjs/index.d.ts rename to types/chocolatechipjs/index.d.ts diff --git a/chocolatechipjs/tsconfig.json b/types/chocolatechipjs/tsconfig.json similarity index 100% rename from chocolatechipjs/tsconfig.json rename to types/chocolatechipjs/tsconfig.json diff --git a/types/chokidar/chokidar-tests.ts b/types/chokidar/chokidar-tests.ts new file mode 100644 index 0000000000..13e5fe6a90 --- /dev/null +++ b/types/chokidar/chokidar-tests.ts @@ -0,0 +1,57 @@ +import * as fs from 'fs'; +import chokidar = require('chokidar'); + +const watcher = chokidar.watch('file, dir, or glob', { + ignored: /[\/\\]\./, persistent: true +}); + +const log = console.log.bind(console); + +watcher + .on('add', (path: string) => { + log('File', path, 'has been added'); + }) + .on('addDir', (path: string) => { + log('Directory', path, 'has been added'); + }) + .on('change', (path: string) => { + log('File', path, 'has been changed'); + }) + .on('unlink', (path: string) => { + log('File', path, 'has been removed'); + }) + .on('unlinkDir', (path: string) => { + log('Directory', path, 'has been removed'); + }) + .on('error', (error: any) => { + log('Error happened', error); + }) + .on('ready', () => { + log('Initial scan complete. Ready for changes.'); + }) + .on('raw', (event: string, path: string, details: any) => { + log('Raw event info:', event, path, details); + }); + +// 'add', 'addDir' and 'change' events also receive stat() results as second +// argument when available: http://nodejs.org/api/fs.html#fs_class_fs_stats +watcher.on('change', (path: string, stats: fs.Stats) => { + if (stats) { + console.log('File', path, 'changed size to', stats.size); + } +}); + +// Watch new files. +watcher.add('new-file'); +watcher.add(['new-file-2', 'new-file-3', '**/other-file*']); + +// Un-watch some files. +watcher.unwatch('new-file*'); + +// Only needed if watching is `persistent: true`. +watcher.close(); + +// One-liner +chokidar.watch('.', { ignored: /[\/\\]\./ }).on('all', (event: string, path: string) => { + console.log(event, path); +}); diff --git a/types/chokidar/index.d.ts b/types/chokidar/index.d.ts new file mode 100644 index 0000000000..dd0569656c --- /dev/null +++ b/types/chokidar/index.d.ts @@ -0,0 +1,160 @@ +// Type definitions for chokidar 1.6.1 +// Project: https://github.com/paulmillr/chokidar +// Definitions by: Stefan Steinhart , Felix Becker +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +import * as fs from 'fs'; +import {EventEmitter} from 'events'; + +/** + * The object's keys are all the directories (using absolute paths unless the `cwd` option was + * used), and the values are arrays of the names of the items contained in each directory. + */ +export interface WatchedPaths { + [directory: string]: string[]; +} + +export class FSWatcher extends EventEmitter implements fs.FSWatcher { + + /** + * Add files, directories, or glob patterns for tracking. Takes an array of strings or just one + * string. + */ + add(paths: string | string[]): void; + + /** + * Stop watching files, directories, or glob patterns. Takes an array of strings or just one + * string. + */ + unwatch(paths: string | string[]): void; + + /** + * Returns an object representing all the paths on the file system being watched by this + * `FSWatcher` instance. The object's keys are all the directories (using absolute paths unless + * the `cwd` option was used), and the values are arrays of the names of the items contained in + * each directory. + */ + getWatched(): WatchedPaths; + + /** + * Removes all listeners from watched files. + */ + close(): void; +} + +export interface WatchOptions { + + /** + * Indicates whether the process should continue to run as long as files are being watched. If + * set to `false` when using `fsevents` to watch, no more events will be emitted after `ready`, + * even if the process continues to run. + */ + persistent?: boolean; + + /** + * ([anymatch](https://github.com/es128/anymatch)-compatible definition) Defines files/paths to + * be ignored. The whole relative or absolute path is tested, not just filename. If a function + * with two arguments is provided, it gets called twice per path - once with a single argument + * (the path), second time with two arguments (the path and the + * [`fs.Stats`](http://nodejs.org/api/fs.html#fs_class_fs_stats) object of that path). + */ + ignored?: any; + + /** + * If set to `false` then `add`/`addDir` events are also emitted for matching paths while + * instantiating the watching as chokidar discovers these file paths (before the `ready` event). + */ + ignoreInitial?: boolean; + + /** + * When `false`, only the symlinks themselves will be watched for changes instead of following + * the link references and bubbling events through the link's path. + */ + followSymlinks?: boolean; + + /** + * The base directory from which watch `paths` are to be derived. Paths emitted with events will + * be relative to this. + */ + cwd?: string; + + /** + * Whether to use fs.watchFile (backed by polling), or fs.watch. If polling leads to high CPU + * utilization, consider setting this to `false`. It is typically necessary to **set this to + * `true` to successfully watch files over a network**, and it may be necessary to successfully + * watch files in other non-standard situations. Setting to `true` explicitly on OS X overrides + * the `useFsEvents` default. + */ + usePolling?: boolean; + + /** + * Whether to use the `fsevents` watching interface if available. When set to `true` explicitly + * and `fsevents` is available this supercedes the `usePolling` setting. When set to `false` on + * OS X, `usePolling: true` becomes the default. + */ + useFsEvents?: boolean; + + /** + * If relying upon the [`fs.Stats`](http://nodejs.org/api/fs.html#fs_class_fs_stats) object that + * may get passed with `add`, `addDir`, and `change` events, set this to `true` to ensure it is + * provided even in cases where it wasn't already available from the underlying watch events. + */ + alwaysStat?: boolean; + + /** + * If set, limits how many levels of subdirectories will be traversed. + */ + depth?: number; + + /** + * Interval of file system polling. + */ + interval?: number; + + /** + * Interval of file system polling for binary files. ([see list of binary extensions](https://gi + * thub.com/sindresorhus/binary-extensions/blob/master/binary-extensions.json)) + */ + binaryInterval?: number; + + /** + * Indicates whether to watch files that don't have read permissions if possible. If watching + * fails due to `EPERM` or `EACCES` with this set to `true`, the errors will be suppressed + * silently. + */ + ignorePermissionErrors?: boolean; + + /** + * `true` if `useFsEvents` and `usePolling` are `false`). Automatically filters out artifacts + * that occur when using editors that use "atomic writes" instead of writing directly to the + * source file. If a file is re-added within 100 ms of being deleted, Chokidar emits a `change` + * event rather than `unlink` then `add`. If the default of 100 ms does not work well for you, + * you can override it by setting `atomic` to a custom value, in milliseconds. + */ + atomic?: boolean | number; + + /** + * can be set to an object in order to adjust timing params: + */ + awaitWriteFinish?: AwaitWriteFinishOptions; +} + +export interface AwaitWriteFinishOptions { + + /** + * Amount of time in milliseconds for a file size to remain constant before emitting its event. + */ + stabilityThreshold?: number; + + /** + * File size polling interval. + */ + pollInterval?: number; +} + +/** + * produces an instance of `FSWatcher`. + */ +export function watch(paths: string | string[], options?: WatchOptions): FSWatcher; diff --git a/chokidar/tsconfig.json b/types/chokidar/tsconfig.json similarity index 100% rename from chokidar/tsconfig.json rename to types/chokidar/tsconfig.json diff --git a/chosen-js/chosen-js-tests.ts b/types/chosen-js/chosen-js-tests.ts similarity index 100% rename from chosen-js/chosen-js-tests.ts rename to types/chosen-js/chosen-js-tests.ts diff --git a/chosen-js/index.d.ts b/types/chosen-js/index.d.ts similarity index 100% rename from chosen-js/index.d.ts rename to types/chosen-js/index.d.ts diff --git a/chosen-js/tsconfig.json b/types/chosen-js/tsconfig.json similarity index 100% rename from chosen-js/tsconfig.json rename to types/chosen-js/tsconfig.json diff --git a/chroma-js/chroma-js-tests.ts b/types/chroma-js/chroma-js-tests.ts similarity index 100% rename from chroma-js/chroma-js-tests.ts rename to types/chroma-js/chroma-js-tests.ts diff --git a/chroma-js/index.d.ts b/types/chroma-js/index.d.ts similarity index 100% rename from chroma-js/index.d.ts rename to types/chroma-js/index.d.ts diff --git a/chroma-js/tsconfig.json b/types/chroma-js/tsconfig.json similarity index 100% rename from chroma-js/tsconfig.json rename to types/chroma-js/tsconfig.json diff --git a/chroma-js/v0/chroma-js-tests.ts b/types/chroma-js/v0/chroma-js-tests.ts similarity index 100% rename from chroma-js/v0/chroma-js-tests.ts rename to types/chroma-js/v0/chroma-js-tests.ts diff --git a/chroma-js/v0/index.d.ts b/types/chroma-js/v0/index.d.ts similarity index 100% rename from chroma-js/v0/index.d.ts rename to types/chroma-js/v0/index.d.ts diff --git a/chroma-js/v0/tsconfig.json b/types/chroma-js/v0/tsconfig.json similarity index 100% rename from chroma-js/v0/tsconfig.json rename to types/chroma-js/v0/tsconfig.json diff --git a/chrome/chrome-app.d.ts b/types/chrome/chrome-app.d.ts similarity index 100% rename from chrome/chrome-app.d.ts rename to types/chrome/chrome-app.d.ts diff --git a/chrome/chrome-cast.d.ts b/types/chrome/chrome-cast.d.ts similarity index 100% rename from chrome/chrome-cast.d.ts rename to types/chrome/chrome-cast.d.ts diff --git a/chrome/index.d.ts b/types/chrome/index.d.ts similarity index 99% rename from chrome/index.d.ts rename to types/chrome/index.d.ts index b7b6de0076..8c0c3bf5f2 100644 --- a/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; } //////////////////// @@ -5974,6 +6000,12 @@ declare namespace chrome.tabs { runAt?: string; /** Optional. JavaScript or CSS file to inject. */ file?: string; + /** + * Optional. + * The frame where the script or CSS should be injected. Defaults to 0 (the top-level frame). + * @since Chrome 39. + */ + frameId?: number; /** * Optional. * If matchAboutBlank is true, then the code is also injected in about:blank and about:srcdoc frames if your extension has access to its parent document. Code cannot be inserted in top-level about:-frames. By default it is false. @@ -6557,6 +6589,12 @@ declare namespace chrome.tabs { * @since Chrome 38. */ var onZoomChange: TabZoomChangeEvent; + + /** + * An ID which represents the absence of a browser tab. + * @since Chrome 46. + */ + var TAB_ID_NONE: -1; } //////////////////// diff --git a/chrome/test/chrome-app.ts b/types/chrome/test/chrome-app.ts similarity index 100% rename from chrome/test/chrome-app.ts rename to types/chrome/test/chrome-app.ts diff --git a/chrome/test/index.ts b/types/chrome/test/index.ts similarity index 94% rename from chrome/test/index.ts rename to types/chrome/test/index.ts index 3074b8a0c3..3da3f534be 100644 --- a/chrome/test/index.ts +++ b/types/chrome/test/index.ts @@ -194,6 +194,35 @@ function beforeRedditNavigation() { },{urls: ["http://*/*"], types: ["image"]}); } +// for chrome.tabs.InjectDetails.frameId +function executeScriptFramed () { + + const tabId = 123; + const frameId = 0; + + const code = "alert('hi');"; + + chrome.tabs.executeScript({frameId, code}); + chrome.tabs.insertCSS({frameId, code}); + + chrome.tabs.executeScript(tabId, {frameId, code}); + chrome.tabs.insertCSS(tabId, {frameId, code}); + +} + +// for chrome.tabs.TAB_ID_NONE +function realTabsOnly () { + chrome.webRequest.onBeforeRequest.addListener(function (details) { + if (details.tabId === chrome.tabs.TAB_ID_NONE) { + console.log("Request not related to a tab. %o", details); + return; + } + // ... + }, { + urls: [""] + }); +} + // contrived settings example function proxySettings() { chrome.proxy.settings.get({ incognito: true }, (details) => { diff --git a/chrome/tsconfig.json b/types/chrome/tsconfig.json similarity index 100% rename from chrome/tsconfig.json rename to types/chrome/tsconfig.json diff --git a/chui/chui-tests.ts b/types/chui/chui-tests.ts similarity index 100% rename from chui/chui-tests.ts rename to types/chui/chui-tests.ts diff --git a/chui/index.d.ts b/types/chui/index.d.ts similarity index 100% rename from chui/index.d.ts rename to types/chui/index.d.ts diff --git a/chui/tsconfig.json b/types/chui/tsconfig.json similarity index 100% rename from chui/tsconfig.json rename to types/chui/tsconfig.json diff --git a/chunked-dc/chunked-dc-tests.ts b/types/chunked-dc/chunked-dc-tests.ts similarity index 100% rename from chunked-dc/chunked-dc-tests.ts rename to types/chunked-dc/chunked-dc-tests.ts diff --git a/chunked-dc/index.d.ts b/types/chunked-dc/index.d.ts similarity index 100% rename from chunked-dc/index.d.ts rename to types/chunked-dc/index.d.ts diff --git a/chunked-dc/tsconfig.json b/types/chunked-dc/tsconfig.json similarity index 100% rename from chunked-dc/tsconfig.json rename to types/chunked-dc/tsconfig.json diff --git a/chunked-dc/tslint.json b/types/chunked-dc/tslint.json similarity index 100% rename from chunked-dc/tslint.json rename to types/chunked-dc/tslint.json diff --git a/circular-json/circular-json-tests.ts b/types/circular-json/circular-json-tests.ts similarity index 100% rename from circular-json/circular-json-tests.ts rename to types/circular-json/circular-json-tests.ts diff --git a/circular-json/index.d.ts b/types/circular-json/index.d.ts similarity index 100% rename from circular-json/index.d.ts rename to types/circular-json/index.d.ts diff --git a/circular-json/tsconfig.json b/types/circular-json/tsconfig.json similarity index 100% rename from circular-json/tsconfig.json rename to types/circular-json/tsconfig.json diff --git a/ckeditor/ckeditor-tests.ts b/types/ckeditor/ckeditor-tests.ts similarity index 100% rename from ckeditor/ckeditor-tests.ts rename to types/ckeditor/ckeditor-tests.ts diff --git a/ckeditor/index.d.ts b/types/ckeditor/index.d.ts similarity index 100% rename from ckeditor/index.d.ts rename to types/ckeditor/index.d.ts diff --git a/ckeditor/tsconfig.json b/types/ckeditor/tsconfig.json similarity index 100% rename from ckeditor/tsconfig.json rename to types/ckeditor/tsconfig.json diff --git a/clamp-js/clamp-js-tests.ts b/types/clamp-js/clamp-js-tests.ts old mode 100755 new mode 100644 similarity index 100% rename from clamp-js/clamp-js-tests.ts rename to types/clamp-js/clamp-js-tests.ts diff --git a/clamp-js/index.d.ts b/types/clamp-js/index.d.ts old mode 100755 new mode 100644 similarity index 82% rename from clamp-js/index.d.ts rename to types/clamp-js/index.d.ts index 2e86e544f7..2fa557bac6 --- a/clamp-js/index.d.ts +++ b/types/clamp-js/index.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace clamp { - export interface ClampOptions { + interface ClampOptions { clamp?: number|string; useNativeClamp?: boolean; splitOnChars?: string[]; @@ -13,9 +13,9 @@ declare namespace clamp { truncationHTML?: string | null; } - export interface ClampResponse { - 'original': string; - 'clamped': string; + interface ClampResponse { + original: string; + clamped: string; } } diff --git a/clamp-js/tsconfig.json b/types/clamp-js/tsconfig.json old mode 100755 new mode 100644 similarity index 100% rename from clamp-js/tsconfig.json rename to types/clamp-js/tsconfig.json diff --git a/clamp-js/tslint.json b/types/clamp-js/tslint.json similarity index 100% rename from clamp-js/tslint.json rename to types/clamp-js/tslint.json diff --git a/classnames/classnames-tests.ts b/types/classnames/classnames-tests.ts similarity index 100% rename from classnames/classnames-tests.ts rename to types/classnames/classnames-tests.ts diff --git a/classnames/index.d.ts b/types/classnames/index.d.ts similarity index 100% rename from classnames/index.d.ts rename to types/classnames/index.d.ts diff --git a/classnames/tsconfig.json b/types/classnames/tsconfig.json similarity index 100% rename from classnames/tsconfig.json rename to types/classnames/tsconfig.json diff --git a/cldrjs/UNUSED_FILES.txt b/types/cldrjs/UNUSED_FILES.txt similarity index 100% rename from cldrjs/UNUSED_FILES.txt rename to types/cldrjs/UNUSED_FILES.txt diff --git a/cldrjs/cldr.js-event.d.ts b/types/cldrjs/cldr.js-event.d.ts similarity index 100% rename from cldrjs/cldr.js-event.d.ts rename to types/cldrjs/cldr.js-event.d.ts diff --git a/cldrjs/cldr.js-supplemental.d.ts b/types/cldrjs/cldr.js-supplemental.d.ts similarity index 100% rename from cldrjs/cldr.js-supplemental.d.ts rename to types/cldrjs/cldr.js-supplemental.d.ts diff --git a/cldrjs/index.d.ts b/types/cldrjs/index.d.ts similarity index 100% rename from cldrjs/index.d.ts rename to types/cldrjs/index.d.ts diff --git a/cldrjs/test/event.ts b/types/cldrjs/test/event.ts similarity index 100% rename from cldrjs/test/event.ts rename to types/cldrjs/test/event.ts diff --git a/cldrjs/test/index.ts b/types/cldrjs/test/index.ts similarity index 100% rename from cldrjs/test/index.ts rename to types/cldrjs/test/index.ts diff --git a/cldrjs/test/supplemental.ts b/types/cldrjs/test/supplemental.ts similarity index 100% rename from cldrjs/test/supplemental.ts rename to types/cldrjs/test/supplemental.ts diff --git a/cldrjs/tsconfig.json b/types/cldrjs/tsconfig.json similarity index 100% rename from cldrjs/tsconfig.json rename to types/cldrjs/tsconfig.json diff --git a/clean-css/clean-css-tests.ts b/types/clean-css/clean-css-tests.ts similarity index 100% rename from clean-css/clean-css-tests.ts rename to types/clean-css/clean-css-tests.ts diff --git a/clean-css/index.d.ts b/types/clean-css/index.d.ts similarity index 100% rename from clean-css/index.d.ts rename to types/clean-css/index.d.ts diff --git a/clean-css/tsconfig.json b/types/clean-css/tsconfig.json similarity index 100% rename from clean-css/tsconfig.json rename to types/clean-css/tsconfig.json diff --git a/cli-color/cli-color-tests.ts b/types/cli-color/cli-color-tests.ts similarity index 100% rename from cli-color/cli-color-tests.ts rename to types/cli-color/cli-color-tests.ts diff --git a/cli-color/index.d.ts b/types/cli-color/index.d.ts similarity index 100% rename from cli-color/index.d.ts rename to types/cli-color/index.d.ts diff --git a/cli-color/tsconfig.json b/types/cli-color/tsconfig.json similarity index 100% rename from cli-color/tsconfig.json rename to types/cli-color/tsconfig.json diff --git a/cli/cli-tests.ts b/types/cli/cli-tests.ts similarity index 100% rename from cli/cli-tests.ts rename to types/cli/cli-tests.ts diff --git a/cli/index.d.ts b/types/cli/index.d.ts similarity index 100% rename from cli/index.d.ts rename to types/cli/index.d.ts diff --git a/cli/tsconfig.json b/types/cli/tsconfig.json similarity index 100% rename from cli/tsconfig.json rename to types/cli/tsconfig.json diff --git a/cliff/cliff-tests.ts b/types/cliff/cliff-tests.ts similarity index 100% rename from cliff/cliff-tests.ts rename to types/cliff/cliff-tests.ts diff --git a/cliff/index.d.ts b/types/cliff/index.d.ts similarity index 100% rename from cliff/index.d.ts rename to types/cliff/index.d.ts diff --git a/cliff/tsconfig.json b/types/cliff/tsconfig.json similarity index 100% rename from cliff/tsconfig.json rename to types/cliff/tsconfig.json diff --git a/clipboard-js/clipboard-js-tests.ts b/types/clipboard-js/clipboard-js-tests.ts similarity index 100% rename from clipboard-js/clipboard-js-tests.ts rename to types/clipboard-js/clipboard-js-tests.ts diff --git a/clipboard-js/index.d.ts b/types/clipboard-js/index.d.ts similarity index 100% rename from clipboard-js/index.d.ts rename to types/clipboard-js/index.d.ts diff --git a/clipboard-js/tsconfig.json b/types/clipboard-js/tsconfig.json similarity index 100% rename from clipboard-js/tsconfig.json rename to types/clipboard-js/tsconfig.json diff --git a/clipboard/clipboard-tests.ts b/types/clipboard/clipboard-tests.ts similarity index 63% rename from clipboard/clipboard-tests.ts rename to types/clipboard/clipboard-tests.ts index 5af2671671..23de4c89e6 100644 --- a/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/clipboard/index.d.ts b/types/clipboard/index.d.ts similarity index 98% rename from clipboard/index.d.ts rename to types/clipboard/index.d.ts index ec03d9bee5..5f12a41d5f 100644 --- a/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/clipboard/tsconfig.json b/types/clipboard/tsconfig.json similarity index 100% rename from clipboard/tsconfig.json rename to types/clipboard/tsconfig.json diff --git a/clipboard/tslint.json b/types/clipboard/tslint.json similarity index 100% rename from clipboard/tslint.json rename to types/clipboard/tslint.json diff --git a/clndr/clndr-tests.ts b/types/clndr/clndr-tests.ts similarity index 100% rename from clndr/clndr-tests.ts rename to types/clndr/clndr-tests.ts diff --git a/clndr/index.d.ts b/types/clndr/index.d.ts similarity index 100% rename from clndr/index.d.ts rename to types/clndr/index.d.ts diff --git a/clndr/package.json b/types/clndr/package.json similarity index 100% rename from clndr/package.json rename to types/clndr/package.json diff --git a/clndr/tsconfig.json b/types/clndr/tsconfig.json similarity index 100% rename from clndr/tsconfig.json rename to types/clndr/tsconfig.json diff --git a/clndr/tslint.json b/types/clndr/tslint.json similarity index 100% rename from clndr/tslint.json rename to types/clndr/tslint.json diff --git a/clone/clone-tests.ts b/types/clone/clone-tests.ts similarity index 100% rename from clone/clone-tests.ts rename to types/clone/clone-tests.ts diff --git a/clone/index.d.ts b/types/clone/index.d.ts similarity index 100% rename from clone/index.d.ts rename to types/clone/index.d.ts diff --git a/clone/tsconfig.json b/types/clone/tsconfig.json similarity index 100% rename from clone/tsconfig.json rename to types/clone/tsconfig.json diff --git a/closure-compiler/closure-compiler-tests.ts b/types/closure-compiler/closure-compiler-tests.ts similarity index 100% rename from closure-compiler/closure-compiler-tests.ts rename to types/closure-compiler/closure-compiler-tests.ts diff --git a/closure-compiler/index.d.ts b/types/closure-compiler/index.d.ts similarity index 100% rename from closure-compiler/index.d.ts rename to types/closure-compiler/index.d.ts diff --git a/closure-compiler/tsconfig.json b/types/closure-compiler/tsconfig.json similarity index 100% rename from closure-compiler/tsconfig.json rename to types/closure-compiler/tsconfig.json diff --git a/co-body/co-body-tests.ts b/types/co-body/co-body-tests.ts similarity index 100% rename from co-body/co-body-tests.ts rename to types/co-body/co-body-tests.ts diff --git a/co-body/index.d.ts b/types/co-body/index.d.ts similarity index 100% rename from co-body/index.d.ts rename to types/co-body/index.d.ts diff --git a/co-body/tsconfig.json b/types/co-body/tsconfig.json similarity index 100% rename from co-body/tsconfig.json rename to types/co-body/tsconfig.json diff --git a/co-views/co-views-tests.ts b/types/co-views/co-views-tests.ts similarity index 100% rename from co-views/co-views-tests.ts rename to types/co-views/co-views-tests.ts diff --git a/co-views/index.d.ts b/types/co-views/index.d.ts similarity index 96% rename from co-views/index.d.ts rename to types/co-views/index.d.ts index 5df2238c12..3eda7191b1 100644 --- a/co-views/index.d.ts +++ b/types/co-views/index.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace CoViews { - export interface Options { + interface Options { /** * default extname */ diff --git a/co-views/tsconfig.json b/types/co-views/tsconfig.json similarity index 100% rename from co-views/tsconfig.json rename to types/co-views/tsconfig.json diff --git a/co-views/tslint.json b/types/co-views/tslint.json similarity index 100% rename from co-views/tslint.json rename to types/co-views/tslint.json diff --git a/code/code-tests.ts b/types/code/code-tests.ts similarity index 100% rename from code/code-tests.ts rename to types/code/code-tests.ts diff --git a/code/index.d.ts b/types/code/index.d.ts similarity index 100% rename from code/index.d.ts rename to types/code/index.d.ts diff --git a/code/tsconfig.json b/types/code/tsconfig.json similarity index 100% rename from code/tsconfig.json rename to types/code/tsconfig.json diff --git a/code/tslint.json b/types/code/tslint.json similarity index 100% rename from code/tslint.json rename to types/code/tslint.json diff --git a/codemirror/codemirror-matchbrackets.d.ts b/types/codemirror/codemirror-matchbrackets.d.ts similarity index 100% rename from codemirror/codemirror-matchbrackets.d.ts rename to types/codemirror/codemirror-matchbrackets.d.ts diff --git a/codemirror/codemirror-runmode.d.ts b/types/codemirror/codemirror-runmode.d.ts similarity index 100% rename from codemirror/codemirror-runmode.d.ts rename to types/codemirror/codemirror-runmode.d.ts diff --git a/codemirror/codemirror-showhint.d.ts b/types/codemirror/codemirror-showhint.d.ts similarity index 100% rename from codemirror/codemirror-showhint.d.ts rename to types/codemirror/codemirror-showhint.d.ts diff --git a/codemirror/index.d.ts b/types/codemirror/index.d.ts similarity index 100% rename from codemirror/index.d.ts rename to types/codemirror/index.d.ts diff --git a/codemirror/searchcursor.d.ts b/types/codemirror/searchcursor.d.ts similarity index 100% rename from codemirror/searchcursor.d.ts rename to types/codemirror/searchcursor.d.ts diff --git a/codemirror/test/index.ts b/types/codemirror/test/index.ts similarity index 100% rename from codemirror/test/index.ts rename to types/codemirror/test/index.ts diff --git a/codemirror/test/matchbrackets.ts b/types/codemirror/test/matchbrackets.ts similarity index 100% rename from codemirror/test/matchbrackets.ts rename to types/codemirror/test/matchbrackets.ts diff --git a/codemirror/test/runmode.ts b/types/codemirror/test/runmode.ts similarity index 100% rename from codemirror/test/runmode.ts rename to types/codemirror/test/runmode.ts diff --git a/codemirror/test/searchcursor.ts b/types/codemirror/test/searchcursor.ts similarity index 100% rename from codemirror/test/searchcursor.ts rename to types/codemirror/test/searchcursor.ts diff --git a/codemirror/test/showhint.ts b/types/codemirror/test/showhint.ts similarity index 100% rename from codemirror/test/showhint.ts rename to types/codemirror/test/showhint.ts diff --git a/codemirror/tsconfig.json b/types/codemirror/tsconfig.json similarity index 100% rename from codemirror/tsconfig.json rename to types/codemirror/tsconfig.json diff --git a/codependency/codependency-tests.ts b/types/codependency/codependency-tests.ts similarity index 100% rename from codependency/codependency-tests.ts rename to types/codependency/codependency-tests.ts diff --git a/codependency/index.d.ts b/types/codependency/index.d.ts similarity index 100% rename from codependency/index.d.ts rename to types/codependency/index.d.ts diff --git a/codependency/tsconfig.json b/types/codependency/tsconfig.json similarity index 100% rename from codependency/tsconfig.json rename to types/codependency/tsconfig.json diff --git a/codependency/tslint.json b/types/codependency/tslint.json similarity index 100% rename from codependency/tslint.json rename to types/codependency/tslint.json diff --git a/coffeeify/coffeeify-tests.ts b/types/coffeeify/coffeeify-tests.ts similarity index 100% rename from coffeeify/coffeeify-tests.ts rename to types/coffeeify/coffeeify-tests.ts diff --git a/coffeeify/index.d.ts b/types/coffeeify/index.d.ts similarity index 100% rename from coffeeify/index.d.ts rename to types/coffeeify/index.d.ts diff --git a/coffeeify/tsconfig.json b/types/coffeeify/tsconfig.json similarity index 100% rename from coffeeify/tsconfig.json rename to types/coffeeify/tsconfig.json diff --git a/coinstring/coinstring-tests.ts b/types/coinstring/coinstring-tests.ts similarity index 100% rename from coinstring/coinstring-tests.ts rename to types/coinstring/coinstring-tests.ts diff --git a/coinstring/index.d.ts b/types/coinstring/index.d.ts similarity index 100% rename from coinstring/index.d.ts rename to types/coinstring/index.d.ts diff --git a/coinstring/tsconfig.json b/types/coinstring/tsconfig.json similarity index 100% rename from coinstring/tsconfig.json rename to types/coinstring/tsconfig.json diff --git a/coinstring/tslint.json b/types/coinstring/tslint.json similarity index 100% rename from coinstring/tslint.json rename to types/coinstring/tslint.json diff --git a/color/color-tests.ts b/types/color/color-tests.ts similarity index 100% rename from color/color-tests.ts rename to types/color/color-tests.ts diff --git a/color/index.d.ts b/types/color/index.d.ts similarity index 100% rename from color/index.d.ts rename to types/color/index.d.ts diff --git a/color/tsconfig.json b/types/color/tsconfig.json similarity index 100% rename from color/tsconfig.json rename to types/color/tsconfig.json diff --git a/color/v0/color-tests.ts b/types/color/v0/color-tests.ts similarity index 100% rename from color/v0/color-tests.ts rename to types/color/v0/color-tests.ts diff --git a/color/v0/index.d.ts b/types/color/v0/index.d.ts similarity index 100% rename from color/v0/index.d.ts rename to types/color/v0/index.d.ts diff --git a/color/v0/tsconfig.json b/types/color/v0/tsconfig.json similarity index 100% rename from color/v0/tsconfig.json rename to types/color/v0/tsconfig.json diff --git a/colorbrewer/colorbrewer-tests.ts b/types/colorbrewer/colorbrewer-tests.ts similarity index 100% rename from colorbrewer/colorbrewer-tests.ts rename to types/colorbrewer/colorbrewer-tests.ts diff --git a/colorbrewer/index.d.ts b/types/colorbrewer/index.d.ts similarity index 100% rename from colorbrewer/index.d.ts rename to types/colorbrewer/index.d.ts diff --git a/colorbrewer/tsconfig.json b/types/colorbrewer/tsconfig.json similarity index 100% rename from colorbrewer/tsconfig.json rename to types/colorbrewer/tsconfig.json diff --git a/colors/colors-tests.ts b/types/colors/colors-tests.ts similarity index 100% rename from colors/colors-tests.ts rename to types/colors/colors-tests.ts diff --git a/colors/index.d.ts b/types/colors/index.d.ts similarity index 100% rename from colors/index.d.ts rename to types/colors/index.d.ts diff --git a/colors/safe.d.ts b/types/colors/safe.d.ts similarity index 100% rename from colors/safe.d.ts rename to types/colors/safe.d.ts diff --git a/colors/tsconfig.json b/types/colors/tsconfig.json similarity index 100% rename from colors/tsconfig.json rename to types/colors/tsconfig.json diff --git a/colors/tslint.json b/types/colors/tslint.json similarity index 100% rename from colors/tslint.json rename to types/colors/tslint.json diff --git a/com.darktalker.cordova.screenshot/com.darktalker.cordova.screenshot-tests.ts b/types/com.darktalker.cordova.screenshot/com.darktalker.cordova.screenshot-tests.ts similarity index 100% rename from com.darktalker.cordova.screenshot/com.darktalker.cordova.screenshot-tests.ts rename to types/com.darktalker.cordova.screenshot/com.darktalker.cordova.screenshot-tests.ts diff --git a/com.darktalker.cordova.screenshot/index.d.ts b/types/com.darktalker.cordova.screenshot/index.d.ts similarity index 100% rename from com.darktalker.cordova.screenshot/index.d.ts rename to types/com.darktalker.cordova.screenshot/index.d.ts diff --git a/com.darktalker.cordova.screenshot/tsconfig.json b/types/com.darktalker.cordova.screenshot/tsconfig.json similarity index 100% rename from com.darktalker.cordova.screenshot/tsconfig.json rename to types/com.darktalker.cordova.screenshot/tsconfig.json diff --git a/combined-stream/combined-stream-tests.ts b/types/combined-stream/combined-stream-tests.ts similarity index 100% rename from combined-stream/combined-stream-tests.ts rename to types/combined-stream/combined-stream-tests.ts diff --git a/combined-stream/index.d.ts b/types/combined-stream/index.d.ts similarity index 91% rename from combined-stream/index.d.ts rename to types/combined-stream/index.d.ts index cada758701..271814a4af 100644 --- a/combined-stream/index.d.ts +++ b/types/combined-stream/index.d.ts @@ -43,14 +43,14 @@ declare class CombinedStream extends Stream implements CombinedStream.Options { } declare namespace CombinedStream { - export interface Options { + interface Options { maxDataSize?: number; pauseStreams?: boolean; } - export function create(options?: Options): CombinedStream; + function create(options?: Options): CombinedStream; - export function isStreamLike(stream: any): stream is Stream; + function isStreamLike(stream: any): stream is Stream; } export = CombinedStream; diff --git a/combined-stream/tsconfig.json b/types/combined-stream/tsconfig.json similarity index 100% rename from combined-stream/tsconfig.json rename to types/combined-stream/tsconfig.json diff --git a/combined-stream/tslint.json b/types/combined-stream/tslint.json similarity index 100% rename from combined-stream/tslint.json rename to types/combined-stream/tslint.json diff --git a/combokeys/combokeys-tests.ts b/types/combokeys/combokeys-tests.ts similarity index 100% rename from combokeys/combokeys-tests.ts rename to types/combokeys/combokeys-tests.ts diff --git a/combokeys/index.d.ts b/types/combokeys/index.d.ts similarity index 100% rename from combokeys/index.d.ts rename to types/combokeys/index.d.ts diff --git a/combokeys/tsconfig.json b/types/combokeys/tsconfig.json similarity index 100% rename from combokeys/tsconfig.json rename to types/combokeys/tsconfig.json diff --git a/cometd/index.d.ts b/types/cometd/index.d.ts similarity index 100% rename from cometd/index.d.ts rename to types/cometd/index.d.ts diff --git a/cometd/tsconfig.json b/types/cometd/tsconfig.json similarity index 100% rename from cometd/tsconfig.json rename to types/cometd/tsconfig.json diff --git a/commander/commander-tests.ts b/types/commander/commander-tests.ts similarity index 100% rename from commander/commander-tests.ts rename to types/commander/commander-tests.ts diff --git a/commander/index.d.ts b/types/commander/index.d.ts similarity index 100% rename from commander/index.d.ts rename to types/commander/index.d.ts diff --git a/commander/tsconfig.json b/types/commander/tsconfig.json similarity index 100% rename from commander/tsconfig.json rename to types/commander/tsconfig.json diff --git a/commangular/commangular-mock.d.ts b/types/commangular/commangular-mock.d.ts similarity index 100% rename from commangular/commangular-mock.d.ts rename to types/commangular/commangular-mock.d.ts diff --git a/commangular/index.d.ts b/types/commangular/index.d.ts similarity index 100% rename from commangular/index.d.ts rename to types/commangular/index.d.ts diff --git a/commangular/tsconfig.json b/types/commangular/tsconfig.json similarity index 100% rename from commangular/tsconfig.json rename to types/commangular/tsconfig.json diff --git a/comment-json/comment-json-tests.ts b/types/comment-json/comment-json-tests.ts similarity index 100% rename from comment-json/comment-json-tests.ts rename to types/comment-json/comment-json-tests.ts diff --git a/comment-json/index.d.ts b/types/comment-json/index.d.ts similarity index 100% rename from comment-json/index.d.ts rename to types/comment-json/index.d.ts diff --git a/comment-json/tsconfig.json b/types/comment-json/tsconfig.json similarity index 100% rename from comment-json/tsconfig.json rename to types/comment-json/tsconfig.json diff --git a/comment-json/tslint.json b/types/comment-json/tslint.json similarity index 100% rename from comment-json/tslint.json rename to types/comment-json/tslint.json diff --git a/common-tags/common-tags-tests.ts b/types/common-tags/common-tags-tests.ts similarity index 100% rename from common-tags/common-tags-tests.ts rename to types/common-tags/common-tags-tests.ts diff --git a/common-tags/index.d.ts b/types/common-tags/index.d.ts similarity index 100% rename from common-tags/index.d.ts rename to types/common-tags/index.d.ts diff --git a/common-tags/tsconfig.json b/types/common-tags/tsconfig.json similarity index 100% rename from common-tags/tsconfig.json rename to types/common-tags/tsconfig.json diff --git a/commonmark/commonmark-tests.ts b/types/commonmark/commonmark-tests.ts similarity index 100% rename from commonmark/commonmark-tests.ts rename to types/commonmark/commonmark-tests.ts diff --git a/commonmark/index.d.ts b/types/commonmark/index.d.ts similarity index 100% rename from commonmark/index.d.ts rename to types/commonmark/index.d.ts diff --git a/commonmark/tsconfig.json b/types/commonmark/tsconfig.json similarity index 100% rename from commonmark/tsconfig.json rename to types/commonmark/tsconfig.json diff --git a/compare-version/compare-version-tests.ts b/types/compare-version/compare-version-tests.ts similarity index 100% rename from compare-version/compare-version-tests.ts rename to types/compare-version/compare-version-tests.ts diff --git a/compare-version/index.d.ts b/types/compare-version/index.d.ts similarity index 100% rename from compare-version/index.d.ts rename to types/compare-version/index.d.ts diff --git a/compare-version/tsconfig.json b/types/compare-version/tsconfig.json similarity index 100% rename from compare-version/tsconfig.json rename to types/compare-version/tsconfig.json diff --git a/complex/complex-tests.ts b/types/complex/complex-tests.ts similarity index 100% rename from complex/complex-tests.ts rename to types/complex/complex-tests.ts diff --git a/complex/index.d.ts b/types/complex/index.d.ts similarity index 100% rename from complex/index.d.ts rename to types/complex/index.d.ts diff --git a/complex/tsconfig.json b/types/complex/tsconfig.json similarity index 100% rename from complex/tsconfig.json rename to types/complex/tsconfig.json diff --git a/component-emitter/component-emitter-tests.ts b/types/component-emitter/component-emitter-tests.ts similarity index 100% rename from component-emitter/component-emitter-tests.ts rename to types/component-emitter/component-emitter-tests.ts diff --git a/component-emitter/index.d.ts b/types/component-emitter/index.d.ts similarity index 100% rename from component-emitter/index.d.ts rename to types/component-emitter/index.d.ts diff --git a/component-emitter/tsconfig.json b/types/component-emitter/tsconfig.json similarity index 100% rename from component-emitter/tsconfig.json rename to types/component-emitter/tsconfig.json diff --git a/compose-function/compose-function-tests.ts b/types/compose-function/compose-function-tests.ts similarity index 100% rename from compose-function/compose-function-tests.ts rename to types/compose-function/compose-function-tests.ts diff --git a/compose-function/index.d.ts b/types/compose-function/index.d.ts similarity index 100% rename from compose-function/index.d.ts rename to types/compose-function/index.d.ts diff --git a/compose-function/tsconfig.json b/types/compose-function/tsconfig.json similarity index 100% rename from compose-function/tsconfig.json rename to types/compose-function/tsconfig.json diff --git a/compression-webpack-plugin/compression-webpack-plugin-tests.ts b/types/compression-webpack-plugin/compression-webpack-plugin-tests.ts similarity index 100% rename from compression-webpack-plugin/compression-webpack-plugin-tests.ts rename to types/compression-webpack-plugin/compression-webpack-plugin-tests.ts diff --git a/compression-webpack-plugin/index.d.ts b/types/compression-webpack-plugin/index.d.ts similarity index 97% rename from compression-webpack-plugin/index.d.ts rename to types/compression-webpack-plugin/index.d.ts index 536a77b8e9..4f2453e3b1 100644 --- a/compression-webpack-plugin/index.d.ts +++ b/types/compression-webpack-plugin/index.d.ts @@ -12,7 +12,7 @@ declare class CompressionPlugin extends Plugin { } declare namespace CompressionPlugin { - export interface Options { + interface Options { asset?: string; algorithm?: string; test?: RegExp | RegExp[]; diff --git a/compression-webpack-plugin/tsconfig.json b/types/compression-webpack-plugin/tsconfig.json similarity index 100% rename from compression-webpack-plugin/tsconfig.json rename to types/compression-webpack-plugin/tsconfig.json diff --git a/compression-webpack-plugin/tslint.json b/types/compression-webpack-plugin/tslint.json similarity index 100% rename from compression-webpack-plugin/tslint.json rename to types/compression-webpack-plugin/tslint.json diff --git a/compression/compression-tests.ts b/types/compression/compression-tests.ts similarity index 100% rename from compression/compression-tests.ts rename to types/compression/compression-tests.ts diff --git a/compression/index.d.ts b/types/compression/index.d.ts similarity index 100% rename from compression/index.d.ts rename to types/compression/index.d.ts diff --git a/compression/tsconfig.json b/types/compression/tsconfig.json similarity index 100% rename from compression/tsconfig.json rename to types/compression/tsconfig.json diff --git a/concat-stream/concat-stream-tests.ts b/types/concat-stream/concat-stream-tests.ts similarity index 100% rename from concat-stream/concat-stream-tests.ts rename to types/concat-stream/concat-stream-tests.ts diff --git a/concat-stream/index.d.ts b/types/concat-stream/index.d.ts similarity index 100% rename from concat-stream/index.d.ts rename to types/concat-stream/index.d.ts diff --git a/concat-stream/tsconfig.json b/types/concat-stream/tsconfig.json similarity index 100% rename from concat-stream/tsconfig.json rename to types/concat-stream/tsconfig.json diff --git a/concat-stream/tslint.json b/types/concat-stream/tslint.json similarity index 100% rename from concat-stream/tslint.json rename to types/concat-stream/tslint.json diff --git a/concaveman/concaveman-tests.ts b/types/concaveman/concaveman-tests.ts similarity index 100% rename from concaveman/concaveman-tests.ts rename to types/concaveman/concaveman-tests.ts diff --git a/concaveman/index.d.ts b/types/concaveman/index.d.ts similarity index 100% rename from concaveman/index.d.ts rename to types/concaveman/index.d.ts diff --git a/concaveman/tsconfig.json b/types/concaveman/tsconfig.json similarity index 100% rename from concaveman/tsconfig.json rename to types/concaveman/tsconfig.json diff --git a/conf/conf-tests.ts b/types/conf/conf-tests.ts similarity index 100% rename from conf/conf-tests.ts rename to types/conf/conf-tests.ts diff --git a/conf/index.d.ts b/types/conf/index.d.ts similarity index 100% rename from conf/index.d.ts rename to types/conf/index.d.ts diff --git a/conf/tsconfig.json b/types/conf/tsconfig.json similarity index 100% rename from conf/tsconfig.json rename to types/conf/tsconfig.json diff --git a/conf/tslint.json b/types/conf/tslint.json similarity index 100% rename from conf/tslint.json rename to types/conf/tslint.json diff --git a/confidence/confidence-tests.ts b/types/confidence/confidence-tests.ts similarity index 100% rename from confidence/confidence-tests.ts rename to types/confidence/confidence-tests.ts diff --git a/confidence/index.d.ts b/types/confidence/index.d.ts similarity index 100% rename from confidence/index.d.ts rename to types/confidence/index.d.ts diff --git a/confidence/tsconfig.json b/types/confidence/tsconfig.json similarity index 100% rename from confidence/tsconfig.json rename to types/confidence/tsconfig.json diff --git a/config/config-tests.ts b/types/config/config-tests.ts similarity index 100% rename from config/config-tests.ts rename to types/config/config-tests.ts diff --git a/config/index.d.ts b/types/config/index.d.ts similarity index 100% rename from config/index.d.ts rename to types/config/index.d.ts diff --git a/config/tsconfig.json b/types/config/tsconfig.json similarity index 100% rename from config/tsconfig.json rename to types/config/tsconfig.json diff --git a/configstore/configstore-tests.ts b/types/configstore/configstore-tests.ts similarity index 59% rename from configstore/configstore-tests.ts rename to types/configstore/configstore-tests.ts index 724dbe9a38..ffd04e31a7 100644 --- a/configstore/configstore-tests.ts +++ b/types/configstore/configstore-tests.ts @@ -1,12 +1,10 @@ - import Configstore = require('configstore'); -var cs = new Configstore('foo'); +const cs = new Configstore('foo'); -var value: any; -var key: string; -var num: number; -var bool: any; -var object: any; +let value: any; +let key: string; +let num: number; +let object: any; cs.set(key, value); value = cs.get(key); diff --git a/configstore/index.d.ts b/types/configstore/index.d.ts similarity index 97% rename from configstore/index.d.ts rename to types/configstore/index.d.ts index 628a4a1d6c..2617f2bce0 100644 --- a/configstore/index.d.ts +++ b/types/configstore/index.d.ts @@ -65,7 +65,7 @@ declare class Configstore { } declare namespace Configstore { - export interface ConfigstoreOptions { + interface ConfigstoreOptions { globalConfigPath?: boolean; } } diff --git a/configstore/tsconfig.json b/types/configstore/tsconfig.json similarity index 100% rename from configstore/tsconfig.json rename to types/configstore/tsconfig.json diff --git a/configstore/tslint.json b/types/configstore/tslint.json similarity index 100% rename from configstore/tslint.json rename to types/configstore/tslint.json diff --git a/confit/confit-tests.ts b/types/confit/confit-tests.ts similarity index 100% rename from confit/confit-tests.ts rename to types/confit/confit-tests.ts diff --git a/confit/index.d.ts b/types/confit/index.d.ts similarity index 100% rename from confit/index.d.ts rename to types/confit/index.d.ts diff --git a/confit/tsconfig.json b/types/confit/tsconfig.json similarity index 100% rename from confit/tsconfig.json rename to types/confit/tsconfig.json diff --git a/connect-ensure-login/connect-ensure-login-tests.ts b/types/connect-ensure-login/connect-ensure-login-tests.ts similarity index 98% rename from connect-ensure-login/connect-ensure-login-tests.ts rename to types/connect-ensure-login/connect-ensure-login-tests.ts index 68ce1a76a2..708f76a9ba 100644 --- a/connect-ensure-login/connect-ensure-login-tests.ts +++ b/types/connect-ensure-login/connect-ensure-login-tests.ts @@ -10,4 +10,4 @@ login.ensureLoggedOut(); login.ensureLoggedOut("/"); login.ensureLoggedOut({ redirectTo: "/", -}); \ No newline at end of file +}); diff --git a/connect-ensure-login/index.d.ts b/types/connect-ensure-login/index.d.ts similarity index 91% rename from connect-ensure-login/index.d.ts rename to types/connect-ensure-login/index.d.ts index d542f63a90..fb1716abf9 100644 --- a/connect-ensure-login/index.d.ts +++ b/types/connect-ensure-login/index.d.ts @@ -47,7 +47,7 @@ interface LoggedOutOptions { * ensureLoggedIn({ redirectTo: '/session/new', setReturnTo: false }), * function(req, res) { ... }); */ -export declare function ensureLoggedIn(options?: LoggedInOptions | string): RequestHandler; +export function ensureLoggedIn(options?: LoggedInOptions | string): RequestHandler; /** * Ensure that no user is logged in before proceeding to next route middleware. @@ -70,4 +70,4 @@ export declare function ensureLoggedIn(options?: LoggedInOptions | string): Requ * ensureLoggedOut({ redirectTo: '/home' }), * function(req, res) { ... }); */ -export declare function ensureLoggedOut(options?: LoggedOutOptions | string): RequestHandler; \ No newline at end of file +export function ensureLoggedOut(options?: LoggedOutOptions | string): RequestHandler; diff --git a/connect-ensure-login/tsconfig.json b/types/connect-ensure-login/tsconfig.json similarity index 100% rename from connect-ensure-login/tsconfig.json rename to types/connect-ensure-login/tsconfig.json diff --git a/connect-ensure-login/tslint.json b/types/connect-ensure-login/tslint.json similarity index 100% rename from connect-ensure-login/tslint.json rename to types/connect-ensure-login/tslint.json diff --git a/connect-flash/connect-flash-tests.ts b/types/connect-flash/connect-flash-tests.ts similarity index 100% rename from connect-flash/connect-flash-tests.ts rename to types/connect-flash/connect-flash-tests.ts diff --git a/connect-flash/index.d.ts b/types/connect-flash/index.d.ts similarity index 100% rename from connect-flash/index.d.ts rename to types/connect-flash/index.d.ts diff --git a/connect-flash/tsconfig.json b/types/connect-flash/tsconfig.json similarity index 100% rename from connect-flash/tsconfig.json rename to types/connect-flash/tsconfig.json diff --git a/connect-livereload/connect-livereload-tests.ts b/types/connect-livereload/connect-livereload-tests.ts similarity index 100% rename from connect-livereload/connect-livereload-tests.ts rename to types/connect-livereload/connect-livereload-tests.ts diff --git a/connect-livereload/index.d.ts b/types/connect-livereload/index.d.ts similarity index 100% rename from connect-livereload/index.d.ts rename to types/connect-livereload/index.d.ts diff --git a/connect-livereload/tsconfig.json b/types/connect-livereload/tsconfig.json similarity index 100% rename from connect-livereload/tsconfig.json rename to types/connect-livereload/tsconfig.json diff --git a/connect-modrewrite/connect-modrewrite-tests.ts b/types/connect-modrewrite/connect-modrewrite-tests.ts similarity index 100% rename from connect-modrewrite/connect-modrewrite-tests.ts rename to types/connect-modrewrite/connect-modrewrite-tests.ts diff --git a/connect-modrewrite/index.d.ts b/types/connect-modrewrite/index.d.ts similarity index 100% rename from connect-modrewrite/index.d.ts rename to types/connect-modrewrite/index.d.ts diff --git a/connect-modrewrite/tsconfig.json b/types/connect-modrewrite/tsconfig.json similarity index 100% rename from connect-modrewrite/tsconfig.json rename to types/connect-modrewrite/tsconfig.json diff --git a/connect-mongo/connect-mongo-tests.ts b/types/connect-mongo/connect-mongo-tests.ts similarity index 100% rename from connect-mongo/connect-mongo-tests.ts rename to types/connect-mongo/connect-mongo-tests.ts diff --git a/connect-mongo/index.d.ts b/types/connect-mongo/index.d.ts similarity index 100% rename from connect-mongo/index.d.ts rename to types/connect-mongo/index.d.ts diff --git a/connect-mongo/tsconfig.json b/types/connect-mongo/tsconfig.json similarity index 100% rename from connect-mongo/tsconfig.json rename to types/connect-mongo/tsconfig.json diff --git a/connect-redis/connect-redis-tests.ts b/types/connect-redis/connect-redis-tests.ts similarity index 100% rename from connect-redis/connect-redis-tests.ts rename to types/connect-redis/connect-redis-tests.ts diff --git a/connect-redis/index.d.ts b/types/connect-redis/index.d.ts similarity index 100% rename from connect-redis/index.d.ts rename to types/connect-redis/index.d.ts diff --git a/connect-redis/tsconfig.json b/types/connect-redis/tsconfig.json similarity index 100% rename from connect-redis/tsconfig.json rename to types/connect-redis/tsconfig.json diff --git a/connect-slashes/connect-slashes-tests.ts b/types/connect-slashes/connect-slashes-tests.ts similarity index 100% rename from connect-slashes/connect-slashes-tests.ts rename to types/connect-slashes/connect-slashes-tests.ts diff --git a/connect-slashes/index.d.ts b/types/connect-slashes/index.d.ts similarity index 100% rename from connect-slashes/index.d.ts rename to types/connect-slashes/index.d.ts diff --git a/connect-slashes/tsconfig.json b/types/connect-slashes/tsconfig.json similarity index 100% rename from connect-slashes/tsconfig.json rename to types/connect-slashes/tsconfig.json diff --git a/connect-timeout/connect-timeout-tests.ts b/types/connect-timeout/connect-timeout-tests.ts similarity index 100% rename from connect-timeout/connect-timeout-tests.ts rename to types/connect-timeout/connect-timeout-tests.ts diff --git a/connect-timeout/index.d.ts b/types/connect-timeout/index.d.ts similarity index 100% rename from connect-timeout/index.d.ts rename to types/connect-timeout/index.d.ts diff --git a/connect-timeout/tsconfig.json b/types/connect-timeout/tsconfig.json similarity index 100% rename from connect-timeout/tsconfig.json rename to types/connect-timeout/tsconfig.json diff --git a/connect/connect-tests.ts b/types/connect/connect-tests.ts similarity index 100% rename from connect/connect-tests.ts rename to types/connect/connect-tests.ts diff --git a/connect/index.d.ts b/types/connect/index.d.ts similarity index 100% rename from connect/index.d.ts rename to types/connect/index.d.ts diff --git a/connect/tsconfig.json b/types/connect/tsconfig.json similarity index 100% rename from connect/tsconfig.json rename to types/connect/tsconfig.json diff --git a/console-stamp/console-stamp-tests.ts b/types/console-stamp/console-stamp-tests.ts similarity index 100% rename from console-stamp/console-stamp-tests.ts rename to types/console-stamp/console-stamp-tests.ts diff --git a/console-stamp/index.d.ts b/types/console-stamp/index.d.ts similarity index 100% rename from console-stamp/index.d.ts rename to types/console-stamp/index.d.ts diff --git a/console-stamp/tsconfig.json b/types/console-stamp/tsconfig.json similarity index 100% rename from console-stamp/tsconfig.json rename to types/console-stamp/tsconfig.json diff --git a/consolidate/consolidate-tests.ts b/types/consolidate/consolidate-tests.ts similarity index 100% rename from consolidate/consolidate-tests.ts rename to types/consolidate/consolidate-tests.ts diff --git a/consolidate/index.d.ts b/types/consolidate/index.d.ts similarity index 100% rename from consolidate/index.d.ts rename to types/consolidate/index.d.ts diff --git a/consolidate/tsconfig.json b/types/consolidate/tsconfig.json similarity index 100% rename from consolidate/tsconfig.json rename to types/consolidate/tsconfig.json diff --git a/consul/consul-tests.ts b/types/consul/consul-tests.ts similarity index 100% rename from consul/consul-tests.ts rename to types/consul/consul-tests.ts diff --git a/consul/index.d.ts b/types/consul/index.d.ts similarity index 100% rename from consul/index.d.ts rename to types/consul/index.d.ts diff --git a/consul/tsconfig.json b/types/consul/tsconfig.json similarity index 100% rename from consul/tsconfig.json rename to types/consul/tsconfig.json diff --git a/content-disposition/content-disposition-tests.ts b/types/content-disposition/content-disposition-tests.ts similarity index 100% rename from content-disposition/content-disposition-tests.ts rename to types/content-disposition/content-disposition-tests.ts diff --git a/content-disposition/index.d.ts b/types/content-disposition/index.d.ts similarity index 77% rename from content-disposition/index.d.ts rename to types/content-disposition/index.d.ts index 4d0bbd8d94..31e60c1041 100644 --- a/content-disposition/index.d.ts +++ b/types/content-disposition/index.d.ts @@ -4,17 +4,17 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace contentDisposition { - export interface ContentDisposition { + interface ContentDisposition { type: string; parameters: any; } - export interface Options { + interface Options { type?: string; fallback?: string | boolean; } - export function parse(contentDispositionHeader: string): ContentDisposition; + function parse(contentDispositionHeader: string): ContentDisposition; } declare function contentDisposition(filename?: string, options?: contentDisposition.Options): string; diff --git a/content-disposition/tsconfig.json b/types/content-disposition/tsconfig.json similarity index 100% rename from content-disposition/tsconfig.json rename to types/content-disposition/tsconfig.json diff --git a/content-disposition/tslint.json b/types/content-disposition/tslint.json similarity index 100% rename from content-disposition/tslint.json rename to types/content-disposition/tslint.json diff --git a/content-type/content-type-tests.ts b/types/content-type/content-type-tests.ts similarity index 100% rename from content-type/content-type-tests.ts rename to types/content-type/content-type-tests.ts diff --git a/content-type/index.d.ts b/types/content-type/index.d.ts similarity index 100% rename from content-type/index.d.ts rename to types/content-type/index.d.ts diff --git a/content-type/tsconfig.json b/types/content-type/tsconfig.json similarity index 100% rename from content-type/tsconfig.json rename to types/content-type/tsconfig.json diff --git a/contentful-resolve-response/contentful-resolve-response-tests.ts b/types/contentful-resolve-response/contentful-resolve-response-tests.ts similarity index 100% rename from contentful-resolve-response/contentful-resolve-response-tests.ts rename to types/contentful-resolve-response/contentful-resolve-response-tests.ts diff --git a/contentful-resolve-response/index.d.ts b/types/contentful-resolve-response/index.d.ts similarity index 100% rename from contentful-resolve-response/index.d.ts rename to types/contentful-resolve-response/index.d.ts diff --git a/contentful-resolve-response/tsconfig.json b/types/contentful-resolve-response/tsconfig.json similarity index 100% rename from contentful-resolve-response/tsconfig.json rename to types/contentful-resolve-response/tsconfig.json diff --git a/contextjs/contextjs-tests.ts b/types/contextjs/contextjs-tests.ts similarity index 100% rename from contextjs/contextjs-tests.ts rename to types/contextjs/contextjs-tests.ts diff --git a/contextjs/index.d.ts b/types/contextjs/index.d.ts similarity index 100% rename from contextjs/index.d.ts rename to types/contextjs/index.d.ts diff --git a/contextjs/tsconfig.json b/types/contextjs/tsconfig.json similarity index 100% rename from contextjs/tsconfig.json rename to types/contextjs/tsconfig.json diff --git a/continuation-local-storage/continuation-local-storage-tests.ts b/types/continuation-local-storage/continuation-local-storage-tests.ts similarity index 100% rename from continuation-local-storage/continuation-local-storage-tests.ts rename to types/continuation-local-storage/continuation-local-storage-tests.ts diff --git a/continuation-local-storage/index.d.ts b/types/continuation-local-storage/index.d.ts similarity index 100% rename from continuation-local-storage/index.d.ts rename to types/continuation-local-storage/index.d.ts diff --git a/continuation-local-storage/tsconfig.json b/types/continuation-local-storage/tsconfig.json similarity index 100% rename from continuation-local-storage/tsconfig.json rename to types/continuation-local-storage/tsconfig.json diff --git a/convert-source-map/convert-source-map-tests.ts b/types/convert-source-map/convert-source-map-tests.ts similarity index 100% rename from convert-source-map/convert-source-map-tests.ts rename to types/convert-source-map/convert-source-map-tests.ts diff --git a/convert-source-map/index.d.ts b/types/convert-source-map/index.d.ts similarity index 100% rename from convert-source-map/index.d.ts rename to types/convert-source-map/index.d.ts diff --git a/convert-source-map/tsconfig.json b/types/convert-source-map/tsconfig.json similarity index 100% rename from convert-source-map/tsconfig.json rename to types/convert-source-map/tsconfig.json diff --git a/convert-source-map/tslint.json b/types/convert-source-map/tslint.json similarity index 100% rename from convert-source-map/tslint.json rename to types/convert-source-map/tslint.json diff --git a/convict/convict-tests.ts b/types/convict/convict-tests.ts similarity index 100% rename from convict/convict-tests.ts rename to types/convict/convict-tests.ts diff --git a/convict/index.d.ts b/types/convict/index.d.ts similarity index 100% rename from convict/index.d.ts rename to types/convict/index.d.ts diff --git a/convict/tsconfig.json b/types/convict/tsconfig.json similarity index 100% rename from convict/tsconfig.json rename to types/convict/tsconfig.json diff --git a/cookie-parser/cookie-parser-tests.ts b/types/cookie-parser/cookie-parser-tests.ts similarity index 100% rename from cookie-parser/cookie-parser-tests.ts rename to types/cookie-parser/cookie-parser-tests.ts diff --git a/cookie-parser/index.d.ts b/types/cookie-parser/index.d.ts similarity index 100% rename from cookie-parser/index.d.ts rename to types/cookie-parser/index.d.ts diff --git a/cookie-parser/tsconfig.json b/types/cookie-parser/tsconfig.json similarity index 100% rename from cookie-parser/tsconfig.json rename to types/cookie-parser/tsconfig.json diff --git a/cookie-session/cookie-session-tests.ts b/types/cookie-session/cookie-session-tests.ts similarity index 100% rename from cookie-session/cookie-session-tests.ts rename to types/cookie-session/cookie-session-tests.ts diff --git a/cookie-session/index.d.ts b/types/cookie-session/index.d.ts similarity index 100% rename from cookie-session/index.d.ts rename to types/cookie-session/index.d.ts diff --git a/cookie-session/tsconfig.json b/types/cookie-session/tsconfig.json similarity index 100% rename from cookie-session/tsconfig.json rename to types/cookie-session/tsconfig.json diff --git a/cookie-signature/cookie-signature-tests.ts b/types/cookie-signature/cookie-signature-tests.ts similarity index 100% rename from cookie-signature/cookie-signature-tests.ts rename to types/cookie-signature/cookie-signature-tests.ts diff --git a/cookie-signature/index.d.ts b/types/cookie-signature/index.d.ts similarity index 100% rename from cookie-signature/index.d.ts rename to types/cookie-signature/index.d.ts diff --git a/cookie-signature/tsconfig.json b/types/cookie-signature/tsconfig.json similarity index 100% rename from cookie-signature/tsconfig.json rename to types/cookie-signature/tsconfig.json diff --git a/cookie-signature/tslint.json b/types/cookie-signature/tslint.json similarity index 100% rename from cookie-signature/tslint.json rename to types/cookie-signature/tslint.json diff --git a/cookie/cookie-tests.ts b/types/cookie/cookie-tests.ts similarity index 100% rename from cookie/cookie-tests.ts rename to types/cookie/cookie-tests.ts diff --git a/cookie/index.d.ts b/types/cookie/index.d.ts similarity index 100% rename from cookie/index.d.ts rename to types/cookie/index.d.ts diff --git a/cookie/tsconfig.json b/types/cookie/tsconfig.json similarity index 100% rename from cookie/tsconfig.json rename to types/cookie/tsconfig.json diff --git a/cookiejs/cookiejs-tests.ts b/types/cookiejs/cookiejs-tests.ts similarity index 100% rename from cookiejs/cookiejs-tests.ts rename to types/cookiejs/cookiejs-tests.ts diff --git a/cookiejs/index.d.ts b/types/cookiejs/index.d.ts similarity index 100% rename from cookiejs/index.d.ts rename to types/cookiejs/index.d.ts diff --git a/cookiejs/tsconfig.json b/types/cookiejs/tsconfig.json similarity index 100% rename from cookiejs/tsconfig.json rename to types/cookiejs/tsconfig.json diff --git a/cookies/cookies-tests.ts b/types/cookies/cookies-tests.ts similarity index 99% rename from cookies/cookies-tests.ts rename to types/cookies/cookies-tests.ts index 5a2ad1e4a7..112246907c 100644 --- a/cookies/cookies-tests.ts +++ b/types/cookies/cookies-tests.ts @@ -36,4 +36,4 @@ const server = http.createServer((req, res) => { "tampered expected: undefined\n\n" + "tampered: " + tampered + "\n\n" ); -}); \ No newline at end of file +}); diff --git a/cookies/index.d.ts b/types/cookies/index.d.ts similarity index 94% rename from cookies/index.d.ts rename to types/cookies/index.d.ts index 390890bb4a..55feb7ec7d 100644 --- a/cookies/index.d.ts +++ b/types/cookies/index.d.ts @@ -7,7 +7,7 @@ import { IncomingMessage, ServerResponse } from 'http'; import * as Keygrip from 'keygrip'; -declare interface Cookies { +interface Cookies { secure: boolean; request: IncomingMessage; response: ServerResponse; @@ -27,27 +27,26 @@ declare interface Cookies { set(name: string, value?: string, opts?: Cookies.SetOption): this; } - declare namespace Cookies { /** * for backward-compatibility */ - export type ICookies = Cookies; + type ICookies = Cookies; /** * for backward-compatibility */ - export type IOptions = SetOption; + type IOptions = SetOption; - export interface Option { + interface Option { keys: string[] | Keygrip; secure?: boolean; } - export interface GetOption { + interface GetOption { signed: boolean; } - export interface SetOption { + interface SetOption { /** * a number representing the milliseconds from Date.now() for expiry */ @@ -97,9 +96,9 @@ declare namespace Cookies { overwrite?: boolean; } - export type CookieAttr = SetOption; + type CookieAttr = SetOption; - export interface Cookie { + interface Cookie { name: string; value: string; /** @@ -119,7 +118,7 @@ declare namespace Cookies { } } -declare interface CookiesFunction { +interface CookiesFunction { (request: IncomingMessage, response: ServerResponse, options?: Cookies.Option): Cookies; /** * "options" array of key strings is deprecated, provide using options {"keys": keygrip} diff --git a/cookies/tsconfig.json b/types/cookies/tsconfig.json similarity index 100% rename from cookies/tsconfig.json rename to types/cookies/tsconfig.json diff --git a/cookies/tslint.json b/types/cookies/tslint.json similarity index 100% rename from cookies/tslint.json rename to types/cookies/tslint.json diff --git a/copy-paste/copy-paste-tests.ts b/types/copy-paste/copy-paste-tests.ts similarity index 100% rename from copy-paste/copy-paste-tests.ts rename to types/copy-paste/copy-paste-tests.ts diff --git a/copy-paste/index.d.ts b/types/copy-paste/index.d.ts similarity index 100% rename from copy-paste/index.d.ts rename to types/copy-paste/index.d.ts diff --git a/copy-paste/tsconfig.json b/types/copy-paste/tsconfig.json similarity index 100% rename from copy-paste/tsconfig.json rename to types/copy-paste/tsconfig.json diff --git a/copy-webpack-plugin/copy-webpack-plugin-tests.ts b/types/copy-webpack-plugin/copy-webpack-plugin-tests.ts similarity index 100% rename from copy-webpack-plugin/copy-webpack-plugin-tests.ts rename to types/copy-webpack-plugin/copy-webpack-plugin-tests.ts diff --git a/copy-webpack-plugin/index.d.ts b/types/copy-webpack-plugin/index.d.ts similarity index 100% rename from copy-webpack-plugin/index.d.ts rename to types/copy-webpack-plugin/index.d.ts diff --git a/copy-webpack-plugin/tsconfig.json b/types/copy-webpack-plugin/tsconfig.json similarity index 100% rename from copy-webpack-plugin/tsconfig.json rename to types/copy-webpack-plugin/tsconfig.json diff --git a/cordova-ionic/cordova-ionic-tests.ts b/types/cordova-ionic/cordova-ionic-tests.ts similarity index 100% rename from cordova-ionic/cordova-ionic-tests.ts rename to types/cordova-ionic/cordova-ionic-tests.ts diff --git a/cordova-ionic/index.d.ts b/types/cordova-ionic/index.d.ts similarity index 100% rename from cordova-ionic/index.d.ts rename to types/cordova-ionic/index.d.ts diff --git a/cordova-ionic/keyboard.d.ts b/types/cordova-ionic/keyboard.d.ts similarity index 100% rename from cordova-ionic/keyboard.d.ts rename to types/cordova-ionic/keyboard.d.ts diff --git a/cordova-ionic/tsconfig.json b/types/cordova-ionic/tsconfig.json similarity index 100% rename from cordova-ionic/tsconfig.json rename to types/cordova-ionic/tsconfig.json diff --git a/cordova-plugin-app-version/cordova-plugin-app-version-tests.ts b/types/cordova-plugin-app-version/cordova-plugin-app-version-tests.ts similarity index 100% rename from cordova-plugin-app-version/cordova-plugin-app-version-tests.ts rename to types/cordova-plugin-app-version/cordova-plugin-app-version-tests.ts diff --git a/cordova-plugin-app-version/index.d.ts b/types/cordova-plugin-app-version/index.d.ts similarity index 100% rename from cordova-plugin-app-version/index.d.ts rename to types/cordova-plugin-app-version/index.d.ts diff --git a/cordova-plugin-app-version/tsconfig.json b/types/cordova-plugin-app-version/tsconfig.json similarity index 100% rename from cordova-plugin-app-version/tsconfig.json rename to types/cordova-plugin-app-version/tsconfig.json diff --git a/cordova-plugin-background-mode/cordova-plugin-background-mode-tests.ts b/types/cordova-plugin-background-mode/cordova-plugin-background-mode-tests.ts similarity index 100% rename from cordova-plugin-background-mode/cordova-plugin-background-mode-tests.ts rename to types/cordova-plugin-background-mode/cordova-plugin-background-mode-tests.ts diff --git a/cordova-plugin-background-mode/index.d.ts b/types/cordova-plugin-background-mode/index.d.ts similarity index 100% rename from cordova-plugin-background-mode/index.d.ts rename to types/cordova-plugin-background-mode/index.d.ts diff --git a/cordova-plugin-background-mode/tsconfig.json b/types/cordova-plugin-background-mode/tsconfig.json similarity index 100% rename from cordova-plugin-background-mode/tsconfig.json rename to types/cordova-plugin-background-mode/tsconfig.json diff --git a/cordova-plugin-battery-status/cordova-plugin-battery-status-tests.ts b/types/cordova-plugin-battery-status/cordova-plugin-battery-status-tests.ts similarity index 100% rename from cordova-plugin-battery-status/cordova-plugin-battery-status-tests.ts rename to types/cordova-plugin-battery-status/cordova-plugin-battery-status-tests.ts diff --git a/cordova-plugin-battery-status/index.d.ts b/types/cordova-plugin-battery-status/index.d.ts similarity index 100% rename from cordova-plugin-battery-status/index.d.ts rename to types/cordova-plugin-battery-status/index.d.ts diff --git a/cordova-plugin-battery-status/tsconfig.json b/types/cordova-plugin-battery-status/tsconfig.json similarity index 100% rename from cordova-plugin-battery-status/tsconfig.json rename to types/cordova-plugin-battery-status/tsconfig.json diff --git a/cordova-plugin-ble-central/cordova-plugin-ble-central-tests.ts b/types/cordova-plugin-ble-central/cordova-plugin-ble-central-tests.ts similarity index 100% rename from cordova-plugin-ble-central/cordova-plugin-ble-central-tests.ts rename to types/cordova-plugin-ble-central/cordova-plugin-ble-central-tests.ts diff --git a/cordova-plugin-ble-central/index.d.ts b/types/cordova-plugin-ble-central/index.d.ts similarity index 100% rename from cordova-plugin-ble-central/index.d.ts rename to types/cordova-plugin-ble-central/index.d.ts diff --git a/cordova-plugin-ble-central/tsconfig.json b/types/cordova-plugin-ble-central/tsconfig.json similarity index 100% rename from cordova-plugin-ble-central/tsconfig.json rename to types/cordova-plugin-ble-central/tsconfig.json diff --git a/cordova-plugin-camera/cordova-plugin-camera-tests.ts b/types/cordova-plugin-camera/cordova-plugin-camera-tests.ts similarity index 100% rename from cordova-plugin-camera/cordova-plugin-camera-tests.ts rename to types/cordova-plugin-camera/cordova-plugin-camera-tests.ts diff --git a/cordova-plugin-camera/index.d.ts b/types/cordova-plugin-camera/index.d.ts similarity index 100% rename from cordova-plugin-camera/index.d.ts rename to types/cordova-plugin-camera/index.d.ts diff --git a/cordova-plugin-camera/tsconfig.json b/types/cordova-plugin-camera/tsconfig.json similarity index 100% rename from cordova-plugin-camera/tsconfig.json rename to types/cordova-plugin-camera/tsconfig.json diff --git a/cordova-plugin-contacts/cordova-plugin-contacts-tests.ts b/types/cordova-plugin-contacts/cordova-plugin-contacts-tests.ts similarity index 100% rename from cordova-plugin-contacts/cordova-plugin-contacts-tests.ts rename to types/cordova-plugin-contacts/cordova-plugin-contacts-tests.ts diff --git a/cordova-plugin-contacts/index.d.ts b/types/cordova-plugin-contacts/index.d.ts similarity index 100% rename from cordova-plugin-contacts/index.d.ts rename to types/cordova-plugin-contacts/index.d.ts diff --git a/cordova-plugin-contacts/tsconfig.json b/types/cordova-plugin-contacts/tsconfig.json similarity index 100% rename from cordova-plugin-contacts/tsconfig.json rename to types/cordova-plugin-contacts/tsconfig.json diff --git a/cordova-plugin-device-motion/cordova-plugin-device-motion-tests.ts b/types/cordova-plugin-device-motion/cordova-plugin-device-motion-tests.ts similarity index 100% rename from cordova-plugin-device-motion/cordova-plugin-device-motion-tests.ts rename to types/cordova-plugin-device-motion/cordova-plugin-device-motion-tests.ts diff --git a/cordova-plugin-device-motion/index.d.ts b/types/cordova-plugin-device-motion/index.d.ts similarity index 100% rename from cordova-plugin-device-motion/index.d.ts rename to types/cordova-plugin-device-motion/index.d.ts diff --git a/cordova-plugin-device-motion/tsconfig.json b/types/cordova-plugin-device-motion/tsconfig.json similarity index 100% rename from cordova-plugin-device-motion/tsconfig.json rename to types/cordova-plugin-device-motion/tsconfig.json diff --git a/cordova-plugin-device-name/README.md b/types/cordova-plugin-device-name/README.md similarity index 100% rename from cordova-plugin-device-name/README.md rename to types/cordova-plugin-device-name/README.md diff --git a/cordova-plugin-device-name/cordova-plugin-device-name-tests.ts b/types/cordova-plugin-device-name/cordova-plugin-device-name-tests.ts similarity index 100% rename from cordova-plugin-device-name/cordova-plugin-device-name-tests.ts rename to types/cordova-plugin-device-name/cordova-plugin-device-name-tests.ts diff --git a/cordova-plugin-device-name/index.d.ts b/types/cordova-plugin-device-name/index.d.ts similarity index 100% rename from cordova-plugin-device-name/index.d.ts rename to types/cordova-plugin-device-name/index.d.ts diff --git a/cordova-plugin-device-name/tsconfig.json b/types/cordova-plugin-device-name/tsconfig.json similarity index 100% rename from cordova-plugin-device-name/tsconfig.json rename to types/cordova-plugin-device-name/tsconfig.json diff --git a/cordova-plugin-device-orientation/cordova-plugin-device-orientation-tests.ts b/types/cordova-plugin-device-orientation/cordova-plugin-device-orientation-tests.ts similarity index 100% rename from cordova-plugin-device-orientation/cordova-plugin-device-orientation-tests.ts rename to types/cordova-plugin-device-orientation/cordova-plugin-device-orientation-tests.ts diff --git a/cordova-plugin-device-orientation/index.d.ts b/types/cordova-plugin-device-orientation/index.d.ts similarity index 100% rename from cordova-plugin-device-orientation/index.d.ts rename to types/cordova-plugin-device-orientation/index.d.ts diff --git a/cordova-plugin-device-orientation/tsconfig.json b/types/cordova-plugin-device-orientation/tsconfig.json similarity index 100% rename from cordova-plugin-device-orientation/tsconfig.json rename to types/cordova-plugin-device-orientation/tsconfig.json diff --git a/cordova-plugin-device/cordova-plugin-device-tests.ts b/types/cordova-plugin-device/cordova-plugin-device-tests.ts similarity index 100% rename from cordova-plugin-device/cordova-plugin-device-tests.ts rename to types/cordova-plugin-device/cordova-plugin-device-tests.ts diff --git a/cordova-plugin-device/index.d.ts b/types/cordova-plugin-device/index.d.ts similarity index 100% rename from cordova-plugin-device/index.d.ts rename to types/cordova-plugin-device/index.d.ts diff --git a/cordova-plugin-device/tsconfig.json b/types/cordova-plugin-device/tsconfig.json similarity index 100% rename from cordova-plugin-device/tsconfig.json rename to types/cordova-plugin-device/tsconfig.json diff --git a/cordova-plugin-dialogs/cordova-plugin-dialogs-tests.ts b/types/cordova-plugin-dialogs/cordova-plugin-dialogs-tests.ts similarity index 100% rename from cordova-plugin-dialogs/cordova-plugin-dialogs-tests.ts rename to types/cordova-plugin-dialogs/cordova-plugin-dialogs-tests.ts diff --git a/cordova-plugin-dialogs/index.d.ts b/types/cordova-plugin-dialogs/index.d.ts similarity index 100% rename from cordova-plugin-dialogs/index.d.ts rename to types/cordova-plugin-dialogs/index.d.ts diff --git a/cordova-plugin-dialogs/tsconfig.json b/types/cordova-plugin-dialogs/tsconfig.json similarity index 100% rename from cordova-plugin-dialogs/tsconfig.json rename to types/cordova-plugin-dialogs/tsconfig.json diff --git a/cordova-plugin-email-composer/cordova-plugin-email-composer-tests.ts b/types/cordova-plugin-email-composer/cordova-plugin-email-composer-tests.ts similarity index 100% rename from cordova-plugin-email-composer/cordova-plugin-email-composer-tests.ts rename to types/cordova-plugin-email-composer/cordova-plugin-email-composer-tests.ts diff --git a/cordova-plugin-email-composer/index.d.ts b/types/cordova-plugin-email-composer/index.d.ts similarity index 100% rename from cordova-plugin-email-composer/index.d.ts rename to types/cordova-plugin-email-composer/index.d.ts diff --git a/cordova-plugin-email-composer/tsconfig.json b/types/cordova-plugin-email-composer/tsconfig.json similarity index 100% rename from cordova-plugin-email-composer/tsconfig.json rename to types/cordova-plugin-email-composer/tsconfig.json diff --git a/cordova-plugin-file-transfer/cordova-plugin-file-transfer-tests.ts b/types/cordova-plugin-file-transfer/cordova-plugin-file-transfer-tests.ts similarity index 100% rename from cordova-plugin-file-transfer/cordova-plugin-file-transfer-tests.ts rename to types/cordova-plugin-file-transfer/cordova-plugin-file-transfer-tests.ts diff --git a/cordova-plugin-file-transfer/index.d.ts b/types/cordova-plugin-file-transfer/index.d.ts similarity index 100% rename from cordova-plugin-file-transfer/index.d.ts rename to types/cordova-plugin-file-transfer/index.d.ts diff --git a/cordova-plugin-file-transfer/tsconfig.json b/types/cordova-plugin-file-transfer/tsconfig.json similarity index 100% rename from cordova-plugin-file-transfer/tsconfig.json rename to types/cordova-plugin-file-transfer/tsconfig.json diff --git a/cordova-plugin-file/cordova-plugin-file-tests.ts b/types/cordova-plugin-file/cordova-plugin-file-tests.ts similarity index 100% rename from cordova-plugin-file/cordova-plugin-file-tests.ts rename to types/cordova-plugin-file/cordova-plugin-file-tests.ts diff --git a/cordova-plugin-file/index.d.ts b/types/cordova-plugin-file/index.d.ts similarity index 100% rename from cordova-plugin-file/index.d.ts rename to types/cordova-plugin-file/index.d.ts diff --git a/cordova-plugin-file/tsconfig.json b/types/cordova-plugin-file/tsconfig.json similarity index 100% rename from cordova-plugin-file/tsconfig.json rename to types/cordova-plugin-file/tsconfig.json diff --git a/cordova-plugin-globalization/cordova-plugin-globalization-tests.ts b/types/cordova-plugin-globalization/cordova-plugin-globalization-tests.ts similarity index 100% rename from cordova-plugin-globalization/cordova-plugin-globalization-tests.ts rename to types/cordova-plugin-globalization/cordova-plugin-globalization-tests.ts diff --git a/cordova-plugin-globalization/index.d.ts b/types/cordova-plugin-globalization/index.d.ts similarity index 100% rename from cordova-plugin-globalization/index.d.ts rename to types/cordova-plugin-globalization/index.d.ts diff --git a/cordova-plugin-globalization/tsconfig.json b/types/cordova-plugin-globalization/tsconfig.json similarity index 100% rename from cordova-plugin-globalization/tsconfig.json rename to types/cordova-plugin-globalization/tsconfig.json diff --git a/cordova-plugin-ibeacon/cordova-plugin-ibeacon-tests.ts b/types/cordova-plugin-ibeacon/cordova-plugin-ibeacon-tests.ts similarity index 100% rename from cordova-plugin-ibeacon/cordova-plugin-ibeacon-tests.ts rename to types/cordova-plugin-ibeacon/cordova-plugin-ibeacon-tests.ts diff --git a/cordova-plugin-ibeacon/index.d.ts b/types/cordova-plugin-ibeacon/index.d.ts similarity index 100% rename from cordova-plugin-ibeacon/index.d.ts rename to types/cordova-plugin-ibeacon/index.d.ts diff --git a/cordova-plugin-ibeacon/tsconfig.json b/types/cordova-plugin-ibeacon/tsconfig.json similarity index 100% rename from cordova-plugin-ibeacon/tsconfig.json rename to types/cordova-plugin-ibeacon/tsconfig.json diff --git a/cordova-plugin-inappbrowser/cordova-plugin-inappbrowser-tests.ts b/types/cordova-plugin-inappbrowser/cordova-plugin-inappbrowser-tests.ts similarity index 100% rename from cordova-plugin-inappbrowser/cordova-plugin-inappbrowser-tests.ts rename to types/cordova-plugin-inappbrowser/cordova-plugin-inappbrowser-tests.ts diff --git a/cordova-plugin-inappbrowser/index.d.ts b/types/cordova-plugin-inappbrowser/index.d.ts similarity index 100% rename from cordova-plugin-inappbrowser/index.d.ts rename to types/cordova-plugin-inappbrowser/index.d.ts diff --git a/cordova-plugin-inappbrowser/tsconfig.json b/types/cordova-plugin-inappbrowser/tsconfig.json similarity index 100% rename from cordova-plugin-inappbrowser/tsconfig.json rename to types/cordova-plugin-inappbrowser/tsconfig.json diff --git a/cordova-plugin-insomnia/cordova-plugin-insomnia-tests.ts b/types/cordova-plugin-insomnia/cordova-plugin-insomnia-tests.ts similarity index 100% rename from cordova-plugin-insomnia/cordova-plugin-insomnia-tests.ts rename to types/cordova-plugin-insomnia/cordova-plugin-insomnia-tests.ts diff --git a/cordova-plugin-insomnia/index.d.ts b/types/cordova-plugin-insomnia/index.d.ts similarity index 100% rename from cordova-plugin-insomnia/index.d.ts rename to types/cordova-plugin-insomnia/index.d.ts diff --git a/cordova-plugin-insomnia/tsconfig.json b/types/cordova-plugin-insomnia/tsconfig.json similarity index 100% rename from cordova-plugin-insomnia/tsconfig.json rename to types/cordova-plugin-insomnia/tsconfig.json diff --git a/cordova-plugin-keyboard/cordova-plugin-keyboard-tests.ts b/types/cordova-plugin-keyboard/cordova-plugin-keyboard-tests.ts similarity index 100% rename from cordova-plugin-keyboard/cordova-plugin-keyboard-tests.ts rename to types/cordova-plugin-keyboard/cordova-plugin-keyboard-tests.ts diff --git a/cordova-plugin-keyboard/index.d.ts b/types/cordova-plugin-keyboard/index.d.ts similarity index 100% rename from cordova-plugin-keyboard/index.d.ts rename to types/cordova-plugin-keyboard/index.d.ts diff --git a/cordova-plugin-keyboard/tsconfig.json b/types/cordova-plugin-keyboard/tsconfig.json similarity index 100% rename from cordova-plugin-keyboard/tsconfig.json rename to types/cordova-plugin-keyboard/tsconfig.json diff --git a/cordova-plugin-mapsforge/cordova-plugin-mapsforge-tests.ts b/types/cordova-plugin-mapsforge/cordova-plugin-mapsforge-tests.ts similarity index 100% rename from cordova-plugin-mapsforge/cordova-plugin-mapsforge-tests.ts rename to types/cordova-plugin-mapsforge/cordova-plugin-mapsforge-tests.ts diff --git a/cordova-plugin-mapsforge/index.d.ts b/types/cordova-plugin-mapsforge/index.d.ts similarity index 100% rename from cordova-plugin-mapsforge/index.d.ts rename to types/cordova-plugin-mapsforge/index.d.ts diff --git a/cordova-plugin-mapsforge/tsconfig.json b/types/cordova-plugin-mapsforge/tsconfig.json similarity index 100% rename from cordova-plugin-mapsforge/tsconfig.json rename to types/cordova-plugin-mapsforge/tsconfig.json diff --git a/cordova-plugin-media-capture/cordova-plugin-media-capture-tests.ts b/types/cordova-plugin-media-capture/cordova-plugin-media-capture-tests.ts similarity index 100% rename from cordova-plugin-media-capture/cordova-plugin-media-capture-tests.ts rename to types/cordova-plugin-media-capture/cordova-plugin-media-capture-tests.ts diff --git a/cordova-plugin-media-capture/index.d.ts b/types/cordova-plugin-media-capture/index.d.ts similarity index 100% rename from cordova-plugin-media-capture/index.d.ts rename to types/cordova-plugin-media-capture/index.d.ts diff --git a/cordova-plugin-media-capture/tsconfig.json b/types/cordova-plugin-media-capture/tsconfig.json similarity index 100% rename from cordova-plugin-media-capture/tsconfig.json rename to types/cordova-plugin-media-capture/tsconfig.json diff --git a/cordova-plugin-media/cordova-plugin-media-tests.ts b/types/cordova-plugin-media/cordova-plugin-media-tests.ts similarity index 100% rename from cordova-plugin-media/cordova-plugin-media-tests.ts rename to types/cordova-plugin-media/cordova-plugin-media-tests.ts diff --git a/cordova-plugin-media/index.d.ts b/types/cordova-plugin-media/index.d.ts similarity index 100% rename from cordova-plugin-media/index.d.ts rename to types/cordova-plugin-media/index.d.ts diff --git a/cordova-plugin-media/tsconfig.json b/types/cordova-plugin-media/tsconfig.json similarity index 100% rename from cordova-plugin-media/tsconfig.json rename to types/cordova-plugin-media/tsconfig.json diff --git a/cordova-plugin-ms-adal/cordova-plugin-ms-adal-tests.ts b/types/cordova-plugin-ms-adal/cordova-plugin-ms-adal-tests.ts similarity index 100% rename from cordova-plugin-ms-adal/cordova-plugin-ms-adal-tests.ts rename to types/cordova-plugin-ms-adal/cordova-plugin-ms-adal-tests.ts diff --git a/cordova-plugin-ms-adal/index.d.ts b/types/cordova-plugin-ms-adal/index.d.ts similarity index 100% rename from cordova-plugin-ms-adal/index.d.ts rename to types/cordova-plugin-ms-adal/index.d.ts diff --git a/cordova-plugin-ms-adal/tsconfig.json b/types/cordova-plugin-ms-adal/tsconfig.json similarity index 100% rename from cordova-plugin-ms-adal/tsconfig.json rename to types/cordova-plugin-ms-adal/tsconfig.json diff --git a/cordova-plugin-network-information/cordova-plugin-network-information-tests.ts b/types/cordova-plugin-network-information/cordova-plugin-network-information-tests.ts similarity index 100% rename from cordova-plugin-network-information/cordova-plugin-network-information-tests.ts rename to types/cordova-plugin-network-information/cordova-plugin-network-information-tests.ts diff --git a/cordova-plugin-network-information/index.d.ts b/types/cordova-plugin-network-information/index.d.ts similarity index 100% rename from cordova-plugin-network-information/index.d.ts rename to types/cordova-plugin-network-information/index.d.ts diff --git a/cordova-plugin-network-information/tsconfig.json b/types/cordova-plugin-network-information/tsconfig.json similarity index 100% rename from cordova-plugin-network-information/tsconfig.json rename to types/cordova-plugin-network-information/tsconfig.json diff --git a/cordova-plugin-ouralabs/cordova-plugin-ouralabs-tests.ts b/types/cordova-plugin-ouralabs/cordova-plugin-ouralabs-tests.ts similarity index 100% rename from cordova-plugin-ouralabs/cordova-plugin-ouralabs-tests.ts rename to types/cordova-plugin-ouralabs/cordova-plugin-ouralabs-tests.ts diff --git a/cordova-plugin-ouralabs/index.d.ts b/types/cordova-plugin-ouralabs/index.d.ts similarity index 100% rename from cordova-plugin-ouralabs/index.d.ts rename to types/cordova-plugin-ouralabs/index.d.ts diff --git a/cordova-plugin-ouralabs/tsconfig.json b/types/cordova-plugin-ouralabs/tsconfig.json similarity index 100% rename from cordova-plugin-ouralabs/tsconfig.json rename to types/cordova-plugin-ouralabs/tsconfig.json diff --git a/cordova-plugin-qrscanner/cordova-plugin-qrscanner-tests.ts b/types/cordova-plugin-qrscanner/cordova-plugin-qrscanner-tests.ts similarity index 100% rename from cordova-plugin-qrscanner/cordova-plugin-qrscanner-tests.ts rename to types/cordova-plugin-qrscanner/cordova-plugin-qrscanner-tests.ts diff --git a/cordova-plugin-qrscanner/index.d.ts b/types/cordova-plugin-qrscanner/index.d.ts similarity index 100% rename from cordova-plugin-qrscanner/index.d.ts rename to types/cordova-plugin-qrscanner/index.d.ts diff --git a/cordova-plugin-qrscanner/tsconfig.json b/types/cordova-plugin-qrscanner/tsconfig.json similarity index 100% rename from cordova-plugin-qrscanner/tsconfig.json rename to types/cordova-plugin-qrscanner/tsconfig.json diff --git a/cordova-plugin-spinner/cordova-plugin-spinner-tests.ts b/types/cordova-plugin-spinner/cordova-plugin-spinner-tests.ts similarity index 100% rename from cordova-plugin-spinner/cordova-plugin-spinner-tests.ts rename to types/cordova-plugin-spinner/cordova-plugin-spinner-tests.ts diff --git a/cordova-plugin-spinner/index.d.ts b/types/cordova-plugin-spinner/index.d.ts similarity index 100% rename from cordova-plugin-spinner/index.d.ts rename to types/cordova-plugin-spinner/index.d.ts diff --git a/cordova-plugin-spinner/tsconfig.json b/types/cordova-plugin-spinner/tsconfig.json similarity index 100% rename from cordova-plugin-spinner/tsconfig.json rename to types/cordova-plugin-spinner/tsconfig.json diff --git a/cordova-plugin-splashscreen/cordova-plugin-splashscreen-tests.ts b/types/cordova-plugin-splashscreen/cordova-plugin-splashscreen-tests.ts similarity index 100% rename from cordova-plugin-splashscreen/cordova-plugin-splashscreen-tests.ts rename to types/cordova-plugin-splashscreen/cordova-plugin-splashscreen-tests.ts diff --git a/cordova-plugin-splashscreen/index.d.ts b/types/cordova-plugin-splashscreen/index.d.ts similarity index 100% rename from cordova-plugin-splashscreen/index.d.ts rename to types/cordova-plugin-splashscreen/index.d.ts diff --git a/cordova-plugin-splashscreen/tsconfig.json b/types/cordova-plugin-splashscreen/tsconfig.json similarity index 100% rename from cordova-plugin-splashscreen/tsconfig.json rename to types/cordova-plugin-splashscreen/tsconfig.json diff --git a/cordova-plugin-statusbar/cordova-plugin-statusbar-tests.ts b/types/cordova-plugin-statusbar/cordova-plugin-statusbar-tests.ts similarity index 100% rename from cordova-plugin-statusbar/cordova-plugin-statusbar-tests.ts rename to types/cordova-plugin-statusbar/cordova-plugin-statusbar-tests.ts diff --git a/cordova-plugin-statusbar/index.d.ts b/types/cordova-plugin-statusbar/index.d.ts similarity index 100% rename from cordova-plugin-statusbar/index.d.ts rename to types/cordova-plugin-statusbar/index.d.ts diff --git a/cordova-plugin-statusbar/tsconfig.json b/types/cordova-plugin-statusbar/tsconfig.json similarity index 100% rename from cordova-plugin-statusbar/tsconfig.json rename to types/cordova-plugin-statusbar/tsconfig.json diff --git a/cordova-plugin-vibration/cordova-plugin-vibration-tests.ts b/types/cordova-plugin-vibration/cordova-plugin-vibration-tests.ts similarity index 100% rename from cordova-plugin-vibration/cordova-plugin-vibration-tests.ts rename to types/cordova-plugin-vibration/cordova-plugin-vibration-tests.ts diff --git a/cordova-plugin-vibration/index.d.ts b/types/cordova-plugin-vibration/index.d.ts similarity index 100% rename from cordova-plugin-vibration/index.d.ts rename to types/cordova-plugin-vibration/index.d.ts diff --git a/cordova-plugin-vibration/tsconfig.json b/types/cordova-plugin-vibration/tsconfig.json similarity index 100% rename from cordova-plugin-vibration/tsconfig.json rename to types/cordova-plugin-vibration/tsconfig.json diff --git a/cordova-plugin-websql/cordova-plugin-websql-tests.ts b/types/cordova-plugin-websql/cordova-plugin-websql-tests.ts similarity index 100% rename from cordova-plugin-websql/cordova-plugin-websql-tests.ts rename to types/cordova-plugin-websql/cordova-plugin-websql-tests.ts diff --git a/cordova-plugin-websql/index.d.ts b/types/cordova-plugin-websql/index.d.ts similarity index 100% rename from cordova-plugin-websql/index.d.ts rename to types/cordova-plugin-websql/index.d.ts diff --git a/cordova-plugin-websql/tsconfig.json b/types/cordova-plugin-websql/tsconfig.json similarity index 100% rename from cordova-plugin-websql/tsconfig.json rename to types/cordova-plugin-websql/tsconfig.json diff --git a/cordova-plugin-x-socialsharing/cordova-plugin-x-socialsharing-tests.ts b/types/cordova-plugin-x-socialsharing/cordova-plugin-x-socialsharing-tests.ts old mode 100755 new mode 100644 similarity index 100% rename from cordova-plugin-x-socialsharing/cordova-plugin-x-socialsharing-tests.ts rename to types/cordova-plugin-x-socialsharing/cordova-plugin-x-socialsharing-tests.ts diff --git a/cordova-plugin-x-socialsharing/index.d.ts b/types/cordova-plugin-x-socialsharing/index.d.ts similarity index 100% rename from cordova-plugin-x-socialsharing/index.d.ts rename to types/cordova-plugin-x-socialsharing/index.d.ts diff --git a/cordova-plugin-x-socialsharing/tsconfig.json b/types/cordova-plugin-x-socialsharing/tsconfig.json similarity index 100% rename from cordova-plugin-x-socialsharing/tsconfig.json rename to types/cordova-plugin-x-socialsharing/tsconfig.json diff --git a/cordova-sqlite-storage/cordova-sqlite-storage-tests.ts b/types/cordova-sqlite-storage/cordova-sqlite-storage-tests.ts similarity index 88% rename from cordova-sqlite-storage/cordova-sqlite-storage-tests.ts rename to types/cordova-sqlite-storage/cordova-sqlite-storage-tests.ts index bb5a768bf8..6d2e3c3454 100644 --- a/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/cordova-sqlite-storage/index.d.ts b/types/cordova-sqlite-storage/index.d.ts similarity index 99% rename from cordova-sqlite-storage/index.d.ts rename to types/cordova-sqlite-storage/index.d.ts index 76e3aac5a3..2f78c908ff 100644 --- a/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/cordova-sqlite-storage/tsconfig.json b/types/cordova-sqlite-storage/tsconfig.json similarity index 100% rename from cordova-sqlite-storage/tsconfig.json rename to types/cordova-sqlite-storage/tsconfig.json diff --git a/cordova-sqlite-storage/tslint.json b/types/cordova-sqlite-storage/tslint.json similarity index 100% rename from cordova-sqlite-storage/tslint.json rename to types/cordova-sqlite-storage/tslint.json diff --git a/cordova.plugins.diagnostic/cordova.plugins.diagnostic-tests.ts b/types/cordova.plugins.diagnostic/cordova.plugins.diagnostic-tests.ts similarity index 100% rename from cordova.plugins.diagnostic/cordova.plugins.diagnostic-tests.ts rename to types/cordova.plugins.diagnostic/cordova.plugins.diagnostic-tests.ts diff --git a/cordova.plugins.diagnostic/index.d.ts b/types/cordova.plugins.diagnostic/index.d.ts similarity index 100% rename from cordova.plugins.diagnostic/index.d.ts rename to types/cordova.plugins.diagnostic/index.d.ts diff --git a/cordova.plugins.diagnostic/tsconfig.json b/types/cordova.plugins.diagnostic/tsconfig.json similarity index 100% rename from cordova.plugins.diagnostic/tsconfig.json rename to types/cordova.plugins.diagnostic/tsconfig.json diff --git a/cordova/cordova-tests.ts b/types/cordova/cordova-tests.ts similarity index 100% rename from cordova/cordova-tests.ts rename to types/cordova/cordova-tests.ts diff --git a/cordova/index.d.ts b/types/cordova/index.d.ts similarity index 100% rename from cordova/index.d.ts rename to types/cordova/index.d.ts diff --git a/cordova/tsconfig.json b/types/cordova/tsconfig.json similarity index 100% rename from cordova/tsconfig.json rename to types/cordova/tsconfig.json diff --git a/cordova_app_version_plugin/README.md b/types/cordova_app_version_plugin/README.md similarity index 100% rename from cordova_app_version_plugin/README.md rename to types/cordova_app_version_plugin/README.md diff --git a/cordova_app_version_plugin/cordova_app_version_plugin-tests.ts b/types/cordova_app_version_plugin/cordova_app_version_plugin-tests.ts similarity index 100% rename from cordova_app_version_plugin/cordova_app_version_plugin-tests.ts rename to types/cordova_app_version_plugin/cordova_app_version_plugin-tests.ts diff --git a/cordova_app_version_plugin/index.d.ts b/types/cordova_app_version_plugin/index.d.ts similarity index 100% rename from cordova_app_version_plugin/index.d.ts rename to types/cordova_app_version_plugin/index.d.ts diff --git a/cordova_app_version_plugin/tsconfig.json b/types/cordova_app_version_plugin/tsconfig.json similarity index 100% rename from cordova_app_version_plugin/tsconfig.json rename to types/cordova_app_version_plugin/tsconfig.json diff --git a/cordovarduino/cordovarduino-tests.ts b/types/cordovarduino/cordovarduino-tests.ts similarity index 100% rename from cordovarduino/cordovarduino-tests.ts rename to types/cordovarduino/cordovarduino-tests.ts diff --git a/cordovarduino/index.d.ts b/types/cordovarduino/index.d.ts similarity index 100% rename from cordovarduino/index.d.ts rename to types/cordovarduino/index.d.ts diff --git a/cordovarduino/tsconfig.json b/types/cordovarduino/tsconfig.json similarity index 100% rename from cordovarduino/tsconfig.json rename to types/cordovarduino/tsconfig.json diff --git a/core-decorators/core-decorators-tests.ts b/types/core-decorators/core-decorators-tests.ts similarity index 94% rename from core-decorators/core-decorators-tests.ts rename to types/core-decorators/core-decorators-tests.ts index 04a22c19cf..ef4659e56b 100644 --- a/core-decorators/core-decorators-tests.ts +++ b/types/core-decorators/core-decorators-tests.ts @@ -1,4 +1,3 @@ - // // @autobind // @@ -35,7 +34,7 @@ class Meal { entree: string = 'steak'; } -var dinner = new Meal(); +const dinner = new Meal(); dinner.entree = 'salmon'; // @@ -99,11 +98,9 @@ person2.facepalmHarder(); // @debounce // - import { debounce } from 'core-decorators'; class Editor { - content = ''; @debounce(500) @@ -119,7 +116,6 @@ class Editor { import { throttle } from 'core-decorators'; class Editor2 { - content = ''; @throttle(500, {leading: false}) @@ -162,8 +158,8 @@ class Meal2 { cost: number = 4.44; } -var dinner2 = new Meal2(); -for (var key in dinner2) { +const dinner2 = new Meal2(); +for (const key in dinner2) { key; // "entree" only, not "cost" } @@ -182,7 +178,7 @@ class Meal3 { entree: string = 'steak'; } -var dinner3 = new Meal3(); +const dinner3 = new Meal3(); Object.defineProperty(dinner3, 'entree', { enumerable: false @@ -196,7 +192,7 @@ Object.defineProperty(dinner3, 'entree', { declare function memoize(func: T): T; import { decorate } from 'core-decorators'; -var count = 0; +let count = 0; class Task { @decorate(memoize) @@ -207,8 +203,8 @@ class Task { } } -var task = new Task(); -var data = [1, 2, 3]; +const task = new Task(); +const data = [1, 2, 3]; task.doSomethingExpensive(data); task.doSomethingExpensive(data); @@ -232,7 +228,7 @@ class Editor3 { hugeBuffer = createHugeBuffer(); } -var editor = new Editor3(); +const editor = new Editor3(); // createHugeBuffer() has not been called yet editor.hugeBuffer; @@ -270,7 +266,7 @@ class Bird { } } -var bird = new Bird(); +const bird = new Bird(); bird.singMatingCall(); // alerts "tweet tweet" @@ -288,17 +284,12 @@ const myConsole = { class Bird2 { @time('sing') - sing() { - } + sing() {} @time('sing2', myConsole) - sing2() { - - } + sing2() {} } -var bird2 = new Bird2(); +const bird2 = new Bird2(); bird2.sing(); // console.time label will be 'sing-0' bird2.sing(); // console.time label will be 'sing-1' - - diff --git a/core-decorators/index.d.ts b/types/core-decorators/index.d.ts similarity index 100% rename from core-decorators/index.d.ts rename to types/core-decorators/index.d.ts diff --git a/core-decorators/tsconfig.json b/types/core-decorators/tsconfig.json similarity index 100% rename from core-decorators/tsconfig.json rename to types/core-decorators/tsconfig.json diff --git a/core-decorators/tslint.json b/types/core-decorators/tslint.json similarity index 100% rename from core-decorators/tslint.json rename to types/core-decorators/tslint.json diff --git a/core-js/core-js-tests.ts b/types/core-js/core-js-tests.ts similarity index 99% rename from core-js/core-js-tests.ts rename to types/core-js/core-js-tests.ts index 0614b117b9..3f585db33e 100644 --- a/core-js/core-js-tests.ts +++ b/types/core-js/core-js-tests.ts @@ -1,5 +1,3 @@ - - interface Point { x: number; y: number; } interface Point3D extends Point { z: number; } diff --git a/core-js/index.d.ts b/types/core-js/index.d.ts similarity index 77% rename from core-js/index.d.ts rename to types/core-js/index.d.ts index 4191cd11aa..0bbe4974ae 100644 --- a/core-js/index.d.ts +++ b/types/core-js/index.d.ts @@ -456,7 +456,7 @@ interface String { declare function delay(msec: number): Promise; declare namespace core { - var version: string; + const version: string; namespace Reflect { function apply(target: Function, thisArgument: any, argumentsList: ArrayLike): any; @@ -475,7 +475,7 @@ declare namespace core { function setPrototypeOf(target: any, proto: any): boolean; } - var Object: { + const Object: { getPrototypeOf(o: any): any; getOwnPropertyNames(o: any): string[]; create(o: any, properties?: PropertyDescriptorMap): any; @@ -502,12 +502,12 @@ declare namespace core { make(proto: T, mixin?: any): T; }; - var Function: { + const Function: { bind(target: Function, thisArg: any, ...argArray: any[]): any; part(target: Function, ...args: any[]): any; }; - var Array: { + const Array: { from(arrayLike: ArrayLike | Iterable, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; from(arrayLike: ArrayLike | Iterable): T[]; of(...items: T[]): T[]; @@ -544,7 +544,7 @@ declare namespace core { turn(array: ArrayLike, callbackfn: (memo: U, value: T, index: number, array: T[]) => void, memo?: U): U; }; - var String: { + const String: { codePointAt(text: string, pos: number): number; includes(text: string, searchString: string, position?: number): boolean; endsWith(text: string, searchString: string, endPosition?: number): boolean; @@ -559,14 +559,14 @@ declare namespace core { unescapeHTML(text: string): string; }; - var Date: { + const Date: { now(): number; toISOString(date: Date): string; format(date: Date, template: string, locale?: string): string; formatUTC(date: Date, template: string, locale?: string): string; }; - var Number: { + const Number: { EPSILON: number; isFinite(number: number): boolean; isInteger(number: number): boolean; @@ -596,7 +596,7 @@ declare namespace core { random(lim?: number): number; }; - var Math: { + const Math: { clz32(x: number): number; imul(x: number, y: number): number; sign(x: number): number; @@ -616,20 +616,20 @@ declare namespace core { cbrt(x: number): number; }; - var RegExp: { + const RegExp: { escape(str: string): string; }; - var Map: MapConstructor; - var Set: SetConstructor; - var WeakMap: WeakMapConstructor; - var WeakSet: WeakSetConstructor; - var Promise: PromiseConstructor; - var Symbol: SymbolConstructor; - var Dict: DictConstructor; - var global: any; - var log: Log; - var _: boolean; + const Map: MapConstructor; + const Set: SetConstructor; + const WeakMap: WeakMapConstructor; + const WeakSet: WeakSetConstructor; + const Promise: PromiseConstructor; + const Symbol: SymbolConstructor; + const Dict: DictConstructor; + const global: any; + const log: Log; + const _: boolean; function setTimeout(handler: any, timeout?: any, ...args: any[]): number; @@ -671,47 +671,47 @@ declare module "core-js/core/$for" { export = $for; } declare module "core-js/core/_" { - var _: typeof core._; + const _: typeof core._; export = _; } declare module "core-js/core/array" { - var Array: typeof core.Array; + const Array: typeof core.Array; export = Array; } declare module "core-js/core/date" { - var Date: typeof core.Date; + const Date: typeof core.Date; export = Date; } declare module "core-js/core/delay" { - var delay: typeof core.delay; + const delay: typeof core.delay; export = delay; } declare module "core-js/core/dict" { - var Dict: typeof core.Dict; + const Dict: typeof core.Dict; export = Dict; } declare module "core-js/core/function" { - var Function: typeof core.Function; + const Function: typeof core.Function; export = Function; } declare module "core-js/core/global" { - var global: typeof core.global; + const global: typeof core.global; export = global; } declare module "core-js/core/log" { - var log: typeof core.log; + const log: typeof core.log; export = log; } declare module "core-js/core/number" { - var Number: typeof core.Number; + const Number: typeof core.Number; export = Number; } declare module "core-js/core/object" { - var Object: typeof core.Object; + const Object: typeof core.Object; export = Object; } declare module "core-js/core/string" { - var String: typeof core.String; + const String: typeof core.String; export = String; } declare module "core-js/fn/$for" { @@ -719,613 +719,613 @@ declare module "core-js/fn/$for" { export = $for; } declare module "core-js/fn/_" { - var _: typeof core._; + const _: typeof core._; export = _; } declare module "core-js/fn/clear-immediate" { - var clearImmediate: typeof core.clearImmediate; + const clearImmediate: typeof core.clearImmediate; export = clearImmediate; } declare module "core-js/fn/delay" { - var delay: typeof core.delay; + const delay: typeof core.delay; export = delay; } declare module "core-js/fn/dict" { - var Dict: typeof core.Dict; + const Dict: typeof core.Dict; export = Dict; } declare module "core-js/fn/get-iterator" { - var getIterator: typeof core.getIterator; + const getIterator: typeof core.getIterator; export = getIterator; } declare module "core-js/fn/global" { - var global: typeof core.global; + const global: typeof core.global; export = global; } declare module "core-js/fn/is-iterable" { - var isIterable: typeof core.isIterable; + const isIterable: typeof core.isIterable; export = isIterable; } declare module "core-js/fn/log" { - var log: typeof core.log; + const log: typeof core.log; export = log; } declare module "core-js/fn/map" { - var Map: typeof core.Map; + const Map: typeof core.Map; export = Map; } declare module "core-js/fn/promise" { - var Promise: typeof core.Promise; + const Promise: typeof core.Promise; export = Promise; } declare module "core-js/fn/set" { - var Set: typeof core.Set; + const Set: typeof core.Set; export = Set; } declare module "core-js/fn/set-immediate" { - var setImmediate: typeof core.setImmediate; + const setImmediate: typeof core.setImmediate; export = setImmediate; } declare module "core-js/fn/set-interval" { - var setInterval: typeof core.setInterval; + const setInterval: typeof core.setInterval; export = setInterval; } declare module "core-js/fn/set-timeout" { - var setTimeout: typeof core.setTimeout; + const setTimeout: typeof core.setTimeout; export = setTimeout; } declare module "core-js/fn/weak-map" { - var WeakMap: typeof core.WeakMap; + const WeakMap: typeof core.WeakMap; export = WeakMap; } declare module "core-js/fn/weak-set" { - var WeakSet: typeof core.WeakSet; + const WeakSet: typeof core.WeakSet; export = WeakSet; } declare module "core-js/fn/array" { - var Array: typeof core.Array; + const Array: typeof core.Array; export = Array; } declare module "core-js/fn/array/concat" { - var concat: typeof core.Array.concat; + const concat: typeof core.Array.concat; export = concat; } declare module "core-js/fn/array/copy-within" { - var copyWithin: typeof core.Array.copyWithin; + const copyWithin: typeof core.Array.copyWithin; export = copyWithin; } declare module "core-js/fn/array/entries" { - var entries: typeof core.Array.entries; + const entries: typeof core.Array.entries; export = entries; } declare module "core-js/fn/array/every" { - var every: typeof core.Array.every; + const every: typeof core.Array.every; export = every; } declare module "core-js/fn/array/fill" { - var fill: typeof core.Array.fill; + const fill: typeof core.Array.fill; export = fill; } declare module "core-js/fn/array/filter" { - var filter: typeof core.Array.filter; + const filter: typeof core.Array.filter; export = filter; } declare module "core-js/fn/array/find" { - var find: typeof core.Array.find; + const find: typeof core.Array.find; export = find; } declare module "core-js/fn/array/find-index" { - var findIndex: typeof core.Array.findIndex; + const findIndex: typeof core.Array.findIndex; export = findIndex; } declare module "core-js/fn/array/for-each" { - var forEach: typeof core.Array.forEach; + const forEach: typeof core.Array.forEach; export = forEach; } declare module "core-js/fn/array/from" { - var from: typeof core.Array.from; + const from: typeof core.Array.from; export = from; } declare module "core-js/fn/array/includes" { - var includes: typeof core.Array.includes; + const includes: typeof core.Array.includes; export = includes; } declare module "core-js/fn/array/index-of" { - var indexOf: typeof core.Array.indexOf; + const indexOf: typeof core.Array.indexOf; export = indexOf; } declare module "core-js/fn/array/join" { - var join: typeof core.Array.join; + const join: typeof core.Array.join; export = join; } declare module "core-js/fn/array/keys" { - var keys: typeof core.Array.keys; + const keys: typeof core.Array.keys; export = keys; } declare module "core-js/fn/array/last-index-of" { - var lastIndexOf: typeof core.Array.lastIndexOf; + const lastIndexOf: typeof core.Array.lastIndexOf; export = lastIndexOf; } declare module "core-js/fn/array/map" { - var map: typeof core.Array.map; + const map: typeof core.Array.map; export = map; } declare module "core-js/fn/array/of" { - var of: typeof core.Array.of; + const of: typeof core.Array.of; export = of; } declare module "core-js/fn/array/pop" { - var pop: typeof core.Array.pop; + const pop: typeof core.Array.pop; export = pop; } declare module "core-js/fn/array/push" { - var push: typeof core.Array.push; + const push: typeof core.Array.push; export = push; } declare module "core-js/fn/array/reduce" { - var reduce: typeof core.Array.reduce; + const reduce: typeof core.Array.reduce; export = reduce; } declare module "core-js/fn/array/reduce-right" { - var reduceRight: typeof core.Array.reduceRight; + const reduceRight: typeof core.Array.reduceRight; export = reduceRight; } declare module "core-js/fn/array/reverse" { - var reverse: typeof core.Array.reverse; + const reverse: typeof core.Array.reverse; export = reverse; } declare module "core-js/fn/array/shift" { - var shift: typeof core.Array.shift; + const shift: typeof core.Array.shift; export = shift; } declare module "core-js/fn/array/slice" { - var slice: typeof core.Array.slice; + const slice: typeof core.Array.slice; export = slice; } declare module "core-js/fn/array/some" { - var some: typeof core.Array.some; + const some: typeof core.Array.some; export = some; } declare module "core-js/fn/array/sort" { - var sort: typeof core.Array.sort; + const sort: typeof core.Array.sort; export = sort; } declare module "core-js/fn/array/splice" { - var splice: typeof core.Array.splice; + const splice: typeof core.Array.splice; export = splice; } declare module "core-js/fn/array/turn" { - var turn: typeof core.Array.turn; + const turn: typeof core.Array.turn; export = turn; } declare module "core-js/fn/array/unshift" { - var unshift: typeof core.Array.unshift; + const unshift: typeof core.Array.unshift; export = unshift; } declare module "core-js/fn/array/values" { - var values: typeof core.Array.values; + const values: typeof core.Array.values; export = values; } declare module "core-js/fn/date" { - var Date: typeof core.Date; + const Date: typeof core.Date; export = Date; } declare module "core-js/fn/date/add-locale" { - var addLocale: typeof core.addLocale; + const addLocale: typeof core.addLocale; export = addLocale; } declare module "core-js/fn/date/format" { - var format: typeof core.Date.format; + const format: typeof core.Date.format; export = format; } declare module "core-js/fn/date/formatUTC" { - var formatUTC: typeof core.Date.formatUTC; + const formatUTC: typeof core.Date.formatUTC; export = formatUTC; } declare module "core-js/fn/function" { - var Function: typeof core.Function; + const Function: typeof core.Function; export = Function; } declare module "core-js/fn/function/has-instance" { - var hasInstance: (value: any) => boolean; + const hasInstance: (value: any) => boolean; export = hasInstance; } declare module "core-js/fn/function/name" { } declare module "core-js/fn/function/part" { - var part: typeof core.Function.part; + const part: typeof core.Function.part; export = part; } declare module "core-js/fn/math" { - var Math: typeof core.Math; + const Math: typeof core.Math; export = Math; } declare module "core-js/fn/math/acosh" { - var acosh: typeof core.Math.acosh; + const acosh: typeof core.Math.acosh; export = acosh; } declare module "core-js/fn/math/asinh" { - var asinh: typeof core.Math.asinh; + const asinh: typeof core.Math.asinh; export = asinh; } declare module "core-js/fn/math/atanh" { - var atanh: typeof core.Math.atanh; + const atanh: typeof core.Math.atanh; export = atanh; } declare module "core-js/fn/math/cbrt" { - var cbrt: typeof core.Math.cbrt; + const cbrt: typeof core.Math.cbrt; export = cbrt; } declare module "core-js/fn/math/clz32" { - var clz32: typeof core.Math.clz32; + const clz32: typeof core.Math.clz32; export = clz32; } declare module "core-js/fn/math/cosh" { - var cosh: typeof core.Math.cosh; + const cosh: typeof core.Math.cosh; export = cosh; } declare module "core-js/fn/math/expm1" { - var expm1: typeof core.Math.expm1; + const expm1: typeof core.Math.expm1; export = expm1; } declare module "core-js/fn/math/fround" { - var fround: typeof core.Math.fround; + const fround: typeof core.Math.fround; export = fround; } declare module "core-js/fn/math/hypot" { - var hypot: typeof core.Math.hypot; + const hypot: typeof core.Math.hypot; export = hypot; } declare module "core-js/fn/math/imul" { - var imul: typeof core.Math.imul; + const imul: typeof core.Math.imul; export = imul; } declare module "core-js/fn/math/log10" { - var log10: typeof core.Math.log10; + const log10: typeof core.Math.log10; export = log10; } declare module "core-js/fn/math/log1p" { - var log1p: typeof core.Math.log1p; + const log1p: typeof core.Math.log1p; export = log1p; } declare module "core-js/fn/math/log2" { - var log2: typeof core.Math.log2; + const log2: typeof core.Math.log2; export = log2; } declare module "core-js/fn/math/sign" { - var sign: typeof core.Math.sign; + const sign: typeof core.Math.sign; export = sign; } declare module "core-js/fn/math/sinh" { - var sinh: typeof core.Math.sinh; + const sinh: typeof core.Math.sinh; export = sinh; } declare module "core-js/fn/math/tanh" { - var tanh: typeof core.Math.tanh; + const tanh: typeof core.Math.tanh; export = tanh; } declare module "core-js/fn/math/trunc" { - var trunc: typeof core.Math.trunc; + const trunc: typeof core.Math.trunc; export = trunc; } declare module "core-js/fn/number" { - var Number: typeof core.Number; + const Number: typeof core.Number; export = Number; } declare module "core-js/fn/number/epsilon" { - var EPSILON: typeof core.Number.EPSILON; + const EPSILON: typeof core.Number.EPSILON; export = EPSILON; } declare module "core-js/fn/number/is-finite" { - var isFinite: typeof core.Number.isFinite; + const isFinite: typeof core.Number.isFinite; export = isFinite; } declare module "core-js/fn/number/is-integer" { - var isInteger: typeof core.Number.isInteger; + const isInteger: typeof core.Number.isInteger; export = isInteger; } declare module "core-js/fn/number/is-nan" { - var isNaN: typeof core.Number.isNaN; + const isNaN: typeof core.Number.isNaN; export = isNaN; } declare module "core-js/fn/number/is-safe-integer" { - var isSafeInteger: typeof core.Number.isSafeInteger; + const isSafeInteger: typeof core.Number.isSafeInteger; export = isSafeInteger; } declare module "core-js/fn/number/max-safe-integer" { - var MAX_SAFE_INTEGER: typeof core.Number.MAX_SAFE_INTEGER; + const MAX_SAFE_INTEGER: typeof core.Number.MAX_SAFE_INTEGER; export = MAX_SAFE_INTEGER; } declare module "core-js/fn/number/min-safe-integer" { - var MIN_SAFE_INTEGER: typeof core.Number.MIN_SAFE_INTEGER; + const MIN_SAFE_INTEGER: typeof core.Number.MIN_SAFE_INTEGER; export = MIN_SAFE_INTEGER; } declare module "core-js/fn/number/parse-float" { - var parseFloat: typeof core.Number.parseFloat; + const parseFloat: typeof core.Number.parseFloat; export = parseFloat; } declare module "core-js/fn/number/parse-int" { - var parseInt: typeof core.Number.parseInt; + const parseInt: typeof core.Number.parseInt; export = parseInt; } declare module "core-js/fn/number/random" { - var random: typeof core.Number.random; + const random: typeof core.Number.random; export = random; } declare module "core-js/fn/object" { - var Object: typeof core.Object; + const Object: typeof core.Object; export = Object; } declare module "core-js/fn/object/assign" { - var assign: typeof core.Object.assign; + const assign: typeof core.Object.assign; export = assign; } declare module "core-js/fn/object/classof" { - var classof: typeof core.Object.classof; + const classof: typeof core.Object.classof; export = classof; } declare module "core-js/fn/object/create" { - var create: typeof core.Object.create; + const create: typeof core.Object.create; export = create; } declare module "core-js/fn/object/define" { - var define: typeof core.Object.define; + const define: typeof core.Object.define; export = define; } declare module "core-js/fn/object/define-properties" { - var defineProperties: typeof core.Object.defineProperties; + const defineProperties: typeof core.Object.defineProperties; export = defineProperties; } declare module "core-js/fn/object/define-property" { - var defineProperty: typeof core.Object.defineProperty; + const defineProperty: typeof core.Object.defineProperty; export = defineProperty; } declare module "core-js/fn/object/entries" { - var entries: typeof core.Object.entries; + const entries: typeof core.Object.entries; export = entries; } declare module "core-js/fn/object/freeze" { - var freeze: typeof core.Object.freeze; + const freeze: typeof core.Object.freeze; export = freeze; } declare module "core-js/fn/object/get-own-property-descriptor" { - var getOwnPropertyDescriptor: typeof core.Object.getOwnPropertyDescriptor; + const getOwnPropertyDescriptor: typeof core.Object.getOwnPropertyDescriptor; export = getOwnPropertyDescriptor; } declare module "core-js/fn/object/get-own-property-descriptors" { - var getOwnPropertyDescriptors: typeof core.Object.getOwnPropertyDescriptors; + const getOwnPropertyDescriptors: typeof core.Object.getOwnPropertyDescriptors; export = getOwnPropertyDescriptors; } declare module "core-js/fn/object/get-own-property-names" { - var getOwnPropertyNames: typeof core.Object.getOwnPropertyNames; + const getOwnPropertyNames: typeof core.Object.getOwnPropertyNames; export = getOwnPropertyNames; } declare module "core-js/fn/object/get-own-property-symbols" { - var getOwnPropertySymbols: typeof core.Object.getOwnPropertySymbols; + const getOwnPropertySymbols: typeof core.Object.getOwnPropertySymbols; export = getOwnPropertySymbols; } declare module "core-js/fn/object/get-prototype-of" { - var getPrototypeOf: typeof core.Object.getPrototypeOf; + const getPrototypeOf: typeof core.Object.getPrototypeOf; export = getPrototypeOf; } declare module "core-js/fn/object/is" { - var is: typeof core.Object.is; + const is: typeof core.Object.is; export = is; } declare module "core-js/fn/object/is-extensible" { - var isExtensible: typeof core.Object.isExtensible; + const isExtensible: typeof core.Object.isExtensible; export = isExtensible; } declare module "core-js/fn/object/is-frozen" { - var isFrozen: typeof core.Object.isFrozen; + const isFrozen: typeof core.Object.isFrozen; export = isFrozen; } declare module "core-js/fn/object/is-object" { - var isObject: typeof core.Object.isObject; + const isObject: typeof core.Object.isObject; export = isObject; } declare module "core-js/fn/object/is-sealed" { - var isSealed: typeof core.Object.isSealed; + const isSealed: typeof core.Object.isSealed; export = isSealed; } declare module "core-js/fn/object/keys" { - var keys: typeof core.Object.keys; + const keys: typeof core.Object.keys; export = keys; } declare module "core-js/fn/object/make" { - var make: typeof core.Object.make; + const make: typeof core.Object.make; export = make; } declare module "core-js/fn/object/prevent-extensions" { - var preventExtensions: typeof core.Object.preventExtensions; + const preventExtensions: typeof core.Object.preventExtensions; export = preventExtensions; } declare module "core-js/fn/object/seal" { - var seal: typeof core.Object.seal; + const seal: typeof core.Object.seal; export = seal; } declare module "core-js/fn/object/set-prototype-of" { - var setPrototypeOf: typeof core.Object.setPrototypeOf; + const setPrototypeOf: typeof core.Object.setPrototypeOf; export = setPrototypeOf; } declare module "core-js/fn/object/values" { - var values: typeof core.Object.values; + const values: typeof core.Object.values; export = values; } declare module "core-js/fn/reflect" { - var Reflect: typeof core.Reflect; + const Reflect: typeof core.Reflect; export = Reflect; } declare module "core-js/fn/reflect/apply" { - var apply: typeof core.Reflect.apply; + const apply: typeof core.Reflect.apply; export = apply; } declare module "core-js/fn/reflect/construct" { - var construct: typeof core.Reflect.construct; + const construct: typeof core.Reflect.construct; export = construct; } declare module "core-js/fn/reflect/define-property" { - var defineProperty: typeof core.Reflect.defineProperty; + const defineProperty: typeof core.Reflect.defineProperty; export = defineProperty; } declare module "core-js/fn/reflect/delete-property" { - var deleteProperty: typeof core.Reflect.deleteProperty; + const deleteProperty: typeof core.Reflect.deleteProperty; export = deleteProperty; } declare module "core-js/fn/reflect/enumerate" { - var enumerate: typeof core.Reflect.enumerate; + const enumerate: typeof core.Reflect.enumerate; export = enumerate; } declare module "core-js/fn/reflect/get" { - var get: typeof core.Reflect.get; + const get: typeof core.Reflect.get; export = get; } declare module "core-js/fn/reflect/get-own-property-descriptor" { - var getOwnPropertyDescriptor: typeof core.Reflect.getOwnPropertyDescriptor; + const getOwnPropertyDescriptor: typeof core.Reflect.getOwnPropertyDescriptor; export = getOwnPropertyDescriptor; } declare module "core-js/fn/reflect/get-prototype-of" { - var getPrototypeOf: typeof core.Reflect.getPrototypeOf; + const getPrototypeOf: typeof core.Reflect.getPrototypeOf; export = getPrototypeOf; } declare module "core-js/fn/reflect/has" { - var has: typeof core.Reflect.has; + const has: typeof core.Reflect.has; export = has; } declare module "core-js/fn/reflect/is-extensible" { - var isExtensible: typeof core.Reflect.isExtensible; + const isExtensible: typeof core.Reflect.isExtensible; export = isExtensible; } declare module "core-js/fn/reflect/own-keys" { - var ownKeys: typeof core.Reflect.ownKeys; + const ownKeys: typeof core.Reflect.ownKeys; export = ownKeys; } declare module "core-js/fn/reflect/prevent-extensions" { - var preventExtensions: typeof core.Reflect.preventExtensions; + const preventExtensions: typeof core.Reflect.preventExtensions; export = preventExtensions; } declare module "core-js/fn/reflect/set" { - var set: typeof core.Reflect.set; + const set: typeof core.Reflect.set; export = set; } declare module "core-js/fn/reflect/set-prototype-of" { - var setPrototypeOf: typeof core.Reflect.setPrototypeOf; + const setPrototypeOf: typeof core.Reflect.setPrototypeOf; export = setPrototypeOf; } declare module "core-js/fn/regexp" { - var RegExp: typeof core.RegExp; + const RegExp: typeof core.RegExp; export = RegExp; } declare module "core-js/fn/regexp/escape" { - var escape: typeof core.RegExp.escape; + const escape: typeof core.RegExp.escape; export = escape; } declare module "core-js/fn/string" { - var String: typeof core.String; + const String: typeof core.String; export = String; } declare module "core-js/fn/string/at" { - var at: typeof core.String.at; + const at: typeof core.String.at; export = at; } declare module "core-js/fn/string/code-point-at" { - var codePointAt: typeof core.String.codePointAt; + const codePointAt: typeof core.String.codePointAt; export = codePointAt; } declare module "core-js/fn/string/ends-with" { - var endsWith: typeof core.String.endsWith; + const endsWith: typeof core.String.endsWith; export = endsWith; } declare module "core-js/fn/string/escape-html" { - var escapeHTML: typeof core.String.escapeHTML; + const escapeHTML: typeof core.String.escapeHTML; export = escapeHTML; } declare module "core-js/fn/string/from-code-point" { - var fromCodePoint: typeof core.String.fromCodePoint; + const fromCodePoint: typeof core.String.fromCodePoint; export = fromCodePoint; } declare module "core-js/fn/string/includes" { - var includes: typeof core.String.includes; + const includes: typeof core.String.includes; export = includes; } declare module "core-js/fn/string/lpad" { - var lpad: typeof core.String.lpad; + const lpad: typeof core.String.lpad; export = lpad; } declare module "core-js/fn/string/raw" { - var raw: typeof core.String.raw; + const raw: typeof core.String.raw; export = raw; } declare module "core-js/fn/string/repeat" { - var repeat: typeof core.String.repeat; + const repeat: typeof core.String.repeat; export = repeat; } declare module "core-js/fn/string/rpad" { - var rpad: typeof core.String.rpad; + const rpad: typeof core.String.rpad; export = rpad; } declare module "core-js/fn/string/starts-with" { - var startsWith: typeof core.String.startsWith; + const startsWith: typeof core.String.startsWith; export = startsWith; } declare module "core-js/fn/string/unescape-html" { - var unescapeHTML: typeof core.String.unescapeHTML; + const unescapeHTML: typeof core.String.unescapeHTML; export = unescapeHTML; } declare module "core-js/fn/symbol" { - var Symbol: typeof core.Symbol; + const Symbol: typeof core.Symbol; export = Symbol; } declare module "core-js/fn/symbol/for" { - var _for: typeof core.Symbol.for; + const _for: typeof core.Symbol.for; export = _for; } declare module "core-js/fn/symbol/has-instance" { - var hasInstance: typeof core.Symbol.hasInstance; + const hasInstance: typeof core.Symbol.hasInstance; export = hasInstance; } declare module "core-js/fn/symbol/is-concat-spreadable" { - var isConcatSpreadable: typeof core.Symbol.isConcatSpreadable; + const isConcatSpreadable: typeof core.Symbol.isConcatSpreadable; export = isConcatSpreadable; } declare module "core-js/fn/symbol/iterator" { - var iterator: typeof core.Symbol.iterator; + const iterator: typeof core.Symbol.iterator; export = iterator; } declare module "core-js/fn/symbol/key-for" { - var keyFor: typeof core.Symbol.keyFor; + const keyFor: typeof core.Symbol.keyFor; export = keyFor; } declare module "core-js/fn/symbol/match" { - var match: typeof core.Symbol.match; + const match: typeof core.Symbol.match; export = match; } declare module "core-js/fn/symbol/replace" { - var replace: typeof core.Symbol.replace; + const replace: typeof core.Symbol.replace; export = replace; } declare module "core-js/fn/symbol/search" { - var search: typeof core.Symbol.search; + const search: typeof core.Symbol.search; export = search; } declare module "core-js/fn/symbol/species" { - var species: typeof core.Symbol.species; + const species: typeof core.Symbol.species; export = species; } declare module "core-js/fn/symbol/split" { - var split: typeof core.Symbol.split; + const split: typeof core.Symbol.split; export = split; } declare module "core-js/fn/symbol/to-primitive" { - var toPrimitive: typeof core.Symbol.toPrimitive; + const toPrimitive: typeof core.Symbol.toPrimitive; export = toPrimitive; } declare module "core-js/fn/symbol/to-string-tag" { - var toStringTag: typeof core.Symbol.toStringTag; + const toStringTag: typeof core.Symbol.toStringTag; export = toStringTag; } declare module "core-js/fn/symbol/unscopables" { - var unscopables: typeof core.Symbol.unscopables; + const unscopables: typeof core.Symbol.unscopables; export = unscopables; } declare module "core-js/es5" { @@ -1335,93 +1335,93 @@ declare module "core-js/es6" { export = core; } declare module "core-js/es6/array" { - var Array: typeof core.Array; + const Array: typeof core.Array; export = Array; } declare module "core-js/es6/function" { - var Function: typeof core.Function; + const Function: typeof core.Function; export = Function; } declare module "core-js/es6/map" { - var Map: typeof core.Map; + const Map: typeof core.Map; export = Map; } declare module "core-js/es6/math" { - var Math: typeof core.Math; + const Math: typeof core.Math; export = Math; } declare module "core-js/es6/number" { - var Number: typeof core.Number; + const Number: typeof core.Number; export = Number; } declare module "core-js/es6/object" { - var Object: typeof core.Object; + const Object: typeof core.Object; export = Object; } declare module "core-js/es6/promise" { - var Promise: typeof core.Promise; + const Promise: typeof core.Promise; export = Promise; } declare module "core-js/es6/reflect" { - var Reflect: typeof core.Reflect; + const Reflect: typeof core.Reflect; export = Reflect; } declare module "core-js/es6/regexp" { - var RegExp: typeof core.RegExp; + const RegExp: typeof core.RegExp; export = RegExp; } declare module "core-js/es6/set" { - var Set: typeof core.Set; + const Set: typeof core.Set; export = Set; } declare module "core-js/es6/string" { - var String: typeof core.String; + const String: typeof core.String; export = String; } declare module "core-js/es6/symbol" { - var Symbol: typeof core.Symbol; + const Symbol: typeof core.Symbol; export = Symbol; } declare module "core-js/es6/weak-map" { - var WeakMap: typeof core.WeakMap; + const WeakMap: typeof core.WeakMap; export = WeakMap; } declare module "core-js/es6/weak-set" { - var WeakSet: typeof core.WeakSet; + const WeakSet: typeof core.WeakSet; export = WeakSet; } declare module "core-js/es7" { export = core; } declare module "core-js/es7/array" { - var Array: typeof core.Array; + const Array: typeof core.Array; export = Array; } declare module "core-js/es7/map" { - var Map: typeof core.Map; + const Map: typeof core.Map; export = Map; } declare module "core-js/es7/object" { - var Object: typeof core.Object; + const Object: typeof core.Object; export = Object; } declare module "core-js/es7/regexp" { - var RegExp: typeof core.RegExp; + const RegExp: typeof core.RegExp; export = RegExp; } declare module "core-js/es7/set" { - var Set: typeof core.Set; + const Set: typeof core.Set; export = Set; } declare module "core-js/es7/string" { - var String: typeof core.String; + const String: typeof core.String; export = String; } declare module "core-js/js" { export = core; } declare module "core-js/js/array" { - var Array: typeof core.Array; + const Array: typeof core.Array; export = Array; } declare module "core-js/web" { @@ -1450,47 +1450,47 @@ declare module "core-js/library/core/$for" { export = $for; } declare module "core-js/library/core/_" { - var _: typeof core._; + const _: typeof core._; export = _; } declare module "core-js/library/core/array" { - var Array: typeof core.Array; + const Array: typeof core.Array; export = Array; } declare module "core-js/library/core/date" { - var Date: typeof core.Date; + const Date: typeof core.Date; export = Date; } declare module "core-js/library/core/delay" { - var delay: typeof core.delay; + const delay: typeof core.delay; export = delay; } declare module "core-js/library/core/dict" { - var Dict: typeof core.Dict; + const Dict: typeof core.Dict; export = Dict; } declare module "core-js/library/core/function" { - var Function: typeof core.Function; + const Function: typeof core.Function; export = Function; } declare module "core-js/library/core/global" { - var global: typeof core.global; + const global: typeof core.global; export = global; } declare module "core-js/library/core/log" { - var log: typeof core.log; + const log: typeof core.log; export = log; } declare module "core-js/library/core/number" { - var Number: typeof core.Number; + const Number: typeof core.Number; export = Number; } declare module "core-js/library/core/object" { - var Object: typeof core.Object; + const Object: typeof core.Object; export = Object; } declare module "core-js/library/core/string" { - var String: typeof core.String; + const String: typeof core.String; export = String; } declare module "core-js/library/fn/$for" { @@ -1498,613 +1498,613 @@ declare module "core-js/library/fn/$for" { export = $for; } declare module "core-js/library/fn/_" { - var _: typeof core._; + const _: typeof core._; export = _; } declare module "core-js/library/fn/clear-immediate" { - var clearImmediate: typeof core.clearImmediate; + const clearImmediate: typeof core.clearImmediate; export = clearImmediate; } declare module "core-js/library/fn/delay" { - var delay: typeof core.delay; + const delay: typeof core.delay; export = delay; } declare module "core-js/library/fn/dict" { - var Dict: typeof core.Dict; + const Dict: typeof core.Dict; export = Dict; } declare module "core-js/library/fn/get-iterator" { - var getIterator: typeof core.getIterator; + const getIterator: typeof core.getIterator; export = getIterator; } declare module "core-js/library/fn/global" { - var global: typeof core.global; + const global: typeof core.global; export = global; } declare module "core-js/library/fn/is-iterable" { - var isIterable: typeof core.isIterable; + const isIterable: typeof core.isIterable; export = isIterable; } declare module "core-js/library/fn/log" { - var log: typeof core.log; + const log: typeof core.log; export = log; } declare module "core-js/library/fn/map" { - var Map: typeof core.Map; + const Map: typeof core.Map; export = Map; } declare module "core-js/library/fn/promise" { - var Promise: typeof core.Promise; + const Promise: typeof core.Promise; export = Promise; } declare module "core-js/library/fn/set" { - var Set: typeof core.Set; + const Set: typeof core.Set; export = Set; } declare module "core-js/library/fn/set-immediate" { - var setImmediate: typeof core.setImmediate; + const setImmediate: typeof core.setImmediate; export = setImmediate; } declare module "core-js/library/fn/set-interval" { - var setInterval: typeof core.setInterval; + const setInterval: typeof core.setInterval; export = setInterval; } declare module "core-js/library/fn/set-timeout" { - var setTimeout: typeof core.setTimeout; + const setTimeout: typeof core.setTimeout; export = setTimeout; } declare module "core-js/library/fn/weak-map" { - var WeakMap: typeof core.WeakMap; + const WeakMap: typeof core.WeakMap; export = WeakMap; } declare module "core-js/library/fn/weak-set" { - var WeakSet: typeof core.WeakSet; + const WeakSet: typeof core.WeakSet; export = WeakSet; } declare module "core-js/library/fn/array" { - var Array: typeof core.Array; + const Array: typeof core.Array; export = Array; } declare module "core-js/library/fn/array/concat" { - var concat: typeof core.Array.concat; + const concat: typeof core.Array.concat; export = concat; } declare module "core-js/library/fn/array/copy-within" { - var copyWithin: typeof core.Array.copyWithin; + const copyWithin: typeof core.Array.copyWithin; export = copyWithin; } declare module "core-js/library/fn/array/entries" { - var entries: typeof core.Array.entries; + const entries: typeof core.Array.entries; export = entries; } declare module "core-js/library/fn/array/every" { - var every: typeof core.Array.every; + const every: typeof core.Array.every; export = every; } declare module "core-js/library/fn/array/fill" { - var fill: typeof core.Array.fill; + const fill: typeof core.Array.fill; export = fill; } declare module "core-js/library/fn/array/filter" { - var filter: typeof core.Array.filter; + const filter: typeof core.Array.filter; export = filter; } declare module "core-js/library/fn/array/find" { - var find: typeof core.Array.find; + const find: typeof core.Array.find; export = find; } declare module "core-js/library/fn/array/find-index" { - var findIndex: typeof core.Array.findIndex; + const findIndex: typeof core.Array.findIndex; export = findIndex; } declare module "core-js/library/fn/array/for-each" { - var forEach: typeof core.Array.forEach; + const forEach: typeof core.Array.forEach; export = forEach; } declare module "core-js/library/fn/array/from" { - var from: typeof core.Array.from; + const from: typeof core.Array.from; export = from; } declare module "core-js/library/fn/array/includes" { - var includes: typeof core.Array.includes; + const includes: typeof core.Array.includes; export = includes; } declare module "core-js/library/fn/array/index-of" { - var indexOf: typeof core.Array.indexOf; + const indexOf: typeof core.Array.indexOf; export = indexOf; } declare module "core-js/library/fn/array/join" { - var join: typeof core.Array.join; + const join: typeof core.Array.join; export = join; } declare module "core-js/library/fn/array/keys" { - var keys: typeof core.Array.keys; + const keys: typeof core.Array.keys; export = keys; } declare module "core-js/library/fn/array/last-index-of" { - var lastIndexOf: typeof core.Array.lastIndexOf; + const lastIndexOf: typeof core.Array.lastIndexOf; export = lastIndexOf; } declare module "core-js/library/fn/array/map" { - var map: typeof core.Array.map; + const map: typeof core.Array.map; export = map; } declare module "core-js/library/fn/array/of" { - var of: typeof core.Array.of; + const of: typeof core.Array.of; export = of; } declare module "core-js/library/fn/array/pop" { - var pop: typeof core.Array.pop; + const pop: typeof core.Array.pop; export = pop; } declare module "core-js/library/fn/array/push" { - var push: typeof core.Array.push; + const push: typeof core.Array.push; export = push; } declare module "core-js/library/fn/array/reduce" { - var reduce: typeof core.Array.reduce; + const reduce: typeof core.Array.reduce; export = reduce; } declare module "core-js/library/fn/array/reduce-right" { - var reduceRight: typeof core.Array.reduceRight; + const reduceRight: typeof core.Array.reduceRight; export = reduceRight; } declare module "core-js/library/fn/array/reverse" { - var reverse: typeof core.Array.reverse; + const reverse: typeof core.Array.reverse; export = reverse; } declare module "core-js/library/fn/array/shift" { - var shift: typeof core.Array.shift; + const shift: typeof core.Array.shift; export = shift; } declare module "core-js/library/fn/array/slice" { - var slice: typeof core.Array.slice; + const slice: typeof core.Array.slice; export = slice; } declare module "core-js/library/fn/array/some" { - var some: typeof core.Array.some; + const some: typeof core.Array.some; export = some; } declare module "core-js/library/fn/array/sort" { - var sort: typeof core.Array.sort; + const sort: typeof core.Array.sort; export = sort; } declare module "core-js/library/fn/array/splice" { - var splice: typeof core.Array.splice; + const splice: typeof core.Array.splice; export = splice; } declare module "core-js/library/fn/array/turn" { - var turn: typeof core.Array.turn; + const turn: typeof core.Array.turn; export = turn; } declare module "core-js/library/fn/array/unshift" { - var unshift: typeof core.Array.unshift; + const unshift: typeof core.Array.unshift; export = unshift; } declare module "core-js/library/fn/array/values" { - var values: typeof core.Array.values; + const values: typeof core.Array.values; export = values; } declare module "core-js/library/fn/date" { - var Date: typeof core.Date; + const Date: typeof core.Date; export = Date; } declare module "core-js/library/fn/date/add-locale" { - var addLocale: typeof core.addLocale; + const addLocale: typeof core.addLocale; export = addLocale; } declare module "core-js/library/fn/date/format" { - var format: typeof core.Date.format; + const format: typeof core.Date.format; export = format; } declare module "core-js/library/fn/date/formatUTC" { - var formatUTC: typeof core.Date.formatUTC; + const formatUTC: typeof core.Date.formatUTC; export = formatUTC; } declare module "core-js/library/fn/function" { - var Function: typeof core.Function; + const Function: typeof core.Function; export = Function; } declare module "core-js/library/fn/function/has-instance" { - var hasInstance: (value: any) => boolean; + const hasInstance: (value: any) => boolean; export = hasInstance; } declare module "core-js/library/fn/function/name" { } declare module "core-js/library/fn/function/part" { - var part: typeof core.Function.part; + const part: typeof core.Function.part; export = part; } declare module "core-js/library/fn/math" { - var Math: typeof core.Math; + const Math: typeof core.Math; export = Math; } declare module "core-js/library/fn/math/acosh" { - var acosh: typeof core.Math.acosh; + const acosh: typeof core.Math.acosh; export = acosh; } declare module "core-js/library/fn/math/asinh" { - var asinh: typeof core.Math.asinh; + const asinh: typeof core.Math.asinh; export = asinh; } declare module "core-js/library/fn/math/atanh" { - var atanh: typeof core.Math.atanh; + const atanh: typeof core.Math.atanh; export = atanh; } declare module "core-js/library/fn/math/cbrt" { - var cbrt: typeof core.Math.cbrt; + const cbrt: typeof core.Math.cbrt; export = cbrt; } declare module "core-js/library/fn/math/clz32" { - var clz32: typeof core.Math.clz32; + const clz32: typeof core.Math.clz32; export = clz32; } declare module "core-js/library/fn/math/cosh" { - var cosh: typeof core.Math.cosh; + const cosh: typeof core.Math.cosh; export = cosh; } declare module "core-js/library/fn/math/expm1" { - var expm1: typeof core.Math.expm1; + const expm1: typeof core.Math.expm1; export = expm1; } declare module "core-js/library/fn/math/fround" { - var fround: typeof core.Math.fround; + const fround: typeof core.Math.fround; export = fround; } declare module "core-js/library/fn/math/hypot" { - var hypot: typeof core.Math.hypot; + const hypot: typeof core.Math.hypot; export = hypot; } declare module "core-js/library/fn/math/imul" { - var imul: typeof core.Math.imul; + const imul: typeof core.Math.imul; export = imul; } declare module "core-js/library/fn/math/log10" { - var log10: typeof core.Math.log10; + const log10: typeof core.Math.log10; export = log10; } declare module "core-js/library/fn/math/log1p" { - var log1p: typeof core.Math.log1p; + const log1p: typeof core.Math.log1p; export = log1p; } declare module "core-js/library/fn/math/log2" { - var log2: typeof core.Math.log2; + const log2: typeof core.Math.log2; export = log2; } declare module "core-js/library/fn/math/sign" { - var sign: typeof core.Math.sign; + const sign: typeof core.Math.sign; export = sign; } declare module "core-js/library/fn/math/sinh" { - var sinh: typeof core.Math.sinh; + const sinh: typeof core.Math.sinh; export = sinh; } declare module "core-js/library/fn/math/tanh" { - var tanh: typeof core.Math.tanh; + const tanh: typeof core.Math.tanh; export = tanh; } declare module "core-js/library/fn/math/trunc" { - var trunc: typeof core.Math.trunc; + const trunc: typeof core.Math.trunc; export = trunc; } declare module "core-js/library/fn/number" { - var Number: typeof core.Number; + const Number: typeof core.Number; export = Number; } declare module "core-js/library/fn/number/epsilon" { - var EPSILON: typeof core.Number.EPSILON; + const EPSILON: typeof core.Number.EPSILON; export = EPSILON; } declare module "core-js/library/fn/number/is-finite" { - var isFinite: typeof core.Number.isFinite; + const isFinite: typeof core.Number.isFinite; export = isFinite; } declare module "core-js/library/fn/number/is-integer" { - var isInteger: typeof core.Number.isInteger; + const isInteger: typeof core.Number.isInteger; export = isInteger; } declare module "core-js/library/fn/number/is-nan" { - var isNaN: typeof core.Number.isNaN; + const isNaN: typeof core.Number.isNaN; export = isNaN; } declare module "core-js/library/fn/number/is-safe-integer" { - var isSafeInteger: typeof core.Number.isSafeInteger; + const isSafeInteger: typeof core.Number.isSafeInteger; export = isSafeInteger; } declare module "core-js/library/fn/number/max-safe-integer" { - var MAX_SAFE_INTEGER: typeof core.Number.MAX_SAFE_INTEGER; + const MAX_SAFE_INTEGER: typeof core.Number.MAX_SAFE_INTEGER; export = MAX_SAFE_INTEGER; } declare module "core-js/library/fn/number/min-safe-integer" { - var MIN_SAFE_INTEGER: typeof core.Number.MIN_SAFE_INTEGER; + const MIN_SAFE_INTEGER: typeof core.Number.MIN_SAFE_INTEGER; export = MIN_SAFE_INTEGER; } declare module "core-js/library/fn/number/parse-float" { - var parseFloat: typeof core.Number.parseFloat; + const parseFloat: typeof core.Number.parseFloat; export = parseFloat; } declare module "core-js/library/fn/number/parse-int" { - var parseInt: typeof core.Number.parseInt; + const parseInt: typeof core.Number.parseInt; export = parseInt; } declare module "core-js/library/fn/number/random" { - var random: typeof core.Number.random; + const random: typeof core.Number.random; export = random; } declare module "core-js/library/fn/object" { - var Object: typeof core.Object; + const Object: typeof core.Object; export = Object; } declare module "core-js/library/fn/object/assign" { - var assign: typeof core.Object.assign; + const assign: typeof core.Object.assign; export = assign; } declare module "core-js/library/fn/object/classof" { - var classof: typeof core.Object.classof; + const classof: typeof core.Object.classof; export = classof; } declare module "core-js/library/fn/object/create" { - var create: typeof core.Object.create; + const create: typeof core.Object.create; export = create; } declare module "core-js/library/fn/object/define" { - var define: typeof core.Object.define; + const define: typeof core.Object.define; export = define; } declare module "core-js/library/fn/object/define-properties" { - var defineProperties: typeof core.Object.defineProperties; + const defineProperties: typeof core.Object.defineProperties; export = defineProperties; } declare module "core-js/library/fn/object/define-property" { - var defineProperty: typeof core.Object.defineProperty; + const defineProperty: typeof core.Object.defineProperty; export = defineProperty; } declare module "core-js/library/fn/object/entries" { - var entries: typeof core.Object.entries; + const entries: typeof core.Object.entries; export = entries; } declare module "core-js/library/fn/object/freeze" { - var freeze: typeof core.Object.freeze; + const freeze: typeof core.Object.freeze; export = freeze; } declare module "core-js/library/fn/object/get-own-property-descriptor" { - var getOwnPropertyDescriptor: typeof core.Object.getOwnPropertyDescriptor; + const getOwnPropertyDescriptor: typeof core.Object.getOwnPropertyDescriptor; export = getOwnPropertyDescriptor; } declare module "core-js/library/fn/object/get-own-property-descriptors" { - var getOwnPropertyDescriptors: typeof core.Object.getOwnPropertyDescriptors; + const getOwnPropertyDescriptors: typeof core.Object.getOwnPropertyDescriptors; export = getOwnPropertyDescriptors; } declare module "core-js/library/fn/object/get-own-property-names" { - var getOwnPropertyNames: typeof core.Object.getOwnPropertyNames; + const getOwnPropertyNames: typeof core.Object.getOwnPropertyNames; export = getOwnPropertyNames; } declare module "core-js/library/fn/object/get-own-property-symbols" { - var getOwnPropertySymbols: typeof core.Object.getOwnPropertySymbols; + const getOwnPropertySymbols: typeof core.Object.getOwnPropertySymbols; export = getOwnPropertySymbols; } declare module "core-js/library/fn/object/get-prototype-of" { - var getPrototypeOf: typeof core.Object.getPrototypeOf; + const getPrototypeOf: typeof core.Object.getPrototypeOf; export = getPrototypeOf; } declare module "core-js/library/fn/object/is" { - var is: typeof core.Object.is; + const is: typeof core.Object.is; export = is; } declare module "core-js/library/fn/object/is-extensible" { - var isExtensible: typeof core.Object.isExtensible; + const isExtensible: typeof core.Object.isExtensible; export = isExtensible; } declare module "core-js/library/fn/object/is-frozen" { - var isFrozen: typeof core.Object.isFrozen; + const isFrozen: typeof core.Object.isFrozen; export = isFrozen; } declare module "core-js/library/fn/object/is-object" { - var isObject: typeof core.Object.isObject; + const isObject: typeof core.Object.isObject; export = isObject; } declare module "core-js/library/fn/object/is-sealed" { - var isSealed: typeof core.Object.isSealed; + const isSealed: typeof core.Object.isSealed; export = isSealed; } declare module "core-js/library/fn/object/keys" { - var keys: typeof core.Object.keys; + const keys: typeof core.Object.keys; export = keys; } declare module "core-js/library/fn/object/make" { - var make: typeof core.Object.make; + const make: typeof core.Object.make; export = make; } declare module "core-js/library/fn/object/prevent-extensions" { - var preventExtensions: typeof core.Object.preventExtensions; + const preventExtensions: typeof core.Object.preventExtensions; export = preventExtensions; } declare module "core-js/library/fn/object/seal" { - var seal: typeof core.Object.seal; + const seal: typeof core.Object.seal; export = seal; } declare module "core-js/library/fn/object/set-prototype-of" { - var setPrototypeOf: typeof core.Object.setPrototypeOf; + const setPrototypeOf: typeof core.Object.setPrototypeOf; export = setPrototypeOf; } declare module "core-js/library/fn/object/values" { - var values: typeof core.Object.values; + const values: typeof core.Object.values; export = values; } declare module "core-js/library/fn/reflect" { - var Reflect: typeof core.Reflect; + const Reflect: typeof core.Reflect; export = Reflect; } declare module "core-js/library/fn/reflect/apply" { - var apply: typeof core.Reflect.apply; + const apply: typeof core.Reflect.apply; export = apply; } declare module "core-js/library/fn/reflect/construct" { - var construct: typeof core.Reflect.construct; + const construct: typeof core.Reflect.construct; export = construct; } declare module "core-js/library/fn/reflect/define-property" { - var defineProperty: typeof core.Reflect.defineProperty; + const defineProperty: typeof core.Reflect.defineProperty; export = defineProperty; } declare module "core-js/library/fn/reflect/delete-property" { - var deleteProperty: typeof core.Reflect.deleteProperty; + const deleteProperty: typeof core.Reflect.deleteProperty; export = deleteProperty; } declare module "core-js/library/fn/reflect/enumerate" { - var enumerate: typeof core.Reflect.enumerate; + const enumerate: typeof core.Reflect.enumerate; export = enumerate; } declare module "core-js/library/fn/reflect/get" { - var get: typeof core.Reflect.get; + const get: typeof core.Reflect.get; export = get; } declare module "core-js/library/fn/reflect/get-own-property-descriptor" { - var getOwnPropertyDescriptor: typeof core.Reflect.getOwnPropertyDescriptor; + const getOwnPropertyDescriptor: typeof core.Reflect.getOwnPropertyDescriptor; export = getOwnPropertyDescriptor; } declare module "core-js/library/fn/reflect/get-prototype-of" { - var getPrototypeOf: typeof core.Reflect.getPrototypeOf; + const getPrototypeOf: typeof core.Reflect.getPrototypeOf; export = getPrototypeOf; } declare module "core-js/library/fn/reflect/has" { - var has: typeof core.Reflect.has; + const has: typeof core.Reflect.has; export = has; } declare module "core-js/library/fn/reflect/is-extensible" { - var isExtensible: typeof core.Reflect.isExtensible; + const isExtensible: typeof core.Reflect.isExtensible; export = isExtensible; } declare module "core-js/library/fn/reflect/own-keys" { - var ownKeys: typeof core.Reflect.ownKeys; + const ownKeys: typeof core.Reflect.ownKeys; export = ownKeys; } declare module "core-js/library/fn/reflect/prevent-extensions" { - var preventExtensions: typeof core.Reflect.preventExtensions; + const preventExtensions: typeof core.Reflect.preventExtensions; export = preventExtensions; } declare module "core-js/library/fn/reflect/set" { - var set: typeof core.Reflect.set; + const set: typeof core.Reflect.set; export = set; } declare module "core-js/library/fn/reflect/set-prototype-of" { - var setPrototypeOf: typeof core.Reflect.setPrototypeOf; + const setPrototypeOf: typeof core.Reflect.setPrototypeOf; export = setPrototypeOf; } declare module "core-js/library/fn/regexp" { - var RegExp: typeof core.RegExp; + const RegExp: typeof core.RegExp; export = RegExp; } declare module "core-js/library/fn/regexp/escape" { - var escape: typeof core.RegExp.escape; + const escape: typeof core.RegExp.escape; export = escape; } declare module "core-js/library/fn/string" { - var String: typeof core.String; + const String: typeof core.String; export = String; } declare module "core-js/library/fn/string/at" { - var at: typeof core.String.at; + const at: typeof core.String.at; export = at; } declare module "core-js/library/fn/string/code-point-at" { - var codePointAt: typeof core.String.codePointAt; + const codePointAt: typeof core.String.codePointAt; export = codePointAt; } declare module "core-js/library/fn/string/ends-with" { - var endsWith: typeof core.String.endsWith; + const endsWith: typeof core.String.endsWith; export = endsWith; } declare module "core-js/library/fn/string/escape-html" { - var escapeHTML: typeof core.String.escapeHTML; + const escapeHTML: typeof core.String.escapeHTML; export = escapeHTML; } declare module "core-js/library/fn/string/from-code-point" { - var fromCodePoint: typeof core.String.fromCodePoint; + const fromCodePoint: typeof core.String.fromCodePoint; export = fromCodePoint; } declare module "core-js/library/fn/string/includes" { - var includes: typeof core.String.includes; + const includes: typeof core.String.includes; export = includes; } declare module "core-js/library/fn/string/lpad" { - var lpad: typeof core.String.lpad; + const lpad: typeof core.String.lpad; export = lpad; } declare module "core-js/library/fn/string/raw" { - var raw: typeof core.String.raw; + const raw: typeof core.String.raw; export = raw; } declare module "core-js/library/fn/string/repeat" { - var repeat: typeof core.String.repeat; + const repeat: typeof core.String.repeat; export = repeat; } declare module "core-js/library/fn/string/rpad" { - var rpad: typeof core.String.rpad; + const rpad: typeof core.String.rpad; export = rpad; } declare module "core-js/library/fn/string/starts-with" { - var startsWith: typeof core.String.startsWith; + const startsWith: typeof core.String.startsWith; export = startsWith; } declare module "core-js/library/fn/string/unescape-html" { - var unescapeHTML: typeof core.String.unescapeHTML; + const unescapeHTML: typeof core.String.unescapeHTML; export = unescapeHTML; } declare module "core-js/library/fn/symbol" { - var Symbol: typeof core.Symbol; + const Symbol: typeof core.Symbol; export = Symbol; } declare module "core-js/library/fn/symbol/for" { - var _for: typeof core.Symbol.for; + const _for: typeof core.Symbol.for; export = _for; } declare module "core-js/library/fn/symbol/has-instance" { - var hasInstance: typeof core.Symbol.hasInstance; + const hasInstance: typeof core.Symbol.hasInstance; export = hasInstance; } declare module "core-js/library/fn/symbol/is-concat-spreadable" { - var isConcatSpreadable: typeof core.Symbol.isConcatSpreadable; + const isConcatSpreadable: typeof core.Symbol.isConcatSpreadable; export = isConcatSpreadable; } declare module "core-js/library/fn/symbol/iterator" { - var iterator: typeof core.Symbol.iterator; + const iterator: typeof core.Symbol.iterator; export = iterator; } declare module "core-js/library/fn/symbol/key-for" { - var keyFor: typeof core.Symbol.keyFor; + const keyFor: typeof core.Symbol.keyFor; export = keyFor; } declare module "core-js/library/fn/symbol/match" { - var match: typeof core.Symbol.match; + const match: typeof core.Symbol.match; export = match; } declare module "core-js/library/fn/symbol/replace" { - var replace: typeof core.Symbol.replace; + const replace: typeof core.Symbol.replace; export = replace; } declare module "core-js/library/fn/symbol/search" { - var search: typeof core.Symbol.search; + const search: typeof core.Symbol.search; export = search; } declare module "core-js/library/fn/symbol/species" { - var species: typeof core.Symbol.species; + const species: typeof core.Symbol.species; export = species; } declare module "core-js/library/fn/symbol/split" { - var split: typeof core.Symbol.split; + const split: typeof core.Symbol.split; export = split; } declare module "core-js/library/fn/symbol/to-primitive" { - var toPrimitive: typeof core.Symbol.toPrimitive; + const toPrimitive: typeof core.Symbol.toPrimitive; export = toPrimitive; } declare module "core-js/library/fn/symbol/to-string-tag" { - var toStringTag: typeof core.Symbol.toStringTag; + const toStringTag: typeof core.Symbol.toStringTag; export = toStringTag; } declare module "core-js/library/fn/symbol/unscopables" { - var unscopables: typeof core.Symbol.unscopables; + const unscopables: typeof core.Symbol.unscopables; export = unscopables; } declare module "core-js/library/es5" { @@ -2114,93 +2114,93 @@ declare module "core-js/library/es6" { export = core; } declare module "core-js/library/es6/array" { - var Array: typeof core.Array; + const Array: typeof core.Array; export = Array; } declare module "core-js/library/es6/function" { - var Function: typeof core.Function; + const Function: typeof core.Function; export = Function; } declare module "core-js/library/es6/map" { - var Map: typeof core.Map; + const Map: typeof core.Map; export = Map; } declare module "core-js/library/es6/math" { - var Math: typeof core.Math; + const Math: typeof core.Math; export = Math; } declare module "core-js/library/es6/number" { - var Number: typeof core.Number; + const Number: typeof core.Number; export = Number; } declare module "core-js/library/es6/object" { - var Object: typeof core.Object; + const Object: typeof core.Object; export = Object; } declare module "core-js/library/es6/promise" { - var Promise: typeof core.Promise; + const Promise: typeof core.Promise; export = Promise; } declare module "core-js/library/es6/reflect" { - var Reflect: typeof core.Reflect; + const Reflect: typeof core.Reflect; export = Reflect; } declare module "core-js/library/es6/regexp" { - var RegExp: typeof core.RegExp; + const RegExp: typeof core.RegExp; export = RegExp; } declare module "core-js/library/es6/set" { - var Set: typeof core.Set; + const Set: typeof core.Set; export = Set; } declare module "core-js/library/es6/string" { - var String: typeof core.String; + const String: typeof core.String; export = String; } declare module "core-js/library/es6/symbol" { - var Symbol: typeof core.Symbol; + const Symbol: typeof core.Symbol; export = Symbol; } declare module "core-js/library/es6/weak-map" { - var WeakMap: typeof core.WeakMap; + const WeakMap: typeof core.WeakMap; export = WeakMap; } declare module "core-js/library/es6/weak-set" { - var WeakSet: typeof core.WeakSet; + const WeakSet: typeof core.WeakSet; export = WeakSet; } declare module "core-js/library/es7" { export = core; } declare module "core-js/library/es7/array" { - var Array: typeof core.Array; + const Array: typeof core.Array; export = Array; } declare module "core-js/library/es7/map" { - var Map: typeof core.Map; + const Map: typeof core.Map; export = Map; } declare module "core-js/library/es7/object" { - var Object: typeof core.Object; + const Object: typeof core.Object; export = Object; } declare module "core-js/library/es7/regexp" { - var RegExp: typeof core.RegExp; + const RegExp: typeof core.RegExp; export = RegExp; } declare module "core-js/library/es7/set" { - var Set: typeof core.Set; + const Set: typeof core.Set; export = Set; } declare module "core-js/library/es7/string" { - var String: typeof core.String; + const String: typeof core.String; export = String; } declare module "core-js/library/js" { export = core; } declare module "core-js/library/js/array" { - var Array: typeof core.Array; + const Array: typeof core.Array; export = Array; } declare module "core-js/library/web" { diff --git a/core-js/tsconfig.json b/types/core-js/tsconfig.json similarity index 100% rename from core-js/tsconfig.json rename to types/core-js/tsconfig.json diff --git a/core-js/tslint.json b/types/core-js/tslint.json similarity index 100% rename from core-js/tslint.json rename to types/core-js/tslint.json diff --git a/cors/cors-tests.ts b/types/cors/cors-tests.ts similarity index 100% rename from cors/cors-tests.ts rename to types/cors/cors-tests.ts diff --git a/cors/index.d.ts b/types/cors/index.d.ts similarity index 100% rename from cors/index.d.ts rename to types/cors/index.d.ts diff --git a/cors/tsconfig.json b/types/cors/tsconfig.json similarity index 100% rename from cors/tsconfig.json rename to types/cors/tsconfig.json diff --git a/couchbase/couchbase-tests.ts b/types/couchbase/couchbase-tests.ts similarity index 100% rename from couchbase/couchbase-tests.ts rename to types/couchbase/couchbase-tests.ts diff --git a/couchbase/index.d.ts b/types/couchbase/index.d.ts similarity index 100% rename from couchbase/index.d.ts rename to types/couchbase/index.d.ts diff --git a/couchbase/tsconfig.json b/types/couchbase/tsconfig.json similarity index 100% rename from couchbase/tsconfig.json rename to types/couchbase/tsconfig.json diff --git a/countdown/countdown-tests.ts b/types/countdown/countdown-tests.ts similarity index 100% rename from countdown/countdown-tests.ts rename to types/countdown/countdown-tests.ts diff --git a/countdown/index.d.ts b/types/countdown/index.d.ts similarity index 100% rename from countdown/index.d.ts rename to types/countdown/index.d.ts diff --git a/countdown/tsconfig.json b/types/countdown/tsconfig.json similarity index 100% rename from countdown/tsconfig.json rename to types/countdown/tsconfig.json diff --git a/cpy/cpy-tests.ts b/types/cpy/cpy-tests.ts similarity index 100% rename from cpy/cpy-tests.ts rename to types/cpy/cpy-tests.ts diff --git a/cpy/index.d.ts b/types/cpy/index.d.ts similarity index 100% rename from cpy/index.d.ts rename to types/cpy/index.d.ts diff --git a/cpy/tsconfig.json b/types/cpy/tsconfig.json similarity index 100% rename from cpy/tsconfig.json rename to types/cpy/tsconfig.json diff --git a/cpy/tslint.json b/types/cpy/tslint.json similarity index 100% rename from cpy/tslint.json rename to types/cpy/tslint.json diff --git a/cradle/cradle-tests.ts b/types/cradle/cradle-tests.ts similarity index 100% rename from cradle/cradle-tests.ts rename to types/cradle/cradle-tests.ts diff --git a/cradle/index.d.ts b/types/cradle/index.d.ts similarity index 100% rename from cradle/index.d.ts rename to types/cradle/index.d.ts diff --git a/cradle/tsconfig.json b/types/cradle/tsconfig.json similarity index 100% rename from cradle/tsconfig.json rename to types/cradle/tsconfig.json diff --git a/crc/crc-tests.ts b/types/crc/crc-tests.ts similarity index 100% rename from crc/crc-tests.ts rename to types/crc/crc-tests.ts diff --git a/crc/index.d.ts b/types/crc/index.d.ts similarity index 100% rename from crc/index.d.ts rename to types/crc/index.d.ts diff --git a/crc/tsconfig.json b/types/crc/tsconfig.json similarity index 100% rename from crc/tsconfig.json rename to types/crc/tsconfig.json diff --git a/crc/tslint.json b/types/crc/tslint.json similarity index 100% rename from crc/tslint.json rename to types/crc/tslint.json diff --git a/create-error/create-error-tests.ts b/types/create-error/create-error-tests.ts similarity index 100% rename from create-error/create-error-tests.ts rename to types/create-error/create-error-tests.ts diff --git a/create-error/index.d.ts b/types/create-error/index.d.ts similarity index 100% rename from create-error/index.d.ts rename to types/create-error/index.d.ts diff --git a/create-error/tsconfig.json b/types/create-error/tsconfig.json similarity index 100% rename from create-error/tsconfig.json rename to types/create-error/tsconfig.json diff --git a/createjs-lib/index.d.ts b/types/createjs-lib/index.d.ts similarity index 100% rename from createjs-lib/index.d.ts rename to types/createjs-lib/index.d.ts diff --git a/createjs-lib/tsconfig.json b/types/createjs-lib/tsconfig.json similarity index 100% rename from createjs-lib/tsconfig.json rename to types/createjs-lib/tsconfig.json diff --git a/createjs/index.d.ts b/types/createjs/index.d.ts similarity index 100% rename from createjs/index.d.ts rename to types/createjs/index.d.ts diff --git a/createjs/tsconfig.json b/types/createjs/tsconfig.json similarity index 100% rename from createjs/tsconfig.json rename to types/createjs/tsconfig.json diff --git a/credential/credential-tests.ts b/types/credential/credential-tests.ts similarity index 100% rename from credential/credential-tests.ts rename to types/credential/credential-tests.ts diff --git a/credential/index.d.ts b/types/credential/index.d.ts similarity index 100% rename from credential/index.d.ts rename to types/credential/index.d.ts diff --git a/credential/tsconfig.json b/types/credential/tsconfig.json similarity index 100% rename from credential/tsconfig.json rename to types/credential/tsconfig.json diff --git a/credit-card-type/credit-card-type-tests.ts b/types/credit-card-type/credit-card-type-tests.ts similarity index 100% rename from credit-card-type/credit-card-type-tests.ts rename to types/credit-card-type/credit-card-type-tests.ts diff --git a/credit-card-type/index.d.ts b/types/credit-card-type/index.d.ts similarity index 100% rename from credit-card-type/index.d.ts rename to types/credit-card-type/index.d.ts diff --git a/credit-card-type/tsconfig.json b/types/credit-card-type/tsconfig.json similarity index 100% rename from credit-card-type/tsconfig.json rename to types/credit-card-type/tsconfig.json diff --git a/cron/cron-tests.ts b/types/cron/cron-tests.ts similarity index 100% rename from cron/cron-tests.ts rename to types/cron/cron-tests.ts diff --git a/cron/index.d.ts b/types/cron/index.d.ts similarity index 100% rename from cron/index.d.ts rename to types/cron/index.d.ts diff --git a/cron/tsconfig.json b/types/cron/tsconfig.json similarity index 100% rename from cron/tsconfig.json rename to types/cron/tsconfig.json diff --git a/cropperjs/cropperjs-tests.ts b/types/cropperjs/cropperjs-tests.ts similarity index 100% rename from cropperjs/cropperjs-tests.ts rename to types/cropperjs/cropperjs-tests.ts diff --git a/cropperjs/index.d.ts b/types/cropperjs/index.d.ts similarity index 100% rename from cropperjs/index.d.ts rename to types/cropperjs/index.d.ts diff --git a/cropperjs/tsconfig.json b/types/cropperjs/tsconfig.json similarity index 100% rename from cropperjs/tsconfig.json rename to types/cropperjs/tsconfig.json diff --git a/croppie/croppie-tests.ts b/types/croppie/croppie-tests.ts similarity index 100% rename from croppie/croppie-tests.ts rename to types/croppie/croppie-tests.ts diff --git a/croppie/index.d.ts b/types/croppie/index.d.ts similarity index 100% rename from croppie/index.d.ts rename to types/croppie/index.d.ts diff --git a/croppie/tsconfig.json b/types/croppie/tsconfig.json similarity index 100% rename from croppie/tsconfig.json rename to types/croppie/tsconfig.json diff --git a/croppie/tslint.json b/types/croppie/tslint.json similarity index 100% rename from croppie/tslint.json rename to types/croppie/tslint.json diff --git a/cross-storage/cross-storage-tests.ts b/types/cross-storage/cross-storage-tests.ts similarity index 100% rename from cross-storage/cross-storage-tests.ts rename to types/cross-storage/cross-storage-tests.ts diff --git a/cross-storage/index.d.ts b/types/cross-storage/index.d.ts similarity index 100% rename from cross-storage/index.d.ts rename to types/cross-storage/index.d.ts diff --git a/cross-storage/tsconfig.json b/types/cross-storage/tsconfig.json similarity index 100% rename from cross-storage/tsconfig.json rename to types/cross-storage/tsconfig.json diff --git a/crossfilter/crossfilter-tests.ts b/types/crossfilter/crossfilter-tests.ts similarity index 100% rename from crossfilter/crossfilter-tests.ts rename to types/crossfilter/crossfilter-tests.ts diff --git a/crossfilter/index.d.ts b/types/crossfilter/index.d.ts similarity index 100% rename from crossfilter/index.d.ts rename to types/crossfilter/index.d.ts diff --git a/crossfilter/tsconfig.json b/types/crossfilter/tsconfig.json similarity index 100% rename from crossfilter/tsconfig.json rename to types/crossfilter/tsconfig.json diff --git a/crossroads/crossroads-tests.ts b/types/crossroads/crossroads-tests.ts similarity index 100% rename from crossroads/crossroads-tests.ts rename to types/crossroads/crossroads-tests.ts diff --git a/crossroads/index.d.ts b/types/crossroads/index.d.ts similarity index 100% rename from crossroads/index.d.ts rename to types/crossroads/index.d.ts diff --git a/crossroads/tsconfig.json b/types/crossroads/tsconfig.json similarity index 100% rename from crossroads/tsconfig.json rename to types/crossroads/tsconfig.json diff --git a/crypto-js/aes/index.d.ts b/types/crypto-js/aes/index.d.ts similarity index 100% rename from crypto-js/aes/index.d.ts rename to types/crypto-js/aes/index.d.ts diff --git a/crypto-js/core/index.d.ts b/types/crypto-js/core/index.d.ts similarity index 100% rename from crypto-js/core/index.d.ts rename to types/crypto-js/core/index.d.ts diff --git a/crypto-js/crypto-js-tests.ts b/types/crypto-js/crypto-js-tests.ts similarity index 100% rename from crypto-js/crypto-js-tests.ts rename to types/crypto-js/crypto-js-tests.ts diff --git a/crypto-js/enc-base64/index.d.ts b/types/crypto-js/enc-base64/index.d.ts similarity index 100% rename from crypto-js/enc-base64/index.d.ts rename to types/crypto-js/enc-base64/index.d.ts diff --git a/crypto-js/enc-hex/index.d.ts b/types/crypto-js/enc-hex/index.d.ts similarity index 100% rename from crypto-js/enc-hex/index.d.ts rename to types/crypto-js/enc-hex/index.d.ts diff --git a/crypto-js/enc-latin1/index.d.ts b/types/crypto-js/enc-latin1/index.d.ts similarity index 100% rename from crypto-js/enc-latin1/index.d.ts rename to types/crypto-js/enc-latin1/index.d.ts diff --git a/crypto-js/enc-utf16/index.d.ts b/types/crypto-js/enc-utf16/index.d.ts similarity index 100% rename from crypto-js/enc-utf16/index.d.ts rename to types/crypto-js/enc-utf16/index.d.ts diff --git a/crypto-js/enc-utf8/index.d.ts b/types/crypto-js/enc-utf8/index.d.ts similarity index 100% rename from crypto-js/enc-utf8/index.d.ts rename to types/crypto-js/enc-utf8/index.d.ts diff --git a/crypto-js/evpkdf/index.d.ts b/types/crypto-js/evpkdf/index.d.ts similarity index 100% rename from crypto-js/evpkdf/index.d.ts rename to types/crypto-js/evpkdf/index.d.ts diff --git a/crypto-js/format-hex/index.d.ts b/types/crypto-js/format-hex/index.d.ts similarity index 100% rename from crypto-js/format-hex/index.d.ts rename to types/crypto-js/format-hex/index.d.ts diff --git a/crypto-js/format-openssl/index.d.ts b/types/crypto-js/format-openssl/index.d.ts similarity index 100% rename from crypto-js/format-openssl/index.d.ts rename to types/crypto-js/format-openssl/index.d.ts diff --git a/crypto-js/hmac-md5/index.d.ts b/types/crypto-js/hmac-md5/index.d.ts similarity index 100% rename from crypto-js/hmac-md5/index.d.ts rename to types/crypto-js/hmac-md5/index.d.ts diff --git a/crypto-js/hmac-ripemd160/index.d.ts b/types/crypto-js/hmac-ripemd160/index.d.ts similarity index 100% rename from crypto-js/hmac-ripemd160/index.d.ts rename to types/crypto-js/hmac-ripemd160/index.d.ts diff --git a/crypto-js/hmac-sha1/index.d.ts b/types/crypto-js/hmac-sha1/index.d.ts similarity index 100% rename from crypto-js/hmac-sha1/index.d.ts rename to types/crypto-js/hmac-sha1/index.d.ts diff --git a/crypto-js/hmac-sha224/index.d.ts b/types/crypto-js/hmac-sha224/index.d.ts similarity index 100% rename from crypto-js/hmac-sha224/index.d.ts rename to types/crypto-js/hmac-sha224/index.d.ts diff --git a/crypto-js/hmac-sha256/index.d.ts b/types/crypto-js/hmac-sha256/index.d.ts similarity index 100% rename from crypto-js/hmac-sha256/index.d.ts rename to types/crypto-js/hmac-sha256/index.d.ts diff --git a/crypto-js/hmac-sha3/index.d.ts b/types/crypto-js/hmac-sha3/index.d.ts similarity index 100% rename from crypto-js/hmac-sha3/index.d.ts rename to types/crypto-js/hmac-sha3/index.d.ts diff --git a/crypto-js/hmac-sha384/index.d.ts b/types/crypto-js/hmac-sha384/index.d.ts similarity index 100% rename from crypto-js/hmac-sha384/index.d.ts rename to types/crypto-js/hmac-sha384/index.d.ts diff --git a/crypto-js/hmac-sha512/index.d.ts b/types/crypto-js/hmac-sha512/index.d.ts similarity index 100% rename from crypto-js/hmac-sha512/index.d.ts rename to types/crypto-js/hmac-sha512/index.d.ts diff --git a/crypto-js/index.d.ts b/types/crypto-js/index.d.ts similarity index 100% rename from crypto-js/index.d.ts rename to types/crypto-js/index.d.ts diff --git a/crypto-js/lib-typedarrays/index.d.ts b/types/crypto-js/lib-typedarrays/index.d.ts similarity index 100% rename from crypto-js/lib-typedarrays/index.d.ts rename to types/crypto-js/lib-typedarrays/index.d.ts diff --git a/crypto-js/md5/index.d.ts b/types/crypto-js/md5/index.d.ts similarity index 100% rename from crypto-js/md5/index.d.ts rename to types/crypto-js/md5/index.d.ts diff --git a/crypto-js/mode-cfb/index.d.ts b/types/crypto-js/mode-cfb/index.d.ts similarity index 100% rename from crypto-js/mode-cfb/index.d.ts rename to types/crypto-js/mode-cfb/index.d.ts diff --git a/crypto-js/mode-ctr-gladman/index.d.ts b/types/crypto-js/mode-ctr-gladman/index.d.ts similarity index 100% rename from crypto-js/mode-ctr-gladman/index.d.ts rename to types/crypto-js/mode-ctr-gladman/index.d.ts diff --git a/crypto-js/mode-ctr/index.d.ts b/types/crypto-js/mode-ctr/index.d.ts similarity index 100% rename from crypto-js/mode-ctr/index.d.ts rename to types/crypto-js/mode-ctr/index.d.ts diff --git a/crypto-js/mode-ecb/index.d.ts b/types/crypto-js/mode-ecb/index.d.ts similarity index 100% rename from crypto-js/mode-ecb/index.d.ts rename to types/crypto-js/mode-ecb/index.d.ts diff --git a/crypto-js/mode-ofb/index.d.ts b/types/crypto-js/mode-ofb/index.d.ts similarity index 100% rename from crypto-js/mode-ofb/index.d.ts rename to types/crypto-js/mode-ofb/index.d.ts diff --git a/crypto-js/pad-ansix923/index.d.ts b/types/crypto-js/pad-ansix923/index.d.ts similarity index 100% rename from crypto-js/pad-ansix923/index.d.ts rename to types/crypto-js/pad-ansix923/index.d.ts diff --git a/crypto-js/pad-iso10126/index.d.ts b/types/crypto-js/pad-iso10126/index.d.ts similarity index 100% rename from crypto-js/pad-iso10126/index.d.ts rename to types/crypto-js/pad-iso10126/index.d.ts diff --git a/crypto-js/pad-iso97971/index.d.ts b/types/crypto-js/pad-iso97971/index.d.ts similarity index 100% rename from crypto-js/pad-iso97971/index.d.ts rename to types/crypto-js/pad-iso97971/index.d.ts diff --git a/crypto-js/pad-nopadding/index.d.ts b/types/crypto-js/pad-nopadding/index.d.ts similarity index 100% rename from crypto-js/pad-nopadding/index.d.ts rename to types/crypto-js/pad-nopadding/index.d.ts diff --git a/crypto-js/pad-pkcs7/index.d.ts b/types/crypto-js/pad-pkcs7/index.d.ts similarity index 100% rename from crypto-js/pad-pkcs7/index.d.ts rename to types/crypto-js/pad-pkcs7/index.d.ts diff --git a/crypto-js/pad-zeropadding/index.d.ts b/types/crypto-js/pad-zeropadding/index.d.ts similarity index 100% rename from crypto-js/pad-zeropadding/index.d.ts rename to types/crypto-js/pad-zeropadding/index.d.ts diff --git a/crypto-js/pbkdf2/index.d.ts b/types/crypto-js/pbkdf2/index.d.ts similarity index 100% rename from crypto-js/pbkdf2/index.d.ts rename to types/crypto-js/pbkdf2/index.d.ts diff --git a/crypto-js/rabbit-legacy/index.d.ts b/types/crypto-js/rabbit-legacy/index.d.ts similarity index 100% rename from crypto-js/rabbit-legacy/index.d.ts rename to types/crypto-js/rabbit-legacy/index.d.ts diff --git a/crypto-js/rabbit/index.d.ts b/types/crypto-js/rabbit/index.d.ts similarity index 100% rename from crypto-js/rabbit/index.d.ts rename to types/crypto-js/rabbit/index.d.ts diff --git a/crypto-js/rc4/index.d.ts b/types/crypto-js/rc4/index.d.ts similarity index 100% rename from crypto-js/rc4/index.d.ts rename to types/crypto-js/rc4/index.d.ts diff --git a/crypto-js/ripemd160/index.d.ts b/types/crypto-js/ripemd160/index.d.ts similarity index 100% rename from crypto-js/ripemd160/index.d.ts rename to types/crypto-js/ripemd160/index.d.ts diff --git a/crypto-js/sha1/index.d.ts b/types/crypto-js/sha1/index.d.ts similarity index 100% rename from crypto-js/sha1/index.d.ts rename to types/crypto-js/sha1/index.d.ts diff --git a/crypto-js/sha224/index.d.ts b/types/crypto-js/sha224/index.d.ts similarity index 100% rename from crypto-js/sha224/index.d.ts rename to types/crypto-js/sha224/index.d.ts diff --git a/crypto-js/sha256/index.d.ts b/types/crypto-js/sha256/index.d.ts similarity index 100% rename from crypto-js/sha256/index.d.ts rename to types/crypto-js/sha256/index.d.ts diff --git a/crypto-js/sha3/index.d.ts b/types/crypto-js/sha3/index.d.ts similarity index 100% rename from crypto-js/sha3/index.d.ts rename to types/crypto-js/sha3/index.d.ts diff --git a/crypto-js/sha384/index.d.ts b/types/crypto-js/sha384/index.d.ts similarity index 100% rename from crypto-js/sha384/index.d.ts rename to types/crypto-js/sha384/index.d.ts diff --git a/crypto-js/sha512/index.d.ts b/types/crypto-js/sha512/index.d.ts similarity index 100% rename from crypto-js/sha512/index.d.ts rename to types/crypto-js/sha512/index.d.ts diff --git a/crypto-js/test/submodule-tests.ts b/types/crypto-js/test/submodule-tests.ts similarity index 100% rename from crypto-js/test/submodule-tests.ts rename to types/crypto-js/test/submodule-tests.ts diff --git a/crypto-js/tripledes/index.d.ts b/types/crypto-js/tripledes/index.d.ts similarity index 100% rename from crypto-js/tripledes/index.d.ts rename to types/crypto-js/tripledes/index.d.ts diff --git a/crypto-js/tsconfig.json b/types/crypto-js/tsconfig.json similarity index 100% rename from crypto-js/tsconfig.json rename to types/crypto-js/tsconfig.json diff --git a/crypto-js/x64-core/index.d.ts b/types/crypto-js/x64-core/index.d.ts similarity index 100% rename from crypto-js/x64-core/index.d.ts rename to types/crypto-js/x64-core/index.d.ts diff --git a/cryptojs/index.d.ts b/types/cryptojs/index.d.ts similarity index 100% rename from cryptojs/index.d.ts rename to types/cryptojs/index.d.ts diff --git a/cryptojs/test/aes-profile-tests.ts b/types/cryptojs/test/aes-profile-tests.ts similarity index 100% rename from cryptojs/test/aes-profile-tests.ts rename to types/cryptojs/test/aes-profile-tests.ts diff --git a/cryptojs/test/aes-tests.ts b/types/cryptojs/test/aes-tests.ts similarity index 100% rename from cryptojs/test/aes-tests.ts rename to types/cryptojs/test/aes-tests.ts diff --git a/cryptojs/test/des-profile-tests.ts b/types/cryptojs/test/des-profile-tests.ts similarity index 100% rename from cryptojs/test/des-profile-tests.ts rename to types/cryptojs/test/des-profile-tests.ts diff --git a/cryptojs/test/des-tests.ts b/types/cryptojs/test/des-tests.ts similarity index 100% rename from cryptojs/test/des-tests.ts rename to types/cryptojs/test/des-tests.ts diff --git a/cryptojs/test/enc-base64-tests.ts b/types/cryptojs/test/enc-base64-tests.ts similarity index 100% rename from cryptojs/test/enc-base64-tests.ts rename to types/cryptojs/test/enc-base64-tests.ts diff --git a/cryptojs/test/enc-hex-tests.ts b/types/cryptojs/test/enc-hex-tests.ts similarity index 100% rename from cryptojs/test/enc-hex-tests.ts rename to types/cryptojs/test/enc-hex-tests.ts diff --git a/cryptojs/test/enc-latin1-tests.ts b/types/cryptojs/test/enc-latin1-tests.ts similarity index 100% rename from cryptojs/test/enc-latin1-tests.ts rename to types/cryptojs/test/enc-latin1-tests.ts diff --git a/cryptojs/test/enc-utf16-tests.ts b/types/cryptojs/test/enc-utf16-tests.ts similarity index 100% rename from cryptojs/test/enc-utf16-tests.ts rename to types/cryptojs/test/enc-utf16-tests.ts diff --git a/cryptojs/test/enc-utf8-tests.ts b/types/cryptojs/test/enc-utf8-tests.ts similarity index 100% rename from cryptojs/test/enc-utf8-tests.ts rename to types/cryptojs/test/enc-utf8-tests.ts diff --git a/cryptojs/test/evpkdf-profile-tests.ts b/types/cryptojs/test/evpkdf-profile-tests.ts similarity index 100% rename from cryptojs/test/evpkdf-profile-tests.ts rename to types/cryptojs/test/evpkdf-profile-tests.ts diff --git a/cryptojs/test/evpkdf-tests.ts b/types/cryptojs/test/evpkdf-tests.ts similarity index 100% rename from cryptojs/test/evpkdf-tests.ts rename to types/cryptojs/test/evpkdf-tests.ts diff --git a/cryptojs/test/format-openssl-tests.ts b/types/cryptojs/test/format-openssl-tests.ts similarity index 100% rename from cryptojs/test/format-openssl-tests.ts rename to types/cryptojs/test/format-openssl-tests.ts diff --git a/cryptojs/test/hmac-profile-tests.ts b/types/cryptojs/test/hmac-profile-tests.ts similarity index 100% rename from cryptojs/test/hmac-profile-tests.ts rename to types/cryptojs/test/hmac-profile-tests.ts diff --git a/cryptojs/test/hmac-tests.ts b/types/cryptojs/test/hmac-tests.ts similarity index 100% rename from cryptojs/test/hmac-tests.ts rename to types/cryptojs/test/hmac-tests.ts diff --git a/cryptojs/test/kdf-openssl-tests.ts b/types/cryptojs/test/kdf-openssl-tests.ts similarity index 100% rename from cryptojs/test/kdf-openssl-tests.ts rename to types/cryptojs/test/kdf-openssl-tests.ts diff --git a/cryptojs/test/lib-base-tests.ts b/types/cryptojs/test/lib-base-tests.ts similarity index 100% rename from cryptojs/test/lib-base-tests.ts rename to types/cryptojs/test/lib-base-tests.ts diff --git a/cryptojs/test/lib-cipherparams-tests.ts b/types/cryptojs/test/lib-cipherparams-tests.ts similarity index 100% rename from cryptojs/test/lib-cipherparams-tests.ts rename to types/cryptojs/test/lib-cipherparams-tests.ts diff --git a/cryptojs/test/lib-passwordbasedcipher-tests.ts b/types/cryptojs/test/lib-passwordbasedcipher-tests.ts similarity index 100% rename from cryptojs/test/lib-passwordbasedcipher-tests.ts rename to types/cryptojs/test/lib-passwordbasedcipher-tests.ts diff --git a/cryptojs/test/lib-serializablecipher-tests.ts b/types/cryptojs/test/lib-serializablecipher-tests.ts similarity index 100% rename from cryptojs/test/lib-serializablecipher-tests.ts rename to types/cryptojs/test/lib-serializablecipher-tests.ts diff --git a/cryptojs/test/lib-typedarrays-tests.ts b/types/cryptojs/test/lib-typedarrays-tests.ts similarity index 100% rename from cryptojs/test/lib-typedarrays-tests.ts rename to types/cryptojs/test/lib-typedarrays-tests.ts diff --git a/cryptojs/test/lib-wordarray-tests.ts b/types/cryptojs/test/lib-wordarray-tests.ts similarity index 100% rename from cryptojs/test/lib-wordarray-tests.ts rename to types/cryptojs/test/lib-wordarray-tests.ts diff --git a/cryptojs/test/md5-profile-tests.ts b/types/cryptojs/test/md5-profile-tests.ts similarity index 100% rename from cryptojs/test/md5-profile-tests.ts rename to types/cryptojs/test/md5-profile-tests.ts diff --git a/cryptojs/test/md5-tests.ts b/types/cryptojs/test/md5-tests.ts similarity index 100% rename from cryptojs/test/md5-tests.ts rename to types/cryptojs/test/md5-tests.ts diff --git a/cryptojs/test/mode-cbc-tests.ts b/types/cryptojs/test/mode-cbc-tests.ts similarity index 100% rename from cryptojs/test/mode-cbc-tests.ts rename to types/cryptojs/test/mode-cbc-tests.ts diff --git a/cryptojs/test/mode-cfb-tests.ts b/types/cryptojs/test/mode-cfb-tests.ts similarity index 100% rename from cryptojs/test/mode-cfb-tests.ts rename to types/cryptojs/test/mode-cfb-tests.ts diff --git a/cryptojs/test/mode-ctr-tests.ts b/types/cryptojs/test/mode-ctr-tests.ts similarity index 100% rename from cryptojs/test/mode-ctr-tests.ts rename to types/cryptojs/test/mode-ctr-tests.ts diff --git a/cryptojs/test/mode-ecb-tests.ts b/types/cryptojs/test/mode-ecb-tests.ts similarity index 100% rename from cryptojs/test/mode-ecb-tests.ts rename to types/cryptojs/test/mode-ecb-tests.ts diff --git a/cryptojs/test/mode-ofb-tests.ts b/types/cryptojs/test/mode-ofb-tests.ts similarity index 100% rename from cryptojs/test/mode-ofb-tests.ts rename to types/cryptojs/test/mode-ofb-tests.ts diff --git a/cryptojs/test/pad-ansix923-tests.ts b/types/cryptojs/test/pad-ansix923-tests.ts similarity index 100% rename from cryptojs/test/pad-ansix923-tests.ts rename to types/cryptojs/test/pad-ansix923-tests.ts diff --git a/cryptojs/test/pad-iso10126-tests.ts b/types/cryptojs/test/pad-iso10126-tests.ts similarity index 100% rename from cryptojs/test/pad-iso10126-tests.ts rename to types/cryptojs/test/pad-iso10126-tests.ts diff --git a/cryptojs/test/pad-iso97971-tests.ts b/types/cryptojs/test/pad-iso97971-tests.ts similarity index 100% rename from cryptojs/test/pad-iso97971-tests.ts rename to types/cryptojs/test/pad-iso97971-tests.ts diff --git a/cryptojs/test/pad-pkcs7-tests.ts b/types/cryptojs/test/pad-pkcs7-tests.ts similarity index 100% rename from cryptojs/test/pad-pkcs7-tests.ts rename to types/cryptojs/test/pad-pkcs7-tests.ts diff --git a/cryptojs/test/pad-zeropadding-tests.ts b/types/cryptojs/test/pad-zeropadding-tests.ts similarity index 100% rename from cryptojs/test/pad-zeropadding-tests.ts rename to types/cryptojs/test/pad-zeropadding-tests.ts diff --git a/cryptojs/test/pbkdf2-profile-tests.ts b/types/cryptojs/test/pbkdf2-profile-tests.ts similarity index 100% rename from cryptojs/test/pbkdf2-profile-tests.ts rename to types/cryptojs/test/pbkdf2-profile-tests.ts diff --git a/cryptojs/test/pbkdf2-tests.ts b/types/cryptojs/test/pbkdf2-tests.ts similarity index 100% rename from cryptojs/test/pbkdf2-tests.ts rename to types/cryptojs/test/pbkdf2-tests.ts diff --git a/cryptojs/test/rabbit-legacy-tests.ts b/types/cryptojs/test/rabbit-legacy-tests.ts similarity index 100% rename from cryptojs/test/rabbit-legacy-tests.ts rename to types/cryptojs/test/rabbit-legacy-tests.ts diff --git a/cryptojs/test/rabbit-profile-tests.ts b/types/cryptojs/test/rabbit-profile-tests.ts similarity index 100% rename from cryptojs/test/rabbit-profile-tests.ts rename to types/cryptojs/test/rabbit-profile-tests.ts diff --git a/cryptojs/test/rabbit-tests.ts b/types/cryptojs/test/rabbit-tests.ts similarity index 100% rename from cryptojs/test/rabbit-tests.ts rename to types/cryptojs/test/rabbit-tests.ts diff --git a/cryptojs/test/rc4-profile-tests.ts b/types/cryptojs/test/rc4-profile-tests.ts similarity index 100% rename from cryptojs/test/rc4-profile-tests.ts rename to types/cryptojs/test/rc4-profile-tests.ts diff --git a/cryptojs/test/rc4-tests.ts b/types/cryptojs/test/rc4-tests.ts similarity index 100% rename from cryptojs/test/rc4-tests.ts rename to types/cryptojs/test/rc4-tests.ts diff --git a/cryptojs/test/ripemd160-tests.ts b/types/cryptojs/test/ripemd160-tests.ts similarity index 100% rename from cryptojs/test/ripemd160-tests.ts rename to types/cryptojs/test/ripemd160-tests.ts diff --git a/cryptojs/test/sha1-profile-tests.ts b/types/cryptojs/test/sha1-profile-tests.ts similarity index 100% rename from cryptojs/test/sha1-profile-tests.ts rename to types/cryptojs/test/sha1-profile-tests.ts diff --git a/cryptojs/test/sha1-tests.ts b/types/cryptojs/test/sha1-tests.ts similarity index 100% rename from cryptojs/test/sha1-tests.ts rename to types/cryptojs/test/sha1-tests.ts diff --git a/cryptojs/test/sha224-tests.ts b/types/cryptojs/test/sha224-tests.ts similarity index 100% rename from cryptojs/test/sha224-tests.ts rename to types/cryptojs/test/sha224-tests.ts diff --git a/cryptojs/test/sha256-profile-tests.ts b/types/cryptojs/test/sha256-profile-tests.ts similarity index 100% rename from cryptojs/test/sha256-profile-tests.ts rename to types/cryptojs/test/sha256-profile-tests.ts diff --git a/cryptojs/test/sha256-tests.ts b/types/cryptojs/test/sha256-tests.ts similarity index 100% rename from cryptojs/test/sha256-tests.ts rename to types/cryptojs/test/sha256-tests.ts diff --git a/cryptojs/test/sha3-profile-tests.ts b/types/cryptojs/test/sha3-profile-tests.ts similarity index 100% rename from cryptojs/test/sha3-profile-tests.ts rename to types/cryptojs/test/sha3-profile-tests.ts diff --git a/cryptojs/test/sha3-tests.ts b/types/cryptojs/test/sha3-tests.ts similarity index 100% rename from cryptojs/test/sha3-tests.ts rename to types/cryptojs/test/sha3-tests.ts diff --git a/cryptojs/test/sha384-tests.ts b/types/cryptojs/test/sha384-tests.ts similarity index 100% rename from cryptojs/test/sha384-tests.ts rename to types/cryptojs/test/sha384-tests.ts diff --git a/cryptojs/test/sha512-profile-tests.ts b/types/cryptojs/test/sha512-profile-tests.ts similarity index 100% rename from cryptojs/test/sha512-profile-tests.ts rename to types/cryptojs/test/sha512-profile-tests.ts diff --git a/cryptojs/test/sha512-tests.ts b/types/cryptojs/test/sha512-tests.ts similarity index 100% rename from cryptojs/test/sha512-tests.ts rename to types/cryptojs/test/sha512-tests.ts diff --git a/cryptojs/test/tripledes-profile-tests.ts b/types/cryptojs/test/tripledes-profile-tests.ts similarity index 100% rename from cryptojs/test/tripledes-profile-tests.ts rename to types/cryptojs/test/tripledes-profile-tests.ts diff --git a/cryptojs/test/tripledes-tests.ts b/types/cryptojs/test/tripledes-tests.ts similarity index 100% rename from cryptojs/test/tripledes-tests.ts rename to types/cryptojs/test/tripledes-tests.ts diff --git a/cryptojs/test/x64-word-tests.ts b/types/cryptojs/test/x64-word-tests.ts similarity index 100% rename from cryptojs/test/x64-word-tests.ts rename to types/cryptojs/test/x64-word-tests.ts diff --git a/cryptojs/test/x64-wordarray-tests.ts b/types/cryptojs/test/x64-wordarray-tests.ts similarity index 100% rename from cryptojs/test/x64-wordarray-tests.ts rename to types/cryptojs/test/x64-wordarray-tests.ts diff --git a/cryptojs/tsconfig.json b/types/cryptojs/tsconfig.json similarity index 100% rename from cryptojs/tsconfig.json rename to types/cryptojs/tsconfig.json diff --git a/cson/cson-tests.ts b/types/cson/cson-tests.ts similarity index 100% rename from cson/cson-tests.ts rename to types/cson/cson-tests.ts diff --git a/cson/index.d.ts b/types/cson/index.d.ts similarity index 100% rename from cson/index.d.ts rename to types/cson/index.d.ts diff --git a/cson/tsconfig.json b/types/cson/tsconfig.json similarity index 100% rename from cson/tsconfig.json rename to types/cson/tsconfig.json diff --git a/csprng/csprng-tests.ts b/types/csprng/csprng-tests.ts similarity index 100% rename from csprng/csprng-tests.ts rename to types/csprng/csprng-tests.ts diff --git a/csprng/index.d.ts b/types/csprng/index.d.ts similarity index 100% rename from csprng/index.d.ts rename to types/csprng/index.d.ts diff --git a/csprng/tsconfig.json b/types/csprng/tsconfig.json similarity index 100% rename from csprng/tsconfig.json rename to types/csprng/tsconfig.json diff --git a/node-xmpp-core/tslint.json b/types/csprng/tslint.json similarity index 100% rename from node-xmpp-core/tslint.json rename to types/csprng/tslint.json diff --git a/css-modules-require-hook/css-modules-require-hook-tests.ts b/types/css-modules-require-hook/css-modules-require-hook-tests.ts similarity index 100% rename from css-modules-require-hook/css-modules-require-hook-tests.ts rename to types/css-modules-require-hook/css-modules-require-hook-tests.ts diff --git a/css-modules-require-hook/index.d.ts b/types/css-modules-require-hook/index.d.ts similarity index 100% rename from css-modules-require-hook/index.d.ts rename to types/css-modules-require-hook/index.d.ts diff --git a/css-modules-require-hook/tsconfig.json b/types/css-modules-require-hook/tsconfig.json similarity index 100% rename from css-modules-require-hook/tsconfig.json rename to types/css-modules-require-hook/tsconfig.json diff --git a/css/css-tests.ts b/types/css/css-tests.ts similarity index 100% rename from css/css-tests.ts rename to types/css/css-tests.ts diff --git a/css/index.d.ts b/types/css/index.d.ts similarity index 100% rename from css/index.d.ts rename to types/css/index.d.ts diff --git a/css/tsconfig.json b/types/css/tsconfig.json similarity index 100% rename from css/tsconfig.json rename to types/css/tsconfig.json diff --git a/cssbeautify/cssbeautify-tests.ts b/types/cssbeautify/cssbeautify-tests.ts similarity index 100% rename from cssbeautify/cssbeautify-tests.ts rename to types/cssbeautify/cssbeautify-tests.ts diff --git a/cssbeautify/index.d.ts b/types/cssbeautify/index.d.ts similarity index 100% rename from cssbeautify/index.d.ts rename to types/cssbeautify/index.d.ts diff --git a/cssbeautify/tsconfig.json b/types/cssbeautify/tsconfig.json similarity index 100% rename from cssbeautify/tsconfig.json rename to types/cssbeautify/tsconfig.json diff --git a/csurf/index.d.ts b/types/csurf/index.d.ts similarity index 100% rename from csurf/index.d.ts rename to types/csurf/index.d.ts diff --git a/csurf/tsconfig.json b/types/csurf/tsconfig.json similarity index 100% rename from csurf/tsconfig.json rename to types/csurf/tsconfig.json diff --git a/csv-parse/csv-parse-tests.ts b/types/csv-parse/csv-parse-tests.ts similarity index 66% rename from csv-parse/csv-parse-tests.ts rename to types/csv-parse/csv-parse-tests.ts index b0f13121fe..26b2458360 100644 --- a/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/csv-parse/index.d.ts b/types/csv-parse/index.d.ts similarity index 89% rename from csv-parse/index.d.ts rename to types/csv-parse/index.d.ts index e780bac27d..cbf79729e5 100644 --- a/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/csv-parse/lib/sync.d.ts b/types/csv-parse/lib/sync.d.ts similarity index 100% rename from csv-parse/lib/sync.d.ts rename to types/csv-parse/lib/sync.d.ts diff --git a/csv-parse/tsconfig.json b/types/csv-parse/tsconfig.json similarity index 100% rename from csv-parse/tsconfig.json rename to types/csv-parse/tsconfig.json diff --git a/leaflet-draw/tslint.json b/types/csv-parse/tslint.json similarity index 100% rename from leaflet-draw/tslint.json rename to types/csv-parse/tslint.json diff --git a/csv-stringify/csv-stringify-tests.ts b/types/csv-stringify/csv-stringify-tests.ts similarity index 100% rename from csv-stringify/csv-stringify-tests.ts rename to types/csv-stringify/csv-stringify-tests.ts diff --git a/csv-stringify/index.d.ts b/types/csv-stringify/index.d.ts similarity index 100% rename from csv-stringify/index.d.ts rename to types/csv-stringify/index.d.ts diff --git a/csv-stringify/tsconfig.json b/types/csv-stringify/tsconfig.json similarity index 100% rename from csv-stringify/tsconfig.json rename to types/csv-stringify/tsconfig.json diff --git a/csv-stringify/tslint.json b/types/csv-stringify/tslint.json similarity index 100% rename from csv-stringify/tslint.json rename to types/csv-stringify/tslint.json diff --git a/csvtojson/csvtojson-tests.ts b/types/csvtojson/csvtojson-tests.ts similarity index 98% rename from csvtojson/csvtojson-tests.ts rename to types/csvtojson/csvtojson-tests.ts index 4368d00494..a4ee3d76d4 100644 --- a/csvtojson/csvtojson-tests.ts +++ b/types/csvtojson/csvtojson-tests.ts @@ -16,7 +16,7 @@ csv({ noheader: true }) console.log(csvRow); // => [1,2,3] , [4,5,6] , [7,8,9] }) .on('done', () => { - //parsing finished + // parsing finished }); // event emitter version using Converter class @@ -26,7 +26,7 @@ new csv.Converter({ noheader: true }) console.log(csvRow); // => [1,2,3] , [4,5,6] , [7,8,9] }) .on('done', () => { - //parsing finished + // parsing finished }); // callback version using Converter class diff --git a/csvtojson/index.d.ts b/types/csvtojson/index.d.ts similarity index 99% rename from csvtojson/index.d.ts rename to types/csvtojson/index.d.ts index 9ba01212c7..504311f47a 100644 --- a/csvtojson/index.d.ts +++ b/types/csvtojson/index.d.ts @@ -8,7 +8,6 @@ import * as stream from 'stream'; declare namespace csvtojson { - /** * Stream options */ @@ -18,7 +17,6 @@ declare namespace csvtojson { * Converter options */ interface ConverterOptions { - /** * Delimiter used for seperating columns. Use "auto" if delimiter is unknown in advance, * in this case, delimiter will be auto-detected (by best attempt). Use an array to give @@ -173,7 +171,6 @@ declare namespace csvtojson { * Converts provided CSV input to a JSON object. */ class Converter extends stream.Transform { - /** * Initializes a new instance of a Converter * @param {ConverterOptions} options converter options diff --git a/csvtojson/tsconfig.json b/types/csvtojson/tsconfig.json similarity index 100% rename from csvtojson/tsconfig.json rename to types/csvtojson/tsconfig.json diff --git a/csvtojson/tslint.json b/types/csvtojson/tslint.json similarity index 100% rename from csvtojson/tslint.json rename to types/csvtojson/tslint.json diff --git a/types/cucumber/cucumber-tests.ts b/types/cucumber/cucumber-tests.ts new file mode 100644 index 0000000000..9b057a362c --- /dev/null +++ b/types/cucumber/cucumber-tests.ts @@ -0,0 +1,136 @@ +import * as assert from "power-assert"; +import cucumber = require("cucumber"); + +function StepSample() { + type Callback = cucumber.CallbackStepDefinition; + type Table = cucumber.TableDefinition; + type HookScenarioResult = cucumber.HookScenarioResult; + + cucumber.defineSupportCode(function ({setWorldConstructor, defineParameterType, After, Around, Before, registerHandler, Given, When, Then}) { + setWorldConstructor(function ({attach, parameters}) { + this.attach = attach; + this.parameters = parameters; + this.visit = function (url: string, callback: Callback) { + callback(null, 'pending'); + } + }); + + Before(function (scenarioResult: HookScenarioResult, callback: Callback) { + console.log(scenarioResult.status === "failed"); + callback(); + }); + + Before({ timeout: 1000 }, function (scenarioResult: HookScenarioResult, callback: Callback) { + console.log(scenarioResult.status === "failed"); + callback(); + }); + + Around(function (scenarioResult: HookScenarioResult, runScenario: (error: string, callback?: Function) => void) { + scenarioResult.status === "failed" && runScenario(null, function () { + console.log('finish tasks'); + }); + }); + + After((scenarioResult: HookScenarioResult, callback?: Callback) => { + console.log("After"); + callback(); + }); + + After({ timeout: 1000 }, (scenarioResult: HookScenarioResult, callback?: Callback) => { + console.log("After"); + callback(); + }); + + registerHandler('AfterFeatures', function (event: any, callback: Function) { + callback(); + }); + + Given(/^a variable set to (\d+)$/, (x: string) => { + console.log("the number is: " + x); + }); + + Given(/^I am on the Cucumber.js GitHub repository$/, function (callback: Callback) { + this.visit('https://github.com/cucumber/cucumber-js', callback); + }); + + When(/^I go to the README file$/, function (title: string, callback: Callback) { + callback(null, 'pending'); + }); + + Then(/^I should see "(.*)" as the page title$/, {timeout: 60 * 1000}, function (title: string, callback: Callback) { + var pageTitle = this.browser.text('title'); + + if (title === pageTitle) { + callback(); + } else { + callback(new Error("Expected to be on page with title " + title)); + } + }); + + // Type for data_table.js on + // https://github.com/cucumber/cucumber-js/blob/a5fd8251918c278ab2e389226d165cedb44df14a/lib/cucumber/ast/data_table.js + + Given(/^a table step with Table raw$/, function (table: Table) { + var expected = [ + ['Cucumber', 'Cucumis sativus'], + ['Burr Gherkin', 'Cucumis anguria'] + ]; + + assert.deepEqual(table.raw(), expected); + }); + + Given(/^a table step with Table rows$/, function (table: Table) { + var expected = [ + ['Apricot', '5'], + ['Brocolli', '2'], + ['Cucumber', '10'] + ]; + assert.deepEqual(table.rows(), expected) + }); + + Given(/^a table step with Table rowHash$/, function (table: Table) { + var expected = { + 'Cucumber': 'Cucumis sativus', + 'Burr Gherkin': 'Cucumis anguria' + }; + assert.deepEqual(table.rowsHash(), expected) + }); + + Given(/^a table step$/, function (table: Table) { + var expected = [ + {'Vegetable': 'Apricot', 'Rating': '5'}, + {'Vegetable': 'Brocolli', 'Rating': '2'}, + {'Vegetable': 'Cucumber', 'Rating': '10'} + ]; + assert.deepEqual(table.hashes(), expected) + }); + + defineParameterType({ + regexp: /particular/, + transformer: s => s.toUpperCase(), + typeName: 'param' + }); + + Given('a {param} step', function (param) { + assert.equal(param, 'PARTICULAR') + }); + + }); + + let fns: cucumber.SupportCodeConsumer[] = cucumber.getSupportCodeFns(); + + cucumber.clearSupportCodeFns(); +} + +function registerListener(): cucumber.EventListener { + let listener = Object.assign(cucumber.Listener(), { + handleBeforeScenarioEvent: (scenario: cucumber.events.ScenarioPayload, callback: () => void) => { + + // do some interesting stuff ... + + callback(); + } + }); + + return listener; +} \ No newline at end of file diff --git a/types/cucumber/index.d.ts b/types/cucumber/index.d.ts new file mode 100644 index 0000000000..04ed7289cb --- /dev/null +++ b/types/cucumber/index.d.ts @@ -0,0 +1,262 @@ +// Type definitions for cucumber-js v2.0.0 +// Project: https://github.com/cucumber/cucumber-js +// Definitions by: Abraão Alves , Jan Molak , Isaiah Soung +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = cucumber; + +declare namespace cucumber { + + export interface CallbackStepDefinition { + pending: () => PromiseLike; + (error?: any, pending?: string): void; + } + + export interface TableDefinition { + raw: () => Array; + rows: () => Array; + rowsHash: () => {}; + hashes: () => {}; + } + + type StepDefinitionParam = string | CallbackStepDefinition | TableDefinition; + + interface StepDefinitionCode { + (...stepArgs: Array): PromiseLike | any | void; + } + + interface StepDefinitionOptions { + timeout?: number; + } + + export interface StepDefinitions { + Given(pattern: RegExp | string, options: StepDefinitionOptions, code: StepDefinitionCode): void; + Given(pattern: RegExp | string, code: StepDefinitionCode): void; + When(pattern: RegExp | string, options: StepDefinitionOptions, code: StepDefinitionCode): void; + When(pattern: RegExp | string, code: StepDefinitionCode): void; + Then(pattern: RegExp | string, options: StepDefinitionOptions, code: StepDefinitionCode): void; + Then(pattern: RegExp | string, code: StepDefinitionCode): void; + setDefaultTimeout(time: number): void; + } + + interface HookScenarioResult { + duration: number; + failureException: Error; + scenario: Scenario; + status: string; + stepsResults: any; + } + + interface HookCode { + (scenario: HookScenarioResult, callback?: CallbackStepDefinition): void; + } + + interface AroundCode { + (scenario: HookScenarioResult, runScenario?: (error: string, callback?: Function) => void): void; + } + + interface Transform { + regexp: RegExp; + transformer: (arg: string) => any; + typeName: string; + } + + interface HookOptions{ + timeout?: number; + } + + export interface Hooks { + Before(code: HookCode): void; + Before(options: HookOptions, code: HookCode): void; + After(code: HookCode): void; + After(options: HookOptions, code: HookCode): void; + Around(code: AroundCode): void; + setDefaultTimeout(time: number): void; + setWorldConstructor(world: (() => void) | ({})): void; + registerHandler(handlerOption: string, code: (event: any, callback: CallbackStepDefinition) => void): void; + registerListener(listener: EventListener): void; + defineParameterType(transform: Transform): void; + } + + export class EventListener { + hear(event: events.Event, callback: () => void): void; + hasHandlerForEvent(event: events.Event): boolean; + buildHandlerNameForEvent(event: events.Event): string; + getHandlerForEvent(event: events.Event): EventHook; + buildHandlerName(shortName: string): string; + setHandlerForEvent(shortName: string, handler: EventListener): void; + } + + export function Listener(): EventListener; + + export namespace events { + + interface Event { + name: string; + data: any; + } + + interface EventPayload { + } + + interface FeaturesPayload extends EventPayload { + getFeatures(): any[]; // https://github.com/cucumber/cucumber-js/blob/dc698bf5bc10d591fa7adeec5fa21b2d90dc9679/lib/cucumber/runtime.js#L34 + } + + interface FeaturesResultPayload extends EventPayload { + duration: number; + scenarioResults: any[]; + success: boolean; + stepsResults: any[]; + strict: boolean; + } + + interface FeaturePayload extends EventPayload { + description: string; + keyword: string; + line: number; + name: string; + tags: Tag[]; + uri: string; + scenarios: Scenario[]; + } + + interface ScenarioPayload extends EventPayload { + feature: Feature; + exception: Error; + keyword: string; + lines: number[]; + name: string; + tags: Tag[]; + uri: string; + line: number; + description: string; + steps: Step[]; + } + + interface ScenarioResultPayload extends EventPayload { + duration: any; + failureException: Error; + scenario: Scenario; + status: string; + stepResults: any[]; + } + + interface StepPayload extends EventPayload { + arguments: any; + line: number; + name: string; + scenario: Scenario; + uri: string; + isBackground: boolean; + keyword: string; + keywordType: string; + } + + interface StepResultPayload extends EventPayload { + ambiguousStepDefinitions: any; + attachments: any[]; + duration: any; + failureException: Error; + step: Step; + stepDefinition: StepDefinition; + status: string; + } + + } + + export interface StepDefinition { + code: Function; + line: number; + options: {}; + pattern: any; + uri: string; + } + + export interface Tag { + name: string; + line: number; + } + + export interface Step { + arguments: any; + line: number; + name: string; + scenario: Scenario; + uri: string; + isBackground: boolean; + keyword: string; + keywordType: string; + } + + export interface Scenario { + feature: Feature; + exception: Error; + keyword: string; + lines: number[]; + name: string; + tags: Tag[]; + uri: string; + line: number; + description: string; + steps: Step[]; + } + + export interface Feature { + description: string; + keyword: string; + line: number; + name: string; + tags: Tag[]; + uri: string; + scenarios: Scenario[]; + } + + interface EventHook { + (event: events.Event, callback?: () => void): void; + } + + export interface SupportCodeConsumer { + (stepDefinitions: StepDefinitions & Hooks): void; + } + + export function defineSupportCode(consumer: SupportCodeConsumer): void; + + export function getSupportCodeFns(): SupportCodeConsumer[]; + + export function clearSupportCodeFns(): void; + + // https://github.com/cucumber/cucumber-js/commit/231183a8a11c985ef7ced1155b7a75f5120a34b6 + export class Formatter { + constructor(options?: any); + log(data: any): void; + } + + export class SummaryFormatter extends Formatter { + indent(text: string, numberOfSpaces: number): any; + } + export class PrettyFormatter extends SummaryFormatter { + formatTags(tags: Tag[]): any; + logIndented(text: string, level: number): void; + logStepResult(stepResult: any): void; + } + + export class ProgressFormatter extends SummaryFormatter{ + } + + export class RerunFormatter extends Formatter{ + } + + export class SnippetsFormatter extends Formatter{ + } + + export class UsageFormatter extends Formatter{ + } + + export class UsageJsonFormatter extends Formatter{ + } + + export class JsonFormatter extends Formatter { + } + +} \ No newline at end of file diff --git a/cucumber/tsconfig.json b/types/cucumber/tsconfig.json similarity index 100% rename from cucumber/tsconfig.json rename to types/cucumber/tsconfig.json diff --git a/types/cucumber/v1/cucumber-tests.ts b/types/cucumber/v1/cucumber-tests.ts new file mode 100644 index 0000000000..596772274f --- /dev/null +++ b/types/cucumber/v1/cucumber-tests.ts @@ -0,0 +1,102 @@ +import * as assert from "power-assert"; +import cucumber = require("cucumber"); + +function StepSample() { + type Callback = cucumber.CallbackStepDefinition; + type Table = cucumber.TableDefinition; + type HookScenario = cucumber.HookScenario; + var step = this; + var hook = this; + + hook.Before(function (scenario: HookScenario, callback: Callback) { + scenario.isFailed() && callback.pending(); + }); + + hook.Before({ timeout: 1000 }, function(scenario: HookScenario, callback: Callback) { + callback(); + }); + + hook.After({ timeout: 1000 }, function(scenario: HookScenario, callback: Callback) { + callback(); + }); + + hook.Around(function (scenario: HookScenario, runScenario: (error: string, callback?: Function) => void) { + scenario.isFailed() && runScenario(null, function () { + console.log('finish tasks'); + }); + }); + + hook.registerHandler('AfterFeatures', function (event: any, callback: Function) { + callback(); + }); + + step.Given(/^I am on the Cucumber.js GitHub repository$/, function (callback: Callback) { + this.visit('https://github.com/cucumber/cucumber-js', callback); + }); + + step.When(/^I go to the README file$/, function (title: string, callback: Callback) { + callback(null, 'pending'); + }); + + step.Then(/^I should see "(.*)" as the page title$/, {timeout: 60 * 1000}, function (title: string, callback: Callback) { + var pageTitle = this.browser.text('title'); + + if (title === pageTitle) { + callback(); + } else { + callback(new Error("Expected to be on page with title " + title)); + } + }); + + // Type for data_table.js on + // https://github.com/cucumber/cucumber-js/blob/a5fd8251918c278ab2e389226d165cedb44df14a/lib/cucumber/ast/data_table.js + + step.Given(/^a table step with Table raw$/, function (table: Table) { + var expected = [ + ['Cucumber', 'Cucumis sativus'], + ['Burr Gherkin', 'Cucumis anguria'] + ]; + + assert.deepEqual(table.raw(), expected); + }); + + step.Given(/^a table step with Table rows$/, function (table: Table) { + var expected = [ + ['Apricot', '5'], + ['Brocolli', '2'], + ['Cucumber', '10'] + ]; + assert.deepEqual(table.rows(), expected) + }); + + step.Given(/^a table step with Table rowHash$/, function (table: Table) { + var expected = { + 'Cucumber': 'Cucumis sativus', + 'Burr Gherkin': 'Cucumis anguria' + }; + assert.deepEqual(table.rowsHash(), expected) + }); + + step.Given(/^a table step$/, function (table: Table) { + var expected = [ + {'Vegetable': 'Apricot', 'Rating': '5'}, + {'Vegetable': 'Brocolli', 'Rating': '2'}, + {'Vegetable': 'Cucumber', 'Rating': '10'} + ]; + assert.deepEqual(table.hashes(), expected) + }); + +} + +function registerListener(): cucumber.EventListener { + let listener = Object.assign(cucumber.Listener(), { + handleBeforeScenarioEvent: (scenario: cucumber.events.ScenarioPayload, callback: () => void) => { + + // do some interesting stuff ... + + callback(); + } + }); + + return listener; +} diff --git a/types/cucumber/v1/index.d.ts b/types/cucumber/v1/index.d.ts new file mode 100644 index 0000000000..5fb080ff5f --- /dev/null +++ b/types/cucumber/v1/index.d.ts @@ -0,0 +1,214 @@ +// Type definitions for cucumber-js v1.3.1 +// Project: https://github.com/cucumber/cucumber-js +// Definitions by: Abraão Alves , Jan Molak , Isaiah Soung +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = cucumber; + +declare namespace cucumber { + + export interface CallbackStepDefinition { + pending: () => PromiseLike; + (error?: any, pending?: string): void; + } + + export interface TableDefinition { + raw: () => Array; + rows: () => Array; + rowsHash: () => {}; + hashes: () => {}; + } + + type StepDefinitionParam = string | CallbackStepDefinition | TableDefinition; + + interface StepDefinitionCode { + (...stepArgs: Array): PromiseLike | any | void; + } + + interface StepDefinitionOptions { + timeout?: number; + } + + export interface StepDefinitions { + Given(pattern: RegExp | string, options: StepDefinitionOptions, code: StepDefinitionCode): void; + Given(pattern: RegExp | string, code: StepDefinitionCode): void; + When(pattern: RegExp | string, options: StepDefinitionOptions, code: StepDefinitionCode): void; + When(pattern: RegExp | string, code: StepDefinitionCode): void; + Then(pattern: RegExp | string, options: StepDefinitionOptions, code: StepDefinitionCode): void; + Then(pattern: RegExp | string, code: StepDefinitionCode): void; + setDefaultTimeout(time: number): void; + } + + interface HookScenario { + getKeyword(): string; + getName(): string; + getDescription(): string; + getUri(): string; + getLine(): number; + getTags(): string[]; + getException(): Error; + getAttachments(): any[]; + attach(data: any, mimeType?: string, callback?: (err?: any) => void): void; + isSuccessful(): boolean; + isFailed(): boolean; + isPending(): boolean; + isUndefined(): boolean; + isSkipped(): boolean; + } + + interface HookCode { + (scenario: HookScenario, callback?: CallbackStepDefinition): void; + } + + interface AroundCode { + (scenario: HookScenario, runScenario?: (error: string, callback?: Function) => void): void; + } + + interface HookOptions{ + timeout?: number; + } + + export interface Hooks { + Before(code: HookCode): void; + Before(options: HookOptions, code: HookCode): void; + After(code: HookCode): void; + After(options: HookOptions, code: HookCode): void; + Around(code: AroundCode): void; + setDefaultTimeout(time: number): void; + registerHandler(handlerOption: string, code: (event: any, callback: CallbackStepDefinition) => void): void; + registerListener(listener: EventListener): void; + } + + export class EventListener { + hear(event: events.Event, callback: () => void): void; + hasHandlerForEvent(event: events.Event): boolean; + buildHandlerNameForEvent(event: events.Event): string; + getHandlerForEvent(event: events.Event): EventHook; + buildHandlerName(shortName: string): string; + setHandlerForEvent(shortName: string, handler: EventListener): void; + } + + export function Listener(): EventListener; + + export namespace events { + + interface Event { + getName(): string; + getPayloadItem(name: string): EventPayload; + } + + interface EventPayload { + } + + interface FeaturesPayload extends EventPayload { + getFeatures(): any[]; // https://github.com/cucumber/cucumber-js/blob/dc698bf5bc10d591fa7adeec5fa21b2d90dc9679/lib/cucumber/runtime.js#L34 + } + + interface FeaturesResultPayload extends EventPayload { + getDuration(): any; + getScenarioCounts(): any; + getStepCounts(): any; + isSuccessful(): boolean; + } + + interface FeaturePayload extends EventPayload { + getStepKeywordByLines(): any; + getScenarioKeyword(): string; + getKeyword(): string; + getName(): string; + getDescription(): string; + getUri(): string; + getLine(): number; + getTags(): Tag[]; + getScenarios(): ScenarioPayload[]; + getPayloadItem(): FeaturePayload; + } + + interface ScenarioPayload extends EventPayload { + getName(): string; + getKeyword(): string; + getDescription(): string; + getFeature(): FeaturePayload; + getUri(): string; + getUris(): string[]; + getLine(): number; + getLines(): number[]; + getTags(): Tag[]; + getSteps(): any[]; + getPayloadItem(): ScenarioPayload; + } + + interface ScenarioResultPayload extends EventPayload { + getFailureException(): Error; + getScenario(): any; + getStatus(): any; + } + + interface StepPayload extends EventPayload { + isHidden(): boolean; + isOutlineStep(): boolean; + getKeyword(): string; + getName(): string; + hasUri(): boolean; + getUri(): string; + getLine(): number; + getPreviousStep(): any; + hasPreviousStep(): boolean; + getAttachment(): any; + getAttachmentContents(): any; + getDocString(): string; + getDataTable(): any; + hasAttachment(): boolean; + hasDocString(): boolean; + hasDataTable(): boolean; + ensureDataTableIsAttached(): void; + isOutcomeStep(): boolean; + isEventStep(): boolean; + hasOutcomeStepKeyword(): boolean; + hasEventStepKeyword(): boolean; + isRepeatingOutcomeStep(): boolean; + isRepeatingEventStep(): boolean; + hasRepeatStepKeyword(): boolean; + isPrecededByOutcomeStep(): boolean; + isPrecededByEventStep(): boolean; + } + + interface StepResultPayload extends EventPayload { + getAmbiguousStepDefinitions(): any[]; + getAttachments(): any[]; + getDuration(): any; + getFailureException(): Error; + getStep(): any; + getStepDefinition(): any; + getStatus(): any; + hasAttachments(): boolean; + } + + } + + interface Tag { + getName(): string; + getLine(): number; + } + + export interface Scenario { + getKeyword(): string; + getName(): string; + getDescription(): string; + getUri(): string; + getLine(): number; + getTags(): Tag[]; + getException(): Error; + getAttachments(): any[]; + attach(data: any, mimeType?: string, callback?: (err?: any) => void): void; + isSuccessful(): boolean; + isFailed(): boolean; + isPending(): boolean; + isUndefined(): boolean; + isSkipped(): boolean; + } + + interface EventHook { + (event: events.Event, callback?: () => void): void; + } +} diff --git a/types/cucumber/v1/tsconfig.json b/types/cucumber/v1/tsconfig.json new file mode 100644 index 0000000000..b467d8c4b4 --- /dev/null +++ b/types/cucumber/v1/tsconfig.json @@ -0,0 +1,31 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": false, + "strictNullChecks": false, + "baseUrl": "../../", + "typeRoots": [ + "../../" + ], + "types": [], + "paths": { + "cucumber": [ + "cucumber/v1" + ], + "cucumber/*": [ + "cucumber/v1/*" + ] + }, + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "cucumber-tests.ts" + ] +} diff --git a/cuid/cuid-tests.ts b/types/cuid/cuid-tests.ts similarity index 100% rename from cuid/cuid-tests.ts rename to types/cuid/cuid-tests.ts diff --git a/cuid/index.d.ts b/types/cuid/index.d.ts similarity index 100% rename from cuid/index.d.ts rename to types/cuid/index.d.ts diff --git a/cuid/tsconfig.json b/types/cuid/tsconfig.json similarity index 100% rename from cuid/tsconfig.json rename to types/cuid/tsconfig.json diff --git a/currency-formatter/currencies.d.ts b/types/currency-formatter/currencies.d.ts similarity index 100% rename from currency-formatter/currencies.d.ts rename to types/currency-formatter/currencies.d.ts diff --git a/currency-formatter/currency-formatter-tests.ts b/types/currency-formatter/currency-formatter-tests.ts similarity index 100% rename from currency-formatter/currency-formatter-tests.ts rename to types/currency-formatter/currency-formatter-tests.ts diff --git a/currency-formatter/index.d.ts b/types/currency-formatter/index.d.ts similarity index 100% rename from currency-formatter/index.d.ts rename to types/currency-formatter/index.d.ts diff --git a/currency-formatter/tsconfig.json b/types/currency-formatter/tsconfig.json similarity index 100% rename from currency-formatter/tsconfig.json rename to types/currency-formatter/tsconfig.json diff --git a/currency-formatter/tslint.json b/types/currency-formatter/tslint.json similarity index 100% rename from currency-formatter/tslint.json rename to types/currency-formatter/tslint.json diff --git a/custom-error-generator/custom-error-generator-tests.ts b/types/custom-error-generator/custom-error-generator-tests.ts similarity index 100% rename from custom-error-generator/custom-error-generator-tests.ts rename to types/custom-error-generator/custom-error-generator-tests.ts diff --git a/custom-error-generator/index.d.ts b/types/custom-error-generator/index.d.ts similarity index 100% rename from custom-error-generator/index.d.ts rename to types/custom-error-generator/index.d.ts diff --git a/custom-error-generator/tsconfig.json b/types/custom-error-generator/tsconfig.json similarity index 100% rename from custom-error-generator/tsconfig.json rename to types/custom-error-generator/tsconfig.json diff --git a/cybozulabs-md5/cybozulabs-md5-tests.ts b/types/cybozulabs-md5/cybozulabs-md5-tests.ts similarity index 100% rename from cybozulabs-md5/cybozulabs-md5-tests.ts rename to types/cybozulabs-md5/cybozulabs-md5-tests.ts diff --git a/cybozulabs-md5/index.d.ts b/types/cybozulabs-md5/index.d.ts similarity index 100% rename from cybozulabs-md5/index.d.ts rename to types/cybozulabs-md5/index.d.ts diff --git a/cybozulabs-md5/tsconfig.json b/types/cybozulabs-md5/tsconfig.json similarity index 100% rename from cybozulabs-md5/tsconfig.json rename to types/cybozulabs-md5/tsconfig.json diff --git a/d3-array/d3-array-tests.ts b/types/d3-array/d3-array-tests.ts similarity index 99% rename from d3-array/d3-array-tests.ts rename to types/d3-array/d3-array-tests.ts index 7dbe08bad0..bb713192e8 100644 --- a/d3-array/d3-array-tests.ts +++ b/types/d3-array/d3-array-tests.ts @@ -26,7 +26,6 @@ class NumCoercible { } class MixedObject { - num: number; str: string; numeric: NumCoercible; @@ -289,7 +288,6 @@ num = mixedObjectDateBisectorObject.right(mixedObjectArray, new Date(2015, 3, 14 num = mixedObjectDateBisectorObject.right(mixedObjectArray, new Date(2015, 3, 14), 1); num = mixedObjectDateBisectorObject.right(mixedObjectArray, new Date(2015, 3, 14), 3, 4); - // ascending() ----------------------------------------------------------------- num = d3Array.ascending(undefined, 20); @@ -339,12 +337,11 @@ crossed = d3Array.cross(['x', 'y'], [1, 2]); let strArray: string[] = d3Array.cross([2, 3], [5, 6], (a, b) => (a + b) + 'px'); strArray = d3Array.cross([2, 3], [5, 6], (a, b) => { - let aa: number = a; - let bb: number = b; + const aa: number = a; + const bb: number = b; return (aa + bb) + 'px'; }); - // pairs() --------------------------------------------------------------------- let pairs: Array<[MixedObject, MixedObject]>; @@ -353,8 +350,8 @@ pairs = d3Array.pairs(mergedArray); numbersArray = d3Array.pairs(mergedArray, (a, b) => b.num - a.num); numbersArray = d3Array.pairs(mergedArray, (a, b) => { - let aa: MixedObject = a; - let bb: MixedObject = b; + const aa: MixedObject = a; + const bb: MixedObject = b; return bb.num - aa.num; }); @@ -374,7 +371,6 @@ const testObject = { const x: Array = d3Array.permute(testObject, ['name', 'val', 'when', 'more']); - // range() --------------------------------------------------------------------- numbersArray = d3Array.range(10); @@ -389,7 +385,6 @@ mergedArray = d3Array.shuffle(mergedArray, 1); mergedArray = d3Array.shuffle(mergedArray, 1, 3); - // ticks() --------------------------------------------------------------------- numbersArray = d3Array.ticks(1, 10, 5); @@ -519,8 +514,6 @@ const mixedObject: MixedObject = testBin[0]; // with element type MixedObject date = testBin.x0; // bin lower bound is Date date = testBin.x1; // bin upper bound is Date - - // Histogram Tresholds ========================================================= num = d3Array.thresholdFreedmanDiaconis([-1, 0, 1, 1, 3, 20, 234], -1, 234); diff --git a/d3-array/index.d.ts b/types/d3-array/index.d.ts similarity index 99% rename from d3-array/index.d.ts rename to types/d3-array/index.d.ts index d938a8c032..ccd2d568bb 100644 --- a/d3-array/index.d.ts +++ b/types/d3-array/index.d.ts @@ -9,7 +9,6 @@ // Shared Types and Interfaces // -------------------------------------------------------------------------- - /** * Administrivia: JavaScript primitive types and Date */ @@ -26,7 +25,6 @@ interface Numeric { // Descriptive Statistics // -------------------------------------------------------------------------------------- - /** * Return the maximum value in the array of strings using natural order. */ @@ -67,8 +65,6 @@ export function min(array: T[], accessor: (datum: T, index: number, array: T[ */ export function min(array: T[], accessor: (datum: T, index: number, array: T[]) => U | undefined | null): U | undefined; - - /** * Return the min and max simultaneously. */ @@ -139,7 +135,6 @@ export function variance(array: Array): */ export function variance(array: T[], accessor: (datum: T, index: number, array: T[]) => number | undefined | null): number | undefined; - // -------------------------------------------------------------------------------------- // Searching Arrays // -------------------------------------------------------------------------------------- @@ -155,7 +150,7 @@ export function bisectRight(array: number[], x: number, lo?: number, hi?: number export function bisectRight(array: string[], x: string, lo?: number, hi?: number): number; export function bisectRight(array: Date[], x: Date, lo?: number, hi?: number): number; -export var bisect: typeof bisectRight; +export const bisect: typeof bisectRight; export interface Bisector { left: (array: T[], x: U, lo?: number, hi?: number) => number; @@ -244,7 +239,6 @@ export function range(stop: number): number[]; */ export function range(start: number, stop: number, step?: number): number[]; - /** * Randomizes the order of the specified array using the Fisher–Yates shuffle. */ @@ -261,13 +255,11 @@ export function ticks(start: number, stop: number, count: number): number[]; */ export function tickStep(start: number, stop: number, count: number): number[]; - /** * Transpose a matrix provided in Array of Arrays format. */ export function transpose(matrix: T[][]): T[][]; - /** * Returns an array of arrays, where the ith array contains the ith element from each of the argument arrays. * The returned array is truncated in length to the shortest array in arrays. If arrays contains only a single array, the returned array @@ -294,8 +286,6 @@ export type ThresholdCountGenerator = (values: number[], min?: number, max?: num */ export type ThresholdArrayGenerator = (values: Value[], min?: Value, max?: Value) => Value[]; - - export interface HistogramGenerator { (data: Datum[]): Array>; value(): (d: Datum, i: number, data: Datum[]) => Value; diff --git a/d3-array/tsconfig.json b/types/d3-array/tsconfig.json similarity index 100% rename from d3-array/tsconfig.json rename to types/d3-array/tsconfig.json diff --git a/d3-array/tslint.json b/types/d3-array/tslint.json similarity index 100% rename from d3-array/tslint.json rename to types/d3-array/tslint.json diff --git a/d3-axis/d3-axis-tests.ts b/types/d3-axis/d3-axis-tests.ts similarity index 99% rename from d3-axis/d3-axis-tests.ts rename to types/d3-axis/d3-axis-tests.ts index 1a4077d690..f2b47beaa8 100644 --- a/d3-axis/d3-axis-tests.ts +++ b/types/d3-axis/d3-axis-tests.ts @@ -26,8 +26,6 @@ import { Transition } from 'd3-transition'; import { timeMinute } from 'd3-time'; import { format } from 'd3-format'; - - // -------------------------------------------------------------------------- // Preparatory Steps // -------------------------------------------------------------------------- @@ -81,8 +79,6 @@ leftAxis = leftAxis.scale(scalePow()); const powerScale: ScalePower = leftAxis.scale>(); // powerScale = leftAxis.scale(); // fails, without casting as AxisScale is purposely generic - - bottomAxis = bottomAxis.scale(scaleOrdinal()); // bottomAxis = bottomAxis.scale(scalePow()) // fails, domain of scale incompatible with domain of axis diff --git a/d3-axis/index.d.ts b/types/d3-axis/index.d.ts similarity index 99% rename from d3-axis/index.d.ts rename to types/d3-axis/index.d.ts index cd8ed94714..4a65952070 100644 --- a/d3-axis/index.d.ts +++ b/types/d3-axis/index.d.ts @@ -11,7 +11,6 @@ import { Selection, TransitionLike } from 'd3-selection'; // Shared Types and Interfaces // -------------------------------------------------------------------------- - /** * A helper interface to describe the minimal contract to be met by a time interval * which can be passed into the Axis.ticks(...) or Axis.tickArguments(...) methods when @@ -171,7 +170,6 @@ export interface Axis { */ tickValues(values: null): this; - /** * Returns the currently set tick format function, which defaults to null. */ @@ -258,7 +256,6 @@ export interface Axis { * @param padding Padding in pixels (Default is 3). */ tickPadding(padding: number): this; - } /** diff --git a/d3-axis/tsconfig.json b/types/d3-axis/tsconfig.json similarity index 100% rename from d3-axis/tsconfig.json rename to types/d3-axis/tsconfig.json diff --git a/d3-axis/tslint.json b/types/d3-axis/tslint.json similarity index 100% rename from d3-axis/tslint.json rename to types/d3-axis/tslint.json diff --git a/d3-box/d3-box-tests.ts b/types/d3-box/d3-box-tests.ts similarity index 100% rename from d3-box/d3-box-tests.ts rename to types/d3-box/d3-box-tests.ts diff --git a/d3-box/index.d.ts b/types/d3-box/index.d.ts similarity index 100% rename from d3-box/index.d.ts rename to types/d3-box/index.d.ts diff --git a/d3-box/tsconfig.json b/types/d3-box/tsconfig.json similarity index 100% rename from d3-box/tsconfig.json rename to types/d3-box/tsconfig.json diff --git a/d3-brush/d3-brush-tests.ts b/types/d3-brush/d3-brush-tests.ts similarity index 99% rename from d3-brush/d3-brush-tests.ts rename to types/d3-brush/d3-brush-tests.ts index 367cc05d1b..2d9ee319aa 100644 --- a/d3-brush/d3-brush-tests.ts +++ b/types/d3-brush/d3-brush-tests.ts @@ -19,7 +19,6 @@ interface BrushDatum { filterZoomEvent: boolean; } - // ----------------------------------------------------------------------------- // Test Define BrushBehavior // ----------------------------------------------------------------------------- @@ -48,7 +47,6 @@ brush = brush.extent(function(d, i, group) { // chainable brush = brush.filter(function(d, i, group) { - // Cast d3 event to D3ZoomEvent to be used in filter logic const e = > event; @@ -80,7 +78,6 @@ brush = brush.on('end', brushed); // brush = brush.on('end', wrongHandler1); // fails, wrongHandler event handler has wrong this // brush = brush.on('end', wrongHandler2); // fails, wrongHandler event handler has wrong datum type - brushed = brush.on('end'); // chainable remove handler @@ -97,8 +94,6 @@ brush.on('end', function(d, i, g) { // do anything }); - - // ----------------------------------------------------------------------------- // Test Attach Brush Behavior // ----------------------------------------------------------------------------- @@ -121,10 +116,8 @@ const gX = select('svg') filterZoomEvent: true }); - gX.call(brushX); - // ----------------------------------------------------------------------------- // Test Use Brush Behavior // ----------------------------------------------------------------------------- @@ -155,7 +148,6 @@ brush.move(gTransition, function(d, i, group) { return selection; }); - const gXTransition = gX.transition(); // 1d brush move with Selection @@ -178,15 +170,12 @@ brush.move(gXTransition, function(d, i, group) { return selection; }); - // ----------------------------------------------------------------------------- // Test Brush Event Interface // ----------------------------------------------------------------------------- - const e: d3Brush.D3BrushEvent = event; - const target: d3Brush.BrushBehavior = e.target; const type: 'start' | 'brush' | 'end' | string = e.type; const brushSelection: d3Brush.BrushSelection = e.selection; diff --git a/d3-brush/index.d.ts b/types/d3-brush/index.d.ts similarity index 99% rename from d3-brush/index.d.ts rename to types/d3-brush/index.d.ts index 5c89465bce..644e6c06f7 100644 --- a/d3-brush/index.d.ts +++ b/types/d3-brush/index.d.ts @@ -189,7 +189,6 @@ export interface BrushBehavior { * with this as the current DOM element. */ on(typenames: string, listener: ValueFn): this; - } /** diff --git a/d3-brush/tsconfig.json b/types/d3-brush/tsconfig.json similarity index 100% rename from d3-brush/tsconfig.json rename to types/d3-brush/tsconfig.json diff --git a/d3-brush/tslint.json b/types/d3-brush/tslint.json similarity index 100% rename from d3-brush/tslint.json rename to types/d3-brush/tslint.json diff --git a/d3-chord/d3-chord-tests.ts b/types/d3-chord/d3-chord-tests.ts similarity index 99% rename from d3-chord/d3-chord-tests.ts rename to types/d3-chord/d3-chord-tests.ts index c826c81fac..b66f39787a 100644 --- a/d3-chord/d3-chord-tests.ts +++ b/types/d3-chord/d3-chord-tests.ts @@ -10,7 +10,6 @@ import * as d3Chord from 'd3-chord'; import { select, Selection } from 'd3-selection'; import { ascending } from 'd3-array'; - // --------------------------------------------------------------------- // Preparatory Steps // --------------------------------------------------------------------- @@ -39,7 +38,6 @@ let numAccessor: (this: SVGPathElement, d: d3Chord.ChordSubgroup, ...args: any[] // Test Chord // --------------------------------------------------------------------- - // chord() create ChordLayout generator =============================== let chordLayout: d3Chord.ChordLayout; @@ -64,7 +62,6 @@ chordLayout = chordLayout.sortSubgroups(ascending); chordLayout = chordLayout.sortSubgroups(null); comparatorFn = chordLayout.sortSubgroups(); - // sortChords() -------------------------------------------------------- chordLayout = chordLayout.sortChords(ascending); @@ -75,10 +72,8 @@ comparatorFn = chordLayout.sortChords(); chords = chordLayout(matrix); - // Test supporting interfaces ========================================== - const length: number = chords.length; chordGroups = chords.groups; @@ -98,7 +93,6 @@ num = chordSubgroup.endAngle; num = chordSubgroup.value; num = chordSubgroup.index; - // --------------------------------------------------------------------- // Test Ribbon // --------------------------------------------------------------------- @@ -140,7 +134,6 @@ svgRibbon = svgRibbon.target(d => { subgroupAccessor = svgRibbon.target(); - // radius() ----------------------------------------------------------- canvasRibbon = canvasRibbon.radius(30); diff --git a/d3-chord/index.d.ts b/types/d3-chord/index.d.ts similarity index 100% rename from d3-chord/index.d.ts rename to types/d3-chord/index.d.ts diff --git a/d3-chord/tsconfig.json b/types/d3-chord/tsconfig.json similarity index 100% rename from d3-chord/tsconfig.json rename to types/d3-chord/tsconfig.json diff --git a/d3-chord/tslint.json b/types/d3-chord/tslint.json similarity index 100% rename from d3-chord/tslint.json rename to types/d3-chord/tslint.json diff --git a/d3-collection/d3-collection-tests.ts b/types/d3-collection/d3-collection-tests.ts similarity index 100% rename from d3-collection/d3-collection-tests.ts rename to types/d3-collection/d3-collection-tests.ts diff --git a/d3-collection/index.d.ts b/types/d3-collection/index.d.ts similarity index 100% rename from d3-collection/index.d.ts rename to types/d3-collection/index.d.ts diff --git a/d3-collection/tsconfig.json b/types/d3-collection/tsconfig.json similarity index 100% rename from d3-collection/tsconfig.json rename to types/d3-collection/tsconfig.json diff --git a/d3-color/d3-color-tests.ts b/types/d3-color/d3-color-tests.ts similarity index 100% rename from d3-color/d3-color-tests.ts rename to types/d3-color/d3-color-tests.ts diff --git a/d3-color/index.d.ts b/types/d3-color/index.d.ts similarity index 100% rename from d3-color/index.d.ts rename to types/d3-color/index.d.ts diff --git a/d3-color/tsconfig.json b/types/d3-color/tsconfig.json similarity index 100% rename from d3-color/tsconfig.json rename to types/d3-color/tsconfig.json diff --git a/d3-dispatch/d3-dispatch-tests.ts b/types/d3-dispatch/d3-dispatch-tests.ts similarity index 100% rename from d3-dispatch/d3-dispatch-tests.ts rename to types/d3-dispatch/d3-dispatch-tests.ts diff --git a/d3-dispatch/index.d.ts b/types/d3-dispatch/index.d.ts similarity index 100% rename from d3-dispatch/index.d.ts rename to types/d3-dispatch/index.d.ts diff --git a/d3-dispatch/tsconfig.json b/types/d3-dispatch/tsconfig.json similarity index 100% rename from d3-dispatch/tsconfig.json rename to types/d3-dispatch/tsconfig.json diff --git a/d3-drag/d3-drag-tests.ts b/types/d3-drag/d3-drag-tests.ts similarity index 100% rename from d3-drag/d3-drag-tests.ts rename to types/d3-drag/d3-drag-tests.ts diff --git a/d3-drag/index.d.ts b/types/d3-drag/index.d.ts similarity index 100% rename from d3-drag/index.d.ts rename to types/d3-drag/index.d.ts diff --git a/d3-drag/tsconfig.json b/types/d3-drag/tsconfig.json similarity index 100% rename from d3-drag/tsconfig.json rename to types/d3-drag/tsconfig.json diff --git a/d3-drag/tslint.json b/types/d3-drag/tslint.json similarity index 100% rename from d3-drag/tslint.json rename to types/d3-drag/tslint.json diff --git a/d3-dsv/d3-dsv-tests.ts b/types/d3-dsv/d3-dsv-tests.ts similarity index 99% rename from d3-dsv/d3-dsv-tests.ts rename to types/d3-dsv/d3-dsv-tests.ts index a4d958f01b..421add6e65 100644 --- a/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/d3-dsv/index.d.ts b/types/d3-dsv/index.d.ts similarity index 100% rename from d3-dsv/index.d.ts rename to types/d3-dsv/index.d.ts diff --git a/d3-dsv/tsconfig.json b/types/d3-dsv/tsconfig.json similarity index 100% rename from d3-dsv/tsconfig.json rename to types/d3-dsv/tsconfig.json diff --git a/csv-parse/tslint.json b/types/d3-dsv/tslint.json similarity index 100% rename from csv-parse/tslint.json rename to types/d3-dsv/tslint.json diff --git a/types/d3-dsv/v0/d3-dsv-tests.ts b/types/d3-dsv/v0/d3-dsv-tests.ts new file mode 100644 index 0000000000..ac3e76a689 --- /dev/null +++ b/types/d3-dsv/v0/d3-dsv-tests.ts @@ -0,0 +1,5 @@ +import d3dsv = require("d3-dsv"); + +const csv = d3dsv(","); + +const rows = csv.parse("a,b,c\n1,2,3\n4,5,6"); diff --git a/d3-dsv/v0/index.d.ts b/types/d3-dsv/v0/index.d.ts similarity index 100% rename from d3-dsv/v0/index.d.ts rename to types/d3-dsv/v0/index.d.ts diff --git a/d3-dsv/v0/tsconfig.json b/types/d3-dsv/v0/tsconfig.json similarity index 100% rename from d3-dsv/v0/tsconfig.json rename to types/d3-dsv/v0/tsconfig.json diff --git a/d3-dsv/v0/tslint.json b/types/d3-dsv/v0/tslint.json similarity index 100% rename from d3-dsv/v0/tslint.json rename to types/d3-dsv/v0/tslint.json diff --git a/d3-ease/d3-ease-tests.ts b/types/d3-ease/d3-ease-tests.ts similarity index 100% rename from d3-ease/d3-ease-tests.ts rename to types/d3-ease/d3-ease-tests.ts diff --git a/d3-ease/index.d.ts b/types/d3-ease/index.d.ts similarity index 100% rename from d3-ease/index.d.ts rename to types/d3-ease/index.d.ts diff --git a/d3-ease/tsconfig.json b/types/d3-ease/tsconfig.json similarity index 100% rename from d3-ease/tsconfig.json rename to types/d3-ease/tsconfig.json diff --git a/d3-ease/tslint.json b/types/d3-ease/tslint.json similarity index 100% rename from d3-ease/tslint.json rename to types/d3-ease/tslint.json diff --git a/d3-force/d3-force-tests.ts b/types/d3-force/d3-force-tests.ts similarity index 100% rename from d3-force/d3-force-tests.ts rename to types/d3-force/d3-force-tests.ts diff --git a/d3-force/index.d.ts b/types/d3-force/index.d.ts similarity index 100% rename from d3-force/index.d.ts rename to types/d3-force/index.d.ts diff --git a/d3-force/tsconfig.json b/types/d3-force/tsconfig.json similarity index 100% rename from d3-force/tsconfig.json rename to types/d3-force/tsconfig.json diff --git a/d3-force/tslint.json b/types/d3-force/tslint.json similarity index 100% rename from d3-force/tslint.json rename to types/d3-force/tslint.json diff --git a/d3-format/d3-format-tests.ts b/types/d3-format/d3-format-tests.ts similarity index 100% rename from d3-format/d3-format-tests.ts rename to types/d3-format/d3-format-tests.ts diff --git a/d3-format/index.d.ts b/types/d3-format/index.d.ts similarity index 100% rename from d3-format/index.d.ts rename to types/d3-format/index.d.ts diff --git a/d3-format/tsconfig.json b/types/d3-format/tsconfig.json similarity index 100% rename from d3-format/tsconfig.json rename to types/d3-format/tsconfig.json diff --git a/d3-geo/d3-geo-tests.ts b/types/d3-geo/d3-geo-tests.ts similarity index 80% rename from d3-geo/d3-geo-tests.ts rename to types/d3-geo/d3-geo-tests.ts index a29dce0e8b..b5ad28f3e2 100644 --- a/d3-geo/d3-geo-tests.ts +++ b/types/d3-geo/d3-geo-tests.ts @@ -144,7 +144,7 @@ contained = d3Geo.geoContains(sampleExtendedFeatureCollection, [0, 0]); // geoDistance(...) ======================================================= -let distance: number = d3Geo.geoDistance([54, 2], [53, 1]); +const distance: number = d3Geo.geoDistance([54, 2], [53, 1]); // geoLength(...) ========================================================= @@ -160,19 +160,19 @@ length = d3Geo.geoLength(sampleExtendedFeatureCollection); // geoInterpolate(...) ==================================================== -let interpolateFct: (t: number) => [number, number] = d3Geo.geoInterpolate([54, 2], [53, 1]); +const interpolateFct: (t: number) => [number, number] = d3Geo.geoInterpolate([54, 2], [53, 1]); // geoRotation(...) ======================================================= // create rotation ----------------------------------------------------- -let rotation: d3Geo.GeoRotation = d3Geo.geoRotation([90, 45]); -let rotation2: d3Geo.GeoRotation = d3Geo.geoRotation([90, 45, 27.5]); +const rotation: d3Geo.GeoRotation = d3Geo.geoRotation([90, 45]); +const rotation2: d3Geo.GeoRotation = d3Geo.geoRotation([90, 45, 27.5]); // use rotation -------------------------------------------------------- -let point: [number, number] = rotation([54, 2]); -let inverted: [number, number] = rotation.invert([54, 2]); +const point: [number, number] = rotation([54, 2]); +const inverted: [number, number] = rotation.invert([54, 2]); // ---------------------------------------------------------------------- // Spherical Shapes - geoCircle @@ -185,24 +185,23 @@ let circleGeneratorSimple: d3Geo.GeoCircleGenerator = d3Geo.geoCircle( // complex use as part of object class Circulator { - constructor(radius: number, precision: number) { this.r = radius; this.p = precision; this.circleGenerator = d3Geo.geoCircle() - .radius(function (datum) { - let t: Circulator = this; - let d: [number, number] | undefined = datum; + .radius(function(datum) { + const t: Circulator = this; + const d: [number, number] | undefined = datum; return this.r; }) - .precision(function (datum) { - let t: Circulator = this; - let d: [number, number] | undefined = datum; + .precision(function(datum) { + const t: Circulator = this; + const d: [number, number] | undefined = datum; return this.p; }) - .center(function (datum) { - let t: Circulator = this; - let d: [number, number] | undefined = datum; + .center(function(datum) { + const t: Circulator = this; + const d: [number, number] | undefined = datum; return d ? d : [0, 0]; }); } @@ -219,28 +218,28 @@ class Circulator { } } -let circulator = new Circulator(50, 2); +const circulator = new Circulator(50, 2); // Configure CircleGenerator ============================================ // center(...) ---------------------------------------------------------- -let centerFctSimple: ((this: any, d: any, ...args: any[]) => [number, number]) = circleGeneratorSimple.center(); +const centerFctSimple: ((this: any, d: any, ...args: any[]) => [number, number]) = circleGeneratorSimple.center(); -let c: [number, number] = [54, 2]; +const c: [number, number] = [54, 2]; circleGeneratorSimple = circleGeneratorSimple.center(() => c); circleGeneratorSimple = circleGeneratorSimple.center(c); // radius(...) ----------------------------------------------------------- -let radius: ((...args: any[]) => number) = circleGeneratorSimple.radius(); +const radius: ((...args: any[]) => number) = circleGeneratorSimple.radius(); circleGeneratorSimple = circleGeneratorSimple.radius(() => 5); circleGeneratorSimple = circleGeneratorSimple.radius(2); // precision(...) -------------------------------------------------------- -let precision: ((...args: any[]) => number) = circleGeneratorSimple.precision(); +const precision: ((...args: any[]) => number) = circleGeneratorSimple.precision(); circleGeneratorSimple = circleGeneratorSimple.precision(() => 5); circleGeneratorSimple = circleGeneratorSimple.precision(2); @@ -253,7 +252,6 @@ let circlePolygon: GeoJSON.Polygon = circleGeneratorSimple(); circlePolygon = circulator.getCirclePolygon([5, 5]); circlePolygon = circulator.getCirclePolygon(); - // ---------------------------------------------------------------------- // Spherical Shapes - geoGraticule // ---------------------------------------------------------------------- @@ -266,44 +264,44 @@ let graticuleGenerator: d3Geo.GeoGraticuleGenerator = d3Geo.geoGraticule(); // extent(...) ----------------------------------------------------------- -let extent: [[number, number], [number, number]] = graticuleGenerator.extent(); +const extent: [[number, number], [number, number]] = graticuleGenerator.extent(); graticuleGenerator = graticuleGenerator.extent([[-180, -80], [180, 80]]); // extentMajor(...) --------------------------------------------------------- -let extentMajor: [[number, number], [number, number]] = graticuleGenerator.extentMajor(); +const extentMajor: [[number, number], [number, number]] = graticuleGenerator.extentMajor(); graticuleGenerator = graticuleGenerator.extentMajor([[-180, -80], [180, 80]]); // extentMinor(...) --------------------------------------------------------- -let extentMinor: [[number, number], [number, number]] = graticuleGenerator.extentMinor(); +const extentMinor: [[number, number], [number, number]] = graticuleGenerator.extentMinor(); graticuleGenerator = graticuleGenerator.extentMinor([[-180, -80], [180, 80]]); // step(...) ---------------------------------------------------------------- -let step: [number, number] = graticuleGenerator.step(); +const step: [number, number] = graticuleGenerator.step(); graticuleGenerator = graticuleGenerator.step([10, 10]); // stepMajor(...) ----------------------------------------------------------- -let stepMajor: [number, number] = graticuleGenerator.stepMajor(); +const stepMajor: [number, number] = graticuleGenerator.stepMajor(); graticuleGenerator = graticuleGenerator.stepMajor([10, 10]); // stepMinor(...) ------------------------------------------------------------ -let stepMinor: [number, number] = graticuleGenerator.stepMinor(); +const stepMinor: [number, number] = graticuleGenerator.stepMinor(); graticuleGenerator = graticuleGenerator.stepMinor([10, 10]); // precision(...) ------------------------------------------------------------- -let precision1: number = graticuleGenerator.precision(); +const precision1: number = graticuleGenerator.precision(); graticuleGenerator = graticuleGenerator.precision(5); // Use GeoGraticuleGenerator ============================================ let multiString: GeoJSON.MultiLineString = graticuleGenerator(); -let lines: GeoJSON.LineString[] = graticuleGenerator.lines(); -let polygon2: GeoJSON.Polygon = graticuleGenerator.outline(); +const lines: GeoJSON.LineString[] = graticuleGenerator.lines(); +const polygon2: GeoJSON.Polygon = graticuleGenerator.outline(); // geoGraticule10() ===================================================== @@ -317,24 +315,22 @@ multiString = d3Geo.geoGraticule10(); // Pre-Defined Raw Projection Factories ================================= -let azimuthalEqualAreaRaw: d3Geo.GeoRawProjection = d3Geo.geoAzimuthalEqualAreaRaw(); -let azimuthalEquidistantRaw: d3Geo.GeoRawProjection = d3Geo.geoAzimuthalEquidistantRaw(); -let conicConformalRaw: d3Geo.GeoRawProjection = d3Geo.geoConicConformalRaw(0, 0); -let conicEqualAreaRaw: d3Geo.GeoRawProjection = d3Geo.geoConicEqualAreaRaw(0, 0); -let conicEquidistantRaw: d3Geo.GeoRawProjection = d3Geo.geoConicEquidistantRaw(0, 0); -let equirectangularRaw: d3Geo.GeoRawProjection = d3Geo.geoEquirectangularRaw(); -let gnomonicRaw: d3Geo.GeoRawProjection = d3Geo.geoGnomonicRaw(); -let mercatorRaw: d3Geo.GeoRawProjection = d3Geo.geoMercatorRaw(); -let orthographicRaw: d3Geo.GeoRawProjection = d3Geo.geoOrthographicRaw(); -let stereographicRaw: d3Geo.GeoRawProjection = d3Geo.geoStereographicRaw(); -let transverseMercatorRaw: d3Geo.GeoRawProjection = d3Geo.geoTransverseMercatorRaw(); +const azimuthalEqualAreaRaw: d3Geo.GeoRawProjection = d3Geo.geoAzimuthalEqualAreaRaw(); +const azimuthalEquidistantRaw: d3Geo.GeoRawProjection = d3Geo.geoAzimuthalEquidistantRaw(); +const conicConformalRaw: d3Geo.GeoRawProjection = d3Geo.geoConicConformalRaw(0, 0); +const conicEqualAreaRaw: d3Geo.GeoRawProjection = d3Geo.geoConicEqualAreaRaw(0, 0); +const conicEquidistantRaw: d3Geo.GeoRawProjection = d3Geo.geoConicEquidistantRaw(0, 0); +const equirectangularRaw: d3Geo.GeoRawProjection = d3Geo.geoEquirectangularRaw(); +const gnomonicRaw: d3Geo.GeoRawProjection = d3Geo.geoGnomonicRaw(); +const mercatorRaw: d3Geo.GeoRawProjection = d3Geo.geoMercatorRaw(); +const orthographicRaw: d3Geo.GeoRawProjection = d3Geo.geoOrthographicRaw(); +const stereographicRaw: d3Geo.GeoRawProjection = d3Geo.geoStereographicRaw(); +const transverseMercatorRaw: d3Geo.GeoRawProjection = d3Geo.geoTransverseMercatorRaw(); // Use Raw Projection ===================================================== -let rawProjectionPoint: [number, number] = azimuthalEqualAreaRaw(54, 2); -let rawProjectionInvertedPoint: [number, number] = azimuthalEqualAreaRaw.invert(180, 6); - - +const rawProjectionPoint: [number, number] = azimuthalEqualAreaRaw(54, 2); +const rawProjectionInvertedPoint: [number, number] = azimuthalEqualAreaRaw.invert(180, 6); // ---------------------------------------------------------------------- // Pre-Defined Projections @@ -342,39 +338,38 @@ let rawProjectionInvertedPoint: [number, number] = azimuthalEqualAreaRaw.invert( // Create predefined Projection from factory ============================= -let albers: d3Geo.GeoConicProjection = d3Geo.geoAlbers(); -let albersUsa: d3Geo.GeoProjection = d3Geo.geoAlbersUsa(); -let azimuthalEqualArea: d3Geo.GeoProjection = d3Geo.geoAzimuthalEqualArea(); -let azimuthalEquidistant: d3Geo.GeoProjection = d3Geo.geoAzimuthalEquidistant(); +const albers: d3Geo.GeoConicProjection = d3Geo.geoAlbers(); +const albersUsa: d3Geo.GeoProjection = d3Geo.geoAlbersUsa(); +const azimuthalEqualArea: d3Geo.GeoProjection = d3Geo.geoAzimuthalEqualArea(); +const azimuthalEquidistant: d3Geo.GeoProjection = d3Geo.geoAzimuthalEquidistant(); let conicConformal: d3Geo.GeoConicProjection = d3Geo.geoConicConformal(); -let conicEqualArea: d3Geo.GeoConicProjection = d3Geo.geoConicEqualArea(); -let conicEquidistant: d3Geo.GeoConicProjection = d3Geo.geoConicEquidistant(); -let cquirectangular: d3Geo.GeoProjection = d3Geo.geoEquirectangular(); -let gnomonic: d3Geo.GeoProjection = d3Geo.geoGnomonic(); -let mercator: d3Geo.GeoProjection = d3Geo.geoMercator(); -let orthographic: d3Geo.GeoProjection = d3Geo.geoOrthographic(); -let stereographic: d3Geo.GeoProjection = d3Geo.geoStereographic(); -let transverseMercator: d3Geo.GeoProjection = d3Geo.geoTransverseMercator(); +const conicEqualArea: d3Geo.GeoConicProjection = d3Geo.geoConicEqualArea(); +const conicEquidistant: d3Geo.GeoConicProjection = d3Geo.geoConicEquidistant(); +const cquirectangular: d3Geo.GeoProjection = d3Geo.geoEquirectangular(); +const gnomonic: d3Geo.GeoProjection = d3Geo.geoGnomonic(); +const mercator: d3Geo.GeoProjection = d3Geo.geoMercator(); +const orthographic: d3Geo.GeoProjection = d3Geo.geoOrthographic(); +const stereographic: d3Geo.GeoProjection = d3Geo.geoStereographic(); +const transverseMercator: d3Geo.GeoProjection = d3Geo.geoTransverseMercator(); // ---------------------------------------------------------------------- // Create New Projections // ---------------------------------------------------------------------- +const geoProjection: d3Geo.GeoProjection = d3Geo.geoProjection(azimuthalEqualAreaRaw); -let geoProjection: d3Geo.GeoProjection = d3Geo.geoProjection(azimuthalEqualAreaRaw); - -let mutate: () => d3Geo.GeoProjection = d3Geo.geoProjectionMutator(() => azimuthalEqualAreaRaw); +const mutate: () => d3Geo.GeoProjection = d3Geo.geoProjectionMutator(() => azimuthalEqualAreaRaw); let constructedProjection: d3Geo.GeoProjection = mutate(); // Use Projection ========================================================== -let projected: [number, number] = constructedProjection([54, 2]); -let inverted2: [number, number] = constructedProjection.invert([54, 2]); +const projected: [number, number] = constructedProjection([54, 2]); +const inverted2: [number, number] = constructedProjection.invert([54, 2]); // TODO ????? // let stream: d3Geo.Stream = constructedProjection.stream([54, 2]); -let clipAngle: number = constructedProjection.clipAngle(); +const clipAngle: number = constructedProjection.clipAngle(); constructedProjection = constructedProjection.clipAngle(null); constructedProjection = constructedProjection.clipAngle(45); @@ -388,14 +383,14 @@ constructedProjection = constructedProjection.scale(45); let translate: [number, number] = constructedProjection.translate(); constructedProjection = constructedProjection.translate([480, 250]); -let center: [number, number] = constructedProjection.center(); +const center: [number, number] = constructedProjection.center(); constructedProjection = constructedProjection.center([0, 0]); -let rotate: [number, number, number] = constructedProjection.rotate(); +const rotate: [number, number, number] = constructedProjection.rotate(); constructedProjection = constructedProjection.rotate([0, 0]); constructedProjection = constructedProjection.rotate([0, 0, 0]); -let precision2: number = constructedProjection.precision(); +const precision2: number = constructedProjection.precision(); constructedProjection = constructedProjection.precision(0.707); constructedProjection = constructedProjection.fitExtent([[0, 0], [960, 500]], samplePolygon); @@ -423,7 +418,7 @@ constructedProjection = constructedProjection.fitSize([960, 500], sampleExtended // ---------------------------------------------------------------------- // parallels(...) ------------------------------------------------------ -let parallels: [number, number] = conicConformal.parallels(); +const parallels: [number, number] = conicConformal.parallels(); conicConformal = conicConformal.parallels([20, 20]); // test method inheritance from GeoProjection --------------------------- @@ -434,7 +429,7 @@ conicConformal = conicConformal.fitSize([960, 500], samplePolygon); // inherited // GeoPath Generator // ---------------------------------------------------------------------- -let minimalRenderingContextMockUp: d3Geo.GeoContext = { +const minimalRenderingContextMockUp: d3Geo.GeoContext = { beginPath: () => { return; }, moveTo: (x: number, y: number) => { return; }, lineTo: (x: number, y: number) => { return; }, @@ -460,12 +455,12 @@ geoPathSVG = d3Geo.geoPath(); +const geoPathProjectionMinimal: d3Geo.GeoStreamWrapper = geoPathCanvas.projection(); +const geoPathProjectionUnion: d3Geo.GeoProjection | d3Geo.GeoConicProjection | d3Geo.GeoStreamWrapper = geoPathCanvas.projection(); +const geoPathProjection: d3Geo.GeoProjection = geoPathCanvas.projection(); geoPathSVG = geoPathSVG.projection(conicConformal); -let geoPathConicProjection: d3Geo.GeoConicProjection = geoPathSVG.projection(); +const geoPathConicProjection: d3Geo.GeoConicProjection = geoPathSVG.projection(); // geoPathConicProjection = geoPathSVG.projection(); // fails without casting to GeoConicProjection, or alternatively custom typeguard // geoPathConicProjection = geoPathSVG.projection(); // fails as SampleProperties does not extend minimal interface @@ -474,8 +469,7 @@ let geoPathConicProjection: d3Geo.GeoConicProjection = geoPathSVG.projection(); // pointRadius(...) ------------------------------------------------------ geoPathCanvas = geoPathCanvas.pointRadius(5); -let geoPathCanvasPointRadiusAccessor: ((this: any, d: d3Geo.GeoPermissibleObjects, ...args: any[]) => number) | number = geoPathCanvas.pointRadius(); +const geoPathCanvasPointRadiusAccessor: ((this: any, d: d3Geo.GeoPermissibleObjects, ...args: any[]) => number) | number = geoPathCanvas.pointRadius(); -geoPathSVG = geoPathSVG.pointRadius(function (datum) { - let that: SVGPathElement = this; - let d: d3Geo.ExtendedFeature = datum; +geoPathSVG = geoPathSVG.pointRadius(function(datum) { + const that: SVGPathElement = this; + const d: d3Geo.ExtendedFeature = datum; return datum.properties.name === 'Alabama' ? 10 : 15; }); -let geoPathSVGPointRadiusAccessor: number | ((this: SVGPathElement, d: d3Geo.ExtendedFeature, ...args: any[]) => number) = geoPathSVG.pointRadius(); +const geoPathSVGPointRadiusAccessor: number | ((this: SVGPathElement, d: d3Geo.ExtendedFeature, ...args: any[]) => number) = geoPathSVG.pointRadius(); // let geoPathSVGPointRadiusAccessorWrong1: number | ((this: SVGCircleElement, d: d3Geo.ExtendedFeature, ...args: any[]) => number) // = geoPathSVG.pointRadius(); // fails, mismatch in this context // let geoPathSVGPointRadiusAccessorWrong2: number | ((this: SVGPathElement, d: d3Geo.GeoGeometryObjects, ...args: any[]) => number) = geoPathSVG.pointRadius(); // fails, mismatch in object datum type @@ -521,7 +515,6 @@ geoPathArea = geoPathCanvas.area(sampleExtendedFeatureCollection); // geoPathArea = geoPathSVG.area(sampleExtendedFeatureCollection); // fails, wrong data object type - // bounds(...) ------------------------------------------------------ let geoPathBounds: [[number, number], [number, number]] = geoPathCanvas.bounds(samplePolygon); @@ -550,7 +543,6 @@ geoPathCentroid = geoPathCanvas.centroid(sampleExtendedFeatureCollection); // geoPathCentroid = geoPathSVG.centroid(sampleExtendedFeatureCollection); // fails, wrong data object type - // measure(...) ------------------------------------------------------ let geoPathMeasure: number = geoPathCanvas.measure(samplePolygon); @@ -579,22 +571,19 @@ geoPathCanvas(sampleExtendedFeatureCollection); // Use path string generator for SVGPathElement -let svgPath: Selection, any, any>; +declare const svgPath: Selection, any, any>; svgPath.attr('d', geoPathSVG); -let svgCircleWrong: Selection, any, any>; +declare const svgCircleWrong: Selection, any, any>; // svgCircleWrong.attr('d', geoPathSVG); // fails, mismatch in `this` context -let svgPathWrong: Selection; +declare const svgPathWrong: Selection; // svgPathWrong.attr('d', geoPathSVG); // fails, mismatch in datum type - - - // ---------------------------------------------------------------------- // Context interface // ---------------------------------------------------------------------- -let context: d3Geo.GeoContext = { +const context: d3Geo.GeoContext = { beginPath: () => { return; }, moveTo: (x: number, y: number) => { return; }, lineTo: (x: number, y: number) => { return; }, @@ -608,7 +597,7 @@ let context: d3Geo.GeoContext = { // geoTransform(...) ==================================================== -let transformFunction: { stream: (s: d3Geo.GeoStream) => {} } = d3Geo.geoTransform({}); +const transformFunction: { stream: (s: d3Geo.GeoStream) => {} } = d3Geo.geoTransform({}); interface CustomTranformProto extends d3Geo.GeoTransformPrototype { a: number; @@ -617,14 +606,13 @@ interface CustomTranformProto extends d3Geo.GeoTransformPrototype { let customTransformProto: CustomTranformProto; customTransformProto = { - point: function (x, y) { + point(x, y) { return this.stream.point(x + this.a, -y); }, a: 10 }; -let t: { stream: (s: d3Geo.GeoStream) => (CustomTranformProto & d3Geo.GeoStream) } = d3Geo.geoTransform(customTransformProto); - +const t: { stream: (s: d3Geo.GeoStream) => (CustomTranformProto & d3Geo.GeoStream) } = d3Geo.geoTransform(customTransformProto); // geoIdentity() ======================================================== @@ -675,7 +663,7 @@ reflecting = identityTransform.reflectY(); // ---------------------------------------------------------------------- // Stream interface // ---------------------------------------------------------------------- -let stream: d3Geo.GeoStream; +declare const stream: d3Geo.GeoStream; stream.point(0, 0); stream.point(0, 0, 0); @@ -696,4 +684,3 @@ d3Geo.geoStream(sampleExtendedFeature1, stream); d3Geo.geoStream(sampleExtendedFeature2, stream); d3Geo.geoStream(sampleFeatureCollection, stream); d3Geo.geoStream(sampleExtendedFeatureCollection, stream); - diff --git a/d3-geo/index.d.ts b/types/d3-geo/index.d.ts similarity index 99% rename from d3-geo/index.d.ts rename to types/d3-geo/index.d.ts index dfc58a5f9e..1e9fed9b92 100644 --- a/d3-geo/index.d.ts +++ b/types/d3-geo/index.d.ts @@ -274,7 +274,6 @@ export interface GeoRotation { */ export function geoRotation(angles: [number, number] | [number, number, number]): GeoRotation; - // ---------------------------------------------------------------------- // Spherical Shapes // ---------------------------------------------------------------------- @@ -535,8 +534,6 @@ export interface GeoStream { sphere?(): void; } - - // geoStream(...) ======================================================= /** @@ -575,15 +572,10 @@ export function geoStream(object: GeoGeometryObjects, stream: GeoStream): void; */ export function geoStream(object: ExtendedGeometryCollection, stream: GeoStream): void; - - // ---------------------------------------------------------------------- // Projections // ---------------------------------------------------------------------- - - - /** * Raw projections are point transformation functions that are used to implement custom projections; they typically passed to d3.geoProjection or d3.geoProjectionMutator. * They are exposed here to facilitate the derivation of related projections. @@ -737,7 +729,6 @@ export interface GeoProjection extends GeoStreamWrapper { */ fitExtent(extent: [[number, number], [number, number]], object: ExtendedGeometryCollection): this; - /** * Sets the projection’s scale and translate to fit the specified geographic feature in the center of an extent with the given size and top-left corner of [0, 0]. * Returns the projection. @@ -845,7 +836,6 @@ export interface GeoProjection extends GeoStreamWrapper { * A Conic Projection */ export interface GeoConicProjection extends GeoProjection { - /** * Return the standard parallels for the conic projection in degrees. */ @@ -856,10 +846,8 @@ export interface GeoConicProjection extends GeoProjection { * @param value A two-dimensional array representing the standard parallels in degrees. */ parallels(value: [number, number]): this; - } - // geoPath ============================================================== /** @@ -869,7 +857,6 @@ export interface GeoConicProjection extends GeoProjection { * For reference to the CanvasRenderingContext2D see https://developer.mozilla.org/en/docs/Web/API/CanvasRenderingContext2D */ export interface GeoContext { - /** * Adds an arc to the path with center point (x, y) and radius r starting at startAngle and ending at endAngle. * The arc is drawn in clockwise directio by default. @@ -921,7 +908,6 @@ export interface GeoContext { * The second generic corresponds to the type of the DatumObject which will be passed into the geo path generator for rendering. */ export interface GeoPath { - /** * Renders the given object, which may be any GeoJSON feature or geometry object: * @@ -1084,7 +1070,6 @@ export interface GeoPath { * It is passed the object to be rendered, and any additional arguments which have been passed into the call to the render function of the path generator. */ pointRadius(value: (this: This, object: DatumObject, ...args: any[]) => number): this; - } /** @@ -1143,9 +1128,6 @@ export function geoPath(projection?: */ export function geoPath(projection?: GeoProjection | GeoStreamWrapper | null, context?: GeoContext | null): GeoPath; - - - // geoProjection ========================================================== /** @@ -1366,7 +1348,6 @@ export function geoTransform(methods: T): { str * Geo Identity Transform */ export interface GeoIdentityTranform extends GeoStreamWrapper { - /** * Returns the current viewport clip extent which defaults to null. */ @@ -1431,7 +1412,6 @@ export interface GeoIdentityTranform extends GeoStreamWrapper { */ fitExtent(extent: [[number, number], [number, number]], object: ExtendedGeometryCollection): this; - /** * Sets the projection’s scale and translate to fit the specified geographic feature in the center of an extent with the given size and top-left corner of [0, 0]. * Returns the projection. diff --git a/d3-geo/tsconfig.json b/types/d3-geo/tsconfig.json similarity index 100% rename from d3-geo/tsconfig.json rename to types/d3-geo/tsconfig.json diff --git a/d3-geo/tslint.json b/types/d3-geo/tslint.json similarity index 100% rename from d3-geo/tslint.json rename to types/d3-geo/tslint.json diff --git a/d3-hexbin/d3-hexbin-tests.ts b/types/d3-hexbin/d3-hexbin-tests.ts similarity index 100% rename from d3-hexbin/d3-hexbin-tests.ts rename to types/d3-hexbin/d3-hexbin-tests.ts diff --git a/d3-hexbin/index.d.ts b/types/d3-hexbin/index.d.ts similarity index 100% rename from d3-hexbin/index.d.ts rename to types/d3-hexbin/index.d.ts diff --git a/d3-hexbin/tsconfig.json b/types/d3-hexbin/tsconfig.json similarity index 100% rename from d3-hexbin/tsconfig.json rename to types/d3-hexbin/tsconfig.json diff --git a/d3-hierarchy/d3-hierarchy-tests.ts b/types/d3-hierarchy/d3-hierarchy-tests.ts similarity index 100% rename from d3-hierarchy/d3-hierarchy-tests.ts rename to types/d3-hierarchy/d3-hierarchy-tests.ts diff --git a/d3-hierarchy/index.d.ts b/types/d3-hierarchy/index.d.ts similarity index 100% rename from d3-hierarchy/index.d.ts rename to types/d3-hierarchy/index.d.ts diff --git a/d3-hierarchy/tsconfig.json b/types/d3-hierarchy/tsconfig.json similarity index 100% rename from d3-hierarchy/tsconfig.json rename to types/d3-hierarchy/tsconfig.json diff --git a/d3-hsv/d3-hsv-tests.ts b/types/d3-hsv/d3-hsv-tests.ts similarity index 100% rename from d3-hsv/d3-hsv-tests.ts rename to types/d3-hsv/d3-hsv-tests.ts diff --git a/d3-hsv/index.d.ts b/types/d3-hsv/index.d.ts similarity index 100% rename from d3-hsv/index.d.ts rename to types/d3-hsv/index.d.ts diff --git a/d3-hsv/tsconfig.json b/types/d3-hsv/tsconfig.json similarity index 100% rename from d3-hsv/tsconfig.json rename to types/d3-hsv/tsconfig.json diff --git a/d3-interpolate/d3-interpolate-tests.ts b/types/d3-interpolate/d3-interpolate-tests.ts similarity index 100% rename from d3-interpolate/d3-interpolate-tests.ts rename to types/d3-interpolate/d3-interpolate-tests.ts diff --git a/d3-interpolate/index.d.ts b/types/d3-interpolate/index.d.ts similarity index 100% rename from d3-interpolate/index.d.ts rename to types/d3-interpolate/index.d.ts diff --git a/d3-interpolate/tsconfig.json b/types/d3-interpolate/tsconfig.json similarity index 100% rename from d3-interpolate/tsconfig.json rename to types/d3-interpolate/tsconfig.json diff --git a/d3-path/d3-path-tests.ts b/types/d3-path/d3-path-tests.ts similarity index 100% rename from d3-path/d3-path-tests.ts rename to types/d3-path/d3-path-tests.ts diff --git a/d3-path/index.d.ts b/types/d3-path/index.d.ts similarity index 100% rename from d3-path/index.d.ts rename to types/d3-path/index.d.ts diff --git a/d3-path/tsconfig.json b/types/d3-path/tsconfig.json similarity index 100% rename from d3-path/tsconfig.json rename to types/d3-path/tsconfig.json diff --git a/d3-polygon/d3-polygon-tests.ts b/types/d3-polygon/d3-polygon-tests.ts similarity index 100% rename from d3-polygon/d3-polygon-tests.ts rename to types/d3-polygon/d3-polygon-tests.ts diff --git a/d3-polygon/index.d.ts b/types/d3-polygon/index.d.ts similarity index 100% rename from d3-polygon/index.d.ts rename to types/d3-polygon/index.d.ts diff --git a/d3-polygon/tsconfig.json b/types/d3-polygon/tsconfig.json similarity index 100% rename from d3-polygon/tsconfig.json rename to types/d3-polygon/tsconfig.json diff --git a/d3-quadtree/d3-quadtree-tests.ts b/types/d3-quadtree/d3-quadtree-tests.ts similarity index 100% rename from d3-quadtree/d3-quadtree-tests.ts rename to types/d3-quadtree/d3-quadtree-tests.ts diff --git a/d3-quadtree/index.d.ts b/types/d3-quadtree/index.d.ts similarity index 100% rename from d3-quadtree/index.d.ts rename to types/d3-quadtree/index.d.ts diff --git a/d3-quadtree/tsconfig.json b/types/d3-quadtree/tsconfig.json similarity index 100% rename from d3-quadtree/tsconfig.json rename to types/d3-quadtree/tsconfig.json diff --git a/d3-queue/d3-queue-tests.ts b/types/d3-queue/d3-queue-tests.ts similarity index 100% rename from d3-queue/d3-queue-tests.ts rename to types/d3-queue/d3-queue-tests.ts diff --git a/d3-queue/index.d.ts b/types/d3-queue/index.d.ts similarity index 100% rename from d3-queue/index.d.ts rename to types/d3-queue/index.d.ts diff --git a/d3-queue/tsconfig.json b/types/d3-queue/tsconfig.json similarity index 100% rename from d3-queue/tsconfig.json rename to types/d3-queue/tsconfig.json diff --git a/d3-random/d3-random-tests.ts b/types/d3-random/d3-random-tests.ts similarity index 100% rename from d3-random/d3-random-tests.ts rename to types/d3-random/d3-random-tests.ts diff --git a/d3-random/index.d.ts b/types/d3-random/index.d.ts similarity index 100% rename from d3-random/index.d.ts rename to types/d3-random/index.d.ts diff --git a/d3-random/tsconfig.json b/types/d3-random/tsconfig.json similarity index 100% rename from d3-random/tsconfig.json rename to types/d3-random/tsconfig.json diff --git a/d3-request/d3-request-tests.ts b/types/d3-request/d3-request-tests.ts similarity index 100% rename from d3-request/d3-request-tests.ts rename to types/d3-request/d3-request-tests.ts diff --git a/d3-request/index.d.ts b/types/d3-request/index.d.ts similarity index 100% rename from d3-request/index.d.ts rename to types/d3-request/index.d.ts diff --git a/d3-request/tsconfig.json b/types/d3-request/tsconfig.json similarity index 100% rename from d3-request/tsconfig.json rename to types/d3-request/tsconfig.json diff --git a/d3-scale-chromatic/d3-scale-chromatic-tests.ts b/types/d3-scale-chromatic/d3-scale-chromatic-tests.ts similarity index 100% rename from d3-scale-chromatic/d3-scale-chromatic-tests.ts rename to types/d3-scale-chromatic/d3-scale-chromatic-tests.ts diff --git a/d3-scale-chromatic/index.d.ts b/types/d3-scale-chromatic/index.d.ts similarity index 100% rename from d3-scale-chromatic/index.d.ts rename to types/d3-scale-chromatic/index.d.ts diff --git a/d3-scale-chromatic/tsconfig.json b/types/d3-scale-chromatic/tsconfig.json similarity index 100% rename from d3-scale-chromatic/tsconfig.json rename to types/d3-scale-chromatic/tsconfig.json diff --git a/d3-scale/d3-scale-tests.ts b/types/d3-scale/d3-scale-tests.ts similarity index 100% rename from d3-scale/d3-scale-tests.ts rename to types/d3-scale/d3-scale-tests.ts diff --git a/d3-scale/index.d.ts b/types/d3-scale/index.d.ts similarity index 100% rename from d3-scale/index.d.ts rename to types/d3-scale/index.d.ts diff --git a/d3-scale/tsconfig.json b/types/d3-scale/tsconfig.json similarity index 100% rename from d3-scale/tsconfig.json rename to types/d3-scale/tsconfig.json diff --git a/d3-scale/tslint.json b/types/d3-scale/tslint.json similarity index 100% rename from d3-scale/tslint.json rename to types/d3-scale/tslint.json diff --git a/d3-selection-multi/d3-selection-multi-tests.ts b/types/d3-selection-multi/d3-selection-multi-tests.ts similarity index 100% rename from d3-selection-multi/d3-selection-multi-tests.ts rename to types/d3-selection-multi/d3-selection-multi-tests.ts diff --git a/d3-selection-multi/index.d.ts b/types/d3-selection-multi/index.d.ts similarity index 96% rename from d3-selection-multi/index.d.ts rename to types/d3-selection-multi/index.d.ts index 30268ad3aa..da3c64e5e3 100644 --- a/d3-selection-multi/index.d.ts +++ b/types/d3-selection-multi/index.d.ts @@ -8,7 +8,6 @@ import {Selection, BaseType, ArrayLike, ValueFn} from 'd3-selection'; import {Transition} from 'd3-transition'; - /** * An object mapping attribute (or style or property) names to value accessors * @@ -29,7 +28,7 @@ declare module 'd3-selection' { * The third generic "PElement" refers to the type of the parent element(s) in the D3 selection. * The fourth generic "PDatum" refers to the type of the datum of the parent element(s). */ - export interface Selection { + interface Selection { /** * Set multiple attributes on the given selection. Attribute values may be constant or derived from each node and its bound data. * @@ -85,7 +84,7 @@ declare module 'd3-transition' { * The third generic "PElement" refers to the type of the parent element(s) in the D3 selection in the Transition. * The fourth generic "PDatum" refers to the type of the datum of the parent element(s) in the Transition. */ - export interface Transition { + interface Transition { /** * Set multiple attribute values. The transition will animate from the present value to the new value. Attribute values may be constant or derived from each node and its bound data. * diff --git a/d3-selection-multi/tsconfig.json b/types/d3-selection-multi/tsconfig.json similarity index 100% rename from d3-selection-multi/tsconfig.json rename to types/d3-selection-multi/tsconfig.json diff --git a/d3-selection-multi/tslint.json b/types/d3-selection-multi/tslint.json similarity index 100% rename from d3-selection-multi/tslint.json rename to types/d3-selection-multi/tslint.json diff --git a/d3-selection/d3-selection-tests.ts b/types/d3-selection/d3-selection-tests.ts similarity index 99% rename from d3-selection/d3-selection-tests.ts rename to types/d3-selection/d3-selection-tests.ts index 43d8708938..0b2dec77c2 100644 --- a/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/d3-selection/index.d.ts b/types/d3-selection/index.d.ts similarity index 99% rename from d3-selection/index.d.ts rename to types/d3-selection/index.d.ts index 49cd141dfa..b007573b1f 100644 --- a/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 ------------------------- /** @@ -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/d3-selection/tsconfig.json b/types/d3-selection/tsconfig.json similarity index 100% rename from d3-selection/tsconfig.json rename to types/d3-selection/tsconfig.json diff --git a/d3-selection/tslint.json b/types/d3-selection/tslint.json similarity index 100% rename from d3-selection/tslint.json rename to types/d3-selection/tslint.json diff --git a/d3-shape/d3-shape-tests.ts b/types/d3-shape/d3-shape-tests.ts similarity index 99% rename from d3-shape/d3-shape-tests.ts rename to types/d3-shape/d3-shape-tests.ts index 204f1e7eb1..3ac854df2b 100644 --- a/d3-shape/d3-shape-tests.ts +++ b/types/d3-shape/d3-shape-tests.ts @@ -147,7 +147,6 @@ svgArc = svgArc.padRadius(null); accessorArcDatumNumberOrNull = svgArc.padRadius(); - // use Arc(...) generator ============================================================ // centroid(...) --------------------------------------------------------------------- @@ -160,7 +159,6 @@ const centroid: [number, number] = svgArc.centroid(arcDatum); // use with canvas canvasArc(arcDefaultDatum); - // use with svg const pArc: Selection = select('.arc-paths'); // mock @@ -171,7 +169,6 @@ pArc.attr('d', svgArc); // wrongArc1.attr('d', svgArc); // fails, incompatible this contexts // wrongArc2.attr('d', svgArc); // fails, incompatible datum types - // pathStringMaybe = svgArc(arcDatum); // fails, wrong this type for invocation // Use with custom object @@ -230,12 +227,10 @@ interface PieDatum { name: string; } - let accessorPieDatumNumber: (this: any, data: PieDatum[], ...args: any[]) => number; // PieArcDatum interface ============================================================= - const pieArcObject: d3Shape.PieArcDatum = { data: { val: 10, @@ -280,7 +275,6 @@ pie = pie.value((d, i, data) => { pieValueAccessor = pie.value(); - // sort(...) --------------------------------------------------------------------------- let pieSorter: ((a: PieDatum, b: PieDatum) => number) | null; @@ -332,7 +326,6 @@ defaultPie = defaultPie.padAngle(0.03); pie = pie.padAngle(d => { console.log(d.length > 0 ? d[0].val : 'no data'); // data type is Array return 0.03; - }); accessorPieDatumNumber = pie.padAngle(); @@ -351,7 +344,6 @@ let pieChart: Array>; pieChart = pie(pieData); - // ----------------------------------------------------------------------------------- // Test Line Generators // ----------------------------------------------------------------------------------- @@ -519,7 +511,6 @@ const radialLineData: RadialLineDatum[] = [ const radialLinePathStringMaybe: string | null = radialLine(radialLineData); - // ----------------------------------------------------------------------------------- // Test Area Generators // ----------------------------------------------------------------------------------- @@ -808,7 +799,6 @@ areaRadialLineGenerator = radialArea.lineInnerRadius(); areaRadialLineGenerator = radialArea.lineEndAngle(); areaRadialLineGenerator = radialArea.lineOuterRadius(); - // ----------------------------------------------------------------------------------- // Test Curve Factories // ----------------------------------------------------------------------------------- @@ -1002,7 +992,6 @@ pSymbol.attr('d', svgSymbol); // wrongSymbol1.attr('d', svgSymbol); // fails, incompatible this contexts // wrongSymbol2.attr('d', svgSymbol); // fails, incompatible datum types - // pathStringMaybe = svgSymbol(symbolDatum); // fails, wrong this type for invocation // Use with custom object @@ -1056,7 +1045,6 @@ const sym = new Symbolizer(100, 'square'); pathStringMaybe = sym.getPathString(); pathStringMaybe = sym.getPathString({ size: 10, type: 'circle' }); - // Test pre-fab symbols =============================================================== const symbolArray: d3Shape.SymbolType[] = d3Shape.symbols; @@ -1099,7 +1087,6 @@ const stackData: StackDatum[] = [ { values: { bananas: 12, apples: 10, oranges: 50 } } ]; - // Create stack generator ========================================================== let defaultStack: d3Shape.Stack; @@ -1110,7 +1097,6 @@ let overlyComplicatedStack: d3Shape.Stack; overlyComplicatedStack = d3Shape.stack(); - // Configure stack generator ======================================================= // keys(...) ---------------------------------------------------------------------- @@ -1181,8 +1167,6 @@ num = seriesPoint[0]; num = seriesPoint[1]; seriesDatum = seriesPoint.data; - - // Test stack orders =============================================================== let order: number[]; diff --git a/d3-shape/index.d.ts b/types/d3-shape/index.d.ts similarity index 99% rename from d3-shape/index.d.ts rename to types/d3-shape/index.d.ts index 367a9dee2b..e1d80b6786 100644 --- a/d3-shape/index.d.ts +++ b/types/d3-shape/index.d.ts @@ -790,7 +790,6 @@ export function line(): Line<[number, number]>; */ export function line(): Line; - /** * The radial line generator produces a spline or polyline, as in a line chart. * @@ -1285,7 +1284,6 @@ export function area(): Area; * The generic refers to the data type of an element in the input array passed into the area generator. */ export interface RadialArea { - /** * Generates a radial area for the given array of data. * @@ -1670,7 +1668,7 @@ export interface CurveFactory { * The first and last points are triplicated such that the spline starts at the first point and ends at the last point, * and is tangent to the line between the first and second points, and to the line between the penultimate and last points. */ -export var curveBasis: CurveFactory; +export const curveBasis: CurveFactory; /** * A curve factory for closed cubic basis spline generators. @@ -1678,7 +1676,7 @@ export var curveBasis: CurveFactory; * The curve generators produce a closed cubic basis spline using the specified control points. * When a line segment ends, the first three control points are repeated, producing a closed loop with C2 continuity. */ -export var curveBasisClosed: CurveFactory; +export const curveBasisClosed: CurveFactory; /** * A curve factory for open cubic basis spline generators. @@ -1686,7 +1684,7 @@ export var curveBasisClosed: CurveFactory; * The curve generators produce a cubic basis spline using the specified control points. * Unlike basis, the first and last points are not repeated, and thus the curve typically does not intersect these points. */ -export var curveBasisOpen: CurveFactory; +export const curveBasisOpen: CurveFactory; /** * A curve factory for straightened cubic basis spline generators. @@ -1719,8 +1717,7 @@ export interface CurveBundleFactory extends CurveFactoryLineOnly { * * This curve does not implement curve.areaStart and curve.areaEnd; it is intended to work with d3.line, not d3.area. */ -export var curveBundle: CurveBundleFactory; - +export const curveBundle: CurveBundleFactory; /** * A curve factory for cubic cardinal spline generators. @@ -1741,7 +1738,7 @@ export interface CurveCardinalFactory extends CurveFactory { * The curve generators produce a cubic cardinal spline using the specified control points, with one-sided differences used for the first and last piece. * The default tension is 0. */ -export var curveCardinal: CurveCardinalFactory; +export const curveCardinal: CurveCardinalFactory; /** * A curve factory for closed cubic cardinal spline generators. @@ -1750,7 +1747,7 @@ export var curveCardinal: CurveCardinalFactory; * When a line segment ends, the first three control points are repeated, producing a closed loop. * The default tension is 0. */ -export var curveCardinalClosed: CurveCardinalFactory; +export const curveCardinalClosed: CurveCardinalFactory; /** * A curve factory for open cubic cardinal spline generators. @@ -1760,7 +1757,7 @@ export var curveCardinalClosed: CurveCardinalFactory; * and thus the curve starts at the second point and ends at the penultimate point. * The default tension is 0. */ -export var curveCardinalOpen: CurveCardinalFactory; +export const curveCardinalOpen: CurveCardinalFactory; /** * A curve factory for cubic Catmull–Rom spline generators. @@ -1784,7 +1781,7 @@ export interface CurveCatmullRomFactory extends CurveFactory { * which defaults to 0.5, as proposed by Yuksel et al. in On the Parameterization of Catmull–Rom Curves, * with one-sided differences used for the first and last piece. */ -export var curveCatmullRom: CurveCatmullRomFactory; +export const curveCatmullRom: CurveCatmullRomFactory; /** * A curve factory for cubic Catmull–Rom spline generators. @@ -1793,7 +1790,7 @@ export var curveCatmullRom: CurveCatmullRomFactory; * which defaults to 0.5, as proposed by Yuksel et al. When a line segment ends, * the first three control points are repeated, producing a closed loop. */ -export var curveCatmullRomClosed: CurveCatmullRomFactory; +export const curveCatmullRomClosed: CurveCatmullRomFactory; /** * A curve factory for cubic Catmull–Rom spline generators. @@ -1802,22 +1799,21 @@ export var curveCatmullRomClosed: CurveCatmullRomFactory; * which defaults to 0.5, as proposed by Yuksel et al. Unlike curveCatmullRom, one-sided differences are not used for the first and last piece, * and thus the curve starts at the second point and ends at the penultimate point. */ -export var curveCatmullRomOpen: CurveCatmullRomFactory; - +export const curveCatmullRomOpen: CurveCatmullRomFactory; /** * A curve factory for polyline generators. * * The curve generators produce a polyline through the specified points. */ -export var curveLinear: CurveFactory; +export const curveLinear: CurveFactory; /** * A curve factory for closed polyline generators. * * The curve generators produce a closed polyline through the specified points by repeating the first point when the line segment ends. */ -export var curveLinearClosed: CurveFactory; +export const curveLinearClosed: CurveFactory; /** * A curve factory for cubic spline generators preserving monotonicity in y. @@ -1826,7 +1822,7 @@ export var curveLinearClosed: CurveFactory; * “a smooth curve with continuous first-order derivatives that passes through any given set of data points without spurious oscillations. * Local extrema can occur only at grid points where they are given by the data, but not in between two adjacent grid points.” */ -export var curveMonotoneX: CurveFactory; +export const curveMonotoneX: CurveFactory; /** * A curve factory for cubic spline generators preserving monotonicity in x. @@ -1835,14 +1831,14 @@ export var curveMonotoneX: CurveFactory; * “a smooth curve with continuous first-order derivatives that passes through any given set of data points without spurious oscillations. * Local extrema can occur only at grid points where they are given by the data, but not in between two adjacent grid points.” */ -export var curveMonotoneY: CurveFactory; +export const curveMonotoneY: CurveFactory; /** * A curve factory for natural cubic spline generators. * * The curve generators produce a natural cubic spline with the second derivative of the spline set to zero at the endpoints. */ -export var curveNatural: CurveFactory; +export const curveNatural: CurveFactory; /** * A curve factory for step function (midpoint) generators. @@ -1850,7 +1846,7 @@ export var curveNatural: CurveFactory; * The curve generators produce a piecewise constant function (a step function) consisting of alternating horizontal and vertical lines. * The y-value changes at the midpoint of each pair of adjacent x-values. */ -export var curveStep: CurveFactory; +export const curveStep: CurveFactory; /** * A curve factory for step function (after) generators. @@ -1858,7 +1854,7 @@ export var curveStep: CurveFactory; * The curve generators produce a piecewise constant function (a step function) consisting of alternating horizontal and vertical lines. * The y-value changes after the x-value. */ -export var curveStepAfter: CurveFactory; +export const curveStepAfter: CurveFactory; /** * A curve factory for step function (before) generators. @@ -1866,8 +1862,7 @@ export var curveStepAfter: CurveFactory; * The curve generators produce a piecewise constant function (a step function) consisting of alternating horizontal and vertical lines. * The y-value changes before the x-value. */ -export var curveStepBefore: CurveFactory; - +export const curveStepBefore: CurveFactory; // ----------------------------------------------------------------------------------- // SYMBOLS @@ -1990,7 +1985,6 @@ export interface Symbol { * @param context null, to remove rendering context. */ context(context: null): this; - } /** @@ -2017,43 +2011,42 @@ export function symbol(): Symbol; * An array containing the set of all built-in symbol types: circle, cross, diamond, square, star, triangle, and wye. * Useful for constructing the range of an ordinal scale should you wish to use a shape encoding for categorical data. */ -export var symbols: SymbolType[]; +export const symbols: SymbolType[]; /** * The circle symbol type. */ -export var symbolCircle: SymbolType; +export const symbolCircle: SymbolType; /** * The Greek cross symbol type, with arms of equal length. */ -export var symbolCross: SymbolType; +export const symbolCross: SymbolType; /** * The rhombus symbol type. */ -export var symbolDiamond: SymbolType; +export const symbolDiamond: SymbolType; /** * The square symbol type. */ -export var symbolSquare: SymbolType; +export const symbolSquare: SymbolType; /** * The pentagonal star (pentagram) symbol type. */ -export var symbolStar: SymbolType; +export const symbolStar: SymbolType; /** * he up-pointing triangle symbol type. */ -export var symbolTriangle: SymbolType; +export const symbolTriangle: SymbolType; /** * The Y-shape symbol type. */ -export var symbolWye: SymbolType; - +export const symbolWye: SymbolType; // ----------------------------------------------------------------------------------- // STACKS @@ -2221,7 +2214,6 @@ export interface Stack { * The offset function is then responsible for updating the lower and upper values in the series array to layout the stack. */ offset(offset: (series: Series, order: number[]) => void): this; - } /** diff --git a/d3-shape/tsconfig.json b/types/d3-shape/tsconfig.json similarity index 100% rename from d3-shape/tsconfig.json rename to types/d3-shape/tsconfig.json diff --git a/d3-shape/tslint.json b/types/d3-shape/tslint.json similarity index 100% rename from d3-shape/tslint.json rename to types/d3-shape/tslint.json diff --git a/d3-time-format/d3-time-format-tests.ts b/types/d3-time-format/d3-time-format-tests.ts similarity index 100% rename from d3-time-format/d3-time-format-tests.ts rename to types/d3-time-format/d3-time-format-tests.ts diff --git a/d3-time-format/index.d.ts b/types/d3-time-format/index.d.ts similarity index 100% rename from d3-time-format/index.d.ts rename to types/d3-time-format/index.d.ts diff --git a/d3-time-format/tsconfig.json b/types/d3-time-format/tsconfig.json similarity index 100% rename from d3-time-format/tsconfig.json rename to types/d3-time-format/tsconfig.json diff --git a/d3-time/d3-time-tests.ts b/types/d3-time/d3-time-tests.ts similarity index 100% rename from d3-time/d3-time-tests.ts rename to types/d3-time/d3-time-tests.ts diff --git a/d3-time/index.d.ts b/types/d3-time/index.d.ts similarity index 100% rename from d3-time/index.d.ts rename to types/d3-time/index.d.ts diff --git a/d3-time/tsconfig.json b/types/d3-time/tsconfig.json similarity index 100% rename from d3-time/tsconfig.json rename to types/d3-time/tsconfig.json diff --git a/d3-timer/d3-timer-tests.ts b/types/d3-timer/d3-timer-tests.ts similarity index 100% rename from d3-timer/d3-timer-tests.ts rename to types/d3-timer/d3-timer-tests.ts diff --git a/d3-timer/index.d.ts b/types/d3-timer/index.d.ts similarity index 100% rename from d3-timer/index.d.ts rename to types/d3-timer/index.d.ts diff --git a/d3-timer/tsconfig.json b/types/d3-timer/tsconfig.json similarity index 100% rename from d3-timer/tsconfig.json rename to types/d3-timer/tsconfig.json diff --git a/d3-tip/d3-tip-tests.ts b/types/d3-tip/d3-tip-tests.ts similarity index 100% rename from d3-tip/d3-tip-tests.ts rename to types/d3-tip/d3-tip-tests.ts diff --git a/d3-tip/index.d.ts b/types/d3-tip/index.d.ts similarity index 100% rename from d3-tip/index.d.ts rename to types/d3-tip/index.d.ts diff --git a/d3-tip/tsconfig.json b/types/d3-tip/tsconfig.json similarity index 100% rename from d3-tip/tsconfig.json rename to types/d3-tip/tsconfig.json diff --git a/d3-transition/d3-transition-tests.ts b/types/d3-transition/d3-transition-tests.ts similarity index 99% rename from d3-transition/d3-transition-tests.ts rename to types/d3-transition/d3-transition-tests.ts index c2917aaf94..ba0ae99750 100644 --- a/d3-transition/d3-transition-tests.ts +++ b/types/d3-transition/d3-transition-tests.ts @@ -122,7 +122,6 @@ const enterCircles = circles .style('stroke', d => d.color) .style('fill', d => d.color); - const exitCircles = circles.exit(); // Note: need to re-type datum type, as the exit selection elements have the 'old data' // -------------------------------------------------------------------------- @@ -166,7 +165,6 @@ const duration: number = enterTransition.duration(); enterTransition = enterTransition.delay(500); // settable and chainable const delay: number = enterTransition.delay(); - // ease() --------------------------------------------------------------- let easingFn: (normalizedTime: number) => number; @@ -207,8 +205,6 @@ firstDivTransition = bodyTransition.select(function(d, i, g) { return this.querySelector('div')!; // 'this' type is HTMLElement, return type is HTMLDivElement }); - - // selectAll() --------------------------------------------------------------- // assume paragraphs were previously selected and their data were set to ParagraphDatum type @@ -323,7 +319,6 @@ select('body') .transition().duration(100) .text(d => d.test); // selection datum type - // test, when it is not certain, whether an element of the type to be selected exists let maybeG1: d3Transition.Transition; @@ -343,7 +338,6 @@ maybeG1 = selectAll('svg') } else { return null; } - }); // Tweening Function Use ===================================================== @@ -366,7 +360,6 @@ exitTransition = exitTransition.styleTween('fill', function(d, i, group) { let tweenFnAccessor: undefined | ((this: SVGCircleElement, datum?: CircleDatum, i?: number, group?: SVGCircleElement[] | ArrayLike) => ((t: number) => void)); - // chainable updateTransition = updateTransition.tween('fillColor', null); // remove named tween @@ -407,7 +400,6 @@ exitTransition.remove(); let listener: undefined | ((this: SVGCircleElement, datum: CircleDatum, index: number, group: SVGCircleElement[] | ArrayLike) => void); - enterTransition = enterTransition.on('end', function(d, i, g) { const that: SVGCircleElement = this; // const that2: HTMLElement = this; // fails, type mismatch @@ -433,7 +425,6 @@ enterTransition = enterTransition.on('end', null); // check chaining return type // Test Control Flow // -------------------------------------------------------------------------- - // each() ------------------------------------------------------------------------------- // each(valueFn: (this: GElement, datum?: Datum, index?: number, group?: Array | ArrayLike) => void): Transition; @@ -524,7 +515,3 @@ updateTransitionActive = d3Transition.active { + interface Selection { /** * Interrupts the active transition of the specified name on the selected elements, and cancels any pending transitions with the specified name, if any. * If a name is not specified, null is used. @@ -88,7 +88,6 @@ export function interrupt(node: BaseType, name?: string): void; * The fourth generic "PDatum" refers to the type of the datum of the parent element(s) in the Transition. */ export interface Transition { - // Sub-selection ------------------------- /** diff --git a/d3-transition/tsconfig.json b/types/d3-transition/tsconfig.json similarity index 100% rename from d3-transition/tsconfig.json rename to types/d3-transition/tsconfig.json diff --git a/d3-transition/tslint.json b/types/d3-transition/tslint.json similarity index 100% rename from d3-transition/tslint.json rename to types/d3-transition/tslint.json diff --git a/d3-voronoi/d3-voronoi-tests.ts b/types/d3-voronoi/d3-voronoi-tests.ts similarity index 100% rename from d3-voronoi/d3-voronoi-tests.ts rename to types/d3-voronoi/d3-voronoi-tests.ts diff --git a/d3-voronoi/index.d.ts b/types/d3-voronoi/index.d.ts similarity index 100% rename from d3-voronoi/index.d.ts rename to types/d3-voronoi/index.d.ts diff --git a/d3-voronoi/tsconfig.json b/types/d3-voronoi/tsconfig.json similarity index 100% rename from d3-voronoi/tsconfig.json rename to types/d3-voronoi/tsconfig.json diff --git a/d3-zoom/d3-zoom-tests.ts b/types/d3-zoom/d3-zoom-tests.ts similarity index 99% rename from d3-zoom/d3-zoom-tests.ts rename to types/d3-zoom/d3-zoom-tests.ts index f4a1c0944e..b583bfc8b6 100644 --- a/d3-zoom/d3-zoom-tests.ts +++ b/types/d3-zoom/d3-zoom-tests.ts @@ -52,7 +52,6 @@ function drawPointOnCanvas(radius: number) { }; } - // SVG Prep ------------------------------------------------------------------- interface SVGDatum { @@ -66,7 +65,6 @@ const svg = select('svg') .attr('width', d => d.width) .attr('height', d => d.height); - const g = svg.append('g'); g.selectAll() @@ -85,7 +83,6 @@ interface GroupDatum { toK: number; } - // -------------------------------------------------------------------------- // Test Define ZoomBehaviour // -------------------------------------------------------------------------- @@ -93,7 +90,6 @@ interface GroupDatum { // Canvas Example ----------------------------------------------------------- function zoomedCanvas(this: HTMLCanvasElement, d: CanvasDatum) { - // Cast d3 event to D3ZoomEvent to be used in zoom event handler const e = > event; if (context) { @@ -115,7 +111,6 @@ canvasZoom = d3Zoom.zoom() // SVG Example -------------------------------------------------------------- function zoomedSVGOverlay(this: SVGRectElement) { - // Cast d3 event to D3ZoomEvent to be used in zoom event handler const e = > event; @@ -126,7 +121,6 @@ let svgZoom: d3Zoom.ZoomBehavior; svgZoom = d3Zoom.zoom(); - // filter() ---------------------------------------------------------------- // chainable @@ -141,7 +135,6 @@ svgZoom = svgZoom.filter(function(d, i, group) { let filterFn: (this: SVGRectElement, d: SVGDatum, index: number, group: SVGRectElement[]) => boolean; filterFn = svgZoom.filter(); - // extent() --------------------------------------------------------------- let extentAccessor: (this: SVGRectElement, d: SVGDatum, index: number, group: SVGRectElement[]) => [[number, number], [number, number]]; @@ -172,7 +165,6 @@ svgZoom = svgZoom.translateExtent([[-500, -500], [500, 500]]); let translateExtent: [[number, number], [number, number]]; translateExtent = svgZoom.translateExtent(); - // duration() -------------------------------------------------------------- // chainable @@ -187,7 +179,6 @@ svgZoom = svgZoom.interpolate(interpolateZoom); svgZoom = svgZoom.interpolate(interpolate); svgZoom = svgZoom.interpolate(interpolateArray); - // getter let basicInterpolatorFactory: (a: ZoomView, b: ZoomView) => ((t: number) => ZoomView); @@ -220,7 +211,6 @@ if (zoomHandler) { // Test Attach ZoomBehaviour // -------------------------------------------------------------------------- - // Canvas Example ----------------------------------------------------------- // attach the zoom behavior to the canvas element diff --git a/d3-zoom/index.d.ts b/types/d3-zoom/index.d.ts similarity index 99% rename from d3-zoom/index.d.ts rename to types/d3-zoom/index.d.ts index 87a55e9b2a..904f7b8e62 100644 --- a/d3-zoom/index.d.ts +++ b/types/d3-zoom/index.d.ts @@ -8,7 +8,6 @@ import { ArrayLike, Selection, TransitionLike, ValueFn } from 'd3-selection'; import { ZoomView, ZoomInterpolator } from 'd3-interpolate'; - // -------------------------------------------------------------------------- // Shared Type Definitions and Interfaces // -------------------------------------------------------------------------- diff --git a/d3-zoom/tsconfig.json b/types/d3-zoom/tsconfig.json similarity index 100% rename from d3-zoom/tsconfig.json rename to types/d3-zoom/tsconfig.json diff --git a/d3-zoom/tslint.json b/types/d3-zoom/tslint.json similarity index 100% rename from d3-zoom/tslint.json rename to types/d3-zoom/tslint.json diff --git a/d3.cloud.layout/d3.cloud.layout-tests.ts b/types/d3.cloud.layout/d3.cloud.layout-tests.ts similarity index 100% rename from d3.cloud.layout/d3.cloud.layout-tests.ts rename to types/d3.cloud.layout/d3.cloud.layout-tests.ts diff --git a/d3.cloud.layout/index.d.ts b/types/d3.cloud.layout/index.d.ts similarity index 100% rename from d3.cloud.layout/index.d.ts rename to types/d3.cloud.layout/index.d.ts diff --git a/d3.cloud.layout/tsconfig.json b/types/d3.cloud.layout/tsconfig.json similarity index 100% rename from d3.cloud.layout/tsconfig.json rename to types/d3.cloud.layout/tsconfig.json diff --git a/d3.slider/d3.slider-tests.ts b/types/d3.slider/d3.slider-tests.ts similarity index 100% rename from d3.slider/d3.slider-tests.ts rename to types/d3.slider/d3.slider-tests.ts diff --git a/d3.slider/index.d.ts b/types/d3.slider/index.d.ts similarity index 100% rename from d3.slider/index.d.ts rename to types/d3.slider/index.d.ts diff --git a/d3.slider/tsconfig.json b/types/d3.slider/tsconfig.json similarity index 100% rename from d3.slider/tsconfig.json rename to types/d3.slider/tsconfig.json diff --git a/d3/d3-tests.ts b/types/d3/d3-tests.ts similarity index 99% rename from d3/d3-tests.ts rename to types/d3/d3-tests.ts index ca4932d27c..1efb46be8e 100644 --- a/d3/d3-tests.ts +++ b/types/d3/d3-tests.ts @@ -1,6 +1,5 @@ import * as d3 from 'd3'; - // TODO: complete tests. Note the tests here should be limited to // testing existence of re-exported members of the // constituent modules comprising the D3 version 4 standard bundle @@ -8,5 +7,3 @@ import * as d3 from 'd3'; // Ability to access d3-select related properties const d: d3.Selection = d3.selection(); - - diff --git a/d3/index.d.ts b/types/d3/index.d.ts similarity index 100% rename from d3/index.d.ts rename to types/d3/index.d.ts diff --git a/d3/tsconfig.json b/types/d3/tsconfig.json similarity index 100% rename from d3/tsconfig.json rename to types/d3/tsconfig.json diff --git a/d3/tslint.json b/types/d3/tslint.json similarity index 100% rename from d3/tslint.json rename to types/d3/tslint.json diff --git a/d3/v3/d3-tests.ts b/types/d3/v3/d3-tests.ts similarity index 100% rename from d3/v3/d3-tests.ts rename to types/d3/v3/d3-tests.ts diff --git a/d3/v3/index.d.ts b/types/d3/v3/index.d.ts similarity index 100% rename from d3/v3/index.d.ts rename to types/d3/v3/index.d.ts diff --git a/d3/v3/tsconfig.json b/types/d3/v3/tsconfig.json similarity index 100% rename from d3/v3/tsconfig.json rename to types/d3/v3/tsconfig.json diff --git a/d3kit/d3kit-tests.ts b/types/d3kit/d3kit-tests.ts similarity index 100% rename from d3kit/d3kit-tests.ts rename to types/d3kit/d3kit-tests.ts diff --git a/d3kit/index.d.ts b/types/d3kit/index.d.ts similarity index 100% rename from d3kit/index.d.ts rename to types/d3kit/index.d.ts diff --git a/d3kit/tsconfig.json b/types/d3kit/tsconfig.json similarity index 100% rename from d3kit/tsconfig.json rename to types/d3kit/tsconfig.json diff --git a/d3kit/v1/d3kit-tests.ts b/types/d3kit/v1/d3kit-tests.ts similarity index 100% rename from d3kit/v1/d3kit-tests.ts rename to types/d3kit/v1/d3kit-tests.ts diff --git a/d3kit/v1/index.d.ts b/types/d3kit/v1/index.d.ts similarity index 100% rename from d3kit/v1/index.d.ts rename to types/d3kit/v1/index.d.ts diff --git a/d3kit/v1/tsconfig.json b/types/d3kit/v1/tsconfig.json similarity index 100% rename from d3kit/v1/tsconfig.json rename to types/d3kit/v1/tsconfig.json diff --git a/d3pie/d3pie-tests.ts b/types/d3pie/d3pie-tests.ts similarity index 100% rename from d3pie/d3pie-tests.ts rename to types/d3pie/d3pie-tests.ts diff --git a/d3pie/index.d.ts b/types/d3pie/index.d.ts similarity index 100% rename from d3pie/index.d.ts rename to types/d3pie/index.d.ts diff --git a/d3pie/tsconfig.json b/types/d3pie/tsconfig.json similarity index 100% rename from d3pie/tsconfig.json rename to types/d3pie/tsconfig.json diff --git a/dagre-d3/dagre-d3-tests.ts b/types/dagre-d3/dagre-d3-tests.ts similarity index 99% rename from dagre-d3/dagre-d3-tests.ts rename to types/dagre-d3/dagre-d3-tests.ts index 2b1a958ef7..16bfb29b0c 100644 --- a/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/dagre-d3/index.d.ts b/types/dagre-d3/index.d.ts similarity index 100% rename from dagre-d3/index.d.ts rename to types/dagre-d3/index.d.ts diff --git a/dagre-d3/tsconfig.json b/types/dagre-d3/tsconfig.json similarity index 100% rename from dagre-d3/tsconfig.json rename to types/dagre-d3/tsconfig.json diff --git a/dagre-d3/tslint.json b/types/dagre-d3/tslint.json similarity index 100% rename from dagre-d3/tslint.json rename to types/dagre-d3/tslint.json diff --git a/dagre/dagre-tests.ts b/types/dagre/dagre-tests.ts similarity index 100% rename from dagre/dagre-tests.ts rename to types/dagre/dagre-tests.ts diff --git a/dagre/index.d.ts b/types/dagre/index.d.ts similarity index 100% rename from dagre/index.d.ts rename to types/dagre/index.d.ts diff --git a/dagre/tsconfig.json b/types/dagre/tsconfig.json similarity index 100% rename from dagre/tsconfig.json rename to types/dagre/tsconfig.json diff --git a/dagre/tslint.json b/types/dagre/tslint.json similarity index 100% rename from dagre/tslint.json rename to types/dagre/tslint.json diff --git a/dat-gui/dat-gui-tests.ts b/types/dat-gui/dat-gui-tests.ts similarity index 100% rename from dat-gui/dat-gui-tests.ts rename to types/dat-gui/dat-gui-tests.ts diff --git a/dat-gui/index.d.ts b/types/dat-gui/index.d.ts similarity index 100% rename from dat-gui/index.d.ts rename to types/dat-gui/index.d.ts diff --git a/dat-gui/tsconfig.json b/types/dat-gui/tsconfig.json similarity index 100% rename from dat-gui/tsconfig.json rename to types/dat-gui/tsconfig.json diff --git a/data-driven/data-driven-tests.ts b/types/data-driven/data-driven-tests.ts similarity index 100% rename from data-driven/data-driven-tests.ts rename to types/data-driven/data-driven-tests.ts diff --git a/data-driven/index.d.ts b/types/data-driven/index.d.ts similarity index 100% rename from data-driven/index.d.ts rename to types/data-driven/index.d.ts diff --git a/data-driven/tsconfig.json b/types/data-driven/tsconfig.json similarity index 100% rename from data-driven/tsconfig.json rename to types/data-driven/tsconfig.json diff --git a/datatables.net-buttons/datatables.net-buttons-tests.ts b/types/datatables.net-buttons/datatables.net-buttons-tests.ts similarity index 96% rename from datatables.net-buttons/datatables.net-buttons-tests.ts rename to types/datatables.net-buttons/datatables.net-buttons-tests.ts index 6acbbeaf8a..015917c456 100644 --- a/datatables.net-buttons/datatables.net-buttons-tests.ts +++ b/types/datatables.net-buttons/datatables.net-buttons-tests.ts @@ -22,6 +22,7 @@ $(document).ready(function () { name: 'name', namespace: 'namespace', titleAttr: 'title', + title: 'title' } ], } diff --git a/datatables.net-buttons/index.d.ts b/types/datatables.net-buttons/index.d.ts similarity index 85% rename from datatables.net-buttons/index.d.ts rename to types/datatables.net-buttons/index.d.ts index b4ed4b0eb5..ba4aa75654 100644 --- a/datatables.net-buttons/index.d.ts +++ b/types/datatables.net-buttons/index.d.ts @@ -1,6 +1,6 @@ // Type definitions for JQuery DataTables Buttons extension 1.1.0 // Project: http://datatables.net/extensions/buttons/ -// Definitions by: Sam Germano +// Definitions by: Sam Germano , Jim Hartford // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// @@ -80,13 +80,18 @@ declare namespace DataTables { */ titleAttr?: string; + /** + * Button 'title' text + */ + title?: string; + exportOptions?: ButtonExportOptions; autoPrint?: boolean; customize?: FunctionButtonCustomize; } export interface FunctionButtonAvailable { - (dt: DataTables.DataTable, config: any): boolean + (dt: DataTables.Api, config: any): boolean } export interface ButtonExportOptions { columns?: string; @@ -101,14 +106,14 @@ declare namespace DataTables { } export interface ButtonText { - (dt: DataTables.DataTable, node: JQuery, config: any): string + (dt: DataTables.Api, node: JQuery, config: any): string } export interface FunctionButtonInit { - (dt: DataTables.DataTable, node: JQuery, config: any): void + (dt: DataTables.Api, node: JQuery, config: any): void } // api object? export interface FunctionButtonAction { - (e: any, dt: DataTables.DataTable, node: JQuery, config: any): void + (e: any, dt: DataTables.Api, node: JQuery, config: any): void } export interface FunctionButtonCustomize { diff --git a/datatables.net-buttons/tsconfig.json b/types/datatables.net-buttons/tsconfig.json similarity index 100% rename from datatables.net-buttons/tsconfig.json rename to types/datatables.net-buttons/tsconfig.json diff --git a/datatables.net-fixedheader/datatables.net-fixedheader-tests.ts b/types/datatables.net-fixedheader/datatables.net-fixedheader-tests.ts similarity index 83% rename from datatables.net-fixedheader/datatables.net-fixedheader-tests.ts rename to types/datatables.net-fixedheader/datatables.net-fixedheader-tests.ts index 561b968ba9..72d8665838 100644 --- a/datatables.net-fixedheader/datatables.net-fixedheader-tests.ts +++ b/types/datatables.net-fixedheader/datatables.net-fixedheader-tests.ts @@ -1,5 +1,5 @@ $(document).ready(() => { - var config: DataTables.Settings = { + const config: DataTables.Settings = { // FixedHeader extension options fixedHeader: { footer: true, diff --git a/datatables.net-fixedheader/index.d.ts b/types/datatables.net-fixedheader/index.d.ts similarity index 96% rename from datatables.net-fixedheader/index.d.ts rename to types/datatables.net-fixedheader/index.d.ts index caf3987d35..cb0b363b65 100644 --- a/datatables.net-fixedheader/index.d.ts +++ b/types/datatables.net-fixedheader/index.d.ts @@ -6,7 +6,7 @@ /// declare namespace DataTables { - export interface Settings { + interface Settings { /* * FixedHeader extension options */ diff --git a/datatables.net-fixedheader/tsconfig.json b/types/datatables.net-fixedheader/tsconfig.json similarity index 100% rename from datatables.net-fixedheader/tsconfig.json rename to types/datatables.net-fixedheader/tsconfig.json diff --git a/datatables.net-fixedheader/tslint.json b/types/datatables.net-fixedheader/tslint.json similarity index 100% rename from datatables.net-fixedheader/tslint.json rename to types/datatables.net-fixedheader/tslint.json diff --git a/datatables.net-select/datatables.net-select-tests.ts b/types/datatables.net-select/datatables.net-select-tests.ts similarity index 86% rename from datatables.net-select/datatables.net-select-tests.ts rename to types/datatables.net-select/datatables.net-select-tests.ts index 5d8fdd8dc6..9b7eb24c2a 100644 --- a/datatables.net-select/datatables.net-select-tests.ts +++ b/types/datatables.net-select/datatables.net-select-tests.ts @@ -1,5 +1,5 @@ $(document).ready(() => { - var config: DataTables.Settings = { + const config: DataTables.Settings = { // Select extension options select: { blurable: true, diff --git a/datatables.net-select/index.d.ts b/types/datatables.net-select/index.d.ts similarity index 97% rename from datatables.net-select/index.d.ts rename to types/datatables.net-select/index.d.ts index 96529a10c1..201d00ba27 100644 --- a/datatables.net-select/index.d.ts +++ b/types/datatables.net-select/index.d.ts @@ -6,7 +6,7 @@ /// declare namespace DataTables { - export interface Settings { + interface Settings { /* * Select extension options */ diff --git a/datatables.net-select/tsconfig.json b/types/datatables.net-select/tsconfig.json similarity index 100% rename from datatables.net-select/tsconfig.json rename to types/datatables.net-select/tsconfig.json diff --git a/datatables.net-select/tslint.json b/types/datatables.net-select/tslint.json similarity index 100% rename from datatables.net-select/tslint.json rename to types/datatables.net-select/tslint.json diff --git a/datatables.net/datatables.net-tests.ts b/types/datatables.net/datatables.net-tests.ts similarity index 98% rename from datatables.net/datatables.net-tests.ts rename to types/datatables.net/datatables.net-tests.ts index c4a8fcaf3e..838ca9131c 100644 --- a/datatables.net/datatables.net-tests.ts +++ b/types/datatables.net/datatables.net-tests.ts @@ -321,7 +321,7 @@ $(document).ready(function () { destroy = dt.destroy(true); destroy.$(""); - var draw: DataTables.DataTable = dt.draw(); + var draw: DataTables.Api = dt.draw(); draw = dt.draw(true); draw = dt.draw("page"); draw.$(""); @@ -787,8 +787,8 @@ $(document).ready(function () { var rows_13 = dt.rows.add([{}, {}]); dt.rows().every(function () { }); dt.rows().every(function (rowIdx, tableLoop, rowLoop) { }); - var rows_14: DataTables.DataTable = dt.rows("selector").ids(); - var rows_15: DataTables.DataTable = dt.rows("selector").ids(false); + var rows_14: DataTables.Api = dt.rows("selector").ids(); + var rows_15: DataTables.Api = dt.rows("selector").ids(false); var table3 = $('#example').DataTable(); table3.row.add({ @@ -909,11 +909,11 @@ $(document).ready(function () { var staticFn: DataTables.StaticFunctions; // With boolean parameter type, always returns DataTables.DataTable[]. - var static_1: DataTables.DataTable[] = staticFn.tables(true); + var static_1: DataTables.Api[] = staticFn.tables(true); // With object parameter type, returns DataTables.DataTable[] when "api" property is false. - static_1 = staticFn.tables({ "visible": true, "api": false }); + static_1 = staticFn.tables({ "visible": true, "api": false }); // With object parameter type, returns DataTables.DataTable when "api" property is true. - var static_2: DataTables.DataTable = staticFn.tables({ "visible": true, "api": true }); + var static_2: DataTables.Api = staticFn.tables({ "visible": true, "api": true }); //#endregion "Methods-Static" diff --git a/datatables.net/index.d.ts b/types/datatables.net/index.d.ts similarity index 93% rename from datatables.net/index.d.ts rename to types/datatables.net/index.d.ts index 2640dbabe6..c0aaf9cc6c 100644 --- a/datatables.net/index.d.ts +++ b/types/datatables.net/index.d.ts @@ -11,7 +11,7 @@ /// interface JQuery { - DataTable(param?: DataTables.Settings): DataTables.DataTable; + DataTable(opts?: DataTables.Settings): DataTables.Api; } //TODO: Wrong, as jquery.d.ts has no interface for fn @@ -20,11 +20,11 @@ interface JQuery { //} declare namespace DataTables { - export interface DataTable extends DataTableCore { + export interface Api extends CoreMethods { /** * Get the data for the whole table. */ - data(): DataTable; + data(): Api; /** * Order Methods / Object @@ -127,8 +127,8 @@ declare namespace DataTables { //#endregion "Table/Tables" } - export interface DataTables extends DataTableCore { - [index: number]: DataTable; + export interface DataTables extends CoreMethods { + [index: number]: Api; } interface ObjectSelectorModifier { @@ -155,7 +155,7 @@ declare namespace DataTables { //#region "core-methods" - interface DataTableCore extends UtilityMethods { + interface CoreMethods extends UtilityMethods { /** * Get jquery object */ @@ -172,21 +172,21 @@ declare namespace DataTables { /** * Clear the table of all data. */ - clear(): DataTable; + clear(): Api; /** * Destroy the DataTables in the current context. * * @param remove Completely remove the table from the DOM (true) or leave it in the DOM in its original plain un-enhanced HTML state (default, false). */ - destroy(remove?: boolean): DataTable; + destroy(remove?: boolean): Api; /** * Redraw the DataTables in the current context, optionally updating ordering, searching and paging as required. * * @param paging This parameter is used to determine what kind of draw DataTables will perform. */ - draw(paging?: boolean | string): DataTable; + draw(paging?: boolean | string): Api; /* * Look up a language token that was defined in the DataTables' language initialisation object. @@ -210,7 +210,7 @@ declare namespace DataTables { * @param event Event name to remove. * @param callback Specific callback function to remove if you want to unbind a single event listener. */ - off(event: string, callback?: Function): DataTable; + off(event: string, callback?: Function): Api; /** * Table events listener. @@ -218,7 +218,7 @@ declare namespace DataTables { * @param event Event to listen for. * @param callback Specific callback function to remove if you want to unbind a single event listener. */ - on(event: string, callback: Function): DataTable; + on(event: string, callback: Function): Api; /** * Listen for a table event once and then remove the listener. @@ -226,7 +226,7 @@ declare namespace DataTables { * @param event Event to listen for. * @param callback Specific callback function to remove if you want to unbind a single event listener. */ - one(event: string, callback: Function): DataTable; + one(event: string, callback: Function): Api; /** * Page Methods / Object @@ -246,12 +246,12 @@ declare namespace DataTables { * @param smart Perform smart search. * @param caseInsen Do case-insensitive matching (default, true) or not (false). */ - search(input: string, regex?: boolean, smart?: boolean, caseInsen?: boolean): DataTable; + search(input: string, regex?: boolean, smart?: boolean, caseInsen?: boolean): Api; /** * Obtain the table's settings object */ - settings(): DataTable; + settings(): Api; /** * Page Methods / Object @@ -261,14 +261,14 @@ declare namespace DataTables { //#region "ajax-methods" - interface AjaxMethods extends DataTable { + interface AjaxMethods extends Api { /** * Reload the table data from the Ajax data source. * * @param callback Function which is executed when the data as been reloaded and the table fully redrawn. * @param resetPaging Reset (default action or true) or hold the current paging position (false). */ - load(callback?: Function, resetPaging?: boolean): DataTable; + load(callback?: Function, resetPaging?: boolean): Api; } interface AjaxMethodModel { @@ -288,7 +288,7 @@ declare namespace DataTables { * @param callback Function which is executed when the data as been reloaded and the table fully redrawn. * @param resetPaging Reset (default action or true) or hold the current paging position (false). */ - reload(callback?: Function, resetPaging?: boolean): DataTable; + reload(callback?: Function, resetPaging?: boolean): Api; /** * Reload the table data from the Ajax data source @@ -318,9 +318,9 @@ declare namespace DataTables { * * @param order Order Model */ - (order?: (string | number)[]): DataTable; - (order?: (string | number)[][]): DataTable; - (order: (string | number)[], ...args: any[]): DataTable; + (order?: (string | number)[]): Api; + (order?: (string | number)[][]): Api; + (order: (string | number)[], ...args: any[]): Api; /** * Add an ordering listener to an element, for a given column. @@ -329,7 +329,7 @@ declare namespace DataTables { * @param column Column index * @param callback Callback function */ - listener(node: string | Node | JQuery, column: number, callback: Function): DataTable; + listener(node: string | Node | JQuery, column: number, callback: Function): Api; } //#endregion "order-methods" @@ -346,7 +346,7 @@ declare namespace DataTables { * * @param page Index or 'first', 'next', 'previous', 'last' */ - (page: number | string): DataTable; + (page: number | string): Api; /** * Get paging information about the table @@ -363,7 +363,7 @@ declare namespace DataTables { * * @param length Page length to set. use -1 to show all records. */ - len(length: number): DataTable; + len(length: number): Api; } interface PageMethodeModelInfoReturn { @@ -390,7 +390,7 @@ declare namespace DataTables { /** * Clear the saved state of the table. */ - clear(): DataTable; + clear(): Api; /** * Get the table state that was loaded during initialisation. @@ -400,7 +400,7 @@ declare namespace DataTables { /** * Trigger a state save. */ - save(): DataTable; + save(): Api; } interface StateReturnModel { @@ -435,7 +435,7 @@ declare namespace DataTables { * @param a API instance to concatenate to the initial instance. * @param b Additional API instance(s) to concatenate to the initial instance. */ - concat(a: Object, ...b: Object[]): DataTable; + concat(a: Object, ...b: Object[]): Api; /** * Get the number of entries in an API instance's result set, regardless of multi-table grouping (e.g. any data, selected rows, etc). Since: 1.10.8 @@ -447,26 +447,26 @@ declare namespace DataTables { * * @param fn Callback function which is called for each item in the API instance result set. The callback is called with three parameters */ - each(fn: Function): DataTable; + each(fn: Function): Api; /** * Reduce an Api instance to a single context and result set. * * @param idx Index to select */ - eq(idx: number): DataTable; + eq(idx: number): Api; /** * Iterate over the result set of an API instance and test each item, creating a new instance from those items which pass. * * @param fn Callback function which is called for each item in the API instance result set. The callback is called with three parameters. */ - filter(fn: Function): DataTable; + filter(fn: Function): Api; /** * Flatten a 2D array structured API instance to a 1D array structure. */ - flatten(): DataTable; + flatten(): Api; /** * Find the first instance of a value in the API instance's result set. @@ -499,14 +499,14 @@ declare namespace DataTables { * * @param fn Callback function which is called for each item in the API instance result set. The callback is called with three parameters. */ - map(fn: Function): DataTable; + map(fn: Function): Api; /** * Iterate over the result set of an API instance, creating a new API instance from the values retrieved from the original elements. * * @param property Object property name to use from the element in the original result set for the new result set. */ - pluck(property: number | string): DataTable; + pluck(property: number | string): Api; /** * Remove the last item from an API instance's result set. @@ -539,7 +539,7 @@ declare namespace DataTables { /** * Reverse the result set of the API instance and return the original array. */ - reverse(): DataTable; + reverse(): Api; /** * Remove the first item from an API instance's result set. @@ -551,7 +551,7 @@ declare namespace DataTables { * * @param fn This is a standard Javascript sort comparison function. It accepts two parameters. */ - sort(fn?: Function): DataTable; + sort(fn?: Function): Api; /** * Modify the contents of an Api instance's result set, adding or removing items from it as required. @@ -580,7 +580,7 @@ declare namespace DataTables { /** * Create a new API instance containing only the unique items from a the elements in an instance's result set. */ - unique(): DataTable; + unique(): Api; /** * Add one or more items to the start of an API instance's result set. @@ -598,7 +598,7 @@ declare namespace DataTables { * * @param t Specify which cache the data should be read from. Can take one of two values: search or order */ - cache(t: string): DataTable; + cache(t: string): Api; } //#region "cell-methods" @@ -609,7 +609,7 @@ declare namespace DataTables { * * @param source Data source to read the new data from. */ - invalidate(source?: string): DataTable; + invalidate(source?: string): Api; /** * Get data for the selected cell @@ -619,7 +619,7 @@ declare namespace DataTables { render(t: string): any; } - interface CellMethods extends DataTableCore, CommonCellMethods { + interface CellMethods extends CoreMethods, CommonCellMethods { /** * Get data for the selected cell */ @@ -630,7 +630,7 @@ declare namespace DataTables { * * @param data Value to assign to the data for the cell */ - data(data: any): DataTable; + data(data: any): Api; /** * Get index information about the selected cell @@ -649,28 +649,28 @@ declare namespace DataTables { columnVisible: number; } - interface CellsMethods extends DataTableCore, CommonCellMethods { + interface CellsMethods extends CoreMethods, CommonCellMethods { /** * Get data for the selected cells */ - data(): DataTable; + data(): Api; /** * Iterate over each selected cell, with the function context set to be the cell in question. Since: DataTables 1.10.6 * * @param fn Function to execute for every cell selected. */ - every(fn: (cellRowIdx: number, cellColIdx: number, tableLoop: number, cellLoop: number) => void): DataTable; + every(fn: (cellRowIdx: number, cellColIdx: number, tableLoop: number, cellLoop: number) => void): Api; /** * Get index information about the selected cells */ - indexes(): DataTable; + indexes(): Api; /** * Get the DOM elements for the selected cells */ - nodes(): DataTable; + nodes(): Api; } //#endregion "cell-methods" @@ -692,7 +692,7 @@ declare namespace DataTables { * * @param direction Direction of sort to apply to the selected column - desc (descending) or asc (ascending). */ - order(direction: string): DataTable; + order(direction: string): Api; /** * Get the visibility of the selected column. @@ -705,7 +705,7 @@ declare namespace DataTables { * @param show Specify if the column should be visible (true) or not (false). * @param redrawCalculations Indicate if DataTables should recalculate the column layout (true - default) or not (false). Typically this would be left as the default value, but it can be useful to disable when using the method in a loop - so the calculations are performed on every call as they can hamper performance. */ - visible(show: boolean, redrawCalculations?: boolean): DataTable; + visible(show: boolean, redrawCalculations?: boolean): Api; } interface ColumnMethodsModel { @@ -726,11 +726,11 @@ declare namespace DataTables { index(t: string, index: number): number; } - interface ColumnMethods extends DataTableCore, CommonColumnMethod { + interface ColumnMethods extends CoreMethods, CommonColumnMethod { /** * Get the data for the cells in the selected column. */ - data(): DataTable; + data(): Api; /** * Get the data source property for the selected column @@ -742,12 +742,12 @@ declare namespace DataTables { * * @param t Specify if you want to get the column data index (default) or the visible index (visible). */ - index(t?: string): DataTable; + index(t?: string): Api; /** * Obtain the th / td nodes for the selected column */ - nodes(): DataTable[]; + nodes(): Api[]; } interface ColumnsMethodsModel { @@ -769,38 +769,38 @@ declare namespace DataTables { /** * Recalculate the column widths for layout. */ - adjust(): DataTable; + adjust(): Api; } - interface ColumnsMethods extends DataTableCore, CommonColumnMethod { + interface ColumnsMethods extends CoreMethods, CommonColumnMethod { /** * Obtain the data for the columns from the selector */ - data(): DataTable; + data(): Api; /** * Get the data source property for the selected columns. */ - dataSrc(): DataTable; + dataSrc(): Api; /** * Iterate over each selected column, with the function context set to be the column in question. Since: DataTables 1.10.6 * * @param fn Function to execute for every column selected. */ - every(fn: (colIdx: number, tableLoop: number, colLoop: number) => void): DataTable; + every(fn: (colIdx: number, tableLoop: number, colLoop: number) => void): Api; /** * Get the column indexes of the selected columns. * * @param t Specify if you want to get the column data index (default) or the visible index (visible). */ - indexes(t?: string): DataTable; + indexes(t?: string): Api; /** * Obtain the th / td nodes for the selected columns */ - nodes(): DataTable[][]; + nodes(): Api[][]; } //#endregion "column-methods" @@ -812,7 +812,7 @@ declare namespace DataTables { * * @param source Data source to read the new data from. Values: 'auto', 'data', 'dom' */ - invalidate(source?: string): DataTable; + invalidate(source?: string): Api; } interface RowChildMethodModel { @@ -839,39 +839,39 @@ declare namespace DataTables { /** * Hide the child row(s) of a parent row */ - hide(): DataTable; + hide(): Api; /** * Check if the child rows of a parent row are visible */ - isShown(): DataTable; + isShown(): Api; /** * Remove child row(s) from display and release any allocated memory */ - remove(): DataTable; + remove(): Api; /** * Show the child row(s) of a parent row */ - show(): DataTable; + show(): Api; } - interface RowChildMethods extends DataTableCore { + interface RowChildMethods extends CoreMethods { /** * Hide the child row(s) of a parent row */ - hide(): DataTable; + hide(): Api; /** * Remove child row(s) from display and release any allocated memory */ - remove(): DataTable; + remove(): Api; /** * Make newly defined child rows visible */ - show(): DataTable; + show(): Api; } interface RowMethodsModel { @@ -888,10 +888,10 @@ declare namespace DataTables { * * @param data Data to use for the new row. This may be an array, object or Javascript object instance, but must be in the same format as the other data in the table */ - add(data: any[] | Object): DataTable; + add(data: any[] | Object): Api; } - interface RowMethods extends DataTableCore, CommonRowMethod { + interface RowMethods extends CoreMethods, CommonRowMethod { /** * Order Methods / Object */ @@ -907,7 +907,7 @@ declare namespace DataTables { * * @param d Data to use for the row. */ - data(d: any[] | Object): DataTable; + data(d: any[] | Object): Api; /** @@ -956,28 +956,28 @@ declare namespace DataTables { * * @param data Array of data elements, with each one describing a new row to be added to the table */ - add(data: any[]): DataTable; + add(data: any[]): Api; } - interface RowsMethods extends DataTableCore, CommonRowMethod { + interface RowsMethods extends CoreMethods, CommonRowMethod { /** * Get the data for the rows from the selector */ - data(): DataTable; + data(): Api; /** * Set the data for the selected row * * @param d Data to use for the row. */ - data(d: any[] | Object): DataTable; + data(d: any[] | Object): Api; /** * Iterate over each selected row, with the function context set to be the row in question. Since: DataTables 1.10.6 * * @param fn Function to execute for every row selected. */ - every(fn: (rowIdx: number, tableLoop: number, rowLoop: number) => void): DataTable; + every(fn: (rowIdx: number, tableLoop: number, rowLoop: number) => void): Api; /** * Get the ids of the selected rows. Since: 1.10.8 @@ -986,28 +986,28 @@ declare namespace DataTables { * false - Do not modify the id value. * @returns Api instance with the selected rows in its result set. If a row does not have an id available 'undefined' will be returned as the value. */ - ids(hash?: boolean): DataTable; + ids(hash?: boolean): Api; /** * Get the row indexes of the selected rows. */ - indexes(): DataTable; + indexes(): Api; /** * Obtain the tr nodes for the selected rows */ - nodes(): DataTable; + nodes(): Api; /** * Delete the selected rows from the DataTable. */ - remove(): DataTable; + remove(): Api; } //#endregion "row-methods" //#region "table-methods" - interface TableMethods extends DataTableCore { + interface TableMethods extends CoreMethods { /** * Get the tfoot node for the table in the API's context */ @@ -1034,31 +1034,31 @@ declare namespace DataTables { node(): Node; } - interface TablesMethods extends DataTableCore { + interface TablesMethods extends CoreMethods { /** * Get the tfoot nodes for the tables in the API's context */ - footer(): DataTable; + footer(): Api; /** * Get the thead nodes for the tables in the API's context */ - header(): DataTable; + header(): Api; /** * Get the tbody nodes for the tables in the API's context */ - body(): DataTable; + body(): Api; /** * Get the div container nodes for the tables in the API's context */ - containers(): DataTable; + containers(): Api; /** * Get the table nodes for the tables in the API's context */ - nodes(): DataTable; + nodes(): Api; } //#endregion "table-methods" @@ -1080,7 +1080,7 @@ declare namespace DataTables { * @param visible As a boolean value this options is used to indicate if you want all tables on the page should be returned (false), or visible tables only (true). * Since 1.10.8 this option can also be given as an object. */ - tables(visible?: boolean | ObjectTablesStatic): DataTables.DataTable[] | DataTables.DataTable; + tables(visible?: boolean | ObjectTablesStatic): DataTables.Api[] | DataTables.Api; /** * Version number compatibility check function @@ -1099,7 +1099,7 @@ declare namespace DataTables { * * @param table Selector string for table */ - Api(selector: string | Node | Node[] | JQuery): DataTables.DataTable; + Api(selector: string | Node | Node[] | JQuery): DataTables.Api; } export interface StaticUtilFunctions { diff --git a/datatables.net/tsconfig.json b/types/datatables.net/tsconfig.json similarity index 100% rename from datatables.net/tsconfig.json rename to types/datatables.net/tsconfig.json diff --git a/date.format.js/date.format.js-tests.ts b/types/date.format.js/date.format.js-tests.ts similarity index 100% rename from date.format.js/date.format.js-tests.ts rename to types/date.format.js/date.format.js-tests.ts diff --git a/date.format.js/index.d.ts b/types/date.format.js/index.d.ts similarity index 100% rename from date.format.js/index.d.ts rename to types/date.format.js/index.d.ts diff --git a/date.format.js/tsconfig.json b/types/date.format.js/tsconfig.json similarity index 100% rename from date.format.js/tsconfig.json rename to types/date.format.js/tsconfig.json diff --git a/dateformat/dateformat-tests.ts b/types/dateformat/dateformat-tests.ts similarity index 100% rename from dateformat/dateformat-tests.ts rename to types/dateformat/dateformat-tests.ts diff --git a/dateformat/index.d.ts b/types/dateformat/index.d.ts similarity index 100% rename from dateformat/index.d.ts rename to types/dateformat/index.d.ts diff --git a/dateformat/tsconfig.json b/types/dateformat/tsconfig.json similarity index 100% rename from dateformat/tsconfig.json rename to types/dateformat/tsconfig.json diff --git a/datejs/datejs-tests.ts b/types/datejs/datejs-tests.ts similarity index 100% rename from datejs/datejs-tests.ts rename to types/datejs/datejs-tests.ts diff --git a/datejs/index.d.ts b/types/datejs/index.d.ts similarity index 100% rename from datejs/index.d.ts rename to types/datejs/index.d.ts diff --git a/datejs/sugarpak.d.ts b/types/datejs/sugarpak.d.ts similarity index 100% rename from datejs/sugarpak.d.ts rename to types/datejs/sugarpak.d.ts diff --git a/datejs/tsconfig.json b/types/datejs/tsconfig.json similarity index 100% rename from datejs/tsconfig.json rename to types/datejs/tsconfig.json diff --git a/daterangepicker/daterangepicker-tests.ts b/types/daterangepicker/daterangepicker-tests.ts similarity index 100% rename from daterangepicker/daterangepicker-tests.ts rename to types/daterangepicker/daterangepicker-tests.ts diff --git a/daterangepicker/index.d.ts b/types/daterangepicker/index.d.ts similarity index 100% rename from daterangepicker/index.d.ts rename to types/daterangepicker/index.d.ts diff --git a/daterangepicker/package.json b/types/daterangepicker/package.json similarity index 100% rename from daterangepicker/package.json rename to types/daterangepicker/package.json diff --git a/daterangepicker/tsconfig.json b/types/daterangepicker/tsconfig.json similarity index 100% rename from daterangepicker/tsconfig.json rename to types/daterangepicker/tsconfig.json diff --git a/db-migrate-base/db-migrate-base-tests.ts b/types/db-migrate-base/db-migrate-base-tests.ts similarity index 100% rename from db-migrate-base/db-migrate-base-tests.ts rename to types/db-migrate-base/db-migrate-base-tests.ts diff --git a/db-migrate-base/index.d.ts b/types/db-migrate-base/index.d.ts similarity index 100% rename from db-migrate-base/index.d.ts rename to types/db-migrate-base/index.d.ts diff --git a/db-migrate-base/tsconfig.json b/types/db-migrate-base/tsconfig.json similarity index 100% rename from db-migrate-base/tsconfig.json rename to types/db-migrate-base/tsconfig.json diff --git a/db-migrate-pg/db-migrate-pg-tests.ts b/types/db-migrate-pg/db-migrate-pg-tests.ts similarity index 100% rename from db-migrate-pg/db-migrate-pg-tests.ts rename to types/db-migrate-pg/db-migrate-pg-tests.ts diff --git a/db-migrate-pg/index.d.ts b/types/db-migrate-pg/index.d.ts similarity index 100% rename from db-migrate-pg/index.d.ts rename to types/db-migrate-pg/index.d.ts diff --git a/db-migrate-pg/tsconfig.json b/types/db-migrate-pg/tsconfig.json similarity index 100% rename from db-migrate-pg/tsconfig.json rename to types/db-migrate-pg/tsconfig.json diff --git a/db.js/db.js-tests.ts b/types/db.js/db.js-tests.ts similarity index 100% rename from db.js/db.js-tests.ts rename to types/db.js/db.js-tests.ts diff --git a/db.js/index.d.ts b/types/db.js/index.d.ts similarity index 100% rename from db.js/index.d.ts rename to types/db.js/index.d.ts diff --git a/db.js/tsconfig.json b/types/db.js/tsconfig.json similarity index 100% rename from db.js/tsconfig.json rename to types/db.js/tsconfig.json diff --git a/dc/dc-tests.ts b/types/dc/dc-tests.ts similarity index 100% rename from dc/dc-tests.ts rename to types/dc/dc-tests.ts diff --git a/dc/index.d.ts b/types/dc/index.d.ts similarity index 100% rename from dc/index.d.ts rename to types/dc/index.d.ts diff --git a/dc/tsconfig.json b/types/dc/tsconfig.json similarity index 100% rename from dc/tsconfig.json rename to types/dc/tsconfig.json diff --git a/debounce/debounce-tests.ts b/types/debounce/debounce-tests.ts similarity index 100% rename from debounce/debounce-tests.ts rename to types/debounce/debounce-tests.ts diff --git a/debounce/index.d.ts b/types/debounce/index.d.ts similarity index 100% rename from debounce/index.d.ts rename to types/debounce/index.d.ts diff --git a/debounce/tsconfig.json b/types/debounce/tsconfig.json similarity index 100% rename from debounce/tsconfig.json rename to types/debounce/tsconfig.json diff --git a/debug/debug-tests.ts b/types/debug/debug-tests.ts similarity index 100% rename from debug/debug-tests.ts rename to types/debug/debug-tests.ts diff --git a/debug/index.d.ts b/types/debug/index.d.ts similarity index 100% rename from debug/index.d.ts rename to types/debug/index.d.ts diff --git a/debug/tsconfig.json b/types/debug/tsconfig.json similarity index 100% rename from debug/tsconfig.json rename to types/debug/tsconfig.json diff --git a/decamelize/decamelize-tests.ts b/types/decamelize/decamelize-tests.ts similarity index 100% rename from decamelize/decamelize-tests.ts rename to types/decamelize/decamelize-tests.ts diff --git a/decamelize/index.d.ts b/types/decamelize/index.d.ts similarity index 100% rename from decamelize/index.d.ts rename to types/decamelize/index.d.ts diff --git a/decamelize/tsconfig.json b/types/decamelize/tsconfig.json similarity index 100% rename from decamelize/tsconfig.json rename to types/decamelize/tsconfig.json diff --git a/decay/decay-tests.ts b/types/decay/decay-tests.ts similarity index 100% rename from decay/decay-tests.ts rename to types/decay/decay-tests.ts diff --git a/decay/index.d.ts b/types/decay/index.d.ts similarity index 100% rename from decay/index.d.ts rename to types/decay/index.d.ts diff --git a/decay/tsconfig.json b/types/decay/tsconfig.json similarity index 100% rename from decay/tsconfig.json rename to types/decay/tsconfig.json diff --git a/decay/tslint.json b/types/decay/tslint.json similarity index 100% rename from decay/tslint.json rename to types/decay/tslint.json diff --git a/decimal.js/decimal.js-tests.ts b/types/decimal.js/decimal.js-tests.ts similarity index 100% rename from decimal.js/decimal.js-tests.ts rename to types/decimal.js/decimal.js-tests.ts diff --git a/decimal.js/index.d.ts b/types/decimal.js/index.d.ts similarity index 100% rename from decimal.js/index.d.ts rename to types/decimal.js/index.d.ts diff --git a/decimal.js/tsconfig.json b/types/decimal.js/tsconfig.json similarity index 100% rename from decimal.js/tsconfig.json rename to types/decimal.js/tsconfig.json diff --git a/decorum/decorum-tests.ts b/types/decorum/decorum-tests.ts similarity index 100% rename from decorum/decorum-tests.ts rename to types/decorum/decorum-tests.ts diff --git a/decorum/index.d.ts b/types/decorum/index.d.ts similarity index 100% rename from decorum/index.d.ts rename to types/decorum/index.d.ts diff --git a/decorum/tsconfig.json b/types/decorum/tsconfig.json similarity index 100% rename from decorum/tsconfig.json rename to types/decorum/tsconfig.json diff --git a/deep-assign/deep-assign-tests.ts b/types/deep-assign/deep-assign-tests.ts similarity index 100% rename from deep-assign/deep-assign-tests.ts rename to types/deep-assign/deep-assign-tests.ts diff --git a/deep-assign/index.d.ts b/types/deep-assign/index.d.ts similarity index 100% rename from deep-assign/index.d.ts rename to types/deep-assign/index.d.ts diff --git a/deep-assign/tsconfig.json b/types/deep-assign/tsconfig.json similarity index 100% rename from deep-assign/tsconfig.json rename to types/deep-assign/tsconfig.json diff --git a/deep-diff/deep-diff-tests.ts b/types/deep-diff/deep-diff-tests.ts similarity index 100% rename from deep-diff/deep-diff-tests.ts rename to types/deep-diff/deep-diff-tests.ts diff --git a/deep-diff/index.d.ts b/types/deep-diff/index.d.ts similarity index 100% rename from deep-diff/index.d.ts rename to types/deep-diff/index.d.ts diff --git a/deep-diff/tsconfig.json b/types/deep-diff/tsconfig.json similarity index 100% rename from deep-diff/tsconfig.json rename to types/deep-diff/tsconfig.json diff --git a/deep-equal/deep-equal-tests.ts b/types/deep-equal/deep-equal-tests.ts similarity index 99% rename from deep-equal/deep-equal-tests.ts rename to types/deep-equal/deep-equal-tests.ts index ed23a35838..d889f5929d 100644 --- a/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/deep-equal/index.d.ts b/types/deep-equal/index.d.ts similarity index 100% rename from deep-equal/index.d.ts rename to types/deep-equal/index.d.ts diff --git a/deep-equal/tsconfig.json b/types/deep-equal/tsconfig.json similarity index 100% rename from deep-equal/tsconfig.json rename to types/deep-equal/tsconfig.json diff --git a/deep-equal/tslint.json b/types/deep-equal/tslint.json similarity index 100% rename from deep-equal/tslint.json rename to types/deep-equal/tslint.json diff --git a/deep-extend/deep-extend-tests.ts b/types/deep-extend/deep-extend-tests.ts similarity index 100% rename from deep-extend/deep-extend-tests.ts rename to types/deep-extend/deep-extend-tests.ts diff --git a/deep-extend/index.d.ts b/types/deep-extend/index.d.ts similarity index 100% rename from deep-extend/index.d.ts rename to types/deep-extend/index.d.ts diff --git a/deep-extend/tsconfig.json b/types/deep-extend/tsconfig.json similarity index 100% rename from deep-extend/tsconfig.json rename to types/deep-extend/tsconfig.json diff --git a/deep-freeze-strict/index.d.ts b/types/deep-freeze-strict/index.d.ts similarity index 100% rename from deep-freeze-strict/index.d.ts rename to types/deep-freeze-strict/index.d.ts diff --git a/deep-freeze-strict/tsconfig.json b/types/deep-freeze-strict/tsconfig.json similarity index 100% rename from deep-freeze-strict/tsconfig.json rename to types/deep-freeze-strict/tsconfig.json diff --git a/deep-freeze-strict/tslint.json b/types/deep-freeze-strict/tslint.json similarity index 100% rename from deep-freeze-strict/tslint.json rename to types/deep-freeze-strict/tslint.json diff --git a/deep-freeze/deep-freeze-tests.ts b/types/deep-freeze/deep-freeze-tests.ts similarity index 100% rename from deep-freeze/deep-freeze-tests.ts rename to types/deep-freeze/deep-freeze-tests.ts diff --git a/deep-freeze/index.d.ts b/types/deep-freeze/index.d.ts similarity index 100% rename from deep-freeze/index.d.ts rename to types/deep-freeze/index.d.ts diff --git a/deep-freeze/tsconfig.json b/types/deep-freeze/tsconfig.json similarity index 100% rename from deep-freeze/tsconfig.json rename to types/deep-freeze/tsconfig.json diff --git a/deepmerge/deepmerge-tests.ts b/types/deepmerge/deepmerge-tests.ts similarity index 100% rename from deepmerge/deepmerge-tests.ts rename to types/deepmerge/deepmerge-tests.ts diff --git a/deepmerge/index.d.ts b/types/deepmerge/index.d.ts similarity index 100% rename from deepmerge/index.d.ts rename to types/deepmerge/index.d.ts diff --git a/deepmerge/tsconfig.json b/types/deepmerge/tsconfig.json similarity index 100% rename from deepmerge/tsconfig.json rename to types/deepmerge/tsconfig.json diff --git a/deepmerge/tslint.json b/types/deepmerge/tslint.json similarity index 100% rename from deepmerge/tslint.json rename to types/deepmerge/tslint.json diff --git a/defaults/defaults-tests.ts b/types/defaults/defaults-tests.ts similarity index 100% rename from defaults/defaults-tests.ts rename to types/defaults/defaults-tests.ts diff --git a/defaults/index.d.ts b/types/defaults/index.d.ts similarity index 100% rename from defaults/index.d.ts rename to types/defaults/index.d.ts diff --git a/defaults/tsconfig.json b/types/defaults/tsconfig.json similarity index 100% rename from defaults/tsconfig.json rename to types/defaults/tsconfig.json diff --git a/deku/deku-tests.ts b/types/deku/deku-tests.ts similarity index 100% rename from deku/deku-tests.ts rename to types/deku/deku-tests.ts diff --git a/deku/index.d.ts b/types/deku/index.d.ts similarity index 100% rename from deku/index.d.ts rename to types/deku/index.d.ts diff --git a/deku/tsconfig.json b/types/deku/tsconfig.json similarity index 100% rename from deku/tsconfig.json rename to types/deku/tsconfig.json diff --git a/del/del-tests.ts b/types/del/del-tests.ts similarity index 100% rename from del/del-tests.ts rename to types/del/del-tests.ts diff --git a/del/index.d.ts b/types/del/index.d.ts similarity index 100% rename from del/index.d.ts rename to types/del/index.d.ts diff --git a/del/tsconfig.json b/types/del/tsconfig.json similarity index 100% rename from del/tsconfig.json rename to types/del/tsconfig.json diff --git a/del/tslint.json b/types/del/tslint.json similarity index 100% rename from del/tslint.json rename to types/del/tslint.json diff --git a/denodeify/denodeify-tests.ts b/types/denodeify/denodeify-tests.ts similarity index 100% rename from denodeify/denodeify-tests.ts rename to types/denodeify/denodeify-tests.ts diff --git a/denodeify/index.d.ts b/types/denodeify/index.d.ts similarity index 100% rename from denodeify/index.d.ts rename to types/denodeify/index.d.ts diff --git a/denodeify/tsconfig.json b/types/denodeify/tsconfig.json similarity index 100% rename from denodeify/tsconfig.json rename to types/denodeify/tsconfig.json diff --git a/deoxxa-content-type/deoxxa-content-type-tests.ts b/types/deoxxa-content-type/deoxxa-content-type-tests.ts similarity index 100% rename from deoxxa-content-type/deoxxa-content-type-tests.ts rename to types/deoxxa-content-type/deoxxa-content-type-tests.ts diff --git a/deoxxa-content-type/index.d.ts b/types/deoxxa-content-type/index.d.ts similarity index 100% rename from deoxxa-content-type/index.d.ts rename to types/deoxxa-content-type/index.d.ts diff --git a/deoxxa-content-type/tsconfig.json b/types/deoxxa-content-type/tsconfig.json similarity index 100% rename from deoxxa-content-type/tsconfig.json rename to types/deoxxa-content-type/tsconfig.json diff --git a/depd/depd-tests.ts b/types/depd/depd-tests.ts similarity index 100% rename from depd/depd-tests.ts rename to types/depd/depd-tests.ts diff --git a/depd/index.d.ts b/types/depd/index.d.ts similarity index 100% rename from depd/index.d.ts rename to types/depd/index.d.ts diff --git a/depd/tsconfig.json b/types/depd/tsconfig.json similarity index 100% rename from depd/tsconfig.json rename to types/depd/tsconfig.json diff --git a/deployjava/deployjava-tests.ts b/types/deployjava/deployjava-tests.ts similarity index 100% rename from deployjava/deployjava-tests.ts rename to types/deployjava/deployjava-tests.ts diff --git a/deployjava/index.d.ts b/types/deployjava/index.d.ts similarity index 100% rename from deployjava/index.d.ts rename to types/deployjava/index.d.ts diff --git a/deployjava/tsconfig.json b/types/deployjava/tsconfig.json similarity index 100% rename from deployjava/tsconfig.json rename to types/deployjava/tsconfig.json diff --git a/detect-browser/detect-browser-tests.ts b/types/detect-browser/detect-browser-tests.ts similarity index 100% rename from detect-browser/detect-browser-tests.ts rename to types/detect-browser/detect-browser-tests.ts diff --git a/detect-browser/index.d.ts b/types/detect-browser/index.d.ts similarity index 60% rename from detect-browser/index.d.ts rename to types/detect-browser/index.d.ts index 0f845cd781..57ed80c411 100644 --- a/detect-browser/index.d.ts +++ b/types/detect-browser/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for detect-browser v1.3.3 +// Type definitions for detect-browser v1.6.2 // Project: https://github.com/DamonOehlman/detect-browser // Definitions by: Rogier Schouten // Definitions: https://github.com/borisyankov/DefinitelyTyped @@ -6,7 +6,7 @@ /** * Browser name */ -export const name: string; +export const name: "edge" | "yandexbrowser" | "chrome" | "crios" | "firefox" | "opera" | "ie" | "bb10" | "android" | "ios" | "safari"; /** * Browser version diff --git a/detect-browser/tsconfig.json b/types/detect-browser/tsconfig.json similarity index 100% rename from detect-browser/tsconfig.json rename to types/detect-browser/tsconfig.json diff --git a/detect-indent/detect-indent-tests.ts b/types/detect-indent/detect-indent-tests.ts similarity index 100% rename from detect-indent/detect-indent-tests.ts rename to types/detect-indent/detect-indent-tests.ts diff --git a/detect-indent/index.d.ts b/types/detect-indent/index.d.ts similarity index 100% rename from detect-indent/index.d.ts rename to types/detect-indent/index.d.ts diff --git a/detect-indent/tsconfig.json b/types/detect-indent/tsconfig.json similarity index 100% rename from detect-indent/tsconfig.json rename to types/detect-indent/tsconfig.json 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/gettext.js/tslint.json b/types/detect-port/tslint.json similarity index 100% rename from gettext.js/tslint.json rename to types/detect-port/tslint.json diff --git a/devexpress-web/README.md b/types/devexpress-web/README.md similarity index 100% rename from devexpress-web/README.md rename to types/devexpress-web/README.md diff --git a/devexpress-web/devexpress-web-tests.ts b/types/devexpress-web/devexpress-web-tests.ts similarity index 100% rename from devexpress-web/devexpress-web-tests.ts rename to types/devexpress-web/devexpress-web-tests.ts diff --git a/devexpress-web/index.d.ts b/types/devexpress-web/index.d.ts similarity index 100% rename from devexpress-web/index.d.ts rename to types/devexpress-web/index.d.ts diff --git a/devexpress-web/tsconfig.json b/types/devexpress-web/tsconfig.json similarity index 100% rename from devexpress-web/tsconfig.json rename to types/devexpress-web/tsconfig.json diff --git a/devextreme/README.md b/types/devextreme/README.md similarity index 100% rename from devextreme/README.md rename to types/devextreme/README.md diff --git a/devextreme/devextreme-tests.ts b/types/devextreme/devextreme-tests.ts similarity index 100% rename from devextreme/devextreme-tests.ts rename to types/devextreme/devextreme-tests.ts diff --git a/devextreme/index.d.ts b/types/devextreme/index.d.ts similarity index 100% rename from devextreme/index.d.ts rename to types/devextreme/index.d.ts diff --git a/devextreme/tsconfig.json b/types/devextreme/tsconfig.json similarity index 100% rename from devextreme/tsconfig.json rename to types/devextreme/tsconfig.json diff --git a/devextreme/v15/devextreme-tests.ts b/types/devextreme/v15/devextreme-tests.ts similarity index 100% rename from devextreme/v15/devextreme-tests.ts rename to types/devextreme/v15/devextreme-tests.ts diff --git a/devextreme/v15/index.d.ts b/types/devextreme/v15/index.d.ts similarity index 100% rename from devextreme/v15/index.d.ts rename to types/devextreme/v15/index.d.ts diff --git a/devextreme/v15/tsconfig.json b/types/devextreme/v15/tsconfig.json similarity index 100% rename from devextreme/v15/tsconfig.json rename to types/devextreme/v15/tsconfig.json diff --git a/devtools-detect/devtools-detect-tests.ts b/types/devtools-detect/devtools-detect-tests.ts similarity index 100% rename from devtools-detect/devtools-detect-tests.ts rename to types/devtools-detect/devtools-detect-tests.ts diff --git a/devtools-detect/index.d.ts b/types/devtools-detect/index.d.ts similarity index 100% rename from devtools-detect/index.d.ts rename to types/devtools-detect/index.d.ts diff --git a/devtools-detect/tsconfig.json b/types/devtools-detect/tsconfig.json similarity index 100% rename from devtools-detect/tsconfig.json rename to types/devtools-detect/tsconfig.json diff --git a/df-visible/df-visible-tests.ts b/types/df-visible/df-visible-tests.ts similarity index 100% rename from df-visible/df-visible-tests.ts rename to types/df-visible/df-visible-tests.ts diff --git a/df-visible/index.d.ts b/types/df-visible/index.d.ts similarity index 100% rename from df-visible/index.d.ts rename to types/df-visible/index.d.ts diff --git a/df-visible/tsconfig.json b/types/df-visible/tsconfig.json similarity index 100% rename from df-visible/tsconfig.json rename to types/df-visible/tsconfig.json diff --git a/dhtmlxgantt/dhtmlxgantt-tests.ts b/types/dhtmlxgantt/dhtmlxgantt-tests.ts similarity index 100% rename from dhtmlxgantt/dhtmlxgantt-tests.ts rename to types/dhtmlxgantt/dhtmlxgantt-tests.ts diff --git a/dhtmlxgantt/index.d.ts b/types/dhtmlxgantt/index.d.ts similarity index 100% rename from dhtmlxgantt/index.d.ts rename to types/dhtmlxgantt/index.d.ts diff --git a/dhtmlxgantt/tsconfig.json b/types/dhtmlxgantt/tsconfig.json similarity index 100% rename from dhtmlxgantt/tsconfig.json rename to types/dhtmlxgantt/tsconfig.json diff --git a/dhtmlxscheduler/dhtmlxscheduler-tests.ts b/types/dhtmlxscheduler/dhtmlxscheduler-tests.ts similarity index 100% rename from dhtmlxscheduler/dhtmlxscheduler-tests.ts rename to types/dhtmlxscheduler/dhtmlxscheduler-tests.ts diff --git a/dhtmlxscheduler/index.d.ts b/types/dhtmlxscheduler/index.d.ts similarity index 100% rename from dhtmlxscheduler/index.d.ts rename to types/dhtmlxscheduler/index.d.ts diff --git a/dhtmlxscheduler/tsconfig.json b/types/dhtmlxscheduler/tsconfig.json similarity index 100% rename from dhtmlxscheduler/tsconfig.json rename to types/dhtmlxscheduler/tsconfig.json diff --git a/di-lite/di-lite-tests.ts b/types/di-lite/di-lite-tests.ts similarity index 100% rename from di-lite/di-lite-tests.ts rename to types/di-lite/di-lite-tests.ts diff --git a/di-lite/index.d.ts b/types/di-lite/index.d.ts similarity index 100% rename from di-lite/index.d.ts rename to types/di-lite/index.d.ts diff --git a/di-lite/tsconfig.json b/types/di-lite/tsconfig.json similarity index 100% rename from di-lite/tsconfig.json rename to types/di-lite/tsconfig.json diff --git a/diff-match-patch/diff-match-patch-tests.ts b/types/diff-match-patch/diff-match-patch-tests.ts similarity index 100% rename from diff-match-patch/diff-match-patch-tests.ts rename to types/diff-match-patch/diff-match-patch-tests.ts diff --git a/diff-match-patch/index.d.ts b/types/diff-match-patch/index.d.ts similarity index 100% rename from diff-match-patch/index.d.ts rename to types/diff-match-patch/index.d.ts diff --git a/diff-match-patch/tsconfig.json b/types/diff-match-patch/tsconfig.json similarity index 100% rename from diff-match-patch/tsconfig.json rename to types/diff-match-patch/tsconfig.json diff --git a/diff/diff-tests.ts b/types/diff/diff-tests.ts similarity index 100% rename from diff/diff-tests.ts rename to types/diff/diff-tests.ts diff --git a/diff/index.d.ts b/types/diff/index.d.ts similarity index 100% rename from diff/index.d.ts rename to types/diff/index.d.ts diff --git a/diff/tsconfig.json b/types/diff/tsconfig.json similarity index 100% rename from diff/tsconfig.json rename to types/diff/tsconfig.json diff --git a/diff2html/diff2html-tests.ts b/types/diff2html/diff2html-tests.ts similarity index 100% rename from diff2html/diff2html-tests.ts rename to types/diff2html/diff2html-tests.ts diff --git a/diff2html/index.d.ts b/types/diff2html/index.d.ts similarity index 100% rename from diff2html/index.d.ts rename to types/diff2html/index.d.ts diff --git a/diff2html/tsconfig.json b/types/diff2html/tsconfig.json similarity index 100% rename from diff2html/tsconfig.json rename to types/diff2html/tsconfig.json diff --git a/dir-resolve/dir-resolve-tests.ts b/types/dir-resolve/dir-resolve-tests.ts similarity index 100% rename from dir-resolve/dir-resolve-tests.ts rename to types/dir-resolve/dir-resolve-tests.ts diff --git a/dir-resolve/index.d.ts b/types/dir-resolve/index.d.ts similarity index 100% rename from dir-resolve/index.d.ts rename to types/dir-resolve/index.d.ts diff --git a/dir-resolve/tsconfig.json b/types/dir-resolve/tsconfig.json similarity index 100% rename from dir-resolve/tsconfig.json rename to types/dir-resolve/tsconfig.json diff --git a/dir-resolve/tslint.json b/types/dir-resolve/tslint.json similarity index 100% rename from dir-resolve/tslint.json rename to types/dir-resolve/tslint.json diff --git a/discontinuous-range/discontinuous-range-tests.ts b/types/discontinuous-range/discontinuous-range-tests.ts similarity index 100% rename from discontinuous-range/discontinuous-range-tests.ts rename to types/discontinuous-range/discontinuous-range-tests.ts diff --git a/discontinuous-range/index.d.ts b/types/discontinuous-range/index.d.ts similarity index 100% rename from discontinuous-range/index.d.ts rename to types/discontinuous-range/index.d.ts diff --git a/discontinuous-range/tsconfig.json b/types/discontinuous-range/tsconfig.json similarity index 100% rename from discontinuous-range/tsconfig.json rename to types/discontinuous-range/tsconfig.json diff --git a/discontinuous-range/tslint.json b/types/discontinuous-range/tslint.json similarity index 100% rename from discontinuous-range/tslint.json rename to types/discontinuous-range/tslint.json diff --git a/disposable-email-domains/disposable-email-domains-tests.ts b/types/disposable-email-domains/disposable-email-domains-tests.ts similarity index 100% rename from disposable-email-domains/disposable-email-domains-tests.ts rename to types/disposable-email-domains/disposable-email-domains-tests.ts diff --git a/disposable-email-domains/index.d.ts b/types/disposable-email-domains/index.d.ts similarity index 100% rename from disposable-email-domains/index.d.ts rename to types/disposable-email-domains/index.d.ts diff --git a/disposable-email-domains/tsconfig.json b/types/disposable-email-domains/tsconfig.json similarity index 100% rename from disposable-email-domains/tsconfig.json rename to types/disposable-email-domains/tsconfig.json diff --git a/doccookies/doccookies-tests.ts b/types/doccookies/doccookies-tests.ts similarity index 100% rename from doccookies/doccookies-tests.ts rename to types/doccookies/doccookies-tests.ts diff --git a/doccookies/index.d.ts b/types/doccookies/index.d.ts similarity index 100% rename from doccookies/index.d.ts rename to types/doccookies/index.d.ts diff --git a/doccookies/tsconfig.json b/types/doccookies/tsconfig.json similarity index 100% rename from doccookies/tsconfig.json rename to types/doccookies/tsconfig.json diff --git a/dock-spawn/dock-spawn-tests.ts b/types/dock-spawn/dock-spawn-tests.ts similarity index 100% rename from dock-spawn/dock-spawn-tests.ts rename to types/dock-spawn/dock-spawn-tests.ts diff --git a/dock-spawn/index.d.ts b/types/dock-spawn/index.d.ts similarity index 100% rename from dock-spawn/index.d.ts rename to types/dock-spawn/index.d.ts diff --git a/dock-spawn/tsconfig.json b/types/dock-spawn/tsconfig.json similarity index 100% rename from dock-spawn/tsconfig.json rename to types/dock-spawn/tsconfig.json diff --git a/dockerode/dockerode-tests.ts b/types/dockerode/dockerode-tests.ts similarity index 100% rename from dockerode/dockerode-tests.ts rename to types/dockerode/dockerode-tests.ts diff --git a/dockerode/index.d.ts b/types/dockerode/index.d.ts similarity index 100% rename from dockerode/index.d.ts rename to types/dockerode/index.d.ts diff --git a/dockerode/tsconfig.json b/types/dockerode/tsconfig.json similarity index 100% rename from dockerode/tsconfig.json rename to types/dockerode/tsconfig.json diff --git a/dockerode/tslint.json b/types/dockerode/tslint.json similarity index 100% rename from dockerode/tslint.json rename to types/dockerode/tslint.json diff --git a/docopt/docopt-tests.ts b/types/docopt/docopt-tests.ts similarity index 100% rename from docopt/docopt-tests.ts rename to types/docopt/docopt-tests.ts diff --git a/docopt/index.d.ts b/types/docopt/index.d.ts similarity index 100% rename from docopt/index.d.ts rename to types/docopt/index.d.ts diff --git a/docopt/tsconfig.json b/types/docopt/tsconfig.json similarity index 100% rename from docopt/tsconfig.json rename to types/docopt/tsconfig.json diff --git a/doctrine/doctrine-tests.ts b/types/doctrine/doctrine-tests.ts similarity index 100% rename from doctrine/doctrine-tests.ts rename to types/doctrine/doctrine-tests.ts diff --git a/doctrine/index.d.ts b/types/doctrine/index.d.ts similarity index 100% rename from doctrine/index.d.ts rename to types/doctrine/index.d.ts diff --git a/doctrine/tsconfig.json b/types/doctrine/tsconfig.json similarity index 100% rename from doctrine/tsconfig.json rename to types/doctrine/tsconfig.json diff --git a/documentdb-server/documentdb-server-tests.ts b/types/documentdb-server/documentdb-server-tests.ts similarity index 100% rename from documentdb-server/documentdb-server-tests.ts rename to types/documentdb-server/documentdb-server-tests.ts diff --git a/documentdb-server/index.d.ts b/types/documentdb-server/index.d.ts similarity index 100% rename from documentdb-server/index.d.ts rename to types/documentdb-server/index.d.ts diff --git a/documentdb-server/tsconfig.json b/types/documentdb-server/tsconfig.json similarity index 100% rename from documentdb-server/tsconfig.json rename to types/documentdb-server/tsconfig.json diff --git a/documentdb/documentdb-tests.ts b/types/documentdb/documentdb-tests.ts similarity index 100% rename from documentdb/documentdb-tests.ts rename to types/documentdb/documentdb-tests.ts diff --git a/documentdb/index.d.ts b/types/documentdb/index.d.ts similarity index 100% rename from documentdb/index.d.ts rename to types/documentdb/index.d.ts diff --git a/documentdb/tsconfig.json b/types/documentdb/tsconfig.json similarity index 100% rename from documentdb/tsconfig.json rename to types/documentdb/tsconfig.json diff --git a/dojo/README.md b/types/dojo/README.md similarity index 100% rename from dojo/README.md rename to types/dojo/README.md diff --git a/dojo/dijit.d.ts b/types/dojo/dijit.d.ts similarity index 100% rename from dojo/dijit.d.ts rename to types/dojo/dijit.d.ts diff --git a/dojo/doh.d.ts b/types/dojo/doh.d.ts similarity index 100% rename from dojo/doh.d.ts rename to types/dojo/doh.d.ts diff --git a/dojo/dojox.NodeList.d.ts b/types/dojo/dojox.NodeList.d.ts similarity index 100% rename from dojo/dojox.NodeList.d.ts rename to types/dojo/dojox.NodeList.d.ts diff --git a/dojo/dojox.analytics.d.ts b/types/dojo/dojox.analytics.d.ts similarity index 100% rename from dojo/dojox.analytics.d.ts rename to types/dojo/dojox.analytics.d.ts diff --git a/dojo/dojox.app.d.ts b/types/dojo/dojox.app.d.ts similarity index 100% rename from dojo/dojox.app.d.ts rename to types/dojo/dojox.app.d.ts diff --git a/dojo/dojox.atom.d.ts b/types/dojo/dojox.atom.d.ts similarity index 100% rename from dojo/dojox.atom.d.ts rename to types/dojo/dojox.atom.d.ts diff --git a/dojo/dojox.av.d.ts b/types/dojo/dojox.av.d.ts similarity index 100% rename from dojo/dojox.av.d.ts rename to types/dojo/dojox.av.d.ts diff --git a/dojo/dojox.calc.d.ts b/types/dojo/dojox.calc.d.ts similarity index 100% rename from dojo/dojox.calc.d.ts rename to types/dojo/dojox.calc.d.ts diff --git a/dojo/dojox.calendar.d.ts b/types/dojo/dojox.calendar.d.ts similarity index 100% rename from dojo/dojox.calendar.d.ts rename to types/dojo/dojox.calendar.d.ts diff --git a/dojo/dojox.charting.d.ts b/types/dojo/dojox.charting.d.ts similarity index 100% rename from dojo/dojox.charting.d.ts rename to types/dojo/dojox.charting.d.ts diff --git a/dojo/dojox.collections.d.ts b/types/dojo/dojox.collections.d.ts similarity index 100% rename from dojo/dojox.collections.d.ts rename to types/dojo/dojox.collections.d.ts diff --git a/dojo/dojox.color.d.ts b/types/dojo/dojox.color.d.ts similarity index 100% rename from dojo/dojox.color.d.ts rename to types/dojo/dojox.color.d.ts diff --git a/dojo/dojox.css3.d.ts b/types/dojo/dojox.css3.d.ts similarity index 100% rename from dojo/dojox.css3.d.ts rename to types/dojo/dojox.css3.d.ts diff --git a/dojo/dojox.data.d.ts b/types/dojo/dojox.data.d.ts similarity index 100% rename from dojo/dojox.data.d.ts rename to types/dojo/dojox.data.d.ts diff --git a/dojo/dojox.date.d.ts b/types/dojo/dojox.date.d.ts similarity index 100% rename from dojo/dojox.date.d.ts rename to types/dojo/dojox.date.d.ts diff --git a/dojo/dojox.dgauges.d.ts b/types/dojo/dojox.dgauges.d.ts similarity index 100% rename from dojo/dojox.dgauges.d.ts rename to types/dojo/dojox.dgauges.d.ts diff --git a/dojo/dojox.dnd.d.ts b/types/dojo/dojox.dnd.d.ts similarity index 100% rename from dojo/dojox.dnd.d.ts rename to types/dojo/dojox.dnd.d.ts diff --git a/dojo/dojox.drawing.d.ts b/types/dojo/dojox.drawing.d.ts similarity index 100% rename from dojo/dojox.drawing.d.ts rename to types/dojo/dojox.drawing.d.ts diff --git a/dojo/dojox.dtl.d.ts b/types/dojo/dojox.dtl.d.ts similarity index 100% rename from dojo/dojox.dtl.d.ts rename to types/dojo/dojox.dtl.d.ts diff --git a/dojo/dojox.editor.d.ts b/types/dojo/dojox.editor.d.ts similarity index 100% rename from dojo/dojox.editor.d.ts rename to types/dojo/dojox.editor.d.ts diff --git a/dojo/dojox.embed.d.ts b/types/dojo/dojox.embed.d.ts similarity index 100% rename from dojo/dojox.embed.d.ts rename to types/dojo/dojox.embed.d.ts diff --git a/dojo/dojox.encoding.d.ts b/types/dojo/dojox.encoding.d.ts similarity index 100% rename from dojo/dojox.encoding.d.ts rename to types/dojo/dojox.encoding.d.ts diff --git a/dojo/dojox.flash.d.ts b/types/dojo/dojox.flash.d.ts similarity index 100% rename from dojo/dojox.flash.d.ts rename to types/dojo/dojox.flash.d.ts diff --git a/dojo/dojox.form.d.ts b/types/dojo/dojox.form.d.ts similarity index 100% rename from dojo/dojox.form.d.ts rename to types/dojo/dojox.form.d.ts diff --git a/dojo/dojox.fx.d.ts b/types/dojo/dojox.fx.d.ts similarity index 100% rename from dojo/dojox.fx.d.ts rename to types/dojo/dojox.fx.d.ts diff --git a/dojo/dojox.gantt.d.ts b/types/dojo/dojox.gantt.d.ts similarity index 100% rename from dojo/dojox.gantt.d.ts rename to types/dojo/dojox.gantt.d.ts diff --git a/dojo/dojox.gauges.d.ts b/types/dojo/dojox.gauges.d.ts similarity index 100% rename from dojo/dojox.gauges.d.ts rename to types/dojo/dojox.gauges.d.ts diff --git a/dojo/dojox.geo.d.ts b/types/dojo/dojox.geo.d.ts similarity index 100% rename from dojo/dojox.geo.d.ts rename to types/dojo/dojox.geo.d.ts diff --git a/dojo/dojox.gesture.d.ts b/types/dojo/dojox.gesture.d.ts similarity index 100% rename from dojo/dojox.gesture.d.ts rename to types/dojo/dojox.gesture.d.ts diff --git a/dojo/dojox.gfx.d.ts b/types/dojo/dojox.gfx.d.ts similarity index 100% rename from dojo/dojox.gfx.d.ts rename to types/dojo/dojox.gfx.d.ts diff --git a/dojo/dojox.gfx3d.d.ts b/types/dojo/dojox.gfx3d.d.ts similarity index 100% rename from dojo/dojox.gfx3d.d.ts rename to types/dojo/dojox.gfx3d.d.ts diff --git a/dojo/dojox.grid.d.ts b/types/dojo/dojox.grid.d.ts similarity index 100% rename from dojo/dojox.grid.d.ts rename to types/dojo/dojox.grid.d.ts diff --git a/dojo/dojox.help.d.ts b/types/dojo/dojox.help.d.ts similarity index 100% rename from dojo/dojox.help.d.ts rename to types/dojo/dojox.help.d.ts diff --git a/dojo/dojox.highlight.d.ts b/types/dojo/dojox.highlight.d.ts similarity index 100% rename from dojo/dojox.highlight.d.ts rename to types/dojo/dojox.highlight.d.ts diff --git a/dojo/dojox.html.d.ts b/types/dojo/dojox.html.d.ts similarity index 100% rename from dojo/dojox.html.d.ts rename to types/dojo/dojox.html.d.ts diff --git a/dojo/dojox.image.d.ts b/types/dojo/dojox.image.d.ts similarity index 100% rename from dojo/dojox.image.d.ts rename to types/dojo/dojox.image.d.ts diff --git a/dojo/dojox.io.d.ts b/types/dojo/dojox.io.d.ts similarity index 100% rename from dojo/dojox.io.d.ts rename to types/dojo/dojox.io.d.ts diff --git a/dojo/dojox.jq.d.ts b/types/dojo/dojox.jq.d.ts similarity index 100% rename from dojo/dojox.jq.d.ts rename to types/dojo/dojox.jq.d.ts diff --git a/dojo/dojox.json.d.ts b/types/dojo/dojox.json.d.ts similarity index 100% rename from dojo/dojox.json.d.ts rename to types/dojo/dojox.json.d.ts diff --git a/dojo/dojox.jsonPath.d.ts b/types/dojo/dojox.jsonPath.d.ts similarity index 100% rename from dojo/dojox.jsonPath.d.ts rename to types/dojo/dojox.jsonPath.d.ts diff --git a/dojo/dojox.lang.d.ts b/types/dojo/dojox.lang.d.ts similarity index 100% rename from dojo/dojox.lang.d.ts rename to types/dojo/dojox.lang.d.ts diff --git a/dojo/dojox.layout.d.ts b/types/dojo/dojox.layout.d.ts similarity index 100% rename from dojo/dojox.layout.d.ts rename to types/dojo/dojox.layout.d.ts diff --git a/dojo/dojox.main.d.ts b/types/dojo/dojox.main.d.ts similarity index 100% rename from dojo/dojox.main.d.ts rename to types/dojo/dojox.main.d.ts diff --git a/dojo/dojox.math.d.ts b/types/dojo/dojox.math.d.ts similarity index 100% rename from dojo/dojox.math.d.ts rename to types/dojo/dojox.math.d.ts diff --git a/dojo/dojox.mdnd.d.ts b/types/dojo/dojox.mdnd.d.ts similarity index 100% rename from dojo/dojox.mdnd.d.ts rename to types/dojo/dojox.mdnd.d.ts diff --git a/dojo/dojox.mobile.d.ts b/types/dojo/dojox.mobile.d.ts similarity index 100% rename from dojo/dojox.mobile.d.ts rename to types/dojo/dojox.mobile.d.ts diff --git a/dojo/dojox.mvc.d.ts b/types/dojo/dojox.mvc.d.ts similarity index 100% rename from dojo/dojox.mvc.d.ts rename to types/dojo/dojox.mvc.d.ts diff --git a/dojo/dojox.rails.d.ts b/types/dojo/dojox.rails.d.ts similarity index 100% rename from dojo/dojox.rails.d.ts rename to types/dojo/dojox.rails.d.ts diff --git a/dojo/dojox.robot.d.ts b/types/dojo/dojox.robot.d.ts similarity index 100% rename from dojo/dojox.robot.d.ts rename to types/dojo/dojox.robot.d.ts diff --git a/dojo/dojox.rpc.d.ts b/types/dojo/dojox.rpc.d.ts similarity index 100% rename from dojo/dojox.rpc.d.ts rename to types/dojo/dojox.rpc.d.ts diff --git a/dojo/dojox.secure.d.ts b/types/dojo/dojox.secure.d.ts similarity index 100% rename from dojo/dojox.secure.d.ts rename to types/dojo/dojox.secure.d.ts diff --git a/dojo/dojox.sketch.d.ts b/types/dojo/dojox.sketch.d.ts similarity index 100% rename from dojo/dojox.sketch.d.ts rename to types/dojo/dojox.sketch.d.ts diff --git a/dojo/dojox.socket.d.ts b/types/dojo/dojox.socket.d.ts similarity index 100% rename from dojo/dojox.socket.d.ts rename to types/dojo/dojox.socket.d.ts diff --git a/dojo/dojox.sql.d.ts b/types/dojo/dojox.sql.d.ts similarity index 100% rename from dojo/dojox.sql.d.ts rename to types/dojo/dojox.sql.d.ts diff --git a/dojo/dojox.storage.d.ts b/types/dojo/dojox.storage.d.ts similarity index 100% rename from dojo/dojox.storage.d.ts rename to types/dojo/dojox.storage.d.ts diff --git a/dojo/dojox.string.d.ts b/types/dojo/dojox.string.d.ts similarity index 100% rename from dojo/dojox.string.d.ts rename to types/dojo/dojox.string.d.ts diff --git a/dojo/dojox.testing.d.ts b/types/dojo/dojox.testing.d.ts similarity index 100% rename from dojo/dojox.testing.d.ts rename to types/dojo/dojox.testing.d.ts diff --git a/dojo/dojox.timing.d.ts b/types/dojo/dojox.timing.d.ts similarity index 100% rename from dojo/dojox.timing.d.ts rename to types/dojo/dojox.timing.d.ts diff --git a/dojo/dojox.treemap.d.ts b/types/dojo/dojox.treemap.d.ts similarity index 100% rename from dojo/dojox.treemap.d.ts rename to types/dojo/dojox.treemap.d.ts diff --git a/dojo/dojox.uuid.d.ts b/types/dojo/dojox.uuid.d.ts similarity index 100% rename from dojo/dojox.uuid.d.ts rename to types/dojo/dojox.uuid.d.ts diff --git a/dojo/dojox.validate.d.ts b/types/dojo/dojox.validate.d.ts similarity index 100% rename from dojo/dojox.validate.d.ts rename to types/dojo/dojox.validate.d.ts diff --git a/dojo/dojox.widget.d.ts b/types/dojo/dojox.widget.d.ts similarity index 100% rename from dojo/dojox.widget.d.ts rename to types/dojo/dojox.widget.d.ts diff --git a/dojo/dojox.xml.d.ts b/types/dojo/dojox.xml.d.ts similarity index 100% rename from dojo/dojox.xml.d.ts rename to types/dojo/dojox.xml.d.ts diff --git a/dojo/index.d.ts b/types/dojo/index.d.ts similarity index 100% rename from dojo/index.d.ts rename to types/dojo/index.d.ts diff --git a/dojo/tsconfig.json b/types/dojo/tsconfig.json similarity index 100% rename from dojo/tsconfig.json rename to types/dojo/tsconfig.json diff --git a/dom4/dom4-tests.ts b/types/dom4/dom4-tests.ts similarity index 100% rename from dom4/dom4-tests.ts rename to types/dom4/dom4-tests.ts diff --git a/dom4/index.d.ts b/types/dom4/index.d.ts similarity index 100% rename from dom4/index.d.ts rename to types/dom4/index.d.ts diff --git a/dom4/tsconfig.json b/types/dom4/tsconfig.json similarity index 100% rename from dom4/tsconfig.json rename to types/dom4/tsconfig.json diff --git a/domo/domo-tests.ts b/types/domo/domo-tests.ts similarity index 100% rename from domo/domo-tests.ts rename to types/domo/domo-tests.ts diff --git a/domo/index.d.ts b/types/domo/index.d.ts similarity index 100% rename from domo/index.d.ts rename to types/domo/index.d.ts diff --git a/domo/tsconfig.json b/types/domo/tsconfig.json similarity index 100% rename from domo/tsconfig.json rename to types/domo/tsconfig.json diff --git a/dompurify/dompurify-tests.ts b/types/dompurify/dompurify-tests.ts similarity index 100% rename from dompurify/dompurify-tests.ts rename to types/dompurify/dompurify-tests.ts diff --git a/dompurify/index.d.ts b/types/dompurify/index.d.ts similarity index 100% rename from dompurify/index.d.ts rename to types/dompurify/index.d.ts diff --git a/dompurify/tsconfig.json b/types/dompurify/tsconfig.json similarity index 100% rename from dompurify/tsconfig.json rename to types/dompurify/tsconfig.json diff --git a/domready/domready-tests.ts b/types/domready/domready-tests.ts similarity index 100% rename from domready/domready-tests.ts rename to types/domready/domready-tests.ts diff --git a/domready/index.d.ts b/types/domready/index.d.ts similarity index 100% rename from domready/index.d.ts rename to types/domready/index.d.ts diff --git a/domready/tsconfig.json b/types/domready/tsconfig.json similarity index 100% rename from domready/tsconfig.json rename to types/domready/tsconfig.json diff --git a/domurl/domurl-tests.ts b/types/domurl/domurl-tests.ts similarity index 100% rename from domurl/domurl-tests.ts rename to types/domurl/domurl-tests.ts diff --git a/domurl/index.d.ts b/types/domurl/index.d.ts similarity index 100% rename from domurl/index.d.ts rename to types/domurl/index.d.ts diff --git a/domurl/tsconfig.json b/types/domurl/tsconfig.json similarity index 100% rename from domurl/tsconfig.json rename to types/domurl/tsconfig.json diff --git a/donna/donna-tests.ts b/types/donna/donna-tests.ts similarity index 100% rename from donna/donna-tests.ts rename to types/donna/donna-tests.ts diff --git a/donna/index.d.ts b/types/donna/index.d.ts similarity index 100% rename from donna/index.d.ts rename to types/donna/index.d.ts diff --git a/donna/tsconfig.json b/types/donna/tsconfig.json similarity index 100% rename from donna/tsconfig.json rename to types/donna/tsconfig.json diff --git a/dookie/dookie-tests.ts b/types/dookie/dookie-tests.ts similarity index 71% rename from dookie/dookie-tests.ts rename to types/dookie/dookie-tests.ts index 44cd6ec7ac..476538b8de 100644 --- a/dookie/dookie-tests.ts +++ b/types/dookie/dookie-tests.ts @@ -1,8 +1,5 @@ - -import {push, pull} from './index'; +import {push, pull} from 'dookie'; (async () => { - await push('mongodb://localhost:27017/test', {test: [{ok: 1}, {ok: 2}]}); - })(); diff --git a/dookie/index.d.ts b/types/dookie/index.d.ts similarity index 100% rename from dookie/index.d.ts rename to types/dookie/index.d.ts diff --git a/dookie/tsconfig.json b/types/dookie/tsconfig.json similarity index 100% rename from dookie/tsconfig.json rename to types/dookie/tsconfig.json diff --git a/dookie/tslint.json b/types/dookie/tslint.json similarity index 100% rename from dookie/tslint.json rename to types/dookie/tslint.json diff --git a/dot-object/dot-object-tests.ts b/types/dot-object/dot-object-tests.ts similarity index 100% rename from dot-object/dot-object-tests.ts rename to types/dot-object/dot-object-tests.ts diff --git a/dot-object/index.d.ts b/types/dot-object/index.d.ts similarity index 100% rename from dot-object/index.d.ts rename to types/dot-object/index.d.ts diff --git a/dot-object/tsconfig.json b/types/dot-object/tsconfig.json similarity index 100% rename from dot-object/tsconfig.json rename to types/dot-object/tsconfig.json diff --git a/dot-prop/dot-prop-tests.ts b/types/dot-prop/dot-prop-tests.ts similarity index 100% rename from dot-prop/dot-prop-tests.ts rename to types/dot-prop/dot-prop-tests.ts diff --git a/dot-prop/index.d.ts b/types/dot-prop/index.d.ts similarity index 100% rename from dot-prop/index.d.ts rename to types/dot-prop/index.d.ts diff --git a/dot-prop/tsconfig.json b/types/dot-prop/tsconfig.json similarity index 100% rename from dot-prop/tsconfig.json rename to types/dot-prop/tsconfig.json diff --git a/dot/dot-tests.ts b/types/dot/dot-tests.ts similarity index 50% rename from dot/dot-tests.ts rename to types/dot/dot-tests.ts index 0987f9eb46..507f63e81d 100644 --- a/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/dot/index.d.ts b/types/dot/index.d.ts similarity index 100% rename from dot/index.d.ts rename to types/dot/index.d.ts diff --git a/dot/tsconfig.json b/types/dot/tsconfig.json similarity index 100% rename from dot/tsconfig.json rename to types/dot/tsconfig.json diff --git a/dot/tslint.json b/types/dot/tslint.json similarity index 100% rename from dot/tslint.json rename to types/dot/tslint.json diff --git a/dotdotdot/dotdotdot-tests.ts b/types/dotdotdot/dotdotdot-tests.ts similarity index 100% rename from dotdotdot/dotdotdot-tests.ts rename to types/dotdotdot/dotdotdot-tests.ts diff --git a/dotdotdot/index.d.ts b/types/dotdotdot/index.d.ts similarity index 100% rename from dotdotdot/index.d.ts rename to types/dotdotdot/index.d.ts diff --git a/dotdotdot/tsconfig.json b/types/dotdotdot/tsconfig.json similarity index 100% rename from dotdotdot/tsconfig.json rename to types/dotdotdot/tsconfig.json diff --git a/dotenv/dotenv-tests.ts b/types/dotenv/dotenv-tests.ts similarity index 100% rename from dotenv/dotenv-tests.ts rename to types/dotenv/dotenv-tests.ts diff --git a/dotenv/index.d.ts b/types/dotenv/index.d.ts similarity index 100% rename from dotenv/index.d.ts rename to types/dotenv/index.d.ts diff --git a/dotenv/tsconfig.json b/types/dotenv/tsconfig.json similarity index 100% rename from dotenv/tsconfig.json rename to types/dotenv/tsconfig.json diff --git a/dotenv/tslint.json b/types/dotenv/tslint.json similarity index 100% rename from dotenv/tslint.json rename to types/dotenv/tslint.json diff --git a/doublearray/doublearray-tests.ts b/types/doublearray/doublearray-tests.ts similarity index 100% rename from doublearray/doublearray-tests.ts rename to types/doublearray/doublearray-tests.ts diff --git a/doublearray/index.d.ts b/types/doublearray/index.d.ts similarity index 100% rename from doublearray/index.d.ts rename to types/doublearray/index.d.ts diff --git a/doublearray/tsconfig.json b/types/doublearray/tsconfig.json similarity index 100% rename from doublearray/tsconfig.json rename to types/doublearray/tsconfig.json diff --git a/doubleclick-gpt/doubleclick-gpt-tests.ts b/types/doubleclick-gpt/doubleclick-gpt-tests.ts similarity index 100% rename from doubleclick-gpt/doubleclick-gpt-tests.ts rename to types/doubleclick-gpt/doubleclick-gpt-tests.ts diff --git a/doubleclick-gpt/index.d.ts b/types/doubleclick-gpt/index.d.ts similarity index 100% rename from doubleclick-gpt/index.d.ts rename to types/doubleclick-gpt/index.d.ts diff --git a/doubleclick-gpt/tsconfig.json b/types/doubleclick-gpt/tsconfig.json similarity index 100% rename from doubleclick-gpt/tsconfig.json rename to types/doubleclick-gpt/tsconfig.json diff --git a/draft-js/draft-js-tests.tsx b/types/draft-js/draft-js-tests.tsx similarity index 100% rename from draft-js/draft-js-tests.tsx rename to types/draft-js/draft-js-tests.tsx diff --git a/draft-js/index.d.ts b/types/draft-js/index.d.ts similarity index 100% rename from draft-js/index.d.ts rename to types/draft-js/index.d.ts diff --git a/draft-js/package.json b/types/draft-js/package.json similarity index 100% rename from draft-js/package.json rename to types/draft-js/package.json diff --git a/draft-js/tsconfig.json b/types/draft-js/tsconfig.json similarity index 100% rename from draft-js/tsconfig.json rename to types/draft-js/tsconfig.json diff --git a/dragster/dragster-tests.ts b/types/dragster/dragster-tests.ts similarity index 100% rename from dragster/dragster-tests.ts rename to types/dragster/dragster-tests.ts diff --git a/dragster/index.d.ts b/types/dragster/index.d.ts similarity index 100% rename from dragster/index.d.ts rename to types/dragster/index.d.ts diff --git a/dragster/tsconfig.json b/types/dragster/tsconfig.json similarity index 100% rename from dragster/tsconfig.json rename to types/dragster/tsconfig.json diff --git a/dragster/tslint.json b/types/dragster/tslint.json similarity index 100% rename from dragster/tslint.json rename to types/dragster/tslint.json diff --git a/dragula/dragula-tests.ts b/types/dragula/dragula-tests.ts similarity index 100% rename from dragula/dragula-tests.ts rename to types/dragula/dragula-tests.ts diff --git a/dragula/index.d.ts b/types/dragula/index.d.ts similarity index 100% rename from dragula/index.d.ts rename to types/dragula/index.d.ts diff --git a/dragula/tsconfig.json b/types/dragula/tsconfig.json similarity index 100% rename from dragula/tsconfig.json rename to types/dragula/tsconfig.json diff --git a/dropboxjs/dropboxjs-tests.ts b/types/dropboxjs/dropboxjs-tests.ts similarity index 100% rename from dropboxjs/dropboxjs-tests.ts rename to types/dropboxjs/dropboxjs-tests.ts diff --git a/dropboxjs/index.d.ts b/types/dropboxjs/index.d.ts similarity index 100% rename from dropboxjs/index.d.ts rename to types/dropboxjs/index.d.ts diff --git a/dropboxjs/tsconfig.json b/types/dropboxjs/tsconfig.json similarity index 100% rename from dropboxjs/tsconfig.json rename to types/dropboxjs/tsconfig.json diff --git a/dropkickjs/dropkickjs-tests.ts b/types/dropkickjs/dropkickjs-tests.ts similarity index 100% rename from dropkickjs/dropkickjs-tests.ts rename to types/dropkickjs/dropkickjs-tests.ts diff --git a/dropkickjs/index.d.ts b/types/dropkickjs/index.d.ts similarity index 100% rename from dropkickjs/index.d.ts rename to types/dropkickjs/index.d.ts diff --git a/dropkickjs/tsconfig.json b/types/dropkickjs/tsconfig.json similarity index 100% rename from dropkickjs/tsconfig.json rename to types/dropkickjs/tsconfig.json diff --git a/dropkickjs/tslint.json b/types/dropkickjs/tslint.json similarity index 100% rename from dropkickjs/tslint.json rename to types/dropkickjs/tslint.json diff --git a/dropzone/dropzone-tests.ts b/types/dropzone/dropzone-tests.ts old mode 100755 new mode 100644 similarity index 100% rename from dropzone/dropzone-tests.ts rename to types/dropzone/dropzone-tests.ts diff --git a/dropzone/index.d.ts b/types/dropzone/index.d.ts old mode 100755 new mode 100644 similarity index 100% rename from dropzone/index.d.ts rename to types/dropzone/index.d.ts diff --git a/dropzone/tsconfig.json b/types/dropzone/tsconfig.json similarity index 100% rename from dropzone/tsconfig.json rename to types/dropzone/tsconfig.json diff --git a/dsv/dsv-tests.ts b/types/dsv/dsv-tests.ts similarity index 100% rename from dsv/dsv-tests.ts rename to types/dsv/dsv-tests.ts diff --git a/dsv/index.d.ts b/types/dsv/index.d.ts similarity index 100% rename from dsv/index.d.ts rename to types/dsv/index.d.ts diff --git a/dsv/tsconfig.json b/types/dsv/tsconfig.json similarity index 100% rename from dsv/tsconfig.json rename to types/dsv/tsconfig.json diff --git a/dts-bundle/dts-bundle-tests.ts b/types/dts-bundle/dts-bundle-tests.ts similarity index 100% rename from dts-bundle/dts-bundle-tests.ts rename to types/dts-bundle/dts-bundle-tests.ts diff --git a/dts-bundle/index.d.ts b/types/dts-bundle/index.d.ts similarity index 100% rename from dts-bundle/index.d.ts rename to types/dts-bundle/index.d.ts diff --git a/dts-bundle/tsconfig.json b/types/dts-bundle/tsconfig.json similarity index 100% rename from dts-bundle/tsconfig.json rename to types/dts-bundle/tsconfig.json diff --git a/duplexer2/duplexer2-tests.ts b/types/duplexer2/duplexer2-tests.ts similarity index 100% rename from duplexer2/duplexer2-tests.ts rename to types/duplexer2/duplexer2-tests.ts diff --git a/duplexer2/index.d.ts b/types/duplexer2/index.d.ts similarity index 100% rename from duplexer2/index.d.ts rename to types/duplexer2/index.d.ts diff --git a/duplexer2/tsconfig.json b/types/duplexer2/tsconfig.json similarity index 100% rename from duplexer2/tsconfig.json rename to types/duplexer2/tsconfig.json diff --git a/duplexer2/tslint.json b/types/duplexer2/tslint.json similarity index 100% rename from duplexer2/tslint.json rename to types/duplexer2/tslint.json diff --git a/durandal/index.d.ts b/types/durandal/index.d.ts similarity index 100% rename from durandal/index.d.ts rename to types/durandal/index.d.ts diff --git a/durandal/tsconfig.json b/types/durandal/tsconfig.json similarity index 100% rename from durandal/tsconfig.json rename to types/durandal/tsconfig.json diff --git a/durandal/v1/index.d.ts b/types/durandal/v1/index.d.ts similarity index 100% rename from durandal/v1/index.d.ts rename to types/durandal/v1/index.d.ts diff --git a/durandal/v1/tsconfig.json b/types/durandal/v1/tsconfig.json similarity index 100% rename from durandal/v1/tsconfig.json rename to types/durandal/v1/tsconfig.json diff --git a/dustjs-linkedin/dustjs-linkedin-tests.ts b/types/dustjs-linkedin/dustjs-linkedin-tests.ts similarity index 100% rename from dustjs-linkedin/dustjs-linkedin-tests.ts rename to types/dustjs-linkedin/dustjs-linkedin-tests.ts diff --git a/dustjs-linkedin/index.d.ts b/types/dustjs-linkedin/index.d.ts similarity index 100% rename from dustjs-linkedin/index.d.ts rename to types/dustjs-linkedin/index.d.ts diff --git a/dustjs-linkedin/tsconfig.json b/types/dustjs-linkedin/tsconfig.json similarity index 100% rename from dustjs-linkedin/tsconfig.json rename to types/dustjs-linkedin/tsconfig.json diff --git a/dw-bxslider-4/dw-bxslider-4-tests.ts b/types/dw-bxslider-4/dw-bxslider-4-tests.ts similarity index 100% rename from dw-bxslider-4/dw-bxslider-4-tests.ts rename to types/dw-bxslider-4/dw-bxslider-4-tests.ts diff --git a/dw-bxslider-4/index.d.ts b/types/dw-bxslider-4/index.d.ts similarity index 100% rename from dw-bxslider-4/index.d.ts rename to types/dw-bxslider-4/index.d.ts diff --git a/dw-bxslider-4/tsconfig.json b/types/dw-bxslider-4/tsconfig.json similarity index 100% rename from dw-bxslider-4/tsconfig.json rename to types/dw-bxslider-4/tsconfig.json diff --git a/dygraphs/dygraphs-tests.ts b/types/dygraphs/dygraphs-tests.ts similarity index 100% rename from dygraphs/dygraphs-tests.ts rename to types/dygraphs/dygraphs-tests.ts diff --git a/dygraphs/index.d.ts b/types/dygraphs/index.d.ts similarity index 100% rename from dygraphs/index.d.ts rename to types/dygraphs/index.d.ts diff --git a/dygraphs/tsconfig.json b/types/dygraphs/tsconfig.json similarity index 100% rename from dygraphs/tsconfig.json rename to types/dygraphs/tsconfig.json diff --git a/dymo-label-framework/dymo-label-framework-tests.ts b/types/dymo-label-framework/dymo-label-framework-tests.ts similarity index 100% rename from dymo-label-framework/dymo-label-framework-tests.ts rename to types/dymo-label-framework/dymo-label-framework-tests.ts diff --git a/dymo-label-framework/index.d.ts b/types/dymo-label-framework/index.d.ts similarity index 100% rename from dymo-label-framework/index.d.ts rename to types/dymo-label-framework/index.d.ts diff --git a/dymo-label-framework/tsconfig.json b/types/dymo-label-framework/tsconfig.json similarity index 100% rename from dymo-label-framework/tsconfig.json rename to types/dymo-label-framework/tsconfig.json diff --git a/dynatable/dynatable-tests.ts b/types/dynatable/dynatable-tests.ts similarity index 100% rename from dynatable/dynatable-tests.ts rename to types/dynatable/dynatable-tests.ts diff --git a/dynatable/index.d.ts b/types/dynatable/index.d.ts similarity index 100% rename from dynatable/index.d.ts rename to types/dynatable/index.d.ts diff --git a/dynatable/tsconfig.json b/types/dynatable/tsconfig.json similarity index 100% rename from dynatable/tsconfig.json rename to types/dynatable/tsconfig.json diff --git a/each/each-tests.ts b/types/each/each-tests.ts similarity index 100% rename from each/each-tests.ts rename to types/each/each-tests.ts diff --git a/each/index.d.ts b/types/each/index.d.ts similarity index 100% rename from each/index.d.ts rename to types/each/index.d.ts diff --git a/each/tsconfig.json b/types/each/tsconfig.json similarity index 100% rename from each/tsconfig.json rename to types/each/tsconfig.json diff --git a/easeljs/easeljs-tests.ts b/types/easeljs/easeljs-tests.ts similarity index 100% rename from easeljs/easeljs-tests.ts rename to types/easeljs/easeljs-tests.ts diff --git a/easeljs/index.d.ts b/types/easeljs/index.d.ts similarity index 100% rename from easeljs/index.d.ts rename to types/easeljs/index.d.ts diff --git a/easeljs/tsconfig.json b/types/easeljs/tsconfig.json similarity index 100% rename from easeljs/tsconfig.json rename to types/easeljs/tsconfig.json diff --git a/easy-api-request/easy-api-request-tests.ts b/types/easy-api-request/easy-api-request-tests.ts similarity index 100% rename from easy-api-request/easy-api-request-tests.ts rename to types/easy-api-request/easy-api-request-tests.ts diff --git a/easy-api-request/index.d.ts b/types/easy-api-request/index.d.ts similarity index 100% rename from easy-api-request/index.d.ts rename to types/easy-api-request/index.d.ts diff --git a/easy-api-request/tsconfig.json b/types/easy-api-request/tsconfig.json similarity index 100% rename from easy-api-request/tsconfig.json rename to types/easy-api-request/tsconfig.json diff --git a/easy-jsend/easy-jsend-tests.ts b/types/easy-jsend/easy-jsend-tests.ts similarity index 100% rename from easy-jsend/easy-jsend-tests.ts rename to types/easy-jsend/easy-jsend-tests.ts diff --git a/easy-jsend/index.d.ts b/types/easy-jsend/index.d.ts similarity index 100% rename from easy-jsend/index.d.ts rename to types/easy-jsend/index.d.ts diff --git a/easy-jsend/tsconfig.json b/types/easy-jsend/tsconfig.json similarity index 100% rename from easy-jsend/tsconfig.json rename to types/easy-jsend/tsconfig.json diff --git a/easy-session/easy-session-tests.ts b/types/easy-session/easy-session-tests.ts similarity index 100% rename from easy-session/easy-session-tests.ts rename to types/easy-session/easy-session-tests.ts diff --git a/easy-session/index.d.ts b/types/easy-session/index.d.ts similarity index 100% rename from easy-session/index.d.ts rename to types/easy-session/index.d.ts diff --git a/easy-session/tsconfig.json b/types/easy-session/tsconfig.json similarity index 100% rename from easy-session/tsconfig.json rename to types/easy-session/tsconfig.json diff --git a/easy-table/easy-table-tests.ts b/types/easy-table/easy-table-tests.ts similarity index 100% rename from easy-table/easy-table-tests.ts rename to types/easy-table/easy-table-tests.ts diff --git a/easy-table/index.d.ts b/types/easy-table/index.d.ts similarity index 100% rename from easy-table/index.d.ts rename to types/easy-table/index.d.ts diff --git a/easy-table/tsconfig.json b/types/easy-table/tsconfig.json similarity index 100% rename from easy-table/tsconfig.json rename to types/easy-table/tsconfig.json diff --git a/easy-x-headers/easy-x-headers-tests.ts b/types/easy-x-headers/easy-x-headers-tests.ts similarity index 100% rename from easy-x-headers/easy-x-headers-tests.ts rename to types/easy-x-headers/easy-x-headers-tests.ts diff --git a/easy-x-headers/index.d.ts b/types/easy-x-headers/index.d.ts similarity index 100% rename from easy-x-headers/index.d.ts rename to types/easy-x-headers/index.d.ts diff --git a/easy-x-headers/tsconfig.json b/types/easy-x-headers/tsconfig.json similarity index 100% rename from easy-x-headers/tsconfig.json rename to types/easy-x-headers/tsconfig.json diff --git a/easy-xapi-supertest/easy-xapi-supertest-tests.ts b/types/easy-xapi-supertest/easy-xapi-supertest-tests.ts similarity index 100% rename from easy-xapi-supertest/easy-xapi-supertest-tests.ts rename to types/easy-xapi-supertest/easy-xapi-supertest-tests.ts diff --git a/easy-xapi-supertest/index.d.ts b/types/easy-xapi-supertest/index.d.ts similarity index 100% rename from easy-xapi-supertest/index.d.ts rename to types/easy-xapi-supertest/index.d.ts diff --git a/easy-xapi-supertest/tsconfig.json b/types/easy-xapi-supertest/tsconfig.json similarity index 100% rename from easy-xapi-supertest/tsconfig.json rename to types/easy-xapi-supertest/tsconfig.json diff --git a/easy-xapi-utils/easy-xapi-utils-tests.ts b/types/easy-xapi-utils/easy-xapi-utils-tests.ts similarity index 100% rename from easy-xapi-utils/easy-xapi-utils-tests.ts rename to types/easy-xapi-utils/easy-xapi-utils-tests.ts diff --git a/easy-xapi-utils/index.d.ts b/types/easy-xapi-utils/index.d.ts similarity index 100% rename from easy-xapi-utils/index.d.ts rename to types/easy-xapi-utils/index.d.ts diff --git a/easy-xapi-utils/tsconfig.json b/types/easy-xapi-utils/tsconfig.json similarity index 100% rename from easy-xapi-utils/tsconfig.json rename to types/easy-xapi-utils/tsconfig.json diff --git a/easy-xapi/easy-xapi-tests.ts b/types/easy-xapi/easy-xapi-tests.ts similarity index 100% rename from easy-xapi/easy-xapi-tests.ts rename to types/easy-xapi/easy-xapi-tests.ts diff --git a/easy-xapi/index.d.ts b/types/easy-xapi/index.d.ts similarity index 100% rename from easy-xapi/index.d.ts rename to types/easy-xapi/index.d.ts diff --git a/easy-xapi/tsconfig.json b/types/easy-xapi/tsconfig.json similarity index 100% rename from easy-xapi/tsconfig.json rename to types/easy-xapi/tsconfig.json diff --git a/easystarjs/easystarjs-tests.ts b/types/easystarjs/easystarjs-tests.ts similarity index 100% rename from easystarjs/easystarjs-tests.ts rename to types/easystarjs/easystarjs-tests.ts diff --git a/easystarjs/index.d.ts b/types/easystarjs/index.d.ts similarity index 100% rename from easystarjs/index.d.ts rename to types/easystarjs/index.d.ts diff --git a/easystarjs/tsconfig.json b/types/easystarjs/tsconfig.json similarity index 100% rename from easystarjs/tsconfig.json rename to types/easystarjs/tsconfig.json diff --git a/echarts/index.d.ts b/types/echarts/index.d.ts similarity index 100% rename from echarts/index.d.ts rename to types/echarts/index.d.ts diff --git a/echarts/tsconfig.json b/types/echarts/tsconfig.json similarity index 100% rename from echarts/tsconfig.json rename to types/echarts/tsconfig.json diff --git a/ecurve/ecurve-tests.ts b/types/ecurve/ecurve-tests.ts similarity index 100% rename from ecurve/ecurve-tests.ts rename to types/ecurve/ecurve-tests.ts diff --git a/ecurve/index.d.ts b/types/ecurve/index.d.ts similarity index 100% rename from ecurve/index.d.ts rename to types/ecurve/index.d.ts diff --git a/ecurve/tsconfig.json b/types/ecurve/tsconfig.json similarity index 100% rename from ecurve/tsconfig.json rename to types/ecurve/tsconfig.json diff --git a/ecurve/tslint.json b/types/ecurve/tslint.json similarity index 100% rename from ecurve/tslint.json rename to types/ecurve/tslint.json diff --git a/egg.js/egg.js-tests.ts b/types/egg.js/egg.js-tests.ts similarity index 100% rename from egg.js/egg.js-tests.ts rename to types/egg.js/egg.js-tests.ts diff --git a/egg.js/index.d.ts b/types/egg.js/index.d.ts similarity index 100% rename from egg.js/index.d.ts rename to types/egg.js/index.d.ts diff --git a/egg.js/tsconfig.json b/types/egg.js/tsconfig.json similarity index 100% rename from egg.js/tsconfig.json rename to types/egg.js/tsconfig.json diff --git a/ej.web.all/ej.web.all-tests.ts b/types/ej.web.all/ej.web.all-tests.ts similarity index 100% rename from ej.web.all/ej.web.all-tests.ts rename to types/ej.web.all/ej.web.all-tests.ts diff --git a/ej.web.all/index.d.ts b/types/ej.web.all/index.d.ts similarity index 99% rename from ej.web.all/index.d.ts rename to types/ej.web.all/index.d.ts index b1c4261705..ca17c06c5a 100644 --- a/ej.web.all/index.d.ts +++ b/types/ej.web.all/index.d.ts @@ -65198,4 +65198,4 @@ data(key: "ejTreeMap"): ej.datavisualization.TreeMap; data(key: "ejTreeView"): ej.TreeView; data(key: "ejUploadbox"): ej.Uploadbox; data(key: "ejWaitingPopup"): ej.WaitingPopup; -} \ No newline at end of file +} diff --git a/ej.web.all/tsconfig.json b/types/ej.web.all/tsconfig.json similarity index 100% rename from ej.web.all/tsconfig.json rename to types/ej.web.all/tsconfig.json diff --git a/types/ej.web.all/tslint.json b/types/ej.web.all/tslint.json new file mode 100644 index 0000000000..845d9d8168 --- /dev/null +++ b/types/ej.web.all/tslint.json @@ -0,0 +1,9 @@ +{ + "extends": "../tslint.json", + "rules": { + "comment-format": false, + "no-consecutive-blank-lines": false, + "no-padding": false, + "no-redundant-modifiers": false + } +} diff --git a/ejs-locals/ejs-locals-tests.ts b/types/ejs-locals/ejs-locals-tests.ts similarity index 100% rename from ejs-locals/ejs-locals-tests.ts rename to types/ejs-locals/ejs-locals-tests.ts diff --git a/ejs-locals/index.d.ts b/types/ejs-locals/index.d.ts similarity index 100% rename from ejs-locals/index.d.ts rename to types/ejs-locals/index.d.ts diff --git a/ejs-locals/tsconfig.json b/types/ejs-locals/tsconfig.json similarity index 100% rename from ejs-locals/tsconfig.json rename to types/ejs-locals/tsconfig.json diff --git a/ejs/ejs-tests.ts b/types/ejs/ejs-tests.ts similarity index 100% rename from ejs/ejs-tests.ts rename to types/ejs/ejs-tests.ts diff --git a/ejs/index.d.ts b/types/ejs/index.d.ts similarity index 100% rename from ejs/index.d.ts rename to types/ejs/index.d.ts diff --git a/ejs/tsconfig.json b/types/ejs/tsconfig.json similarity index 100% rename from ejs/tsconfig.json rename to types/ejs/tsconfig.json diff --git a/ejson/ejson-tests.ts b/types/ejson/ejson-tests.ts similarity index 100% rename from ejson/ejson-tests.ts rename to types/ejson/ejson-tests.ts diff --git a/ejson/index.d.ts b/types/ejson/index.d.ts similarity index 100% rename from ejson/index.d.ts rename to types/ejson/index.d.ts diff --git a/ejson/tsconfig.json b/types/ejson/tsconfig.json similarity index 100% rename from ejson/tsconfig.json rename to types/ejson/tsconfig.json diff --git a/elastic.js/elastic.js-tests.ts b/types/elastic.js/elastic.js-tests.ts similarity index 100% rename from elastic.js/elastic.js-tests.ts rename to types/elastic.js/elastic.js-tests.ts diff --git a/elastic.js/index.d.ts b/types/elastic.js/index.d.ts similarity index 100% rename from elastic.js/index.d.ts rename to types/elastic.js/index.d.ts diff --git a/elastic.js/tsconfig.json b/types/elastic.js/tsconfig.json similarity index 100% rename from elastic.js/tsconfig.json rename to types/elastic.js/tsconfig.json diff --git a/elasticsearch/elasticsearch-tests.ts b/types/elasticsearch/elasticsearch-tests.ts similarity index 100% rename from elasticsearch/elasticsearch-tests.ts rename to types/elasticsearch/elasticsearch-tests.ts diff --git a/elasticsearch/index.d.ts b/types/elasticsearch/index.d.ts similarity index 100% rename from elasticsearch/index.d.ts rename to types/elasticsearch/index.d.ts diff --git a/elasticsearch/tsconfig.json b/types/elasticsearch/tsconfig.json similarity index 100% rename from elasticsearch/tsconfig.json rename to types/elasticsearch/tsconfig.json diff --git a/electron-builder/electron-builder-tests.ts b/types/electron-builder/electron-builder-tests.ts similarity index 100% rename from electron-builder/electron-builder-tests.ts rename to types/electron-builder/electron-builder-tests.ts diff --git a/electron-builder/index.d.ts b/types/electron-builder/index.d.ts similarity index 100% rename from electron-builder/index.d.ts rename to types/electron-builder/index.d.ts diff --git a/electron-builder/tsconfig.json b/types/electron-builder/tsconfig.json similarity index 100% rename from electron-builder/tsconfig.json rename to types/electron-builder/tsconfig.json diff --git a/electron-debug/electron-debug-tests.ts b/types/electron-debug/electron-debug-tests.ts similarity index 100% rename from electron-debug/electron-debug-tests.ts rename to types/electron-debug/electron-debug-tests.ts diff --git a/electron-debug/index.d.ts b/types/electron-debug/index.d.ts similarity index 100% rename from electron-debug/index.d.ts rename to types/electron-debug/index.d.ts diff --git a/electron-debug/tsconfig.json b/types/electron-debug/tsconfig.json similarity index 100% rename from electron-debug/tsconfig.json rename to types/electron-debug/tsconfig.json diff --git a/electron-devtools-installer/electron-devtools-installer-tests.ts b/types/electron-devtools-installer/electron-devtools-installer-tests.ts similarity index 100% rename from electron-devtools-installer/electron-devtools-installer-tests.ts rename to types/electron-devtools-installer/electron-devtools-installer-tests.ts diff --git a/electron-devtools-installer/index.d.ts b/types/electron-devtools-installer/index.d.ts similarity index 100% rename from electron-devtools-installer/index.d.ts rename to types/electron-devtools-installer/index.d.ts diff --git a/electron-devtools-installer/tsconfig.json b/types/electron-devtools-installer/tsconfig.json similarity index 100% rename from electron-devtools-installer/tsconfig.json rename to types/electron-devtools-installer/tsconfig.json diff --git a/electron-json-storage/electron-json-storage-tests.ts b/types/electron-json-storage/electron-json-storage-tests.ts similarity index 100% rename from electron-json-storage/electron-json-storage-tests.ts rename to types/electron-json-storage/electron-json-storage-tests.ts diff --git a/electron-json-storage/index.d.ts b/types/electron-json-storage/index.d.ts similarity index 100% rename from electron-json-storage/index.d.ts rename to types/electron-json-storage/index.d.ts diff --git a/electron-json-storage/tsconfig.json b/types/electron-json-storage/tsconfig.json similarity index 100% rename from electron-json-storage/tsconfig.json rename to types/electron-json-storage/tsconfig.json diff --git a/electron-notifications/electron-notifications-tests.ts b/types/electron-notifications/electron-notifications-tests.ts similarity index 100% rename from electron-notifications/electron-notifications-tests.ts rename to types/electron-notifications/electron-notifications-tests.ts diff --git a/electron-notifications/index.d.ts b/types/electron-notifications/index.d.ts similarity index 100% rename from electron-notifications/index.d.ts rename to types/electron-notifications/index.d.ts diff --git a/electron-notifications/tsconfig.json b/types/electron-notifications/tsconfig.json similarity index 100% rename from electron-notifications/tsconfig.json rename to types/electron-notifications/tsconfig.json diff --git a/electron-notify/electron-notify-tests.ts b/types/electron-notify/electron-notify-tests.ts similarity index 100% rename from electron-notify/electron-notify-tests.ts rename to types/electron-notify/electron-notify-tests.ts diff --git a/electron-notify/index.d.ts b/types/electron-notify/index.d.ts similarity index 100% rename from electron-notify/index.d.ts rename to types/electron-notify/index.d.ts diff --git a/electron-notify/tsconfig.json b/types/electron-notify/tsconfig.json similarity index 100% rename from electron-notify/tsconfig.json rename to types/electron-notify/tsconfig.json diff --git a/electron-packager/electron-packager-tests.ts b/types/electron-packager/electron-packager-tests.ts similarity index 100% rename from electron-packager/electron-packager-tests.ts rename to types/electron-packager/electron-packager-tests.ts diff --git a/electron-packager/index.d.ts b/types/electron-packager/index.d.ts similarity index 100% rename from electron-packager/index.d.ts rename to types/electron-packager/index.d.ts diff --git a/electron-packager/tsconfig.json b/types/electron-packager/tsconfig.json similarity index 100% rename from electron-packager/tsconfig.json rename to types/electron-packager/tsconfig.json diff --git a/electron-window-state/electron-window-state-tests.ts b/types/electron-window-state/electron-window-state-tests.ts similarity index 100% rename from electron-window-state/electron-window-state-tests.ts rename to types/electron-window-state/electron-window-state-tests.ts diff --git a/electron-window-state/index.d.ts b/types/electron-window-state/index.d.ts similarity index 100% rename from electron-window-state/index.d.ts rename to types/electron-window-state/index.d.ts diff --git a/electron-window-state/tsconfig.json b/types/electron-window-state/tsconfig.json similarity index 100% rename from electron-window-state/tsconfig.json rename to types/electron-window-state/tsconfig.json diff --git a/electron/.editorconfig b/types/electron/.editorconfig similarity index 100% rename from electron/.editorconfig rename to types/electron/.editorconfig diff --git a/electron/index.d.ts b/types/electron/index.d.ts similarity index 99% rename from electron/index.d.ts rename to types/electron/index.d.ts index 11103b3a18..6e257c4261 100644 --- a/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/electron/test/index.ts b/types/electron/test/index.ts similarity index 100% rename from electron/test/index.ts rename to types/electron/test/index.ts diff --git a/electron/test/main.ts b/types/electron/test/main.ts similarity index 99% rename from electron/test/main.ts rename to types/electron/test/main.ts index 35a85a81dc..67a1a9954d 100644 --- a/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/electron/test/renderer.ts b/types/electron/test/renderer.ts similarity index 100% rename from electron/test/renderer.ts rename to types/electron/test/renderer.ts diff --git a/electron/tsconfig.json b/types/electron/tsconfig.json similarity index 100% rename from electron/tsconfig.json rename to types/electron/tsconfig.json diff --git a/element-resize-event/element-resize-event-tests.ts b/types/element-resize-event/element-resize-event-tests.ts similarity index 100% rename from element-resize-event/element-resize-event-tests.ts rename to types/element-resize-event/element-resize-event-tests.ts diff --git a/element-resize-event/index.d.ts b/types/element-resize-event/index.d.ts similarity index 100% rename from element-resize-event/index.d.ts rename to types/element-resize-event/index.d.ts diff --git a/element-resize-event/tsconfig.json b/types/element-resize-event/tsconfig.json similarity index 100% rename from element-resize-event/tsconfig.json rename to types/element-resize-event/tsconfig.json diff --git a/elm/elm-tests.ts b/types/elm/elm-tests.ts similarity index 100% rename from elm/elm-tests.ts rename to types/elm/elm-tests.ts diff --git a/elm/index.d.ts b/types/elm/index.d.ts similarity index 100% rename from elm/index.d.ts rename to types/elm/index.d.ts diff --git a/elm/tsconfig.json b/types/elm/tsconfig.json similarity index 100% rename from elm/tsconfig.json rename to types/elm/tsconfig.json diff --git a/email-addresses/email-addresses-tests.ts b/types/email-addresses/email-addresses-tests.ts similarity index 100% rename from email-addresses/email-addresses-tests.ts rename to types/email-addresses/email-addresses-tests.ts diff --git a/email-addresses/index.d.ts b/types/email-addresses/index.d.ts similarity index 100% rename from email-addresses/index.d.ts rename to types/email-addresses/index.d.ts diff --git a/email-addresses/tsconfig.json b/types/email-addresses/tsconfig.json similarity index 100% rename from email-addresses/tsconfig.json rename to types/email-addresses/tsconfig.json diff --git a/email-templates/email-templates-tests.ts b/types/email-templates/email-templates-tests.ts similarity index 100% rename from email-templates/email-templates-tests.ts rename to types/email-templates/email-templates-tests.ts diff --git a/email-templates/index.d.ts b/types/email-templates/index.d.ts similarity index 100% rename from email-templates/index.d.ts rename to types/email-templates/index.d.ts diff --git a/email-templates/tsconfig.json b/types/email-templates/tsconfig.json similarity index 100% rename from email-templates/tsconfig.json rename to types/email-templates/tsconfig.json diff --git a/email-validator/email-validator-tests.ts b/types/email-validator/email-validator-tests.ts similarity index 100% rename from email-validator/email-validator-tests.ts rename to types/email-validator/email-validator-tests.ts diff --git a/email-validator/index.d.ts b/types/email-validator/index.d.ts similarity index 100% rename from email-validator/index.d.ts rename to types/email-validator/index.d.ts diff --git a/email-validator/tsconfig.json b/types/email-validator/tsconfig.json similarity index 100% rename from email-validator/tsconfig.json rename to types/email-validator/tsconfig.json diff --git a/ember/ember-tests.ts b/types/ember/ember-tests.ts similarity index 82% rename from ember/ember-tests.ts rename to types/ember/ember-tests.ts index 91e1f61f6f..99f00aae6f 100644 --- a/ember/ember-tests.ts +++ b/types/ember/ember-tests.ts @@ -1,4 +1,4 @@ -var App: any; +let App: any; App = Em.Application.create(); @@ -22,7 +22,7 @@ declare class MyPerson extends Em.Object { static createMan(): MyPerson; } -var Person1 = Em.Object.extend({ +const Person1 = Em.Object.extend({ say: (thing: string) => { alert(thing); } @@ -31,7 +31,7 @@ var Person1 = Em.Object.extend({ declare class MyPerson2 extends Em.Object { helloWorld(): void; } -var tom = Person1.create({ +const tom = Person1.create({ name: 'Tom Dale', helloWorld() { this.say('Hi my name is ' + this.get('name')); @@ -48,10 +48,9 @@ Person1.reopenClass({ } }); // ReSharper disable once DuplicatingLocalDeclaration -declare var Person1: typeof MyPerson; Person1.createMan().get('isMan'); -var person = Person1.create({ +const person = Person1.create({ firstName: 'Yehuda', lastName: 'Katz' }); @@ -63,13 +62,13 @@ App.todosController = Em.Object.create({ Em.Object.create({ isDone: false }) ], remaining: (function() { - var todos = this.get('todos'); + const todos = this.get('todos'); return todos.filterProperty('isDone', false).get('length'); }).property('todos.@each.isDone') }); -var todos = App.todosController.get('todos'); -var todo = todos.objectAt(0); +const todos = App.todosController.get('todos'); +let todo = todos.objectAt(0); todo.set('isDone', true); App.todosController.get('remaining'); todo = Em.Object.create({ isDone: false }); @@ -109,29 +108,29 @@ App.userController = Em.Object.create({ Handlebars.registerHelper('highlight', (property: string, options: any) => new Handlebars.SafeString('' + "some value" + '')); -var coolView = App.CoolView.create(); +const coolView = App.CoolView.create(); -var Person2 = Em.Object.extend({ +const Person2 = Em.Object.extend({ sayHello() { console.log('Hello from ' + this.get('name')); } }); -var people = [ +const people = [ Person2.create({ name: 'Juan' }), Person2.create({ name: 'Charles' }), Person2.create({ name: 'Majd' }) ]; people.invoke('sayHello'); -var arr = [Em.Object.create(), Em.Object.create()]; +const arr = [Em.Object.create(), Em.Object.create()]; arr.setEach('name', 'unknown'); arr.getEach('name'); -var Person3 = Em.Object.extend({ +const Person3 = Em.Object.extend({ name: null, isHappy: false }); -var people2 = [ +const people2 = [ Person3.create({ name: 'Yehuda', isHappy: true }), Person3.create({ name: 'Majd', isHappy: false }) ]; @@ -145,7 +144,7 @@ people2.everyProperty('isHappy', true); people2.someProperty('isHappy', true); // Examples taken from http://emberjs.com/api/classes/Em.RSVP.Promise.html -var promise = new Em.RSVP.Promise((resolve: Function, reject: Function) => { +const promise = new Em.RSVP.Promise((resolve: Function, reject: Function) => { // on success resolve('ok!'); @@ -159,15 +158,15 @@ promise.then((value: any) => { // on rejection }); -var mix1 = Ember.Mixin.create({ +const mix1 = Ember.Mixin.create({ foo: 1 }); -var mix2 = Ember.Mixin.create({ +const mix2 = Ember.Mixin.create({ bar: 2 }); -var component1 = Ember.Component.extend( mix1, mix2, { +const component1 = Ember.Component.extend( mix1, mix2, { lyft: Ember.inject.service(), cars: Ember.computed.readOnly('lyft.cars') }); diff --git a/ember/index.d.ts b/types/ember/index.d.ts similarity index 98% rename from ember/index.d.ts rename to types/ember/index.d.ts index dca7004163..1e014759cc 100644 --- a/ember/index.d.ts +++ b/types/ember/index.d.ts @@ -7,7 +7,6 @@ /// declare namespace EmberStates { - interface Transition { targetName: string; urlMethod: string; @@ -151,16 +150,13 @@ declare namespace EmberStates { */ followRedirects(): Ember.RSVP.Promise; } - } // Get an alias to the global Array type to use in inner scope below. type GlobalArray = T[]; declare namespace EmberTesting { - namespace Test { - class Adapter { asyncEnd(): void; asyncStart(): void; @@ -168,9 +164,7 @@ declare namespace EmberTesting { } class QUnitAdapter extends Adapter { } - } - } interface Function { @@ -349,13 +343,10 @@ interface EnumerableConfigurationOptions { type ItemIndexEnumerableCallbackTarget = (callback: ItemIndexEnumerableCallback, target?: any) => any[]; - type ItemIndexEnumerableCallback = (item: any, index: number, enumerable: Ember.Enumerable) => void; - type ReduceCallback = (previousValue: any, item: any, index: number, enumerable: Ember.Enumerable) => void; - interface TransitionsHash { contexts: any[]; exitStates: Ember.State[]; @@ -388,7 +379,7 @@ declare namespace Ember { Alias for jQuery. **/ // ReSharper disable once DuplicatingLocalDeclaration - var $: JQueryStatic; + const $: JQueryStatic; /** Creates an Ember.NativeArray from an Array like object. Does not modify the original object. Ember.A is not needed if Ember.EXTEND_PROTOTYPES is true (the default value). However, it is @@ -651,7 +642,7 @@ declare namespace Ember { removeObject(object: any): any; removeObjects(objects: Enumerable): MutableEnumberable; } - var BOOTED: boolean; + const BOOTED: boolean; /** Connects the properties of two objects so that whenever the value of one property changes, the other property will be changed also. @@ -967,17 +958,17 @@ declare namespace Ember { **/ class Descriptor { } namespace ENV { - export var EXTEND_PROTOTYPES: typeof Ember.EXTEND_PROTOTYPES; - export var LOG_BINDINGS: boolean; - export var LOG_STACKTRACE_ON_DEPRECATION: boolean; - export var LOG_VERSION: boolean; - export var MODEL_FACTORY_INJECTIONS: boolean; - export var RAISE_ON_DEPRECATION: boolean; + const EXTEND_PROTOTYPES: typeof Ember.EXTEND_PROTOTYPES; + const LOG_BINDINGS: boolean; + const LOG_STACKTRACE_ON_DEPRECATION: boolean; + const LOG_VERSION: boolean; + const MODEL_FACTORY_INJECTIONS: boolean; + const RAISE_ON_DEPRECATION: boolean; } namespace EXTEND_PROTOTYPES { - export var Array: boolean; - export var Function: boolean; - export var String: boolean; + const Array: boolean; + const Function: boolean; + const String: boolean; } /** This is the object instance returned when you get the @each property on an array. It uses @@ -1049,7 +1040,7 @@ declare namespace Ember { **/ // Restore this to 'typeof Error' when https://github.com/Microsoft/TypeScript/issues/983 is resolved // ReSharper disable once DuplicatingLocalDeclaration - var Error: any; // typeof Error; + const Error: any; // typeof Error; /** Handles delegating browser events to their corresponding Ember.Views. For example, when you click on a view, Ember.EventDispatcher ensures that that view's mouseDown method gets called. @@ -1082,12 +1073,12 @@ declare namespace Ember { one(name: string, target: any, method: Function): Evented; trigger(name: string, ...args: string[]): void; } - var FROZEN_ERROR: string; + const FROZEN_ERROR: string; class Freezable { freeze(): Freezable; isFrozen: boolean; } - var GUID_KEY: string; + const GUID_KEY: string; namespace Handlebars { function compile(string: string): Function; function compile(environment: any, options?: any, context?: any, asObject?: any): any; @@ -1104,7 +1095,7 @@ declare namespace Ember { } function parse(string: string): any; function print(ast: any): void; - var logger: typeof Ember.Logger; + const logger: typeof Ember.Logger; function log(level: string, str: string): void; } class HashLocation extends Object { @@ -1140,8 +1131,8 @@ declare namespace Ember { static isMethod: boolean; rootURL: string; } - var IS_BINDING: RegExp; - var inject: { + const IS_BINDING: RegExp; + const inject: { controller(name?: string): Controller; service(name?: string): Service; }; @@ -1158,15 +1149,15 @@ declare namespace Ember { subscribe(pattern: string, object: any): void; unsubscribe(subscriber: any): void; } - var K: Function; - var LOG_BINDINGS: boolean; - var LOG_STACKTRACE_ON_DEPRECATION: boolean; - var LOG_VERSION: boolean; + const K: Function; + const LOG_BINDINGS: boolean; + const LOG_STACKTRACE_ON_DEPRECATION: boolean; + const LOG_VERSION: boolean; class Location { create(options?: {}): any; registerImplementation(name: string, implementation: any): void; } - var Logger: { + const Logger: { assert(param: any): void; debug(...args: any[]): void; error(...args: any[]): void; @@ -1175,7 +1166,7 @@ declare namespace Ember { warn(...args: any[]): void; }; function MANDATORY_SETTER_FUNCTION(value: string): void; - var META_KEY: string; + const META_KEY: string; class Map { copy(): Map; static create(): Map; @@ -1305,7 +1296,7 @@ declare namespace Ember { hasEnumerableObservers: boolean; lastObject: any; } - var NAME_KEY: string; + const NAME_KEY: string; class Namespace extends Object { static detect(obj: any): boolean; static detectInstance(obj: any): boolean; @@ -1425,7 +1416,7 @@ declare namespace Ember { static isClass: boolean; static isMethod: boolean; } - var ORDER_DEFINITION: string[]; + const ORDER_DEFINITION: string[]; class Object extends CoreObject implements Observable { addObserver: ModifyObserver; beginPropertyChanges(): Observable; @@ -1530,7 +1521,6 @@ declare namespace Ember { } class Promise implements Thenable { - /** Promise objects represent the eventual result of an asynchronous operation. The primary way of interacting with a promise is through its `then` method, which @@ -1591,7 +1581,6 @@ declare namespace Ember { the [routing guide](http://emberjs.com/guides/routing/) for documentation. */ class Route extends Object implements ActionHandlerMixin, Evented { - static isClass: boolean; static isMethod: boolean; @@ -1817,7 +1806,6 @@ declare namespace Ember { */ redirect(): EmberStates.Transition; - /** Refresh the model on this route and any child routes, firing the `beforeModel`, `model`, and `afterModel` hooks in a similar fashion @@ -2157,7 +2145,7 @@ declare namespace Ember { toggleProperty(keyName: string): boolean; /* /Observable */ } - var STRINGS: boolean; + const STRINGS: boolean; class State extends Object implements Evented { static detect(obj: any): boolean; static detectInstance(obj: any): boolean; @@ -2236,7 +2224,7 @@ declare namespace Ember { function underscore(str: string): string; function w(str: string): string[]; } - var TEMPLATES: {}; + const TEMPLATES: {}; class TargetActionSupport { triggerAction(opts: {}): boolean; } @@ -2253,8 +2241,8 @@ declare namespace Ember { function registerHelper(name: string, helperMethod: Function): void; function registerAsyncHelper(name: string, helperMethod: Function): void; - var adapter: Object; - var QUnitAdapter: Object; + const adapter: Object; + const QUnitAdapter: Object; function registerWaiter(callback: Function): void; function registerWaiter(context: any, callback: Function): void; @@ -2325,18 +2313,18 @@ declare namespace Ember { bubbles: boolean; onEvent: string; } - var VERSION: string; + const VERSION: string; class ViewTargetActionSupport extends Mixin { target: any; actionContext: any; } - var ViewUtils: {}; // TODO: define interface + const ViewUtils: {}; // TODO: define interface function addListener(obj: any, eventName: string, target: Function | any, method: Function | string, once?: boolean): void; - var addObserver: ModifyObserver; + const addObserver: ModifyObserver; /** Ember.alias is deprecated. Please use Ember.aliasMethod or Ember.computed.alias instead. **/ - var alias: typeof deprecateFunc; + const alias: typeof deprecateFunc; function aliasMethod(methodName: string): Descriptor; function assert(desc: string, test: boolean): void; function beginPropertyChanges(): void; @@ -2346,7 +2334,7 @@ declare namespace Ember { function changeProperties(callback: Function, binding?: any): void; function compare(v: any, w: any): number; // ReSharper disable once DuplicatingLocalDeclaration - var computed: { + const computed: { (...args: any[]): ComputedProperty; alias(dependentKey: string): ComputedProperty; and(...args: string[]): ComputedProperty; @@ -2385,7 +2373,7 @@ declare namespace Ember { Ember.empty is deprecated. Please use Ember.isEmpty instead. **/ // ReSharper disable once DuplicatingLocalDeclaration - var empty: typeof deprecateFunc; + const empty: typeof deprecateFunc; function endPropertyChanges(): void; function finishChains(obj: any): void; function generateController(container: Container, controllerName: string, context: any): Controller; @@ -2394,7 +2382,7 @@ declare namespace Ember { /** getPath is deprecated since get now supports paths. **/ - var getPath: typeof deprecateFunc; + const getPath: typeof deprecateFunc; function getWithDefault(root: string, key: string, defaultValue: any): any; function guidFor(obj: any): string; function handleErrors(func: Function, context: any): any; @@ -2407,7 +2395,7 @@ declare namespace Ember { function isEmpty(obj: any): boolean; function isEqual(a: any, b: any): boolean; function isGlobalPath(path: string): boolean; - var isNamespace: boolean; + const isNamespace: boolean; function isNone(obj: any): boolean; function isPrototypeOf(obj: {}): boolean; function isWatching(obj: any, key: string): boolean; @@ -2416,7 +2404,7 @@ declare namespace Ember { function listenersFor(obj: any, eventName: string): any[]; function listenersUnion(obj: any, eventName: string, otherActions: any[]): void; // ReSharper disable once DuplicatingLocalDeclaration - var lookup: {}; // TODO: define interface + const lookup: {}; // TODO: define interface function makeArray(obj: any): any[]; function merge(original: any, updates: any): any; function meta(obj: any): {}; @@ -2424,14 +2412,14 @@ declare namespace Ember { /** Ember.none is deprecated. Please use Ember.isNone instead. **/ - var none: typeof deprecateFunc; + const none: typeof deprecateFunc; function observer(...args: any[]): Function; function observersFor(obj: any, path: string): any[]; function onLoad(name: string, callback: Function): void; - var onError: Error; + const onError: Error; function overrideChains(obj: any, keyName: string, m: any): boolean; // ReSharper disable once DuplicatingLocalDeclaration - var platform: { + const platform: { defineProperty: boolean; hasPropertyAccessors: boolean; }; @@ -2443,7 +2431,7 @@ declare namespace Ember { function removeObserver(obj: any, path: string, target: any, method: Function): any; function required(): Descriptor; function rewatch(obj: any): void; - var run: { + const run: { (method: Function): void; (target: any, method: Function): void; begin(): void; @@ -2466,7 +2454,7 @@ declare namespace Ember { /** setPath is deprecated since set now supports paths. **/ - var setPath: typeof deprecateFunc; + const setPath: typeof deprecateFunc; function setProperties(self: any, hash: {}): any; function subscribe(pattern: string, object: any): void; function toLocaleString(): string; @@ -2477,13 +2465,13 @@ declare namespace Ember { /** trySetPath has been renamed to trySet. **/ - var trySetPath: typeof deprecateFunc; + const trySetPath: typeof deprecateFunc; function typeOf(item: any): string; function unwatch(obj: any, keyPath: string): void; function unwatchKey(obj: any, keyName: string): void; function unwatchPath(obj: any, keyPath: string): void; // ReSharper disable once DuplicatingLocalDeclaration - var uuid: number; + const uuid: number; function valueOf(): {}; function warn(message: string, test?: boolean): void; function watch(obj: any, keyPath: string): void; @@ -2491,18 +2479,17 @@ declare namespace Ember { function watchPath(obj: any, keyPath: string): void; function watchedEvents(obj: {}): any[]; function wrap(func: Function, superFunc: Function): Function; - var _ContainerProxyMixin: Mixin; - var _RegistryProxyMixin: Mixin; + const _ContainerProxyMixin: Mixin; + const _RegistryProxyMixin: Mixin; function getOwner(object: any): any; function setOwner(object: any, owner: any): void; - var testing: boolean; - var MODEL_FACTORY_INJECTIONS: boolean; + const testing: boolean; + const MODEL_FACTORY_INJECTIONS: boolean; function assign(original: any, ...sources: any[]): any; } import Em = Ember; - /** * External ambient module - to allow "import Ember from 'ember';" to work correctly */ diff --git a/ember/tsconfig.json b/types/ember/tsconfig.json similarity index 100% rename from ember/tsconfig.json rename to types/ember/tsconfig.json diff --git a/ember/tslint.json b/types/ember/tslint.json similarity index 100% rename from ember/tslint.json rename to types/ember/tslint.json diff --git a/ember/v1/ember-tests.ts b/types/ember/v1/ember-tests.ts similarity index 100% rename from ember/v1/ember-tests.ts rename to types/ember/v1/ember-tests.ts diff --git a/ember/v1/index.d.ts b/types/ember/v1/index.d.ts similarity index 100% rename from ember/v1/index.d.ts rename to types/ember/v1/index.d.ts diff --git a/ember/v1/tsconfig.json b/types/ember/v1/tsconfig.json similarity index 100% rename from ember/v1/tsconfig.json rename to types/ember/v1/tsconfig.json diff --git a/emissary/emissary-tests.ts b/types/emissary/emissary-tests.ts similarity index 100% rename from emissary/emissary-tests.ts rename to types/emissary/emissary-tests.ts diff --git a/emissary/index.d.ts b/types/emissary/index.d.ts similarity index 100% rename from emissary/index.d.ts rename to types/emissary/index.d.ts diff --git a/emissary/tsconfig.json b/types/emissary/tsconfig.json similarity index 100% rename from emissary/tsconfig.json rename to types/emissary/tsconfig.json diff --git a/emojione/emojione-tests.ts b/types/emojione/emojione-tests.ts similarity index 100% rename from emojione/emojione-tests.ts rename to types/emojione/emojione-tests.ts diff --git a/emojione/index.d.ts b/types/emojione/index.d.ts similarity index 100% rename from emojione/index.d.ts rename to types/emojione/index.d.ts diff --git a/emojione/tsconfig.json b/types/emojione/tsconfig.json similarity index 100% rename from emojione/tsconfig.json rename to types/emojione/tsconfig.json diff --git a/emojione/tslint.json b/types/emojione/tslint.json similarity index 100% rename from emojione/tslint.json rename to types/emojione/tslint.json diff --git a/empower/empower-tests.ts b/types/empower/empower-tests.ts similarity index 100% rename from empower/empower-tests.ts rename to types/empower/empower-tests.ts diff --git a/empower/index.d.ts b/types/empower/index.d.ts similarity index 100% rename from empower/index.d.ts rename to types/empower/index.d.ts diff --git a/empower/tsconfig.json b/types/empower/tsconfig.json similarity index 100% rename from empower/tsconfig.json rename to types/empower/tsconfig.json diff --git a/emscripten/emscripten-tests.ts b/types/emscripten/emscripten-tests.ts similarity index 100% rename from emscripten/emscripten-tests.ts rename to types/emscripten/emscripten-tests.ts diff --git a/emscripten/index.d.ts b/types/emscripten/index.d.ts similarity index 100% rename from emscripten/index.d.ts rename to types/emscripten/index.d.ts diff --git a/emscripten/tsconfig.json b/types/emscripten/tsconfig.json similarity index 100% rename from emscripten/tsconfig.json rename to types/emscripten/tsconfig.json diff --git a/encoding-japanese/encoding-japanese-tests.ts b/types/encoding-japanese/encoding-japanese-tests.ts similarity index 100% rename from encoding-japanese/encoding-japanese-tests.ts rename to types/encoding-japanese/encoding-japanese-tests.ts diff --git a/encoding-japanese/index.d.ts b/types/encoding-japanese/index.d.ts similarity index 100% rename from encoding-japanese/index.d.ts rename to types/encoding-japanese/index.d.ts diff --git a/encoding-japanese/tsconfig.json b/types/encoding-japanese/tsconfig.json similarity index 100% rename from encoding-japanese/tsconfig.json rename to types/encoding-japanese/tsconfig.json diff --git a/enhanced-resolve/index.d.ts b/types/enhanced-resolve/index.d.ts similarity index 100% rename from enhanced-resolve/index.d.ts rename to types/enhanced-resolve/index.d.ts diff --git a/enhanced-resolve/lib/AliasFieldPlugin.d.ts b/types/enhanced-resolve/lib/AliasFieldPlugin.d.ts similarity index 100% rename from enhanced-resolve/lib/AliasFieldPlugin.d.ts rename to types/enhanced-resolve/lib/AliasFieldPlugin.d.ts diff --git a/enhanced-resolve/lib/AliasPlugin.d.ts b/types/enhanced-resolve/lib/AliasPlugin.d.ts similarity index 100% rename from enhanced-resolve/lib/AliasPlugin.d.ts rename to types/enhanced-resolve/lib/AliasPlugin.d.ts diff --git a/enhanced-resolve/lib/AppendPlugin.d.ts b/types/enhanced-resolve/lib/AppendPlugin.d.ts similarity index 100% rename from enhanced-resolve/lib/AppendPlugin.d.ts rename to types/enhanced-resolve/lib/AppendPlugin.d.ts diff --git a/enhanced-resolve/lib/CloneBasenamePlugin.d.ts b/types/enhanced-resolve/lib/CloneBasenamePlugin.d.ts similarity index 100% rename from enhanced-resolve/lib/CloneBasenamePlugin.d.ts rename to types/enhanced-resolve/lib/CloneBasenamePlugin.d.ts diff --git a/enhanced-resolve/lib/ConcordExtensionsPlugin.d.ts b/types/enhanced-resolve/lib/ConcordExtensionsPlugin.d.ts similarity index 100% rename from enhanced-resolve/lib/ConcordExtensionsPlugin.d.ts rename to types/enhanced-resolve/lib/ConcordExtensionsPlugin.d.ts diff --git a/enhanced-resolve/lib/ConcordMainPlugin.d.ts b/types/enhanced-resolve/lib/ConcordMainPlugin.d.ts similarity index 100% rename from enhanced-resolve/lib/ConcordMainPlugin.d.ts rename to types/enhanced-resolve/lib/ConcordMainPlugin.d.ts diff --git a/enhanced-resolve/lib/ConcordModulesPlugin.d.ts b/types/enhanced-resolve/lib/ConcordModulesPlugin.d.ts similarity index 100% rename from enhanced-resolve/lib/ConcordModulesPlugin.d.ts rename to types/enhanced-resolve/lib/ConcordModulesPlugin.d.ts diff --git a/enhanced-resolve/lib/DescriptionFilePlugin.d.ts b/types/enhanced-resolve/lib/DescriptionFilePlugin.d.ts similarity index 100% rename from enhanced-resolve/lib/DescriptionFilePlugin.d.ts rename to types/enhanced-resolve/lib/DescriptionFilePlugin.d.ts diff --git a/enhanced-resolve/lib/DescriptionFileUtils.d.ts b/types/enhanced-resolve/lib/DescriptionFileUtils.d.ts similarity index 100% rename from enhanced-resolve/lib/DescriptionFileUtils.d.ts rename to types/enhanced-resolve/lib/DescriptionFileUtils.d.ts diff --git a/enhanced-resolve/lib/DirectoryExistsPlugin.d.ts b/types/enhanced-resolve/lib/DirectoryExistsPlugin.d.ts similarity index 100% rename from enhanced-resolve/lib/DirectoryExistsPlugin.d.ts rename to types/enhanced-resolve/lib/DirectoryExistsPlugin.d.ts diff --git a/enhanced-resolve/lib/FileExistsPlugin.d.ts b/types/enhanced-resolve/lib/FileExistsPlugin.d.ts similarity index 100% rename from enhanced-resolve/lib/FileExistsPlugin.d.ts rename to types/enhanced-resolve/lib/FileExistsPlugin.d.ts diff --git a/enhanced-resolve/lib/FileKindPlugin.d.ts b/types/enhanced-resolve/lib/FileKindPlugin.d.ts similarity index 100% rename from enhanced-resolve/lib/FileKindPlugin.d.ts rename to types/enhanced-resolve/lib/FileKindPlugin.d.ts diff --git a/enhanced-resolve/lib/JoinRequestPlugin.d.ts b/types/enhanced-resolve/lib/JoinRequestPlugin.d.ts similarity index 100% rename from enhanced-resolve/lib/JoinRequestPlugin.d.ts rename to types/enhanced-resolve/lib/JoinRequestPlugin.d.ts diff --git a/enhanced-resolve/lib/LogInfoPlugin.d.ts b/types/enhanced-resolve/lib/LogInfoPlugin.d.ts similarity index 100% rename from enhanced-resolve/lib/LogInfoPlugin.d.ts rename to types/enhanced-resolve/lib/LogInfoPlugin.d.ts diff --git a/enhanced-resolve/lib/MainFieldPlugin.d.ts b/types/enhanced-resolve/lib/MainFieldPlugin.d.ts similarity index 100% rename from enhanced-resolve/lib/MainFieldPlugin.d.ts rename to types/enhanced-resolve/lib/MainFieldPlugin.d.ts diff --git a/enhanced-resolve/lib/ModuleAppendPlugin.d.ts b/types/enhanced-resolve/lib/ModuleAppendPlugin.d.ts similarity index 100% rename from enhanced-resolve/lib/ModuleAppendPlugin.d.ts rename to types/enhanced-resolve/lib/ModuleAppendPlugin.d.ts diff --git a/enhanced-resolve/lib/ModuleKindPlugin.d.ts b/types/enhanced-resolve/lib/ModuleKindPlugin.d.ts similarity index 100% rename from enhanced-resolve/lib/ModuleKindPlugin.d.ts rename to types/enhanced-resolve/lib/ModuleKindPlugin.d.ts diff --git a/enhanced-resolve/lib/ModulesInHierachicDirectoriesPlugin.d.ts b/types/enhanced-resolve/lib/ModulesInHierachicDirectoriesPlugin.d.ts similarity index 100% rename from enhanced-resolve/lib/ModulesInHierachicDirectoriesPlugin.d.ts rename to types/enhanced-resolve/lib/ModulesInHierachicDirectoriesPlugin.d.ts diff --git a/enhanced-resolve/lib/ModulesInRootPlugin.d.ts b/types/enhanced-resolve/lib/ModulesInRootPlugin.d.ts similarity index 100% rename from enhanced-resolve/lib/ModulesInRootPlugin.d.ts rename to types/enhanced-resolve/lib/ModulesInRootPlugin.d.ts diff --git a/enhanced-resolve/lib/NextPlugin.d.ts b/types/enhanced-resolve/lib/NextPlugin.d.ts similarity index 100% rename from enhanced-resolve/lib/NextPlugin.d.ts rename to types/enhanced-resolve/lib/NextPlugin.d.ts diff --git a/enhanced-resolve/lib/ParsePlugin.d.ts b/types/enhanced-resolve/lib/ParsePlugin.d.ts similarity index 100% rename from enhanced-resolve/lib/ParsePlugin.d.ts rename to types/enhanced-resolve/lib/ParsePlugin.d.ts diff --git a/enhanced-resolve/lib/Resolver.d.ts b/types/enhanced-resolve/lib/Resolver.d.ts similarity index 100% rename from enhanced-resolve/lib/Resolver.d.ts rename to types/enhanced-resolve/lib/Resolver.d.ts diff --git a/enhanced-resolve/lib/ResultPlugin.d.ts b/types/enhanced-resolve/lib/ResultPlugin.d.ts similarity index 100% rename from enhanced-resolve/lib/ResultPlugin.d.ts rename to types/enhanced-resolve/lib/ResultPlugin.d.ts diff --git a/enhanced-resolve/lib/Storage.d.ts b/types/enhanced-resolve/lib/Storage.d.ts similarity index 100% rename from enhanced-resolve/lib/Storage.d.ts rename to types/enhanced-resolve/lib/Storage.d.ts diff --git a/enhanced-resolve/lib/SymlinkPlugin.d.ts b/types/enhanced-resolve/lib/SymlinkPlugin.d.ts similarity index 100% rename from enhanced-resolve/lib/SymlinkPlugin.d.ts rename to types/enhanced-resolve/lib/SymlinkPlugin.d.ts diff --git a/enhanced-resolve/lib/SyncAsyncFileSystemDecorator.d.ts b/types/enhanced-resolve/lib/SyncAsyncFileSystemDecorator.d.ts similarity index 100% rename from enhanced-resolve/lib/SyncAsyncFileSystemDecorator.d.ts rename to types/enhanced-resolve/lib/SyncAsyncFileSystemDecorator.d.ts diff --git a/enhanced-resolve/lib/TryNextPlugin.d.ts b/types/enhanced-resolve/lib/TryNextPlugin.d.ts similarity index 100% rename from enhanced-resolve/lib/TryNextPlugin.d.ts rename to types/enhanced-resolve/lib/TryNextPlugin.d.ts diff --git a/enhanced-resolve/lib/UnsafeCachePlugin.d.ts b/types/enhanced-resolve/lib/UnsafeCachePlugin.d.ts similarity index 100% rename from enhanced-resolve/lib/UnsafeCachePlugin.d.ts rename to types/enhanced-resolve/lib/UnsafeCachePlugin.d.ts diff --git a/enhanced-resolve/lib/UseFilePlugin.d.ts b/types/enhanced-resolve/lib/UseFilePlugin.d.ts similarity index 100% rename from enhanced-resolve/lib/UseFilePlugin.d.ts rename to types/enhanced-resolve/lib/UseFilePlugin.d.ts diff --git a/enhanced-resolve/lib/common-types.d.ts b/types/enhanced-resolve/lib/common-types.d.ts similarity index 100% rename from enhanced-resolve/lib/common-types.d.ts rename to types/enhanced-resolve/lib/common-types.d.ts diff --git a/enhanced-resolve/lib/concord.d.ts b/types/enhanced-resolve/lib/concord.d.ts similarity index 100% rename from enhanced-resolve/lib/concord.d.ts rename to types/enhanced-resolve/lib/concord.d.ts diff --git a/enhanced-resolve/lib/getPaths.d.ts b/types/enhanced-resolve/lib/getPaths.d.ts similarity index 100% rename from enhanced-resolve/lib/getPaths.d.ts rename to types/enhanced-resolve/lib/getPaths.d.ts diff --git a/enhanced-resolve/lib/globToRegExp.d.ts b/types/enhanced-resolve/lib/globToRegExp.d.ts similarity index 100% rename from enhanced-resolve/lib/globToRegExp.d.ts rename to types/enhanced-resolve/lib/globToRegExp.d.ts diff --git a/enhanced-resolve/test/index.ts b/types/enhanced-resolve/test/index.ts similarity index 100% rename from enhanced-resolve/test/index.ts rename to types/enhanced-resolve/test/index.ts diff --git a/enhanced-resolve/test/lib.ts b/types/enhanced-resolve/test/lib.ts similarity index 100% rename from enhanced-resolve/test/lib.ts rename to types/enhanced-resolve/test/lib.ts diff --git a/enhanced-resolve/tsconfig.json b/types/enhanced-resolve/tsconfig.json similarity index 100% rename from enhanced-resolve/tsconfig.json rename to types/enhanced-resolve/tsconfig.json diff --git a/ent/ent-tests.ts b/types/ent/ent-tests.ts similarity index 100% rename from ent/ent-tests.ts rename to types/ent/ent-tests.ts diff --git a/ent/index.d.ts b/types/ent/index.d.ts similarity index 100% rename from ent/index.d.ts rename to types/ent/index.d.ts diff --git a/ent/tsconfig.json b/types/ent/tsconfig.json similarity index 100% rename from ent/tsconfig.json rename to types/ent/tsconfig.json diff --git a/env-to-object/env-to-object-tests.ts b/types/env-to-object/env-to-object-tests.ts similarity index 100% rename from env-to-object/env-to-object-tests.ts rename to types/env-to-object/env-to-object-tests.ts diff --git a/env-to-object/index.d.ts b/types/env-to-object/index.d.ts similarity index 75% rename from env-to-object/index.d.ts rename to types/env-to-object/index.d.ts index 1ec7a3c994..8bbca83f48 100644 --- a/env-to-object/index.d.ts +++ b/types/env-to-object/index.d.ts @@ -4,11 +4,11 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace env { - export interface Mappings { + interface Mappings { [enviromentVariableName: string]: Mapping; } - export type Mapping = IntegerMapping | BooleanMapping | GenericMapping; + type Mapping = IntegerMapping | BooleanMapping | GenericMapping; interface GenericMapping { keypath: string; @@ -26,14 +26,14 @@ declare namespace env { strict: boolean; } - export interface Parsers { + interface Parsers { [parserName: string]: (str: string, opts: any) => any; } - export interface Options { + interface Options { parsers: Parsers; } } -declare function env(map: env.Mappings, options?: env.Options): any; +declare function env(map: env.Mappings, options?: env.Options): any; export = env; diff --git a/env-to-object/tsconfig.json b/types/env-to-object/tsconfig.json similarity index 100% rename from env-to-object/tsconfig.json rename to types/env-to-object/tsconfig.json diff --git a/env-to-object/tslint.json b/types/env-to-object/tslint.json similarity index 100% rename from env-to-object/tslint.json rename to types/env-to-object/tslint.json diff --git a/envify/envify-tests.ts b/types/envify/envify-tests.ts similarity index 100% rename from envify/envify-tests.ts rename to types/envify/envify-tests.ts diff --git a/envify/index.d.ts b/types/envify/index.d.ts similarity index 100% rename from envify/index.d.ts rename to types/envify/index.d.ts diff --git a/envify/tsconfig.json b/types/envify/tsconfig.json similarity index 100% rename from envify/tsconfig.json rename to types/envify/tsconfig.json diff --git a/enzyme/enzyme-tests.tsx b/types/enzyme/enzyme-tests.tsx similarity index 100% rename from enzyme/enzyme-tests.tsx rename to types/enzyme/enzyme-tests.tsx diff --git a/enzyme/index.d.ts b/types/enzyme/index.d.ts similarity index 100% rename from enzyme/index.d.ts rename to types/enzyme/index.d.ts diff --git a/enzyme/tsconfig.json b/types/enzyme/tsconfig.json similarity index 100% rename from enzyme/tsconfig.json rename to types/enzyme/tsconfig.json diff --git a/enzyme/tslint.json b/types/enzyme/tslint.json similarity index 100% rename from enzyme/tslint.json rename to types/enzyme/tslint.json diff --git a/eonasdan-bootstrap-datetimepicker/eonasdan-bootstrap-datetimepicker-tests.ts b/types/eonasdan-bootstrap-datetimepicker/eonasdan-bootstrap-datetimepicker-tests.ts similarity index 100% rename from eonasdan-bootstrap-datetimepicker/eonasdan-bootstrap-datetimepicker-tests.ts rename to types/eonasdan-bootstrap-datetimepicker/eonasdan-bootstrap-datetimepicker-tests.ts diff --git a/eonasdan-bootstrap-datetimepicker/index.d.ts b/types/eonasdan-bootstrap-datetimepicker/index.d.ts similarity index 100% rename from eonasdan-bootstrap-datetimepicker/index.d.ts rename to types/eonasdan-bootstrap-datetimepicker/index.d.ts diff --git a/eonasdan-bootstrap-datetimepicker/package.json b/types/eonasdan-bootstrap-datetimepicker/package.json similarity index 100% rename from eonasdan-bootstrap-datetimepicker/package.json rename to types/eonasdan-bootstrap-datetimepicker/package.json diff --git a/eonasdan-bootstrap-datetimepicker/tsconfig.json b/types/eonasdan-bootstrap-datetimepicker/tsconfig.json similarity index 100% rename from eonasdan-bootstrap-datetimepicker/tsconfig.json rename to types/eonasdan-bootstrap-datetimepicker/tsconfig.json diff --git a/epiceditor/epiceditor-tests.ts b/types/epiceditor/epiceditor-tests.ts similarity index 100% rename from epiceditor/epiceditor-tests.ts rename to types/epiceditor/epiceditor-tests.ts diff --git a/epiceditor/index.d.ts b/types/epiceditor/index.d.ts similarity index 100% rename from epiceditor/index.d.ts rename to types/epiceditor/index.d.ts diff --git a/epiceditor/tsconfig.json b/types/epiceditor/tsconfig.json similarity index 100% rename from epiceditor/tsconfig.json rename to types/epiceditor/tsconfig.json diff --git a/epub/epub-tests.ts b/types/epub/epub-tests.ts similarity index 100% rename from epub/epub-tests.ts rename to types/epub/epub-tests.ts diff --git a/epub/index.d.ts b/types/epub/index.d.ts similarity index 100% rename from epub/index.d.ts rename to types/epub/index.d.ts diff --git a/epub/tsconfig.json b/types/epub/tsconfig.json similarity index 100% rename from epub/tsconfig.json rename to types/epub/tsconfig.json diff --git a/eq.js/eq.js-tests.ts b/types/eq.js/eq.js-tests.ts similarity index 100% rename from eq.js/eq.js-tests.ts rename to types/eq.js/eq.js-tests.ts diff --git a/eq.js/index.d.ts b/types/eq.js/index.d.ts similarity index 100% rename from eq.js/index.d.ts rename to types/eq.js/index.d.ts diff --git a/eq.js/tsconfig.json b/types/eq.js/tsconfig.json similarity index 100% rename from eq.js/tsconfig.json rename to types/eq.js/tsconfig.json diff --git a/error-stack-parser/error-stack-parser-tests.ts b/types/error-stack-parser/error-stack-parser-tests.ts similarity index 100% rename from error-stack-parser/error-stack-parser-tests.ts rename to types/error-stack-parser/error-stack-parser-tests.ts diff --git a/error-stack-parser/index.d.ts b/types/error-stack-parser/index.d.ts similarity index 100% rename from error-stack-parser/index.d.ts rename to types/error-stack-parser/index.d.ts diff --git a/error-stack-parser/tsconfig.json b/types/error-stack-parser/tsconfig.json similarity index 100% rename from error-stack-parser/tsconfig.json rename to types/error-stack-parser/tsconfig.json diff --git a/errorhandler/errorhandler-tests.ts b/types/errorhandler/errorhandler-tests.ts similarity index 100% rename from errorhandler/errorhandler-tests.ts rename to types/errorhandler/errorhandler-tests.ts diff --git a/errorhandler/index.d.ts b/types/errorhandler/index.d.ts similarity index 100% rename from errorhandler/index.d.ts rename to types/errorhandler/index.d.ts diff --git a/errorhandler/tsconfig.json b/types/errorhandler/tsconfig.json similarity index 100% rename from errorhandler/tsconfig.json rename to types/errorhandler/tsconfig.json diff --git a/es6-collections/es6-collections-tests.ts b/types/es6-collections/es6-collections-tests.ts similarity index 100% rename from es6-collections/es6-collections-tests.ts rename to types/es6-collections/es6-collections-tests.ts diff --git a/es6-collections/index.d.ts b/types/es6-collections/index.d.ts similarity index 100% rename from es6-collections/index.d.ts rename to types/es6-collections/index.d.ts diff --git a/es6-collections/tsconfig.json b/types/es6-collections/tsconfig.json similarity index 100% rename from es6-collections/tsconfig.json rename to types/es6-collections/tsconfig.json diff --git a/es6-error/es6-error-tests.ts b/types/es6-error/es6-error-tests.ts similarity index 100% rename from es6-error/es6-error-tests.ts rename to types/es6-error/es6-error-tests.ts diff --git a/es6-error/index.d.ts b/types/es6-error/index.d.ts similarity index 100% rename from es6-error/index.d.ts rename to types/es6-error/index.d.ts diff --git a/es6-error/tsconfig.json b/types/es6-error/tsconfig.json similarity index 100% rename from es6-error/tsconfig.json rename to types/es6-error/tsconfig.json diff --git a/es6-promise/es6-promise-tests.ts b/types/es6-promise/es6-promise-tests.ts similarity index 100% rename from es6-promise/es6-promise-tests.ts rename to types/es6-promise/es6-promise-tests.ts diff --git a/es6-promise/index.d.ts b/types/es6-promise/index.d.ts similarity index 100% rename from es6-promise/index.d.ts rename to types/es6-promise/index.d.ts diff --git a/es6-promise/tsconfig.json b/types/es6-promise/tsconfig.json similarity index 100% rename from es6-promise/tsconfig.json rename to types/es6-promise/tsconfig.json diff --git a/es6-shim/es6-shim-tests.ts b/types/es6-shim/es6-shim-tests.ts similarity index 100% rename from es6-shim/es6-shim-tests.ts rename to types/es6-shim/es6-shim-tests.ts diff --git a/es6-shim/index.d.ts b/types/es6-shim/index.d.ts similarity index 100% rename from es6-shim/index.d.ts rename to types/es6-shim/index.d.ts diff --git a/es6-shim/tsconfig.json b/types/es6-shim/tsconfig.json similarity index 100% rename from es6-shim/tsconfig.json rename to types/es6-shim/tsconfig.json diff --git a/es6-weak-map/es6-weak-map-tests.ts b/types/es6-weak-map/es6-weak-map-tests.ts similarity index 100% rename from es6-weak-map/es6-weak-map-tests.ts rename to types/es6-weak-map/es6-weak-map-tests.ts diff --git a/es6-weak-map/index.d.ts b/types/es6-weak-map/index.d.ts similarity index 100% rename from es6-weak-map/index.d.ts rename to types/es6-weak-map/index.d.ts diff --git a/es6-weak-map/tsconfig.json b/types/es6-weak-map/tsconfig.json similarity index 100% rename from es6-weak-map/tsconfig.json rename to types/es6-weak-map/tsconfig.json diff --git a/es6-weak-map/tslint.json b/types/es6-weak-map/tslint.json similarity index 100% rename from es6-weak-map/tslint.json rename to types/es6-weak-map/tslint.json diff --git a/escape-html/escape-html-tests.ts b/types/escape-html/escape-html-tests.ts similarity index 100% rename from escape-html/escape-html-tests.ts rename to types/escape-html/escape-html-tests.ts diff --git a/escape-html/index.d.ts b/types/escape-html/index.d.ts similarity index 100% rename from escape-html/index.d.ts rename to types/escape-html/index.d.ts diff --git a/escape-html/tsconfig.json b/types/escape-html/tsconfig.json similarity index 100% rename from escape-html/tsconfig.json rename to types/escape-html/tsconfig.json diff --git a/escape-latex/escape-latex-tests.ts b/types/escape-latex/escape-latex-tests.ts similarity index 100% rename from escape-latex/escape-latex-tests.ts rename to types/escape-latex/escape-latex-tests.ts diff --git a/escape-latex/index.d.ts b/types/escape-latex/index.d.ts similarity index 100% rename from escape-latex/index.d.ts rename to types/escape-latex/index.d.ts diff --git a/escape-latex/tsconfig.json b/types/escape-latex/tsconfig.json similarity index 100% rename from escape-latex/tsconfig.json rename to types/escape-latex/tsconfig.json diff --git a/escape-string-regexp/escape-string-regexp-tests.ts b/types/escape-string-regexp/escape-string-regexp-tests.ts similarity index 100% rename from escape-string-regexp/escape-string-regexp-tests.ts rename to types/escape-string-regexp/escape-string-regexp-tests.ts diff --git a/escape-string-regexp/index.d.ts b/types/escape-string-regexp/index.d.ts similarity index 100% rename from escape-string-regexp/index.d.ts rename to types/escape-string-regexp/index.d.ts diff --git a/escape-string-regexp/tsconfig.json b/types/escape-string-regexp/tsconfig.json similarity index 100% rename from escape-string-regexp/tsconfig.json rename to types/escape-string-regexp/tsconfig.json diff --git a/escodegen/escodegen-tests.ts b/types/escodegen/escodegen-tests.ts similarity index 100% rename from escodegen/escodegen-tests.ts rename to types/escodegen/escodegen-tests.ts diff --git a/escodegen/index.d.ts b/types/escodegen/index.d.ts similarity index 100% rename from escodegen/index.d.ts rename to types/escodegen/index.d.ts diff --git a/escodegen/tsconfig.json b/types/escodegen/tsconfig.json similarity index 100% rename from escodegen/tsconfig.json rename to types/escodegen/tsconfig.json diff --git a/esprima-walk/esprima-walk-tests.ts b/types/esprima-walk/esprima-walk-tests.ts similarity index 100% rename from esprima-walk/esprima-walk-tests.ts rename to types/esprima-walk/esprima-walk-tests.ts diff --git a/esprima-walk/index.d.ts b/types/esprima-walk/index.d.ts similarity index 100% rename from esprima-walk/index.d.ts rename to types/esprima-walk/index.d.ts diff --git a/esprima-walk/tsconfig.json b/types/esprima-walk/tsconfig.json similarity index 100% rename from esprima-walk/tsconfig.json rename to types/esprima-walk/tsconfig.json diff --git a/esprima/esprima-tests.ts b/types/esprima/esprima-tests.ts similarity index 100% rename from esprima/esprima-tests.ts rename to types/esprima/esprima-tests.ts diff --git a/esprima/index.d.ts b/types/esprima/index.d.ts similarity index 100% rename from esprima/index.d.ts rename to types/esprima/index.d.ts diff --git a/esprima/tsconfig.json b/types/esprima/tsconfig.json similarity index 100% rename from esprima/tsconfig.json rename to types/esprima/tsconfig.json diff --git a/estraverse/estraverse-tests.ts b/types/estraverse/estraverse-tests.ts similarity index 100% rename from estraverse/estraverse-tests.ts rename to types/estraverse/estraverse-tests.ts diff --git a/estraverse/index.d.ts b/types/estraverse/index.d.ts similarity index 100% rename from estraverse/index.d.ts rename to types/estraverse/index.d.ts diff --git a/estraverse/tsconfig.json b/types/estraverse/tsconfig.json similarity index 100% rename from estraverse/tsconfig.json rename to types/estraverse/tsconfig.json diff --git a/estree/UNUSED_FILES.txt b/types/estree/UNUSED_FILES.txt similarity index 100% rename from estree/UNUSED_FILES.txt rename to types/estree/UNUSED_FILES.txt diff --git a/estree/estree-tests.ts b/types/estree/estree-tests.ts similarity index 100% rename from estree/estree-tests.ts rename to types/estree/estree-tests.ts diff --git a/estree/flow.d.ts b/types/estree/flow.d.ts similarity index 100% rename from estree/flow.d.ts rename to types/estree/flow.d.ts diff --git a/estree/index.d.ts b/types/estree/index.d.ts similarity index 100% rename from estree/index.d.ts rename to types/estree/index.d.ts diff --git a/estree/tsconfig.json b/types/estree/tsconfig.json similarity index 100% rename from estree/tsconfig.json rename to types/estree/tsconfig.json diff --git a/evaporate/evaporate-tests.ts b/types/evaporate/evaporate-tests.ts similarity index 100% rename from evaporate/evaporate-tests.ts rename to types/evaporate/evaporate-tests.ts diff --git a/evaporate/index.d.ts b/types/evaporate/index.d.ts similarity index 100% rename from evaporate/index.d.ts rename to types/evaporate/index.d.ts diff --git a/evaporate/tsconfig.json b/types/evaporate/tsconfig.json similarity index 100% rename from evaporate/tsconfig.json rename to types/evaporate/tsconfig.json diff --git a/event-kit/.editorconfig b/types/event-kit/.editorconfig similarity index 100% rename from event-kit/.editorconfig rename to types/event-kit/.editorconfig diff --git a/event-kit/event-kit-tests.ts b/types/event-kit/event-kit-tests.ts similarity index 100% rename from event-kit/event-kit-tests.ts rename to types/event-kit/event-kit-tests.ts diff --git a/event-kit/index.d.ts b/types/event-kit/index.d.ts similarity index 100% rename from event-kit/index.d.ts rename to types/event-kit/index.d.ts diff --git a/event-kit/tsconfig.json b/types/event-kit/tsconfig.json similarity index 100% rename from event-kit/tsconfig.json rename to types/event-kit/tsconfig.json diff --git a/event-loop-lag/event-loop-lag-tests.ts b/types/event-loop-lag/event-loop-lag-tests.ts similarity index 100% rename from event-loop-lag/event-loop-lag-tests.ts rename to types/event-loop-lag/event-loop-lag-tests.ts diff --git a/event-loop-lag/index.d.ts b/types/event-loop-lag/index.d.ts similarity index 100% rename from event-loop-lag/index.d.ts rename to types/event-loop-lag/index.d.ts diff --git a/event-loop-lag/tsconfig.json b/types/event-loop-lag/tsconfig.json similarity index 100% rename from event-loop-lag/tsconfig.json rename to types/event-loop-lag/tsconfig.json diff --git a/event-stream/event-stream-tests.ts b/types/event-stream/event-stream-tests.ts similarity index 100% rename from event-stream/event-stream-tests.ts rename to types/event-stream/event-stream-tests.ts diff --git a/event-stream/index.d.ts b/types/event-stream/index.d.ts similarity index 100% rename from event-stream/index.d.ts rename to types/event-stream/index.d.ts diff --git a/event-stream/tsconfig.json b/types/event-stream/tsconfig.json similarity index 100% rename from event-stream/tsconfig.json rename to types/event-stream/tsconfig.json diff --git a/event-to-promise/event-to-promise-tests.ts b/types/event-to-promise/event-to-promise-tests.ts similarity index 100% rename from event-to-promise/event-to-promise-tests.ts rename to types/event-to-promise/event-to-promise-tests.ts diff --git a/event-to-promise/index.d.ts b/types/event-to-promise/index.d.ts similarity index 100% rename from event-to-promise/index.d.ts rename to types/event-to-promise/index.d.ts diff --git a/event-to-promise/tsconfig.json b/types/event-to-promise/tsconfig.json similarity index 100% rename from event-to-promise/tsconfig.json rename to types/event-to-promise/tsconfig.json diff --git a/eventemitter2/eventemitter2-tests.ts b/types/eventemitter2/eventemitter2-tests.ts similarity index 100% rename from eventemitter2/eventemitter2-tests.ts rename to types/eventemitter2/eventemitter2-tests.ts diff --git a/eventemitter2/index.d.ts b/types/eventemitter2/index.d.ts similarity index 100% rename from eventemitter2/index.d.ts rename to types/eventemitter2/index.d.ts diff --git a/eventemitter2/tsconfig.json b/types/eventemitter2/tsconfig.json similarity index 100% rename from eventemitter2/tsconfig.json rename to types/eventemitter2/tsconfig.json diff --git a/eventemitter3/eventemitter3-tests.ts b/types/eventemitter3/eventemitter3-tests.ts similarity index 100% rename from eventemitter3/eventemitter3-tests.ts rename to types/eventemitter3/eventemitter3-tests.ts diff --git a/eventemitter3/index.d.ts b/types/eventemitter3/index.d.ts similarity index 100% rename from eventemitter3/index.d.ts rename to types/eventemitter3/index.d.ts diff --git a/eventemitter3/tsconfig.json b/types/eventemitter3/tsconfig.json similarity index 100% rename from eventemitter3/tsconfig.json rename to types/eventemitter3/tsconfig.json diff --git a/evernote/evernote-tests.ts b/types/evernote/evernote-tests.ts similarity index 100% rename from evernote/evernote-tests.ts rename to types/evernote/evernote-tests.ts diff --git a/evernote/index.d.ts b/types/evernote/index.d.ts similarity index 100% rename from evernote/index.d.ts rename to types/evernote/index.d.ts diff --git a/evernote/tsconfig.json b/types/evernote/tsconfig.json similarity index 100% rename from evernote/tsconfig.json rename to types/evernote/tsconfig.json diff --git a/exit/exit-tests.ts b/types/exit/exit-tests.ts similarity index 100% rename from exit/exit-tests.ts rename to types/exit/exit-tests.ts diff --git a/exit/index.d.ts b/types/exit/index.d.ts similarity index 100% rename from exit/index.d.ts rename to types/exit/index.d.ts diff --git a/exit/tsconfig.json b/types/exit/tsconfig.json similarity index 100% rename from exit/tsconfig.json rename to types/exit/tsconfig.json diff --git a/exorcist/exorcist-tests.ts b/types/exorcist/exorcist-tests.ts similarity index 100% rename from exorcist/exorcist-tests.ts rename to types/exorcist/exorcist-tests.ts diff --git a/exorcist/index.d.ts b/types/exorcist/index.d.ts similarity index 100% rename from exorcist/index.d.ts rename to types/exorcist/index.d.ts diff --git a/exorcist/tsconfig.json b/types/exorcist/tsconfig.json similarity index 100% rename from exorcist/tsconfig.json rename to types/exorcist/tsconfig.json diff --git a/expect.js/expect.js-tests.ts b/types/expect.js/expect.js-tests.ts similarity index 100% rename from expect.js/expect.js-tests.ts rename to types/expect.js/expect.js-tests.ts diff --git a/expect.js/index.d.ts b/types/expect.js/index.d.ts similarity index 100% rename from expect.js/index.d.ts rename to types/expect.js/index.d.ts diff --git a/expect.js/tsconfig.json b/types/expect.js/tsconfig.json similarity index 100% rename from expect.js/tsconfig.json rename to types/expect.js/tsconfig.json diff --git a/expect/expect-tests.ts b/types/expect/expect-tests.ts similarity index 99% rename from expect/expect-tests.ts rename to types/expect/expect-tests.ts index 3e08e0d747..c4312d1ada 100644 --- a/expect/expect-tests.ts +++ b/types/expect/expect-tests.ts @@ -1,4 +1,3 @@ - /// import {Expectation, Extension, Spy, createSpy, isSpy, assert, spyOn, extend, restoreSpies} from 'expect'; diff --git a/expect/index.d.ts b/types/expect/index.d.ts similarity index 85% rename from expect/index.d.ts rename to types/expect/index.d.ts index 7b4e95e2b5..8e3422a4d9 100644 --- a/expect/index.d.ts +++ b/types/expect/index.d.ts @@ -4,11 +4,11 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace expect { - export type CompareValues = (a: T, b: T) => boolean; - export type Comparator = (target: {}, key: string) => boolean; - export type KeyType = string | number; + type CompareValues = (a: T, b: T) => boolean; + type Comparator = (target: {}, key: string) => boolean; + type KeyType = string | number; - export class Expectation { + class Expectation { constructor(actual: any); toExist(message?: string): Expectation; toBeTruthy(message?: string): Expectation; @@ -61,16 +61,16 @@ declare namespace expect { withArgs(...args: any[]): Expectation; } - export interface Extension { + interface Extension { [name: string]: (args?: any[]) => void; } - export interface Call { + interface Call { context: T; arguments: any[]; } - export interface Spy { + interface Spy { (...args: any[]): void; __isSpy: boolean; calls: Array>; @@ -84,14 +84,12 @@ declare namespace expect { reset(): void; } - - export function createSpy(fn?: (...args: any[]) => any, restore?: (...args: any[]) => any): Spy; - export function spyOn(object: T, methodName: string): Spy; - export function isSpy(object: {}): boolean; - export function restoreSpies(): void; - export function assert(condition: boolean, messageFormat: string, ...extraArgs: any[]): void; - export function extend(extension: Extension): void; - + function createSpy(fn?: (...args: any[]) => any, restore?: (...args: any[]) => any): Spy; + function spyOn(object: T, methodName: string): Spy; + function isSpy(object: {}): boolean; + function restoreSpies(): void; + function assert(condition: boolean, messageFormat: string, ...extraArgs: any[]): void; + function extend(extension: Extension): void; } declare function expect(actual: T): expect.Expectation; diff --git a/expect/tsconfig.json b/types/expect/tsconfig.json similarity index 100% rename from expect/tsconfig.json rename to types/expect/tsconfig.json diff --git a/expect/tslint.json b/types/expect/tslint.json similarity index 100% rename from expect/tslint.json rename to types/expect/tslint.json diff --git a/expectations/expectations-tests.ts b/types/expectations/expectations-tests.ts similarity index 100% rename from expectations/expectations-tests.ts rename to types/expectations/expectations-tests.ts diff --git a/expectations/index.d.ts b/types/expectations/index.d.ts similarity index 100% rename from expectations/index.d.ts rename to types/expectations/index.d.ts diff --git a/expectations/tsconfig.json b/types/expectations/tsconfig.json similarity index 100% rename from expectations/tsconfig.json rename to types/expectations/tsconfig.json diff --git a/expr-eval/expr-eval-tests.ts b/types/expr-eval/expr-eval-tests.ts similarity index 100% rename from expr-eval/expr-eval-tests.ts rename to types/expr-eval/expr-eval-tests.ts diff --git a/expr-eval/index.d.ts b/types/expr-eval/index.d.ts similarity index 100% rename from expr-eval/index.d.ts rename to types/expr-eval/index.d.ts diff --git a/expr-eval/tsconfig.json b/types/expr-eval/tsconfig.json similarity index 100% rename from expr-eval/tsconfig.json rename to types/expr-eval/tsconfig.json diff --git a/expr-eval/tslint.json b/types/expr-eval/tslint.json similarity index 100% rename from expr-eval/tslint.json rename to types/expr-eval/tslint.json diff --git a/express-brute-memcached/express-brute-memcached-tests.ts b/types/express-brute-memcached/express-brute-memcached-tests.ts similarity index 100% rename from express-brute-memcached/express-brute-memcached-tests.ts rename to types/express-brute-memcached/express-brute-memcached-tests.ts diff --git a/express-brute-memcached/index.d.ts b/types/express-brute-memcached/index.d.ts similarity index 100% rename from express-brute-memcached/index.d.ts rename to types/express-brute-memcached/index.d.ts diff --git a/express-brute-memcached/tsconfig.json b/types/express-brute-memcached/tsconfig.json similarity index 100% rename from express-brute-memcached/tsconfig.json rename to types/express-brute-memcached/tsconfig.json diff --git a/express-brute-mongo/express-brute-mongo-tests.ts b/types/express-brute-mongo/express-brute-mongo-tests.ts similarity index 100% rename from express-brute-mongo/express-brute-mongo-tests.ts rename to types/express-brute-mongo/express-brute-mongo-tests.ts diff --git a/express-brute-mongo/index.d.ts b/types/express-brute-mongo/index.d.ts similarity index 100% rename from express-brute-mongo/index.d.ts rename to types/express-brute-mongo/index.d.ts diff --git a/express-brute-mongo/tsconfig.json b/types/express-brute-mongo/tsconfig.json similarity index 100% rename from express-brute-mongo/tsconfig.json rename to types/express-brute-mongo/tsconfig.json diff --git a/express-brute/express-brute-tests.ts b/types/express-brute/express-brute-tests.ts similarity index 100% rename from express-brute/express-brute-tests.ts rename to types/express-brute/express-brute-tests.ts diff --git a/express-brute/index.d.ts b/types/express-brute/index.d.ts similarity index 100% rename from express-brute/index.d.ts rename to types/express-brute/index.d.ts diff --git a/express-brute/tsconfig.json b/types/express-brute/tsconfig.json similarity index 100% rename from express-brute/tsconfig.json rename to types/express-brute/tsconfig.json diff --git a/express-debug/express-debug-tests.ts b/types/express-debug/express-debug-tests.ts similarity index 100% rename from express-debug/express-debug-tests.ts rename to types/express-debug/express-debug-tests.ts diff --git a/express-debug/index.d.ts b/types/express-debug/index.d.ts similarity index 100% rename from express-debug/index.d.ts rename to types/express-debug/index.d.ts diff --git a/express-debug/tsconfig.json b/types/express-debug/tsconfig.json similarity index 100% rename from express-debug/tsconfig.json rename to types/express-debug/tsconfig.json diff --git a/express-domain-middleware/express-domain-middleware-tests.ts b/types/express-domain-middleware/express-domain-middleware-tests.ts similarity index 100% rename from express-domain-middleware/express-domain-middleware-tests.ts rename to types/express-domain-middleware/express-domain-middleware-tests.ts diff --git a/express-domain-middleware/index.d.ts b/types/express-domain-middleware/index.d.ts similarity index 100% rename from express-domain-middleware/index.d.ts rename to types/express-domain-middleware/index.d.ts diff --git a/express-domain-middleware/tsconfig.json b/types/express-domain-middleware/tsconfig.json similarity index 100% rename from express-domain-middleware/tsconfig.json rename to types/express-domain-middleware/tsconfig.json diff --git a/express-formidable/express-formidable-tests.ts b/types/express-formidable/express-formidable-tests.ts similarity index 100% rename from express-formidable/express-formidable-tests.ts rename to types/express-formidable/express-formidable-tests.ts diff --git a/express-formidable/index.d.ts b/types/express-formidable/index.d.ts similarity index 100% rename from express-formidable/index.d.ts rename to types/express-formidable/index.d.ts diff --git a/express-formidable/tsconfig.json b/types/express-formidable/tsconfig.json similarity index 100% rename from express-formidable/tsconfig.json rename to types/express-formidable/tsconfig.json diff --git a/express-graphql/express-graphql-tests.ts b/types/express-graphql/express-graphql-tests.ts similarity index 100% rename from express-graphql/express-graphql-tests.ts rename to types/express-graphql/express-graphql-tests.ts diff --git a/express-graphql/index.d.ts b/types/express-graphql/index.d.ts similarity index 100% rename from express-graphql/index.d.ts rename to types/express-graphql/index.d.ts diff --git a/express-graphql/tsconfig.json b/types/express-graphql/tsconfig.json similarity index 100% rename from express-graphql/tsconfig.json rename to types/express-graphql/tsconfig.json diff --git a/express-handlebars/express-handlebars-tests.ts b/types/express-handlebars/express-handlebars-tests.ts similarity index 100% rename from express-handlebars/express-handlebars-tests.ts rename to types/express-handlebars/express-handlebars-tests.ts diff --git a/express-handlebars/index.d.ts b/types/express-handlebars/index.d.ts similarity index 100% rename from express-handlebars/index.d.ts rename to types/express-handlebars/index.d.ts diff --git a/express-handlebars/tsconfig.json b/types/express-handlebars/tsconfig.json similarity index 100% rename from express-handlebars/tsconfig.json rename to types/express-handlebars/tsconfig.json diff --git a/express-jwt/express-jwt-tests.ts b/types/express-jwt/express-jwt-tests.ts similarity index 100% rename from express-jwt/express-jwt-tests.ts rename to types/express-jwt/express-jwt-tests.ts diff --git a/express-jwt/index.d.ts b/types/express-jwt/index.d.ts similarity index 100% rename from express-jwt/index.d.ts rename to types/express-jwt/index.d.ts diff --git a/express-jwt/tsconfig.json b/types/express-jwt/tsconfig.json similarity index 100% rename from express-jwt/tsconfig.json rename to types/express-jwt/tsconfig.json diff --git a/express-less/express-less-tests.ts b/types/express-less/express-less-tests.ts similarity index 100% rename from express-less/express-less-tests.ts rename to types/express-less/express-less-tests.ts diff --git a/express-less/index.d.ts b/types/express-less/index.d.ts similarity index 100% rename from express-less/index.d.ts rename to types/express-less/index.d.ts diff --git a/express-less/tsconfig.json b/types/express-less/tsconfig.json similarity index 100% rename from express-less/tsconfig.json rename to types/express-less/tsconfig.json diff --git a/express-minify/express-minify-tests.ts b/types/express-minify/express-minify-tests.ts similarity index 100% rename from express-minify/express-minify-tests.ts rename to types/express-minify/express-minify-tests.ts diff --git a/express-minify/index.d.ts b/types/express-minify/index.d.ts similarity index 100% rename from express-minify/index.d.ts rename to types/express-minify/index.d.ts diff --git a/express-minify/tsconfig.json b/types/express-minify/tsconfig.json similarity index 100% rename from express-minify/tsconfig.json rename to types/express-minify/tsconfig.json diff --git a/express-mung/express-mung-tests.ts b/types/express-mung/express-mung-tests.ts similarity index 100% rename from express-mung/express-mung-tests.ts rename to types/express-mung/express-mung-tests.ts diff --git a/express-mung/index.d.ts b/types/express-mung/index.d.ts similarity index 100% rename from express-mung/index.d.ts rename to types/express-mung/index.d.ts diff --git a/express-mung/tsconfig.json b/types/express-mung/tsconfig.json similarity index 100% rename from express-mung/tsconfig.json rename to types/express-mung/tsconfig.json diff --git a/express-myconnection/express-myconnection-tests.ts b/types/express-myconnection/express-myconnection-tests.ts similarity index 100% rename from express-myconnection/express-myconnection-tests.ts rename to types/express-myconnection/express-myconnection-tests.ts diff --git a/express-myconnection/index.d.ts b/types/express-myconnection/index.d.ts similarity index 100% rename from express-myconnection/index.d.ts rename to types/express-myconnection/index.d.ts diff --git a/express-myconnection/tsconfig.json b/types/express-myconnection/tsconfig.json similarity index 100% rename from express-myconnection/tsconfig.json rename to types/express-myconnection/tsconfig.json diff --git a/express-mysql-session/express-mysql-session-tests.ts b/types/express-mysql-session/express-mysql-session-tests.ts similarity index 100% rename from express-mysql-session/express-mysql-session-tests.ts rename to types/express-mysql-session/express-mysql-session-tests.ts diff --git a/express-mysql-session/index.d.ts b/types/express-mysql-session/index.d.ts similarity index 100% rename from express-mysql-session/index.d.ts rename to types/express-mysql-session/index.d.ts diff --git a/express-mysql-session/tsconfig.json b/types/express-mysql-session/tsconfig.json similarity index 100% rename from express-mysql-session/tsconfig.json rename to types/express-mysql-session/tsconfig.json diff --git a/express-mysql-session/tslint.json b/types/express-mysql-session/tslint.json similarity index 100% rename from express-mysql-session/tslint.json rename to types/express-mysql-session/tslint.json diff --git a/express-openapi/express-openapi-tests.ts b/types/express-openapi/express-openapi-tests.ts similarity index 100% rename from express-openapi/express-openapi-tests.ts rename to types/express-openapi/express-openapi-tests.ts diff --git a/express-openapi/index.d.ts b/types/express-openapi/index.d.ts similarity index 100% rename from express-openapi/index.d.ts rename to types/express-openapi/index.d.ts diff --git a/express-openapi/tsconfig.json b/types/express-openapi/tsconfig.json similarity index 100% rename from express-openapi/tsconfig.json rename to types/express-openapi/tsconfig.json diff --git a/express-partials/express-partials-tests.ts b/types/express-partials/express-partials-tests.ts similarity index 100% rename from express-partials/express-partials-tests.ts rename to types/express-partials/express-partials-tests.ts diff --git a/express-partials/index.d.ts b/types/express-partials/index.d.ts similarity index 100% rename from express-partials/index.d.ts rename to types/express-partials/index.d.ts diff --git a/express-partials/tsconfig.json b/types/express-partials/tsconfig.json similarity index 100% rename from express-partials/tsconfig.json rename to types/express-partials/tsconfig.json diff --git a/express-rate-limit/express-rate-limit-tests.ts b/types/express-rate-limit/express-rate-limit-tests.ts similarity index 84% rename from express-rate-limit/express-rate-limit-tests.ts rename to types/express-rate-limit/express-rate-limit-tests.ts index 761a6d23f8..624a2da10d 100644 --- a/express-rate-limit/express-rate-limit-tests.ts +++ b/types/express-rate-limit/express-rate-limit-tests.ts @@ -1,12 +1,12 @@ import RateLimit = require("express-rate-limit"); -var apiLimiter = new RateLimit({ +const apiLimiter = new RateLimit({ windowMs: 15 * 60 * 1000, // 15 minutes max: 100, delayMs: 0 // disabled }); -var createAccountLimiter = new RateLimit({ +const createAccountLimiter = new RateLimit({ windowMs: 60 * 60 * 1000, // 1 hour window delayAfter: 1, // begin slowing down responses after the first request delayMs: 3 * 1000, // slow down subsequent responses by 3 seconds per request @@ -20,6 +20,6 @@ class SomeStore implements RateLimit.Store { resetKey(key: string) { }; }; -var limiterWithStore = new RateLimit({ +const limiterWithStore = new RateLimit({ store: new SomeStore() }); diff --git a/express-rate-limit/index.d.ts b/types/express-rate-limit/index.d.ts similarity index 81% rename from express-rate-limit/index.d.ts rename to types/express-rate-limit/index.d.ts index 38ef8f8b29..ce09dbbf51 100644 --- a/express-rate-limit/index.d.ts +++ b/types/express-rate-limit/index.d.ts @@ -8,13 +8,13 @@ import express = require("express"); declare namespace RateLimit { type StoreIncrementCallback = (err?: {}, hits?: number) => void; - export interface Store { + interface Store { incr: (key: string, cb: StoreIncrementCallback) => void; resetAll: () => void; resetKey: (key: string) => void; } - export interface Options { + interface Options { delayAfter?: number; delayMs?: number; handlers?: () => any; @@ -29,9 +29,5 @@ declare namespace RateLimit { } } -interface RateLimitStatic { - new(options: RateLimit.Options): express.RequestHandler; -} - -declare var RateLimit: RateLimitStatic; +declare var RateLimit: new (options: RateLimit.Options) => express.RequestHandler; export = RateLimit; diff --git a/express-rate-limit/tsconfig.json b/types/express-rate-limit/tsconfig.json similarity index 100% rename from express-rate-limit/tsconfig.json rename to types/express-rate-limit/tsconfig.json diff --git a/express-rate-limit/tslint.json b/types/express-rate-limit/tslint.json similarity index 100% rename from express-rate-limit/tslint.json rename to types/express-rate-limit/tslint.json diff --git a/express-route-fs/express-route-fs-tests.ts b/types/express-route-fs/express-route-fs-tests.ts similarity index 100% rename from express-route-fs/express-route-fs-tests.ts rename to types/express-route-fs/express-route-fs-tests.ts diff --git a/express-route-fs/index.d.ts b/types/express-route-fs/index.d.ts similarity index 100% rename from express-route-fs/index.d.ts rename to types/express-route-fs/index.d.ts diff --git a/express-route-fs/tsconfig.json b/types/express-route-fs/tsconfig.json similarity index 100% rename from express-route-fs/tsconfig.json rename to types/express-route-fs/tsconfig.json diff --git a/express-serve-static-core/express-serve-static-core-tests.ts b/types/express-serve-static-core/express-serve-static-core-tests.ts similarity index 100% rename from express-serve-static-core/express-serve-static-core-tests.ts rename to types/express-serve-static-core/express-serve-static-core-tests.ts diff --git a/express-serve-static-core/index.d.ts b/types/express-serve-static-core/index.d.ts similarity index 99% rename from express-serve-static-core/index.d.ts rename to types/express-serve-static-core/index.d.ts index a4ce9612e7..a54481027d 100644 --- a/express-serve-static-core/index.d.ts +++ b/types/express-serve-static-core/index.d.ts @@ -96,6 +96,7 @@ interface IRouter extends RequestHandler { head: IRouterMatcher; checkout: IRouterMatcher; + connect: IRouterMatcher; copy: IRouterMatcher; lock: IRouterMatcher; merge: IRouterMatcher; @@ -104,6 +105,8 @@ interface IRouter extends RequestHandler { move: IRouterMatcher; "m-search": IRouterMatcher; notify: IRouterMatcher; + propfind: IRouterMatcher; + proppatch: IRouterMatcher; purge: IRouterMatcher; report: IRouterMatcher; search: IRouterMatcher; @@ -161,6 +164,8 @@ interface CookieOptions { path?: string; domain?: string; secure?: boolean | 'auto'; + encode?: (val: string) => void; + sameSite?: boolean | string; } interface Errback { (err: Error): void; } @@ -858,7 +863,7 @@ interface RequestParamHandler { (req: Request, res: Response, next: NextFunction, value: any, name: string): any; } -type ApplicaitonRequestHandler = IRouterHandler & IRouterMatcher & { +type ApplicationRequestHandler = IRouterHandler & IRouterMatcher & { (...handlers: RequestHandlerParams[]): T; }; @@ -1103,7 +1108,7 @@ interface Application extends IRouter, Express.Application { */ _router: any; - use: ApplicaitonRequestHandler; + use: ApplicationRequestHandler; } interface Express extends Application { diff --git a/express-serve-static-core/tsconfig.json b/types/express-serve-static-core/tsconfig.json similarity index 100% rename from express-serve-static-core/tsconfig.json rename to types/express-serve-static-core/tsconfig.json diff --git a/express-session/express-session-tests.ts b/types/express-session/express-session-tests.ts similarity index 100% rename from express-session/express-session-tests.ts rename to types/express-session/express-session-tests.ts diff --git a/express-session/index.d.ts b/types/express-session/index.d.ts similarity index 100% rename from express-session/index.d.ts rename to types/express-session/index.d.ts diff --git a/express-session/tsconfig.json b/types/express-session/tsconfig.json similarity index 100% rename from express-session/tsconfig.json rename to types/express-session/tsconfig.json diff --git a/express-unless/express-unless-tests.ts b/types/express-unless/express-unless-tests.ts similarity index 100% rename from express-unless/express-unless-tests.ts rename to types/express-unless/express-unless-tests.ts diff --git a/express-unless/index.d.ts b/types/express-unless/index.d.ts similarity index 100% rename from express-unless/index.d.ts rename to types/express-unless/index.d.ts diff --git a/express-unless/tsconfig.json b/types/express-unless/tsconfig.json similarity index 100% rename from express-unless/tsconfig.json rename to types/express-unless/tsconfig.json diff --git a/express-useragent/express-useragent-tests.ts b/types/express-useragent/express-useragent-tests.ts similarity index 100% rename from express-useragent/express-useragent-tests.ts rename to types/express-useragent/express-useragent-tests.ts diff --git a/express-useragent/index.d.ts b/types/express-useragent/index.d.ts similarity index 100% rename from express-useragent/index.d.ts rename to types/express-useragent/index.d.ts diff --git a/express-useragent/tsconfig.json b/types/express-useragent/tsconfig.json similarity index 100% rename from express-useragent/tsconfig.json rename to types/express-useragent/tsconfig.json diff --git a/express-validator/express-validator-tests.ts b/types/express-validator/express-validator-tests.ts similarity index 100% rename from express-validator/express-validator-tests.ts rename to types/express-validator/express-validator-tests.ts diff --git a/express-validator/index.d.ts b/types/express-validator/index.d.ts similarity index 100% rename from express-validator/index.d.ts rename to types/express-validator/index.d.ts diff --git a/express-validator/tsconfig.json b/types/express-validator/tsconfig.json similarity index 100% rename from express-validator/tsconfig.json rename to types/express-validator/tsconfig.json diff --git a/express/express-tests.ts b/types/express/express-tests.ts similarity index 100% rename from express/express-tests.ts rename to types/express/express-tests.ts diff --git a/express/index.d.ts b/types/express/index.d.ts similarity index 100% rename from express/index.d.ts rename to types/express/index.d.ts diff --git a/express/tsconfig.json b/types/express/tsconfig.json similarity index 100% rename from express/tsconfig.json rename to types/express/tsconfig.json diff --git a/extend/extend-tests.ts b/types/extend/extend-tests.ts similarity index 100% rename from extend/extend-tests.ts rename to types/extend/extend-tests.ts diff --git a/extend/index.d.ts b/types/extend/index.d.ts similarity index 100% rename from extend/index.d.ts rename to types/extend/index.d.ts diff --git a/extend/tsconfig.json b/types/extend/tsconfig.json similarity index 100% rename from extend/tsconfig.json rename to types/extend/tsconfig.json diff --git a/extended-listbox/extended-listbox-tests.ts b/types/extended-listbox/extended-listbox-tests.ts similarity index 100% rename from extended-listbox/extended-listbox-tests.ts rename to types/extended-listbox/extended-listbox-tests.ts diff --git a/extended-listbox/index.d.ts b/types/extended-listbox/index.d.ts similarity index 100% rename from extended-listbox/index.d.ts rename to types/extended-listbox/index.d.ts diff --git a/extended-listbox/tsconfig.json b/types/extended-listbox/tsconfig.json similarity index 100% rename from extended-listbox/tsconfig.json rename to types/extended-listbox/tsconfig.json diff --git a/extjs/extjs-tests.ts b/types/extjs/extjs-tests.ts similarity index 100% rename from extjs/extjs-tests.ts rename to types/extjs/extjs-tests.ts diff --git a/extjs/index.d.ts b/types/extjs/index.d.ts similarity index 100% rename from extjs/index.d.ts rename to types/extjs/index.d.ts diff --git a/extjs/tsconfig.json b/types/extjs/tsconfig.json similarity index 100% rename from extjs/tsconfig.json rename to types/extjs/tsconfig.json diff --git a/extract-text-webpack-plugin/extract-text-webpack-plugin-tests.ts b/types/extract-text-webpack-plugin/extract-text-webpack-plugin-tests.ts similarity index 100% rename from extract-text-webpack-plugin/extract-text-webpack-plugin-tests.ts rename to types/extract-text-webpack-plugin/extract-text-webpack-plugin-tests.ts diff --git a/extract-text-webpack-plugin/index.d.ts b/types/extract-text-webpack-plugin/index.d.ts similarity index 100% rename from extract-text-webpack-plugin/index.d.ts rename to types/extract-text-webpack-plugin/index.d.ts diff --git a/extract-text-webpack-plugin/tsconfig.json b/types/extract-text-webpack-plugin/tsconfig.json similarity index 100% rename from extract-text-webpack-plugin/tsconfig.json rename to types/extract-text-webpack-plugin/tsconfig.json diff --git a/extract-zip/extract-zip-tests.ts b/types/extract-zip/extract-zip-tests.ts similarity index 100% rename from extract-zip/extract-zip-tests.ts rename to types/extract-zip/extract-zip-tests.ts diff --git a/extract-zip/index.d.ts b/types/extract-zip/index.d.ts similarity index 94% rename from extract-zip/index.d.ts rename to types/extract-zip/index.d.ts index 52ce40094f..9edd2fcb31 100644 --- a/extract-zip/index.d.ts +++ b/types/extract-zip/index.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace extract { - export interface Options { + interface Options { dir?: string; defaultDirMode?: number; defaultFileMode?: number; diff --git a/extract-zip/tsconfig.json b/types/extract-zip/tsconfig.json similarity index 100% rename from extract-zip/tsconfig.json rename to types/extract-zip/tsconfig.json diff --git a/extract-zip/tslint.json b/types/extract-zip/tslint.json similarity index 100% rename from extract-zip/tslint.json rename to types/extract-zip/tslint.json diff --git a/eyes/eyes-tests.ts b/types/eyes/eyes-tests.ts similarity index 100% rename from eyes/eyes-tests.ts rename to types/eyes/eyes-tests.ts diff --git a/eyes/index.d.ts b/types/eyes/index.d.ts similarity index 100% rename from eyes/index.d.ts rename to types/eyes/index.d.ts diff --git a/eyes/tsconfig.json b/types/eyes/tsconfig.json similarity index 100% rename from eyes/tsconfig.json rename to types/eyes/tsconfig.json diff --git a/f1/f1-tests.ts b/types/f1/f1-tests.ts similarity index 100% rename from f1/f1-tests.ts rename to types/f1/f1-tests.ts diff --git a/f1/index.d.ts b/types/f1/index.d.ts similarity index 100% rename from f1/index.d.ts rename to types/f1/index.d.ts diff --git a/f1/tsconfig.json b/types/f1/tsconfig.json similarity index 100% rename from f1/tsconfig.json rename to types/f1/tsconfig.json diff --git a/f1/tslint.json b/types/f1/tslint.json similarity index 100% rename from f1/tslint.json rename to types/f1/tslint.json diff --git a/fabric/fabric-tests.ts b/types/fabric/fabric-tests.ts similarity index 78% rename from fabric/fabric-tests.ts rename to types/fabric/fabric-tests.ts index 923b29d896..e94b676104 100644 --- a/fabric/fabric-tests.ts +++ b/types/fabric/fabric-tests.ts @@ -1,7 +1,7 @@ import * as fabric from "fabric"; function sample1() { - var canvas = new fabric.Canvas('c', { + const canvas = new fabric.Canvas('c', { hoverCursor: 'pointer', selection: false, }); @@ -13,7 +13,7 @@ function sample1() { e.target.opacity = 1; }); - for (var i = 0, len = 15; i < len; i++) { + for (let i = 0; i < 15; i++) { fabric.Image.fromURL('../assets/ladybug.png', img => { img.set({ left: fabric.util.getRandomInt(0, 600), @@ -33,17 +33,16 @@ function sample1() { } function sample2() { - - var dot: fabric.Circle, i: number, - t1: number, t2: number, - startTimer = () => { - t1 = new Date().getTime(); - return t1; - }, - stopTimer = () => { - t2 = new Date().getTime(); - return t2 - t1; - }, + let dot: fabric.Circle, i: number; + let t1: number, t2: number; + const startTimer = () => { + t1 = new Date().getTime(); + return t1; + }; + const stopTimer = () => { + t2 = new Date().getTime(); + return t2 - t1; + }, getRandomInt = fabric.util.getRandomInt, rainbow = ["#ffcc66", "#ccff66", "#66ccff", "#ff6fcf", "#ff6666"], rainbowEnd = rainbow.length - 1; @@ -51,7 +50,7 @@ function sample2() { // // Rendering canvas #1 // - var canvas1 = new fabric.Canvas('c1', { backgroundColor: "#000" }), + const canvas1 = new fabric.Canvas('c1', { backgroundColor: "#000" }), results1 = document.getElementById('results-c1'); startTimer(); @@ -66,11 +65,10 @@ function sample2() { } results1.innerHTML = 'Regular rendering of 100 elements in ' + stopTimer() + 'ms'; - // // Rendering canvas #2 // - var canvas2 = new fabric.Canvas('c2', { backgroundColor: "#000", renderOnAddRemove: false }), + const canvas2 = new fabric.Canvas('c2', { backgroundColor: "#000", renderOnAddRemove: false }), results2 = document.getElementById('results-c2'); startTimer(); @@ -88,35 +86,34 @@ function sample2() { } function sample3() { - - var $: (id: string) => HTMLElement = (id: string) => document.getElementById(id); + const $: (id: string) => HTMLElement = (id: string) => document.getElementById(id); function applyFilter(index: number, filter: any) { - var obj: fabric.Image = canvas.getActiveObject(); + const obj: fabric.Image = canvas.getActiveObject(); obj.filters[index] = filter; obj.applyFilters(canvas.renderAll.bind(canvas)); } function applyFilterValue(index: number, prop: string, value: any) { - var obj: fabric.Image = canvas.getActiveObject(); + const obj: fabric.Image = canvas.getActiveObject(); if (obj.filters[index]) { obj.applyFilters(canvas.renderAll.bind(canvas)); } } - var canvas = new fabric.Canvas('c', { backgroundImage: '../lib/bg.png' }), + const canvas = new fabric.Canvas('c', { backgroundImage: '../lib/bg.png' }), f = fabric.Image.filters; canvas.on({ 'object:selected': () => { fabric.util.toArray(document.getElementsByTagName('input')).forEach(el => { el.disabled = false; }); - var filters = ['grayscale', 'invert', 'remove-white', 'sepia', 'sepia2', 'brightness', + const filters = ['grayscale', 'invert', 'remove-white', 'sepia', 'sepia2', 'brightness', 'noise', 'gradient-transparency', 'pixelate', 'blur', 'sharpen']; - for (var i = 0; i < filters.length; i++) { - var checkBox = $(filters[i]); - var image = canvas.getActiveObject(); + for (let i = 0; i < filters.length; i++) { + const checkBox = $(filters[i]); + const image = canvas.getActiveObject(); checkBox.checked = !!image.filters[i]; } }, @@ -126,7 +123,7 @@ function sample3() { }); fabric.Image.fromURL('../assets/printio.png', img => { - var oImg = img.set({ left: 300, top: 300, angle: -15 }).scale(0.9); + const oImg = img.set({ left: 300, top: 300, angle: -15 }).scale(0.9); canvas.add(oImg).renderAll(); canvas.setActiveObject(oImg); }); @@ -211,11 +208,10 @@ function sample3() { } function sample4() { + const canvas = new fabric.Canvas('c'); + const $: (id: string) => HTMLElement = id => document.getElementById(id); - var canvas = new fabric.Canvas('c'); - var $: (id: string) => HTMLElement = id => document.getElementById(id); - - var rect = new fabric.Rect({ + const rect = new fabric.Rect({ width: 100, height: 100, top: 150, @@ -225,32 +221,31 @@ function sample4() { canvas.add(rect); - var angleControl = $('angle-control'); + const angleControl = $('angle-control'); angleControl.onchange = function(this: HTMLInputElement) { rect.setAngle(+this.value).setCoords(); canvas.renderAll(); }; - var scaleControl = $('scale-control'); + const scaleControl = $('scale-control'); scaleControl.onchange = function(this: HTMLInputElement) { rect.scale(+this.value).setCoords(); canvas.renderAll(); }; - var topControl = $('top-control'); + const topControl = $('top-control'); topControl.onchange = function(this: HTMLInputElement) { rect.setTop(+this.value).setCoords(); canvas.renderAll(); }; - var leftControl = $('left-control'); + const leftControl = $('left-control'); leftControl.onchange = function(this: HTMLInputElement) { rect.setLeft(+this.value).setCoords(); canvas.renderAll(); }; function updateControls() { - scaleControl.value = rect.getScaleX().toString(); angleControl.value = rect.getAngle().toString(); leftControl.value = rect.getLeft().toString(); @@ -263,7 +258,6 @@ function sample4() { }); } - declare module "fabric" { export interface CircleWithLineInfos extends Circle { line1?: Line; @@ -274,8 +268,8 @@ declare module "fabric" { } function sample5() { - var makeCircle = (left: number, top: number, line1?: fabric.Line, line2?: fabric.Line, line3?: fabric.Line, line4?: fabric.Line): fabric.Circle => { - var c = new fabric.Circle({ + const makeCircle = (left: number, top: number, line1?: fabric.Line, line2?: fabric.Line, line3?: fabric.Line, line4?: fabric.Line): fabric.Circle => { + const c = new fabric.Circle({ left, top, strokeWidth: 5, @@ -300,9 +294,9 @@ function sample5() { }); } - var canvas = new fabric.Canvas('c', { selection: false }); + const canvas = new fabric.Canvas('c', { selection: false }); - var line = makeLine([250, 125, 250, 175]), + const line = makeLine([250, 125, 250, 175]), line2 = makeLine([250, 175, 250, 250]), line3 = makeLine([250, 250, 300, 350]), line4 = makeLine([250, 250, 200, 350]), @@ -322,7 +316,7 @@ function sample5() { ); canvas.on('object:moving', e => { - var p = e.target; + const p = e.target; p.line1 && p.line1.set({ 'x2': p.left, 'y2': p.top }); p.line2 && p.line2.set({ 'x1': p.left, 'y1': p.top }); p.line3 && p.line3.set({ 'x1': p.left, 'y1': p.top }); @@ -332,9 +326,9 @@ function sample5() { } function sample6() { - var canvas = new fabric.Canvas('c'); + const canvas = new fabric.Canvas('c'); fabric.loadSVGFromURL('../assets/135.svg', objects => { - var obj = objects[0].scale(0.25); + const obj = objects[0].scale(0.25); canvas.centerObject(obj); canvas.add(obj); @@ -344,17 +338,15 @@ function sample6() { canvas.add(obj.clone(() => { }).set({ left: 480, top: 400, angle: 15 })); canvas.on('mouse:move', options => { - var p = canvas.getPointer(options.e); + const p = canvas.getPointer(options.e); canvas.forEachObject(obj => { - var distX = Math.abs(p.x - obj.left), + const distX = Math.abs(p.x - obj.left), distY = Math.abs(p.y - obj.top), dist = Math.round(Math.sqrt(Math.pow(distX, 2) + Math.pow(distY, 2))); obj.setOpacity(1 / (dist / 20)); }); - }); - }); } @@ -365,22 +357,20 @@ declare module "fabric" { } function sample7() { - - var canvas = new fabric.Canvas('c', { selection: false }); + const canvas = new fabric.Canvas('c', { selection: false }); setInterval(() => { fabric.Image.fromURL('../assets/ladybug.png', obj => { - var img = obj; + const img = obj; img.set('left', fabric.util.getRandomInt(200, 600)).set('top', -50); img.movingLeft = !!Math.round(Math.random()); canvas.add(img); }); }, 1000); - - var animate = (function animate() { + const animate = (function animate() { canvas.forEachObject(obj => { - var img = obj; + const img = obj; img.left += (img.movingLeft ? -1 : 1); img.top += 1; if (img.left > 900 || img.top > 500) { @@ -397,7 +387,6 @@ function sample7() { } function sample8() { - function pad(str: string, length: number): string { while (str.length < length) { str = '0' + str; @@ -405,7 +394,7 @@ function sample8() { return str; } - var getRandomInt = fabric.util.getRandomInt; + const getRandomInt = fabric.util.getRandomInt; function getRandomColor() { return ( @@ -423,18 +412,18 @@ function sample8() { (fabric.Object.prototype as any).cornersize = 30; } - var canvas = new fabric.Canvas('canvas'); + const canvas = new fabric.Canvas('canvas'); // canvas.controlsAboveOverlay = true; function updateComplexity() { setTimeout(() => { - var element = document.getElementById('complexity').childNodes[1]; + const element = document.getElementById('complexity').childNodes[1]; element.innerHTML = ' ' + canvas.complexity(); }, 100); } document.getElementById('commands').onclick = (ev: any) => { - var ev: any = ev || window.event; + ev = ev || window.event; if (ev.preventDefault) { ev.preventDefault(); @@ -442,12 +431,12 @@ function sample8() { ev.returnValue = false; } - var element: any = ev.target || ev.srcElement; + let element: any = ev.target || ev.srcElement; if (element.nodeName.toLowerCase() === 'strong') { element = element.parentNode; } - var className = element.className, + const className = element.className, offset = 50, left = fabric.util.getRandomInt(0 + offset, 700 - offset), top = fabric.util.getRandomInt(0 + offset, 500 - offset), @@ -455,7 +444,6 @@ function sample8() { width = fabric.util.getRandomInt(30, 50), opacity = ((min: number, max: number) => Math.random() * (max - min) + min)(0.5, 1); - switch (className) { case 'rect': canvas.add(new fabric.Rect({ @@ -519,11 +507,11 @@ function sample8() { break; case 'shape': - var id: any = element.id; + const id: any = element.id; const match = /\d+$/.exec(id); if (match) { fabric.loadSVGFromURL('../assets/' + match[0] + '.svg', (objects, options) => { - var loadedObject = fabric.util.groupSVGElements(objects, options); + const loadedObject = fabric.util.groupSVGElements(objects, options); loadedObject.set({ left, @@ -552,13 +540,12 @@ function sample8() { }; document.getElementById('execute').onclick = () => { - var code = ( document.getElementById('canvas-console')).value; + const code = ( document.getElementById('canvas-console')).value; if (!(/^\s+$/).test(code)) { eval(code); // tslint:disable-line:no-eval } }; - document.getElementById('rasterize').onclick = () => { if (!fabric.Canvas.supports('toDataURL')) { alert('This browser doesn\'t provide means to serialize canvas to an image'); @@ -567,14 +554,14 @@ function sample8() { } }; - var removeSelectedEl = document.getElementById('remove-selected'); + const removeSelectedEl = document.getElementById('remove-selected'); removeSelectedEl.onclick = () => { - var activeObject = canvas.getActiveObject(), + const activeObject = canvas.getActiveObject(), activeGroup = canvas.getActiveGroup(); if (activeObject) { canvas.remove(activeObject); } else if (activeGroup) { - var objectsInGroup = activeGroup.getObjects(); + const objectsInGroup = activeGroup.getObjects(); canvas.discardActiveGroup(); objectsInGroup.forEach(object => { canvas.remove(object); @@ -582,9 +569,9 @@ function sample8() { } }; - var supportsInputOfType = (type: string) => { + const supportsInputOfType = (type: string) => { return () => { - var el = document.createElement('input'); + const el = document.createElement('input'); try { el.type = type; } catch (err) { } @@ -592,18 +579,18 @@ function sample8() { }; }; - var supportsSlider = supportsInputOfType('range'), + const supportsSlider = supportsInputOfType('range'), supportsColorpicker = supportsInputOfType('color'); if (supportsSlider()) { (() => { - var controls = document.getElementById('controls'); + const controls = document.getElementById('controls'); - var sliderLabel = document.createElement('label'); + const sliderLabel = document.createElement('label'); sliderLabel.htmlFor = 'opacity'; sliderLabel.innerHTML = 'Opacity: '; - var slider = document.createElement('input'); + const slider = document.createElement('input'); try { slider.type = 'range'; } catch (err) { } @@ -616,7 +603,7 @@ function sample8() { canvas.calcOffset(); slider.onchange = function() { - var activeObject = canvas.getActiveObject(), + const activeObject = canvas.getActiveObject(), activeGroup = canvas.getActiveGroup(); if (activeObject || activeGroup) { @@ -629,14 +616,14 @@ function sample8() { if (supportsColorpicker()) { (() => { - var controls = document.getElementById('controls'); + const controls = document.getElementById('controls'); - var label = document.createElement('label'); + const label = document.createElement('label'); label.htmlFor = 'color'; label.innerHTML = 'Color: '; label.style.marginLeft = '10px'; - var colorpicker = document.createElement('input'); + const colorpicker = document.createElement('input'); colorpicker.type = 'color'; colorpicker.id = 'color'; colorpicker.style.width = '40px'; @@ -647,7 +634,7 @@ function sample8() { canvas.calcOffset(); colorpicker.onchange = function() { - var activeObject = canvas.getActiveObject(), + const activeObject = canvas.getActiveObject(), activeGroup = canvas.getActiveGroup(); if (activeObject || activeGroup) { @@ -658,9 +645,9 @@ function sample8() { })(); } - var lockHorizontallyEl = document.getElementById('lock-horizontally'); + const lockHorizontallyEl = document.getElementById('lock-horizontally'); lockHorizontallyEl.onclick = () => { - var activeObject: any = canvas.getActiveObject(); + const activeObject: any = canvas.getActiveObject(); if (activeObject) { activeObject.lockMovementX = !activeObject.lockMovementX; lockHorizontallyEl.innerHTML = activeObject.lockMovementX @@ -669,9 +656,9 @@ function sample8() { } }; - var lockVerticallyEl = document.getElementById('lock-vertically'); + const lockVerticallyEl = document.getElementById('lock-vertically'); lockVerticallyEl.onclick = () => { - var activeObject: any = canvas.getActiveObject(); + const activeObject: any = canvas.getActiveObject(); if (activeObject) { activeObject.lockMovementY = !activeObject.lockMovementY; lockVerticallyEl.innerHTML = activeObject.lockMovementY @@ -680,9 +667,9 @@ function sample8() { } }; - var lockScalingXEl = document.getElementById('lock-scaling-x'); + const lockScalingXEl = document.getElementById('lock-scaling-x'); lockScalingXEl.onclick = () => { - var activeObject: any = canvas.getActiveObject(); + const activeObject: any = canvas.getActiveObject(); if (activeObject) { activeObject.lockScalingX = !activeObject.lockScalingX; lockScalingXEl.innerHTML = activeObject.lockScalingX @@ -691,9 +678,9 @@ function sample8() { } }; - var lockScalingYEl = document.getElementById('lock-scaling-y'); + const lockScalingYEl = document.getElementById('lock-scaling-y'); lockScalingYEl.onclick = () => { - var activeObject: any = canvas.getActiveObject(); + const activeObject: any = canvas.getActiveObject(); if (activeObject) { activeObject.lockScalingY = !activeObject.lockScalingY; lockScalingYEl.innerHTML = activeObject.lockScalingY @@ -702,9 +689,9 @@ function sample8() { } }; - var lockRotationEl = document.getElementById('lock-rotation'); + const lockRotationEl = document.getElementById('lock-rotation'); lockRotationEl.onclick = () => { - var activeObject: any = canvas.getActiveObject(); + const activeObject: any = canvas.getActiveObject(); if (activeObject) { activeObject.lockRotation = !activeObject.lockRotation; lockRotationEl.innerHTML = activeObject.lockRotation @@ -713,9 +700,9 @@ function sample8() { } }; - var gradientifyBtn = document.getElementById('gradientify'); + const gradientifyBtn = document.getElementById('gradientify'); - var activeObjectButtons = [ + const activeObjectButtons = [ lockHorizontallyEl, lockVerticallyEl, lockScalingXEl, @@ -725,16 +712,16 @@ function sample8() { gradientifyBtn ]; - var opacityEl = document.getElementById('opacity'); + const opacityEl = document.getElementById('opacity'); if (opacityEl) { activeObjectButtons.push(opacityEl); } - var colorEl = document.getElementById('color'); + const colorEl = document.getElementById('color'); if (colorEl) { activeObjectButtons.push(colorEl); } - for (var i = activeObjectButtons.length; i--; ) { + for (let i = activeObjectButtons.length; i--; ) { activeObjectButtons[i]; } @@ -742,9 +729,9 @@ function sample8() { canvas.on('group:selected', onObjectSelected); function onObjectSelected(e: fabric.IEvent) { - var selectedObject = e.target; + const selectedObject = e.target; - for (var i = activeObjectButtons.length; i--; ) { + for (let i = activeObjectButtons.length; i--; ) { activeObjectButtons[i]; } @@ -756,18 +743,18 @@ function sample8() { } canvas.on('selection:cleared', e => { - for (var i = activeObjectButtons.length; i--; ) { + for (let i = activeObjectButtons.length; i--; ) { activeObjectButtons[i]; } }); - var drawingModeEl = document.getElementById('drawing-mode'), + const drawingModeEl = document.getElementById('drawing-mode'), drawingOptionsEl = document.getElementById('drawing-mode-options'), drawingColorEl = document.getElementById('drawing-color'), drawingLineWidthEl = document.getElementById('drawing-line-width'); drawingModeEl.onclick = () => { - var canvasWithDrawingMode: any = canvas; + const canvasWithDrawingMode: any = canvas; canvasWithDrawingMode.isDrawingMode = !canvasWithDrawingMode.isDrawingMode; if (canvasWithDrawingMode.isDrawingMode) { drawingModeEl.innerHTML = 'Cancel drawing mode'; @@ -794,12 +781,11 @@ function sample8() { canvas.freeDrawingColor = drawingColorEl.value; canvas.freeDrawingLineWidth = parseInt(drawingLineWidthEl.value, 10) || 1; - - var text = 'Lorem ipsum dolor sit amet,\nconsectetur adipisicing elit,\nsed do eiusmod tempor incididunt\nut labore et dolore magna aliqua.\n' + + const text = 'Lorem ipsum dolor sit amet,\nconsectetur adipisicing elit,\nsed do eiusmod tempor incididunt\nut labore et dolore magna aliqua.\n' + 'Ut enim ad minim veniam,\nquis nostrud exercitation ullamco\nlaboris nisi ut aliquip ex ea commodo consequat.'; document.getElementById('add-text').onclick = () => { - var textSample = new fabric.Text(text.slice(0, getRandomInt(0, text.length)), { + const textSample = new fabric.Text(text.slice(0, getRandomInt(0, text.length)), { left: getRandomInt(350, 400), top: getRandomInt(350, 400), fontFamily: 'helvetica', @@ -813,13 +799,12 @@ function sample8() { updateComplexity(); }; - document.onkeydown = e => { - var obj = canvas.getActiveObject() || canvas.getActiveGroup(); + const obj = canvas.getActiveObject() || canvas.getActiveGroup(); if (obj && e.keyCode === 8) { // this is horrible. need to fix, so that unified interface can be used if (obj.type === 'group') { - // var groupObjects = obj.getObjects(); + // const groupObjects = obj.getObjects(); // canvas.discardActiveGroup(); // groupObjects.forEach(function(obj) { // canvas.remove(obj); @@ -842,7 +827,7 @@ function sample8() { } gradientifyBtn.onclick = () => { - var obj = canvas.getActiveObject(); + const obj = canvas.getActiveObject(); if (obj) { obj.setGradient("fill", { x2: (getRandomInt(0, 1) ? 0 : obj.width), @@ -856,17 +841,17 @@ function sample8() { } }; - var textEl = document.getElementById('text'); + const textEl = document.getElementById('text'); if (textEl) { textEl.onfocus = function() { - var activeObject = canvas.getActiveObject(); + const activeObject = canvas.getActiveObject(); if (activeObject && activeObject.type === 'text') { this.value = ( activeObject).text; } }; textEl.onkeyup = function(e) { - var activeObject = canvas.getActiveObject(); + const activeObject = canvas.getActiveObject(); if (activeObject) { if (!this.value) { canvas.discardActiveObject(); @@ -878,11 +863,11 @@ function sample8() { }; } - var cmdUnderlineBtn = document.getElementById('text-cmd-underline'); + const cmdUnderlineBtn = document.getElementById('text-cmd-underline'); if (cmdUnderlineBtn) { activeObjectButtons.push(cmdUnderlineBtn); cmdUnderlineBtn.onclick = function() { - var activeObject = canvas.getActiveObject(); + const activeObject = canvas.getActiveObject(); if (activeObject && activeObject.type === 'text') { activeObject.textDecoration = (activeObject.textDecoration === 'underline' ? '' : 'underline'); this.className = activeObject.textDecoration ? 'selected' : ''; @@ -891,11 +876,11 @@ function sample8() { }; } - var cmdLinethroughBtn = document.getElementById('text-cmd-linethrough'); + const cmdLinethroughBtn = document.getElementById('text-cmd-linethrough'); if (cmdLinethroughBtn) { activeObjectButtons.push(cmdLinethroughBtn); cmdLinethroughBtn.onclick = function() { - var activeObject = canvas.getActiveObject(); + const activeObject = canvas.getActiveObject(); if (activeObject && activeObject.type === 'text') { activeObject.textDecoration = (activeObject.textDecoration === 'line-through' ? '' : 'line-through'); this.className = activeObject.textDecoration ? 'selected' : ''; @@ -904,11 +889,11 @@ function sample8() { }; } - var cmdOverlineBtn = document.getElementById('text-cmd-overline'); + const cmdOverlineBtn = document.getElementById('text-cmd-overline'); if (cmdOverlineBtn) { activeObjectButtons.push(cmdOverlineBtn); cmdOverlineBtn.onclick = function() { - var activeObject = canvas.getActiveObject(); + const activeObject = canvas.getActiveObject(); if (activeObject && activeObject.type === 'text') { activeObject.textDecoration = (activeObject.textDecoration === 'overline' ? '' : 'overline'); this.className = activeObject.textDecoration ? 'selected' : ''; @@ -917,11 +902,11 @@ function sample8() { }; } - var cmdBoldBtn = document.getElementById('text-cmd-bold'); + const cmdBoldBtn = document.getElementById('text-cmd-bold'); if (cmdBoldBtn) { activeObjectButtons.push(cmdBoldBtn); cmdBoldBtn.onclick = function() { - var activeObject = canvas.getActiveObject(); + const activeObject = canvas.getActiveObject(); if (activeObject && activeObject.type === 'text') { activeObject.fontWeight = (activeObject.fontWeight === 'bold' ? '' : 'bold'); this.className = activeObject.fontWeight ? 'selected' : ''; @@ -930,11 +915,11 @@ function sample8() { }; } - var cmdItalicBtn = document.getElementById('text-cmd-italic'); + const cmdItalicBtn = document.getElementById('text-cmd-italic'); if (cmdItalicBtn) { activeObjectButtons.push(cmdItalicBtn); cmdItalicBtn.onclick = function() { - var activeObject = canvas.getActiveObject(); + const activeObject = canvas.getActiveObject(); if (activeObject && activeObject.type === 'text') { activeObject.fontStyle = (activeObject.fontStyle === 'italic' ? '' : 'italic'); this.className = activeObject.fontStyle ? 'selected' : ''; @@ -943,11 +928,11 @@ function sample8() { }; } - var cmdShadowBtn = document.getElementById('text-cmd-shadow'); + const cmdShadowBtn = document.getElementById('text-cmd-shadow'); if (cmdShadowBtn) { activeObjectButtons.push(cmdShadowBtn); cmdShadowBtn.onclick = function() { - var activeObject = canvas.getActiveObject(); + const activeObject = canvas.getActiveObject(); if (activeObject && activeObject.type === 'text') { activeObject.shadow = !activeObject.shadow ? 'rgba(0,0,0,0.2) 2px 2px 10px' : ''; this.className = activeObject.shadow ? 'selected' : ''; @@ -956,11 +941,11 @@ function sample8() { }; } - var textAlignSwitch = document.getElementById('text-align'); + const textAlignSwitch = document.getElementById('text-align'); if (textAlignSwitch) { activeObjectButtons.push(textAlignSwitch); textAlignSwitch.onchange = function(this: HTMLInputElement) { - var activeObject = canvas.getActiveObject(); + const activeObject = canvas.getActiveObject(); if (activeObject && activeObject.type === 'text') { activeObject.textAlign = this.value.toLowerCase(); canvas.renderAll(); @@ -968,11 +953,11 @@ function sample8() { }; } - var fontFamilySwitch = document.getElementById('font-family'); + const fontFamilySwitch = document.getElementById('font-family'); if (fontFamilySwitch) { activeObjectButtons.push(fontFamilySwitch); fontFamilySwitch.onchange = function(this: HTMLInputElement) { - var activeObject = canvas.getActiveObject(); + const activeObject = canvas.getActiveObject(); if (activeObject && activeObject.type === 'text') { activeObject.fontFamily = this.value; canvas.renderAll(); @@ -980,10 +965,10 @@ function sample8() { }; } - var bgColorField = document.getElementById('text-bg-color'); + const bgColorField = document.getElementById('text-bg-color'); if (bgColorField) { bgColorField.onchange = function(this: HTMLInputElement) { - var activeObject = canvas.getActiveObject(); + const activeObject = canvas.getActiveObject(); if (activeObject && activeObject.type === 'text') { activeObject.backgroundColor = this.value; canvas.renderAll(); @@ -991,10 +976,10 @@ function sample8() { }; } - var strokeColorField = document.getElementById('text-stroke-color'); + const strokeColorField = document.getElementById('text-stroke-color'); if (strokeColorField) { strokeColorField.onchange = function(this: HTMLInputElement) { - var activeObject = canvas.getActiveObject(); + const activeObject = canvas.getActiveObject(); if (activeObject && activeObject.type === 'text') { activeObject.stroke = this.value; canvas.renderAll(); @@ -1004,9 +989,9 @@ function sample8() { if (supportsSlider) { (() => { - var container = document.getElementById('text-controls'); - var slider = document.createElement('input'); - var label = document.createElement('label'); + const container = document.getElementById('text-controls'); + const slider = document.createElement('input'); + const label = document.createElement('label'); label.innerHTML = 'Line height: '; try { slider.type = 'range'; } catch (err) { } slider.min = "0"; @@ -1017,7 +1002,7 @@ function sample8() { label.appendChild(slider); slider.title = "Line height"; slider.onchange = function() { - var activeObject = canvas.getActiveObject(); + const activeObject = canvas.getActiveObject(); if (activeObject && activeObject.type === 'text') { activeObject.lineHeight = +this.value; canvas.renderAll(); @@ -1031,9 +1016,9 @@ function sample8() { } document.getElementById('load-svg').onclick = () => { - var svg = ( document.getElementById('svg-console')).value; + const svg = ( document.getElementById('svg-console')).value; fabric.loadSVGFromString(svg, (objects, options) => { - var obj = fabric.util.groupSVGElements(objects, options); + const obj = fabric.util.groupSVGElements(objects, options); canvas.add(obj).centerObject(obj).renderAll(); obj.setCoords(); }); @@ -1041,7 +1026,7 @@ function sample8() { } function sample9() { - var canvas = new fabric.Canvas('c'); + const canvas = new fabric.Canvas('c'); canvas.setBackgroundImage('yolo.jpg', () => { "a"; }, { opacity: 45 }); canvas.setBackgroundImage('yolo.jpg', () => { "a"; }); } diff --git a/fabric/index.d.ts b/types/fabric/index.d.ts similarity index 99% rename from fabric/index.d.ts rename to types/fabric/index.d.ts index 881be190bd..27a4188f52 100644 --- a/fabric/index.d.ts +++ b/types/fabric/index.d.ts @@ -5,8 +5,8 @@ export as namespace fabric; -export var isLikelyNode: boolean; -export var isTouchSupported: boolean; +export const isLikelyNode: boolean; +export const isTouchSupported: boolean; ///////////////////////////////////////////////////////////// // farbic Functions @@ -1289,7 +1289,6 @@ export class StaticCanvas { */ fxStraightenObject(object: Object): StaticCanvas - static EMPTY_JSON: string; /** * Provides a way to check support of some of the canvas methods @@ -2997,8 +2996,8 @@ interface IRectOptions extends IObjectOptions { * Vertical border radius */ ry?: number; - } + export interface Rect extends IRectOptions {} export class Rect extends Object { /** @@ -3950,8 +3949,8 @@ export class BaseBrush { * @param {Object|String} [options] Options object or string (e.g. "2px 2px 10px rgba(0,0,0,0.2)") */ setShadow(options: string|any): BaseBrush; - } + export class CircleBrush extends BaseBrush { /** * Width of a brush @@ -3969,6 +3968,7 @@ export class CircleBrush extends BaseBrush { */ addPoint(pointer: any): Point } + export class SprayBrush extends BaseBrush { /** * Width of a brush @@ -4147,7 +4147,6 @@ interface IUtilArc { * @param {Number} y3 */ getBoundsOfCurve(x0: number, y0: number, x1: number, y1: number, x2: number, y2: number, x3: number, y3: number): Point[]; - } interface IUtilDomEvent { @@ -4298,7 +4297,6 @@ interface IUtilClass { * (be careful modifying objects defined here as this would affect all instances) */ createClass(properties?: any): void; - } interface IUtilObject { @@ -4517,7 +4515,7 @@ interface IUtilMisc { isTransparent(ctx: CanvasRenderingContext2D, x: number, y: number, tolerance: number): boolean; } -export var util: IUtil; +export const util: IUtil; interface IUtil extends IUtilAnimation, IUtilArc, IObservable, IUtilDomEvent, IUtilDomMisc, IUtilDomRequest, IUtilDomStyle, IUtilClass, IUtilMisc { ease: IUtilAnimEase; diff --git a/fabric/tsconfig.json b/types/fabric/tsconfig.json similarity index 100% rename from fabric/tsconfig.json rename to types/fabric/tsconfig.json diff --git a/fabric/tslint.json b/types/fabric/tslint.json similarity index 100% rename from fabric/tslint.json rename to types/fabric/tslint.json diff --git a/facebook-js-sdk/facebook-js-sdk-tests.ts b/types/facebook-js-sdk/facebook-js-sdk-tests.ts similarity index 100% rename from facebook-js-sdk/facebook-js-sdk-tests.ts rename to types/facebook-js-sdk/facebook-js-sdk-tests.ts diff --git a/facebook-js-sdk/index.d.ts b/types/facebook-js-sdk/index.d.ts similarity index 100% rename from facebook-js-sdk/index.d.ts rename to types/facebook-js-sdk/index.d.ts diff --git a/facebook-js-sdk/tsconfig.json b/types/facebook-js-sdk/tsconfig.json similarity index 100% rename from facebook-js-sdk/tsconfig.json rename to types/facebook-js-sdk/tsconfig.json diff --git a/facebook-pixel/facebook-pixel-tests.ts b/types/facebook-pixel/facebook-pixel-tests.ts similarity index 100% rename from facebook-pixel/facebook-pixel-tests.ts rename to types/facebook-pixel/facebook-pixel-tests.ts diff --git a/facebook-pixel/index.d.ts b/types/facebook-pixel/index.d.ts similarity index 100% rename from facebook-pixel/index.d.ts rename to types/facebook-pixel/index.d.ts diff --git a/facebook-pixel/tsconfig.json b/types/facebook-pixel/tsconfig.json similarity index 100% rename from facebook-pixel/tsconfig.json rename to types/facebook-pixel/tsconfig.json diff --git a/faker/faker-tests.ts b/types/faker/faker-tests.ts similarity index 100% rename from faker/faker-tests.ts rename to types/faker/faker-tests.ts diff --git a/faker/index.d.ts b/types/faker/index.d.ts similarity index 100% rename from faker/index.d.ts rename to types/faker/index.d.ts diff --git a/faker/tsconfig.json b/types/faker/tsconfig.json similarity index 100% rename from faker/tsconfig.json rename to types/faker/tsconfig.json diff --git a/faker/v3/faker-tests.ts b/types/faker/v3/faker-tests.ts similarity index 100% rename from faker/v3/faker-tests.ts rename to types/faker/v3/faker-tests.ts diff --git a/faker/v3/index.d.ts b/types/faker/v3/index.d.ts similarity index 100% rename from faker/v3/index.d.ts rename to types/faker/v3/index.d.ts diff --git a/faker/v3/tsconfig.json b/types/faker/v3/tsconfig.json similarity index 100% rename from faker/v3/tsconfig.json rename to types/faker/v3/tsconfig.json diff --git a/falcor-express/falcor-express-tests.ts b/types/falcor-express/falcor-express-tests.ts similarity index 100% rename from falcor-express/falcor-express-tests.ts rename to types/falcor-express/falcor-express-tests.ts diff --git a/falcor-express/index.d.ts b/types/falcor-express/index.d.ts similarity index 100% rename from falcor-express/index.d.ts rename to types/falcor-express/index.d.ts diff --git a/falcor-express/tsconfig.json b/types/falcor-express/tsconfig.json similarity index 100% rename from falcor-express/tsconfig.json rename to types/falcor-express/tsconfig.json diff --git a/falcor-http-datasource/falcor-http-datasource-tests.ts b/types/falcor-http-datasource/falcor-http-datasource-tests.ts similarity index 100% rename from falcor-http-datasource/falcor-http-datasource-tests.ts rename to types/falcor-http-datasource/falcor-http-datasource-tests.ts diff --git a/falcor-http-datasource/index.d.ts b/types/falcor-http-datasource/index.d.ts similarity index 100% rename from falcor-http-datasource/index.d.ts rename to types/falcor-http-datasource/index.d.ts diff --git a/falcor-http-datasource/tsconfig.json b/types/falcor-http-datasource/tsconfig.json similarity index 100% rename from falcor-http-datasource/tsconfig.json rename to types/falcor-http-datasource/tsconfig.json diff --git a/falcor-json-graph/falcor-json-graph-tests.ts b/types/falcor-json-graph/falcor-json-graph-tests.ts similarity index 100% rename from falcor-json-graph/falcor-json-graph-tests.ts rename to types/falcor-json-graph/falcor-json-graph-tests.ts diff --git a/falcor-json-graph/index.d.ts b/types/falcor-json-graph/index.d.ts similarity index 100% rename from falcor-json-graph/index.d.ts rename to types/falcor-json-graph/index.d.ts diff --git a/falcor-json-graph/tsconfig.json b/types/falcor-json-graph/tsconfig.json similarity index 100% rename from falcor-json-graph/tsconfig.json rename to types/falcor-json-graph/tsconfig.json diff --git a/falcor-router/falcor-router-tests.ts b/types/falcor-router/falcor-router-tests.ts similarity index 55% rename from falcor-router/falcor-router-tests.ts rename to types/falcor-router/falcor-router-tests.ts index 5f5bdca0e4..7358ab2e02 100644 --- a/falcor-router/falcor-router-tests.ts +++ b/types/falcor-router/falcor-router-tests.ts @@ -2,6 +2,7 @@ import falcor = require('falcor'); import Router = require('falcor-router'); +import falcorJsonGraph = require('falcor-json-graph'); new Router([]); new Router([], {}); @@ -100,3 +101,76 @@ new Router([{ } }]); +new Router([{ + route: 'todos.new', + call(callpath, args) { + return {path: 'json.todosById.1234.name', value: 'Buy cheese'}; + } +}]); + +new Router([{ + route: 'todos.new', + call(callpath, args) { + return falcorJsonGraph.pathInvalidation('json.todos.length'); + } +}]); + +new Router([{ + route: 'todos.new', + call(callpath, args) { + return [ + falcorJsonGraph.pathInvalidation('json.todos.length'), + {path: 'json.todosById.1234.name', value: 'Buy cheese'} + ] + } +}]); + +new Router([{ + route: 'todos.new', + call(callpath, args) { + return new Promise((resolve, reject): void => { + resolve([ + falcorJsonGraph.pathInvalidation('json.todos.length'), + {path: 'json.todosById.1234.name', value: 'Buy cheese'} + ]); + }); + } +}]); + +new Router([{ + route: 'todos.new', + call(callpath, args) { + return { + paths: [['json', 'todosById', '1234', 'name']], + jsonGraph: { + json: { + todosById: { + 1234: { + name: 'Buy cheese' + } + } + } + } + }; + } +}]); + +new Router([{ + route: 'todos.new', + call(callpath, args) { + return new Promise((resolve, reject): void => { + resolve({ + paths: [['json', 'todosById', '1234', 'name']], + jsonGraph: { + json: { + todosById: { + 1234: { + name: 'Buy cheese' + } + } + } + } + }); + }); + } +}]); diff --git a/falcor-router/index.d.ts b/types/falcor-router/index.d.ts similarity index 81% rename from falcor-router/index.d.ts rename to types/falcor-router/index.d.ts index 659f45767f..daef26f379 100644 --- a/falcor-router/index.d.ts +++ b/types/falcor-router/index.d.ts @@ -1,6 +1,6 @@ // Type definitions for falcor-router 0.4.0 // Project: https://github.com/Netflix/falcor-router -// Definitions by: Quramy +// Definitions by: Quramy , cdhgee // Definitions: https://github.com/borisyankov/DefinitelyTyped /// @@ -34,7 +34,7 @@ declare namespace FalcorRouter { type RoutePathSet = FalcorJsonGraph.PathSet; interface CallRoute extends Route { - call(callPath: RoutePathSet, args: Array): RouteResult | Promise; + call(callPath: RoutePathSet, args: Array): CallRouteResult | Promise; } interface GetRoute extends Route { @@ -47,6 +47,7 @@ declare namespace FalcorRouter { type RouteDefinition = GetRoute | SetRoute | CallRoute; type RouteResult = FalcorJsonGraph.PathValue | Array | FalcorJsonGraph.JSONEnvelope; + type CallRouteResult = FalcorJsonGraph.PathValue | FalcorJsonGraph.InvalidPath | Array | FalcorJsonGraph.JSONGraphEnvelope; interface RouterOptions { debug?: boolean; diff --git a/falcor-router/tsconfig.json b/types/falcor-router/tsconfig.json similarity index 100% rename from falcor-router/tsconfig.json rename to types/falcor-router/tsconfig.json diff --git a/falcor/index.d.ts b/types/falcor/index.d.ts similarity index 99% rename from falcor/index.d.ts rename to types/falcor/index.d.ts index 1bf3c9ba23..44d9118ca2 100644 --- a/falcor/index.d.ts +++ b/types/falcor/index.d.ts @@ -41,26 +41,22 @@ export { * 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 ///////////////////////////////////////////////////// @@ -215,7 +211,6 @@ export class Model { getPath(): Path; } - ///////////////////////////////////////////////////// // ModelResponse ///////////////////////////////////////////////////// @@ -232,13 +227,11 @@ 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. diff --git a/falcor/test/browser.ts b/types/falcor/test/browser.ts similarity index 78% rename from falcor/test/browser.ts rename to types/falcor/test/browser.ts index 073d777679..d2390f107d 100644 --- a/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/falcor/test/index.ts b/types/falcor/test/index.ts similarity index 99% rename from falcor/test/index.ts rename to types/falcor/test/index.ts index 2798b72645..8eea62b2f2 100644 --- a/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/falcor/tsconfig.json b/types/falcor/tsconfig.json similarity index 100% rename from falcor/tsconfig.json rename to types/falcor/tsconfig.json diff --git a/falcor/tslint.json b/types/falcor/tslint.json similarity index 100% rename from falcor/tslint.json rename to types/falcor/tslint.json diff --git a/famous/famous-tests.ts b/types/famous/famous-tests.ts similarity index 100% rename from famous/famous-tests.ts rename to types/famous/famous-tests.ts diff --git a/famous/index.d.ts b/types/famous/index.d.ts similarity index 100% rename from famous/index.d.ts rename to types/famous/index.d.ts diff --git a/famous/tsconfig.json b/types/famous/tsconfig.json similarity index 100% rename from famous/tsconfig.json rename to types/famous/tsconfig.json diff --git a/fancybox/fancybox-tests.ts b/types/fancybox/fancybox-tests.ts similarity index 100% rename from fancybox/fancybox-tests.ts rename to types/fancybox/fancybox-tests.ts diff --git a/fancybox/index.d.ts b/types/fancybox/index.d.ts similarity index 100% rename from fancybox/index.d.ts rename to types/fancybox/index.d.ts diff --git a/fancybox/tsconfig.json b/types/fancybox/tsconfig.json similarity index 100% rename from fancybox/tsconfig.json rename to types/fancybox/tsconfig.json diff --git a/farbtastic/farbtastic-tests.ts b/types/farbtastic/farbtastic-tests.ts similarity index 100% rename from farbtastic/farbtastic-tests.ts rename to types/farbtastic/farbtastic-tests.ts diff --git a/farbtastic/index.d.ts b/types/farbtastic/index.d.ts similarity index 100% rename from farbtastic/index.d.ts rename to types/farbtastic/index.d.ts diff --git a/farbtastic/tsconfig.json b/types/farbtastic/tsconfig.json similarity index 100% rename from farbtastic/tsconfig.json rename to types/farbtastic/tsconfig.json diff --git a/fast-json-patch/fast-json-patch-tests.ts b/types/fast-json-patch/fast-json-patch-tests.ts similarity index 100% rename from fast-json-patch/fast-json-patch-tests.ts rename to types/fast-json-patch/fast-json-patch-tests.ts diff --git a/fast-json-patch/index.d.ts b/types/fast-json-patch/index.d.ts similarity index 100% rename from fast-json-patch/index.d.ts rename to types/fast-json-patch/index.d.ts diff --git a/fast-json-patch/tsconfig.json b/types/fast-json-patch/tsconfig.json similarity index 100% rename from fast-json-patch/tsconfig.json rename to types/fast-json-patch/tsconfig.json diff --git a/fast-levenshtein/fast-levenshtein-tests.ts b/types/fast-levenshtein/fast-levenshtein-tests.ts similarity index 100% rename from fast-levenshtein/fast-levenshtein-tests.ts rename to types/fast-levenshtein/fast-levenshtein-tests.ts diff --git a/fast-levenshtein/index.d.ts b/types/fast-levenshtein/index.d.ts similarity index 100% rename from fast-levenshtein/index.d.ts rename to types/fast-levenshtein/index.d.ts diff --git a/fast-levenshtein/tsconfig.json b/types/fast-levenshtein/tsconfig.json similarity index 100% rename from fast-levenshtein/tsconfig.json rename to types/fast-levenshtein/tsconfig.json diff --git a/fast-simplex-noise/fast-simplex-noise-tests.ts b/types/fast-simplex-noise/fast-simplex-noise-tests.ts similarity index 100% rename from fast-simplex-noise/fast-simplex-noise-tests.ts rename to types/fast-simplex-noise/fast-simplex-noise-tests.ts diff --git a/fast-simplex-noise/index.d.ts b/types/fast-simplex-noise/index.d.ts similarity index 100% rename from fast-simplex-noise/index.d.ts rename to types/fast-simplex-noise/index.d.ts diff --git a/fast-simplex-noise/tsconfig.json b/types/fast-simplex-noise/tsconfig.json similarity index 100% rename from fast-simplex-noise/tsconfig.json rename to types/fast-simplex-noise/tsconfig.json diff --git a/fast-stats/fast-stats-tests.ts b/types/fast-stats/fast-stats-tests.ts similarity index 100% rename from fast-stats/fast-stats-tests.ts rename to types/fast-stats/fast-stats-tests.ts diff --git a/fast-stats/index.d.ts b/types/fast-stats/index.d.ts similarity index 100% rename from fast-stats/index.d.ts rename to types/fast-stats/index.d.ts diff --git a/fast-stats/tsconfig.json b/types/fast-stats/tsconfig.json similarity index 100% rename from fast-stats/tsconfig.json rename to types/fast-stats/tsconfig.json diff --git a/fastclick/fastclick-tests.ts b/types/fastclick/fastclick-tests.ts similarity index 100% rename from fastclick/fastclick-tests.ts rename to types/fastclick/fastclick-tests.ts diff --git a/fastclick/index.d.ts b/types/fastclick/index.d.ts similarity index 100% rename from fastclick/index.d.ts rename to types/fastclick/index.d.ts diff --git a/fastclick/tsconfig.json b/types/fastclick/tsconfig.json similarity index 100% rename from fastclick/tsconfig.json rename to types/fastclick/tsconfig.json diff --git a/favico.js/favico.js-tests.ts b/types/favico.js/favico.js-tests.ts similarity index 100% rename from favico.js/favico.js-tests.ts rename to types/favico.js/favico.js-tests.ts diff --git a/favico.js/index.d.ts b/types/favico.js/index.d.ts similarity index 100% rename from favico.js/index.d.ts rename to types/favico.js/index.d.ts diff --git a/favico.js/tsconfig.json b/types/favico.js/tsconfig.json similarity index 100% rename from favico.js/tsconfig.json rename to types/favico.js/tsconfig.json diff --git a/fb/fb-tests.ts b/types/fb/fb-tests.ts similarity index 100% rename from fb/fb-tests.ts rename to types/fb/fb-tests.ts diff --git a/fb/index.d.ts b/types/fb/index.d.ts similarity index 100% rename from fb/index.d.ts rename to types/fb/index.d.ts diff --git a/fb/tsconfig.json b/types/fb/tsconfig.json similarity index 100% rename from fb/tsconfig.json rename to types/fb/tsconfig.json diff --git a/fbemitter/fbemitter-tests.ts b/types/fbemitter/fbemitter-tests.ts similarity index 100% rename from fbemitter/fbemitter-tests.ts rename to types/fbemitter/fbemitter-tests.ts diff --git a/fbemitter/index.d.ts b/types/fbemitter/index.d.ts similarity index 100% rename from fbemitter/index.d.ts rename to types/fbemitter/index.d.ts diff --git a/fbemitter/tsconfig.json b/types/fbemitter/tsconfig.json similarity index 100% rename from fbemitter/tsconfig.json rename to types/fbemitter/tsconfig.json diff --git a/featherlight/featherlight-tests.ts b/types/featherlight/featherlight-tests.ts similarity index 100% rename from featherlight/featherlight-tests.ts rename to types/featherlight/featherlight-tests.ts diff --git a/featherlight/index.d.ts b/types/featherlight/index.d.ts similarity index 100% rename from featherlight/index.d.ts rename to types/featherlight/index.d.ts diff --git a/featherlight/tsconfig.json b/types/featherlight/tsconfig.json similarity index 100% rename from featherlight/tsconfig.json rename to types/featherlight/tsconfig.json diff --git a/types/fetch-jsonp/fetch-jsonp-tests.ts b/types/fetch-jsonp/fetch-jsonp-tests.ts new file mode 100644 index 0000000000..6a0d58f513 --- /dev/null +++ b/types/fetch-jsonp/fetch-jsonp-tests.ts @@ -0,0 +1,48 @@ +import * as fetchJsonp from 'fetch-jsonp'; + +/* Taken from https://github.com/camsong/fetch-jsonp/blob/v1.0.2/README.md */ + +fetchJsonp('/users.jsonp') + .then(function(response) { + return response.json(); + }).then(function(json) { + console.log('parsed json', json); + }).catch(function(ex) { + console.log('parsing failed', ex); + }); + +fetchJsonp('/users.jsonp', { + jsonpCallback: 'custom_callback' + }) + .then(function(response) { + return response.json(); + }).then(function(json) { + console.log('parsed json', json); + }).catch(function(ex) { + console.log('parsing failed', ex); + }); + +fetchJsonp('/users.jsonp', { + timeout: 3000, + jsonpCallback: 'custom_callback' + }) + .then(function(response) { + return response.json(); + }).then(function(json) { + console.log('parsed json', json); + }).catch(function(ex) { + console.log('parsing failed', ex); + }); + +// Taken from https://github.com/camsong/fetch-jsonp/blob/v1.0.2/examples/index.html +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(); +}).then(function(json) { + document.body.innerHTML = JSON.stringify(json); +})['catch'](function(ex) { + document.body.innerHTML = 'failed:' + ex; +}); diff --git a/types/fetch-jsonp/index.d.ts b/types/fetch-jsonp/index.d.ts new file mode 100644 index 0000000000..e37094254e --- /dev/null +++ b/types/fetch-jsonp/index.d.ts @@ -0,0 +1,16 @@ +// Type definitions for fetch-jsonp 1.0 +// Project: https://github.com/camsong/fetch-jsonp +// Definitions by: Tanguy Krotoff +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +declare namespace fetchJsonp { + interface Options { + timeout?: number; + jsonpCallback?: string; + } +} + +declare function fetchJsonp(url: RequestInfo, options?: fetchJsonp.Options): Promise; + +export = fetchJsonp; diff --git a/types/fetch-jsonp/tsconfig.json b/types/fetch-jsonp/tsconfig.json new file mode 100644 index 0000000000..05c3f994ed --- /dev/null +++ b/types/fetch-jsonp/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "module": "commonjs", + "lib": ["es6", "dom"], + "noUnusedLocals": true, + "noUnusedParameters": true, + "strictNullChecks": true, + "noImplicitAny": true, + "noImplicitThis": true, + "forceConsistentCasingInFileNames": true, + "noEmit": true + }, + "files": [ + "index.d.ts", + "fetch-jsonp-tests.ts" + ] +} diff --git a/ui-router-extras/tslint.json b/types/fetch-jsonp/tslint.json similarity index 54% rename from ui-router-extras/tslint.json rename to types/fetch-jsonp/tslint.json index 19dc9db271..88bd9662f7 100644 --- a/ui-router-extras/tslint.json +++ b/types/fetch-jsonp/tslint.json @@ -1,8 +1,6 @@ { "extends": "../tslint.json", "rules": { - "interface-name": [ - false - ] + "only-arrow-functions-2": false } } diff --git a/fetch-mock/fetch-mock-tests.ts b/types/fetch-mock/fetch-mock-tests.ts similarity index 100% rename from fetch-mock/fetch-mock-tests.ts rename to types/fetch-mock/fetch-mock-tests.ts diff --git a/fetch-mock/index.d.ts b/types/fetch-mock/index.d.ts similarity index 99% rename from fetch-mock/index.d.ts rename to types/fetch-mock/index.d.ts index 4d69096845..bda708ee55 100644 --- a/fetch-mock/index.d.ts +++ b/types/fetch-mock/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/wheresrhys/fetch-mock // Definitions by: Alexey Svetliakov , Tamir Duberstein , Risto Keravuori // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +// TypeScript Version: 2.2 type MockRequest = Request | RequestInit; diff --git a/fetch-mock/tsconfig.json b/types/fetch-mock/tsconfig.json similarity index 100% rename from fetch-mock/tsconfig.json rename to types/fetch-mock/tsconfig.json diff --git a/fetch-mock/tslint.json b/types/fetch-mock/tslint.json similarity index 100% rename from fetch-mock/tslint.json rename to types/fetch-mock/tslint.json diff --git a/fetch.io/fetch.io-tests.ts b/types/fetch.io/fetch.io-tests.ts similarity index 64% rename from fetch.io/fetch.io-tests.ts rename to types/fetch.io/fetch.io-tests.ts index 4e14a7a9a9..538da8e74b 100644 --- a/fetch.io/fetch.io-tests.ts +++ b/types/fetch.io/fetch.io-tests.ts @@ -1,60 +1,59 @@ +import Fetch from 'fetch.io'; -import Fetch from 'fetch.io' - -const request = new Fetch() +const request = new Fetch(); request .get('') .query({}) - .json() + .json(); request .delete('') - .json() + .json(); request .head('') - .json() + .json(); request .options('') - .json() + .json(); request .put('') - .json() + .json(); request .config('key', 'value') - .json() + .json(); request .config({key: 'value'}) - .json() + .json(); request .config('set', 'value') - .json() + .json(); request .set({key: 'value'}) - .json() + .json(); request .type('json') - .json() + .json(); request .get('') .query({}) - .text() + .text(); request .get('') .query({}) - .then(() => {}) + .then(() => {}); request .post('') .send({}) - .json() + .json(); diff --git a/types/fetch.io/index.d.ts b/types/fetch.io/index.d.ts new file mode 100644 index 0000000000..966925b68f --- /dev/null +++ b/types/fetch.io/index.d.ts @@ -0,0 +1,118 @@ +// Type definitions for fetch.io 3.1 +// Project: https://github.com/haoxins/fetch.io +// Definitions by: newraina +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +type TUrl = string; + +type TMethod = 'delete' | 'get' | 'head' | 'options' | 'post' | 'put'; + +interface Query { + [key: string]: number | boolean | string; +} + +interface Header { + [key: string]: string; +} + +interface Options extends RequestInit { + prefix?: string; + + query?: Query; + + header?: Header; + + beforeRequest?(url: TUrl, body: BodyInit): boolean; + + afterResponse?(res: Response): void; + + afterJSON?(body: any): void; +} + +declare class Request { + constructor(method: TMethod, url: TUrl, options: Options) + + /** + * HTTP delete method + */ + delete: (url: TUrl) => this; + + /** + * HTTP get method + */ + get: (url: TUrl) => this; + + /** + * HTTP head method + */ + head: (url: TUrl) => this; + + /** + * HTTP options method + */ + options: (url: TUrl) => this; + + /** + * HTTP post method + */ + post: (url: TUrl) => this; + + /** + * HTTP put method + */ + put: (url: TUrl) => this; + + /** + * Set Options + */ + config(key: string, value: any): this + + config(opts: {[key: string]: any}): this + + /** + * Set Header + */ + set(key: string, value: any): this + + set(opts: {[key: string]: any}): this + + /** + * Set Content-Type + */ + type(type: 'json' | 'form' | 'urlencoded'): this + + /** + * Add query string + */ + query(object: {[key: string]: any}): this + + /** + * Send data + */ + send(data: {[key: string]: any}): this + + /** + * ppend formData + */ + append(key: string, value: string): this + + /** + * Get Response directly + */ + then(resolve: (value?: Response) => void, reject?: (reason?: any) => void): Promise + + /** + * Make Response to JSON + */ + json(strict?: boolean): Promise + + /** + * Make Response to string + */ + text(): Promise +} + +export default class Fetch extends Request { + constructor(options?: Options) +} diff --git a/fetch.io/tsconfig.json b/types/fetch.io/tsconfig.json similarity index 100% rename from fetch.io/tsconfig.json rename to types/fetch.io/tsconfig.json diff --git a/fetch.io/tslint.json b/types/fetch.io/tslint.json similarity index 100% rename from fetch.io/tslint.json rename to types/fetch.io/tslint.json diff --git a/ffi/ffi-tests.ts b/types/ffi/ffi-tests.ts similarity index 100% rename from ffi/ffi-tests.ts rename to types/ffi/ffi-tests.ts diff --git a/ffi/index.d.ts b/types/ffi/index.d.ts similarity index 100% rename from ffi/index.d.ts rename to types/ffi/index.d.ts diff --git a/ffi/node-ffi-buffer.d.ts b/types/ffi/node-ffi-buffer.d.ts similarity index 100% rename from ffi/node-ffi-buffer.d.ts rename to types/ffi/node-ffi-buffer.d.ts diff --git a/ffi/tsconfig.json b/types/ffi/tsconfig.json similarity index 100% rename from ffi/tsconfig.json rename to types/ffi/tsconfig.json diff --git a/fhir/fhir-tests.ts b/types/fhir/fhir-tests.ts similarity index 100% rename from fhir/fhir-tests.ts rename to types/fhir/fhir-tests.ts diff --git a/fhir/index.d.ts b/types/fhir/index.d.ts similarity index 100% rename from fhir/index.d.ts rename to types/fhir/index.d.ts diff --git a/fhir/tsconfig.json b/types/fhir/tsconfig.json similarity index 100% rename from fhir/tsconfig.json rename to types/fhir/tsconfig.json diff --git a/fibers/fibers-tests.ts b/types/fibers/fibers-tests.ts similarity index 100% rename from fibers/fibers-tests.ts rename to types/fibers/fibers-tests.ts diff --git a/fibers/index.d.ts b/types/fibers/index.d.ts similarity index 100% rename from fibers/index.d.ts rename to types/fibers/index.d.ts diff --git a/fibers/tsconfig.json b/types/fibers/tsconfig.json similarity index 100% rename from fibers/tsconfig.json rename to types/fibers/tsconfig.json diff --git a/field/field-tests.ts b/types/field/field-tests.ts similarity index 100% rename from field/field-tests.ts rename to types/field/field-tests.ts diff --git a/field/index.d.ts b/types/field/index.d.ts similarity index 100% rename from field/index.d.ts rename to types/field/index.d.ts diff --git a/field/tsconfig.json b/types/field/tsconfig.json similarity index 100% rename from field/tsconfig.json rename to types/field/tsconfig.json diff --git a/file-saver/file-saver-tests.ts b/types/file-saver/file-saver-tests.ts similarity index 100% rename from file-saver/file-saver-tests.ts rename to types/file-saver/file-saver-tests.ts diff --git a/file-saver/index.d.ts b/types/file-saver/index.d.ts similarity index 100% rename from file-saver/index.d.ts rename to types/file-saver/index.d.ts diff --git a/file-saver/tsconfig.json b/types/file-saver/tsconfig.json similarity index 100% rename from file-saver/tsconfig.json rename to types/file-saver/tsconfig.json diff --git a/file-type/file-type-tests.ts b/types/file-type/file-type-tests.ts similarity index 100% rename from file-type/file-type-tests.ts rename to types/file-type/file-type-tests.ts diff --git a/file-type/index.d.ts b/types/file-type/index.d.ts similarity index 100% rename from file-type/index.d.ts rename to types/file-type/index.d.ts diff --git a/file-type/tsconfig.json b/types/file-type/tsconfig.json similarity index 100% rename from file-type/tsconfig.json rename to types/file-type/tsconfig.json diff --git a/file-url/file-url-tests.ts b/types/file-url/file-url-tests.ts similarity index 100% rename from file-url/file-url-tests.ts rename to types/file-url/file-url-tests.ts diff --git a/file-url/index.d.ts b/types/file-url/index.d.ts similarity index 100% rename from file-url/index.d.ts rename to types/file-url/index.d.ts diff --git a/file-url/tsconfig.json b/types/file-url/tsconfig.json similarity index 100% rename from file-url/tsconfig.json rename to types/file-url/tsconfig.json diff --git a/filesize/filesize-tests.ts b/types/filesize/filesize-tests.ts similarity index 100% rename from filesize/filesize-tests.ts rename to types/filesize/filesize-tests.ts diff --git a/filesize/index.d.ts b/types/filesize/index.d.ts similarity index 100% rename from filesize/index.d.ts rename to types/filesize/index.d.ts diff --git a/filesize/tsconfig.json b/types/filesize/tsconfig.json similarity index 100% rename from filesize/tsconfig.json rename to types/filesize/tsconfig.json diff --git a/filesystem/filesystem-tests.ts b/types/filesystem/filesystem-tests.ts similarity index 100% rename from filesystem/filesystem-tests.ts rename to types/filesystem/filesystem-tests.ts diff --git a/filesystem/index.d.ts b/types/filesystem/index.d.ts similarity index 100% rename from filesystem/index.d.ts rename to types/filesystem/index.d.ts diff --git a/filesystem/tsconfig.json b/types/filesystem/tsconfig.json similarity index 100% rename from filesystem/tsconfig.json rename to types/filesystem/tsconfig.json diff --git a/filewriter/filewriter-tests.ts b/types/filewriter/filewriter-tests.ts similarity index 100% rename from filewriter/filewriter-tests.ts rename to types/filewriter/filewriter-tests.ts diff --git a/filewriter/index.d.ts b/types/filewriter/index.d.ts similarity index 100% rename from filewriter/index.d.ts rename to types/filewriter/index.d.ts diff --git a/filewriter/tsconfig.json b/types/filewriter/tsconfig.json similarity index 100% rename from filewriter/tsconfig.json rename to types/filewriter/tsconfig.json diff --git a/fill-pdf/fill-pdf-tests.ts b/types/fill-pdf/fill-pdf-tests.ts similarity index 100% rename from fill-pdf/fill-pdf-tests.ts rename to types/fill-pdf/fill-pdf-tests.ts diff --git a/fill-pdf/index.d.ts b/types/fill-pdf/index.d.ts similarity index 100% rename from fill-pdf/index.d.ts rename to types/fill-pdf/index.d.ts diff --git a/fill-pdf/tsconfig.json b/types/fill-pdf/tsconfig.json similarity index 100% rename from fill-pdf/tsconfig.json rename to types/fill-pdf/tsconfig.json diff --git a/finalhandler/finalhandler-tests.ts b/types/finalhandler/finalhandler-tests.ts similarity index 100% rename from finalhandler/finalhandler-tests.ts rename to types/finalhandler/finalhandler-tests.ts diff --git a/finalhandler/index.d.ts b/types/finalhandler/index.d.ts similarity index 100% rename from finalhandler/index.d.ts rename to types/finalhandler/index.d.ts diff --git a/finalhandler/tsconfig.json b/types/finalhandler/tsconfig.json similarity index 100% rename from finalhandler/tsconfig.json rename to types/finalhandler/tsconfig.json diff --git a/finch/finch-tests.ts b/types/finch/finch-tests.ts similarity index 100% rename from finch/finch-tests.ts rename to types/finch/finch-tests.ts diff --git a/finch/index.d.ts b/types/finch/index.d.ts similarity index 100% rename from finch/index.d.ts rename to types/finch/index.d.ts diff --git a/finch/tsconfig.json b/types/finch/tsconfig.json similarity index 100% rename from finch/tsconfig.json rename to types/finch/tsconfig.json diff --git a/findup-sync/findup-sync-tests.ts b/types/findup-sync/findup-sync-tests.ts similarity index 100% rename from findup-sync/findup-sync-tests.ts rename to types/findup-sync/findup-sync-tests.ts diff --git a/findup-sync/index.d.ts b/types/findup-sync/index.d.ts similarity index 100% rename from findup-sync/index.d.ts rename to types/findup-sync/index.d.ts diff --git a/findup-sync/tsconfig.json b/types/findup-sync/tsconfig.json similarity index 100% rename from findup-sync/tsconfig.json rename to types/findup-sync/tsconfig.json diff --git a/fingerprintjs/fingerprintjs-tests.ts b/types/fingerprintjs/fingerprintjs-tests.ts similarity index 100% rename from fingerprintjs/fingerprintjs-tests.ts rename to types/fingerprintjs/fingerprintjs-tests.ts diff --git a/fingerprintjs/index.d.ts b/types/fingerprintjs/index.d.ts similarity index 100% rename from fingerprintjs/index.d.ts rename to types/fingerprintjs/index.d.ts diff --git a/fingerprintjs/tsconfig.json b/types/fingerprintjs/tsconfig.json similarity index 100% rename from fingerprintjs/tsconfig.json rename to types/fingerprintjs/tsconfig.json diff --git a/firebase-client/firebase-client-tests.ts b/types/firebase-client/firebase-client-tests.ts similarity index 100% rename from firebase-client/firebase-client-tests.ts rename to types/firebase-client/firebase-client-tests.ts diff --git a/firebase-client/index.d.ts b/types/firebase-client/index.d.ts similarity index 100% rename from firebase-client/index.d.ts rename to types/firebase-client/index.d.ts diff --git a/firebase-client/tsconfig.json b/types/firebase-client/tsconfig.json similarity index 100% rename from firebase-client/tsconfig.json rename to types/firebase-client/tsconfig.json diff --git a/firebase-token-generator/firebase-token-generator-tests.ts b/types/firebase-token-generator/firebase-token-generator-tests.ts similarity index 100% rename from firebase-token-generator/firebase-token-generator-tests.ts rename to types/firebase-token-generator/firebase-token-generator-tests.ts diff --git a/firebase-token-generator/index.d.ts b/types/firebase-token-generator/index.d.ts similarity index 100% rename from firebase-token-generator/index.d.ts rename to types/firebase-token-generator/index.d.ts diff --git a/firebase-token-generator/tsconfig.json b/types/firebase-token-generator/tsconfig.json similarity index 100% rename from firebase-token-generator/tsconfig.json rename to types/firebase-token-generator/tsconfig.json diff --git a/firebase/firebase-simplelogin.d.ts b/types/firebase/firebase-simplelogin.d.ts similarity index 100% rename from firebase/firebase-simplelogin.d.ts rename to types/firebase/firebase-simplelogin.d.ts diff --git a/firebase/index.d.ts b/types/firebase/index.d.ts similarity index 100% rename from firebase/index.d.ts rename to types/firebase/index.d.ts diff --git a/firebase/test/index.ts b/types/firebase/test/index.ts similarity index 100% rename from firebase/test/index.ts rename to types/firebase/test/index.ts diff --git a/firebase/test/simplelogin.ts b/types/firebase/test/simplelogin.ts similarity index 100% rename from firebase/test/simplelogin.ts rename to types/firebase/test/simplelogin.ts diff --git a/firebase/tsconfig.json b/types/firebase/tsconfig.json similarity index 100% rename from firebase/tsconfig.json rename to types/firebase/tsconfig.json diff --git a/firefox/firefox-tests.ts b/types/firefox/firefox-tests.ts similarity index 100% rename from firefox/firefox-tests.ts rename to types/firefox/firefox-tests.ts diff --git a/firefox/index.d.ts b/types/firefox/index.d.ts similarity index 100% rename from firefox/index.d.ts rename to types/firefox/index.d.ts diff --git a/firefox/tsconfig.json b/types/firefox/tsconfig.json similarity index 100% rename from firefox/tsconfig.json rename to types/firefox/tsconfig.json diff --git a/types/firmata/firmata-tests.ts b/types/firmata/firmata-tests.ts new file mode 100644 index 0000000000..d50160e2dd --- /dev/null +++ b/types/firmata/firmata-tests.ts @@ -0,0 +1,33 @@ +import * as Board from 'firmata'; + +function test_basic_board() { + const board = new Board(''); +} + +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() { + const board = new Board(''); + + 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() { + this.transport.close((error: any) => {}); + } + } + + const myBoard: MyBoard = new MyBoard('', () => { + myBoard.Disconnect(); + }); +} diff --git a/types/firmata/index.d.ts b/types/firmata/index.d.ts new file mode 100644 index 0000000000..a24fae435b --- /dev/null +++ b/types/firmata/index.d.ts @@ -0,0 +1,347 @@ +// Type definitions for firmata.js 0.15 +// Project: https://github.com/firmata/firmata.js +// Definitions by: Troy W. +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +import * as SerialPort from 'serialport'; + +export = Board; + +/** + * Most of these are generated by observing https://github.com/firmata/firmata.js/blob/v0.15.0/lib/firmata.js. + * + * 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 { + constructor(serialPort: string, callback?: (error: any) => void) + MODES: Board.PinModes; + STEPPER: Board.StepperConstants; + I2C_MODES: Board.I2cModes; + SERIAL_MODES: Board.SerialModes; + SERIAL_PORT_IDs: Board.SerialPortIds; + SERIAL_PIN_TYPES: Board.SerialPinTypes; + HIGH: Board.PIN_STATE; + LOW: Board.PIN_STATE; + pins: Board.Pins[]; + ports: number[]; + analogPins: number[]; + version: Board.Version; + firmware: Board.Firmware; + settings: Board.Settings; + protected transport: SerialPort; + reportVersion(callback: () => void): void + queryFirmware(callback: () => void): void + analogRead(pin: number, callback: (value: number) => void): void + analogWrite(pin: number, value: number): void + pwmWrite(pin: number, value: number): void + servoConfig(pin: number, min: number, max: number): void + servoWrite(pin: number, value: number): void + pinMode(pin: number, mode: Board.PIN_MODE): void + digitalWrite(pin: number, val: Board.PIN_STATE): void + digitalRead(pin: number, callback: (val: Board.PIN_STATE) => void): void + queryCapabilities(callback: () => void): void + queryAnalogMapping(callback: () => void): void + queryPinState(pin: number, callback: () => void): void + // TODO untested --- TWW + sendString(str: string): void + // TODO untested --- TWW + sendI2CConfig(delay: number): void + // TODO untested --- TWW + i2cConfig(options: number|{ delay: number }): void + // TODO untested --- TWW + sendI2CWriteRequest(slaveAddress: number, bytes: number[]): void + // TODO untested --- TWW + i2cWrite(address: number, register: number, inBytes: number[]): void + i2cWrite(address: number, data: number[]): void + // TODO untested --- TWW + i2cWriteReg(address: number, register: number, byte: number): void + // TODO untested --- TWW + sendI2CReadRequest(address: number, numBytes: number, callback: () => void): void + // TODO untested --- TWW + i2cRead(address: number, register: number, bytesToRead: number, callback: (data: number[]) => void): void + i2cRead(address: number, bytesToRead: number, callback: (data: number[]) => void): void + // TODO untested --- TWW + i2cStop(options: number|{ bus: number, address: number }): void + // TODO untested --- TWW + i2cReadOnce(address: number, register: number, bytesToRead: number, callback: (data: number[]) => void): void + i2cReadOnce(address: number, bytesToRead: number, callback: (data: number[]) => void): void + // TODO untested --- TWW + sendOneWireConfig(pin: number, enableParasiticPower: boolean): void + // TODO untested --- TWW + sendOneWireSearch(pin: number, callback: () => void): void + // TODO untested --- TWW + sendOneWireAlarmsSearch(pin: number, callback: () => void): void + // TODO untested --- TWW + sendOneWireRead(pin: number, device: number, numBytesToRead: number, callback: () => void): void + // TODO untested --- TWW + sendOneWireReset(pin: number): void + // TODO untested --- TWW + sendOneWireWrite(pin: number, device: number, data: number|number[]): void + // TODO untested --- TWW + sendOneWireDelay(pin: number, delay: number): void + // TODO untested --- TWW + sendOneWireWriteAndRead( + pin: number, + device: number, + data: number|number[], + numBytesToRead: number, + callback: (error?: Error, data?: number) => void): void + setSamplingInterval(interval: number): void + getSamplingInterval(): number + reportAnalogPin(pin: number, value: Board.REPORTING): void + 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; + // TODO untested --- TWW + 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; + // TODO untested --- TWW + serialRead(portId: Board.SERIAL_PORT_ID, maxBytesToRead: number, callback: () => void): void; + // TODO untested --- TWW + serialStop(portId: Board.SERIAL_PORT_ID): void; + // TODO untested --- TWW + serialClose(portId: Board.SERIAL_PORT_ID): void; + // TODO untested --- TWW + serialFlush(portId: Board.SERIAL_PORT_ID): void; + // TODO untested --- TWW + serialListen(portId: Board.SERIAL_PORT_ID): void; + // TODO untested --- TWW + 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; + // TODO untested --- TWW + static encode(data: number[]): number[]; + // TODO untested --- TWW + static decode(data: number[]): number[]; + // TODO untested/incomplete --- TWW + 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; +} + +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; + } + + 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 }; + } + + // tslint:disable-next-line interface-name + interface I2cModes { + WRITE: I2C_MODE; + READ: I2C_MODE; + CONTINUOUS_READ: I2C_MODE; + STOP_READING: I2C_MODE; + } + + interface SerialModes { + CONTINUOUS_READ: SERIAL_MODE; + STOP_READING: SERIAL_MODE; + } + + 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 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 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 Firmware { + name: string; + version: Version; + } + + interface Settings { + reportVersionTimeout: number; + samplingInterval: number; + serialport: { + baudRate: number, + bufferSize: number, + }; + } + + interface Port { + comName: string; + } + + 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 + const enum PIN_MODE { + INPUT = 0x00, + OUTPUT = 0x01, + ANALOG = 0x02, + PWM = 0x03, + SERVO = 0x04, + SHIFT = 0x05, + I2C = 0x06, + ONEWIRE = 0x07, + STEPPER = 0x08, + SERIAL = 0x0A, + PULLUP = 0x0B, + IGNORE = 0x7F, + PING_READ = 0x75, + UNKNOWN = 0x10, + } + + const enum PIN_STATE { + LOW = 0, + HIGH = 1 + } + + const enum REPORTING { + ON = 1, + OFF = 0, + } + + const enum PULLUP_STATE { + ENABLED = 1, + DISABLED = 0, + } + + // https://github.com/firmata/firmata.js/blob/v0.15.0/lib/firmata.js#L474-L478 + 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 + const enum STEPPER_RUN_STATE { + STOP = 0, + ACCEL = 1, + DECEL = 2, + RUN = 3, + } + + // https://github.com/firmata/firmata.js/blob/v0.15.0/lib/firmata.js#L485-L488 + const enum STEPPER_DIRECTION { + CCW = 0, + CW = 1, + } + + // https://github.com/firmata/firmata.js/blob/v0.15.0/lib/firmata.js#L466-L471 + const enum I2C_MODE { + WRITE = 0, + READ = 1, + CONTINUOUS_READ = 2, + STOP_READING = 3 + } + + // https://github.com/firmata/firmata.js/blob/v0.15.0/lib/firmata.js#L491-L494 + 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 + const enum SERIAL_PORT_ID { + HW_SERIAL0 = 0x00, + HW_SERIAL1 = 0x01, + HW_SERIAL2 = 0x02, + HW_SERIAL3 = 0x03, + SW_SERIAL0 = 0x08, + SW_SERIAL1 = 0x09, + SW_SERIAL2 = 0x10, + SW_SERIAL3 = 0x11, + DEFAULT = 0x08, + } + + // https://github.com/firmata/firmata.js/blob/v0.15.0/lib/firmata.js#L515-L524 + const enum SERIAL_PIN_TYPE { + RES_RX0 = 0x00, + RES_TX0 = 0x01, + RES_RX1 = 0x02, + RES_TX1 = 0x03, + RES_RX2 = 0x04, + RES_TX2 = 0x05, + RES_RX3 = 0x06, + RES_TX3 = 0x07, + } +} diff --git a/google-protobuf/tsconfig.json b/types/firmata/tsconfig.json similarity index 91% rename from google-protobuf/tsconfig.json rename to types/firmata/tsconfig.json index 269fec20d9..3b0d4b97cb 100644 --- a/google-protobuf/tsconfig.json +++ b/types/firmata/tsconfig.json @@ -17,6 +17,6 @@ }, "files": [ "index.d.ts", - "google-protobuf-tests.ts" + "firmata-tests.ts" ] } \ No newline at end of file diff --git a/jmespath/tslint.json b/types/firmata/tslint.json similarity index 100% rename from jmespath/tslint.json rename to types/firmata/tslint.json diff --git a/first-mate/.editorconfig b/types/first-mate/.editorconfig similarity index 100% rename from first-mate/.editorconfig rename to types/first-mate/.editorconfig diff --git a/first-mate/first-mate-tests.ts b/types/first-mate/first-mate-tests.ts similarity index 100% rename from first-mate/first-mate-tests.ts rename to types/first-mate/first-mate-tests.ts diff --git a/first-mate/index.d.ts b/types/first-mate/index.d.ts similarity index 100% rename from first-mate/index.d.ts rename to types/first-mate/index.d.ts diff --git a/first-mate/tsconfig.json b/types/first-mate/tsconfig.json similarity index 100% rename from first-mate/tsconfig.json rename to types/first-mate/tsconfig.json diff --git a/fixed-data-table/fixed-data-table-tests.tsx b/types/fixed-data-table/fixed-data-table-tests.tsx similarity index 100% rename from fixed-data-table/fixed-data-table-tests.tsx rename to types/fixed-data-table/fixed-data-table-tests.tsx diff --git a/fixed-data-table/index.d.ts b/types/fixed-data-table/index.d.ts similarity index 100% rename from fixed-data-table/index.d.ts rename to types/fixed-data-table/index.d.ts diff --git a/fixed-data-table/tsconfig.json b/types/fixed-data-table/tsconfig.json similarity index 100% rename from fixed-data-table/tsconfig.json rename to types/fixed-data-table/tsconfig.json diff --git a/flake-idgen/flake-idgen-tests.ts b/types/flake-idgen/flake-idgen-tests.ts similarity index 100% rename from flake-idgen/flake-idgen-tests.ts rename to types/flake-idgen/flake-idgen-tests.ts diff --git a/flake-idgen/index.d.ts b/types/flake-idgen/index.d.ts similarity index 100% rename from flake-idgen/index.d.ts rename to types/flake-idgen/index.d.ts diff --git a/flake-idgen/tsconfig.json b/types/flake-idgen/tsconfig.json similarity index 100% rename from flake-idgen/tsconfig.json rename to types/flake-idgen/tsconfig.json diff --git a/flat/flat-tests.ts b/types/flat/flat-tests.ts similarity index 100% rename from flat/flat-tests.ts rename to types/flat/flat-tests.ts diff --git a/flat/index.d.ts b/types/flat/index.d.ts similarity index 100% rename from flat/index.d.ts rename to types/flat/index.d.ts diff --git a/flat/tsconfig.json b/types/flat/tsconfig.json similarity index 100% rename from flat/tsconfig.json rename to types/flat/tsconfig.json 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/line-by-line/tslint.json b/types/flatbuffers/tslint.json similarity index 100% rename from line-by-line/tslint.json rename to types/flatbuffers/tslint.json diff --git a/flatpickr/flatpickr-tests.ts b/types/flatpickr/flatpickr-tests.ts similarity index 99% rename from flatpickr/flatpickr-tests.ts rename to types/flatpickr/flatpickr-tests.ts index 9f0211c79d..f6800e38b7 100644 --- a/flatpickr/flatpickr-tests.ts +++ b/types/flatpickr/flatpickr-tests.ts @@ -12,4 +12,3 @@ if (input != null) { } picker1.destroy(); - diff --git a/flatpickr/index.d.ts b/types/flatpickr/index.d.ts similarity index 100% rename from flatpickr/index.d.ts rename to types/flatpickr/index.d.ts diff --git a/flatpickr/tsconfig.json b/types/flatpickr/tsconfig.json similarity index 100% rename from flatpickr/tsconfig.json rename to types/flatpickr/tsconfig.json diff --git a/flatpickr/tslint.json b/types/flatpickr/tslint.json similarity index 100% rename from flatpickr/tslint.json rename to types/flatpickr/tslint.json diff --git a/flexslider/flexslider-tests.ts b/types/flexslider/flexslider-tests.ts similarity index 100% rename from flexslider/flexslider-tests.ts rename to types/flexslider/flexslider-tests.ts diff --git a/flexslider/index.d.ts b/types/flexslider/index.d.ts similarity index 100% rename from flexslider/index.d.ts rename to types/flexslider/index.d.ts diff --git a/flexslider/tsconfig.json b/types/flexslider/tsconfig.json similarity index 100% rename from flexslider/tsconfig.json rename to types/flexslider/tsconfig.json diff --git a/flickity/FlickityEvents.ts b/types/flickity/FlickityEvents.ts similarity index 100% rename from flickity/FlickityEvents.ts rename to types/flickity/FlickityEvents.ts diff --git a/flickity/UNUSED_FILES.txt b/types/flickity/UNUSED_FILES.txt similarity index 100% rename from flickity/UNUSED_FILES.txt rename to types/flickity/UNUSED_FILES.txt diff --git a/flickity/flickity-tests.ts b/types/flickity/flickity-tests.ts similarity index 100% rename from flickity/flickity-tests.ts rename to types/flickity/flickity-tests.ts diff --git a/flickity/index.d.ts b/types/flickity/index.d.ts similarity index 100% rename from flickity/index.d.ts rename to types/flickity/index.d.ts diff --git a/flickity/tsconfig.json b/types/flickity/tsconfig.json similarity index 100% rename from flickity/tsconfig.json rename to types/flickity/tsconfig.json diff --git a/flight/flight-tests.ts b/types/flight/flight-tests.ts similarity index 100% rename from flight/flight-tests.ts rename to types/flight/flight-tests.ts diff --git a/flight/index.d.ts b/types/flight/index.d.ts similarity index 100% rename from flight/index.d.ts rename to types/flight/index.d.ts diff --git a/flight/tsconfig.json b/types/flight/tsconfig.json similarity index 100% rename from flight/tsconfig.json rename to types/flight/tsconfig.json diff --git a/flightplan/flightplan-tests.ts b/types/flightplan/flightplan-tests.ts similarity index 100% rename from flightplan/flightplan-tests.ts rename to types/flightplan/flightplan-tests.ts diff --git a/flightplan/index.d.ts b/types/flightplan/index.d.ts similarity index 100% rename from flightplan/index.d.ts rename to types/flightplan/index.d.ts diff --git a/flightplan/tsconfig.json b/types/flightplan/tsconfig.json similarity index 100% rename from flightplan/tsconfig.json rename to types/flightplan/tsconfig.json diff --git a/flipsnap/flipsnap-tests.ts b/types/flipsnap/flipsnap-tests.ts similarity index 100% rename from flipsnap/flipsnap-tests.ts rename to types/flipsnap/flipsnap-tests.ts diff --git a/flipsnap/index.d.ts b/types/flipsnap/index.d.ts similarity index 100% rename from flipsnap/index.d.ts rename to types/flipsnap/index.d.ts diff --git a/flipsnap/tsconfig.json b/types/flipsnap/tsconfig.json similarity index 100% rename from flipsnap/tsconfig.json rename to types/flipsnap/tsconfig.json diff --git a/flot/index.d.ts b/types/flot/index.d.ts similarity index 100% rename from flot/index.d.ts rename to types/flot/index.d.ts diff --git a/flot/tsconfig.json b/types/flot/tsconfig.json similarity index 100% rename from flot/tsconfig.json rename to types/flot/tsconfig.json diff --git a/flowjs/flowjs-tests.ts b/types/flowjs/flowjs-tests.ts similarity index 100% rename from flowjs/flowjs-tests.ts rename to types/flowjs/flowjs-tests.ts diff --git a/flowjs/index.d.ts b/types/flowjs/index.d.ts similarity index 100% rename from flowjs/index.d.ts rename to types/flowjs/index.d.ts diff --git a/flowjs/tsconfig.json b/types/flowjs/tsconfig.json similarity index 100% rename from flowjs/tsconfig.json rename to types/flowjs/tsconfig.json diff --git a/fluent-ffmpeg/fluent-ffmpeg-tests.ts b/types/fluent-ffmpeg/fluent-ffmpeg-tests.ts similarity index 100% rename from fluent-ffmpeg/fluent-ffmpeg-tests.ts rename to types/fluent-ffmpeg/fluent-ffmpeg-tests.ts diff --git a/fluent-ffmpeg/index.d.ts b/types/fluent-ffmpeg/index.d.ts similarity index 100% rename from fluent-ffmpeg/index.d.ts rename to types/fluent-ffmpeg/index.d.ts diff --git a/fluent-ffmpeg/tsconfig.json b/types/fluent-ffmpeg/tsconfig.json similarity index 100% rename from fluent-ffmpeg/tsconfig.json rename to types/fluent-ffmpeg/tsconfig.json diff --git a/flux-standard-action/flux-standard-action-tests.ts b/types/flux-standard-action/flux-standard-action-tests.ts similarity index 100% rename from flux-standard-action/flux-standard-action-tests.ts rename to types/flux-standard-action/flux-standard-action-tests.ts diff --git a/flux-standard-action/index.d.ts b/types/flux-standard-action/index.d.ts similarity index 100% rename from flux-standard-action/index.d.ts rename to types/flux-standard-action/index.d.ts diff --git a/flux-standard-action/tsconfig.json b/types/flux-standard-action/tsconfig.json similarity index 100% rename from flux-standard-action/tsconfig.json rename to types/flux-standard-action/tsconfig.json diff --git a/flux/flux-tests.ts b/types/flux/flux-tests.ts similarity index 100% rename from flux/flux-tests.ts rename to types/flux/flux-tests.ts diff --git a/flux/index.d.ts b/types/flux/index.d.ts similarity index 100% rename from flux/index.d.ts rename to types/flux/index.d.ts diff --git a/flux/tsconfig.json b/types/flux/tsconfig.json similarity index 100% rename from flux/tsconfig.json rename to types/flux/tsconfig.json diff --git a/flux/utils/index.d.ts b/types/flux/utils/index.d.ts similarity index 100% rename from flux/utils/index.d.ts rename to types/flux/utils/index.d.ts diff --git a/fluxxor/fluxxor-tests.ts b/types/fluxxor/fluxxor-tests.ts similarity index 100% rename from fluxxor/fluxxor-tests.ts rename to types/fluxxor/fluxxor-tests.ts diff --git a/fluxxor/index.d.ts b/types/fluxxor/index.d.ts similarity index 100% rename from fluxxor/index.d.ts rename to types/fluxxor/index.d.ts diff --git a/fluxxor/tsconfig.json b/types/fluxxor/tsconfig.json similarity index 100% rename from fluxxor/tsconfig.json rename to types/fluxxor/tsconfig.json diff --git a/fontfaceobserver/fontfaceobserver-tests.ts b/types/fontfaceobserver/fontfaceobserver-tests.ts similarity index 100% rename from fontfaceobserver/fontfaceobserver-tests.ts rename to types/fontfaceobserver/fontfaceobserver-tests.ts diff --git a/fontfaceobserver/index.d.ts b/types/fontfaceobserver/index.d.ts similarity index 100% rename from fontfaceobserver/index.d.ts rename to types/fontfaceobserver/index.d.ts diff --git a/fontfaceobserver/tsconfig.json b/types/fontfaceobserver/tsconfig.json similarity index 100% rename from fontfaceobserver/tsconfig.json rename to types/fontfaceobserver/tsconfig.json diff --git a/fontoxml/fontoxml-tests.ts b/types/fontoxml/fontoxml-tests.ts similarity index 100% rename from fontoxml/fontoxml-tests.ts rename to types/fontoxml/fontoxml-tests.ts diff --git a/fontoxml/index.d.ts b/types/fontoxml/index.d.ts similarity index 100% rename from fontoxml/index.d.ts rename to types/fontoxml/index.d.ts diff --git a/fontoxml/tsconfig.json b/types/fontoxml/tsconfig.json similarity index 100% rename from fontoxml/tsconfig.json rename to types/fontoxml/tsconfig.json diff --git a/forever-monitor/forever-monitor-tests.ts b/types/forever-monitor/forever-monitor-tests.ts similarity index 100% rename from forever-monitor/forever-monitor-tests.ts rename to types/forever-monitor/forever-monitor-tests.ts diff --git a/forever-monitor/index.d.ts b/types/forever-monitor/index.d.ts similarity index 100% rename from forever-monitor/index.d.ts rename to types/forever-monitor/index.d.ts diff --git a/forever-monitor/tsconfig.json b/types/forever-monitor/tsconfig.json similarity index 100% rename from forever-monitor/tsconfig.json rename to types/forever-monitor/tsconfig.json diff --git a/forever-monitor/tslint.json b/types/forever-monitor/tslint.json similarity index 100% rename from forever-monitor/tslint.json rename to types/forever-monitor/tslint.json diff --git a/forge-di/forge-di-tests.ts b/types/forge-di/forge-di-tests.ts similarity index 100% rename from forge-di/forge-di-tests.ts rename to types/forge-di/forge-di-tests.ts diff --git a/forge-di/index.d.ts b/types/forge-di/index.d.ts similarity index 100% rename from forge-di/index.d.ts rename to types/forge-di/index.d.ts diff --git a/forge-di/tsconfig.json b/types/forge-di/tsconfig.json similarity index 100% rename from forge-di/tsconfig.json rename to types/forge-di/tsconfig.json diff --git a/form-data/form-data-tests.ts b/types/form-data/form-data-tests.ts similarity index 100% rename from form-data/form-data-tests.ts rename to types/form-data/form-data-tests.ts diff --git a/form-data/index.d.ts b/types/form-data/index.d.ts similarity index 100% rename from form-data/index.d.ts rename to types/form-data/index.d.ts diff --git a/form-data/tsconfig.json b/types/form-data/tsconfig.json similarity index 100% rename from form-data/tsconfig.json rename to types/form-data/tsconfig.json diff --git a/form-serializer/form-serializer-tests.ts b/types/form-serializer/form-serializer-tests.ts similarity index 100% rename from form-serializer/form-serializer-tests.ts rename to types/form-serializer/form-serializer-tests.ts diff --git a/form-serializer/index.d.ts b/types/form-serializer/index.d.ts similarity index 100% rename from form-serializer/index.d.ts rename to types/form-serializer/index.d.ts diff --git a/form-serializer/tsconfig.json b/types/form-serializer/tsconfig.json similarity index 100% rename from form-serializer/tsconfig.json rename to types/form-serializer/tsconfig.json diff --git a/format-unicorn/index.d.ts b/types/format-unicorn/index.d.ts similarity index 100% rename from format-unicorn/index.d.ts rename to types/format-unicorn/index.d.ts diff --git a/format-unicorn/safe.d.ts b/types/format-unicorn/safe.d.ts similarity index 100% rename from format-unicorn/safe.d.ts rename to types/format-unicorn/safe.d.ts diff --git a/format-unicorn/test/index.ts b/types/format-unicorn/test/index.ts similarity index 100% rename from format-unicorn/test/index.ts rename to types/format-unicorn/test/index.ts diff --git a/format-unicorn/test/safe.ts b/types/format-unicorn/test/safe.ts similarity index 100% rename from format-unicorn/test/safe.ts rename to types/format-unicorn/test/safe.ts diff --git a/format-unicorn/tsconfig.json b/types/format-unicorn/tsconfig.json similarity index 100% rename from format-unicorn/tsconfig.json rename to types/format-unicorn/tsconfig.json diff --git a/format-unicorn/tslint.json b/types/format-unicorn/tslint.json similarity index 100% rename from format-unicorn/tslint.json rename to types/format-unicorn/tslint.json diff --git a/formidable/formidable-tests.ts b/types/formidable/formidable-tests.ts similarity index 100% rename from formidable/formidable-tests.ts rename to types/formidable/formidable-tests.ts diff --git a/formidable/index.d.ts b/types/formidable/index.d.ts similarity index 100% rename from formidable/index.d.ts rename to types/formidable/index.d.ts diff --git a/formidable/tsconfig.json b/types/formidable/tsconfig.json similarity index 100% rename from formidable/tsconfig.json rename to types/formidable/tsconfig.json diff --git a/fossil-delta/fossil-delta-tests.ts b/types/fossil-delta/fossil-delta-tests.ts similarity index 100% rename from fossil-delta/fossil-delta-tests.ts rename to types/fossil-delta/fossil-delta-tests.ts diff --git a/fossil-delta/index.d.ts b/types/fossil-delta/index.d.ts similarity index 100% rename from fossil-delta/index.d.ts rename to types/fossil-delta/index.d.ts diff --git a/fossil-delta/tsconfig.json b/types/fossil-delta/tsconfig.json similarity index 100% rename from fossil-delta/tsconfig.json rename to types/fossil-delta/tsconfig.json diff --git a/foundation-sites/foundation-sites-tests.ts b/types/foundation-sites/foundation-sites-tests.ts similarity index 100% rename from foundation-sites/foundation-sites-tests.ts rename to types/foundation-sites/foundation-sites-tests.ts diff --git a/foundation-sites/index.d.ts b/types/foundation-sites/index.d.ts similarity index 100% rename from foundation-sites/index.d.ts rename to types/foundation-sites/index.d.ts diff --git a/foundation-sites/tsconfig.json b/types/foundation-sites/tsconfig.json similarity index 100% rename from foundation-sites/tsconfig.json rename to types/foundation-sites/tsconfig.json diff --git a/foundation/foundation-tests.ts b/types/foundation/foundation-tests.ts similarity index 100% rename from foundation/foundation-tests.ts rename to types/foundation/foundation-tests.ts diff --git a/foundation/index.d.ts b/types/foundation/index.d.ts similarity index 100% rename from foundation/index.d.ts rename to types/foundation/index.d.ts diff --git a/foundation/tsconfig.json b/types/foundation/tsconfig.json similarity index 100% rename from foundation/tsconfig.json rename to types/foundation/tsconfig.json diff --git a/fpsmeter/index.d.ts b/types/fpsmeter/index.d.ts similarity index 100% rename from fpsmeter/index.d.ts rename to types/fpsmeter/index.d.ts diff --git a/fpsmeter/tsconfig.json b/types/fpsmeter/tsconfig.json similarity index 100% rename from fpsmeter/tsconfig.json rename to types/fpsmeter/tsconfig.json diff --git a/freedom/UNUSED_FILES.txt b/types/freedom/UNUSED_FILES.txt similarity index 100% rename from freedom/UNUSED_FILES.txt rename to types/freedom/UNUSED_FILES.txt diff --git a/freedom/freedom-core-env.d.ts b/types/freedom/freedom-core-env.d.ts similarity index 100% rename from freedom/freedom-core-env.d.ts rename to types/freedom/freedom-core-env.d.ts diff --git a/freedom/freedom-module-env.d.ts b/types/freedom/freedom-module-env.d.ts similarity index 100% rename from freedom/freedom-module-env.d.ts rename to types/freedom/freedom-module-env.d.ts diff --git a/freedom/freedom-tests.ts b/types/freedom/freedom-tests.ts similarity index 100% rename from freedom/freedom-tests.ts rename to types/freedom/freedom-tests.ts diff --git a/freedom/index.d.ts b/types/freedom/index.d.ts similarity index 100% rename from freedom/index.d.ts rename to types/freedom/index.d.ts diff --git a/freedom/tsconfig.json b/types/freedom/tsconfig.json similarity index 100% rename from freedom/tsconfig.json rename to types/freedom/tsconfig.json diff --git a/freeport/freeport-tests.ts b/types/freeport/freeport-tests.ts similarity index 99% rename from freeport/freeport-tests.ts rename to types/freeport/freeport-tests.ts index d64a72f496..2746aeb4ed 100644 --- a/freeport/freeport-tests.ts +++ b/types/freeport/freeport-tests.ts @@ -1,4 +1,3 @@ - import freeport = require('freeport'); let num: number, diff --git a/freeport/index.d.ts b/types/freeport/index.d.ts similarity index 100% rename from freeport/index.d.ts rename to types/freeport/index.d.ts diff --git a/freeport/tsconfig.json b/types/freeport/tsconfig.json similarity index 100% rename from freeport/tsconfig.json rename to types/freeport/tsconfig.json diff --git a/freeport/tslint.json b/types/freeport/tslint.json similarity index 100% rename from freeport/tslint.json rename to types/freeport/tslint.json 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/prismjs/tsconfig.json b/types/frisby/tsconfig.json similarity index 94% rename from prismjs/tsconfig.json rename to types/frisby/tsconfig.json index b01a635b30..5ff4c5d7f1 100644 --- a/prismjs/tsconfig.json +++ b/types/frisby/tsconfig.json @@ -18,6 +18,6 @@ }, "files": [ "index.d.ts", - "prismjs-tests.ts" + "frisby-tests.ts" ] } \ No newline at end of file diff --git a/from/from-tests.ts b/types/from/from-tests.ts similarity index 100% rename from from/from-tests.ts rename to types/from/from-tests.ts diff --git a/from/index.d.ts b/types/from/index.d.ts similarity index 100% rename from from/index.d.ts rename to types/from/index.d.ts diff --git a/from/tsconfig.json b/types/from/tsconfig.json similarity index 100% rename from from/tsconfig.json rename to types/from/tsconfig.json diff --git a/fromjs/fromjs-tests.ts b/types/fromjs/fromjs-tests.ts similarity index 100% rename from fromjs/fromjs-tests.ts rename to types/fromjs/fromjs-tests.ts diff --git a/fromjs/index.d.ts b/types/fromjs/index.d.ts similarity index 100% rename from fromjs/index.d.ts rename to types/fromjs/index.d.ts diff --git a/fromjs/tsconfig.json b/types/fromjs/tsconfig.json similarity index 100% rename from fromjs/tsconfig.json rename to types/fromjs/tsconfig.json diff --git a/fromnow/fromnow-tests.ts b/types/fromnow/fromnow-tests.ts similarity index 100% rename from fromnow/fromnow-tests.ts rename to types/fromnow/fromnow-tests.ts diff --git a/fromnow/index.d.ts b/types/fromnow/index.d.ts similarity index 100% rename from fromnow/index.d.ts rename to types/fromnow/index.d.ts diff --git a/fromnow/tsconfig.json b/types/fromnow/tsconfig.json similarity index 100% rename from fromnow/tsconfig.json rename to types/fromnow/tsconfig.json diff --git a/fs-ext/fs-ext-tests.ts b/types/fs-ext/fs-ext-tests.ts similarity index 100% rename from fs-ext/fs-ext-tests.ts rename to types/fs-ext/fs-ext-tests.ts diff --git a/fs-ext/index.d.ts b/types/fs-ext/index.d.ts similarity index 100% rename from fs-ext/index.d.ts rename to types/fs-ext/index.d.ts diff --git a/fs-ext/tsconfig.json b/types/fs-ext/tsconfig.json similarity index 100% rename from fs-ext/tsconfig.json rename to types/fs-ext/tsconfig.json diff --git a/fs-extra-promise-es6/fs-extra-promise-es6-tests.ts b/types/fs-extra-promise-es6/fs-extra-promise-es6-tests.ts similarity index 100% rename from fs-extra-promise-es6/fs-extra-promise-es6-tests.ts rename to types/fs-extra-promise-es6/fs-extra-promise-es6-tests.ts diff --git a/fs-extra-promise-es6/index.d.ts b/types/fs-extra-promise-es6/index.d.ts similarity index 100% rename from fs-extra-promise-es6/index.d.ts rename to types/fs-extra-promise-es6/index.d.ts diff --git a/fs-extra-promise-es6/tsconfig.json b/types/fs-extra-promise-es6/tsconfig.json similarity index 100% rename from fs-extra-promise-es6/tsconfig.json rename to types/fs-extra-promise-es6/tsconfig.json diff --git a/fs-extra-promise/fs-extra-promise-tests.ts b/types/fs-extra-promise/fs-extra-promise-tests.ts similarity index 100% rename from fs-extra-promise/fs-extra-promise-tests.ts rename to types/fs-extra-promise/fs-extra-promise-tests.ts diff --git a/fs-extra-promise/index.d.ts b/types/fs-extra-promise/index.d.ts similarity index 100% rename from fs-extra-promise/index.d.ts rename to types/fs-extra-promise/index.d.ts diff --git a/fs-extra-promise/tsconfig.json b/types/fs-extra-promise/tsconfig.json similarity index 100% rename from fs-extra-promise/tsconfig.json rename to types/fs-extra-promise/tsconfig.json diff --git a/fs-extra/fs-extra-tests.ts b/types/fs-extra/fs-extra-tests.ts similarity index 100% rename from fs-extra/fs-extra-tests.ts rename to types/fs-extra/fs-extra-tests.ts diff --git a/fs-extra/index.d.ts b/types/fs-extra/index.d.ts similarity index 100% rename from fs-extra/index.d.ts rename to types/fs-extra/index.d.ts diff --git a/fs-extra/tsconfig.json b/types/fs-extra/tsconfig.json similarity index 100% rename from fs-extra/tsconfig.json rename to types/fs-extra/tsconfig.json diff --git a/fs-finder/fs-finder-tests.ts b/types/fs-finder/fs-finder-tests.ts similarity index 100% rename from fs-finder/fs-finder-tests.ts rename to types/fs-finder/fs-finder-tests.ts diff --git a/fs-finder/index.d.ts b/types/fs-finder/index.d.ts similarity index 100% rename from fs-finder/index.d.ts rename to types/fs-finder/index.d.ts diff --git a/fs-finder/tsconfig.json b/types/fs-finder/tsconfig.json similarity index 100% rename from fs-finder/tsconfig.json rename to types/fs-finder/tsconfig.json diff --git a/fs-mock/fs-mock-tests.ts b/types/fs-mock/fs-mock-tests.ts similarity index 100% rename from fs-mock/fs-mock-tests.ts rename to types/fs-mock/fs-mock-tests.ts diff --git a/fs-mock/index.d.ts b/types/fs-mock/index.d.ts similarity index 100% rename from fs-mock/index.d.ts rename to types/fs-mock/index.d.ts diff --git a/fs-mock/tsconfig.json b/types/fs-mock/tsconfig.json similarity index 100% rename from fs-mock/tsconfig.json rename to types/fs-mock/tsconfig.json diff --git a/fs-promise/fs-promise-tests.ts b/types/fs-promise/fs-promise-tests.ts similarity index 100% rename from fs-promise/fs-promise-tests.ts rename to types/fs-promise/fs-promise-tests.ts diff --git a/fs-promise/index.d.ts b/types/fs-promise/index.d.ts similarity index 100% rename from fs-promise/index.d.ts rename to types/fs-promise/index.d.ts diff --git a/fs-promise/tsconfig.json b/types/fs-promise/tsconfig.json similarity index 100% rename from fs-promise/tsconfig.json rename to types/fs-promise/tsconfig.json diff --git a/fs-promise/tslint.json b/types/fs-promise/tslint.json similarity index 100% rename from fs-promise/tslint.json rename to types/fs-promise/tslint.json diff --git a/ftdomdelegate/ftdomdelegate-tests.ts b/types/ftdomdelegate/ftdomdelegate-tests.ts similarity index 100% rename from ftdomdelegate/ftdomdelegate-tests.ts rename to types/ftdomdelegate/ftdomdelegate-tests.ts diff --git a/ftdomdelegate/index.d.ts b/types/ftdomdelegate/index.d.ts similarity index 100% rename from ftdomdelegate/index.d.ts rename to types/ftdomdelegate/index.d.ts diff --git a/ftdomdelegate/tsconfig.json b/types/ftdomdelegate/tsconfig.json similarity index 100% rename from ftdomdelegate/tsconfig.json rename to types/ftdomdelegate/tsconfig.json diff --git a/ftp/ftp-tests.ts b/types/ftp/ftp-tests.ts similarity index 100% rename from ftp/ftp-tests.ts rename to types/ftp/ftp-tests.ts diff --git a/ftp/index.d.ts b/types/ftp/index.d.ts similarity index 100% rename from ftp/index.d.ts rename to types/ftp/index.d.ts diff --git a/ftp/tsconfig.json b/types/ftp/tsconfig.json similarity index 100% rename from ftp/tsconfig.json rename to types/ftp/tsconfig.json diff --git a/ftpd/ftpd-tests.ts b/types/ftpd/ftpd-tests.ts similarity index 100% rename from ftpd/ftpd-tests.ts rename to types/ftpd/ftpd-tests.ts diff --git a/ftpd/index.d.ts b/types/ftpd/index.d.ts similarity index 100% rename from ftpd/index.d.ts rename to types/ftpd/index.d.ts diff --git a/ftpd/tsconfig.json b/types/ftpd/tsconfig.json similarity index 100% rename from ftpd/tsconfig.json rename to types/ftpd/tsconfig.json diff --git a/fullcalendar/fullcalendar-tests.ts b/types/fullcalendar/fullcalendar-tests.ts similarity index 94% rename from fullcalendar/fullcalendar-tests.ts rename to types/fullcalendar/fullcalendar-tests.ts index 63328a9cef..4557a94eef 100644 --- a/fullcalendar/fullcalendar-tests.ts +++ b/types/fullcalendar/fullcalendar-tests.ts @@ -33,7 +33,6 @@ $('#calendar').fullCalendar({ $('#calendar').fullCalendar({ eventSources: [ - // source with no options "http://www.google.com/your_feed_url1/", @@ -84,15 +83,14 @@ $('#calendar').fullCalendar({ dragOpacity: .5 }); -var view = $('#calendar').fullCalendar('getView'); +const view = $('#calendar').fullCalendar('getView'); alert("The view's title is " + view.title); $(document).ready(() => { - - var date = new Date(); - var d = date.getDate(); - var m = date.getMonth(); - var y = date.getFullYear(); + const date = new Date(); + const d = date.getDate(); + const m = date.getMonth(); + const y = date.getFullYear(); $('#calendar').fullCalendar({ header: { @@ -148,15 +146,13 @@ $(document).ready(() => { } ] }); - }); $(document).ready(() => { - - var date = new Date(); - var d = date.getDate(); - var m = date.getMonth(); - var y = date.getFullYear(); + const date = new Date(); + const d = date.getDate(); + const m = date.getMonth(); + const y = date.getFullYear(); $('#calendar').fullCalendar({ header: { @@ -213,15 +209,13 @@ $(document).ready(() => { } ] }); - }); $(document).ready(() => { - - var date = new Date(); - var d = date.getDate(); - var m = date.getMonth(); - var y = date.getFullYear(); + const date = new Date(); + const d = date.getDate(); + const m = date.getMonth(); + const y = date.getFullYear(); $('#calendar').fullCalendar({ header: { @@ -267,15 +261,13 @@ $(document).ready(() => { } ] }); - }); $(document).ready(() => { - - var date = new Date(); - var d = date.getDate(); - var m = date.getMonth(); - var y = date.getFullYear(); + const date = new Date(); + const d = date.getDate(); + const m = date.getMonth(); + const y = date.getFullYear(); $('#calendar').fullCalendar({ editable: true, @@ -332,15 +324,13 @@ $(document).ready(() => { } ] }); - }); $(document).ready(() => { - - var date = new Date(); - var d = date.getDate(); - var m = date.getMonth(); - var y = date.getFullYear(); + const date = new Date(); + const d = date.getDate(); + const m = date.getMonth(); + const y = date.getFullYear(); $('#calendar').fullCalendar({ header: { @@ -386,7 +376,6 @@ $(document).ready(() => { } ] }); - }); $('#my-prev-button').click(() => { @@ -404,7 +393,7 @@ $('#my-today-button').click(() => { $('#calendar').fullCalendar('gotoDate', 1, 0, 1); $('#my-button').click(() => { - var d = $('#calendar').fullCalendar('getDate'); + const d = $('#calendar').fullCalendar('getDate'); alert("The current date of the calendar is " + d); }); @@ -429,7 +418,6 @@ $('#calendar').fullCalendar({ $('#calendar').fullCalendar({ dayClick(date, allDay, jsEvent, view) { - if (allDay) { alert('Clicked on the entire day: ' + date); } else { @@ -442,20 +430,17 @@ $('#calendar').fullCalendar({ // change the day's background color just for fun $(this).css('background-color', 'red'); - } }); $('#calendar').fullCalendar({ eventClick(calEvent, jsEvent, view) { - alert('Event: ' + calEvent.title); alert('Coordinates: ' + jsEvent.pageX + ',' + jsEvent.pageY); alert('View: ' + view.name); // change the border color just for fun $(this).css('border-color', 'red'); - } }); @@ -477,9 +462,7 @@ $('#calendar').fullCalendar({ }); $('#calendar').fullCalendar({ - eventSources: [ - // your event source { url: '/myfeed.php', @@ -496,13 +479,10 @@ $('#calendar').fullCalendar({ } // any other sources... - ] - }); $('#calendar').fullCalendar({ - events: { url: '/myfeed.php', type: 'POST', @@ -516,22 +496,17 @@ $('#calendar').fullCalendar({ color: 'yellow', // a non-ajax option textColor: 'black' // a non-ajax option } - }); $('#calendar').fullCalendar({ - events: { url: '/myfeed.php', cache: true } - }); $('#calendar').fullCalendar({ - eventSources: [ - // your event source { url: '/myfeed.php', // use the `url` property @@ -540,9 +515,7 @@ $('#calendar').fullCalendar({ } // any other sources... - ] - }); $('#calendar').fullCalendar({ @@ -569,9 +542,7 @@ $('#calendar').fullCalendar({ }); $('#calendar').fullCalendar({ - eventSources: [ - // your event source { events: [ // put the array in the `events` property @@ -594,9 +565,7 @@ $('#calendar').fullCalendar({ } // any other event sources... - ] - }); $('#calendar').fullCalendar({ @@ -610,7 +579,7 @@ $('#calendar').fullCalendar({ end: Math.round(end.toDate().getTime() / 1000) }, success(doc) { - var events: any[] = []; + const events: any[] = []; $(doc).find('event').each(() => { events.push({ title: $(this).attr('title'), @@ -624,9 +593,7 @@ $('#calendar').fullCalendar({ }); $('#calendar').fullCalendar({ - eventSources: [ - // your event source { events(start: moment.Moment, end: moment.Moment, timezone: string | boolean, callback: (events: FullCalendar.EventObject[]) => void) { @@ -635,11 +602,8 @@ $('#calendar').fullCalendar({ color: 'yellow', // an option! textColor: 'black' // an option! } - // any other sources... - ] - }); $('#calendar').fullCalendar({ @@ -651,11 +615,9 @@ $('#calendar').fullCalendar({ $('#calendar').fullCalendar({ eventClick(event, element) { - event.title = "CLICKED!"; $('#calendar').fullCalendar('updateEvent', event); - } }); @@ -712,11 +674,10 @@ $('#draggable1').draggable(); $('#draggable2').draggable(); $(document).ready(() => { - - var date = new Date(); - var d = date.getDate(); - var m = date.getMonth(); - var y = date.getFullYear(); + const date = new Date(); + const d = date.getDate(); + const m = date.getMonth(); + const y = date.getFullYear(); $('#calendar').fullCalendar({ theme: true, @@ -773,17 +734,15 @@ $(document).ready(() => { } ] }); - }); $(document).ready(() => { /* initialize the external events -----------------------------------------------------------------*/ $('#external-events div.external-event').each(() => { - // create an Event Object (http://arshaw.com/fullcalendar/docs/event_data/Event_Object/) // it doesn't need to have a start or end - var eventObject = { + const eventObject = { title: $.trim($(this).text()) // use the element's text as the event title }; @@ -796,7 +755,6 @@ $(document).ready(() => { revert: true, // will cause the event to go back to its revertDuration: 0 // original position after the drag }); - }); /* initialize the calendar -----------------------------------------------------------------*/ @@ -812,10 +770,10 @@ $(document).ready(() => { drop(date, allDay) { // this function is called when something is dropped // retrieve the dropped element's stored Event Object - var originalEventObject = $(this).data('eventObject'); + const originalEventObject = $(this).data('eventObject'); // we need to copy it, so that multiple events don't have a reference to the same object - var copiedEventObject: any = $.extend({}, originalEventObject); + const copiedEventObject: any = $.extend({}, originalEventObject); // assign it the date that was reported copiedEventObject.start = date; @@ -835,10 +793,10 @@ $(document).ready(() => { }); $(document).ready(() => { - var date = new Date(); - var d = date.getDate(); - var m = date.getMonth(); - var y = date.getFullYear(); + const date = new Date(); + const d = date.getDate(); + const m = date.getMonth(); + const y = date.getFullYear(); $('#calendar').fullCalendar({ theme: true, diff --git a/fullcalendar/index.d.ts b/types/fullcalendar/index.d.ts similarity index 100% rename from fullcalendar/index.d.ts rename to types/fullcalendar/index.d.ts diff --git a/fullcalendar/package.json b/types/fullcalendar/package.json similarity index 100% rename from fullcalendar/package.json rename to types/fullcalendar/package.json diff --git a/fullcalendar/tsconfig.json b/types/fullcalendar/tsconfig.json similarity index 100% rename from fullcalendar/tsconfig.json rename to types/fullcalendar/tsconfig.json diff --git a/fullcalendar/tslint.json b/types/fullcalendar/tslint.json similarity index 100% rename from fullcalendar/tslint.json rename to types/fullcalendar/tslint.json diff --git a/fullcalendar/v1/fullcalendar-tests.ts b/types/fullcalendar/v1/fullcalendar-tests.ts similarity index 94% rename from fullcalendar/v1/fullcalendar-tests.ts rename to types/fullcalendar/v1/fullcalendar-tests.ts index ede55bc0b1..c2c0da1948 100644 --- a/fullcalendar/v1/fullcalendar-tests.ts +++ b/types/fullcalendar/v1/fullcalendar-tests.ts @@ -30,7 +30,6 @@ $('#calendar').fullCalendar({ $('#calendar').fullCalendar({ eventSources: [ - // source with no options "http://www.google.com/your_feed_url1/", @@ -81,15 +80,14 @@ $('#calendar').fullCalendar({ dragOpacity: .5 }); -var view = $('#calendar').fullCalendar('getView'); +const view = $('#calendar').fullCalendar('getView'); alert("The view's title is " + view.title); $(document).ready(() => { - - var date = new Date(); - var d = date.getDate(); - var m = date.getMonth(); - var y = date.getFullYear(); + const date = new Date(); + const d = date.getDate(); + const m = date.getMonth(); + const y = date.getFullYear(); $('#calendar').fullCalendar({ header: { @@ -145,15 +143,13 @@ $(document).ready(() => { } ] }); - }); $(document).ready(() => { - - var date = new Date(); - var d = date.getDate(); - var m = date.getMonth(); - var y = date.getFullYear(); + const date = new Date(); + const d = date.getDate(); + const m = date.getMonth(); + const y = date.getFullYear(); $('#calendar').fullCalendar({ header: { @@ -210,15 +206,13 @@ $(document).ready(() => { } ] }); - }); $(document).ready(() => { - - var date = new Date(); - var d = date.getDate(); - var m = date.getMonth(); - var y = date.getFullYear(); + const date = new Date(); + const d = date.getDate(); + const m = date.getMonth(); + const y = date.getFullYear(); $('#calendar').fullCalendar({ header: { @@ -264,15 +258,13 @@ $(document).ready(() => { } ] }); - }); $(document).ready(() => { - - var date = new Date(); - var d = date.getDate(); - var m = date.getMonth(); - var y = date.getFullYear(); + const date = new Date(); + const d = date.getDate(); + const m = date.getMonth(); + const y = date.getFullYear(); $('#calendar').fullCalendar({ editable: true, @@ -329,15 +321,13 @@ $(document).ready(() => { } ] }); - }); $(document).ready(() => { - - var date = new Date(); - var d = date.getDate(); - var m = date.getMonth(); - var y = date.getFullYear(); + const date = new Date(); + const d = date.getDate(); + const m = date.getMonth(); + const y = date.getFullYear(); $('#calendar').fullCalendar({ header: { @@ -383,7 +373,6 @@ $(document).ready(() => { } ] }); - }); $('#my-prev-button').click(() => { @@ -401,7 +390,7 @@ $('#my-today-button').click(() => { $('#calendar').fullCalendar('gotoDate', 1, 0, 1); $('#my-button').click(() => { - var d = $('#calendar').fullCalendar('getDate'); + const d = $('#calendar').fullCalendar('getDate'); alert("The current date of the calendar is " + d); }); @@ -426,7 +415,6 @@ $('#calendar').fullCalendar({ $('#calendar').fullCalendar({ dayClick(date, allDay, jsEvent, view) { - if (allDay) { alert('Clicked on the entire day: ' + date); } else { @@ -439,20 +427,17 @@ $('#calendar').fullCalendar({ // change the day's background color just for fun $(this).css('background-color', 'red'); - } }); $('#calendar').fullCalendar({ eventClick(calEvent, jsEvent, view) { - alert('Event: ' + calEvent.title); alert('Coordinates: ' + jsEvent.pageX + ',' + jsEvent.pageY); alert('View: ' + view.name); // change the border color just for fun $(this).css('border-color', 'red'); - } }); @@ -474,9 +459,7 @@ $('#calendar').fullCalendar({ }); $('#calendar').fullCalendar({ - eventSources: [ - // your event source { url: '/myfeed.php', @@ -493,13 +476,10 @@ $('#calendar').fullCalendar({ } // any other sources... - ] - }); $('#calendar').fullCalendar({ - events: { url: '/myfeed.php', type: 'POST', @@ -513,22 +493,17 @@ $('#calendar').fullCalendar({ color: 'yellow', // a non-ajax option textColor: 'black' // a non-ajax option } - }); $('#calendar').fullCalendar({ - events: { url: '/myfeed.php', cache: true } - }); $('#calendar').fullCalendar({ - eventSources: [ - // your event source { url: '/myfeed.php', // use the `url` property @@ -537,9 +512,7 @@ $('#calendar').fullCalendar({ } // any other sources... - ] - }); $('#calendar').fullCalendar({ @@ -566,9 +539,7 @@ $('#calendar').fullCalendar({ }); $('#calendar').fullCalendar({ - eventSources: [ - // your event source { events: [ // put the array in the `events` property @@ -591,9 +562,7 @@ $('#calendar').fullCalendar({ } // any other event sources... - ] - }); $('#calendar').fullCalendar({ @@ -607,7 +576,7 @@ $('#calendar').fullCalendar({ end: Math.round(end.getTime() / 1000) }, success(doc) { - var events: any[] = []; + const events: any[] = []; $(doc).find('event').each(() => { events.push({ title: $(this).attr('title'), @@ -621,9 +590,7 @@ $('#calendar').fullCalendar({ }); $('#calendar').fullCalendar({ - eventSources: [ - // your event source { events(start: any, end: any, callback: any) { @@ -634,9 +601,7 @@ $('#calendar').fullCalendar({ } // any other sources... - ] - }); $('#calendar').fullCalendar({ @@ -648,11 +613,9 @@ $('#calendar').fullCalendar({ $('#calendar').fullCalendar({ eventClick(event, element) { - event.title = "CLICKED!"; $('#calendar').fullCalendar('updateEvent', event); - } }); @@ -709,11 +672,10 @@ $('#draggable1').draggable(); $('#draggable2').draggable(); $(document).ready(() => { - - var date = new Date(); - var d = date.getDate(); - var m = date.getMonth(); - var y = date.getFullYear(); + const date = new Date(); + const d = date.getDate(); + const m = date.getMonth(); + const y = date.getFullYear(); $('#calendar').fullCalendar({ theme: true, @@ -770,17 +732,15 @@ $(document).ready(() => { } ] }); - }); $(document).ready(() => { /* initialize the external events -----------------------------------------------------------------*/ $('#external-events div.external-event').each(() => { - // create an Event Object (http://arshaw.com/fullcalendar/docs/event_data/Event_Object/) // it doesn't need to have a start or end - var eventObject = { + const eventObject = { title: $.trim($(this).text()) // use the element's text as the event title }; @@ -793,7 +753,6 @@ $(document).ready(() => { revert: true, // will cause the event to go back to its revertDuration: 0 // original position after the drag }); - }); /* initialize the calendar -----------------------------------------------------------------*/ @@ -809,10 +768,10 @@ $(document).ready(() => { drop(date, allDay) { // this function is called when something is dropped // retrieve the dropped element's stored Event Object - var originalEventObject = $(this).data('eventObject'); + const originalEventObject = $(this).data('eventObject'); // we need to copy it, so that multiple events don't have a reference to the same object - var copiedEventObject: any = $.extend({}, originalEventObject); + const copiedEventObject: any = $.extend({}, originalEventObject); // assign it the date that was reported copiedEventObject.start = date; diff --git a/fullcalendar/v1/index.d.ts b/types/fullcalendar/v1/index.d.ts similarity index 95% rename from fullcalendar/v1/index.d.ts rename to types/fullcalendar/v1/index.d.ts index 9f521ca8fc..4fcb41731b 100644 --- a/fullcalendar/v1/index.d.ts +++ b/types/fullcalendar/v1/index.d.ts @@ -8,8 +8,7 @@ import * as moment from "moment"; declare global { namespace FullCalendar { - export interface Calendar { - + interface Calendar { /** * Formats a Date object into a string. */ @@ -36,22 +35,21 @@ declare global { version: string; } - export interface BusinessHours { + interface BusinessHours { start: moment.Duration; end: moment.Duration; dow: number[]; } - export interface Timespan { + interface Timespan { start: moment.Moment; end: moment.Moment; } - export interface Options extends AgendaOptions, EventDraggingResizingOptions, DroppingExternalElementsOptions, SelectionOptions { - + interface Options extends AgendaOptions, EventDraggingResizingOptions, DroppingExternalElementsOptions, SelectionOptions { // General display - http://arshaw.com/fullcalendar/docs/display/ - header?: { + header?: { left: string; center: string; right: string; @@ -152,11 +150,9 @@ declare global { eventAfterRender?: (event: EventObject, element: HTMLDivElement, view: ViewObject) => void; eventAfterAllRender?: (view: ViewObject) => void; eventDestroy?: (event: EventObject, element: JQuery, view: ViewObject) => void; - - } - export interface ViewOptionHash { + interface ViewOptionHash { month?: any; week?: any; day?: any; @@ -172,7 +168,7 @@ declare global { /** * Agenda Options - http://arshaw.com/fullcalendar/docs/agenda/ */ - export interface AgendaOptions { + interface AgendaOptions { allDaySlot?: boolean; allDayText?: string; slotDuration?: moment.Duration; @@ -188,7 +184,7 @@ declare global { /* * Event Dragging & Resizing */ - export interface EventDraggingResizingOptions { + interface EventDraggingResizingOptions { editable?: boolean; eventStartEditable?: boolean; eventDurationEditable?: boolean; @@ -207,7 +203,7 @@ declare global { /* * Selection - http://arshaw.com/fullcalendar/docs/selection/ */ - export interface SelectionOptions { + interface SelectionOptions { selectable?: boolean; selectHelper?: boolean | ((start: moment.Moment, end: moment.Moment) => HTMLElement); unselectAuto?: boolean; @@ -218,14 +214,14 @@ declare global { unselect?: (view: ViewObject, jsEvent: Event) => void; } - export interface DroppingExternalElementsOptions { + interface DroppingExternalElementsOptions { droppable?: boolean; dropAccept?: string | ((draggable: any) => boolean); drop?: (date: moment.Moment, jsEvent: MouseEvent, ui: any) => void; eventReceive?: (event: EventObject) => void; } - export interface ButtonTextObject { + interface ButtonTextObject { prev?: string; next?: string; prevYear?: string; @@ -236,7 +232,7 @@ declare global { day?: string; } - export interface EventObject extends Timespan { + interface EventObject extends Timespan { id?: any; // String/number title: string; allDay?: boolean; @@ -251,15 +247,14 @@ declare global { rendering?: string; } - export interface ViewObject extends Timespan { + interface ViewObject extends Timespan { name: string; title: string; intervalStart: moment.Moment; intervalEnd: moment.Moment; } - export interface EventSource extends JQueryAjaxSettings { - + interface EventSource extends JQueryAjaxSettings { /** * This has one of the following types: * @@ -281,11 +276,9 @@ declare global { startParam?: string; endParam?: string; } - } interface JQuery { - /** * Get/Set option value */ diff --git a/fullcalendar/v1/package.json b/types/fullcalendar/v1/package.json similarity index 100% rename from fullcalendar/v1/package.json rename to types/fullcalendar/v1/package.json diff --git a/fullcalendar/v1/tsconfig.json b/types/fullcalendar/v1/tsconfig.json similarity index 100% rename from fullcalendar/v1/tsconfig.json rename to types/fullcalendar/v1/tsconfig.json diff --git a/fullcalendar/v1/tslint.json b/types/fullcalendar/v1/tslint.json similarity index 100% rename from fullcalendar/v1/tslint.json rename to types/fullcalendar/v1/tslint.json diff --git a/fullname/fullname-tests.ts b/types/fullname/fullname-tests.ts similarity index 100% rename from fullname/fullname-tests.ts rename to types/fullname/fullname-tests.ts diff --git a/fullname/index.d.ts b/types/fullname/index.d.ts similarity index 100% rename from fullname/index.d.ts rename to types/fullname/index.d.ts diff --git a/fullname/tsconfig.json b/types/fullname/tsconfig.json similarity index 100% rename from fullname/tsconfig.json rename to types/fullname/tsconfig.json diff --git a/fullpage.js/fullpage.js-tests.ts b/types/fullpage.js/fullpage.js-tests.ts similarity index 100% rename from fullpage.js/fullpage.js-tests.ts rename to types/fullpage.js/fullpage.js-tests.ts diff --git a/fullpage.js/index.d.ts b/types/fullpage.js/index.d.ts similarity index 100% rename from fullpage.js/index.d.ts rename to types/fullpage.js/index.d.ts diff --git a/fullpage.js/tsconfig.json b/types/fullpage.js/tsconfig.json similarity index 100% rename from fullpage.js/tsconfig.json rename to types/fullpage.js/tsconfig.json diff --git a/fuse/fuse-tests.ts b/types/fuse/fuse-tests.ts similarity index 100% rename from fuse/fuse-tests.ts rename to types/fuse/fuse-tests.ts diff --git a/fuse/index.d.ts b/types/fuse/index.d.ts similarity index 100% rename from fuse/index.d.ts rename to types/fuse/index.d.ts diff --git a/fuse/tsconfig.json b/types/fuse/tsconfig.json similarity index 100% rename from fuse/tsconfig.json rename to types/fuse/tsconfig.json diff --git a/fusioncharts/fusioncharts-tests.ts b/types/fusioncharts/fusioncharts-tests.ts similarity index 94% rename from fusioncharts/fusioncharts-tests.ts rename to types/fusioncharts/fusioncharts-tests.ts index af71a2378a..ad6afac65b 100644 --- a/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/fusioncharts/fusioncharts.charts.d.ts b/types/fusioncharts/fusioncharts.charts.d.ts similarity index 98% rename from fusioncharts/fusioncharts.charts.d.ts rename to types/fusioncharts/fusioncharts.charts.d.ts index f06060a054..82a41f7333 100644 --- a/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/fusioncharts/fusioncharts.gantt.d.ts b/types/fusioncharts/fusioncharts.gantt.d.ts similarity index 98% rename from fusioncharts/fusioncharts.gantt.d.ts rename to types/fusioncharts/fusioncharts.gantt.d.ts index d29fa26f78..e9dd4cfccf 100644 --- a/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/fusioncharts/fusioncharts.maps.d.ts b/types/fusioncharts/fusioncharts.maps.d.ts similarity index 98% rename from fusioncharts/fusioncharts.maps.d.ts rename to types/fusioncharts/fusioncharts.maps.d.ts index 1894383758..48c5869608 100644 --- a/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/fusioncharts/fusioncharts.powercharts.d.ts b/types/fusioncharts/fusioncharts.powercharts.d.ts similarity index 98% rename from fusioncharts/fusioncharts.powercharts.d.ts rename to types/fusioncharts/fusioncharts.powercharts.d.ts index 46178c8b8f..e2004e8423 100644 --- a/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/fusioncharts/fusioncharts.ssgrid.d.ts b/types/fusioncharts/fusioncharts.ssgrid.d.ts similarity index 98% rename from fusioncharts/fusioncharts.ssgrid.d.ts rename to types/fusioncharts/fusioncharts.ssgrid.d.ts index b44f5336c1..fb7c2d51a2 100644 --- a/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/fusioncharts/fusioncharts.treemap.d.ts b/types/fusioncharts/fusioncharts.treemap.d.ts similarity index 98% rename from fusioncharts/fusioncharts.treemap.d.ts rename to types/fusioncharts/fusioncharts.treemap.d.ts index c555a627bc..146c8b8b54 100644 --- a/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/fusioncharts/fusioncharts.widgets.d.ts b/types/fusioncharts/fusioncharts.widgets.d.ts similarity index 98% rename from fusioncharts/fusioncharts.widgets.d.ts rename to types/fusioncharts/fusioncharts.widgets.d.ts index a4547b99b7..ea16eb60c9 100644 --- a/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/fusioncharts/fusioncharts.zoomscatter.d.ts b/types/fusioncharts/fusioncharts.zoomscatter.d.ts similarity index 98% rename from fusioncharts/fusioncharts.zoomscatter.d.ts rename to types/fusioncharts/fusioncharts.zoomscatter.d.ts index 106908b6df..277050a77a 100644 --- a/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/fusioncharts/index.d.ts b/types/fusioncharts/index.d.ts similarity index 99% rename from fusioncharts/index.d.ts rename to types/fusioncharts/index.d.ts index 9c46955075..e218e32cd5 100644 --- a/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/fusioncharts/maps/fusioncharts.usa.d.ts b/types/fusioncharts/maps/fusioncharts.usa.d.ts similarity index 98% rename from fusioncharts/maps/fusioncharts.usa.d.ts rename to types/fusioncharts/maps/fusioncharts.usa.d.ts index 16ed0d6c91..5b02b82aa8 100644 --- a/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/fusioncharts/maps/fusioncharts.world.d.ts b/types/fusioncharts/maps/fusioncharts.world.d.ts similarity index 98% rename from fusioncharts/maps/fusioncharts.world.d.ts rename to types/fusioncharts/maps/fusioncharts.world.d.ts index 3e545e2556..e950cc08e3 100644 --- a/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/fusioncharts/themes/fusioncharts.theme.carbon.d.ts b/types/fusioncharts/themes/fusioncharts.theme.carbon.d.ts similarity index 98% rename from fusioncharts/themes/fusioncharts.theme.carbon.d.ts rename to types/fusioncharts/themes/fusioncharts.theme.carbon.d.ts index 79ba171231..80b8096801 100644 --- a/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/fusioncharts/themes/fusioncharts.theme.fint.d.ts b/types/fusioncharts/themes/fusioncharts.theme.fint.d.ts similarity index 98% rename from fusioncharts/themes/fusioncharts.theme.fint.d.ts rename to types/fusioncharts/themes/fusioncharts.theme.fint.d.ts index cee08aa6b2..a72265a049 100644 --- a/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/fusioncharts/themes/fusioncharts.theme.ocean.d.ts b/types/fusioncharts/themes/fusioncharts.theme.ocean.d.ts similarity index 98% rename from fusioncharts/themes/fusioncharts.theme.ocean.d.ts rename to types/fusioncharts/themes/fusioncharts.theme.ocean.d.ts index 8b7e3828c0..2f77db1f9b 100644 --- a/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/fusioncharts/themes/fusioncharts.theme.zune.d.ts b/types/fusioncharts/themes/fusioncharts.theme.zune.d.ts similarity index 98% rename from fusioncharts/themes/fusioncharts.theme.zune.d.ts rename to types/fusioncharts/themes/fusioncharts.theme.zune.d.ts index 06ab4c1787..2f76b88de5 100644 --- a/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/fusioncharts/tsconfig.json b/types/fusioncharts/tsconfig.json similarity index 100% rename from fusioncharts/tsconfig.json rename to types/fusioncharts/tsconfig.json diff --git a/fusioncharts/tslint.json b/types/fusioncharts/tslint.json similarity index 100% rename from fusioncharts/tslint.json rename to types/fusioncharts/tslint.json diff --git a/fuzzaldrin-plus/fuzzaldrin-plus-tests.ts b/types/fuzzaldrin-plus/fuzzaldrin-plus-tests.ts similarity index 100% rename from fuzzaldrin-plus/fuzzaldrin-plus-tests.ts rename to types/fuzzaldrin-plus/fuzzaldrin-plus-tests.ts diff --git a/fuzzaldrin-plus/index.d.ts b/types/fuzzaldrin-plus/index.d.ts similarity index 100% rename from fuzzaldrin-plus/index.d.ts rename to types/fuzzaldrin-plus/index.d.ts diff --git a/fuzzaldrin-plus/tsconfig.json b/types/fuzzaldrin-plus/tsconfig.json similarity index 100% rename from fuzzaldrin-plus/tsconfig.json rename to types/fuzzaldrin-plus/tsconfig.json diff --git a/fuzzaldrin/index.d.ts b/types/fuzzaldrin/index.d.ts similarity index 100% rename from fuzzaldrin/index.d.ts rename to types/fuzzaldrin/index.d.ts diff --git a/fuzzaldrin/tsconfig.json b/types/fuzzaldrin/tsconfig.json similarity index 100% rename from fuzzaldrin/tsconfig.json rename to types/fuzzaldrin/tsconfig.json diff --git a/fuzzaldrin/tslint.json b/types/fuzzaldrin/tslint.json similarity index 100% rename from fuzzaldrin/tslint.json rename to types/fuzzaldrin/tslint.json diff --git a/fxn/index.d.ts b/types/fxn/index.d.ts similarity index 100% rename from fxn/index.d.ts rename to types/fxn/index.d.ts diff --git a/fxn/tsconfig.json b/types/fxn/tsconfig.json similarity index 100% rename from fxn/tsconfig.json rename to types/fxn/tsconfig.json diff --git a/gae.channel.api/gae.channel.api-tests.ts b/types/gae.channel.api/gae.channel.api-tests.ts similarity index 100% rename from gae.channel.api/gae.channel.api-tests.ts rename to types/gae.channel.api/gae.channel.api-tests.ts diff --git a/gae.channel.api/index.d.ts b/types/gae.channel.api/index.d.ts similarity index 100% rename from gae.channel.api/index.d.ts rename to types/gae.channel.api/index.d.ts diff --git a/gae.channel.api/tsconfig.json b/types/gae.channel.api/tsconfig.json similarity index 100% rename from gae.channel.api/tsconfig.json rename to types/gae.channel.api/tsconfig.json diff --git a/gamepad/gamepad-tests.ts b/types/gamepad/gamepad-tests.ts similarity index 100% rename from gamepad/gamepad-tests.ts rename to types/gamepad/gamepad-tests.ts diff --git a/gamepad/index.d.ts b/types/gamepad/index.d.ts similarity index 100% rename from gamepad/index.d.ts rename to types/gamepad/index.d.ts diff --git a/gamepad/tsconfig.json b/types/gamepad/tsconfig.json similarity index 100% rename from gamepad/tsconfig.json rename to types/gamepad/tsconfig.json diff --git a/gamequery/gamequery-tests.ts b/types/gamequery/gamequery-tests.ts similarity index 100% rename from gamequery/gamequery-tests.ts rename to types/gamequery/gamequery-tests.ts diff --git a/gamequery/index.d.ts b/types/gamequery/index.d.ts similarity index 100% rename from gamequery/index.d.ts rename to types/gamequery/index.d.ts diff --git a/gamequery/tsconfig.json b/types/gamequery/tsconfig.json similarity index 100% rename from gamequery/tsconfig.json rename to types/gamequery/tsconfig.json diff --git a/gandi-livedns/gandi-livedns-tests.ts b/types/gandi-livedns/gandi-livedns-tests.ts similarity index 100% rename from gandi-livedns/gandi-livedns-tests.ts rename to types/gandi-livedns/gandi-livedns-tests.ts diff --git a/gandi-livedns/index.d.ts b/types/gandi-livedns/index.d.ts similarity index 100% rename from gandi-livedns/index.d.ts rename to types/gandi-livedns/index.d.ts diff --git a/gandi-livedns/tsconfig.json b/types/gandi-livedns/tsconfig.json similarity index 100% rename from gandi-livedns/tsconfig.json rename to types/gandi-livedns/tsconfig.json diff --git a/gapi.analytics/gapi.analytics-tests.ts b/types/gapi.analytics/gapi.analytics-tests.ts similarity index 100% rename from gapi.analytics/gapi.analytics-tests.ts rename to types/gapi.analytics/gapi.analytics-tests.ts diff --git a/gapi.analytics/index.d.ts b/types/gapi.analytics/index.d.ts similarity index 100% rename from gapi.analytics/index.d.ts rename to types/gapi.analytics/index.d.ts diff --git a/gapi.analytics/tsconfig.json b/types/gapi.analytics/tsconfig.json similarity index 100% rename from gapi.analytics/tsconfig.json rename to types/gapi.analytics/tsconfig.json diff --git a/gapi.auth2/gapi.auth2-tests.ts b/types/gapi.auth2/gapi.auth2-tests.ts similarity index 100% rename from gapi.auth2/gapi.auth2-tests.ts rename to types/gapi.auth2/gapi.auth2-tests.ts diff --git a/gapi.auth2/index.d.ts b/types/gapi.auth2/index.d.ts similarity index 100% rename from gapi.auth2/index.d.ts rename to types/gapi.auth2/index.d.ts diff --git a/gapi.auth2/tsconfig.json b/types/gapi.auth2/tsconfig.json similarity index 100% rename from gapi.auth2/tsconfig.json rename to types/gapi.auth2/tsconfig.json diff --git a/gapi.calendar/gapi.calendar-tests.ts b/types/gapi.calendar/gapi.calendar-tests.ts similarity index 96% rename from gapi.calendar/gapi.calendar-tests.ts rename to types/gapi.calendar/gapi.calendar-tests.ts index 0438e5dc06..bd42483df5 100644 --- a/gapi.calendar/gapi.calendar-tests.ts +++ b/types/gapi.calendar/gapi.calendar-tests.ts @@ -1,152 +1,152 @@ -/* Example taken from Google Calendar API JavaScript Quickstart https://developers.google.com/google-apps/calendar/quickstart/js */ - -{ - // Your Client ID can be retrieved from your project in the Google - // Developer Console, https://console.developers.google.com - var CLIENT_ID = ''; - - var SCOPES = ["https://www.googleapis.com/auth/calendar.readonly"]; - - /** - * Check if current user has authorized this application. - */ - function checkAuth() { - gapi.auth.authorize( - { - 'client_id': CLIENT_ID, - 'scope': SCOPES.join(' '), - 'immediate': true - }, handleAuthResult); - } - - /** - * Handle response from authorization server. - * - * @param {Object} authResult Authorization result. - */ - function handleAuthResult(authResult: GoogleApiOAuth2TokenObject) { - var authorizeDiv = document.getElementById('authorize-div')!; - if (authResult && !authResult.error) { - // Hide auth UI, then load client library. - authorizeDiv.style.display = 'none'; - loadCalendarApi(); - } else { - // Show auth UI, allowing the user to initiate authorization by - // clicking authorize button. - authorizeDiv.style.display = 'inline'; - } - } - - /** - * Initiate auth flow in response to user clicking authorize button. - * - * @param {Event} event Button click event. - */ - function handleAuthClick(event: MouseEvent) { - gapi.auth.authorize( - {client_id: CLIENT_ID, scope: SCOPES, immediate: false}, - handleAuthResult); - return false; - } - - /** - * Load Google Calendar client library. List upcoming events - * once client library is loaded. - */ - function loadCalendarApi() { - gapi.client.load('calendar', 'v3', listUpcomingEvents); - } - - /** - * Print the summary and start datetime/date of the next ten events in - * the authorized user's calendar. If no events are found an - * appropriate message is printed. - */ - function listUpcomingEvents() { - var request = gapi.client.calendar.events.list({ - 'calendarId': 'primary', - 'timeMin': (new Date()).toISOString(), - 'showDeleted': false, - 'singleEvents': true, - 'maxResults': 10, - 'orderBy': 'startTime' - }); - - request.execute(function(resp) { - var events = resp.items; - appendPre('Upcoming events:'); - - if (events.length > 0) { - for (let i = 0; i < events.length; i++) { - var event = events[i]; - var when = event.start.dateTime; - if (!when) { - when = event.start.date; - } - appendPre(event.summary + ' (' + when + ')') - } - } else { - appendPre('No upcoming events found.'); - } - - }); - } - - /** - * Append a pre element to the body containing the given message - * as its text node. - * - * @param {string} message Text to be placed in pre element. - */ - function appendPre(message: string) { - var pre = document.getElementById('output')!; - var textContent = document.createTextNode(message + '\n'); - pre.appendChild(textContent); - } -} - -/* Example taken from https://developers.google.com/google-apps/calendar/v3/reference/events/insert#examples */ - -{ - // Refer to the JavaScript quickstart on how to setup the environment: - // https://developers.google.com/google-apps/calendar/quickstart/js - // Change the scope to 'https://www.googleapis.com/auth/calendar' and delete any - // stored credentials. - - const event = { - 'summary': 'Google I/O 2015', - 'location': '800 Howard St., San Francisco, CA 94103', - 'description': 'A chance to hear more about Google\'s developer products.', - 'start': { - 'dateTime': '2015-05-28T09:00:00-07:00', - 'timeZone': 'America/Los_Angeles' - }, - 'end': { - 'dateTime': '2015-05-28T17:00:00-07:00', - 'timeZone': 'America/Los_Angeles' - }, - 'recurrence': [ - 'RRULE:FREQ=DAILY;COUNT=2' - ], - 'attendees': [ - {'email': 'lpage@example.com'}, - {'email': 'sbrin@example.com'} - ], - 'reminders': { - 'useDefault': false, - 'overrides': [ - {'method': 'email', 'minutes': 24 * 60}, - {'method': 'popup', 'minutes': 10} - ] - } - }; - - var request = gapi.client.calendar.events.insert({ - 'calendarId': 'primary', - 'resource': event - }); - - request.execute(function(event) { - appendPre('Event created: ' + event.htmlLink); - }); -} +/* Example taken from Google Calendar API JavaScript Quickstart https://developers.google.com/google-apps/calendar/quickstart/js */ + +{ + // Your Client ID can be retrieved from your project in the Google + // Developer Console, https://console.developers.google.com + var CLIENT_ID = ''; + + var SCOPES = ["https://www.googleapis.com/auth/calendar.readonly"]; + + /** + * Check if current user has authorized this application. + */ + function checkAuth() { + gapi.auth.authorize( + { + 'client_id': CLIENT_ID, + 'scope': SCOPES.join(' '), + 'immediate': true + }, handleAuthResult); + } + + /** + * Handle response from authorization server. + * + * @param {Object} authResult Authorization result. + */ + function handleAuthResult(authResult: GoogleApiOAuth2TokenObject) { + var authorizeDiv = document.getElementById('authorize-div')!; + if (authResult && !authResult.error) { + // Hide auth UI, then load client library. + authorizeDiv.style.display = 'none'; + loadCalendarApi(); + } else { + // Show auth UI, allowing the user to initiate authorization by + // clicking authorize button. + authorizeDiv.style.display = 'inline'; + } + } + + /** + * Initiate auth flow in response to user clicking authorize button. + * + * @param {Event} event Button click event. + */ + function handleAuthClick(event: MouseEvent) { + gapi.auth.authorize( + {client_id: CLIENT_ID, scope: SCOPES, immediate: false}, + handleAuthResult); + return false; + } + + /** + * Load Google Calendar client library. List upcoming events + * once client library is loaded. + */ + function loadCalendarApi() { + gapi.client.load('calendar', 'v3', listUpcomingEvents); + } + + /** + * Print the summary and start datetime/date of the next ten events in + * the authorized user's calendar. If no events are found an + * appropriate message is printed. + */ + function listUpcomingEvents() { + var request = gapi.client.calendar.events.list({ + 'calendarId': 'primary', + 'timeMin': (new Date()).toISOString(), + 'showDeleted': false, + 'singleEvents': true, + 'maxResults': 10, + 'orderBy': 'startTime' + }); + + request.execute(function(resp) { + var events = resp.items; + appendPre('Upcoming events:'); + + if (events.length > 0) { + for (let i = 0; i < events.length; i++) { + var event = events[i]; + var when = event.start.dateTime; + if (!when) { + when = event.start.date; + } + appendPre(event.summary + ' (' + when + ')') + } + } else { + appendPre('No upcoming events found.'); + } + + }); + } + + /** + * Append a pre element to the body containing the given message + * as its text node. + * + * @param {string} message Text to be placed in pre element. + */ + function appendPre(message: string) { + var pre = document.getElementById('output')!; + var textContent = document.createTextNode(message + '\n'); + pre.appendChild(textContent); + } +} + +/* Example taken from https://developers.google.com/google-apps/calendar/v3/reference/events/insert#examples */ + +{ + // Refer to the JavaScript quickstart on how to setup the environment: + // https://developers.google.com/google-apps/calendar/quickstart/js + // Change the scope to 'https://www.googleapis.com/auth/calendar' and delete any + // stored credentials. + + const event = { + 'summary': 'Google I/O 2015', + 'location': '800 Howard St., San Francisco, CA 94103', + 'description': 'A chance to hear more about Google\'s developer products.', + 'start': { + 'dateTime': '2015-05-28T09:00:00-07:00', + 'timeZone': 'America/Los_Angeles' + }, + 'end': { + 'dateTime': '2015-05-28T17:00:00-07:00', + 'timeZone': 'America/Los_Angeles' + }, + 'recurrence': [ + 'RRULE:FREQ=DAILY;COUNT=2' + ], + 'attendees': [ + {'email': 'lpage@example.com'}, + {'email': 'sbrin@example.com'} + ], + 'reminders': { + 'useDefault': false, + 'overrides': [ + {'method': 'email', 'minutes': 24 * 60}, + {'method': 'popup', 'minutes': 10} + ] + } + }; + + var request = gapi.client.calendar.events.insert({ + 'calendarId': 'primary', + 'resource': event + }); + + request.execute(function(event) { + appendPre('Event created: ' + event.htmlLink); + }); +} diff --git a/gapi.calendar/index.d.ts b/types/gapi.calendar/index.d.ts similarity index 100% rename from gapi.calendar/index.d.ts rename to types/gapi.calendar/index.d.ts diff --git a/gapi.calendar/tsconfig.json b/types/gapi.calendar/tsconfig.json similarity index 100% rename from gapi.calendar/tsconfig.json rename to types/gapi.calendar/tsconfig.json diff --git a/gapi.pagespeedonline/index.d.ts b/types/gapi.pagespeedonline/index.d.ts similarity index 100% rename from gapi.pagespeedonline/index.d.ts rename to types/gapi.pagespeedonline/index.d.ts diff --git a/gapi.pagespeedonline/tsconfig.json b/types/gapi.pagespeedonline/tsconfig.json similarity index 100% rename from gapi.pagespeedonline/tsconfig.json rename to types/gapi.pagespeedonline/tsconfig.json diff --git a/gapi.people/gapi.people-tests.ts b/types/gapi.people/gapi.people-tests.ts similarity index 100% rename from gapi.people/gapi.people-tests.ts rename to types/gapi.people/gapi.people-tests.ts diff --git a/gapi.people/index.d.ts b/types/gapi.people/index.d.ts similarity index 100% rename from gapi.people/index.d.ts rename to types/gapi.people/index.d.ts diff --git a/gapi.people/tsconfig.json b/types/gapi.people/tsconfig.json similarity index 100% rename from gapi.people/tsconfig.json rename to types/gapi.people/tsconfig.json diff --git a/gapi.plus/gapi.plus-tests.ts b/types/gapi.plus/gapi.plus-tests.ts similarity index 100% rename from gapi.plus/gapi.plus-tests.ts rename to types/gapi.plus/gapi.plus-tests.ts diff --git a/gapi.plus/index.d.ts b/types/gapi.plus/index.d.ts similarity index 100% rename from gapi.plus/index.d.ts rename to types/gapi.plus/index.d.ts diff --git a/gapi.plus/tsconfig.json b/types/gapi.plus/tsconfig.json similarity index 100% rename from gapi.plus/tsconfig.json rename to types/gapi.plus/tsconfig.json diff --git a/gapi.translate/index.d.ts b/types/gapi.translate/index.d.ts similarity index 100% rename from gapi.translate/index.d.ts rename to types/gapi.translate/index.d.ts diff --git a/gapi.translate/tsconfig.json b/types/gapi.translate/tsconfig.json similarity index 100% rename from gapi.translate/tsconfig.json rename to types/gapi.translate/tsconfig.json diff --git a/gapi.urlshortener/index.d.ts b/types/gapi.urlshortener/index.d.ts similarity index 100% rename from gapi.urlshortener/index.d.ts rename to types/gapi.urlshortener/index.d.ts diff --git a/gapi.urlshortener/tsconfig.json b/types/gapi.urlshortener/tsconfig.json similarity index 100% rename from gapi.urlshortener/tsconfig.json rename to types/gapi.urlshortener/tsconfig.json diff --git a/gapi.youtube/index.d.ts b/types/gapi.youtube/index.d.ts similarity index 100% rename from gapi.youtube/index.d.ts rename to types/gapi.youtube/index.d.ts diff --git a/gapi.youtube/tsconfig.json b/types/gapi.youtube/tsconfig.json similarity index 100% rename from gapi.youtube/tsconfig.json rename to types/gapi.youtube/tsconfig.json diff --git a/gapi.youtubeanalytics/index.d.ts b/types/gapi.youtubeanalytics/index.d.ts similarity index 100% rename from gapi.youtubeanalytics/index.d.ts rename to types/gapi.youtubeanalytics/index.d.ts diff --git a/gapi.youtubeanalytics/tsconfig.json b/types/gapi.youtubeanalytics/tsconfig.json similarity index 100% rename from gapi.youtubeanalytics/tsconfig.json rename to types/gapi.youtubeanalytics/tsconfig.json diff --git a/gapi/gapi-tests.ts b/types/gapi/gapi-tests.ts similarity index 96% rename from gapi/gapi-tests.ts rename to types/gapi/gapi-tests.ts index 3c70b9850d..d5d8c032ca 100644 --- a/gapi/gapi-tests.ts +++ b/types/gapi/gapi-tests.ts @@ -1,97 +1,97 @@ -/// -/// - -/* Examples taken from https://developers.google.com/api-client-library/javascript/start/start-js */ - -{ - function start1() { - // 2. Initialize the JavaScript client library. - gapi.client.init({ - 'apiKey': 'YOUR_API_KEY', - 'discoveryDocs': ['https://people.googleapis.com/$discovery/rest'], - // clientId and scope are optional if auth is not required. - 'clientId': 'YOUR_WEB_CLIENT_ID.apps.googleusercontent.com', - 'scope': 'profile', - }).then(function() { - // 3. Initialize and make the API request. - return gapi.client.people.people.get({ - resourceName: 'people/me' - }); - }).then(function(response) { - console.log(response.result); - }, function(reason) { - console.log('Error: ' + reason.result.error.message); - }); - }; - // 1. Load the JavaScript client library. - gapi.load('client', start1); -} - -{ - function start2() { - // 2. Initialize the JavaScript client library. - gapi.client.init({ - 'apiKey': 'YOUR_API_KEY', - // clientId and scope are optional if auth is not required. - 'clientId': 'YOUR_WEB_CLIENT_ID.apps.googleusercontent.com', - 'scope': 'profile', - }).then(function() { - // 3. Initialize and make the API request. - return gapi.client.request({ - 'path': 'https://people.googleapis.com/v1/people/me', - }) - }).then(function(response) { - console.log(response.result); - }, function(reason) { - console.log('Error: ' + reason.result.error.message); - }); - }; - // 1. Load the JavaScript client library. - gapi.load('client', start2); -} - - -/* Examples taken from https://developers.google.com/api-client-library/javascript/features/promises */ - -gapi.client.request({'path': '/plus/v1/people', 'params': {'query': 'John'}}).then(function(response) { - // Handle response -}, function(reason) { - // Handle error -}); - -gapi.client.load('plus', 'v1').then(function() { - gapi.client.plus.people.search({'query': ''}).then(response => { }); -}); - -var personFetcher = { - results: [], - - // Why this: any? Check https://github.com/Microsoft/TypeScript/issues/10835 - - fetch: function(this: any, name: string) { - gapi.client.request({path: '/plus/v1/people', params:{query: name}}).then(function(this: any, response) { - this.results.push(response.result); - }, function(reason) { - console.error(name, 'was not fetched:', reason.result.error.message); - }, this); - } -}; -personFetcher.fetch('John'); - -gapi.client.request({ - 'path': 'plus/v1/people', - 'params': {'query': name} -}).execute(function(resp, rawResp) { - processResponse(resp); -}); - -gapi.client.request({ - 'path': 'plus/v1/people', - 'params': {'query': name} -}).then(function(resp) { - processResponse(resp.result); -}); - -function processResponse(response: any) { - // Stub -} +/// +/// + +/* Examples taken from https://developers.google.com/api-client-library/javascript/start/start-js */ + +{ + function start1() { + // 2. Initialize the JavaScript client library. + gapi.client.init({ + 'apiKey': 'YOUR_API_KEY', + 'discoveryDocs': ['https://people.googleapis.com/$discovery/rest'], + // clientId and scope are optional if auth is not required. + 'clientId': 'YOUR_WEB_CLIENT_ID.apps.googleusercontent.com', + 'scope': 'profile', + }).then(function() { + // 3. Initialize and make the API request. + return gapi.client.people.people.get({ + resourceName: 'people/me' + }); + }).then(function(response) { + console.log(response.result); + }, function(reason) { + console.log('Error: ' + reason.result.error.message); + }); + }; + // 1. Load the JavaScript client library. + gapi.load('client', start1); +} + +{ + function start2() { + // 2. Initialize the JavaScript client library. + gapi.client.init({ + 'apiKey': 'YOUR_API_KEY', + // clientId and scope are optional if auth is not required. + 'clientId': 'YOUR_WEB_CLIENT_ID.apps.googleusercontent.com', + 'scope': 'profile', + }).then(function() { + // 3. Initialize and make the API request. + return gapi.client.request({ + 'path': 'https://people.googleapis.com/v1/people/me', + }) + }).then(function(response) { + console.log(response.result); + }, function(reason) { + console.log('Error: ' + reason.result.error.message); + }); + }; + // 1. Load the JavaScript client library. + gapi.load('client', start2); +} + + +/* Examples taken from https://developers.google.com/api-client-library/javascript/features/promises */ + +gapi.client.request({'path': '/plus/v1/people', 'params': {'query': 'John'}}).then(function(response) { + // Handle response +}, function(reason) { + // Handle error +}); + +gapi.client.load('plus', 'v1').then(function() { + gapi.client.plus.people.search({'query': ''}).then(response => { }); +}); + +var personFetcher = { + results: [], + + // Why this: any? Check https://github.com/Microsoft/TypeScript/issues/10835 + + fetch: function(this: any, name: string) { + gapi.client.request({path: '/plus/v1/people', params:{query: name}}).then(function(this: any, response) { + this.results.push(response.result); + }, function(reason) { + console.error(name, 'was not fetched:', reason.result.error.message); + }, this); + } +}; +personFetcher.fetch('John'); + +gapi.client.request({ + 'path': 'plus/v1/people', + 'params': {'query': name} +}).execute(function(resp, rawResp) { + processResponse(resp); +}); + +gapi.client.request({ + 'path': 'plus/v1/people', + 'params': {'query': name} +}).then(function(resp) { + processResponse(resp.result); +}); + +function processResponse(response: any) { + // Stub +} diff --git a/gapi/index.d.ts b/types/gapi/index.d.ts similarity index 100% rename from gapi/index.d.ts rename to types/gapi/index.d.ts diff --git a/gapi/tsconfig.json b/types/gapi/tsconfig.json similarity index 100% rename from gapi/tsconfig.json rename to types/gapi/tsconfig.json diff --git a/gaussian/gaussian-tests.ts b/types/gaussian/gaussian-tests.ts similarity index 100% rename from gaussian/gaussian-tests.ts rename to types/gaussian/gaussian-tests.ts diff --git a/gaussian/index.d.ts b/types/gaussian/index.d.ts similarity index 98% rename from gaussian/index.d.ts rename to types/gaussian/index.d.ts index f0012597cb..fb34d74641 100644 --- a/gaussian/index.d.ts +++ b/types/gaussian/index.d.ts @@ -9,7 +9,7 @@ export = gaussian; export as namespace gaussian; declare namespace gaussian { - export interface Gaussian { + interface Gaussian { /** * the mean (μ) of the distribution */ diff --git a/gaussian/tsconfig.json b/types/gaussian/tsconfig.json similarity index 100% rename from gaussian/tsconfig.json rename to types/gaussian/tsconfig.json diff --git a/gaussian/tslint.json b/types/gaussian/tslint.json similarity index 100% rename from gaussian/tslint.json rename to types/gaussian/tslint.json diff --git a/generic-functions/generic-functions-tests.ts b/types/generic-functions/generic-functions-tests.ts similarity index 100% rename from generic-functions/generic-functions-tests.ts rename to types/generic-functions/generic-functions-tests.ts diff --git a/generic-functions/index.d.ts b/types/generic-functions/index.d.ts similarity index 100% rename from generic-functions/index.d.ts rename to types/generic-functions/index.d.ts diff --git a/generic-functions/tsconfig.json b/types/generic-functions/tsconfig.json similarity index 100% rename from generic-functions/tsconfig.json rename to types/generic-functions/tsconfig.json diff --git a/gently/gently-tests.ts b/types/gently/gently-tests.ts similarity index 100% rename from gently/gently-tests.ts rename to types/gently/gently-tests.ts diff --git a/gently/index.d.ts b/types/gently/index.d.ts similarity index 100% rename from gently/index.d.ts rename to types/gently/index.d.ts diff --git a/gently/tsconfig.json b/types/gently/tsconfig.json similarity index 100% rename from gently/tsconfig.json rename to types/gently/tsconfig.json diff --git a/geodesy/geodesy-tests.ts b/types/geodesy/geodesy-tests.ts similarity index 99% rename from geodesy/geodesy-tests.ts rename to types/geodesy/geodesy-tests.ts index 53c3b5c05c..e3ce4f627a 100644 --- a/geodesy/geodesy-tests.ts +++ b/types/geodesy/geodesy-tests.ts @@ -23,7 +23,6 @@ const zoneMgrs = mgrs.zone; mgrs.toString(); mgrs.toUtm(); - // Static Functions Mgrs.parse('31U DQ 48251 11932'); diff --git a/geodesy/index.d.ts b/types/geodesy/index.d.ts similarity index 93% rename from geodesy/index.d.ts rename to types/geodesy/index.d.ts index d5436f073d..12adb4d7c1 100644 --- a/geodesy/index.d.ts +++ b/types/geodesy/index.d.ts @@ -43,7 +43,7 @@ export interface Ellipsoids { Bessel1841: Ellipsoid; } -export declare class Mgrs { +export class Mgrs { zone: number; band: string; e100k: string; @@ -68,7 +68,7 @@ export declare class Mgrs { toString(digits?: 2 | 4 | 6 | 8 | 10): string; } -export declare class Utm { +export class Utm { zone: number; hemisphere: hemisphere; easting: number; @@ -91,11 +91,11 @@ export declare class Utm { toString(digits?: number): string; } -export declare namespace Dms { - export let separator: string; +export namespace Dms { + let separator: string; } -export declare class Dms { +export class Dms { static parseDMS(dmsStr: string): number; static toDMS(deg: number, format?: format, dp?: 0 | 2 | 4): string; static toLat(deg: number, format?: format, dp?: 0 | 2 | 4): string; @@ -104,7 +104,7 @@ export declare class Dms { static compassPoint(bearing: number, precision?: 1 | 2 | 3): string; } -export declare class Vector3d { +export class Vector3d { x: number; y: number; z: number; @@ -125,7 +125,7 @@ export declare class Vector3d { applyTransform(t: number[]): Vector3d; } -export declare class OsGridRef { +export class OsGridRef { easting: number; northing: number; constructor(easting: number, northing: number); @@ -135,7 +135,7 @@ export declare class OsGridRef { toString(digits?: number): string; } -export declare class LatLonEllipsoidal { +export class LatLonEllipsoidal { lat: number; lon: number; datum: Datum; diff --git a/geodesy/tsconfig.json b/types/geodesy/tsconfig.json similarity index 100% rename from geodesy/tsconfig.json rename to types/geodesy/tsconfig.json diff --git a/geodesy/tslint.json b/types/geodesy/tslint.json similarity index 100% rename from geodesy/tslint.json rename to types/geodesy/tslint.json diff --git a/geoip-lite/geoip-lite-tests.ts b/types/geoip-lite/geoip-lite-tests.ts similarity index 100% rename from geoip-lite/geoip-lite-tests.ts rename to types/geoip-lite/geoip-lite-tests.ts diff --git a/geoip-lite/index.d.ts b/types/geoip-lite/index.d.ts similarity index 100% rename from geoip-lite/index.d.ts rename to types/geoip-lite/index.d.ts diff --git a/geoip-lite/tsconfig.json b/types/geoip-lite/tsconfig.json similarity index 100% rename from geoip-lite/tsconfig.json rename to types/geoip-lite/tsconfig.json diff --git a/geojson/geojson-tests.ts b/types/geojson/geojson-tests.ts similarity index 100% rename from geojson/geojson-tests.ts rename to types/geojson/geojson-tests.ts diff --git a/geojson/index.d.ts b/types/geojson/index.d.ts similarity index 100% rename from geojson/index.d.ts rename to types/geojson/index.d.ts diff --git a/geojson/tsconfig.json b/types/geojson/tsconfig.json similarity index 100% rename from geojson/tsconfig.json rename to types/geojson/tsconfig.json diff --git a/geojson/tslint.json b/types/geojson/tslint.json similarity index 100% rename from geojson/tslint.json rename to types/geojson/tslint.json diff --git a/geojson2osm/geojson2osm-tests.ts b/types/geojson2osm/geojson2osm-tests.ts similarity index 100% rename from geojson2osm/geojson2osm-tests.ts rename to types/geojson2osm/geojson2osm-tests.ts diff --git a/geojson2osm/index.d.ts b/types/geojson2osm/index.d.ts similarity index 100% rename from geojson2osm/index.d.ts rename to types/geojson2osm/index.d.ts diff --git a/geojson2osm/tsconfig.json b/types/geojson2osm/tsconfig.json similarity index 100% rename from geojson2osm/tsconfig.json rename to types/geojson2osm/tsconfig.json diff --git a/geolib/geolib-tests.ts b/types/geolib/geolib-tests.ts similarity index 100% rename from geolib/geolib-tests.ts rename to types/geolib/geolib-tests.ts diff --git a/geolib/index.d.ts b/types/geolib/index.d.ts similarity index 95% rename from geolib/index.d.ts rename to types/geolib/index.d.ts index 69a6c99353..95779ab2c9 100644 --- a/geolib/index.d.ts +++ b/types/geolib/index.d.ts @@ -4,25 +4,25 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace geolib { - export interface PositionAsDecimal { + interface PositionAsDecimal { latitude: number; longitude: number; } - export interface PositionAsSexadecimal { + interface PositionAsSexadecimal { latitude: string; longitude: string; } - export interface PositionWithElevation extends PositionAsDecimal { + interface PositionWithElevation extends PositionAsDecimal { elevation?: number; } - export interface PositionInTime extends PositionAsDecimal { + interface PositionInTime extends PositionAsDecimal { time: number; } - export interface Bound { + interface Bound { minLat: number; maxLat: number; minLng: number; @@ -31,19 +31,19 @@ declare namespace geolib { maxElev?: number; } - export interface CompassDirection { + interface CompassDirection { rough: string; exact: string; } - export interface Distance { + interface Distance { latitude: number; longitude: number; distance: number; key: string; } - export interface SpeedOption { + interface SpeedOption { unit: string; } @@ -60,13 +60,11 @@ declare namespace geolib { */ function getDistanceSimple(start: PositionAsDecimal|PositionAsSexadecimal, end: PositionAsDecimal|PositionAsSexadecimal, accuracy?: number): number; - /** Calculates the geographical center of all points in a collection of geo coordinates * Takes an object or array of coordinates and calculates the center of it. */ function getCenter(coords: PositionAsDecimal[]): PositionAsDecimal; - /** Calculates the center of the bounds of geo coordinates. Takes an array of coordinates, * calculate the border of those, and gives back the center of that rectangle. On polygons * like political borders (eg. states), this may gives a closer result to human expectation, @@ -76,28 +74,24 @@ declare namespace geolib { */ function getCenterOfBounds(coords: PositionAsDecimal[]): PositionAsDecimal; - /** Calculates the bounds of geo coordinates. * * Returns maximum and minimum, latitude, longitude, and elevation (if provided) in form of an object */ function getBounds(coords: PositionWithElevation[]): Bound; - /** Checks whether a point is inside of a polygon or not. Note: the polygon coords must be in correct order! * * Returns true or false */ function isPointInside(latlng: PositionAsDecimal, polygon: PositionAsDecimal[]): boolean; - /** Similar to is point inside: checks whether a point is inside of a circle or not. * * Returns true or false */ function isPointInCircle(latlng: PositionAsDecimal, center: PositionAsDecimal, radius: number): boolean; - /** Gets rhumb line bearing of two points. Find out about the difference between rhumb line and great circle bearing on Wikipedia. * Rhumb line should be fine in most cases: http://en.wikipedia.org/wiki/Rhumb_line#General_and_mathematical_description Function * is heavily based on Doug Vanderweide's great PHP version (licensed under GPL 3.0) @@ -107,14 +101,12 @@ declare namespace geolib { */ function getRhumbLineBearing(originLL: PositionAsDecimal, destLL: PositionAsDecimal): number; - /** Gets great circle bearing of two points. See description of getRhumbLineBearing for more information. * * Returns calculated bearing as integer */ function getBearing(originLL: PositionAsDecimal, destLL: PositionAsDecimal): number; - /** Gets the compass direction from an origin coordinate (originLL) to a destination coordinate (destLL). * Bearing mode. Can be either circle or rhumbline (default). * @@ -122,15 +114,12 @@ declare namespace geolib { */ function getCompassDirection(originLL: PositionAsDecimal, destLL: PositionAsDecimal, bearingMode?: string): CompassDirection; - /** Sorts an object or array of coords by distance from a reference coordinate */ function orderByDistance(latlng: PositionAsDecimal, coords: PositionAsDecimal[]): Distance[]; - /** Finds the nearest coordinate to a reference coordinate. */ function findNearest(latlng: PositionAsDecimal, coords: PositionAsDecimal[], offset?: number, limit?: number): Distance[]; - /** Calculates the length of a collection of coordinates. * * Returns the length of the path in meters */ @@ -142,11 +131,9 @@ declare namespace geolib { */ function getSpeed(coords: PositionInTime[], option?: SpeedOption): number; - /** Calculates if given point lies in a line formed by start and end */ function isPointInLine(point: PositionAsDecimal, start: PositionAsDecimal, end: PositionAsDecimal): boolean; - /** Converts a given distance (in meters) to another unit. * distance distance to be converted (source must be in meter). unit can be one of: * - m (meter) @@ -161,11 +148,9 @@ declare namespace geolib { */ function convertUnit(unit: string, distance: number, round?: number): number; - /** Converts a sexagesimal coordinate to decimal format */ function sexagesimal2decimal(coord: string): number; - /** Converts a decimal coordinate to sexagesimal format */ function decimal2sexagesimal(coord: number): string; @@ -184,11 +169,9 @@ declare namespace geolib { */ function elevation(latlng: any): number; - /** Checks if a coordinate is already in decimal format and, if not, converts it to */ function useDecimal(latlng: string|number): number; - /** Computes the destination point given an initial point, a distance (in meters) and a bearing (in degrees). * If no radius is given it defaults to the mean earth radius of 6371000 meter. * diff --git a/geolib/tsconfig.json b/types/geolib/tsconfig.json similarity index 100% rename from geolib/tsconfig.json rename to types/geolib/tsconfig.json diff --git a/types/geolib/tslint.json b/types/geolib/tslint.json new file mode 100644 index 0000000000..d3631e8907 --- /dev/null +++ b/types/geolib/tslint.json @@ -0,0 +1,6 @@ +{ + "extends": "../tslint.json", + "rules": { + "no-useless-files": false + } +} diff --git a/geometry-dom/geometry-dom-tests.ts b/types/geometry-dom/geometry-dom-tests.ts similarity index 100% rename from geometry-dom/geometry-dom-tests.ts rename to types/geometry-dom/geometry-dom-tests.ts diff --git a/geometry-dom/index.d.ts b/types/geometry-dom/index.d.ts similarity index 100% rename from geometry-dom/index.d.ts rename to types/geometry-dom/index.d.ts diff --git a/geometry-dom/tsconfig.json b/types/geometry-dom/tsconfig.json similarity index 100% rename from geometry-dom/tsconfig.json rename to types/geometry-dom/tsconfig.json diff --git a/geopattern/geopattern-tests.ts b/types/geopattern/geopattern-tests.ts similarity index 100% rename from geopattern/geopattern-tests.ts rename to types/geopattern/geopattern-tests.ts diff --git a/geopattern/index.d.ts b/types/geopattern/index.d.ts similarity index 100% rename from geopattern/index.d.ts rename to types/geopattern/index.d.ts diff --git a/geopattern/tsconfig.json b/types/geopattern/tsconfig.json similarity index 100% rename from geopattern/tsconfig.json rename to types/geopattern/tsconfig.json diff --git a/geolib/tslint.json b/types/geopattern/tslint.json similarity index 100% rename from geolib/tslint.json rename to types/geopattern/tslint.json diff --git a/get-port/get-port-tests.ts b/types/get-port/get-port-tests.ts similarity index 100% rename from get-port/get-port-tests.ts rename to types/get-port/get-port-tests.ts diff --git a/get-port/index.d.ts b/types/get-port/index.d.ts similarity index 100% rename from get-port/index.d.ts rename to types/get-port/index.d.ts diff --git a/get-port/tsconfig.json b/types/get-port/tsconfig.json similarity index 100% rename from get-port/tsconfig.json rename to types/get-port/tsconfig.json diff --git a/get-stdin/get-stdin-tests.ts b/types/get-stdin/get-stdin-tests.ts similarity index 100% rename from get-stdin/get-stdin-tests.ts rename to types/get-stdin/get-stdin-tests.ts diff --git a/get-stdin/index.d.ts b/types/get-stdin/index.d.ts similarity index 88% rename from get-stdin/index.d.ts rename to types/get-stdin/index.d.ts index 9539b520b9..2d1b15ae98 100644 --- a/get-stdin/index.d.ts +++ b/types/get-stdin/index.d.ts @@ -7,7 +7,7 @@ declare function getStdin(): Promise; declare namespace getStdin { - export function buffer(): Promise; + function buffer(): Promise; } export = getStdin; diff --git a/get-stdin/tsconfig.json b/types/get-stdin/tsconfig.json similarity index 100% rename from get-stdin/tsconfig.json rename to types/get-stdin/tsconfig.json diff --git a/geopattern/tslint.json b/types/get-stdin/tslint.json similarity index 100% rename from geopattern/tslint.json rename to types/get-stdin/tslint.json diff --git a/gettext.js/gettext.js-tests.ts b/types/gettext.js/gettext.js-tests.ts similarity index 100% rename from gettext.js/gettext.js-tests.ts rename to types/gettext.js/gettext.js-tests.ts diff --git a/gettext.js/index.d.ts b/types/gettext.js/index.d.ts similarity index 100% rename from gettext.js/index.d.ts rename to types/gettext.js/index.d.ts diff --git a/gettext.js/tsconfig.json b/types/gettext.js/tsconfig.json similarity index 100% rename from gettext.js/tsconfig.json rename to types/gettext.js/tsconfig.json diff --git a/massive/tslint.json b/types/gettext.js/tslint.json similarity index 100% rename from massive/tslint.json rename to types/gettext.js/tslint.json diff --git a/gijgo/gijgo-tests.ts b/types/gijgo/gijgo-tests.ts similarity index 100% rename from gijgo/gijgo-tests.ts rename to types/gijgo/gijgo-tests.ts diff --git a/gijgo/index.d.ts b/types/gijgo/index.d.ts similarity index 100% rename from gijgo/index.d.ts rename to types/gijgo/index.d.ts diff --git a/gijgo/tsconfig.json b/types/gijgo/tsconfig.json similarity index 100% rename from gijgo/tsconfig.json rename to types/gijgo/tsconfig.json diff --git a/giraffe/giraffe-tests.ts b/types/giraffe/giraffe-tests.ts similarity index 100% rename from giraffe/giraffe-tests.ts rename to types/giraffe/giraffe-tests.ts diff --git a/giraffe/index.d.ts b/types/giraffe/index.d.ts similarity index 100% rename from giraffe/index.d.ts rename to types/giraffe/index.d.ts diff --git a/giraffe/tsconfig.json b/types/giraffe/tsconfig.json similarity index 100% rename from giraffe/tsconfig.json rename to types/giraffe/tsconfig.json diff --git a/git-config/git-config-tests.ts b/types/git-config/git-config-tests.ts similarity index 100% rename from git-config/git-config-tests.ts rename to types/git-config/git-config-tests.ts diff --git a/git-config/index.d.ts b/types/git-config/index.d.ts similarity index 100% rename from git-config/index.d.ts rename to types/git-config/index.d.ts diff --git a/git-config/tsconfig.json b/types/git-config/tsconfig.json similarity index 100% rename from git-config/tsconfig.json rename to types/git-config/tsconfig.json diff --git a/git-remote-origin-url/git-remote-origin-url-tests.ts b/types/git-remote-origin-url/git-remote-origin-url-tests.ts similarity index 100% rename from git-remote-origin-url/git-remote-origin-url-tests.ts rename to types/git-remote-origin-url/git-remote-origin-url-tests.ts diff --git a/git-remote-origin-url/index.d.ts b/types/git-remote-origin-url/index.d.ts similarity index 100% rename from git-remote-origin-url/index.d.ts rename to types/git-remote-origin-url/index.d.ts diff --git a/git-remote-origin-url/tsconfig.json b/types/git-remote-origin-url/tsconfig.json similarity index 100% rename from git-remote-origin-url/tsconfig.json rename to types/git-remote-origin-url/tsconfig.json diff --git a/get-stdin/tslint.json b/types/git-remote-origin-url/tslint.json similarity index 100% rename from get-stdin/tslint.json rename to types/git-remote-origin-url/tslint.json diff --git a/git/git-tests.ts b/types/git/git-tests.ts similarity index 100% rename from git/git-tests.ts rename to types/git/git-tests.ts diff --git a/git/index.d.ts b/types/git/index.d.ts similarity index 100% rename from git/index.d.ts rename to types/git/index.d.ts diff --git a/git/tsconfig.json b/types/git/tsconfig.json similarity index 100% rename from git/tsconfig.json rename to types/git/tsconfig.json diff --git a/github/github-tests.ts b/types/github/github-tests.ts similarity index 100% rename from github/github-tests.ts rename to types/github/github-tests.ts diff --git a/github/index.d.ts b/types/github/index.d.ts similarity index 100% rename from github/index.d.ts rename to types/github/index.d.ts diff --git a/github/tsconfig.json b/types/github/tsconfig.json similarity index 100% rename from github/tsconfig.json rename to types/github/tsconfig.json diff --git a/gl-matrix/gl-matrix-tests.ts b/types/gl-matrix/gl-matrix-tests.ts similarity index 100% rename from gl-matrix/gl-matrix-tests.ts rename to types/gl-matrix/gl-matrix-tests.ts diff --git a/gl-matrix/index.d.ts b/types/gl-matrix/index.d.ts similarity index 100% rename from gl-matrix/index.d.ts rename to types/gl-matrix/index.d.ts diff --git a/gl-matrix/tsconfig.json b/types/gl-matrix/tsconfig.json similarity index 100% rename from gl-matrix/tsconfig.json rename to types/gl-matrix/tsconfig.json diff --git a/gldatepicker/gldatepicker-tests.ts b/types/gldatepicker/gldatepicker-tests.ts similarity index 100% rename from gldatepicker/gldatepicker-tests.ts rename to types/gldatepicker/gldatepicker-tests.ts diff --git a/gldatepicker/index.d.ts b/types/gldatepicker/index.d.ts similarity index 100% rename from gldatepicker/index.d.ts rename to types/gldatepicker/index.d.ts diff --git a/gldatepicker/tsconfig.json b/types/gldatepicker/tsconfig.json similarity index 100% rename from gldatepicker/tsconfig.json rename to types/gldatepicker/tsconfig.json diff --git a/glidejs/glidejs-tests.ts b/types/glidejs/glidejs-tests.ts similarity index 100% rename from glidejs/glidejs-tests.ts rename to types/glidejs/glidejs-tests.ts diff --git a/glidejs/index.d.ts b/types/glidejs/index.d.ts similarity index 100% rename from glidejs/index.d.ts rename to types/glidejs/index.d.ts diff --git a/glidejs/tsconfig.json b/types/glidejs/tsconfig.json similarity index 100% rename from glidejs/tsconfig.json rename to types/glidejs/tsconfig.json diff --git a/glob-expand/glob-expand-tests.ts b/types/glob-expand/glob-expand-tests.ts similarity index 100% rename from glob-expand/glob-expand-tests.ts rename to types/glob-expand/glob-expand-tests.ts diff --git a/glob-expand/index.d.ts b/types/glob-expand/index.d.ts similarity index 100% rename from glob-expand/index.d.ts rename to types/glob-expand/index.d.ts diff --git a/glob-expand/tsconfig.json b/types/glob-expand/tsconfig.json similarity index 100% rename from glob-expand/tsconfig.json rename to types/glob-expand/tsconfig.json diff --git a/glob-stream/glob-stream-tests.ts b/types/glob-stream/glob-stream-tests.ts similarity index 100% rename from glob-stream/glob-stream-tests.ts rename to types/glob-stream/glob-stream-tests.ts diff --git a/glob-stream/index.d.ts b/types/glob-stream/index.d.ts similarity index 100% rename from glob-stream/index.d.ts rename to types/glob-stream/index.d.ts diff --git a/glob-stream/tsconfig.json b/types/glob-stream/tsconfig.json similarity index 100% rename from glob-stream/tsconfig.json rename to types/glob-stream/tsconfig.json diff --git a/glob/glob-tests.ts b/types/glob/glob-tests.ts similarity index 100% rename from glob/glob-tests.ts rename to types/glob/glob-tests.ts diff --git a/glob/index.d.ts b/types/glob/index.d.ts similarity index 100% rename from glob/index.d.ts rename to types/glob/index.d.ts diff --git a/glob/tsconfig.json b/types/glob/tsconfig.json similarity index 100% rename from glob/tsconfig.json rename to types/glob/tsconfig.json diff --git a/globalize-compiler/globalize-compiler-tests.ts b/types/globalize-compiler/globalize-compiler-tests.ts similarity index 100% rename from globalize-compiler/globalize-compiler-tests.ts rename to types/globalize-compiler/globalize-compiler-tests.ts diff --git a/globalize-compiler/index.d.ts b/types/globalize-compiler/index.d.ts similarity index 100% rename from globalize-compiler/index.d.ts rename to types/globalize-compiler/index.d.ts diff --git a/globalize-compiler/tsconfig.json b/types/globalize-compiler/tsconfig.json similarity index 100% rename from globalize-compiler/tsconfig.json rename to types/globalize-compiler/tsconfig.json diff --git a/globalize/globalize-tests.ts b/types/globalize/globalize-tests.ts similarity index 100% rename from globalize/globalize-tests.ts rename to types/globalize/globalize-tests.ts diff --git a/globalize/index.d.ts b/types/globalize/index.d.ts similarity index 100% rename from globalize/index.d.ts rename to types/globalize/index.d.ts diff --git a/globalize/tsconfig.json b/types/globalize/tsconfig.json similarity index 100% rename from globalize/tsconfig.json rename to types/globalize/tsconfig.json diff --git a/globule/globule-tests.ts b/types/globule/globule-tests.ts similarity index 99% rename from globule/globule-tests.ts rename to types/globule/globule-tests.ts index 78697ba199..cf3d69c4b8 100644 --- a/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/globule/index.d.ts b/types/globule/index.d.ts similarity index 99% rename from globule/index.d.ts rename to types/globule/index.d.ts index 4add1d4461..08f00ec082 100644 --- a/globule/index.d.ts +++ b/types/globule/index.d.ts @@ -84,4 +84,3 @@ interface GlobuleStatic { declare var globule: GlobuleStatic; export = globule; - diff --git a/globule/tsconfig.json b/types/globule/tsconfig.json similarity index 100% rename from globule/tsconfig.json rename to types/globule/tsconfig.json diff --git a/git-remote-origin-url/tslint.json b/types/globule/tslint.json similarity index 100% rename from git-remote-origin-url/tslint.json rename to types/globule/tslint.json diff --git a/gm/gm-tests.ts b/types/gm/gm-tests.ts similarity index 100% rename from gm/gm-tests.ts rename to types/gm/gm-tests.ts diff --git a/gm/index.d.ts b/types/gm/index.d.ts similarity index 100% rename from gm/index.d.ts rename to types/gm/index.d.ts diff --git a/gm/tsconfig.json b/types/gm/tsconfig.json similarity index 100% rename from gm/tsconfig.json rename to types/gm/tsconfig.json diff --git a/go/go-tests.ts b/types/go/go-tests.ts similarity index 100% rename from go/go-tests.ts rename to types/go/go-tests.ts diff --git a/go/index.d.ts b/types/go/index.d.ts similarity index 100% rename from go/index.d.ts rename to types/go/index.d.ts diff --git a/go/tsconfig.json b/types/go/tsconfig.json similarity index 100% rename from go/tsconfig.json rename to types/go/tsconfig.json diff --git a/google-apps-script/NOTICE b/types/google-apps-script/NOTICE similarity index 100% rename from google-apps-script/NOTICE rename to types/google-apps-script/NOTICE diff --git a/google-apps-script/google-apps-script-tests.ts b/types/google-apps-script/google-apps-script-tests.ts similarity index 100% rename from google-apps-script/google-apps-script-tests.ts rename to types/google-apps-script/google-apps-script-tests.ts diff --git a/google-apps-script/google-apps-script.base.d.ts b/types/google-apps-script/google-apps-script.base.d.ts similarity index 100% rename from google-apps-script/google-apps-script.base.d.ts rename to types/google-apps-script/google-apps-script.base.d.ts diff --git a/google-apps-script/google-apps-script.cache.d.ts b/types/google-apps-script/google-apps-script.cache.d.ts similarity index 100% rename from google-apps-script/google-apps-script.cache.d.ts rename to types/google-apps-script/google-apps-script.cache.d.ts diff --git a/google-apps-script/google-apps-script.calendar.d.ts b/types/google-apps-script/google-apps-script.calendar.d.ts similarity index 100% rename from google-apps-script/google-apps-script.calendar.d.ts rename to types/google-apps-script/google-apps-script.calendar.d.ts diff --git a/google-apps-script/google-apps-script.charts.d.ts b/types/google-apps-script/google-apps-script.charts.d.ts similarity index 100% rename from google-apps-script/google-apps-script.charts.d.ts rename to types/google-apps-script/google-apps-script.charts.d.ts diff --git a/google-apps-script/google-apps-script.contacts.d.ts b/types/google-apps-script/google-apps-script.contacts.d.ts similarity index 100% rename from google-apps-script/google-apps-script.contacts.d.ts rename to types/google-apps-script/google-apps-script.contacts.d.ts diff --git a/google-apps-script/google-apps-script.content.d.ts b/types/google-apps-script/google-apps-script.content.d.ts similarity index 100% rename from google-apps-script/google-apps-script.content.d.ts rename to types/google-apps-script/google-apps-script.content.d.ts diff --git a/google-apps-script/google-apps-script.document.d.ts b/types/google-apps-script/google-apps-script.document.d.ts similarity index 100% rename from google-apps-script/google-apps-script.document.d.ts rename to types/google-apps-script/google-apps-script.document.d.ts diff --git a/google-apps-script/google-apps-script.drive.d.ts b/types/google-apps-script/google-apps-script.drive.d.ts similarity index 100% rename from google-apps-script/google-apps-script.drive.d.ts rename to types/google-apps-script/google-apps-script.drive.d.ts diff --git a/google-apps-script/google-apps-script.forms.d.ts b/types/google-apps-script/google-apps-script.forms.d.ts similarity index 100% rename from google-apps-script/google-apps-script.forms.d.ts rename to types/google-apps-script/google-apps-script.forms.d.ts diff --git a/google-apps-script/google-apps-script.gmail.d.ts b/types/google-apps-script/google-apps-script.gmail.d.ts similarity index 100% rename from google-apps-script/google-apps-script.gmail.d.ts rename to types/google-apps-script/google-apps-script.gmail.d.ts diff --git a/google-apps-script/google-apps-script.groups.d.ts b/types/google-apps-script/google-apps-script.groups.d.ts similarity index 100% rename from google-apps-script/google-apps-script.groups.d.ts rename to types/google-apps-script/google-apps-script.groups.d.ts diff --git a/google-apps-script/google-apps-script.html.d.ts b/types/google-apps-script/google-apps-script.html.d.ts similarity index 100% rename from google-apps-script/google-apps-script.html.d.ts rename to types/google-apps-script/google-apps-script.html.d.ts diff --git a/google-apps-script/google-apps-script.jdbc.d.ts b/types/google-apps-script/google-apps-script.jdbc.d.ts similarity index 100% rename from google-apps-script/google-apps-script.jdbc.d.ts rename to types/google-apps-script/google-apps-script.jdbc.d.ts diff --git a/google-apps-script/google-apps-script.language.d.ts b/types/google-apps-script/google-apps-script.language.d.ts similarity index 100% rename from google-apps-script/google-apps-script.language.d.ts rename to types/google-apps-script/google-apps-script.language.d.ts diff --git a/google-apps-script/google-apps-script.lock.d.ts b/types/google-apps-script/google-apps-script.lock.d.ts similarity index 100% rename from google-apps-script/google-apps-script.lock.d.ts rename to types/google-apps-script/google-apps-script.lock.d.ts diff --git a/google-apps-script/google-apps-script.mail.d.ts b/types/google-apps-script/google-apps-script.mail.d.ts similarity index 100% rename from google-apps-script/google-apps-script.mail.d.ts rename to types/google-apps-script/google-apps-script.mail.d.ts diff --git a/google-apps-script/google-apps-script.maps.d.ts b/types/google-apps-script/google-apps-script.maps.d.ts similarity index 100% rename from google-apps-script/google-apps-script.maps.d.ts rename to types/google-apps-script/google-apps-script.maps.d.ts diff --git a/google-apps-script/google-apps-script.optimization.d.ts b/types/google-apps-script/google-apps-script.optimization.d.ts similarity index 100% rename from google-apps-script/google-apps-script.optimization.d.ts rename to types/google-apps-script/google-apps-script.optimization.d.ts diff --git a/google-apps-script/google-apps-script.properties.d.ts b/types/google-apps-script/google-apps-script.properties.d.ts similarity index 100% rename from google-apps-script/google-apps-script.properties.d.ts rename to types/google-apps-script/google-apps-script.properties.d.ts diff --git a/google-apps-script/google-apps-script.script.d.ts b/types/google-apps-script/google-apps-script.script.d.ts similarity index 100% rename from google-apps-script/google-apps-script.script.d.ts rename to types/google-apps-script/google-apps-script.script.d.ts diff --git a/google-apps-script/google-apps-script.sites.d.ts b/types/google-apps-script/google-apps-script.sites.d.ts similarity index 100% rename from google-apps-script/google-apps-script.sites.d.ts rename to types/google-apps-script/google-apps-script.sites.d.ts diff --git a/google-apps-script/google-apps-script.spreadsheet.d.ts b/types/google-apps-script/google-apps-script.spreadsheet.d.ts similarity index 100% rename from google-apps-script/google-apps-script.spreadsheet.d.ts rename to types/google-apps-script/google-apps-script.spreadsheet.d.ts diff --git a/google-apps-script/google-apps-script.types.d.ts b/types/google-apps-script/google-apps-script.types.d.ts similarity index 100% rename from google-apps-script/google-apps-script.types.d.ts rename to types/google-apps-script/google-apps-script.types.d.ts diff --git a/google-apps-script/google-apps-script.ui.d.ts b/types/google-apps-script/google-apps-script.ui.d.ts similarity index 100% rename from google-apps-script/google-apps-script.ui.d.ts rename to types/google-apps-script/google-apps-script.ui.d.ts diff --git a/google-apps-script/google-apps-script.url-fetch.d.ts b/types/google-apps-script/google-apps-script.url-fetch.d.ts similarity index 100% rename from google-apps-script/google-apps-script.url-fetch.d.ts rename to types/google-apps-script/google-apps-script.url-fetch.d.ts diff --git a/google-apps-script/google-apps-script.utilities.d.ts b/types/google-apps-script/google-apps-script.utilities.d.ts similarity index 100% rename from google-apps-script/google-apps-script.utilities.d.ts rename to types/google-apps-script/google-apps-script.utilities.d.ts diff --git a/google-apps-script/google-apps-script.xml-service.d.ts b/types/google-apps-script/google-apps-script.xml-service.d.ts similarity index 100% rename from google-apps-script/google-apps-script.xml-service.d.ts rename to types/google-apps-script/google-apps-script.xml-service.d.ts diff --git a/google-apps-script/index.d.ts b/types/google-apps-script/index.d.ts similarity index 100% rename from google-apps-script/index.d.ts rename to types/google-apps-script/index.d.ts diff --git a/google-apps-script/tsconfig.json b/types/google-apps-script/tsconfig.json similarity index 100% rename from google-apps-script/tsconfig.json rename to types/google-apps-script/tsconfig.json diff --git a/google-closure-compiler/google-closure-compiler-tests.ts b/types/google-closure-compiler/google-closure-compiler-tests.ts similarity index 100% rename from google-closure-compiler/google-closure-compiler-tests.ts rename to types/google-closure-compiler/google-closure-compiler-tests.ts diff --git a/google-closure-compiler/index.d.ts b/types/google-closure-compiler/index.d.ts similarity index 100% rename from google-closure-compiler/index.d.ts rename to types/google-closure-compiler/index.d.ts diff --git a/google-closure-compiler/tsconfig.json b/types/google-closure-compiler/tsconfig.json similarity index 100% rename from google-closure-compiler/tsconfig.json rename to types/google-closure-compiler/tsconfig.json diff --git a/google-drive-realtime-api/google-drive-realtime-api-tests.ts b/types/google-drive-realtime-api/google-drive-realtime-api-tests.ts similarity index 100% rename from google-drive-realtime-api/google-drive-realtime-api-tests.ts rename to types/google-drive-realtime-api/google-drive-realtime-api-tests.ts diff --git a/google-drive-realtime-api/index.d.ts b/types/google-drive-realtime-api/index.d.ts similarity index 100% rename from google-drive-realtime-api/index.d.ts rename to types/google-drive-realtime-api/index.d.ts diff --git a/google-drive-realtime-api/tsconfig.json b/types/google-drive-realtime-api/tsconfig.json similarity index 100% rename from google-drive-realtime-api/tsconfig.json rename to types/google-drive-realtime-api/tsconfig.json diff --git a/google-earth/google-earth-tests.ts b/types/google-earth/google-earth-tests.ts similarity index 100% rename from google-earth/google-earth-tests.ts rename to types/google-earth/google-earth-tests.ts diff --git a/google-earth/index.d.ts b/types/google-earth/index.d.ts similarity index 100% rename from google-earth/index.d.ts rename to types/google-earth/index.d.ts diff --git a/google-earth/tsconfig.json b/types/google-earth/tsconfig.json similarity index 100% rename from google-earth/tsconfig.json rename to types/google-earth/tsconfig.json diff --git a/google-libphonenumber/google-libphonenumber-tests.ts b/types/google-libphonenumber/google-libphonenumber-tests.ts similarity index 100% rename from google-libphonenumber/google-libphonenumber-tests.ts rename to types/google-libphonenumber/google-libphonenumber-tests.ts diff --git a/google-libphonenumber/index.d.ts b/types/google-libphonenumber/index.d.ts similarity index 100% rename from google-libphonenumber/index.d.ts rename to types/google-libphonenumber/index.d.ts diff --git a/google-libphonenumber/tsconfig.json b/types/google-libphonenumber/tsconfig.json similarity index 100% rename from google-libphonenumber/tsconfig.json rename to types/google-libphonenumber/tsconfig.json 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..9cec9138e2 --- /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..45ce0341a6 --- /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/react-day-picker/tsconfig.json b/types/google-map-react/tsconfig.json similarity index 92% rename from react-day-picker/tsconfig.json rename to types/google-map-react/tsconfig.json index 943c51e1e6..2e2a37aaf6 100644 --- a/react-day-picker/tsconfig.json +++ b/types/google-map-react/tsconfig.json @@ -19,6 +19,6 @@ }, "files": [ "index.d.ts", - "react-day-picker-tests.tsx" + "google-map-react-tests.tsx" ] } diff --git a/globule/tslint.json b/types/google-map-react/tslint.json similarity index 100% rename from globule/tslint.json rename to types/google-map-react/tslint.json diff --git a/google-maps/google-maps-tests.ts b/types/google-maps/google-maps-tests.ts similarity index 100% rename from google-maps/google-maps-tests.ts rename to types/google-maps/google-maps-tests.ts diff --git a/google-maps/index.d.ts b/types/google-maps/index.d.ts similarity index 100% rename from google-maps/index.d.ts rename to types/google-maps/index.d.ts diff --git a/google-maps/tsconfig.json b/types/google-maps/tsconfig.json similarity index 100% rename from google-maps/tsconfig.json rename to types/google-maps/tsconfig.json diff --git a/types/google-protobuf/google-protobuf-tests.ts b/types/google-protobuf/google-protobuf-tests.ts new file mode 100644 index 0000000000..809d8dfb7c --- /dev/null +++ b/types/google-protobuf/google-protobuf-tests.ts @@ -0,0 +1,524 @@ +import * as jspb from "./index"; + +import * as google_protobuf_compiler_plugin_pb from "./google/protobuf/compiler/plugin_pb"; +import * as google_protobuf_any_pb from "./google/protobuf/any_pb"; +import * as google_protobuf_api_pb from "./google/protobuf/api_pb"; +import * as google_protobuf_descriptor_pb from "./google/protobuf/descriptor_pb"; +import * as google_protobuf_duration_pb from "./google/protobuf/duration_pb"; +import * as google_protobuf_empty_pb from "./google/protobuf/empty_pb"; +import * as google_protobuf_field_mask_pb from "./google/protobuf/field_mask_pb"; +import * as google_protobuf_source_context_pb from "./google/protobuf/source_context_pb"; +import * as google_protobuf_struct_pb from "./google/protobuf/struct_pb"; +import * as google_protobuf_timestamp_pb from "./google/protobuf/timestamp_pb"; +import * as google_protobuf_type_pb from "./google/protobuf/type_pb"; +import * as google_protobuf_wrappers_pb from "./google/protobuf/wrappers_pb"; + +/* This is a typescript version of a simple generated class from a proto file that is shown below. In order to make + this ES5 JS file into TypeScript there have been quite a few modifications, but the same calls are made to the library + classes. + + // FILE: simple.proto + syntax = "proto3"; + + package examplecom; + + message MySimple { + string my_string = 1; + bool my_bool = 2; + repeated string some_labels = 3; + google.protobuf.compiler.CodeGeneratorRequest some_code_generator_request = 4; + google.protobuf.Any some_any = 5; + google.protobuf.Method some_method = 6; + google.protobuf.GeneratedCodeInfo some_generated_code_info = 7; + google.protobuf.Duration some_duration = 8; + google.protobuf.Empty some_empty = 9; + google.protobuf.FieldMask some_field_mask = 10; + google.protobuf.SourceContext some_source_context = 11; + google.protobuf.Struct some_struct = 12; + google.protobuf.Timestamp some_timestamp = 13; + google.protobuf.Type some_type = 14; + google.protobuf.DoubleValue some_double_value = 15; + } +*/ + +class MySimple extends jspb.Message { + constructor(opt_data?: any) { + super(); // This isn't actually called in the JS version of this file, but it's required by TS + jspb.Message.initialize(this, opt_data, 0, -1, MySimple.repeatedFields_, null); + }; + + static repeatedFields_ = [3]; + + toObject(opt_includeInstance?: boolean): {} { + return MySimple.toObject(opt_includeInstance || false, this); + }; + + static toObject(includeInstance: boolean, msg: MySimple): {} { + const obj = { + myString: jspb.Message.getFieldWithDefault(msg, 1, ""), + myBool: jspb.Message.getFieldWithDefault(msg, 2, false), + someLabelsList: jspb.Message.getField(msg, 3), + someCodeGeneratorRequest: google_protobuf_compiler_plugin_pb.CodeGeneratorRequest.toObject(includeInstance, msg.getSomeCodeGeneratorRequest()), + someAny: google_protobuf_any_pb.Any.toObject(includeInstance, msg.getSomeAny()), + someMethod: google_protobuf_api_pb.Method.toObject(includeInstance, msg.getSomeMethod()), + someGeneratedCodeInfo: google_protobuf_descriptor_pb.GeneratedCodeInfo.toObject(includeInstance, msg.getSomeGeneratedCodeInfo()), + someDuration: google_protobuf_duration_pb.Duration.toObject(includeInstance, msg.getSomeDuration()), + someEmpty: google_protobuf_empty_pb.Empty.toObject(includeInstance, msg.getSomeEmpty()), + someFieldMask: google_protobuf_field_mask_pb.FieldMask.toObject(includeInstance, msg.getSomeFieldMask()), + someSourceContext: google_protobuf_source_context_pb.SourceContext.toObject(includeInstance, msg.getSomeSourceContext()), + someStruct: google_protobuf_struct_pb.Struct.toObject(includeInstance, msg.getSomeStruct()), + someTimestamp: google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, msg.getSomeTimestamp()), + someType: google_protobuf_type_pb.Type.toObject(includeInstance, msg.getSomeType()), + someDoubleValue: google_protobuf_wrappers_pb.DoubleValue.toObject(includeInstance, msg.getSomeDoubleValue()), + }; + + if (includeInstance) { + // This is commented out because it's not valid in TS, but it's a simple append to an object + // obj['$jspbMessageInstance'] = msg; + } + return obj; + }; + + static deserializeBinary(bytes: Uint8Array): MySimple { + var reader = new jspb.BinaryReader(bytes); + var msg = new MySimple; + return MySimple.deserializeBinaryFromReader(msg, reader); + } + + static deserializeBinaryFromReader(msg: MySimple, reader: jspb.BinaryReader): MySimple { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value1 = /** @type {string} */ (reader.readString()); + msg.setMyString(value1); + break; + case 2: + var value2 = /** @type {boolean} */ (reader.readBool()); + msg.setMyBool(value2); + break; + case 3: + var value3 = /** @type {string} */ (reader.readString()); + msg.addSomeLabels(value3); + break; + case 4: + var value4 = new google_protobuf_compiler_plugin_pb.CodeGeneratorRequest; + reader.readMessage(value4, google_protobuf_compiler_plugin_pb.CodeGeneratorRequest.deserializeBinaryFromReader); + msg.setSomeCodeGeneratorRequest(value4); + break; + case 5: + var value5 = new google_protobuf_any_pb.Any; + reader.readMessage(value5, google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.setSomeAny(value5); + break; + case 6: + var value6 = new google_protobuf_api_pb.Method; + reader.readMessage(value6, google_protobuf_api_pb.Method.deserializeBinaryFromReader); + msg.setSomeMethod(value6); + break; + case 7: + var value7 = new google_protobuf_descriptor_pb.GeneratedCodeInfo; + reader.readMessage(value7, google_protobuf_descriptor_pb.GeneratedCodeInfo.deserializeBinaryFromReader); + msg.setSomeGeneratedCodeInfo(value7); + break; + case 8: + var value8 = new google_protobuf_duration_pb.Duration; + reader.readMessage(value8, google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); + msg.setSomeDuration(value8); + break; + case 9: + var value9 = new google_protobuf_empty_pb.Empty; + reader.readMessage(value9, google_protobuf_empty_pb.Empty.deserializeBinaryFromReader); + msg.setSomeEmpty(value9); + break; + case 10: + var value10 = new google_protobuf_field_mask_pb.FieldMask; + reader.readMessage(value10, google_protobuf_field_mask_pb.FieldMask.deserializeBinaryFromReader); + msg.setSomeFieldMask(value10); + break; + case 11: + var value11 = new google_protobuf_source_context_pb.SourceContext; + reader.readMessage(value11, google_protobuf_source_context_pb.SourceContext.deserializeBinaryFromReader); + msg.setSomeSourceContext(value11); + break; + case 12: + var value12 = new google_protobuf_struct_pb.Struct; + reader.readMessage(value12, google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); + msg.setSomeStruct(value12); + break; + case 13: + var value13 = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value13, google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setSomeTimestamp(value13); + break; + case 14: + var value14 = new google_protobuf_type_pb.Type; + reader.readMessage(value14, google_protobuf_type_pb.Type.deserializeBinaryFromReader); + msg.setSomeType(value14); + break; + case 15: + var value15 = new google_protobuf_wrappers_pb.DoubleValue; + reader.readMessage(value15, google_protobuf_wrappers_pb.DoubleValue.deserializeBinaryFromReader); + msg.setSomeDoubleValue(value15); + break; + default: + reader.skipField(); + break; + } + } + return msg; + } + + serializeBinary(): Uint8Array { + var writer = new jspb.BinaryWriter(); + MySimple.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + } + + static serializeBinaryToWriter(message: MySimple, writer: jspb.BinaryWriter) { + const f1 = message.getMyString(); + if (f1.length > 0) { + writer.writeString( + 1, + f1 + ); + } + const f2 = message.getMyBool(); + if (f2) { + writer.writeBool( + 2, + f2 + ); + } + const f3 = message.getSomeLabelsList(); + if (f3.length > 0) { + writer.writeRepeatedString( + 3, + f3 + ); + } + const f4 = message.getSomeCodeGeneratorRequest(); + if (f4 != null) { + writer.writeMessage( + 4, + f4, + google_protobuf_compiler_plugin_pb.CodeGeneratorRequest.serializeBinaryToWriter + ); + } + const f5 = message.getSomeAny(); + if (f5 != null) { + writer.writeMessage( + 5, + f5, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } + const f6 = message.getSomeMethod(); + if (f6 != null) { + writer.writeMessage( + 6, + f6, + google_protobuf_api_pb.Method.serializeBinaryToWriter + ); + } + const f7 = message.getSomeGeneratedCodeInfo(); + if (f7 != null) { + writer.writeMessage( + 7, + f7, + google_protobuf_descriptor_pb.GeneratedCodeInfo.serializeBinaryToWriter + ); + } + const f8 = message.getSomeDuration(); + if (f8 != null) { + writer.writeMessage( + 8, + f8, + google_protobuf_duration_pb.Duration.serializeBinaryToWriter + ); + } + const f9 = message.getSomeEmpty(); + if (f9 != null) { + writer.writeMessage( + 9, + f9, + google_protobuf_empty_pb.Empty.serializeBinaryToWriter + ); + } + const f10 = message.getSomeFieldMask(); + if (f10 != null) { + writer.writeMessage( + 10, + f10, + google_protobuf_field_mask_pb.FieldMask.serializeBinaryToWriter + ); + } + const f11 = message.getSomeSourceContext(); + if (f11 != null) { + writer.writeMessage( + 11, + f11, + google_protobuf_source_context_pb.SourceContext.serializeBinaryToWriter + ); + } + const f12 = message.getSomeStruct(); + if (f12 != null) { + writer.writeMessage( + 12, + f12, + google_protobuf_struct_pb.Struct.serializeBinaryToWriter + ); + } + const f13 = message.getSomeTimestamp(); + if (f13 != null) { + writer.writeMessage( + 13, + f13, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + const f14 = message.getSomeType(); + if (f14 != null) { + writer.writeMessage( + 14, + f14, + google_protobuf_type_pb.Type.serializeBinaryToWriter + ); + } + const f15 = message.getSomeDoubleValue(); + if (f15 != null) { + writer.writeMessage( + 15, + f15, + google_protobuf_wrappers_pb.DoubleValue.serializeBinaryToWriter + ); + } + } + + getMyString(): string { + return jspb.Message.getFieldWithDefault(this, 1, ""); + } + + setMyString(value: string) { + jspb.Message.setField(this, 1, value); + } + + getMyBool(): boolean { + return jspb.Message.getFieldWithDefault(this, 2, false); + } + + setMyBool(value: boolean) { + jspb.Message.setField(this, 2, value); + } + + getSomeLabelsList(): string[] { + return jspb.Message.getField(this, 3) as string[]; + } + + setSomeLabelsList(value: Array) { + jspb.Message.setField(this, 3, value || []); + } + + addSomeLabels(value: string, opt_index?: number) { + jspb.Message.addToRepeatedField(this, 3, value, opt_index); + } + + clearSomeLabelsList() { + this.setSomeLabelsList([]); + } + + getSomeCodeGeneratorRequest(): google_protobuf_compiler_plugin_pb.CodeGeneratorRequest { + return jspb.Message.getWrapperField(this, google_protobuf_compiler_plugin_pb.CodeGeneratorRequest, 4) as google_protobuf_compiler_plugin_pb.CodeGeneratorRequest; + } + + setSomeCodeGeneratorRequest(value?: google_protobuf_compiler_plugin_pb.CodeGeneratorRequest) { + jspb.Message.setWrapperField(this, 4, value); + } + + clearSomeCodeGeneratorRequest() { + this.setSomeCodeGeneratorRequest(undefined); + } + + hasSomeCodeGeneratorRequest(): boolean { + return jspb.Message.getField(this, 4) != null; + } + + getSomeAny(): google_protobuf_any_pb.Any { + return jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 5) as google_protobuf_any_pb.Any; + } + + setSomeAny(value?: google_protobuf_any_pb.Any) { + jspb.Message.setWrapperField(this, 5, value); + } + + clearSomeAny() { + this.setSomeAny(undefined); + } + + hasSomeAny(): boolean { + return jspb.Message.getField(this, 5) != null; + } + + getSomeMethod(): google_protobuf_api_pb.Method { + return jspb.Message.getWrapperField(this, google_protobuf_api_pb.Method, 6) as google_protobuf_api_pb.Method; + } + + setSomeMethod(value?: google_protobuf_api_pb.Method) { + jspb.Message.setWrapperField(this, 6, value); + } + + clearSomeMethod() { + this.setSomeMethod(undefined); + } + + hasSomeMethod(): boolean { + return jspb.Message.getField(this, 6) != null; + } + + getSomeGeneratedCodeInfo(): google_protobuf_descriptor_pb.GeneratedCodeInfo { + return jspb.Message.getWrapperField(this, google_protobuf_descriptor_pb.GeneratedCodeInfo, 7) as google_protobuf_descriptor_pb.GeneratedCodeInfo; + } + + setSomeGeneratedCodeInfo(value?: google_protobuf_descriptor_pb.GeneratedCodeInfo) { + jspb.Message.setWrapperField(this, 7, value); + } + + clearSomeGeneratedCodeInfo() { + this.setSomeGeneratedCodeInfo(undefined); + } + + hasSomeGeneratedCodeInfo(): boolean { + return jspb.Message.getField(this, 7) != null; + } + + getSomeDuration(): google_protobuf_duration_pb.Duration { + return jspb.Message.getWrapperField(this, google_protobuf_duration_pb.Duration, 8) as google_protobuf_duration_pb.Duration; + } + + setSomeDuration(value?: google_protobuf_duration_pb.Duration) { + jspb.Message.setWrapperField(this, 8, value); + } + + clearSomeDuration() { + this.setSomeDuration(undefined); + } + + hasSomeDuration(): boolean { + return jspb.Message.getField(this, 8) != null; + } + + getSomeEmpty(): google_protobuf_empty_pb.Empty { + return jspb.Message.getWrapperField(this, google_protobuf_empty_pb.Empty, 9) as google_protobuf_empty_pb.Empty; + } + + setSomeEmpty(value?: google_protobuf_empty_pb.Empty) { + jspb.Message.setWrapperField(this, 9, value); + } + + clearSomeEmpty() { + this.setSomeEmpty(undefined); + } + + hasSomeEmpty(): boolean { + return jspb.Message.getField(this, 9) != null; + } + + getSomeFieldMask(): google_protobuf_field_mask_pb.FieldMask { + return jspb.Message.getWrapperField(this, google_protobuf_field_mask_pb.FieldMask, 10) as google_protobuf_field_mask_pb.FieldMask; + } + + setSomeFieldMask(value?: google_protobuf_field_mask_pb.FieldMask) { + jspb.Message.setWrapperField(this, 10, value); + } + + clearSomeFieldMask() { + this.setSomeFieldMask(undefined); + } + + hasSomeFieldMask(): boolean { + return jspb.Message.getField(this, 10) != null; + } + + getSomeSourceContext(): google_protobuf_source_context_pb.SourceContext { + return jspb.Message.getWrapperField(this, google_protobuf_source_context_pb.SourceContext, 11) as google_protobuf_source_context_pb.SourceContext; + } + + setSomeSourceContext(value?: google_protobuf_source_context_pb.SourceContext) { + jspb.Message.setWrapperField(this, 11, value); + } + + clearSomeSourceContext() { + this.setSomeSourceContext(undefined); + } + + hasSomeSourceContext(): boolean { + return jspb.Message.getField(this, 11) != null; + } + + getSomeStruct(): google_protobuf_struct_pb.Struct { + return jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 12) as google_protobuf_struct_pb.Struct; + } + + setSomeStruct(value?: google_protobuf_struct_pb.Struct) { + jspb.Message.setWrapperField(this, 12, value); + } + + clearSomeStruct() { + this.setSomeStruct(undefined); + } + + hasSomeStruct(): boolean { + return jspb.Message.getField(this, 12) != null; + } + + getSomeTimestamp(): google_protobuf_timestamp_pb.Timestamp { + return jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 13) as google_protobuf_timestamp_pb.Timestamp; + } + + setSomeTimestamp(value?: google_protobuf_timestamp_pb.Timestamp) { + jspb.Message.setWrapperField(this, 13, value); + } + + clearSomeTimestamp() { + this.setSomeTimestamp(undefined); + } + + hasSomeTimestamp(): boolean { + return jspb.Message.getField(this, 13) != null; + } + + getSomeType(): google_protobuf_type_pb.Type { + return jspb.Message.getWrapperField(this, google_protobuf_type_pb.Type, 14) as google_protobuf_type_pb.Type; + } + + setSomeType(value?: google_protobuf_type_pb.Type) { + jspb.Message.setWrapperField(this, 14, value); + } + + clearSomeType() { + this.setSomeType(undefined); + } + + hasSomeType(): boolean { + return jspb.Message.getField(this, 14) != null; + } + + getSomeDoubleValue(): google_protobuf_wrappers_pb.DoubleValue { + return jspb.Message.getWrapperField(this, google_protobuf_wrappers_pb.DoubleValue, 15) as google_protobuf_wrappers_pb.DoubleValue; + } + + setSomeDoubleValue(value?: google_protobuf_wrappers_pb.DoubleValue) { + jspb.Message.setWrapperField(this, 15, value); + } + + clearSomeDoubleValue() { + this.setSomeDoubleValue(undefined); + } + + hasSomeDoubleValue(): boolean { + return jspb.Message.getField(this, 15) != null; + } +}; diff --git a/types/google-protobuf/google/protobuf/any_pb.d.ts b/types/google-protobuf/google/protobuf/any_pb.d.ts new file mode 100644 index 0000000000..b1e275570a --- /dev/null +++ b/types/google-protobuf/google/protobuf/any_pb.d.ts @@ -0,0 +1,32 @@ +import * as jspb from "../../index"; + +export class Any extends jspb.Message { + getTypeUrl(): string; + setTypeUrl(value: string): void; + + getValue(): Uint8Array | string; + getValue_asU8(): Uint8Array; + getValue_asB64(): string; + setValue(value: Uint8Array | string): void; + + getTypeName(): string; + pack(serialized: Uint8Array, name: string, typeUrlPrefix?: string): void; + unpack(deserialize: (packed: Uint8Array) => T, name: string): T | null; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Any.AsObject; + static toObject(includeInstance: boolean, msg: Any): Any.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Any, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Any; + static deserializeBinaryFromReader(message: Any, reader: jspb.BinaryReader): Any; +} + +export namespace Any { + export type AsObject = { + typeUrl: string, + value: Uint8Array | string, + } +} + diff --git a/types/google-protobuf/google/protobuf/api_pb.d.ts b/types/google-protobuf/google/protobuf/api_pb.d.ts new file mode 100644 index 0000000000..abb0c56df0 --- /dev/null +++ b/types/google-protobuf/google/protobuf/api_pb.d.ts @@ -0,0 +1,126 @@ +import * as jspb from "../../index"; +import * as google_protobuf_source_context_pb from "./source_context_pb"; +import * as google_protobuf_type_pb from "./type_pb"; + +export class Api extends jspb.Message { + getName(): string; + setName(value: string): void; + + clearMethodsList(): void; + getMethodsList(): Array; + setMethodsList(value: Array): void; + addMethods(value?: Method, index?: number): void; + + clearOptionsList(): void; + getOptionsList(): Array; + setOptionsList(value: Array): void; + addOptions(value?: google_protobuf_type_pb.Option, index?: number): void; + + getVersion(): string; + setVersion(value: string): void; + + hasSourceContext(): boolean; + clearSourceContext(): void; + getSourceContext(): google_protobuf_source_context_pb.SourceContext | undefined; + setSourceContext(value?: google_protobuf_source_context_pb.SourceContext): void; + + clearMixinsList(): void; + getMixinsList(): Array; + setMixinsList(value: Array): void; + addMixins(value?: Mixin, index?: number): void; + + getSyntax(): google_protobuf_type_pb.Syntax; + setSyntax(value: google_protobuf_type_pb.Syntax): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Api.AsObject; + static toObject(includeInstance: boolean, msg: Api): Api.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Api, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Api; + static deserializeBinaryFromReader(message: Api, reader: jspb.BinaryReader): Api; +} + +export namespace Api { + export type AsObject = { + name: string, + methodsList: Array, + optionsList: Array, + version: string, + sourceContext?: google_protobuf_source_context_pb.SourceContext.AsObject, + mixinsList: Array, + syntax: google_protobuf_type_pb.Syntax, + } +} + +export class Method extends jspb.Message { + getName(): string; + setName(value: string): void; + + getRequestTypeUrl(): string; + setRequestTypeUrl(value: string): void; + + getRequestStreaming(): boolean; + setRequestStreaming(value: boolean): void; + + getResponseTypeUrl(): string; + setResponseTypeUrl(value: string): void; + + getResponseStreaming(): boolean; + setResponseStreaming(value: boolean): void; + + clearOptionsList(): void; + getOptionsList(): Array; + setOptionsList(value: Array): void; + addOptions(value?: google_protobuf_type_pb.Option, index?: number): void; + + getSyntax(): google_protobuf_type_pb.Syntax; + setSyntax(value: google_protobuf_type_pb.Syntax): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Method.AsObject; + static toObject(includeInstance: boolean, msg: Method): Method.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Method, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Method; + static deserializeBinaryFromReader(message: Method, reader: jspb.BinaryReader): Method; +} + +export namespace Method { + export type AsObject = { + name: string, + requestTypeUrl: string, + requestStreaming: boolean, + responseTypeUrl: string, + responseStreaming: boolean, + optionsList: Array, + syntax: google_protobuf_type_pb.Syntax, + } +} + +export class Mixin extends jspb.Message { + getName(): string; + setName(value: string): void; + + getRoot(): string; + setRoot(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Mixin.AsObject; + static toObject(includeInstance: boolean, msg: Mixin): Mixin.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Mixin, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Mixin; + static deserializeBinaryFromReader(message: Mixin, reader: jspb.BinaryReader): Mixin; +} + +export namespace Mixin { + export type AsObject = { + name: string, + root: string, + } +} + diff --git a/types/google-protobuf/google/protobuf/compiler/plugin_pb.d.ts b/types/google-protobuf/google/protobuf/compiler/plugin_pb.d.ts new file mode 100644 index 0000000000..bc4a15554f --- /dev/null +++ b/types/google-protobuf/google/protobuf/compiler/plugin_pb.d.ts @@ -0,0 +1,145 @@ +import * as jspb from "../../../index"; +import * as google_protobuf_descriptor_pb from "../descriptor_pb"; + +export class Version extends jspb.Message { + hasMajor(): boolean; + clearMajor(): void; + getMajor(): number; + setMajor(value: number): void; + + hasMinor(): boolean; + clearMinor(): void; + getMinor(): number; + setMinor(value: number): void; + + hasPatch(): boolean; + clearPatch(): void; + getPatch(): number; + setPatch(value: number): void; + + hasSuffix(): boolean; + clearSuffix(): void; + getSuffix(): string; + setSuffix(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Version.AsObject; + static toObject(includeInstance: boolean, msg: Version): Version.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Version, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Version; + static deserializeBinaryFromReader(message: Version, reader: jspb.BinaryReader): Version; +} + +export namespace Version { + export type AsObject = { + major?: number, + minor?: number, + patch?: number, + suffix?: string, + } +} + +export class CodeGeneratorRequest extends jspb.Message { + clearFileToGenerateList(): void; + getFileToGenerateList(): Array; + setFileToGenerateList(value: Array): void; + addFileToGenerate(value: string, index?: number): void; + + hasParameter(): boolean; + clearParameter(): void; + getParameter(): string; + setParameter(value: string): void; + + clearProtoFileList(): void; + getProtoFileList(): Array; + setProtoFileList(value: Array): void; + addProtoFile(value?: google_protobuf_descriptor_pb.FileDescriptorProto, index?: number): void; + + hasCompilerVersion(): boolean; + clearCompilerVersion(): void; + getCompilerVersion(): Version; + setCompilerVersion(value?: Version): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CodeGeneratorRequest.AsObject; + static toObject(includeInstance: boolean, msg: CodeGeneratorRequest): CodeGeneratorRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CodeGeneratorRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CodeGeneratorRequest; + static deserializeBinaryFromReader(message: CodeGeneratorRequest, reader: jspb.BinaryReader): CodeGeneratorRequest; +} + +export namespace CodeGeneratorRequest { + export type AsObject = { + fileToGenerateList: Array, + parameter?: string, + protoFileList: Array, + compilerVersion: Version.AsObject, + } +} + +export class CodeGeneratorResponse extends jspb.Message { + hasError(): boolean; + clearError(): void; + getError(): string; + setError(value: string): void; + + clearFileList(): void; + getFileList(): Array; + setFileList(value: Array): void; + addFile(value?: CodeGeneratorResponse.File, index?: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CodeGeneratorResponse.AsObject; + static toObject(includeInstance: boolean, msg: CodeGeneratorResponse): CodeGeneratorResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CodeGeneratorResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CodeGeneratorResponse; + static deserializeBinaryFromReader(message: CodeGeneratorResponse, reader: jspb.BinaryReader): CodeGeneratorResponse; +} + +export namespace CodeGeneratorResponse { + export type AsObject = { + error?: string, + fileList: Array, + } + + export class File extends jspb.Message { + hasName(): boolean; + clearName(): void; + getName(): string; + setName(value: string): void; + + hasInsertionPoint(): boolean; + clearInsertionPoint(): void; + getInsertionPoint(): string; + setInsertionPoint(value: string): void; + + hasContent(): boolean; + clearContent(): void; + getContent(): string; + setContent(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): File.AsObject; + static toObject(includeInstance: boolean, msg: File): File.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: File, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): File; + static deserializeBinaryFromReader(message: File, reader: jspb.BinaryReader): File; + } + + export namespace File { + export type AsObject = { + 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 new file mode 100644 index 0000000000..920850a8d8 --- /dev/null +++ b/types/google-protobuf/google/protobuf/descriptor_pb.d.ts @@ -0,0 +1,1133 @@ +import * as jspb from "../../index"; + +export class FileDescriptorSet extends jspb.Message { + clearFileList(): void; + getFileList(): Array; + setFileList(value: Array): void; + addFile(value?: FileDescriptorProto, index?: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FileDescriptorSet.AsObject; + static toObject(includeInstance: boolean, msg: FileDescriptorSet): FileDescriptorSet.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FileDescriptorSet, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FileDescriptorSet; + static deserializeBinaryFromReader(message: FileDescriptorSet, reader: jspb.BinaryReader): FileDescriptorSet; +} + +export namespace FileDescriptorSet { + export type AsObject = { + fileList: Array, + } +} + +export class FileDescriptorProto extends jspb.Message { + hasName(): boolean; + clearName(): void; + getName(): string; + setName(value: string): void; + + hasPackage(): boolean; + clearPackage(): void; + getPackage(): string; + setPackage(value: string): void; + + clearDependencyList(): void; + getDependencyList(): Array; + setDependencyList(value: Array): void; + addDependency(value: string, index?: number): void; + + clearPublicDependencyList(): void; + getPublicDependencyList(): Array; + setPublicDependencyList(value: Array): void; + addPublicDependency(value: number, index?: number): void; + + clearWeakDependencyList(): void; + getWeakDependencyList(): Array; + setWeakDependencyList(value: Array): void; + addWeakDependency(value: number, index?: number): void; + + clearMessageTypeList(): void; + getMessageTypeList(): Array; + setMessageTypeList(value: Array): void; + addMessageType(value?: DescriptorProto, index?: number): void; + + clearEnumTypeList(): void; + getEnumTypeList(): Array; + setEnumTypeList(value: Array): void; + addEnumType(value?: EnumDescriptorProto, index?: number): void; + + clearServiceList(): void; + getServiceList(): Array; + setServiceList(value: Array): void; + addService(value?: ServiceDescriptorProto, index?: number): void; + + clearExtensionList(): void; + getExtensionList(): Array; + setExtensionList(value: Array): void; + addExtension(value?: FieldDescriptorProto, index?: number): void; + + hasOptions(): boolean; + clearOptions(): void; + getOptions(): FileOptions; + setOptions(value?: FileOptions): void; + + hasSourceCodeInfo(): boolean; + clearSourceCodeInfo(): void; + getSourceCodeInfo(): SourceCodeInfo; + setSourceCodeInfo(value?: SourceCodeInfo): void; + + hasSyntax(): boolean; + clearSyntax(): void; + getSyntax(): string; + setSyntax(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FileDescriptorProto.AsObject; + static toObject(includeInstance: boolean, msg: FileDescriptorProto): FileDescriptorProto.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FileDescriptorProto, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FileDescriptorProto; + static deserializeBinaryFromReader(message: FileDescriptorProto, reader: jspb.BinaryReader): FileDescriptorProto; +} + +export namespace FileDescriptorProto { + export type AsObject = { + name?: string, + package?: string, + dependencyList: Array, + publicDependencyList: Array, + weakDependencyList: Array, + messageTypeList: Array, + enumTypeList: Array, + serviceList: Array, + extensionList: Array, + options: FileOptions.AsObject, + sourceCodeInfo: SourceCodeInfo.AsObject, + syntax?: string, + } +} + +export class DescriptorProto extends jspb.Message { + hasName(): boolean; + clearName(): void; + getName(): string; + setName(value: string): void; + + clearFieldList(): void; + getFieldList(): Array; + setFieldList(value: Array): void; + addField(value?: FieldDescriptorProto, index?: number): void; + + clearExtensionList(): void; + getExtensionList(): Array; + setExtensionList(value: Array): void; + addExtension(value?: FieldDescriptorProto, index?: number): void; + + clearNestedTypeList(): void; + getNestedTypeList(): Array; + setNestedTypeList(value: Array): void; + addNestedType(value?: DescriptorProto, index?: number): void; + + clearEnumTypeList(): void; + getEnumTypeList(): Array; + setEnumTypeList(value: Array): void; + addEnumType(value?: EnumDescriptorProto, index?: number): void; + + clearExtensionRangeList(): void; + getExtensionRangeList(): Array; + setExtensionRangeList(value: Array): void; + addExtensionRange(value?: DescriptorProto.ExtensionRange, index?: number): void; + + clearOneofDeclList(): void; + getOneofDeclList(): Array; + setOneofDeclList(value: Array): void; + addOneofDecl(value?: OneofDescriptorProto, index?: number): void; + + hasOptions(): boolean; + clearOptions(): void; + getOptions(): MessageOptions; + setOptions(value?: MessageOptions): void; + + clearReservedRangeList(): void; + getReservedRangeList(): Array; + setReservedRangeList(value: Array): void; + addReservedRange(value?: DescriptorProto.ReservedRange, index?: number): void; + + clearReservedNameList(): void; + getReservedNameList(): Array; + setReservedNameList(value: Array): void; + addReservedName(value: string, index?: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DescriptorProto.AsObject; + static toObject(includeInstance: boolean, msg: DescriptorProto): DescriptorProto.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: DescriptorProto, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DescriptorProto; + static deserializeBinaryFromReader(message: DescriptorProto, reader: jspb.BinaryReader): DescriptorProto; +} + +export namespace DescriptorProto { + export type AsObject = { + name?: string, + fieldList: Array, + extensionList: Array, + nestedTypeList: Array, + enumTypeList: Array, + extensionRangeList: Array, + oneofDeclList: Array, + options: MessageOptions.AsObject, + reservedRangeList: Array, + reservedNameList: Array, + } + + export class ExtensionRange extends jspb.Message { + hasStart(): boolean; + clearStart(): void; + getStart(): number; + setStart(value: number): void; + + hasEnd(): boolean; + clearEnd(): void; + getEnd(): number; + setEnd(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ExtensionRange.AsObject; + static toObject(includeInstance: boolean, msg: ExtensionRange): ExtensionRange.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ExtensionRange, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ExtensionRange; + static deserializeBinaryFromReader(message: ExtensionRange, reader: jspb.BinaryReader): ExtensionRange; + } + + export namespace ExtensionRange { + export type AsObject = { + start?: number, + end?: number, + } + } + + export class ReservedRange extends jspb.Message { + hasStart(): boolean; + clearStart(): void; + getStart(): number; + setStart(value: number): void; + + hasEnd(): boolean; + clearEnd(): void; + getEnd(): number; + setEnd(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ReservedRange.AsObject; + static toObject(includeInstance: boolean, msg: ReservedRange): ReservedRange.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ReservedRange, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ReservedRange; + static deserializeBinaryFromReader(message: ReservedRange, reader: jspb.BinaryReader): ReservedRange; + } + + export namespace ReservedRange { + export type AsObject = { + start?: number, + end?: number, + } + } +} + +export class FieldDescriptorProto extends jspb.Message { + hasName(): boolean; + clearName(): void; + getName(): string; + setName(value: string): void; + + hasNumber(): boolean; + clearNumber(): void; + getNumber(): number; + setNumber(value: number): void; + + hasLabel(): boolean; + clearLabel(): void; + getLabel(): FieldDescriptorProto.Label; + setLabel(value: FieldDescriptorProto.Label): void; + + hasType(): boolean; + clearType(): void; + getType(): FieldDescriptorProto.Type; + setType(value: FieldDescriptorProto.Type): void; + + hasTypeName(): boolean; + clearTypeName(): void; + getTypeName(): string; + setTypeName(value: string): void; + + hasExtendee(): boolean; + clearExtendee(): void; + getExtendee(): string; + setExtendee(value: string): void; + + hasDefaultValue(): boolean; + clearDefaultValue(): void; + getDefaultValue(): string; + setDefaultValue(value: string): void; + + hasOneofIndex(): boolean; + clearOneofIndex(): void; + getOneofIndex(): number; + setOneofIndex(value: number): void; + + hasJsonName(): boolean; + clearJsonName(): void; + getJsonName(): string; + setJsonName(value: string): void; + + hasOptions(): boolean; + clearOptions(): void; + getOptions(): FieldOptions; + setOptions(value?: FieldOptions): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FieldDescriptorProto.AsObject; + static toObject(includeInstance: boolean, msg: FieldDescriptorProto): FieldDescriptorProto.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FieldDescriptorProto, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FieldDescriptorProto; + static deserializeBinaryFromReader(message: FieldDescriptorProto, reader: jspb.BinaryReader): FieldDescriptorProto; +} + +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, + options: FieldOptions.AsObject, + } + + export enum Type { + TYPE_DOUBLE = 1, + TYPE_FLOAT = 2, + TYPE_INT64 = 3, + TYPE_UINT64 = 4, + TYPE_INT32 = 5, + TYPE_FIXED64 = 6, + TYPE_FIXED32 = 7, + TYPE_BOOL = 8, + TYPE_STRING = 9, + TYPE_GROUP = 10, + TYPE_MESSAGE = 11, + TYPE_BYTES = 12, + TYPE_UINT32 = 13, + TYPE_ENUM = 14, + TYPE_SFIXED32 = 15, + TYPE_SFIXED64 = 16, + TYPE_SINT32 = 17, + TYPE_SINT64 = 18, + } + + export enum Label { + LABEL_OPTIONAL = 1, + LABEL_REQUIRED = 2, + LABEL_REPEATED = 3, + } +} + +export class OneofDescriptorProto extends jspb.Message { + hasName(): boolean; + clearName(): void; + getName(): string; + setName(value: string): void; + + hasOptions(): boolean; + clearOptions(): void; + getOptions(): OneofOptions; + setOptions(value?: OneofOptions): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): OneofDescriptorProto.AsObject; + static toObject(includeInstance: boolean, msg: OneofDescriptorProto): OneofDescriptorProto.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: OneofDescriptorProto, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): OneofDescriptorProto; + static deserializeBinaryFromReader(message: OneofDescriptorProto, reader: jspb.BinaryReader): OneofDescriptorProto; +} + +export namespace OneofDescriptorProto { + export type AsObject = { + name?: string, + options: OneofOptions.AsObject, + } +} + +export class EnumDescriptorProto extends jspb.Message { + hasName(): boolean; + clearName(): void; + getName(): string; + setName(value: string): void; + + clearValueList(): void; + getValueList(): Array; + setValueList(value: Array): void; + addValue(value?: EnumValueDescriptorProto, index?: number): void; + + hasOptions(): boolean; + clearOptions(): void; + getOptions(): EnumOptions; + setOptions(value?: EnumOptions): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): EnumDescriptorProto.AsObject; + static toObject(includeInstance: boolean, msg: EnumDescriptorProto): EnumDescriptorProto.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: EnumDescriptorProto, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EnumDescriptorProto; + static deserializeBinaryFromReader(message: EnumDescriptorProto, reader: jspb.BinaryReader): EnumDescriptorProto; +} + +export namespace EnumDescriptorProto { + export type AsObject = { + name?: string, + valueList: Array, + options: EnumOptions.AsObject, + } +} + +export class EnumValueDescriptorProto extends jspb.Message { + hasName(): boolean; + clearName(): void; + getName(): string; + setName(value: string): void; + + hasNumber(): boolean; + clearNumber(): void; + getNumber(): number; + setNumber(value: number): void; + + hasOptions(): boolean; + clearOptions(): void; + getOptions(): EnumValueOptions; + setOptions(value?: EnumValueOptions): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): EnumValueDescriptorProto.AsObject; + static toObject(includeInstance: boolean, msg: EnumValueDescriptorProto): EnumValueDescriptorProto.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: EnumValueDescriptorProto, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EnumValueDescriptorProto; + static deserializeBinaryFromReader(message: EnumValueDescriptorProto, reader: jspb.BinaryReader): EnumValueDescriptorProto; +} + +export namespace EnumValueDescriptorProto { + export type AsObject = { + name?: string, + number?: number, + options: EnumValueOptions.AsObject, + } +} + +export class ServiceDescriptorProto extends jspb.Message { + hasName(): boolean; + clearName(): void; + getName(): string; + setName(value: string): void; + + clearMethodList(): void; + getMethodList(): Array; + setMethodList(value: Array): void; + addMethod(value?: MethodDescriptorProto, index?: number): void; + + hasOptions(): boolean; + clearOptions(): void; + getOptions(): ServiceOptions; + setOptions(value?: ServiceOptions): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ServiceDescriptorProto.AsObject; + static toObject(includeInstance: boolean, msg: ServiceDescriptorProto): ServiceDescriptorProto.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ServiceDescriptorProto, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ServiceDescriptorProto; + static deserializeBinaryFromReader(message: ServiceDescriptorProto, reader: jspb.BinaryReader): ServiceDescriptorProto; +} + +export namespace ServiceDescriptorProto { + export type AsObject = { + name?: string, + methodList: Array, + options: ServiceOptions.AsObject, + } +} + +export class MethodDescriptorProto extends jspb.Message { + hasName(): boolean; + clearName(): void; + getName(): string; + setName(value: string): void; + + hasInputType(): boolean; + clearInputType(): void; + getInputType(): string; + setInputType(value: string): void; + + hasOutputType(): boolean; + clearOutputType(): void; + getOutputType(): string; + setOutputType(value: string): void; + + hasOptions(): boolean; + clearOptions(): void; + getOptions(): MethodOptions; + setOptions(value?: MethodOptions): void; + + hasClientStreaming(): boolean; + clearClientStreaming(): void; + getClientStreaming(): boolean; + setClientStreaming(value: boolean): void; + + hasServerStreaming(): boolean; + clearServerStreaming(): void; + getServerStreaming(): boolean; + setServerStreaming(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MethodDescriptorProto.AsObject; + static toObject(includeInstance: boolean, msg: MethodDescriptorProto): MethodDescriptorProto.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MethodDescriptorProto, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MethodDescriptorProto; + static deserializeBinaryFromReader(message: MethodDescriptorProto, reader: jspb.BinaryReader): MethodDescriptorProto; +} + +export namespace MethodDescriptorProto { + export type AsObject = { + name?: string, + inputType?: string, + outputType?: string, + options: MethodOptions.AsObject, + clientStreaming?: boolean, + serverStreaming?: boolean, + } +} + +export class FileOptions extends jspb.Message { + hasJavaPackage(): boolean; + clearJavaPackage(): void; + getJavaPackage(): string; + setJavaPackage(value: string): void; + + hasJavaOuterClassname(): boolean; + clearJavaOuterClassname(): void; + getJavaOuterClassname(): string; + setJavaOuterClassname(value: string): void; + + hasJavaMultipleFiles(): boolean; + clearJavaMultipleFiles(): void; + getJavaMultipleFiles(): boolean; + setJavaMultipleFiles(value: boolean): void; + + hasJavaGenerateEqualsAndHash(): boolean; + clearJavaGenerateEqualsAndHash(): void; + getJavaGenerateEqualsAndHash(): boolean; + setJavaGenerateEqualsAndHash(value: boolean): void; + + hasJavaStringCheckUtf8(): boolean; + clearJavaStringCheckUtf8(): void; + getJavaStringCheckUtf8(): boolean; + setJavaStringCheckUtf8(value: boolean): void; + + hasOptimizeFor(): boolean; + clearOptimizeFor(): void; + getOptimizeFor(): FileOptions.OptimizeMode; + setOptimizeFor(value: FileOptions.OptimizeMode): void; + + hasGoPackage(): boolean; + clearGoPackage(): void; + getGoPackage(): string; + setGoPackage(value: string): void; + + hasCcGenericServices(): boolean; + clearCcGenericServices(): void; + getCcGenericServices(): boolean; + setCcGenericServices(value: boolean): void; + + hasJavaGenericServices(): boolean; + clearJavaGenericServices(): void; + getJavaGenericServices(): boolean; + setJavaGenericServices(value: boolean): void; + + hasPyGenericServices(): boolean; + clearPyGenericServices(): void; + getPyGenericServices(): boolean; + setPyGenericServices(value: boolean): void; + + hasDeprecated(): boolean; + clearDeprecated(): void; + getDeprecated(): boolean; + setDeprecated(value: boolean): void; + + hasCcEnableArenas(): boolean; + clearCcEnableArenas(): void; + getCcEnableArenas(): boolean; + setCcEnableArenas(value: boolean): void; + + hasObjcClassPrefix(): boolean; + clearObjcClassPrefix(): void; + getObjcClassPrefix(): string; + setObjcClassPrefix(value: string): void; + + hasCsharpNamespace(): boolean; + clearCsharpNamespace(): void; + getCsharpNamespace(): string; + setCsharpNamespace(value: string): void; + + hasSwiftPrefix(): boolean; + clearSwiftPrefix(): void; + getSwiftPrefix(): string; + setSwiftPrefix(value: string): void; + + clearUninterpretedOptionList(): void; + getUninterpretedOptionList(): Array; + setUninterpretedOptionList(value: Array): void; + addUninterpretedOption(value?: UninterpretedOption, index?: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FileOptions.AsObject; + static toObject(includeInstance: boolean, msg: FileOptions): FileOptions.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FileOptions, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FileOptions; + static deserializeBinaryFromReader(message: FileOptions, reader: jspb.BinaryReader): FileOptions; +} + +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, + uninterpretedOptionList: Array, + } + + export enum OptimizeMode { + SPEED = 1, + CODE_SIZE = 2, + LITE_RUNTIME = 3, + } +} + +export class MessageOptions extends jspb.Message { + hasMessageSetWireFormat(): boolean; + clearMessageSetWireFormat(): void; + getMessageSetWireFormat(): boolean; + setMessageSetWireFormat(value: boolean): void; + + hasNoStandardDescriptorAccessor(): boolean; + clearNoStandardDescriptorAccessor(): void; + getNoStandardDescriptorAccessor(): boolean; + setNoStandardDescriptorAccessor(value: boolean): void; + + hasDeprecated(): boolean; + clearDeprecated(): void; + getDeprecated(): boolean; + setDeprecated(value: boolean): void; + + hasMapEntry(): boolean; + clearMapEntry(): void; + getMapEntry(): boolean; + setMapEntry(value: boolean): void; + + clearUninterpretedOptionList(): void; + getUninterpretedOptionList(): Array; + setUninterpretedOptionList(value: Array): void; + addUninterpretedOption(value?: UninterpretedOption, index?: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MessageOptions.AsObject; + static toObject(includeInstance: boolean, msg: MessageOptions): MessageOptions.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MessageOptions, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MessageOptions; + static deserializeBinaryFromReader(message: MessageOptions, reader: jspb.BinaryReader): MessageOptions; +} + +export namespace MessageOptions { + export type AsObject = { + messageSetWireFormat?: boolean, + noStandardDescriptorAccessor?: boolean, + deprecated?: boolean, + mapEntry?: boolean, + uninterpretedOptionList: Array, + } +} + +export class FieldOptions extends jspb.Message { + hasCtype(): boolean; + clearCtype(): void; + getCtype(): FieldOptions.CType; + setCtype(value: FieldOptions.CType): void; + + hasPacked(): boolean; + clearPacked(): void; + getPacked(): boolean; + setPacked(value: boolean): void; + + hasJstype(): boolean; + clearJstype(): void; + getJstype(): FieldOptions.JSType; + setJstype(value: FieldOptions.JSType): void; + + hasLazy(): boolean; + clearLazy(): void; + getLazy(): boolean; + setLazy(value: boolean): void; + + hasDeprecated(): boolean; + clearDeprecated(): void; + getDeprecated(): boolean; + setDeprecated(value: boolean): void; + + hasWeak(): boolean; + clearWeak(): void; + getWeak(): boolean; + setWeak(value: boolean): void; + + clearUninterpretedOptionList(): void; + getUninterpretedOptionList(): Array; + setUninterpretedOptionList(value: Array): void; + addUninterpretedOption(value?: UninterpretedOption, index?: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FieldOptions.AsObject; + static toObject(includeInstance: boolean, msg: FieldOptions): FieldOptions.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FieldOptions, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FieldOptions; + static deserializeBinaryFromReader(message: FieldOptions, reader: jspb.BinaryReader): FieldOptions; +} + +export namespace FieldOptions { + export type AsObject = { + ctype?: FieldOptions.CType, + packed?: boolean, + jstype?: FieldOptions.JSType, + lazy?: boolean, + deprecated?: boolean, + weak?: boolean, + uninterpretedOptionList: Array, + } + + export enum CType { + STRING = 0, + CORD = 1, + STRING_PIECE = 2, + } + + export enum JSType { + JS_NORMAL = 0, + JS_STRING = 1, + JS_NUMBER = 2, + } +} + +export class OneofOptions extends jspb.Message { + clearUninterpretedOptionList(): void; + getUninterpretedOptionList(): Array; + setUninterpretedOptionList(value: Array): void; + addUninterpretedOption(value?: UninterpretedOption, index?: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): OneofOptions.AsObject; + static toObject(includeInstance: boolean, msg: OneofOptions): OneofOptions.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: OneofOptions, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): OneofOptions; + static deserializeBinaryFromReader(message: OneofOptions, reader: jspb.BinaryReader): OneofOptions; +} + +export namespace OneofOptions { + export type AsObject = { + uninterpretedOptionList: Array, + } +} + +export class EnumOptions extends jspb.Message { + hasAllowAlias(): boolean; + clearAllowAlias(): void; + getAllowAlias(): boolean; + setAllowAlias(value: boolean): void; + + hasDeprecated(): boolean; + clearDeprecated(): void; + getDeprecated(): boolean; + setDeprecated(value: boolean): void; + + clearUninterpretedOptionList(): void; + getUninterpretedOptionList(): Array; + setUninterpretedOptionList(value: Array): void; + addUninterpretedOption(value?: UninterpretedOption, index?: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): EnumOptions.AsObject; + static toObject(includeInstance: boolean, msg: EnumOptions): EnumOptions.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: EnumOptions, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EnumOptions; + static deserializeBinaryFromReader(message: EnumOptions, reader: jspb.BinaryReader): EnumOptions; +} + +export namespace EnumOptions { + export type AsObject = { + allowAlias?: boolean, + deprecated?: boolean, + uninterpretedOptionList: Array, + } +} + +export class EnumValueOptions extends jspb.Message { + hasDeprecated(): boolean; + clearDeprecated(): void; + getDeprecated(): boolean; + setDeprecated(value: boolean): void; + + clearUninterpretedOptionList(): void; + getUninterpretedOptionList(): Array; + setUninterpretedOptionList(value: Array): void; + addUninterpretedOption(value?: UninterpretedOption, index?: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): EnumValueOptions.AsObject; + static toObject(includeInstance: boolean, msg: EnumValueOptions): EnumValueOptions.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: EnumValueOptions, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EnumValueOptions; + static deserializeBinaryFromReader(message: EnumValueOptions, reader: jspb.BinaryReader): EnumValueOptions; +} + +export namespace EnumValueOptions { + export type AsObject = { + deprecated?: boolean, + uninterpretedOptionList: Array, + } +} + +export class ServiceOptions extends jspb.Message { + hasDeprecated(): boolean; + clearDeprecated(): void; + getDeprecated(): boolean; + setDeprecated(value: boolean): void; + + clearUninterpretedOptionList(): void; + getUninterpretedOptionList(): Array; + setUninterpretedOptionList(value: Array): void; + addUninterpretedOption(value?: UninterpretedOption, index?: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ServiceOptions.AsObject; + static toObject(includeInstance: boolean, msg: ServiceOptions): ServiceOptions.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ServiceOptions, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ServiceOptions; + static deserializeBinaryFromReader(message: ServiceOptions, reader: jspb.BinaryReader): ServiceOptions; +} + +export namespace ServiceOptions { + export type AsObject = { + deprecated?: boolean, + uninterpretedOptionList: Array, + } +} + +export class MethodOptions extends jspb.Message { + hasDeprecated(): boolean; + clearDeprecated(): void; + getDeprecated(): boolean; + setDeprecated(value: boolean): void; + + hasIdempotencyLevel(): boolean; + clearIdempotencyLevel(): void; + getIdempotencyLevel(): MethodOptions.IdempotencyLevel; + setIdempotencyLevel(value: MethodOptions.IdempotencyLevel): void; + + clearUninterpretedOptionList(): void; + getUninterpretedOptionList(): Array; + setUninterpretedOptionList(value: Array): void; + addUninterpretedOption(value?: UninterpretedOption, index?: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MethodOptions.AsObject; + static toObject(includeInstance: boolean, msg: MethodOptions): MethodOptions.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MethodOptions, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MethodOptions; + static deserializeBinaryFromReader(message: MethodOptions, reader: jspb.BinaryReader): MethodOptions; +} + +export namespace MethodOptions { + export type AsObject = { + deprecated?: boolean, + idempotencyLevel?: MethodOptions.IdempotencyLevel, + uninterpretedOptionList: Array, + } + + export enum IdempotencyLevel { + IDEMPOTENCY_UNKNOWN = 0, + NO_SIDE_EFFECTS = 1, + IDEMPOTENT = 2, + } +} + +export class UninterpretedOption extends jspb.Message { + clearNameList(): void; + getNameList(): Array; + setNameList(value: Array): void; + addName(value?: UninterpretedOption.NamePart, index?: number): void; + + hasIdentifierValue(): boolean; + clearIdentifierValue(): void; + getIdentifierValue(): string; + setIdentifierValue(value: string): void; + + hasPositiveIntValue(): boolean; + clearPositiveIntValue(): void; + getPositiveIntValue(): number; + setPositiveIntValue(value: number): void; + + hasNegativeIntValue(): boolean; + clearNegativeIntValue(): void; + getNegativeIntValue(): number; + setNegativeIntValue(value: number): void; + + hasDoubleValue(): boolean; + clearDoubleValue(): void; + getDoubleValue(): number; + setDoubleValue(value: number): void; + + hasStringValue(): boolean; + clearStringValue(): void; + getStringValue(): Uint8Array | string; + getStringValue_asU8(): Uint8Array; + getStringValue_asB64(): string; + setStringValue(value: Uint8Array | string): void; + + hasAggregateValue(): boolean; + clearAggregateValue(): void; + getAggregateValue(): string; + setAggregateValue(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UninterpretedOption.AsObject; + static toObject(includeInstance: boolean, msg: UninterpretedOption): UninterpretedOption.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: UninterpretedOption, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UninterpretedOption; + static deserializeBinaryFromReader(message: UninterpretedOption, reader: jspb.BinaryReader): UninterpretedOption; +} + +export namespace UninterpretedOption { + export type AsObject = { + nameList: Array, + identifierValue?: string, + positiveIntValue?: number, + negativeIntValue?: number, + doubleValue?: number, + stringValue: Uint8Array | string, + aggregateValue?: string, + } + + export class NamePart extends jspb.Message { + hasNamePart(): boolean; + clearNamePart(): void; + getNamePart(): string; + setNamePart(value: string): void; + + hasIsExtension(): boolean; + clearIsExtension(): void; + getIsExtension(): boolean; + setIsExtension(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): NamePart.AsObject; + static toObject(includeInstance: boolean, msg: NamePart): NamePart.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: NamePart, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): NamePart; + static deserializeBinaryFromReader(message: NamePart, reader: jspb.BinaryReader): NamePart; + } + + export namespace NamePart { + export type AsObject = { + namePart?: string, + isExtension?: boolean, + } + } +} + +export class SourceCodeInfo extends jspb.Message { + clearLocationList(): void; + getLocationList(): Array; + setLocationList(value: Array): void; + addLocation(value?: SourceCodeInfo.Location, index?: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SourceCodeInfo.AsObject; + static toObject(includeInstance: boolean, msg: SourceCodeInfo): SourceCodeInfo.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SourceCodeInfo, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SourceCodeInfo; + static deserializeBinaryFromReader(message: SourceCodeInfo, reader: jspb.BinaryReader): SourceCodeInfo; +} + +export namespace SourceCodeInfo { + export type AsObject = { + locationList: Array, + } + + export class Location extends jspb.Message { + clearPathList(): void; + getPathList(): Array; + setPathList(value: Array): void; + addPath(value: number, index?: number): void; + + clearSpanList(): void; + getSpanList(): Array; + setSpanList(value: Array): void; + addSpan(value: number, index?: number): void; + + hasLeadingComments(): boolean; + clearLeadingComments(): void; + getLeadingComments(): string; + setLeadingComments(value: string): void; + + hasTrailingComments(): boolean; + clearTrailingComments(): void; + getTrailingComments(): string; + setTrailingComments(value: string): void; + + clearLeadingDetachedCommentsList(): void; + getLeadingDetachedCommentsList(): Array; + setLeadingDetachedCommentsList(value: Array): void; + addLeadingDetachedComments(value: string, index?: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Location.AsObject; + static toObject(includeInstance: boolean, msg: Location): Location.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Location, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Location; + static deserializeBinaryFromReader(message: Location, reader: jspb.BinaryReader): Location; + } + + export namespace Location { + export type AsObject = { + pathList: Array, + spanList: Array, + leadingComments?: string, + trailingComments?: string, + leadingDetachedCommentsList: Array, + } + } +} + +export class GeneratedCodeInfo extends jspb.Message { + clearAnnotationList(): void; + getAnnotationList(): Array; + setAnnotationList(value: Array): void; + addAnnotation(value?: GeneratedCodeInfo.Annotation, index?: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GeneratedCodeInfo.AsObject; + static toObject(includeInstance: boolean, msg: GeneratedCodeInfo): GeneratedCodeInfo.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GeneratedCodeInfo, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GeneratedCodeInfo; + static deserializeBinaryFromReader(message: GeneratedCodeInfo, reader: jspb.BinaryReader): GeneratedCodeInfo; +} + +export namespace GeneratedCodeInfo { + export type AsObject = { + annotationList: Array, + } + + export class Annotation extends jspb.Message { + clearPathList(): void; + getPathList(): Array; + setPathList(value: Array): void; + addPath(value: number, index?: number): void; + + hasSourceFile(): boolean; + clearSourceFile(): void; + getSourceFile(): string; + setSourceFile(value: string): void; + + hasBegin(): boolean; + clearBegin(): void; + getBegin(): number; + setBegin(value: number): void; + + hasEnd(): boolean; + clearEnd(): void; + getEnd(): number; + setEnd(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Annotation.AsObject; + static toObject(includeInstance: boolean, msg: Annotation): Annotation.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Annotation, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Annotation; + static deserializeBinaryFromReader(message: Annotation, reader: jspb.BinaryReader): Annotation; + } + + export namespace Annotation { + export type AsObject = { + pathList: Array, + sourceFile?: string, + begin?: number, + end?: number, + } + } +} + diff --git a/types/google-protobuf/google/protobuf/duration_pb.d.ts b/types/google-protobuf/google/protobuf/duration_pb.d.ts new file mode 100644 index 0000000000..29b39ae965 --- /dev/null +++ b/types/google-protobuf/google/protobuf/duration_pb.d.ts @@ -0,0 +1,26 @@ +import * as jspb from "../../index"; + +export class Duration extends jspb.Message { + getSeconds(): number; + setSeconds(value: number): void; + + getNanos(): number; + setNanos(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Duration.AsObject; + static toObject(includeInstance: boolean, msg: Duration): Duration.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Duration, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Duration; + static deserializeBinaryFromReader(message: Duration, reader: jspb.BinaryReader): Duration; +} + +export namespace Duration { + export type AsObject = { + seconds: number, + nanos: number, + } +} + diff --git a/types/google-protobuf/google/protobuf/empty_pb.d.ts b/types/google-protobuf/google/protobuf/empty_pb.d.ts new file mode 100644 index 0000000000..69de4641d9 --- /dev/null +++ b/types/google-protobuf/google/protobuf/empty_pb.d.ts @@ -0,0 +1,18 @@ +import * as jspb from "../../index"; + +export class Empty extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Empty.AsObject; + static toObject(includeInstance: boolean, msg: Empty): Empty.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Empty, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Empty; + static deserializeBinaryFromReader(message: Empty, reader: jspb.BinaryReader): Empty; +} + +export namespace Empty { + export type AsObject = { + } +} + diff --git a/types/google-protobuf/google/protobuf/field_mask_pb.d.ts b/types/google-protobuf/google/protobuf/field_mask_pb.d.ts new file mode 100644 index 0000000000..d0c4caf2aa --- /dev/null +++ b/types/google-protobuf/google/protobuf/field_mask_pb.d.ts @@ -0,0 +1,24 @@ +import * as jspb from "../../index"; + +export class FieldMask extends jspb.Message { + clearPathsList(): void; + getPathsList(): Array; + setPathsList(value: Array): void; + addPaths(value: string, index?: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FieldMask.AsObject; + static toObject(includeInstance: boolean, msg: FieldMask): FieldMask.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FieldMask, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FieldMask; + static deserializeBinaryFromReader(message: FieldMask, reader: jspb.BinaryReader): FieldMask; +} + +export namespace FieldMask { + export type AsObject = { + pathsList: Array, + } +} + diff --git a/types/google-protobuf/google/protobuf/source_context_pb.d.ts b/types/google-protobuf/google/protobuf/source_context_pb.d.ts new file mode 100644 index 0000000000..934b9a2636 --- /dev/null +++ b/types/google-protobuf/google/protobuf/source_context_pb.d.ts @@ -0,0 +1,22 @@ +import * as jspb from "../../index"; + +export class SourceContext extends jspb.Message { + getFileName(): string; + setFileName(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SourceContext.AsObject; + static toObject(includeInstance: boolean, msg: SourceContext): SourceContext.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SourceContext, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SourceContext; + static deserializeBinaryFromReader(message: SourceContext, reader: jspb.BinaryReader): SourceContext; +} + +export namespace SourceContext { + export type AsObject = { + fileName: string, + } +} + diff --git a/types/google-protobuf/google/protobuf/struct_pb.d.ts b/types/google-protobuf/google/protobuf/struct_pb.d.ts new file mode 100644 index 0000000000..ed033e91ce --- /dev/null +++ b/types/google-protobuf/google/protobuf/struct_pb.d.ts @@ -0,0 +1,122 @@ +import * as jspb from "../../index"; + +export class Struct extends jspb.Message { + getFieldsMap(): jspb.Map; + clearFieldsMap(): void; + + toJavaScript(): {[key: string]: JavaScriptValue}; + static fromJavaScript(value: {[key: string]: JavaScriptValue}): Struct; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Struct.AsObject; + static toObject(includeInstance: boolean, msg: Struct): Struct.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Struct, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Struct; + static deserializeBinaryFromReader(message: Struct, reader: jspb.BinaryReader): Struct; +} + +export namespace Struct { + export type AsObject = { + fieldsMap: Array<[string, Value.AsObject]>, + } +} + +export class Value extends jspb.Message { + hasNullValue(): boolean; + clearNullValue(): void; + getNullValue(): NullValue; + setNullValue(value: NullValue): void; + + hasNumberValue(): boolean; + clearNumberValue(): void; + getNumberValue(): number; + setNumberValue(value: number): void; + + hasStringValue(): boolean; + clearStringValue(): void; + getStringValue(): string; + setStringValue(value: string): void; + + hasBoolValue(): boolean; + clearBoolValue(): void; + getBoolValue(): boolean; + setBoolValue(value: boolean): void; + + hasStructValue(): boolean; + clearStructValue(): void; + getStructValue(): Struct | undefined; + setStructValue(value?: Struct): void; + + hasListValue(): boolean; + clearListValue(): void; + getListValue(): ListValue | undefined; + setListValue(value?: ListValue): void; + + getKindCase(): Value.KindCase; + + toJavaScript(): JavaScriptValue; + static fromJavaScript(value: JavaScriptValue): Value; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Value.AsObject; + static toObject(includeInstance: boolean, msg: Value): Value.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Value, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Value; + static deserializeBinaryFromReader(message: Value, reader: jspb.BinaryReader): Value; +} + +export namespace Value { + export type AsObject = { + nullValue: NullValue, + numberValue: number, + stringValue: string, + boolValue: boolean, + structValue?: Struct.AsObject, + listValue?: ListValue.AsObject, + } + + export enum KindCase { + KIND_NOT_SET = 0, + NULL_VALUE = 1, + NUMBER_VALUE = 2, + STRING_VALUE = 3, + BOOL_VALUE = 4, + STRUCT_VALUE = 5, + LIST_VALUE = 6, + } +} + +export class ListValue extends jspb.Message { + clearValuesList(): void; + getValuesList(): Array; + setValuesList(value: Array): void; + addValues(value?: Value, index?: number): void; + + toJavaScript(): Array; + static fromJavaScript(value: Array): ListValue; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListValue.AsObject; + static toObject(includeInstance: boolean, msg: ListValue): ListValue.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ListValue, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListValue; + static deserializeBinaryFromReader(message: ListValue, reader: jspb.BinaryReader): ListValue; +} + +export namespace ListValue { + export type AsObject = { + valuesList: Array, + } +} + +export enum NullValue { + NULL_VALUE = 0, +} + +export type JavaScriptValue = null | number | string | boolean | Array | {}; diff --git a/types/google-protobuf/google/protobuf/timestamp_pb.d.ts b/types/google-protobuf/google/protobuf/timestamp_pb.d.ts new file mode 100644 index 0000000000..2fadf11ad2 --- /dev/null +++ b/types/google-protobuf/google/protobuf/timestamp_pb.d.ts @@ -0,0 +1,29 @@ +import * as jspb from "../../index"; + +export class Timestamp extends jspb.Message { + getSeconds(): number; + setSeconds(value: number): void; + + getNanos(): number; + setNanos(value: number): void; + + toDate(): Date; + fromDate(date: Date): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Timestamp.AsObject; + static toObject(includeInstance: boolean, msg: Timestamp): Timestamp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Timestamp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Timestamp; + static deserializeBinaryFromReader(message: Timestamp, reader: jspb.BinaryReader): Timestamp; +} + +export namespace Timestamp { + export type AsObject = { + seconds: number, + nanos: number, + } +} + diff --git a/types/google-protobuf/google/protobuf/type_pb.d.ts b/types/google-protobuf/google/protobuf/type_pb.d.ts new file mode 100644 index 0000000000..cb330a9318 --- /dev/null +++ b/types/google-protobuf/google/protobuf/type_pb.d.ts @@ -0,0 +1,241 @@ +import * as jspb from "../../index"; +import * as google_protobuf_any_pb from "./any_pb"; +import * as google_protobuf_source_context_pb from "./source_context_pb"; + +export class Type extends jspb.Message { + getName(): string; + setName(value: string): void; + + clearFieldsList(): void; + getFieldsList(): Array; + setFieldsList(value: Array): void; + addFields(value?: Field, index?: number): void; + + clearOneofsList(): void; + getOneofsList(): Array; + setOneofsList(value: Array): void; + addOneofs(value: string, index?: number): void; + + clearOptionsList(): void; + getOptionsList(): Array
{this.props.data} + const url = "speakers/" + this.props.rowData.test + "/" + this.props.data; + return {this.props.data}; } } const StatelessFunctionComponent = (props: CustomColumnComponentProps) => { - var url = "speakers/" + props.rowData.test + "/" + props.data; - return {props.data} + const url = "speakers/" + props.rowData.test + "/" + props.data; + return {props.data}; }; -var columnMeta = [ +const columnMeta = [ { columnName: "name", order: 1, @@ -33,7 +33,7 @@ var columnMeta = [ customComponent: StatelessFunctionComponent }]; -var results: MyCustomResult[] = [ +const results: MyCustomResult[] = [ { name: 'David Hara', test: 'blah' @@ -44,7 +44,7 @@ var results: MyCustomResult[] = [ } ]; -var rowMetaData = { +const rowMetaData = { bodyCssClassName: (rowData: MyCustomResult) => { return rowData.test; } @@ -54,7 +54,7 @@ class CustomColumnComponentGrid extends React.Component { render() { type TypedGriddle = new () => Griddle; const TypedGriddle = Griddle as TypedGriddle; - + return ( { }; } -export default CustomColumnComponentGrid; \ No newline at end of file +export default CustomColumnComponentGrid; diff --git a/griddle-react/test/CustomFilterComponent.tsx b/types/griddle-react/test/CustomFilterComponent.tsx similarity index 82% rename from griddle-react/test/CustomFilterComponent.tsx rename to types/griddle-react/test/CustomFilterComponent.tsx index e7508887f5..3de40132f1 100644 --- a/griddle-react/test/CustomFilterComponent.tsx +++ b/types/griddle-react/test/CustomFilterComponent.tsx @@ -10,7 +10,6 @@ import Griddle, { CustomFilterComponentProps } from 'griddle-react'; const CustomFilterFunction = (items: ResultType[], query: string): ResultType[] => { return _.filter(items, (item) => { - let match = false; _.forIn(item, (value, key) => { if (String(value).toLowerCase().indexOf(query.toLowerCase()) >= 0) { @@ -53,30 +52,29 @@ interface ResultType { favoriteNumber: number; } -var someData: ResultType[] = [ +const someData: ResultType[] = [ { - "id": 0, - "name": "Mayer Leonard", - "city": "Kapowsin", - "state": "Hawaii", - "country": "United Kingdom", - "company": "Ovolo", - "favoriteNumber": 7 + id: 0, + name: "Mayer Leonard", + city: "Kapowsin", + state: "Hawaii", + country: "United Kingdom", + company: "Ovolo", + favoriteNumber: 7 }, { - "id": 1, - "name": "Koch Becker", - "city": "Johnsonburg", - "state": "New Jersey", - "country": "Madagascar", - "company": "Eventage", - "favoriteNumber": 2 + id: 1, + name: "Koch Becker", + city: "Johnsonburg", + state: "New Jersey", + country: "Madagascar", + company: "Eventage", + favoriteNumber: 2 } ]; class CustomFilterComponentGrid extends React.Component { render() { - type TypedGriddle = new () => Griddle; const TypedGriddle = Griddle as TypedGriddle; diff --git a/griddle-react/test/CustomHeaderComponent.tsx b/types/griddle-react/test/CustomHeaderComponent.tsx similarity index 79% rename from griddle-react/test/CustomHeaderComponent.tsx rename to types/griddle-react/test/CustomHeaderComponent.tsx index aed7d348aa..af9d1d6ea3 100644 --- a/griddle-react/test/CustomHeaderComponent.tsx +++ b/types/griddle-react/test/CustomHeaderComponent.tsx @@ -17,7 +17,7 @@ class HeaderComponent extends React.Component) { - this.props.filterByColumn(e.currentTarget.value, this.props.columnName) + this.props.filterByColumn(e.currentTarget.value, this.props.columnName); } render() { @@ -40,28 +40,28 @@ interface ResultType { favoriteNumber: number; } -var someData: ResultType[] = [ +const someData: ResultType[] = [ { - "id": 0, - "name": "Mayer Leonard", - "city": "Kapowsin", - "state": "Hawaii", - "country": "United Kingdom", - "company": "Ovolo", - "favoriteNumber": 7 + id: 0, + name: "Mayer Leonard", + city: "Kapowsin", + state: "Hawaii", + country: "United Kingdom", + company: "Ovolo", + favoriteNumber: 7 }, { - "id": 1, - "name": "Koch Becker", - "city": "Johnsonburg", - "state": "New Jersey", - "country": "Madagascar", - "company": "Eventage", - "favoriteNumber": 2 + id: 1, + name: "Koch Becker", + city: "Johnsonburg", + state: "New Jersey", + country: "Madagascar", + company: "Eventage", + favoriteNumber: 2 } ]; -var columnMeta: ColumnMetaData[] = [ +const columnMeta: Array> = [ { columnName: 'name', order: 1, @@ -82,7 +82,6 @@ var columnMeta: ColumnMetaData[] = [ class CustomHeaderComponentGrid extends React.Component { render() { - type TypedGriddle = new () => Griddle; const TypedGriddle = Griddle as TypedGriddle; diff --git a/griddle-react/griddle-react-tests.tsx b/types/griddle-react/test/index.tsx similarity index 73% rename from griddle-react/griddle-react-tests.tsx rename to types/griddle-react/test/index.tsx index 5f241feeb5..3e0b1c76ff 100644 --- a/griddle-react/griddle-react-tests.tsx +++ b/types/griddle-react/test/index.tsx @@ -7,28 +7,28 @@ Copyright (c) 2016 David Hara import * as React from 'react'; import { render } from 'react-dom'; import Griddle, { CustomColumnComponentProps } from 'griddle-react'; -import CustomColumnComponentGrid from './test/CustomColumnComponent'; -import CustomHeaderComponentGrid from './test/CustomHeaderComponent'; -import CustomFilterComponentGrid from './test/CustomFilterComponent'; +import CustomColumnComponentGrid from './CustomColumnComponent'; +import CustomHeaderComponentGrid from './CustomHeaderComponent'; +import CustomFilterComponentGrid from './CustomFilterComponent'; interface MyCustomResult { - name: string, - test: string + name: string; + test: string; } class LinkComponent extends React.Component, any> { render() { - var url = "speakers/" + this.props.rowData.test + "/" + this.props.data; - return {this.props.data} + const url = "speakers/" + this.props.rowData.test + "/" + this.props.data; + return {this.props.data}; } } const StatelessFunctionComponent = (props: CustomColumnComponentProps) => { - var url = "speakers/" + props.rowData.test + "/" + props.data; - return {props.data} + const url = "speakers/" + props.rowData.test + "/" + props.data; + return {props.data}; }; -var columnMeta = [ +const columnMeta = [ { columnName: "name", order: 1, @@ -37,7 +37,7 @@ var columnMeta = [ customComponent: StatelessFunctionComponent }]; -var results: MyCustomResult[] = [ +const results: MyCustomResult[] = [ { name: 'David Hara', test: 'blah' @@ -48,7 +48,7 @@ var results: MyCustomResult[] = [ } ]; -var rowMetaData = { +const rowMetaData = { bodyCssClassName: (rowData: MyCustomResult) => { return rowData.test; } diff --git a/griddle-react/tsconfig.json b/types/griddle-react/tsconfig.json similarity index 94% rename from griddle-react/tsconfig.json rename to types/griddle-react/tsconfig.json index 5dd6f9d98b..3de8b9abda 100644 --- a/griddle-react/tsconfig.json +++ b/types/griddle-react/tsconfig.json @@ -19,7 +19,7 @@ }, "files": [ "index.d.ts", - "griddle-react-tests.tsx", + "test/index.tsx", "test/CustomColumnComponent.tsx", "test/CustomFilterComponent.tsx", "test/CustomHeaderComponent.tsx" diff --git a/griddle-react/tslint.json b/types/griddle-react/tslint.json similarity index 100% rename from griddle-react/tslint.json rename to types/griddle-react/tslint.json diff --git a/gridfs-stream/gridfs-stream-tests.ts b/types/gridfs-stream/gridfs-stream-tests.ts similarity index 100% rename from gridfs-stream/gridfs-stream-tests.ts rename to types/gridfs-stream/gridfs-stream-tests.ts diff --git a/gridfs-stream/index.d.ts b/types/gridfs-stream/index.d.ts similarity index 100% rename from gridfs-stream/index.d.ts rename to types/gridfs-stream/index.d.ts diff --git a/gridfs-stream/tsconfig.json b/types/gridfs-stream/tsconfig.json similarity index 100% rename from gridfs-stream/tsconfig.json rename to types/gridfs-stream/tsconfig.json diff --git a/gridstack/gridstack-tests.ts b/types/gridstack/gridstack-tests.ts similarity index 55% rename from gridstack/gridstack-tests.ts rename to types/gridstack/gridstack-tests.ts index 96aa14b19f..9330d2019e 100644 --- a/gridstack/gridstack-tests.ts +++ b/types/gridstack/gridstack-tests.ts @@ -4,13 +4,17 @@ // Type definitions for Gridstack // Project: http://troolee.github.io/gridstack.js/ -// Definitions by: Pascal Senn +// Definitions by: Pascal Senn , Ricky Blankenaufulland // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped var options = { float: true }; -var gridstack:GridStack = $(document).gridstack(options); +var element: JQuery = $(document).gridstack(options); +var gridstack: GridStack = $(document).data("gridstack"); +var gsFromElement: GridStack = element.data("gridstack"); + +if (gridstack !== gsFromElement) throw Error('These should match!'); gridstack.addWidget("test", 1, 2, 3, 4, true); gridstack.batchUpdate(); diff --git a/gridstack/index.d.ts b/types/gridstack/index.d.ts similarity index 97% rename from gridstack/index.d.ts rename to types/gridstack/index.d.ts index 12c3600f6a..8d912e3a33 100644 --- a/gridstack/index.d.ts +++ b/types/gridstack/index.d.ts @@ -1,10 +1,11 @@ // Type definitions for Gridstack // Project: http://troolee.github.io/gridstack.js/ -// Definitions by: Pascal Senn +// Definitions by: Pascal Senn , Ricky Blankenaufulland // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped interface JQuery { - gridstack (options: IGridstackOptions):GridStack + gridstack (options: IGridstackOptions): JQuery; + data(key: "gridstack"): GridStack; } interface GridStack { diff --git a/gridstack/tsconfig.json b/types/gridstack/tsconfig.json similarity index 100% rename from gridstack/tsconfig.json rename to types/gridstack/tsconfig.json diff --git a/grunt/grunt-tests.ts b/types/grunt/grunt-tests.ts similarity index 100% rename from grunt/grunt-tests.ts rename to types/grunt/grunt-tests.ts diff --git a/grunt/index.d.ts b/types/grunt/index.d.ts similarity index 100% rename from grunt/index.d.ts rename to types/grunt/index.d.ts diff --git a/grunt/tsconfig.json b/types/grunt/tsconfig.json similarity index 100% rename from grunt/tsconfig.json rename to types/grunt/tsconfig.json diff --git a/gsap/Animation.d.ts b/types/gsap/Animation.d.ts similarity index 100% rename from gsap/Animation.d.ts rename to types/gsap/Animation.d.ts diff --git a/gsap/Ease.d.ts b/types/gsap/Ease.d.ts similarity index 100% rename from gsap/Ease.d.ts rename to types/gsap/Ease.d.ts diff --git a/gsap/Plugins.d.ts b/types/gsap/Plugins.d.ts similarity index 100% rename from gsap/Plugins.d.ts rename to types/gsap/Plugins.d.ts diff --git a/gsap/Timeline.d.ts b/types/gsap/Timeline.d.ts similarity index 100% rename from gsap/Timeline.d.ts rename to types/gsap/Timeline.d.ts diff --git a/gsap/Tween.d.ts b/types/gsap/Tween.d.ts similarity index 100% rename from gsap/Tween.d.ts rename to types/gsap/Tween.d.ts diff --git a/gsap/TweenConfig.d.ts b/types/gsap/TweenConfig.d.ts similarity index 100% rename from gsap/TweenConfig.d.ts rename to types/gsap/TweenConfig.d.ts diff --git a/gsap/gsap-tests.ts b/types/gsap/gsap-tests.ts similarity index 100% rename from gsap/gsap-tests.ts rename to types/gsap/gsap-tests.ts diff --git a/gsap/index.d.ts b/types/gsap/index.d.ts similarity index 100% rename from gsap/index.d.ts rename to types/gsap/index.d.ts diff --git a/gsap/tsconfig.json b/types/gsap/tsconfig.json similarity index 100% rename from gsap/tsconfig.json rename to types/gsap/tsconfig.json diff --git a/gsap/tslint.json b/types/gsap/tslint.json similarity index 100% rename from gsap/tslint.json rename to types/gsap/tslint.json diff --git a/gulp-angular-templatecache/gulp-angular-templatecache-tests.ts b/types/gulp-angular-templatecache/gulp-angular-templatecache-tests.ts similarity index 100% rename from gulp-angular-templatecache/gulp-angular-templatecache-tests.ts rename to types/gulp-angular-templatecache/gulp-angular-templatecache-tests.ts diff --git a/gulp-angular-templatecache/index.d.ts b/types/gulp-angular-templatecache/index.d.ts similarity index 100% rename from gulp-angular-templatecache/index.d.ts rename to types/gulp-angular-templatecache/index.d.ts diff --git a/gulp-angular-templatecache/tsconfig.json b/types/gulp-angular-templatecache/tsconfig.json similarity index 100% rename from gulp-angular-templatecache/tsconfig.json rename to types/gulp-angular-templatecache/tsconfig.json diff --git a/gulp-autoprefixer/gulp-autoprefixer-tests.ts b/types/gulp-autoprefixer/gulp-autoprefixer-tests.ts similarity index 100% rename from gulp-autoprefixer/gulp-autoprefixer-tests.ts rename to types/gulp-autoprefixer/gulp-autoprefixer-tests.ts diff --git a/gulp-autoprefixer/index.d.ts b/types/gulp-autoprefixer/index.d.ts similarity index 100% rename from gulp-autoprefixer/index.d.ts rename to types/gulp-autoprefixer/index.d.ts diff --git a/gulp-autoprefixer/tsconfig.json b/types/gulp-autoprefixer/tsconfig.json similarity index 100% rename from gulp-autoprefixer/tsconfig.json rename to types/gulp-autoprefixer/tsconfig.json diff --git a/gulp-babel/gulp-babel-tests.ts b/types/gulp-babel/gulp-babel-tests.ts similarity index 100% rename from gulp-babel/gulp-babel-tests.ts rename to types/gulp-babel/gulp-babel-tests.ts diff --git a/gulp-babel/index.d.ts b/types/gulp-babel/index.d.ts similarity index 100% rename from gulp-babel/index.d.ts rename to types/gulp-babel/index.d.ts diff --git a/gulp-babel/tsconfig.json b/types/gulp-babel/tsconfig.json similarity index 100% rename from gulp-babel/tsconfig.json rename to types/gulp-babel/tsconfig.json diff --git a/gulp-batch/gulp-batch-tests.ts b/types/gulp-batch/gulp-batch-tests.ts similarity index 100% rename from gulp-batch/gulp-batch-tests.ts rename to types/gulp-batch/gulp-batch-tests.ts diff --git a/gulp-batch/index.d.ts b/types/gulp-batch/index.d.ts similarity index 100% rename from gulp-batch/index.d.ts rename to types/gulp-batch/index.d.ts diff --git a/gulp-batch/tsconfig.json b/types/gulp-batch/tsconfig.json similarity index 100% rename from gulp-batch/tsconfig.json rename to types/gulp-batch/tsconfig.json diff --git a/gulp-batch/tslint.json b/types/gulp-batch/tslint.json similarity index 100% rename from gulp-batch/tslint.json rename to types/gulp-batch/tslint.json diff --git a/gulp-cache/gulp-cache-tests.ts b/types/gulp-cache/gulp-cache-tests.ts similarity index 100% rename from gulp-cache/gulp-cache-tests.ts rename to types/gulp-cache/gulp-cache-tests.ts diff --git a/gulp-cache/index.d.ts b/types/gulp-cache/index.d.ts similarity index 100% rename from gulp-cache/index.d.ts rename to types/gulp-cache/index.d.ts diff --git a/gulp-cache/tsconfig.json b/types/gulp-cache/tsconfig.json similarity index 100% rename from gulp-cache/tsconfig.json rename to types/gulp-cache/tsconfig.json diff --git a/gulp-cached/gulp-cached-tests.ts b/types/gulp-cached/gulp-cached-tests.ts similarity index 100% rename from gulp-cached/gulp-cached-tests.ts rename to types/gulp-cached/gulp-cached-tests.ts diff --git a/gulp-cached/index.d.ts b/types/gulp-cached/index.d.ts similarity index 100% rename from gulp-cached/index.d.ts rename to types/gulp-cached/index.d.ts diff --git a/gulp-cached/tsconfig.json b/types/gulp-cached/tsconfig.json similarity index 100% rename from gulp-cached/tsconfig.json rename to types/gulp-cached/tsconfig.json diff --git a/gulp-changed/gulp-changed-tests.ts b/types/gulp-changed/gulp-changed-tests.ts similarity index 100% rename from gulp-changed/gulp-changed-tests.ts rename to types/gulp-changed/gulp-changed-tests.ts diff --git a/gulp-changed/index.d.ts b/types/gulp-changed/index.d.ts similarity index 100% rename from gulp-changed/index.d.ts rename to types/gulp-changed/index.d.ts diff --git a/gulp-changed/tsconfig.json b/types/gulp-changed/tsconfig.json similarity index 100% rename from gulp-changed/tsconfig.json rename to types/gulp-changed/tsconfig.json diff --git a/gulp-cheerio/gulp-cheerio-tests.ts b/types/gulp-cheerio/gulp-cheerio-tests.ts similarity index 100% rename from gulp-cheerio/gulp-cheerio-tests.ts rename to types/gulp-cheerio/gulp-cheerio-tests.ts diff --git a/gulp-cheerio/index.d.ts b/types/gulp-cheerio/index.d.ts similarity index 100% rename from gulp-cheerio/index.d.ts rename to types/gulp-cheerio/index.d.ts diff --git a/gulp-cheerio/tsconfig.json b/types/gulp-cheerio/tsconfig.json similarity index 100% rename from gulp-cheerio/tsconfig.json rename to types/gulp-cheerio/tsconfig.json diff --git a/gulp-coffeeify/gulp-coffeeify-tests.ts b/types/gulp-coffeeify/gulp-coffeeify-tests.ts similarity index 100% rename from gulp-coffeeify/gulp-coffeeify-tests.ts rename to types/gulp-coffeeify/gulp-coffeeify-tests.ts diff --git a/gulp-coffeeify/index.d.ts b/types/gulp-coffeeify/index.d.ts similarity index 100% rename from gulp-coffeeify/index.d.ts rename to types/gulp-coffeeify/index.d.ts diff --git a/gulp-coffeeify/tsconfig.json b/types/gulp-coffeeify/tsconfig.json similarity index 100% rename from gulp-coffeeify/tsconfig.json rename to types/gulp-coffeeify/tsconfig.json diff --git a/gulp-coffeelint/gulp-coffeelint-tests.ts b/types/gulp-coffeelint/gulp-coffeelint-tests.ts similarity index 100% rename from gulp-coffeelint/gulp-coffeelint-tests.ts rename to types/gulp-coffeelint/gulp-coffeelint-tests.ts diff --git a/gulp-coffeelint/index.d.ts b/types/gulp-coffeelint/index.d.ts similarity index 100% rename from gulp-coffeelint/index.d.ts rename to types/gulp-coffeelint/index.d.ts diff --git a/gulp-coffeelint/tsconfig.json b/types/gulp-coffeelint/tsconfig.json similarity index 100% rename from gulp-coffeelint/tsconfig.json rename to types/gulp-coffeelint/tsconfig.json diff --git a/gulp-concat/gulp-concat-tests.ts b/types/gulp-concat/gulp-concat-tests.ts similarity index 100% rename from gulp-concat/gulp-concat-tests.ts rename to types/gulp-concat/gulp-concat-tests.ts diff --git a/gulp-concat/index.d.ts b/types/gulp-concat/index.d.ts similarity index 100% rename from gulp-concat/index.d.ts rename to types/gulp-concat/index.d.ts diff --git a/gulp-concat/tsconfig.json b/types/gulp-concat/tsconfig.json similarity index 100% rename from gulp-concat/tsconfig.json rename to types/gulp-concat/tsconfig.json diff --git a/gulp-copy/gulp-copy-tests.ts b/types/gulp-copy/gulp-copy-tests.ts similarity index 100% rename from gulp-copy/gulp-copy-tests.ts rename to types/gulp-copy/gulp-copy-tests.ts diff --git a/gulp-copy/index.d.ts b/types/gulp-copy/index.d.ts similarity index 100% rename from gulp-copy/index.d.ts rename to types/gulp-copy/index.d.ts diff --git a/gulp-copy/tsconfig.json b/types/gulp-copy/tsconfig.json similarity index 100% rename from gulp-copy/tsconfig.json rename to types/gulp-copy/tsconfig.json diff --git a/gulp-csso/gulp-csso-tests.ts b/types/gulp-csso/gulp-csso-tests.ts similarity index 100% rename from gulp-csso/gulp-csso-tests.ts rename to types/gulp-csso/gulp-csso-tests.ts diff --git a/gulp-csso/index.d.ts b/types/gulp-csso/index.d.ts similarity index 100% rename from gulp-csso/index.d.ts rename to types/gulp-csso/index.d.ts diff --git a/gulp-csso/tsconfig.json b/types/gulp-csso/tsconfig.json similarity index 100% rename from gulp-csso/tsconfig.json rename to types/gulp-csso/tsconfig.json diff --git a/gulp-debug/gulp-debug-tests.ts b/types/gulp-debug/gulp-debug-tests.ts similarity index 100% rename from gulp-debug/gulp-debug-tests.ts rename to types/gulp-debug/gulp-debug-tests.ts diff --git a/gulp-debug/index.d.ts b/types/gulp-debug/index.d.ts similarity index 100% rename from gulp-debug/index.d.ts rename to types/gulp-debug/index.d.ts diff --git a/gulp-debug/tsconfig.json b/types/gulp-debug/tsconfig.json similarity index 100% rename from gulp-debug/tsconfig.json rename to types/gulp-debug/tsconfig.json diff --git a/gulp-dtsm/gulp-dtsm-tests.ts b/types/gulp-dtsm/gulp-dtsm-tests.ts similarity index 100% rename from gulp-dtsm/gulp-dtsm-tests.ts rename to types/gulp-dtsm/gulp-dtsm-tests.ts diff --git a/gulp-dtsm/index.d.ts b/types/gulp-dtsm/index.d.ts similarity index 100% rename from gulp-dtsm/index.d.ts rename to types/gulp-dtsm/index.d.ts diff --git a/gulp-dtsm/tsconfig.json b/types/gulp-dtsm/tsconfig.json similarity index 100% rename from gulp-dtsm/tsconfig.json rename to types/gulp-dtsm/tsconfig.json diff --git a/gulp-espower/gulp-espower-tests.ts b/types/gulp-espower/gulp-espower-tests.ts similarity index 100% rename from gulp-espower/gulp-espower-tests.ts rename to types/gulp-espower/gulp-espower-tests.ts diff --git a/gulp-espower/index.d.ts b/types/gulp-espower/index.d.ts similarity index 100% rename from gulp-espower/index.d.ts rename to types/gulp-espower/index.d.ts diff --git a/gulp-espower/tsconfig.json b/types/gulp-espower/tsconfig.json similarity index 100% rename from gulp-espower/tsconfig.json rename to types/gulp-espower/tsconfig.json diff --git a/gulp-file-include/gulp-file-include-tests.ts b/types/gulp-file-include/gulp-file-include-tests.ts similarity index 100% rename from gulp-file-include/gulp-file-include-tests.ts rename to types/gulp-file-include/gulp-file-include-tests.ts diff --git a/gulp-file-include/index.d.ts b/types/gulp-file-include/index.d.ts similarity index 100% rename from gulp-file-include/index.d.ts rename to types/gulp-file-include/index.d.ts diff --git a/gulp-file-include/tsconfig.json b/types/gulp-file-include/tsconfig.json similarity index 100% rename from gulp-file-include/tsconfig.json rename to types/gulp-file-include/tsconfig.json diff --git a/gulp-filter/gulp-filter-tests.ts b/types/gulp-filter/gulp-filter-tests.ts similarity index 100% rename from gulp-filter/gulp-filter-tests.ts rename to types/gulp-filter/gulp-filter-tests.ts diff --git a/gulp-filter/index.d.ts b/types/gulp-filter/index.d.ts similarity index 100% rename from gulp-filter/index.d.ts rename to types/gulp-filter/index.d.ts diff --git a/gulp-filter/tsconfig.json b/types/gulp-filter/tsconfig.json similarity index 100% rename from gulp-filter/tsconfig.json rename to types/gulp-filter/tsconfig.json diff --git a/gulp-flatten/gulp-flatten-tests.ts b/types/gulp-flatten/gulp-flatten-tests.ts similarity index 100% rename from gulp-flatten/gulp-flatten-tests.ts rename to types/gulp-flatten/gulp-flatten-tests.ts diff --git a/gulp-flatten/index.d.ts b/types/gulp-flatten/index.d.ts similarity index 100% rename from gulp-flatten/index.d.ts rename to types/gulp-flatten/index.d.ts diff --git a/gulp-flatten/tsconfig.json b/types/gulp-flatten/tsconfig.json similarity index 100% rename from gulp-flatten/tsconfig.json rename to types/gulp-flatten/tsconfig.json diff --git a/gulp-gh-pages/gulp-gh-pages-tests.ts b/types/gulp-gh-pages/gulp-gh-pages-tests.ts similarity index 100% rename from gulp-gh-pages/gulp-gh-pages-tests.ts rename to types/gulp-gh-pages/gulp-gh-pages-tests.ts diff --git a/gulp-gh-pages/index.d.ts b/types/gulp-gh-pages/index.d.ts similarity index 100% rename from gulp-gh-pages/index.d.ts rename to types/gulp-gh-pages/index.d.ts diff --git a/gulp-gh-pages/tsconfig.json b/types/gulp-gh-pages/tsconfig.json similarity index 100% rename from gulp-gh-pages/tsconfig.json rename to types/gulp-gh-pages/tsconfig.json diff --git a/gulp-gzip/gulp-gzip-tests.ts b/types/gulp-gzip/gulp-gzip-tests.ts similarity index 100% rename from gulp-gzip/gulp-gzip-tests.ts rename to types/gulp-gzip/gulp-gzip-tests.ts diff --git a/gulp-gzip/index.d.ts b/types/gulp-gzip/index.d.ts similarity index 100% rename from gulp-gzip/index.d.ts rename to types/gulp-gzip/index.d.ts diff --git a/gulp-gzip/tsconfig.json b/types/gulp-gzip/tsconfig.json similarity index 100% rename from gulp-gzip/tsconfig.json rename to types/gulp-gzip/tsconfig.json diff --git a/gulp-help-doc/gulp-help-doc-tests.ts b/types/gulp-help-doc/gulp-help-doc-tests.ts similarity index 100% rename from gulp-help-doc/gulp-help-doc-tests.ts rename to types/gulp-help-doc/gulp-help-doc-tests.ts diff --git a/gulp-help-doc/index.d.ts b/types/gulp-help-doc/index.d.ts similarity index 100% rename from gulp-help-doc/index.d.ts rename to types/gulp-help-doc/index.d.ts diff --git a/gulp-help-doc/tsconfig.json b/types/gulp-help-doc/tsconfig.json similarity index 100% rename from gulp-help-doc/tsconfig.json rename to types/gulp-help-doc/tsconfig.json diff --git a/gulp-help/gulp-help-tests.ts b/types/gulp-help/gulp-help-tests.ts similarity index 100% rename from gulp-help/gulp-help-tests.ts rename to types/gulp-help/gulp-help-tests.ts diff --git a/gulp-help/index.d.ts b/types/gulp-help/index.d.ts similarity index 100% rename from gulp-help/index.d.ts rename to types/gulp-help/index.d.ts diff --git a/gulp-help/tsconfig.json b/types/gulp-help/tsconfig.json similarity index 100% rename from gulp-help/tsconfig.json rename to types/gulp-help/tsconfig.json diff --git a/gulp-html-replace/gulp-html-replace-tests.ts b/types/gulp-html-replace/gulp-html-replace-tests.ts similarity index 100% rename from gulp-html-replace/gulp-html-replace-tests.ts rename to types/gulp-html-replace/gulp-html-replace-tests.ts diff --git a/gulp-html-replace/index.d.ts b/types/gulp-html-replace/index.d.ts similarity index 100% rename from gulp-html-replace/index.d.ts rename to types/gulp-html-replace/index.d.ts diff --git a/gulp-html-replace/tsconfig.json b/types/gulp-html-replace/tsconfig.json similarity index 100% rename from gulp-html-replace/tsconfig.json rename to types/gulp-html-replace/tsconfig.json diff --git a/gulp-htmlmin/gulp-htmlmin-tests.ts b/types/gulp-htmlmin/gulp-htmlmin-tests.ts similarity index 100% rename from gulp-htmlmin/gulp-htmlmin-tests.ts rename to types/gulp-htmlmin/gulp-htmlmin-tests.ts diff --git a/gulp-htmlmin/index.d.ts b/types/gulp-htmlmin/index.d.ts similarity index 100% rename from gulp-htmlmin/index.d.ts rename to types/gulp-htmlmin/index.d.ts diff --git a/gulp-htmlmin/tsconfig.json b/types/gulp-htmlmin/tsconfig.json similarity index 100% rename from gulp-htmlmin/tsconfig.json rename to types/gulp-htmlmin/tsconfig.json diff --git a/gulp-if/gulp-if-tests.ts b/types/gulp-if/gulp-if-tests.ts similarity index 100% rename from gulp-if/gulp-if-tests.ts rename to types/gulp-if/gulp-if-tests.ts diff --git a/gulp-if/index.d.ts b/types/gulp-if/index.d.ts similarity index 100% rename from gulp-if/index.d.ts rename to types/gulp-if/index.d.ts diff --git a/gulp-if/tsconfig.json b/types/gulp-if/tsconfig.json similarity index 100% rename from gulp-if/tsconfig.json rename to types/gulp-if/tsconfig.json diff --git a/gulp-inject/gulp-inject-tests.ts b/types/gulp-inject/gulp-inject-tests.ts similarity index 100% rename from gulp-inject/gulp-inject-tests.ts rename to types/gulp-inject/gulp-inject-tests.ts diff --git a/gulp-inject/index.d.ts b/types/gulp-inject/index.d.ts similarity index 100% rename from gulp-inject/index.d.ts rename to types/gulp-inject/index.d.ts diff --git a/gulp-inject/tsconfig.json b/types/gulp-inject/tsconfig.json similarity index 100% rename from gulp-inject/tsconfig.json rename to types/gulp-inject/tsconfig.json diff --git a/gulp-insert/gulp-insert-tests.ts b/types/gulp-insert/gulp-insert-tests.ts similarity index 100% rename from gulp-insert/gulp-insert-tests.ts rename to types/gulp-insert/gulp-insert-tests.ts diff --git a/gulp-insert/index.d.ts b/types/gulp-insert/index.d.ts similarity index 100% rename from gulp-insert/index.d.ts rename to types/gulp-insert/index.d.ts diff --git a/gulp-insert/tsconfig.json b/types/gulp-insert/tsconfig.json similarity index 100% rename from gulp-insert/tsconfig.json rename to types/gulp-insert/tsconfig.json diff --git a/gulp-install/gulp-install-tests.ts b/types/gulp-install/gulp-install-tests.ts similarity index 100% rename from gulp-install/gulp-install-tests.ts rename to types/gulp-install/gulp-install-tests.ts diff --git a/gulp-install/index.d.ts b/types/gulp-install/index.d.ts similarity index 100% rename from gulp-install/index.d.ts rename to types/gulp-install/index.d.ts diff --git a/gulp-install/tsconfig.json b/types/gulp-install/tsconfig.json similarity index 100% rename from gulp-install/tsconfig.json rename to types/gulp-install/tsconfig.json diff --git a/gulp-istanbul/gulp-istanbul-tests.ts b/types/gulp-istanbul/gulp-istanbul-tests.ts similarity index 100% rename from gulp-istanbul/gulp-istanbul-tests.ts rename to types/gulp-istanbul/gulp-istanbul-tests.ts diff --git a/gulp-istanbul/index.d.ts b/types/gulp-istanbul/index.d.ts similarity index 100% rename from gulp-istanbul/index.d.ts rename to types/gulp-istanbul/index.d.ts diff --git a/gulp-istanbul/tsconfig.json b/types/gulp-istanbul/tsconfig.json similarity index 100% rename from gulp-istanbul/tsconfig.json rename to types/gulp-istanbul/tsconfig.json diff --git a/gulp-jade/gulp-jade-tests.ts b/types/gulp-jade/gulp-jade-tests.ts similarity index 100% rename from gulp-jade/gulp-jade-tests.ts rename to types/gulp-jade/gulp-jade-tests.ts diff --git a/gulp-jade/index.d.ts b/types/gulp-jade/index.d.ts similarity index 100% rename from gulp-jade/index.d.ts rename to types/gulp-jade/index.d.ts diff --git a/gulp-jade/tsconfig.json b/types/gulp-jade/tsconfig.json similarity index 100% rename from gulp-jade/tsconfig.json rename to types/gulp-jade/tsconfig.json diff --git a/gulp-jasmine-browser/gulp-jasmine-browser-tests.ts b/types/gulp-jasmine-browser/gulp-jasmine-browser-tests.ts similarity index 100% rename from gulp-jasmine-browser/gulp-jasmine-browser-tests.ts rename to types/gulp-jasmine-browser/gulp-jasmine-browser-tests.ts diff --git a/gulp-jasmine-browser/index.d.ts b/types/gulp-jasmine-browser/index.d.ts similarity index 100% rename from gulp-jasmine-browser/index.d.ts rename to types/gulp-jasmine-browser/index.d.ts diff --git a/gulp-jasmine-browser/tsconfig.json b/types/gulp-jasmine-browser/tsconfig.json similarity index 100% rename from gulp-jasmine-browser/tsconfig.json rename to types/gulp-jasmine-browser/tsconfig.json diff --git a/gulp-json-editor/gulp-json-editor-tests.ts b/types/gulp-json-editor/gulp-json-editor-tests.ts similarity index 100% rename from gulp-json-editor/gulp-json-editor-tests.ts rename to types/gulp-json-editor/gulp-json-editor-tests.ts diff --git a/gulp-json-editor/index.d.ts b/types/gulp-json-editor/index.d.ts similarity index 100% rename from gulp-json-editor/index.d.ts rename to types/gulp-json-editor/index.d.ts diff --git a/gulp-json-editor/tsconfig.json b/types/gulp-json-editor/tsconfig.json similarity index 100% rename from gulp-json-editor/tsconfig.json rename to types/gulp-json-editor/tsconfig.json diff --git a/gulp-jspm/gulp-jspm-tests.ts b/types/gulp-jspm/gulp-jspm-tests.ts similarity index 100% rename from gulp-jspm/gulp-jspm-tests.ts rename to types/gulp-jspm/gulp-jspm-tests.ts diff --git a/gulp-jspm/index.d.ts b/types/gulp-jspm/index.d.ts similarity index 100% rename from gulp-jspm/index.d.ts rename to types/gulp-jspm/index.d.ts diff --git a/gulp-jspm/tsconfig.json b/types/gulp-jspm/tsconfig.json similarity index 100% rename from gulp-jspm/tsconfig.json rename to types/gulp-jspm/tsconfig.json diff --git a/gulp-less/gulp-less-tests.ts b/types/gulp-less/gulp-less-tests.ts similarity index 100% rename from gulp-less/gulp-less-tests.ts rename to types/gulp-less/gulp-less-tests.ts diff --git a/gulp-less/index.d.ts b/types/gulp-less/index.d.ts similarity index 100% rename from gulp-less/index.d.ts rename to types/gulp-less/index.d.ts diff --git a/gulp-less/tsconfig.json b/types/gulp-less/tsconfig.json similarity index 100% rename from gulp-less/tsconfig.json rename to types/gulp-less/tsconfig.json diff --git a/gulp-load-plugins/gulp-load-plugins-tests.ts b/types/gulp-load-plugins/gulp-load-plugins-tests.ts similarity index 100% rename from gulp-load-plugins/gulp-load-plugins-tests.ts rename to types/gulp-load-plugins/gulp-load-plugins-tests.ts diff --git a/gulp-load-plugins/index.d.ts b/types/gulp-load-plugins/index.d.ts similarity index 100% rename from gulp-load-plugins/index.d.ts rename to types/gulp-load-plugins/index.d.ts diff --git a/gulp-load-plugins/tsconfig.json b/types/gulp-load-plugins/tsconfig.json similarity index 100% rename from gulp-load-plugins/tsconfig.json rename to types/gulp-load-plugins/tsconfig.json diff --git a/gulp-minify-css/gulp-minify-css-tests.ts b/types/gulp-minify-css/gulp-minify-css-tests.ts similarity index 100% rename from gulp-minify-css/gulp-minify-css-tests.ts rename to types/gulp-minify-css/gulp-minify-css-tests.ts diff --git a/gulp-minify-css/index.d.ts b/types/gulp-minify-css/index.d.ts similarity index 100% rename from gulp-minify-css/index.d.ts rename to types/gulp-minify-css/index.d.ts diff --git a/gulp-minify-css/tsconfig.json b/types/gulp-minify-css/tsconfig.json similarity index 100% rename from gulp-minify-css/tsconfig.json rename to types/gulp-minify-css/tsconfig.json diff --git a/gulp-minify-html/gulp-minify-html-tests.ts b/types/gulp-minify-html/gulp-minify-html-tests.ts similarity index 100% rename from gulp-minify-html/gulp-minify-html-tests.ts rename to types/gulp-minify-html/gulp-minify-html-tests.ts diff --git a/gulp-minify-html/index.d.ts b/types/gulp-minify-html/index.d.ts similarity index 100% rename from gulp-minify-html/index.d.ts rename to types/gulp-minify-html/index.d.ts diff --git a/gulp-minify-html/tsconfig.json b/types/gulp-minify-html/tsconfig.json similarity index 100% rename from gulp-minify-html/tsconfig.json rename to types/gulp-minify-html/tsconfig.json diff --git a/gulp-mocha/gulp-mocha-tests.ts b/types/gulp-mocha/gulp-mocha-tests.ts similarity index 100% rename from gulp-mocha/gulp-mocha-tests.ts rename to types/gulp-mocha/gulp-mocha-tests.ts diff --git a/gulp-mocha/index.d.ts b/types/gulp-mocha/index.d.ts similarity index 100% rename from gulp-mocha/index.d.ts rename to types/gulp-mocha/index.d.ts diff --git a/gulp-mocha/tsconfig.json b/types/gulp-mocha/tsconfig.json similarity index 100% rename from gulp-mocha/tsconfig.json rename to types/gulp-mocha/tsconfig.json diff --git a/gulp-newer/gulp-newer-tests.ts b/types/gulp-newer/gulp-newer-tests.ts similarity index 100% rename from gulp-newer/gulp-newer-tests.ts rename to types/gulp-newer/gulp-newer-tests.ts diff --git a/gulp-newer/index.d.ts b/types/gulp-newer/index.d.ts similarity index 100% rename from gulp-newer/index.d.ts rename to types/gulp-newer/index.d.ts diff --git a/gulp-newer/tsconfig.json b/types/gulp-newer/tsconfig.json similarity index 100% rename from gulp-newer/tsconfig.json rename to types/gulp-newer/tsconfig.json diff --git a/gulp-ng-annotate/gulp-ng-annotate-tests.ts b/types/gulp-ng-annotate/gulp-ng-annotate-tests.ts similarity index 100% rename from gulp-ng-annotate/gulp-ng-annotate-tests.ts rename to types/gulp-ng-annotate/gulp-ng-annotate-tests.ts diff --git a/gulp-ng-annotate/index.d.ts b/types/gulp-ng-annotate/index.d.ts similarity index 100% rename from gulp-ng-annotate/index.d.ts rename to types/gulp-ng-annotate/index.d.ts diff --git a/gulp-ng-annotate/tsconfig.json b/types/gulp-ng-annotate/tsconfig.json similarity index 100% rename from gulp-ng-annotate/tsconfig.json rename to types/gulp-ng-annotate/tsconfig.json diff --git a/gulp-nodemon/gulp-nodemon-tests.ts b/types/gulp-nodemon/gulp-nodemon-tests.ts similarity index 100% rename from gulp-nodemon/gulp-nodemon-tests.ts rename to types/gulp-nodemon/gulp-nodemon-tests.ts diff --git a/gulp-nodemon/index.d.ts b/types/gulp-nodemon/index.d.ts similarity index 100% rename from gulp-nodemon/index.d.ts rename to types/gulp-nodemon/index.d.ts diff --git a/gulp-nodemon/tsconfig.json b/types/gulp-nodemon/tsconfig.json similarity index 100% rename from gulp-nodemon/tsconfig.json rename to types/gulp-nodemon/tsconfig.json diff --git a/gulp-plumber/gulp-plumber-tests.ts b/types/gulp-plumber/gulp-plumber-tests.ts similarity index 100% rename from gulp-plumber/gulp-plumber-tests.ts rename to types/gulp-plumber/gulp-plumber-tests.ts diff --git a/gulp-plumber/index.d.ts b/types/gulp-plumber/index.d.ts similarity index 100% rename from gulp-plumber/index.d.ts rename to types/gulp-plumber/index.d.ts diff --git a/gulp-plumber/tsconfig.json b/types/gulp-plumber/tsconfig.json similarity index 100% rename from gulp-plumber/tsconfig.json rename to types/gulp-plumber/tsconfig.json diff --git a/gulp-protractor/gulp-protractor-tests.ts b/types/gulp-protractor/gulp-protractor-tests.ts similarity index 100% rename from gulp-protractor/gulp-protractor-tests.ts rename to types/gulp-protractor/gulp-protractor-tests.ts diff --git a/gulp-protractor/index.d.ts b/types/gulp-protractor/index.d.ts similarity index 100% rename from gulp-protractor/index.d.ts rename to types/gulp-protractor/index.d.ts diff --git a/gulp-protractor/tsconfig.json b/types/gulp-protractor/tsconfig.json similarity index 100% rename from gulp-protractor/tsconfig.json rename to types/gulp-protractor/tsconfig.json diff --git a/gulp-remember/gulp-remember-tests.ts b/types/gulp-remember/gulp-remember-tests.ts similarity index 100% rename from gulp-remember/gulp-remember-tests.ts rename to types/gulp-remember/gulp-remember-tests.ts diff --git a/gulp-remember/index.d.ts b/types/gulp-remember/index.d.ts similarity index 100% rename from gulp-remember/index.d.ts rename to types/gulp-remember/index.d.ts diff --git a/gulp-remember/tsconfig.json b/types/gulp-remember/tsconfig.json similarity index 100% rename from gulp-remember/tsconfig.json rename to types/gulp-remember/tsconfig.json diff --git a/gulp-rename/gulp-rename-tests.ts b/types/gulp-rename/gulp-rename-tests.ts similarity index 100% rename from gulp-rename/gulp-rename-tests.ts rename to types/gulp-rename/gulp-rename-tests.ts diff --git a/gulp-rename/index.d.ts b/types/gulp-rename/index.d.ts similarity index 100% rename from gulp-rename/index.d.ts rename to types/gulp-rename/index.d.ts diff --git a/gulp-rename/tsconfig.json b/types/gulp-rename/tsconfig.json similarity index 100% rename from gulp-rename/tsconfig.json rename to types/gulp-rename/tsconfig.json diff --git a/gulp-replace/gulp-replace-tests.ts b/types/gulp-replace/gulp-replace-tests.ts similarity index 100% rename from gulp-replace/gulp-replace-tests.ts rename to types/gulp-replace/gulp-replace-tests.ts diff --git a/gulp-replace/index.d.ts b/types/gulp-replace/index.d.ts similarity index 100% rename from gulp-replace/index.d.ts rename to types/gulp-replace/index.d.ts diff --git a/gulp-replace/tsconfig.json b/types/gulp-replace/tsconfig.json similarity index 100% rename from gulp-replace/tsconfig.json rename to types/gulp-replace/tsconfig.json diff --git a/gulp-rev-replace/gulp-rev-replace-tests.ts b/types/gulp-rev-replace/gulp-rev-replace-tests.ts similarity index 100% rename from gulp-rev-replace/gulp-rev-replace-tests.ts rename to types/gulp-rev-replace/gulp-rev-replace-tests.ts diff --git a/gulp-rev-replace/index.d.ts b/types/gulp-rev-replace/index.d.ts similarity index 100% rename from gulp-rev-replace/index.d.ts rename to types/gulp-rev-replace/index.d.ts diff --git a/gulp-rev-replace/tsconfig.json b/types/gulp-rev-replace/tsconfig.json similarity index 100% rename from gulp-rev-replace/tsconfig.json rename to types/gulp-rev-replace/tsconfig.json diff --git a/gulp-rev/gulp-rev-tests.ts b/types/gulp-rev/gulp-rev-tests.ts similarity index 100% rename from gulp-rev/gulp-rev-tests.ts rename to types/gulp-rev/gulp-rev-tests.ts diff --git a/gulp-rev/index.d.ts b/types/gulp-rev/index.d.ts similarity index 100% rename from gulp-rev/index.d.ts rename to types/gulp-rev/index.d.ts diff --git a/gulp-rev/tsconfig.json b/types/gulp-rev/tsconfig.json similarity index 100% rename from gulp-rev/tsconfig.json rename to types/gulp-rev/tsconfig.json diff --git a/gulp-ruby-sass/gulp-ruby-sass-tests.ts b/types/gulp-ruby-sass/gulp-ruby-sass-tests.ts similarity index 100% rename from gulp-ruby-sass/gulp-ruby-sass-tests.ts rename to types/gulp-ruby-sass/gulp-ruby-sass-tests.ts diff --git a/gulp-ruby-sass/index.d.ts b/types/gulp-ruby-sass/index.d.ts similarity index 100% rename from gulp-ruby-sass/index.d.ts rename to types/gulp-ruby-sass/index.d.ts diff --git a/gulp-ruby-sass/tsconfig.json b/types/gulp-ruby-sass/tsconfig.json similarity index 100% rename from gulp-ruby-sass/tsconfig.json rename to types/gulp-ruby-sass/tsconfig.json diff --git a/gulp-sass/gulp-sass-tests.ts b/types/gulp-sass/gulp-sass-tests.ts similarity index 100% rename from gulp-sass/gulp-sass-tests.ts rename to types/gulp-sass/gulp-sass-tests.ts diff --git a/gulp-sass/index.d.ts b/types/gulp-sass/index.d.ts similarity index 100% rename from gulp-sass/index.d.ts rename to types/gulp-sass/index.d.ts diff --git a/gulp-sass/tsconfig.json b/types/gulp-sass/tsconfig.json similarity index 100% rename from gulp-sass/tsconfig.json rename to types/gulp-sass/tsconfig.json diff --git a/gulp-shell/gulp-shell-tests.ts b/types/gulp-shell/gulp-shell-tests.ts similarity index 100% rename from gulp-shell/gulp-shell-tests.ts rename to types/gulp-shell/gulp-shell-tests.ts diff --git a/gulp-shell/index.d.ts b/types/gulp-shell/index.d.ts similarity index 100% rename from gulp-shell/index.d.ts rename to types/gulp-shell/index.d.ts diff --git a/gulp-shell/tsconfig.json b/types/gulp-shell/tsconfig.json similarity index 100% rename from gulp-shell/tsconfig.json rename to types/gulp-shell/tsconfig.json diff --git a/gulp-size/gulp-size-tests.ts b/types/gulp-size/gulp-size-tests.ts similarity index 100% rename from gulp-size/gulp-size-tests.ts rename to types/gulp-size/gulp-size-tests.ts diff --git a/gulp-size/index.d.ts b/types/gulp-size/index.d.ts similarity index 100% rename from gulp-size/index.d.ts rename to types/gulp-size/index.d.ts diff --git a/gulp-size/tsconfig.json b/types/gulp-size/tsconfig.json similarity index 100% rename from gulp-size/tsconfig.json rename to types/gulp-size/tsconfig.json diff --git a/gulp-sort/gulp-sort-tests.ts b/types/gulp-sort/gulp-sort-tests.ts similarity index 100% rename from gulp-sort/gulp-sort-tests.ts rename to types/gulp-sort/gulp-sort-tests.ts diff --git a/gulp-sort/index.d.ts b/types/gulp-sort/index.d.ts similarity index 100% rename from gulp-sort/index.d.ts rename to types/gulp-sort/index.d.ts diff --git a/gulp-sort/tsconfig.json b/types/gulp-sort/tsconfig.json similarity index 100% rename from gulp-sort/tsconfig.json rename to types/gulp-sort/tsconfig.json diff --git a/gulp-sourcemaps/gulp-sourcemaps-tests.ts b/types/gulp-sourcemaps/gulp-sourcemaps-tests.ts similarity index 100% rename from gulp-sourcemaps/gulp-sourcemaps-tests.ts rename to types/gulp-sourcemaps/gulp-sourcemaps-tests.ts diff --git a/gulp-sourcemaps/index.d.ts b/types/gulp-sourcemaps/index.d.ts similarity index 100% rename from gulp-sourcemaps/index.d.ts rename to types/gulp-sourcemaps/index.d.ts diff --git a/gulp-sourcemaps/tsconfig.json b/types/gulp-sourcemaps/tsconfig.json similarity index 100% rename from gulp-sourcemaps/tsconfig.json rename to types/gulp-sourcemaps/tsconfig.json diff --git a/gulp-strip-debug/gulp-strip-debug-tests.ts b/types/gulp-strip-debug/gulp-strip-debug-tests.ts similarity index 100% rename from gulp-strip-debug/gulp-strip-debug-tests.ts rename to types/gulp-strip-debug/gulp-strip-debug-tests.ts diff --git a/gulp-strip-debug/index.d.ts b/types/gulp-strip-debug/index.d.ts similarity index 100% rename from gulp-strip-debug/index.d.ts rename to types/gulp-strip-debug/index.d.ts diff --git a/gulp-strip-debug/tsconfig.json b/types/gulp-strip-debug/tsconfig.json similarity index 100% rename from gulp-strip-debug/tsconfig.json rename to types/gulp-strip-debug/tsconfig.json diff --git a/gulp-svg-sprite/gulp-svg-sprite-tests.ts b/types/gulp-svg-sprite/gulp-svg-sprite-tests.ts similarity index 100% rename from gulp-svg-sprite/gulp-svg-sprite-tests.ts rename to types/gulp-svg-sprite/gulp-svg-sprite-tests.ts diff --git a/gulp-svg-sprite/index.d.ts b/types/gulp-svg-sprite/index.d.ts similarity index 100% rename from gulp-svg-sprite/index.d.ts rename to types/gulp-svg-sprite/index.d.ts diff --git a/gulp-svg-sprite/tsconfig.json b/types/gulp-svg-sprite/tsconfig.json similarity index 100% rename from gulp-svg-sprite/tsconfig.json rename to types/gulp-svg-sprite/tsconfig.json diff --git a/gulp-task-listing/gulp-task-listing-tests.ts b/types/gulp-task-listing/gulp-task-listing-tests.ts similarity index 100% rename from gulp-task-listing/gulp-task-listing-tests.ts rename to types/gulp-task-listing/gulp-task-listing-tests.ts diff --git a/gulp-task-listing/index.d.ts b/types/gulp-task-listing/index.d.ts similarity index 100% rename from gulp-task-listing/index.d.ts rename to types/gulp-task-listing/index.d.ts diff --git a/gulp-task-listing/tsconfig.json b/types/gulp-task-listing/tsconfig.json similarity index 100% rename from gulp-task-listing/tsconfig.json rename to types/gulp-task-listing/tsconfig.json diff --git a/gulp-tsd/gulp-tsd-tests.ts b/types/gulp-tsd/gulp-tsd-tests.ts similarity index 100% rename from gulp-tsd/gulp-tsd-tests.ts rename to types/gulp-tsd/gulp-tsd-tests.ts diff --git a/gulp-tsd/index.d.ts b/types/gulp-tsd/index.d.ts similarity index 100% rename from gulp-tsd/index.d.ts rename to types/gulp-tsd/index.d.ts diff --git a/gulp-tsd/tsconfig.json b/types/gulp-tsd/tsconfig.json similarity index 100% rename from gulp-tsd/tsconfig.json rename to types/gulp-tsd/tsconfig.json diff --git a/gulp-tslint/gulp-tslint-tests.ts b/types/gulp-tslint/gulp-tslint-tests.ts similarity index 100% rename from gulp-tslint/gulp-tslint-tests.ts rename to types/gulp-tslint/gulp-tslint-tests.ts diff --git a/gulp-tslint/index.d.ts b/types/gulp-tslint/index.d.ts similarity index 100% rename from gulp-tslint/index.d.ts rename to types/gulp-tslint/index.d.ts diff --git a/gulp-tslint/tsconfig.json b/types/gulp-tslint/tsconfig.json similarity index 100% rename from gulp-tslint/tsconfig.json rename to types/gulp-tslint/tsconfig.json diff --git a/gulp-typedoc/gulp-typedoc-tests.ts b/types/gulp-typedoc/gulp-typedoc-tests.ts similarity index 100% rename from gulp-typedoc/gulp-typedoc-tests.ts rename to types/gulp-typedoc/gulp-typedoc-tests.ts diff --git a/gulp-typedoc/index.d.ts b/types/gulp-typedoc/index.d.ts similarity index 100% rename from gulp-typedoc/index.d.ts rename to types/gulp-typedoc/index.d.ts diff --git a/gulp-typedoc/tsconfig.json b/types/gulp-typedoc/tsconfig.json similarity index 100% rename from gulp-typedoc/tsconfig.json rename to types/gulp-typedoc/tsconfig.json diff --git a/gulp-typescript/gulp-typescript-tests.ts b/types/gulp-typescript/gulp-typescript-tests.ts similarity index 100% rename from gulp-typescript/gulp-typescript-tests.ts rename to types/gulp-typescript/gulp-typescript-tests.ts diff --git a/gulp-typescript/index.d.ts b/types/gulp-typescript/index.d.ts similarity index 100% rename from gulp-typescript/index.d.ts rename to types/gulp-typescript/index.d.ts diff --git a/gulp-typescript/tsconfig.json b/types/gulp-typescript/tsconfig.json similarity index 100% rename from gulp-typescript/tsconfig.json rename to types/gulp-typescript/tsconfig.json diff --git a/gulp-uglify/gulp-uglify-tests.ts b/types/gulp-uglify/gulp-uglify-tests.ts similarity index 100% rename from gulp-uglify/gulp-uglify-tests.ts rename to types/gulp-uglify/gulp-uglify-tests.ts diff --git a/gulp-uglify/index.d.ts b/types/gulp-uglify/index.d.ts similarity index 100% rename from gulp-uglify/index.d.ts rename to types/gulp-uglify/index.d.ts diff --git a/gulp-uglify/tsconfig.json b/types/gulp-uglify/tsconfig.json similarity index 100% rename from gulp-uglify/tsconfig.json rename to types/gulp-uglify/tsconfig.json diff --git a/gulp-useref/gulp-useref-tests.ts b/types/gulp-useref/gulp-useref-tests.ts similarity index 100% rename from gulp-useref/gulp-useref-tests.ts rename to types/gulp-useref/gulp-useref-tests.ts diff --git a/gulp-useref/index.d.ts b/types/gulp-useref/index.d.ts similarity index 100% rename from gulp-useref/index.d.ts rename to types/gulp-useref/index.d.ts diff --git a/gulp-useref/tsconfig.json b/types/gulp-useref/tsconfig.json similarity index 100% rename from gulp-useref/tsconfig.json rename to types/gulp-useref/tsconfig.json diff --git a/gulp-util/gulp-util-tests.ts b/types/gulp-util/gulp-util-tests.ts similarity index 100% rename from gulp-util/gulp-util-tests.ts rename to types/gulp-util/gulp-util-tests.ts diff --git a/gulp-util/index.d.ts b/types/gulp-util/index.d.ts similarity index 100% rename from gulp-util/index.d.ts rename to types/gulp-util/index.d.ts diff --git a/gulp-util/tsconfig.json b/types/gulp-util/tsconfig.json similarity index 100% rename from gulp-util/tsconfig.json rename to types/gulp-util/tsconfig.json diff --git a/gulp-watch/gulp-watch-tests.ts b/types/gulp-watch/gulp-watch-tests.ts similarity index 100% rename from gulp-watch/gulp-watch-tests.ts rename to types/gulp-watch/gulp-watch-tests.ts diff --git a/gulp-watch/index.d.ts b/types/gulp-watch/index.d.ts similarity index 100% rename from gulp-watch/index.d.ts rename to types/gulp-watch/index.d.ts diff --git a/gulp-watch/tsconfig.json b/types/gulp-watch/tsconfig.json similarity index 100% rename from gulp-watch/tsconfig.json rename to types/gulp-watch/tsconfig.json diff --git a/gulp/gulp-tests.ts b/types/gulp/gulp-tests.ts similarity index 100% rename from gulp/gulp-tests.ts rename to types/gulp/gulp-tests.ts diff --git a/gulp/index.d.ts b/types/gulp/index.d.ts similarity index 100% rename from gulp/index.d.ts rename to types/gulp/index.d.ts diff --git a/gulp/tsconfig.json b/types/gulp/tsconfig.json similarity index 100% rename from gulp/tsconfig.json rename to types/gulp/tsconfig.json diff --git a/halfred/halfred-tests.ts b/types/halfred/halfred-tests.ts similarity index 100% rename from halfred/halfred-tests.ts rename to types/halfred/halfred-tests.ts diff --git a/halfred/index.d.ts b/types/halfred/index.d.ts similarity index 100% rename from halfred/index.d.ts rename to types/halfred/index.d.ts diff --git a/halfred/tsconfig.json b/types/halfred/tsconfig.json similarity index 100% rename from halfred/tsconfig.json rename to types/halfred/tsconfig.json diff --git a/halogen/index.d.ts b/types/halogen/index.d.ts similarity index 100% rename from halogen/index.d.ts rename to types/halogen/index.d.ts diff --git a/halogen/test/clip-loader.tsx b/types/halogen/test/clip-loader.tsx similarity index 100% rename from halogen/test/clip-loader.tsx rename to types/halogen/test/clip-loader.tsx diff --git a/halogen/test/fade-loader.tsx b/types/halogen/test/fade-loader.tsx similarity index 100% rename from halogen/test/fade-loader.tsx rename to types/halogen/test/fade-loader.tsx diff --git a/halogen/test/pacman-loader.tsx b/types/halogen/test/pacman-loader.tsx similarity index 100% rename from halogen/test/pacman-loader.tsx rename to types/halogen/test/pacman-loader.tsx diff --git a/halogen/test/rotate-loader.tsx b/types/halogen/test/rotate-loader.tsx similarity index 100% rename from halogen/test/rotate-loader.tsx rename to types/halogen/test/rotate-loader.tsx diff --git a/halogen/tsconfig.json b/types/halogen/tsconfig.json similarity index 100% rename from halogen/tsconfig.json rename to types/halogen/tsconfig.json diff --git a/halogen/tslint.json b/types/halogen/tslint.json similarity index 100% rename from halogen/tslint.json rename to types/halogen/tslint.json diff --git a/hammerjs/hammerjs-tests.ts b/types/hammerjs/hammerjs-tests.ts similarity index 100% rename from hammerjs/hammerjs-tests.ts rename to types/hammerjs/hammerjs-tests.ts diff --git a/hammerjs/index.d.ts b/types/hammerjs/index.d.ts similarity index 100% rename from hammerjs/index.d.ts rename to types/hammerjs/index.d.ts diff --git a/hammerjs/tsconfig.json b/types/hammerjs/tsconfig.json similarity index 100% rename from hammerjs/tsconfig.json rename to types/hammerjs/tsconfig.json diff --git a/hammerjs/v1/hammerjs-tests.ts b/types/hammerjs/v1/hammerjs-tests.ts similarity index 100% rename from hammerjs/v1/hammerjs-tests.ts rename to types/hammerjs/v1/hammerjs-tests.ts diff --git a/hammerjs/v1/index.d.ts b/types/hammerjs/v1/index.d.ts similarity index 100% rename from hammerjs/v1/index.d.ts rename to types/hammerjs/v1/index.d.ts diff --git a/hammerjs/v1/tsconfig.json b/types/hammerjs/v1/tsconfig.json similarity index 100% rename from hammerjs/v1/tsconfig.json rename to types/hammerjs/v1/tsconfig.json diff --git a/handlebars/handlebars-tests.ts b/types/handlebars/handlebars-tests.ts similarity index 100% rename from handlebars/handlebars-tests.ts rename to types/handlebars/handlebars-tests.ts diff --git a/handlebars/index.d.ts b/types/handlebars/index.d.ts similarity index 100% rename from handlebars/index.d.ts rename to types/handlebars/index.d.ts diff --git a/handlebars/tsconfig.json b/types/handlebars/tsconfig.json similarity index 100% rename from handlebars/tsconfig.json rename to types/handlebars/tsconfig.json diff --git a/handlebars/v1/index.d.ts b/types/handlebars/v1/index.d.ts similarity index 100% rename from handlebars/v1/index.d.ts rename to types/handlebars/v1/index.d.ts diff --git a/handlebars/v1/tsconfig.json b/types/handlebars/v1/tsconfig.json similarity index 100% rename from handlebars/v1/tsconfig.json rename to types/handlebars/v1/tsconfig.json diff --git a/handsontable/handsontable-tests.ts b/types/handsontable/handsontable-tests.ts similarity index 98% rename from handsontable/handsontable-tests.ts rename to types/handsontable/handsontable-tests.ts index f744c10483..8ff99cc0b7 100644 --- a/handsontable/handsontable-tests.ts +++ b/types/handsontable/handsontable-tests.ts @@ -1,8 +1,6 @@ - - function test_HandsontableInit() { - var elem = document.createElement('div'); - var hot = new Handsontable(elem, { + const elem = document.createElement('div'); + const hot = new Handsontable(elem, { allowEmpty: true, allowInsertColumn: true, allowInsertRow: true, @@ -206,8 +204,8 @@ function test_HandsontableInit() { } function test_HandsontableMethods() { - var elem = document.createElement('div'); - var hot = new Handsontable(elem, {}); + const elem = document.createElement('div'); + const hot = new Handsontable(elem, {}); hot.addHook('foo', []); hot.addHookOnce('foo', []); hot.alter('foo', 123, 123, 'foo', true); @@ -298,4 +296,4 @@ class MyCustomHotPlugin extends Handsontable.plugins.BasePlugin { isEnabled(): boolean { return !!this.hot.getSettings().manualRowMove; } -} \ No newline at end of file +} diff --git a/handsontable/index.d.ts b/types/handsontable/index.d.ts similarity index 99% rename from handsontable/index.d.ts rename to types/handsontable/index.d.ts index e569ee58f7..ed2f0db27f 100644 --- a/handsontable/index.d.ts +++ b/types/handsontable/index.d.ts @@ -311,7 +311,6 @@ declare namespace ht { editor?: string | EditorConstructor; selectOptions?: any[]; width?: number; - } interface CellProperties { @@ -506,7 +505,7 @@ declare var Handsontable: { }; declare module "handsontable" { - export var Handsontable: { + const Handsontable: { new (element: Element, options: ht.Options): ht.Methods; plugins: ht.Plugins; hooks: ht.Hooks; diff --git a/handsontable/tsconfig.json b/types/handsontable/tsconfig.json similarity index 100% rename from handsontable/tsconfig.json rename to types/handsontable/tsconfig.json diff --git a/handsontable/tslint.json b/types/handsontable/tslint.json similarity index 100% rename from handsontable/tslint.json rename to types/handsontable/tslint.json diff --git a/hapi-auth-jwt2/hapi-auth-jwt2-tests.ts b/types/hapi-auth-jwt2/hapi-auth-jwt2-tests.ts similarity index 100% rename from hapi-auth-jwt2/hapi-auth-jwt2-tests.ts rename to types/hapi-auth-jwt2/hapi-auth-jwt2-tests.ts diff --git a/hapi-auth-jwt2/index.d.ts b/types/hapi-auth-jwt2/index.d.ts similarity index 100% rename from hapi-auth-jwt2/index.d.ts rename to types/hapi-auth-jwt2/index.d.ts diff --git a/hapi-auth-jwt2/tsconfig.json b/types/hapi-auth-jwt2/tsconfig.json similarity index 100% rename from hapi-auth-jwt2/tsconfig.json rename to types/hapi-auth-jwt2/tsconfig.json diff --git a/hapi-auth-jwt2/tslint.json b/types/hapi-auth-jwt2/tslint.json similarity index 100% rename from hapi-auth-jwt2/tslint.json rename to types/hapi-auth-jwt2/tslint.json diff --git a/hapi-decorators/hapi-decorators-tests.ts b/types/hapi-decorators/hapi-decorators-tests.ts similarity index 100% rename from hapi-decorators/hapi-decorators-tests.ts rename to types/hapi-decorators/hapi-decorators-tests.ts diff --git a/hapi-decorators/index.d.ts b/types/hapi-decorators/index.d.ts similarity index 100% rename from hapi-decorators/index.d.ts rename to types/hapi-decorators/index.d.ts diff --git a/hapi-decorators/tsconfig.json b/types/hapi-decorators/tsconfig.json similarity index 100% rename from hapi-decorators/tsconfig.json rename to types/hapi-decorators/tsconfig.json diff --git a/hapi/hapi-tests.ts b/types/hapi/hapi-tests.ts similarity index 100% rename from hapi/hapi-tests.ts rename to types/hapi/hapi-tests.ts diff --git a/hapi/index.d.ts b/types/hapi/index.d.ts similarity index 100% rename from hapi/index.d.ts rename to types/hapi/index.d.ts diff --git a/hapi/tsconfig.json b/types/hapi/tsconfig.json similarity index 100% rename from hapi/tsconfig.json rename to types/hapi/tsconfig.json diff --git a/hapi/v8/hapi-tests.ts b/types/hapi/v8/hapi-tests.ts similarity index 100% rename from hapi/v8/hapi-tests.ts rename to types/hapi/v8/hapi-tests.ts diff --git a/hapi/v8/index.d.ts b/types/hapi/v8/index.d.ts similarity index 100% rename from hapi/v8/index.d.ts rename to types/hapi/v8/index.d.ts diff --git a/hapi/v8/tsconfig.json b/types/hapi/v8/tsconfig.json similarity index 100% rename from hapi/v8/tsconfig.json rename to types/hapi/v8/tsconfig.json diff --git a/har-format/har-format-tests.ts b/types/har-format/har-format-tests.ts similarity index 100% rename from har-format/har-format-tests.ts rename to types/har-format/har-format-tests.ts diff --git a/har-format/index.d.ts b/types/har-format/index.d.ts similarity index 100% rename from har-format/index.d.ts rename to types/har-format/index.d.ts diff --git a/har-format/tsconfig.json b/types/har-format/tsconfig.json similarity index 100% rename from har-format/tsconfig.json rename to types/har-format/tsconfig.json diff --git a/har-format/tslint.json b/types/har-format/tslint.json similarity index 100% rename from har-format/tslint.json rename to types/har-format/tslint.json diff --git a/harmony-proxy/harmony-proxy-tests.ts b/types/harmony-proxy/harmony-proxy-tests.ts similarity index 100% rename from harmony-proxy/harmony-proxy-tests.ts rename to types/harmony-proxy/harmony-proxy-tests.ts diff --git a/harmony-proxy/index.d.ts b/types/harmony-proxy/index.d.ts similarity index 100% rename from harmony-proxy/index.d.ts rename to types/harmony-proxy/index.d.ts diff --git a/harmony-proxy/tsconfig.json b/types/harmony-proxy/tsconfig.json similarity index 100% rename from harmony-proxy/tsconfig.json rename to types/harmony-proxy/tsconfig.json diff --git a/hasher/hasher-tests.ts b/types/hasher/hasher-tests.ts similarity index 100% rename from hasher/hasher-tests.ts rename to types/hasher/hasher-tests.ts diff --git a/hasher/index.d.ts b/types/hasher/index.d.ts similarity index 100% rename from hasher/index.d.ts rename to types/hasher/index.d.ts diff --git a/hasher/tsconfig.json b/types/hasher/tsconfig.json similarity index 100% rename from hasher/tsconfig.json rename to types/hasher/tsconfig.json diff --git a/hashids/hashids-tests.ts b/types/hashids/hashids-tests.ts similarity index 100% rename from hashids/hashids-tests.ts rename to types/hashids/hashids-tests.ts diff --git a/hashids/index.d.ts b/types/hashids/index.d.ts similarity index 100% rename from hashids/index.d.ts rename to types/hashids/index.d.ts diff --git a/hashids/tsconfig.json b/types/hashids/tsconfig.json similarity index 100% rename from hashids/tsconfig.json rename to types/hashids/tsconfig.json diff --git a/hashmap/hashmap-tests.ts b/types/hashmap/hashmap-tests.ts similarity index 100% rename from hashmap/hashmap-tests.ts rename to types/hashmap/hashmap-tests.ts diff --git a/hashmap/index.d.ts b/types/hashmap/index.d.ts similarity index 100% rename from hashmap/index.d.ts rename to types/hashmap/index.d.ts diff --git a/hashmap/tsconfig.json b/types/hashmap/tsconfig.json similarity index 100% rename from hashmap/tsconfig.json rename to types/hashmap/tsconfig.json diff --git a/hashmap/v1/hashmap-tests.ts b/types/hashmap/v1/hashmap-tests.ts similarity index 100% rename from hashmap/v1/hashmap-tests.ts rename to types/hashmap/v1/hashmap-tests.ts diff --git a/hashmap/v1/index.d.ts b/types/hashmap/v1/index.d.ts similarity index 100% rename from hashmap/v1/index.d.ts rename to types/hashmap/v1/index.d.ts diff --git a/hashmap/v1/tsconfig.json b/types/hashmap/v1/tsconfig.json similarity index 100% rename from hashmap/v1/tsconfig.json rename to types/hashmap/v1/tsconfig.json diff --git a/hashset/hashset-tests.ts b/types/hashset/hashset-tests.ts similarity index 100% rename from hashset/hashset-tests.ts rename to types/hashset/hashset-tests.ts diff --git a/hashset/index.d.ts b/types/hashset/index.d.ts similarity index 100% rename from hashset/index.d.ts rename to types/hashset/index.d.ts diff --git a/hashset/tsconfig.json b/types/hashset/tsconfig.json similarity index 100% rename from hashset/tsconfig.json rename to types/hashset/tsconfig.json diff --git a/hashtable/hashtable-tests.ts b/types/hashtable/hashtable-tests.ts similarity index 100% rename from hashtable/hashtable-tests.ts rename to types/hashtable/hashtable-tests.ts diff --git a/hashtable/index.d.ts b/types/hashtable/index.d.ts similarity index 100% rename from hashtable/index.d.ts rename to types/hashtable/index.d.ts diff --git a/hashtable/tsconfig.json b/types/hashtable/tsconfig.json similarity index 100% rename from hashtable/tsconfig.json rename to types/hashtable/tsconfig.json diff --git a/he/he-tests.ts b/types/he/he-tests.ts similarity index 100% rename from he/he-tests.ts rename to types/he/he-tests.ts diff --git a/he/index.d.ts b/types/he/index.d.ts similarity index 100% rename from he/index.d.ts rename to types/he/index.d.ts diff --git a/he/tsconfig.json b/types/he/tsconfig.json similarity index 100% rename from he/tsconfig.json rename to types/he/tsconfig.json diff --git a/headroom/headroom-tests.ts b/types/headroom/headroom-tests.ts similarity index 100% rename from headroom/headroom-tests.ts rename to types/headroom/headroom-tests.ts diff --git a/headroom/index.d.ts b/types/headroom/index.d.ts similarity index 100% rename from headroom/index.d.ts rename to types/headroom/index.d.ts diff --git a/headroom/tsconfig.json b/types/headroom/tsconfig.json similarity index 100% rename from headroom/tsconfig.json rename to types/headroom/tsconfig.json diff --git a/heap/heap-tests.ts b/types/heap/heap-tests.ts similarity index 100% rename from heap/heap-tests.ts rename to types/heap/heap-tests.ts diff --git a/heap/index.d.ts b/types/heap/index.d.ts similarity index 100% rename from heap/index.d.ts rename to types/heap/index.d.ts diff --git a/heap/tsconfig.json b/types/heap/tsconfig.json similarity index 100% rename from heap/tsconfig.json rename to types/heap/tsconfig.json diff --git a/heatmap.js/heatmap.js-tests.ts b/types/heatmap.js/heatmap.js-tests.ts similarity index 100% rename from heatmap.js/heatmap.js-tests.ts rename to types/heatmap.js/heatmap.js-tests.ts diff --git a/types/heatmap.js/index.d.ts b/types/heatmap.js/index.d.ts new file mode 100644 index 0000000000..60ee16c4f0 --- /dev/null +++ b/types/heatmap.js/index.d.ts @@ -0,0 +1,142 @@ +// Type definitions for heatmap.js v2.0 +// Project: https://github.com/pa7/heatmap.js/ +// Definitions by: Yang Guan +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +import * as Leaflet from "leaflet"; + +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 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 + */ + 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: Leaflet.Map): void; + + /* + * Remove the overlay's elements from the DOM and remove listeners + * previously added by onAdd() + */ + onRemove(map: Leaflet.Map): void; + + /* + * Initialize a heatmap instance with the given dataset + */ + setData(data: HeatmapData): void; + } +} diff --git a/types/heatmap.js/tsconfig.json b/types/heatmap.js/tsconfig.json new file mode 100644 index 0000000000..055cfad536 --- /dev/null +++ b/types/heatmap.js/tsconfig.json @@ -0,0 +1,28 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "paths": { + "leaflet": [ + "leaflet/v0" + ] + }, + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "heatmap.js-tests.ts" + ] +} \ No newline at end of file diff --git a/hellojs/hellojs-tests.ts b/types/hellojs/hellojs-tests.ts similarity index 100% rename from hellojs/hellojs-tests.ts rename to types/hellojs/hellojs-tests.ts diff --git a/hellojs/index.d.ts b/types/hellojs/index.d.ts similarity index 100% rename from hellojs/index.d.ts rename to types/hellojs/index.d.ts diff --git a/hellojs/tsconfig.json b/types/hellojs/tsconfig.json similarity index 100% rename from hellojs/tsconfig.json rename to types/hellojs/tsconfig.json diff --git a/hellosign-embedded/hellosign-embedded-tests.ts b/types/hellosign-embedded/hellosign-embedded-tests.ts similarity index 95% rename from hellosign-embedded/hellosign-embedded-tests.ts rename to types/hellosign-embedded/hellosign-embedded-tests.ts index 281bbef2ab..4ff618e812 100644 --- a/hellosign-embedded/hellosign-embedded-tests.ts +++ b/types/hellosign-embedded/hellosign-embedded-tests.ts @@ -1,3 +1,5 @@ +import { HelloSign } from 'hellosign-embedded'; + HelloSign.init('abc123'); // some options diff --git a/hellosign-embedded/index.d.ts b/types/hellosign-embedded/index.d.ts similarity index 99% rename from hellosign-embedded/index.d.ts rename to types/hellosign-embedded/index.d.ts index ec77a92b92..e7a94beaf0 100644 --- a/hellosign-embedded/index.d.ts +++ b/types/hellosign-embedded/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/HelloFax/hellosign-embedded // Definitions by: Brian Surowiec // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -declare module HelloSign { +export declare module HelloSign { interface SignedMessageEvent { event: 'signature_request_signed'; signature_id: string; @@ -268,3 +268,5 @@ declare module HelloSign { } declare var HelloSign: HelloSign.HelloSignStatic; + +export as namespace HelloSign; diff --git a/hellosign-embedded/tsconfig.json b/types/hellosign-embedded/tsconfig.json similarity index 100% rename from hellosign-embedded/tsconfig.json rename to types/hellosign-embedded/tsconfig.json diff --git a/helmet/helmet-tests.ts b/types/helmet/helmet-tests.ts similarity index 100% rename from helmet/helmet-tests.ts rename to types/helmet/helmet-tests.ts diff --git a/helmet/index.d.ts b/types/helmet/index.d.ts similarity index 100% rename from helmet/index.d.ts rename to types/helmet/index.d.ts diff --git a/helmet/tsconfig.json b/types/helmet/tsconfig.json similarity index 100% rename from helmet/tsconfig.json rename to types/helmet/tsconfig.json diff --git a/heremaps/heremaps-tests.ts b/types/heremaps/heremaps-tests.ts similarity index 100% rename from heremaps/heremaps-tests.ts rename to types/heremaps/heremaps-tests.ts diff --git a/heremaps/index.d.ts b/types/heremaps/index.d.ts similarity index 100% rename from heremaps/index.d.ts rename to types/heremaps/index.d.ts diff --git a/heremaps/tsconfig.json b/types/heremaps/tsconfig.json similarity index 100% rename from heremaps/tsconfig.json rename to types/heremaps/tsconfig.json diff --git a/highcharts-ng/highcharts-ng-tests.ts b/types/highcharts-ng/highcharts-ng-tests.ts similarity index 100% rename from highcharts-ng/highcharts-ng-tests.ts rename to types/highcharts-ng/highcharts-ng-tests.ts diff --git a/highcharts-ng/index.d.ts b/types/highcharts-ng/index.d.ts similarity index 100% rename from highcharts-ng/index.d.ts rename to types/highcharts-ng/index.d.ts diff --git a/highcharts-ng/tsconfig.json b/types/highcharts-ng/tsconfig.json similarity index 100% rename from highcharts-ng/tsconfig.json rename to types/highcharts-ng/tsconfig.json diff --git a/highcharts/highcharts-more.d.ts b/types/highcharts/highcharts-more.d.ts similarity index 100% rename from highcharts/highcharts-more.d.ts rename to types/highcharts/highcharts-more.d.ts diff --git a/highcharts/highstock.d.ts b/types/highcharts/highstock.d.ts similarity index 94% rename from highcharts/highstock.d.ts rename to types/highcharts/highstock.d.ts index bd7f0bffd4..35c1179ff1 100644 --- a/highcharts/highstock.d.ts +++ b/types/highcharts/highstock.d.ts @@ -30,10 +30,10 @@ declare namespace Highstock { } interface RangeSelectorButton { - type: string; //Defines the timespan, can be one of 'millisecond', 'second', 'minute', 'day', 'week', 'month', 'ytd' (year to date), 'year' and 'all'. + type: string; // Defines the timespan, can be one of 'millisecond', 'second', 'minute', 'day', 'week', 'month', 'ytd' (year to date), 'year' and 'all'. count?: number; text: string; - dataGrouping?: any; //not sure how this works + dataGrouping?: any; // not sure how this works } interface RangeSelectorOptions { @@ -97,7 +97,6 @@ declare namespace Highstock { } } - declare global { interface JQuery { highcharts(type: "StockChart"): Highstock.ChartObject; @@ -117,7 +116,6 @@ declare global { **/ highcharts(type: "StockChart", options: Highstock.Options, callback: (chart: Highstock.ChartObject) => void): JQuery; - highcharts(type: string): Highcharts.ChartObject; highcharts(type: string, options: Highcharts.Options): JQuery; highcharts(type: string, options: Highcharts.Options, callback: (chart: Highcharts.ChartObject) => void): JQuery; @@ -126,4 +124,4 @@ declare global { declare var Highstock: Highstock.Static; export = Highstock; -export as namespace Highstock; \ No newline at end of file +export as namespace Highstock; diff --git a/highcharts/index.d.ts b/types/highcharts/index.d.ts similarity index 97% rename from highcharts/index.d.ts rename to types/highcharts/index.d.ts index 968b5975fb..9fe60ef542 100644 --- a/highcharts/index.d.ts +++ b/types/highcharts/index.d.ts @@ -530,7 +530,9 @@ declare namespace Highcharts { */ gridLineColor?: string; /** - * The dash or dot style of the grid lines. For possible values, see {@http://jsfiddle.net/gh/get/jquery/1.7.2/highslide-software/highcharts.com/tree/master/samples/highcharts/plotoptions/series-dashstyle-all/|this demonstration}. Defaults to Solid. + * The dash or dot style of the grid lines. For possible values, + * see {@http://jsfiddle.net/gh/get/jquery/1.7.2/highslide-software/highcharts.com/tree/master/samples/highcharts/plotoptions/series-dashstyle-all/|this demonstration}. + * Defaults to Solid. * @since 1.2 */ gridLineDashStyle?: string; @@ -627,7 +629,8 @@ declare namespace Highcharts { */ minorGridLineColor?: string; /** - * The dash or dot style of the minor grid lines. For possible values, see {@link http://jsfiddle.net/gh/get/jquery/1.7.1/highslide-software/highcharts.com/tree/master/samples/highcharts/plotoptions/series-dashstyle-all/|this demonstration}. + * The dash or dot style of the minor grid lines. For possible values, + * see {@link http://jsfiddle.net/gh/get/jquery/1.7.1/highslide-software/highcharts.com/tree/master/samples/highcharts/plotoptions/series-dashstyle-all/|this demonstration}. * @default 'Solid' */ minorGridLineDashStyle?: string; @@ -3326,7 +3329,6 @@ declare namespace 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; - } interface Halo { @@ -5315,7 +5317,7 @@ declare namespace Highcharts { interface CrosshairObject { color?: string | Gradient; width?: number; - dashStyle?: string; //Solid ShortDash ShortDot ShortDashDot ShortDashDotDot Dot Dash LongDash DashDot LongDashDot LongDashDotDot + dashStyle?: string; // Solid ShortDash ShortDot ShortDashDot ShortDashDotDot Dot Dash LongDash DashDot LongDashDot LongDashDotDot zIndex?: number; } @@ -5738,7 +5740,8 @@ declare namespace Highcharts { * @param {number} min The new minimum value * @param {number} max The new maximum value * @param {boolean} redraw Whether to redraw the chart or wait for an explicit call to chart.redraw(). - * @param {boolean | Animation} animation When true, the resize will be animated with default animation options. The animation can also be a configuration object with properties duration and easing. + * @param {boolean | Animation} animation When true, the resize will be animated with default animation options. + * The animation can also be a configuration object with properties duration and easing. * @since 1.2.0 */ setExtremes(min?: number, max?: number, redraw?: boolean, animation?: boolean | Animation, eventArguments?: any): void; @@ -5788,7 +5791,8 @@ declare namespace Highcharts { * @param {AxisOptions} options The Axis options, as documented under xAxis and yAxis. * @param [boolean] isX Whether it is an X axis or Y axis * @param [boolean] redraw Defaults to true. Whether to redraw the chart after the series is added. See the redraw() method. - * @param [boolean | Animation] animation Defaults to true. When true, the series' updating will be animated with default animation options. The animation can also be a configuration object with properties duration and easing. + * @param [boolean | Animation] animation Defaults to true. When true, the series' updating will be animated with default animation options. + * The animation can also be a configuration object with properties duration and easing. * @return {AxisObject} * @since 3.0 */ @@ -5836,14 +5840,20 @@ declare namespace Highcharts { /** * Exporting module required. Submit an SVG version of the chart to a server along with some parameters for * conversion. - * @param {ExportingOptions} options Exporting options. Out of the exporting options, the following options can be given as parameters to the exportChart method. All options default to the values given in the exporting config options. filename: the filename for the export without extension, url: the URL for the server module to do the conversion, width: the width of the PNG or JPEG image generated on the server, type: the MIME type of the converted image, sourceWidth: the width of the source (in-page) chart, sourceHeight: the height of the source chart. + * @param {ExportingOptions} options Exporting options. Out of the exporting options, the following options can be given as parameters to the exportChart method. + * All options default to the values given in the exporting config options. filename: the filename for the export without extension, + * url: the URL for the server module to do the conversion, width: the width of the PNG or JPEG image generated on the server, + * type: the MIME type of the converted image, sourceWidth: the width of the source (in-page) chart, sourceHeight: the height of the source chart. * @since 2.0 */ exportChart(options: ExportingOptions): void; /** * Exporting module required. Submit an SVG version of the chart to a server along with some parameters for * conversion. - * @param {ExportingOptions} options Exporting options. Out of the exporting options, the following options can be given as parameters to the exportChart method. All options default to the values given in the exporting config options. filename: the filename for the export without extension, url: the URL for the server module to do the conversion, width: the width of the PNG or JPEG image generated on the server, type: the MIME type of the converted image, sourceWidth: the width of the source (in-page) chart, sourceHeight: the height of the source chart. + * @param {ExportingOptions} options Exporting options. Out of the exporting options, the following options can be given as parameters to the exportChart method. + * All options default to the values given in the exporting config options. filename: the filename for the export without extension, + * url: the URL for the server module to do the conversion, width: the width of the PNG or JPEG image generated on the server, + * type: the MIME type of the converted image, sourceWidth: the width of the source (in-page) chart, sourceHeight: the height of the source chart. * @param {Options} chartOptions Additional chart options for the exported chart. For example a different background color can be added here. * @since 2.0 */ @@ -5881,7 +5891,8 @@ declare namespace Highcharts { get(id: string): AxisObject | SeriesObject | PointObject; /** * Exporting module required. Get an SVG string representing the chart. - * @param {Options} additionalOptions Chart options to add to the exported chart in addition to the options given for the original chart. For example if series.lineWidth should be greater in the exported chart than in the original, or the chart should have a different background color, this is added here. + * @param {Options} additionalOptions Chart options to add to the exported chart in addition to the options given for the original chart. + * For example if series.lineWidth should be greater in the exported chart than in the original, or the chart should have a different background color, this is added here. * @return {string} * @since 2.0 */ @@ -5922,7 +5933,8 @@ declare namespace Highcharts { * more than one operation on the chart before redrawing, for example add a number of points. In those cases it is a * waste of resources to redraw the chart for each new point added. So you add the points and call chart.redraw() * after. - * @param [boolean | Animation] animation Defaults to true. When true, the update will be animated with default animation options. The animation can also be a configuration object with properties duration and easing. + * @param [boolean | Animation] animation Defaults to true. When true, the update will be animated with default animation options. + * The animation can also be a configuration object with properties duration and easing. * @since 1.2.0 */ redraw(animation?: boolean | Animation): void; @@ -5942,7 +5954,8 @@ declare namespace Highcharts { * Resize the chart to a given width and height. * @param {number} width The new pixel width of the chart. * @param {number} height The new pixel height of the chart. - * @param {boolean | Animation} animation Defaults to true. When true, the resize will be animated with default animation options. The animation can also be a configuration object with properties duration and easing. + * @param {boolean | Animation} animation Defaults to true. When true, the resize will be animated with default animation options. + * The animation can also be a configuration object with properties duration and easing. */ setSize(width: number, height: number, animation?: boolean | Animation): void; /** @@ -6004,7 +6017,10 @@ declare namespace Highcharts { /** * This is the constructor for creating a new chart object. * @param {Options} options The chart options - * @param callback A function to execute when the chart object is finished loading and rendering. In most cases the chart is built in one thread, but in Internet Explorer version 8 or less the chart is sometimes initiated before the document is ready, and in these cases the chart object will not be finished directly after callingnew Highcharts.Chart(). As a consequence, code that relies on the newly built Chart object should always run in the callback. Defining a chart.event.load handler is equivalent. + * @param callback A function to execute when the chart object is finished loading and rendering. In most cases the chart is built in one thread, + * but in Internet Explorer version 8 or less the chart is sometimes initiated before the document is ready, + * and in these cases the chart object will not be finished directly after callingnew Highcharts.Chart(). + * s a consequence, code that relies on the newly built Chart object should always run in the callback. Defining a chart.event.load handler is equivalent. * @return {ChartObject} */ new (options: Options, callback: (chart: ChartObject) => void): ChartObject; @@ -6019,7 +6035,10 @@ declare namespace Highcharts { * This is the constructor for creating a new chart object. * @param {string|HTMLElement} renderTo The id or a reference to a DOM element where the chart should be rendered (since v4.2.0). * @param {Options} options The chart options - * @param callback A function to execute when the chart object is finished loading and rendering. In most cases the chart is built in one thread, but in Internet Explorer version 8 or less the chart is sometimes initiated before the document is ready, and in these cases the chart object will not be finished directly after callingnew Highcharts.Chart(). As a consequence, code that relies on the newly built Chart object should always run in the callback. Defining a chart.event.load handler is equivalent. + * @param callback A function to execute when the chart object is finished loading and rendering. In most cases the chart is built in one thread, + * but in Internet Explorer version 8 or less the chart is sometimes initiated before the document is ready, + * and in these cases the chart object will not be finished directly after callingnew Highcharts.Chart(). + * As a consequence, code that relies on the newly built Chart object should always run in the callback. Defining a chart.event.load handler is equivalent. * @return {ChartObject} */ new (renderTo: string | HTMLElement, options: Options, callback: (chart: ChartObject) => void): ChartObject; @@ -6042,7 +6061,8 @@ declare namespace Highcharts { * Apply numeric attributes to the SVG/VML element by animation. See Element.attr() for more information on setting * attributes. * @param {any} attributes A set of attributes to apply. - * @param {any} animation Optional animation parameters that are passed over to jQuery or other framework. Valid properties depend on the library, but options like duration, easing and complete are supported by jQuery. + * @param {any} animation Optional animation parameters that are passed over to jQuery or other framework. + * Valid properties depend on the library, but options like duration, easing and complete are supported by jQuery. * @return {ElementObject} * @since 2.0 */ @@ -6131,7 +6151,8 @@ declare namespace Highcharts { circle(centerX: number, centerY: number, radius: number): ElementObject; /** * Add an SVG/VML group. - * @param [string] name The name of the group. This will be used in the class name, which will be 'highcharts-'+ name. Other Element objects are added to the group by using the group as the first parameter in .add() for the wrappers + * @param [string] name The name of the group. This will be used in the class name, which will be 'highcharts-'+ name. + * Other Element objects are added to the group by using the group as the first parameter in .add() for the wrappers * @return {ElementObject} * @since 2.0 */ @@ -6159,7 +6180,8 @@ declare namespace Highcharts { * @param [number] anchorX If the shape has a pointer, like the chevron on a callout shape, anchorX is the x position to point to. * @param [number] anchorY If the shape has a pointer, like the chevron on a callout shape, anchorY is the y position to point to. * @param [boolean] useHTML Use HTML to render the text of the label. - * @param [boolean] baseline Whether the label should be vertically aligned by the text baseline, which makes it behave like the text element, or by the top left side, which makes it behave like a HTML div. + * @param [boolean] baseline Whether the label should be vertically aligned by the text baseline, which makes it behave like the text element, + * or by the top left side, which makes it behave like a HTML div. * @param [string] className A class name for the g element surrounding the label. * @return {ElementObject} * @since 2.0 @@ -6286,15 +6308,18 @@ declare namespace Highcharts { percentage: number; /** * Remove the point from the series. - * @param [boolean] redraw Defaults to true. Whether to redraw the chart after the point is removed.If doing more operations on the chart, it is a good idea to set redraw to false and call chart.redraw() after. - * @param [boolean|Animation] animation Defaults to true. When true, the graph's updating will be animated with default animation options. The animation can also be a configuration object with properties duration and easing. + * @param [boolean] redraw Defaults to true. Whether to redraw the chart after the point is removed.If doing more operations on the chart, + * it is a good idea to set redraw to false and call chart.redraw() after. + * @param [boolean|Animation] animation Defaults to true. When true, the graph's updating will be animated with default animation options. + * The animation can also be a configuration object with properties duration and easing. * @since 1.2.0 */ remove(redraw?: boolean, animation?: boolean | Animation): void; /** * Select or unselect the point. * @param [boolean] select When true, the point is selected. When false, the point is unselected. When null or undefined, the selection state is toggled. - * @param [boolean] accumulate When true, the selection is added to other selected points. When false, other selected points are deselected. Internally in Highcharts,selected points are accumulated on Control, Shift or Cmd clicking the point. + * @param [boolean] accumulate When true, the selection is added to other selected points. When false, other selected points are deselected. + * Internally in Highcharts,selected points are accumulated on Control, Shift or Cmd clicking the point. * @since 1.2.0 */ select(select?: boolean, accumulate?: boolean): void; @@ -6313,7 +6338,8 @@ declare namespace Highcharts { * is selected. * @param [boolean] sliced When true, the point is sliced out. When false, the point is set in. When null or undefined, the sliced state is toggled. * @param [boolean] redraw Defaults to true. Whether to redraw the chart after the point is altered. - * @param [boolean|Animation] animation Defaults to true. When true, the move will be animated with default animation options. The animation can also be a configuration object with properties duration and easing. + * @param [boolean|Animation] animation Defaults to true. When true, the move will be animated with default animation options. + * The animation can also be a configuration object with properties duration and easing. * @since 1.2.0 */ slice(sliced?: boolean, redraw?: boolean, animation?: boolean | Animation): void; @@ -6323,9 +6349,13 @@ declare namespace Highcharts { total: number; /** * Update the point with new values. - * @param {number|[number,number]|DataPoint} options The point options. Point options are handled as described under the series.data item for each series type. For example for a line series, if options is a single number, the point will be given that number as the main y value. If it is an array, it will be interpreted as x and y values respectively. If it is an object, advanced options are applied. - * @param [boolean] redraw Defaults to true. Whether to redraw the chart after the point is updated.If doing more operations on the chart, it is a good idea to set redraw to false and call chart.redraw() after. - * @param {boolean|Animation} animation Defaults to true. When true, the update will be animated with default animation options. The animation can also be a configuration object with properties duration and easing. + * @param {number|[number,number]|DataPoint} options The point options. Point options are handled as described under the series.data item for each series type. + * For example for a line series, if options is a single number, the point will be given that number as the main y value. If it is an array, + * it will be interpreted as x and y values respectively. If it is an object, advanced options are applied. + * @param [boolean] redraw Defaults to true. Whether to redraw the chart after the point is updated.If doing more operations on the chart, + * it is a good idea to set redraw to false and call chart.redraw() after. + * @param {boolean|Animation} animation Defaults to true. When true, the update will be animated with default animation options. + * The animation can also be a configuration object with properties duration and easing. * @since 1.2.0 */ update(options: number | [number, number] | DataPoint, redraw?: boolean, animation?: boolean | Animation): void; @@ -6359,10 +6389,14 @@ declare namespace Highcharts { /** * Add a point to the series after render time. The point can be added at the end, or by giving it an X value, to * the start or in the middle of the series. - * @param {number|[number,number]|DataPoint} The point options. If options is a single number, a point with that y value is appended to the series.If it is an array, it will be interpreted as x and y values respectively. If it is an object, advanced options as outlined under series.data are applied. - * @param [boolean=true] redraw - Whether to redraw the chart after the point is added. When adding more than one point, it is highly recommended that the redraw option be set to false, and instead chart.redraw() is explicitly called after the adding of points is finished. - * @param [boolean=false] shift - When shift is true, one point is shifted off the start of the series as one is appended to the end. Use this option for live charts monitoring a value over time. - * @param [(boolean|Animation)=false] animation - When shift is true, one point is shifted off the start of the series as one is appended to the end. Use this option for live charts monitoring a value over time. + * @param {number|[number,number]|DataPoint} The point options. If options is a single number, a point with that y value is appended to the series. + * If it is an array, it will be interpreted as x and y values respectively. If it is an object, advanced options as outlined under series.data are applied. + * @param [boolean=true] redraw - Whether to redraw the chart after the point is added. When adding more than one point, + * it is highly recommended that the redraw option be set to false, and instead chart.redraw() is explicitly called after the adding of points is finished. + * @param [boolean=false] shift - When shift is true, one point is shifted off the start of the series as one is appended to the end. + * Use this option for live charts monitoring a value over time. + * @param [(boolean|Animation)=false] animation - When shift is true, one point is shifted off the start of the series as one is appended to the end. + * Use this option for live charts monitoring a value over time. * @since 1.2.0 */ addPoint(options: number | [number, number] | DataPoint, redraw?: boolean, shift?: boolean, animation?: boolean | Animation): void; @@ -6394,7 +6428,8 @@ declare namespace Highcharts { options: IndividualSeriesOptions; /** * Remove the series from the chart. - * @param [boolean=true] redraw - Whether to redraw the chart after the series is removed.If doing more operations on the chart, it is a good idea to set redraw to false and call chart.redraw() after. + * @param [boolean=true] redraw - Whether to redraw the chart after the series is removed.If doing more operations on the chart, + * it is a good idea to set redraw to false and call chart.redraw() after. * @since 1.2.0 */ remove(redraw?: boolean): void; @@ -6402,8 +6437,10 @@ declare namespace Highcharts { * Remove a point from the series. Unlike the Point.remove method, this can also be done on a point that is not * instanciated because it is outside the view or subject to data grouping. * @param {number} index - The index of the point in the data array. - * @param [boolean=true] redraw - Whether to redraw the chart after the point is added. When adding more than one point, it is highly recommended that the redraw option be set to false, and instead chart.redraw() is explicitly called after the adding of points is finished. - * @param [boolean|Animation=true] animation - When true, the graph will be animated with default animation options. The animation can also be a configuration object with properties duration and easing. + * @param [boolean=true] redraw - Whether to redraw the chart after the point is added. When adding more than one point, + * it is highly recommended that the redraw option be set to false, and instead chart.redraw() is explicitly called after the adding of points is finished. + * @param [boolean|Animation=true] animation - When true, the graph will be animated with default animation options. + * The animation can also be a configuration object with properties duration and easing. * @since 4.1.0 */ removePoint(index: number, redraw?: boolean, animation?: boolean | Animation): void; @@ -6423,16 +6460,20 @@ declare namespace Highcharts { * Apply a new set of data to the series and optionally redraw it. Note that this method throws away all points and * creates new ones. For updating the values of existing points, use Point.update() instead. * @param {number[]|number[][]|DataPoint[]} data - Takes an array of data in the same format as described under seriesdata for the given series type. - * @param [boolean=true] redraw - Whether to redraw the chart after the series is altered.If doing more operations on the chart, it is a good idea to set redraw to false and call chart.redraw() after. - * @param [boolean|Animation] animation - When the updated data is the same length as the existing data, points will be updated by default, and animation visualizes how the points are changed. Set false to disable animation, or a configuration object to set duration or easing. - * @param [boolean] updatePoints - When the updated data is the same length as the existing data, points will be updated instead of replace. This option prevents this, and makes setData behave like it did prior to Highcharts 3.0.10. + * @param [boolean=true] redraw - Whether to redraw the chart after the series is altered.If doing more operations on the chart, + * it is a good idea to set redraw to false and call chart.redraw() after. + * @param [boolean|Animation] animation - When the updated data is the same length as the existing data, points will be updated by default, + * and animation visualizes how the points are changed. Set false to disable animation, or a configuration object to set duration or easing. + * @param [boolean] updatePoints - When the updated data is the same length as the existing data, points will be updated instead of replace. + * This option prevents this, and makes setData behave like it did prior to Highcharts 3.0.10. * @since 1.2.0 */ setData(data: number[] | number[][] | DataPoint[], redraw?: boolean, animation?: boolean | Animation, updatePoints?: boolean): void; /** * A utility function to show or hide the series with an optional redraw. * @param [boolean] visible - Whether to show or hide the series. If undefined, the visibility is toggled. - * @param [boolean=true] redraw - Whether to redraw the chart after the series is altered.If doing more operations on the chart, it is a good idea to set redraw to false and call chart.redraw() after. + * @param [boolean=true] redraw - Whether to redraw the chart after the series is altered.If doing more operations on the chart, + * it is a good idea to set redraw to false and call chart.redraw() after. * @since 1.2.0 */ setVisible(visible?: boolean, redraw?: boolean): void; @@ -6451,7 +6492,8 @@ declare namespace Highcharts { * elements from the series is removed, and it is initiated from scratch. Therefore, this method is more performance * expensive than some other utility methods like setData or setVisible. * @param {IndividualSeriesOptions} options New options that will be merged into the series' existing options. - * @param [boolean] redraw - Whether to redraw the chart after the series is altered. If doing more operations on the chart, it is a good idea to set redraw to false and call chart.redraw() after. + * @param [boolean] redraw - Whether to redraw the chart after the series is altered. If doing more operations on the chart, + * it is a good idea to set redraw to false and call chart.redraw() after. * @since 1.2.0 */ update(options: IndividualSeriesOptions, redraw?: boolean): void; diff --git a/highcharts/modules/boost.d.ts b/types/highcharts/modules/boost.d.ts similarity index 100% rename from highcharts/modules/boost.d.ts rename to types/highcharts/modules/boost.d.ts diff --git a/highcharts/modules/exporting.d.ts b/types/highcharts/modules/exporting.d.ts similarity index 100% rename from highcharts/modules/exporting.d.ts rename to types/highcharts/modules/exporting.d.ts diff --git a/types/highcharts/modules/map/index.d.ts b/types/highcharts/modules/map/index.d.ts new file mode 100644 index 0000000000..04d5a77aea --- /dev/null +++ b/types/highcharts/modules/map/index.d.ts @@ -0,0 +1,55 @@ +// Type definitions for Highmaps 4.2.7 +// Project: http://www.highcharts.com/products/highmaps +// Definitions by: Albert Ozimek +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +import * as highcharts from 'highcharts'; +import * as geojson from 'geojson'; + +declare module 'highcharts' { + interface Static { + mapChart(renderTo: string | HTMLElement, options: MapOptions, callback?: (chart: highcharts.ChartObject) => void): highcharts.ChartObject; + } + + interface MapOptions { + chart?: highcharts.ChartOptions; + + legend?: highcharts.LegendOptions; + + mapNavigation?: Navigation; + + series?: MapSeriesOptions[]; + + colorAxis?: ColorAxis; + + title?: highcharts.TitleOptions; + } + + interface MapSeriesOptions { + data?: number[] | [number, number][] | [string, number][] | highcharts.DataPoint[]; + + dataLabels?: MapSeriesOptionsDataLabels; + + joinBy?: Array; + + mapData?: geojson.GeoJsonObject; + + name?: string; + + states?: MapSeriesOptionsStates; + + tooltip?: MapSeriesOptionsTooltip; + + type?: string; + } + + interface Navigation {} + + interface MapSeriesOptionsDataLabels {} + + interface MapSeriesOptionsStates {} + + interface MapSeriesOptionsTooltip {} + + interface ColorAxis {} +} diff --git a/highcharts/modules/no-data-to-display.d.ts b/types/highcharts/modules/no-data-to-display.d.ts similarity index 100% rename from highcharts/modules/no-data-to-display.d.ts rename to types/highcharts/modules/no-data-to-display.d.ts diff --git a/highcharts/modules/offline-exporting.d.ts b/types/highcharts/modules/offline-exporting.d.ts similarity index 100% rename from highcharts/modules/offline-exporting.d.ts rename to types/highcharts/modules/offline-exporting.d.ts diff --git a/highcharts/test/boost.ts b/types/highcharts/test/boost.ts similarity index 100% rename from highcharts/test/boost.ts rename to types/highcharts/test/boost.ts diff --git a/highcharts/test/exporting.ts b/types/highcharts/test/exporting.ts similarity index 100% rename from highcharts/test/exporting.ts rename to types/highcharts/test/exporting.ts diff --git a/highcharts/test/highstock.ts b/types/highcharts/test/highstock.ts similarity index 92% rename from highcharts/test/highstock.ts rename to types/highcharts/test/highstock.ts index ac7cb883f2..7fde17d3ce 100644 --- a/highcharts/test/highstock.ts +++ b/types/highcharts/test/highstock.ts @@ -1,11 +1,10 @@ /// import * as Highcharts from "highcharts"; -var someData = [1, 2, 3, 4, 5, 6, 7, 8, 9]; +const someData = [1, 2, 3, 4, 5, 6, 7, 8, 9]; -$(function () { +$(() => { $('#container').highcharts('StockChart', { - chart: { type: "arearange" }, @@ -55,7 +54,7 @@ $(function () { } }, - series: [{ + series: [ { name: 'USD to EUR', data: someData, lineColor: "blue" diff --git a/highcharts/test/index.ts b/types/highcharts/test/index.ts similarity index 83% rename from highcharts/test/index.ts rename to types/highcharts/test/index.ts index 316e2f42a6..622ebfa8be 100644 --- a/highcharts/test/index.ts +++ b/types/highcharts/test/index.ts @@ -15,14 +15,12 @@ function originalTests() { } }); - - var animate: Highcharts.Animation = { + const animate: Highcharts.Animation = { duration: 200, easing: "linear" }; - - var gradient: Highcharts.Gradient = { + const gradient: Highcharts.Gradient = { linearGradient: { x1: 0, y1: 0, @@ -33,16 +31,16 @@ function originalTests() { [0, 'rgb(255, 255, 255)'], [1, 'rgb(200, 200, 255)'] ] - } + }; - var color = "#fcfcff"; + const color = "#fcfcff"; - var chart1 = new Highcharts.Chart({ + const chart1 = new Highcharts.Chart({ chart: { renderTo: "container" }, xAxis: {}, - series: [{ + series: [ { data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4], type: "line", allowPointSelect: true @@ -54,9 +52,9 @@ function originalTests() { data: [1, 2, 3, 4, 5] }); - console.log((chart1.series[0].options).dashStyle); + console.log(( chart1.series[0].options).dashStyle); - var chart2 = new Highcharts.Chart({ + const chart2 = new Highcharts.Chart({ chart: { renderTo: 'container', width: 400, @@ -85,7 +83,7 @@ function originalTests() { legend: { enabled: false }, - series: [{ + series: [ { data: [ [550, 870], [738, 362], [719, 711], [547, 665], [595, 197], [332, 144], [581, 555], [196, 862], [6, 837], [400, 924], [888, 148], [785, 730], @@ -109,72 +107,72 @@ function originalTests() { }] }); - var div: HTMLDivElement; - var r = new Highcharts.Renderer(div, 20, 30); - var box = r.text("Hello", 10, 10).getBBox(); + const div: HTMLDivElement = null as any; + const r = new Highcharts.Renderer(div, 20, 30); + const box = r.text("Hello", 10, 10).getBBox(); - var highChartSettings: Highcharts.Options = { + const highChartSettings: Highcharts.Options = { chart: { width: 400, height: 400 }, xAxis: [{ }], - series: [{ + series: [ { data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4] }] }; - var container = $("#container").highcharts(highChartSettings, (chart) => { + const container = $("#container").highcharts(highChartSettings, (chart) => { chart.series[0].setVisible(true, true); }); - var singleYAxisOptions: Highcharts.Options = { + const singleYAxisOptions: Highcharts.Options = { yAxis: {} }; - var multipleYAxisOptions: Highcharts.Options = { + const multipleYAxisOptions: Highcharts.Options = { yAxis: [{}, {}] }; - var renderToIdChart = new Highcharts.Chart("container", { + const renderToIdChart = new Highcharts.Chart("container", { xAxis: {}, - series: [{ + series: [ { data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4], type: "line", allowPointSelect: true }] }); - var renderToElementChart = new Highcharts.Chart(div, { + const renderToElementChart = new Highcharts.Chart(div, { xAxis: {}, - series: [{ + series: [ { data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4], type: "line", allowPointSelect: true }] }); - var createWithFunction = Highcharts.chart({ + const createWithFunction = Highcharts.chart({ xAxis: {}, - series: [{ + series: [ { data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4], type: "line", allowPointSelect: true }] }); - var createWithFunctionRenderToId = Highcharts.chart("container", { + const createWithFunctionRenderToId = Highcharts.chart("container", { xAxis: {}, - series: [{ + series: [ { data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4], type: "line", allowPointSelect: true }] }); - var createWithFunctionRenderToElement = Highcharts.chart(div, { + const createWithFunctionRenderToElement = Highcharts.chart(div, { xAxis: {}, - series: [{ + series: [ { data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4], type: "line", allowPointSelect: true @@ -183,7 +181,7 @@ function originalTests() { } function test_alldefaults() { - var options: Highcharts.Options = { + const options: Highcharts.Options = { chart: {}, credits: {}, data: {}, @@ -207,13 +205,13 @@ function test_alldefaults() { } function test_ChartOptions() { - var emptyChartOptions: Highcharts.ChartOptions = { + const emptyChartOptions: Highcharts.ChartOptions = { events: {}, options3d: {}, resetZoomButton: {} }; - var allValuesSet: Highcharts.ChartOptions = { + const allValuesSet: Highcharts.ChartOptions = { alignTicks: false, animation: { duration: 500, @@ -234,15 +232,15 @@ function test_ChartOptions() { className: "class", defaultSeriesType: "deprecated", events: { - addSeries: () => {}, - afterPrint: () => {}, - beforePrint: () => {}, - click: () => {}, - drilldown: () => {}, - drillup: () => {}, - load: () => {}, - redraw: () => {}, - selection: () => {} + addSeries: () => { }, + afterPrint: () => { }, + beforePrint: () => { }, + click: () => { }, + drilldown: () => { }, + drillup: () => { }, + load: () => { }, + redraw: () => { }, + selection: () => { } }, height: 200, ignoreHiddenSeries: true, @@ -320,7 +318,7 @@ function test_ChartOptions() { zoomType: "x" }; - //alignticks example + // alignticks example $('#container').highcharts({ chart: { alignTicks: true, @@ -350,8 +348,8 @@ function test_ChartOptions() { y: 70 }, tooltip: { - formatter: function () { - return '' + this.series.name + '
' + this.x + ': ' + this.y; + formatter() { + return ' ' + this.series.name + '
' + this.x + ': ' + this.y; } }, plotOptions: {}, @@ -378,9 +376,9 @@ function test_ChartOptions() { data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4] }] }); - var i = 1; - $('#update').click(function () { - var chart = $('#container').highcharts(); + let i = 1; + $('#update').click(() => { + const chart = $('#container').highcharts(); chart.series[0].data[0].update(i % 2 ? 200 : 0); i += 1; }); @@ -410,8 +408,8 @@ function test_ChartOptions() { y: 70 }, tooltip: { - formatter: function () { - return `${this.series.name}
${this.x}: ${this.y}`; + formatter() { + return ` ${this.series.name}
${this.x}: ${this.y}`; } }, series: [{ @@ -448,8 +446,8 @@ function test_ChartOptions() { $('#container').highcharts({ chart: { events: { - addSeries: function () { - var label = (this).renderer.label('A series was added, about to redraw chart', 100, 120) + addSeries() { + const label = ( this).renderer.label('A series was added, about to redraw chart', 100, 120) .attr({ fill: Highcharts.getOptions().colors[0], padding: 10, @@ -461,7 +459,7 @@ function test_ChartOptions() { }) .add(); - setTimeout(function () { + setTimeout(() => { label.fadeOut(); }, 1000); } @@ -476,8 +474,8 @@ function test_ChartOptions() { }); // activate the button - $('#button').click(function () { - var chart = $('#container').highcharts(); + $('#button').click(() => { + const chart = $('#container').highcharts(); chart.addSeries({ data: [216.4, 194.1, 95.6, 54.4, 29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5] @@ -578,7 +576,7 @@ function test_ChartOptions() { } function test_CreditsOptions() { - var allDefaults: Highcharts.CreditsOptions = {}; + const allDefaults: Highcharts.CreditsOptions = {}; // custom url and text example $('#container').highcharts({ @@ -597,7 +595,7 @@ function test_CreditsOptions() { function test_Data() { // all defaults - var data: Highcharts.DataOptions = {}; + const data: Highcharts.DataOptions = {}; // data from table example $('#container').highcharts({ @@ -675,7 +673,7 @@ function test_Data() { } function test_Drilldown() { - var allDefaults: Highcharts.DrilldownOptions = {}; + const allDefaults: Highcharts.DrilldownOptions = {}; // multiseries drilldown example $('#container').highcharts({ @@ -693,7 +691,7 @@ function test_Drilldown() { } } }, - series: [{ + series: [ { name: '2010', data: [{ name: 'Republican', @@ -708,7 +706,7 @@ function test_Drilldown() { y: 4, drilldown: 'other-2010' }] - }, { + }, { name: '2014', data: [{ name: 'Republican', @@ -725,7 +723,7 @@ function test_Drilldown() { }] }], drilldown: { - series: [{ + series: [ { id: 'republican-2010', data: [ ['East', 4], @@ -733,7 +731,7 @@ function test_Drilldown() { ['North', 1], ['South', 4] ] - }, { + }, { id: 'democrats-2010', data: [ ['East', 6], @@ -741,7 +739,7 @@ function test_Drilldown() { ['North', 2], ['South', 4] ] - }, { + }, { id: 'other-2010', data: [ ['East', 2], @@ -749,7 +747,7 @@ function test_Drilldown() { ['North', 3], ['South', 2] ] - }, { + }, { id: 'republican-2014', data: [ ['East', 2], @@ -757,7 +755,7 @@ function test_Drilldown() { ['North', 1], ['South', 7] ] - }, { + }, { id: 'democrats-2014', data: [ ['East', 4], @@ -765,7 +763,7 @@ function test_Drilldown() { ['North', 5], ['South', 3] ] - }, { + }, { id: 'other-2014', data: [ ['East', 7], @@ -790,7 +788,7 @@ function test_Drilldown() { } } }, - series: [{ + series: [ { name: 'Things', colorByPoint: true, data: [{ @@ -858,7 +856,7 @@ function test_Drilldown() { } function test_Exporting() { - var allDefaults: Highcharts.ExportingOptions = {}; + const allDefaults: Highcharts.ExportingOptions = {}; // source size example $('#container').highcharts({ @@ -866,7 +864,7 @@ function test_Exporting() { text: 'Highcharts sourceWidth and sourceHeight demo' }, subtitle: { - text: 'The on-screen chart is 600x400.
The exported chart is 800x400
(sourceWidth and sourceHeight multiplied by scale)', + text: 'The on-screen chart is 600x400.
The exported chart is 800x400
(sourceWidth and sourceHeight multiplied by scale)', floating: true, align: 'left', x: 60, @@ -890,15 +888,15 @@ function test_Exporting() { } function test_Loading() { - var allDefaults: Highcharts.LoadingOptions = {}; + const allDefaults: Highcharts.LoadingOptions = {}; // examples // the button handler - var isLoading = false, - $button = $('#button'), - chart: Highcharts.ChartObject; + let isLoading = false; + const $button = $('#button'); + let chart: Highcharts.ChartObject; - $button.click(function () { + $button.click(() => { if (!isLoading) { chart.showLoading(); $button.html('Hide loading'); @@ -932,7 +930,7 @@ function test_Loading() { } function test_Navigation() { - var allDefaults: Highcharts.NavigationOptions = {}; + const allDefaults: Highcharts.NavigationOptions = {}; // examples $('#container').highcharts({ @@ -974,7 +972,7 @@ function test_Navigation() { } function test_NoData() { - var allDefaults: Highcharts.NoDataOptions = {}; + const allDefaults: Highcharts.NoDataOptions = {}; // example $('#container').highcharts({ @@ -1000,7 +998,7 @@ function test_NoData() { } function test_AreaOptions() { - var allDefaults: Highcharts.AreaChartSeriesOptions = {}; + const allDefaults: Highcharts.AreaChartSeriesOptions = {}; // examples $('#container').highcharts({ @@ -1016,7 +1014,7 @@ function test_AreaOptions() { linearGradient: [0, 0, 0, 300], stops: [ [0, Highcharts.getOptions().colors[0]], - [1, (Highcharts.Color(Highcharts.getOptions().colors[0])).setOpacity(0).get('rgba')] + [1, ( Highcharts.Color(Highcharts.getOptions().colors[0])).setOpacity(0).get('rgba')] ] }, fillOpacity: 0.1, @@ -1036,7 +1034,7 @@ function test_AreaOptions() { } function test_AreaRange() { - var allDefaults: Highcharts.AreaRangeChartSeriesOptions = {}; + const allDefaults: Highcharts.AreaRangeChartSeriesOptions = {}; // example $('#container').highcharts({ @@ -1044,27 +1042,26 @@ function test_AreaRange() { type: "arearange", zoomType: 'x' }, - series: [{ - data: (function (arr: number[], len: number) { - var i: number; - for (i = 0; i < len; i = i + 1) { + series: [ { + data: (((arr: number[], len: number) => { + for (let i = 0; i < len; i = i + 1) { arr.push(i); } return arr; - }([], 50)) + })([], 50)) }] }); - $('#setextremes').click(function () { + $('#setextremes').click(() => { $('#container').highcharts().xAxis[0].setExtremes(10, 15); }); - $('#unsetextremes').click(function () { + $('#unsetextremes').click(() => { $('#container').highcharts().xAxis[0].setExtremes(); }); // datalabels example - $.getJSON('http://www.highcharts.com/samples/data/jsonp.php?filename=range.json&callback=?', function (data) { + $.getJSON('http://www.highcharts.com/samples/data/jsonp.php?filename=range.json&callback=?', (data) => { // Shorten the data data = data.splice(181, 14); $('#container').highcharts({ @@ -1092,20 +1089,19 @@ function test_AreaRange() { }, series: [ { name: 'Temperatures', - data: data, + data, dataLabels: { enabled: true, yHigh: 20, yLow: -20 } }] - }); }); } function test_Bar() { - var allDefaults: Highcharts.BarChartSeriesOptions = {}; + const allDefaults: Highcharts.BarChartSeriesOptions = {}; $('#container').highcharts({ chart: { @@ -1173,8 +1169,8 @@ function test_Bar() { }); // grouping example - Highcharts.getOptions().colors = Highcharts.map(Highcharts.getOptions().colors, function (color: string) { - return (Highcharts.Color(color)) + Highcharts.getOptions().colors = Highcharts.map(Highcharts.getOptions().colors, (color: string) => { + return ( Highcharts.Color(color)) .setOpacity(0.5) .get('rgba'); }); @@ -1230,7 +1226,7 @@ function test_Bar() { } function test_BoxPlot() { - var allDefaults: Highcharts.BoxPlotChartSeriesOptions = {}; + const allDefaults: Highcharts.BoxPlotChartSeriesOptions = {}; // boxplot example $('#container').highcharts({ @@ -1282,7 +1278,7 @@ function test_BoxPlot() { } function test_Bubble() { - var allDefaults: Highcharts.BubbleChartSeriesOptions = {}; + const allDefaults: Highcharts.BubbleChartSeriesOptions = {}; // bubble example $('#container').highcharts({ @@ -1344,7 +1340,7 @@ function test_Bubble() { subtitle: { text: 'Size is computed by absolute value on negative bubbles' }, - series: [{ + series: [ { data: [ [-5, 0, -5], [-4, 0, -4], @@ -1365,19 +1361,19 @@ function test_Bubble() { } function test_Column() { - var allDefaults: Highcharts.ColumnChartSeriesOptions = {}; + const allDefaults: Highcharts.ColumnChartSeriesOptions = {}; // same options as bar chart } function test_ColumnRange() { - var allDefaults: Highcharts.ColumnRangeChartSeriesOptions = {}; + const allDefaults: Highcharts.ColumnRangeChartSeriesOptions = {}; // same options as bar chart and datalabels from arearange } function test_ErrorBar() { - var allDefaults: Highcharts.ErrorBarChartSeriesOptions = {}; + const allDefaults: Highcharts.ErrorBarChartSeriesOptions = {}; // error bar styling example $('#container').highcharts({ @@ -1401,7 +1397,7 @@ function test_ErrorBar() { tooltip: { shared: true }, - series: [{ + series: [ { name: 'Temperature', type: 'spline', data: [7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6], @@ -1409,7 +1405,7 @@ function test_ErrorBar() { enabled: false }, tooltip: { - pointFormat: '{series.name}: {point.y:.1f}°C
' + pointFormat: ' {series.name} : {point.y:.1f}°C
' } }, { color: '#FF0000', @@ -1428,7 +1424,7 @@ function test_ErrorBar() { } function test_Funnel() { - var allDefaults: Highcharts.FunnelChartSeriesOptions = {}; + const allDefaults: Highcharts.FunnelChartSeriesOptions = {}; // funnel demo $('#container').highcharts({ @@ -1444,7 +1440,7 @@ function test_Funnel() { series: { dataLabels: { enabled: true, - format: '{point.name} ({point.y:,.0f})', + format: ' {point.name} ({point.y:,.0f})', color: 'black', softConnector: true }, @@ -1472,7 +1468,7 @@ function test_Funnel() { } function test_Gauge() { - var allDefaults: Highcharts.GaugeChartSeriesOptions = {}; + const allDefaults: Highcharts.GaugeChartSeriesOptions = {}; // example $('#container').highcharts({ @@ -1526,7 +1522,7 @@ function test_Gauge() { } function test_HeatMap() { - var allDefaults: Highcharts.HeatMapSeriesOptions = {}; + const allDefaults: Highcharts.HeatMapSeriesOptions = {}; // heatmap demo $('#container').highcharts({ @@ -1578,15 +1574,15 @@ function test_HeatMap() { borderWidth: 0, colsize: 24 * 36e5, // one day tooltip: { - headerFormat: 'Temperature
', - pointFormat: '{point.x:%e %b, %Y} {point.y}:00: {point.value} ℃' + headerFormat: 'Temperature
', + pointFormat: '{point.x:%e %b, %Y} {point.y}:00: {point.value} ℃ ' } }] }); } function test_Line() { - var allDefaults: Highcharts.LineChartSeriesOptions = {}; + const allDefaults: Highcharts.LineChartSeriesOptions = {}; // step example $('#container').highcharts({ @@ -1596,17 +1592,17 @@ function test_Line() { xAxis: { categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] }, - series: [{ + series: [ { data: [1, 2, 3, 4, null, 6, 7, null, 9], step: 'right', name: 'Right', linecap: 'round' - }, { + }, { data: [5, 6, 7, 8, null, 10, 11, null, 13], step: 'center', name: 'Center', linecap: 'round' - }, { + }, { data: [9, 10, 11, 12, null, 14, 15, null, 17], step: 'left', name: 'Left', @@ -1616,7 +1612,7 @@ function test_Line() { } function test_Pie() { - var allDefaults: Highcharts.PieChartSeriesOptions = {}; + const allDefaults: Highcharts.PieChartSeriesOptions = {}; // pie demo $('#container').highcharts({ @@ -1630,7 +1626,7 @@ function test_Pie() { text: 'Browser market shares January, 2015 to May, 2015' }, tooltip: { - pointFormat: '{series.name}: {point.percentage:.1f}%' + pointFormat: '{series.name}: {point.percentage:.1f}% ' }, plotOptions: { pie: { @@ -1639,14 +1635,14 @@ function test_Pie() { cursor: 'pointer', dataLabels: { enabled: true, - format: '{point.name}: {point.percentage:.1f} %', + format: ' {point.name} : {point.percentage:.1f} %', style: { color: 'black' } } } }, - series: [{ + series: [ { name: "Brands", colorByPoint: true, data: [{ @@ -1681,13 +1677,13 @@ function test_Pie() { plotShadow: false }, title: { - text: 'Browser
shares
2015', + text: 'Browser
shares
2015', align: 'center', verticalAlign: 'middle', y: 40 }, tooltip: { - pointFormat: '{series.name}: {point.percentage:.1f}%' + pointFormat: '{series.name}: {point.percentage:.1f}% ' }, plotOptions: { pie: { @@ -1705,16 +1701,16 @@ function test_Pie() { center: ['50%', '75%'] } }, - series: [{ + series: [ { type: 'pie', name: 'Browser share', innerSize: '50%', data: [ - ['Firefox', 10.38], - ['IE', 56.33], + ['Firefox', 10.38], + ['IE', 56.33], ['Chrome', 24.03], - ['Safari', 4.77], - ['Opera', 0.91], + ['Safari', 4.77], + ['Opera', 0.91], { name: 'Proprietary or Undetectable', y: 0.2, @@ -1747,17 +1743,17 @@ function test_Pie() { selected: true, sliced: true }, - ['IE7', 26.6], - ['IE6', 20], - ['Chrome', 3.1], - ['Other', 5.4] + ['IE7', 26.6], + ['IE6', 20], + ['Chrome', 3.1], + ['Other', 5.4] ] }] }); } function test_Polygon() { - var allDefaults: Highcharts.PolygonChartSeriesOptions = {}; + const allDefaults: Highcharts.PolygonChartSeriesOptions = {}; $('#container').highcharts({ chart: { @@ -1786,7 +1782,7 @@ function test_Polygon() { } function test_Pyramid() { - var allDefaults: Highcharts.PyramidChartSeriesOptions = {}; + const allDefaults: Highcharts.PyramidChartSeriesOptions = {}; // pyramid demo $('#container').highcharts({ @@ -1802,7 +1798,7 @@ function test_Pyramid() { pyramid: { dataLabels: { enabled: true, - format: '{point.name} ({point.y:,.0f})', + format: ' {point.name} ({point.y:,.0f})', color: 'black', softConnector: true } @@ -1814,21 +1810,21 @@ function test_Pyramid() { series: [{ name: 'Unique users', data: [ - ['Website visits', 15654], - ['Downloads', 4064], + ['Website visits', 15654], + ['Downloads', 4064], ['Requested price list', 1987], - ['Invoice sent', 976], - ['Finalized', 846] + ['Invoice sent', 976], + ['Finalized', 846] ] }] }); } function test_SolidGauge() { - var allDefaults: Highcharts.SolidGaugeChartSeriesOptions = {}; + const allDefaults: Highcharts.SolidGaugeChartSeriesOptions = {}; // partial solid gauge demo - var gaugeOptions: Highcharts.Options = { + const gaugeOptions: Highcharts.Options = { chart: { type: 'solidgauge' }, @@ -1848,13 +1844,13 @@ function test_SolidGauge() { tooltip: { enabled: false }, - colorAxis: { - stops: [ + colorAxis: { + stops: [ [0.1, '#55BF3B'], // green [0.5, '#DDDF0D'], // yellow [0.9, '#DF5353'] // red ] - }, + }, yAxis: { lineWidth: 0, minorTickInterval: null, @@ -1880,10 +1876,10 @@ function test_SolidGauge() { } function test_TreeMap() { - var allDefaults: Highcharts.TreeMapChartSeriesOptions = {}; + const allDefaults: Highcharts.TreeMapChartSeriesOptions = {}; // allowDrillToNode - var treeMap: Highcharts.TreeMapChartSeriesOptions = { + const treeMap: Highcharts.TreeMapChartSeriesOptions = { type: "treemap", layoutAlgorithm: 'squarified', allowDrillToNode: true, @@ -1932,10 +1928,10 @@ function test_TreeMap() { } function test_Waterfall() { - var allDefaults: Highcharts.WaterFallChartSeriesOptions = {}; + const allDefaults: Highcharts.WaterFallChartSeriesOptions = {}; // partial waterfall demo - var series: Highcharts.WaterFallChartSeriesOptions = { + const series: Highcharts.WaterFallChartSeriesOptions = { upColor: Highcharts.getOptions().colors[2], color: Highcharts.getOptions().colors[3], data: [{ @@ -1964,7 +1960,7 @@ function test_Waterfall() { }], dataLabels: { enabled: true, - formatter: function () { + formatter() { return Highcharts.numberFormat(this.y / 1000, 0, ',') + 'k'; }, style: { @@ -1978,9 +1974,9 @@ function test_Waterfall() { } function test_AxisOptions() { - var allDefaults: Highcharts.AxisOptions = {}; + const allDefaults: Highcharts.AxisOptions = {}; - var axis: Highcharts.AxisOptions = { + const axis: Highcharts.AxisOptions = { allowDecimals: false, alternateGridColor: '#000000', breaks: [{ @@ -1996,10 +1992,10 @@ function test_AxisOptions() { }, endOnTick: false, events: { - afterBreaks: () => {}, - afterSetExtremes: () => {}, - pointBreak: () => {}, - setExtremes: () => {} + afterBreaks: () => { }, + afterSetExtremes: () => { }, + pointBreak: () => { }, + setExtremes: () => { } }, floor: 0, gridLineColor: '#111111', @@ -2014,7 +2010,7 @@ function test_AxisOptions() { distance: 10, enabled: true, format: "format", - formatter: function() { return this.value; }, + formatter() { return this.value; }, maxStaggerLines: 5, overflow: false, padding: 10, @@ -2050,10 +2046,10 @@ function test_AxisOptions() { borderWidth: 2, color: 'gray', events: { - click: () => {}, - mouseover: () => {}, - mouseout: () => {}, - mousemove: () => {} + click: () => { }, + mouseover: () => { }, + mouseout: () => { }, + mousemove: () => { } }, from: 0, id: 'plotband1', @@ -2078,10 +2074,10 @@ function test_AxisOptions() { color: '#000000', dashStyle: 'Solid', events: { - click: () => {}, - mouseover: () => {}, - mouseout: () => {}, - mousemove: () => {} + click: () => { }, + mouseover: () => { }, + mouseout: () => { }, + mousemove: () => { } }, id: 'plotline1', label: { @@ -2111,7 +2107,7 @@ function test_AxisOptions() { tickLength: 10, tickPixelInterval: 100, tickPosition: 'outside', - tickPositioner: () => {}, + tickPositioner: () => { }, tickPositions: [0, 1, 2], tickWidth: 1, tickmarkPlacement: 'between', @@ -2133,7 +2129,7 @@ function test_AxisOptions() { } function test_AxisObject() { - var axis = $("#container").highcharts().xAxis[0]; + const axis = $("#container").highcharts().xAxis[0]; axis.addPlotBand({ from: 5.5, to: 7.5, @@ -2148,11 +2144,11 @@ function test_AxisObject() { id: 'plot-line-1' }); axis.removePlotLine('plot-line-1'); - var extremes = axis.getExtremes(); - console.log('dataMax: ' + extremes.dataMax + '
' + - 'dataMin: ' + extremes.dataMin + '
' + - 'max: ' + extremes.max + '
' + - 'min: ' + extremes.min + '
'); + const extremes = axis.getExtremes(); + console.log('dataMax: ' + extremes.dataMax + '
' + + 'dataMin: ' + extremes.dataMin + '
' + + 'max: ' + extremes.max + '
' + + 'min: ' + extremes.min + '
'); axis.remove(); axis.remove(false); axis.setCategories(['A', 'B', 'C']); @@ -2161,63 +2157,63 @@ function test_AxisObject() { axis.setExtremes(10, 20); axis.setExtremes(10, 20, false); axis.setExtremes(10, 20, false, false); - axis.setExtremes(10, 20, false, {duration: 50}); - axis.setTitle({text: 'text'}); - axis.setTitle({text: 'text'}, false); + axis.setExtremes(10, 20, false, { duration: 50 }); + axis.setTitle({ text: 'text' }); + axis.setTitle({ text: 'text' }, false); axis.toPixels(10); axis.toPixels(10, true); axis.toValue(10); axis.toValue(10, true); - axis.update({}); - axis.update({}, true); + axis.update( {}); + axis.update( {}, true); } function test_ChartObject() { - var chart = $("#container").highcharts(); - chart.addAxis({}); - chart.addAxis({}, true); - chart.addAxis({}, true, false); - chart.addAxis({}, true, true, false); - chart.addAxis({}, true, true, {duration: 50}); - chart.addSeries({}); - chart.addSeries({}, false); - chart.addSeries({}, false, false); - chart.addSeries({}, false, {duration: 50}); - chart.addSeriesAsDrilldown({}, {}); - var container = chart.container; + const chart = $("#container").highcharts(); + chart.addAxis( {}); + chart.addAxis( {}, true); + chart.addAxis( {}, true, false); + chart.addAxis( {}, true, true, false); + chart.addAxis( {}, true, true, { duration: 50 }); + chart.addSeries( {}); + chart.addSeries( {}, false); + chart.addSeries( {}, false, false); + chart.addSeries( {}, false, { duration: 50 }); + chart.addSeriesAsDrilldown( {}, {}); + const container = chart.container; console.log(container.id); chart.destroy(); chart.drillUp(); - chart.exportChart({}, {}); - chart.exportChartLocal({}, {}); - var object = chart.get('axisIdOrSeriesIdOrPointId'); - var svg1 = chart.getSVG(); - var svg2 = chart.getSVG({}); - var selectedPoints = chart.getSelectedPoints(); - var selectedSeries = chart.getSelectedSeries(); + chart.exportChart( {}, {}); + chart.exportChartLocal( {}, {}); + const object = chart.get('axisIdOrSeriesIdOrPointId'); + const svg1 = chart.getSVG(); + const svg2 = chart.getSVG( {}); + const selectedPoints = chart.getSelectedPoints(); + const selectedSeries = chart.getSelectedSeries(); chart.hideLoading(); - var options = chart.options; + const options = chart.options; chart.print(); chart.redraw(); chart.redraw(false); - chart.redraw({duration: 50, easing: 'fadeIn'}); + chart.redraw({ duration: 50, easing: 'fadeIn' }); chart.reflow(); - var series = chart.series; + const series = chart.series; chart.setSize(200, 200); chart.setSize(200, 200, false); - chart.setSize(200, 200, {duration: 50}); + chart.setSize(200, 200, { duration: 50 }); chart.setTitle({}, {}); chart.setTitle({}, {}, false); chart.showLoading(); chart.showLoading("Loading label"); - var firstXAxis = chart.xAxis[0]; - var firstYAxis = chart.yAxis[0]; - var legend = chart.legend; + const firstXAxis = chart.xAxis[0]; + const firstYAxis = chart.yAxis[0]; + const legend = chart.legend; } function test_ElementObject() { - var renderer = new Highcharts.Renderer($("#container")[0], 400, 400); - var group = renderer.g().add(); + const renderer = new Highcharts.Renderer($("#container")[0], 400, 400); + const group = renderer.g().add(); renderer .circle(200, 150, 100) .attr({ @@ -2226,7 +2222,7 @@ function test_ElementObject() { 'stroke-width': 1 }) .add(group); - var rect = renderer + const rect = renderer .rect(90, 150, 100, 100, 5) .attr({ fill: '#C5FFC5', @@ -2242,7 +2238,7 @@ function test_ElementObject() { 'stroke-width': 10 }); rect.destroy(); - var styledText = renderer + const styledText = renderer .text('Series 1', 140, 140) .attr({ rotation: -25 @@ -2252,42 +2248,42 @@ function test_ElementObject() { fontSize: '16px' }) .add(); - var bbox = styledText.getBBox(); - styledText.on('click', () => {}); + const bbox = styledText.getBBox(); + styledText.on('click', () => { }); group.toFront(); } function test_PointObject() { - var point = $('#container').highcharts().get('point1'); - var category = point.category; - var percentage = point.percentage; + const point = $('#container').highcharts().get('point1'); + const category = point.category; + const percentage = point.percentage; point.index; point.remove(); point.remove(false); - point.remove(false, {duration: 50}); + point.remove(false, { duration: 50 }); point.select(); point.select(false); point.select(false, true); - var isSelected = point.selected; - var series = point.series; + const isSelected = point.selected; + const series = point.series; point.slice(); point.slice(false); point.slice(false, false); point.slice(false, false, false); - point.slice(false, false, {duration: 50}); - var total = point.total; + point.slice(false, false, { duration: 50 }); + const total = point.total; point.update(0); point.update([0, 0]); point.update({}); point.update({}, false); point.update({}, false, false); - point.update({}, false, {duration: 50}); - var x = point.x; - var y = point.y; + point.update({}, false, { duration: 50 }); + const x = point.x; + const y = point.y; } function test_RendererObject() { - var renderer = $('#container').highcharts().renderer; + const renderer = $('#container').highcharts().renderer; renderer.arc(0, 0, 20, 10, 0, Math.PI); renderer.circle(0, 0, 100); renderer.g('groupName'); @@ -2299,48 +2295,48 @@ function test_RendererObject() { } function test_SeriesObject() { - var series = $('#container').highcharts().get('series1'); + const series = $('#container').highcharts().get('series1'); series.addPoint(0); series.addPoint([0, 0]); series.addPoint({}); series.addPoint({}, false); series.addPoint({}, false, true); series.addPoint({}, false, true, false); - series.addPoint({}, false, true, {duration: 50}); - var chart = series.chart; - var data = series.data; + series.addPoint({}, false, true, { duration: 50 }); + const chart = series.chart; + const data = series.data; series.hide(); - var name = series.name; - var options = series.options; + const name = series.name; + const options = series.options; series.remove(); series.remove(false); series.removePoint(0); series.removePoint(0, false); series.removePoint(0, false, false); - series.removePoint(0, false, {duration: 50}); + series.removePoint(0, false, { duration: 50 }); series.select(); series.select(true); - var isSelected = series.selected; + const isSelected = series.selected; series.setData([0, 1, 2]); series.setData([[0, 0], [1, 1], [2, 2]]); series.setData([{}, {}, {}]); series.setData([0, 1, 2], false); series.setData([0, 1, 2], false, false); - series.setData([0, 1, 2], false, {duration: 50}); + series.setData([0, 1, 2], false, { duration: 50 }); series.setData([0, 1, 2], false, false, false); series.setVisible(); series.setVisible(true); series.setVisible(true, false); series.show(); - var type = series.type; + const type = series.type; series.update({}); series.update({}, false); - var visible = series.visible; - var xAxis = series.xAxis; - var yAxis = series.yAxis; + const visible = series.visible; + const xAxis = series.xAxis; + const yAxis = series.yAxis; } function test_LegendObject() { - var legend = $('#container').highcharts().legend; + const legend = $('#container').highcharts().legend; legend.update({}); legend.update({}, false); } diff --git a/highcharts/test/more.ts b/types/highcharts/test/more.ts similarity index 100% rename from highcharts/test/more.ts rename to types/highcharts/test/more.ts diff --git a/types/highcharts/test/no-data-to-display.ts b/types/highcharts/test/no-data-to-display.ts new file mode 100644 index 0000000000..348d2a2ad7 --- /dev/null +++ b/types/highcharts/test/no-data-to-display.ts @@ -0,0 +1,8 @@ +function test_NoDataToDisplay() { + const chart = $("#container").highcharts(); + const chartHasData = chart.hasData(); + chart.hideNoData(); + chart.showNoData("Custom no data message"); +} + +HighchartsNoDataToDisplay(Highcharts); diff --git a/highcharts/test/offline-exporting.ts b/types/highcharts/test/offline-exporting.ts similarity index 100% rename from highcharts/test/offline-exporting.ts rename to types/highcharts/test/offline-exporting.ts diff --git a/highcharts/tsconfig.json b/types/highcharts/tsconfig.json similarity index 100% rename from highcharts/tsconfig.json rename to types/highcharts/tsconfig.json diff --git a/highcharts/tslint.json b/types/highcharts/tslint.json similarity index 100% rename from highcharts/tslint.json rename to types/highcharts/tslint.json diff --git a/highland/highland-tests.ts b/types/highland/highland-tests.ts similarity index 100% rename from highland/highland-tests.ts rename to types/highland/highland-tests.ts diff --git a/highland/index.d.ts b/types/highland/index.d.ts similarity index 100% rename from highland/index.d.ts rename to types/highland/index.d.ts diff --git a/highland/tsconfig.json b/types/highland/tsconfig.json similarity index 100% rename from highland/tsconfig.json rename to types/highland/tsconfig.json diff --git a/highlight.js/highlight.js-tests.ts b/types/highlight.js/highlight.js-tests.ts similarity index 100% rename from highlight.js/highlight.js-tests.ts rename to types/highlight.js/highlight.js-tests.ts diff --git a/highlight.js/index.d.ts b/types/highlight.js/index.d.ts similarity index 100% rename from highlight.js/index.d.ts rename to types/highlight.js/index.d.ts diff --git a/highlight.js/tsconfig.json b/types/highlight.js/tsconfig.json similarity index 100% rename from highlight.js/tsconfig.json rename to types/highlight.js/tsconfig.json diff --git a/highlight.js/v7/index.d.ts b/types/highlight.js/v7/index.d.ts similarity index 100% rename from highlight.js/v7/index.d.ts rename to types/highlight.js/v7/index.d.ts diff --git a/highlight.js/v7/tsconfig.json b/types/highlight.js/v7/tsconfig.json similarity index 100% rename from highlight.js/v7/tsconfig.json rename to types/highlight.js/v7/tsconfig.json diff --git a/hiredis/hiredis-tests.ts b/types/hiredis/hiredis-tests.ts similarity index 100% rename from hiredis/hiredis-tests.ts rename to types/hiredis/hiredis-tests.ts diff --git a/hiredis/index.d.ts b/types/hiredis/index.d.ts similarity index 100% rename from hiredis/index.d.ts rename to types/hiredis/index.d.ts diff --git a/hiredis/tsconfig.json b/types/hiredis/tsconfig.json similarity index 100% rename from hiredis/tsconfig.json rename to types/hiredis/tsconfig.json diff --git a/hiredis/tslint.json b/types/hiredis/tslint.json similarity index 100% rename from hiredis/tslint.json rename to types/hiredis/tslint.json diff --git a/history.js/history.js-tests.ts b/types/history.js/history.js-tests.ts similarity index 100% rename from history.js/history.js-tests.ts rename to types/history.js/history.js-tests.ts diff --git a/history.js/index.d.ts b/types/history.js/index.d.ts similarity index 100% rename from history.js/index.d.ts rename to types/history.js/index.d.ts diff --git a/history.js/tsconfig.json b/types/history.js/tsconfig.json similarity index 100% rename from history.js/tsconfig.json rename to types/history.js/tsconfig.json diff --git a/history/DOMUtils.d.ts b/types/history/DOMUtils.d.ts similarity index 100% rename from history/DOMUtils.d.ts rename to types/history/DOMUtils.d.ts diff --git a/history/ExecutionEnvironment.d.ts b/types/history/ExecutionEnvironment.d.ts similarity index 100% rename from history/ExecutionEnvironment.d.ts rename to types/history/ExecutionEnvironment.d.ts diff --git a/history/LocationUtils.d.ts b/types/history/LocationUtils.d.ts similarity index 100% rename from history/LocationUtils.d.ts rename to types/history/LocationUtils.d.ts diff --git a/history/PathUtils.d.ts b/types/history/PathUtils.d.ts similarity index 100% rename from history/PathUtils.d.ts rename to types/history/PathUtils.d.ts diff --git a/history/createBrowserHistory.d.ts b/types/history/createBrowserHistory.d.ts similarity index 100% rename from history/createBrowserHistory.d.ts rename to types/history/createBrowserHistory.d.ts diff --git a/history/createHashHistory.d.ts b/types/history/createHashHistory.d.ts similarity index 100% rename from history/createHashHistory.d.ts rename to types/history/createHashHistory.d.ts diff --git a/history/createMemoryHistory.d.ts b/types/history/createMemoryHistory.d.ts similarity index 100% rename from history/createMemoryHistory.d.ts rename to types/history/createMemoryHistory.d.ts diff --git a/history/createTransitionManager.d.ts b/types/history/createTransitionManager.d.ts similarity index 100% rename from history/createTransitionManager.d.ts rename to types/history/createTransitionManager.d.ts diff --git a/history/history-tests.ts b/types/history/history-tests.ts similarity index 100% rename from history/history-tests.ts rename to types/history/history-tests.ts diff --git a/history/index.d.ts b/types/history/index.d.ts similarity index 100% rename from history/index.d.ts rename to types/history/index.d.ts diff --git a/history/tsconfig.json b/types/history/tsconfig.json similarity index 100% rename from history/tsconfig.json rename to types/history/tsconfig.json diff --git a/history/v2/history-tests.ts b/types/history/v2/history-tests.ts similarity index 100% rename from history/v2/history-tests.ts rename to types/history/v2/history-tests.ts diff --git a/history/v2/index.d.ts b/types/history/v2/index.d.ts similarity index 100% rename from history/v2/index.d.ts rename to types/history/v2/index.d.ts diff --git a/history/v2/lib/DOMUtils.d.ts b/types/history/v2/lib/DOMUtils.d.ts similarity index 100% rename from history/v2/lib/DOMUtils.d.ts rename to types/history/v2/lib/DOMUtils.d.ts diff --git a/history/v2/lib/actions.d.ts b/types/history/v2/lib/actions.d.ts similarity index 100% rename from history/v2/lib/actions.d.ts rename to types/history/v2/lib/actions.d.ts diff --git a/history/v2/lib/createBrowserHistory.d.ts b/types/history/v2/lib/createBrowserHistory.d.ts similarity index 100% rename from history/v2/lib/createBrowserHistory.d.ts rename to types/history/v2/lib/createBrowserHistory.d.ts diff --git a/history/v2/lib/createHashHistory.d.ts b/types/history/v2/lib/createHashHistory.d.ts similarity index 100% rename from history/v2/lib/createHashHistory.d.ts rename to types/history/v2/lib/createHashHistory.d.ts diff --git a/history/v2/lib/createLocation.d.ts b/types/history/v2/lib/createLocation.d.ts similarity index 100% rename from history/v2/lib/createLocation.d.ts rename to types/history/v2/lib/createLocation.d.ts diff --git a/history/v2/lib/createMemoryHistory.d.ts b/types/history/v2/lib/createMemoryHistory.d.ts similarity index 100% rename from history/v2/lib/createMemoryHistory.d.ts rename to types/history/v2/lib/createMemoryHistory.d.ts diff --git a/history/v2/lib/useBasename.d.ts b/types/history/v2/lib/useBasename.d.ts similarity index 100% rename from history/v2/lib/useBasename.d.ts rename to types/history/v2/lib/useBasename.d.ts diff --git a/history/v2/lib/useBeforeUnload.d.ts b/types/history/v2/lib/useBeforeUnload.d.ts similarity index 100% rename from history/v2/lib/useBeforeUnload.d.ts rename to types/history/v2/lib/useBeforeUnload.d.ts diff --git a/history/v2/lib/useQueries.d.ts b/types/history/v2/lib/useQueries.d.ts similarity index 100% rename from history/v2/lib/useQueries.d.ts rename to types/history/v2/lib/useQueries.d.ts diff --git a/history/v2/tsconfig.json b/types/history/v2/tsconfig.json similarity index 100% rename from history/v2/tsconfig.json rename to types/history/v2/tsconfig.json diff --git a/history/v3/index.d.ts b/types/history/v3/index.d.ts similarity index 100% rename from history/v3/index.d.ts rename to types/history/v3/index.d.ts diff --git a/history/v3/lib/LocationUtils.d.ts b/types/history/v3/lib/LocationUtils.d.ts similarity index 100% rename from history/v3/lib/LocationUtils.d.ts rename to types/history/v3/lib/LocationUtils.d.ts diff --git a/history/v3/lib/actions.d.ts b/types/history/v3/lib/actions.d.ts similarity index 100% rename from history/v3/lib/actions.d.ts rename to types/history/v3/lib/actions.d.ts diff --git a/history/v3/lib/createBrowserHistory.d.ts b/types/history/v3/lib/createBrowserHistory.d.ts similarity index 100% rename from history/v3/lib/createBrowserHistory.d.ts rename to types/history/v3/lib/createBrowserHistory.d.ts diff --git a/history/v3/lib/createHashHistory.d.ts b/types/history/v3/lib/createHashHistory.d.ts similarity index 100% rename from history/v3/lib/createHashHistory.d.ts rename to types/history/v3/lib/createHashHistory.d.ts diff --git a/history/v3/lib/createLocation.d.ts b/types/history/v3/lib/createLocation.d.ts similarity index 100% rename from history/v3/lib/createLocation.d.ts rename to types/history/v3/lib/createLocation.d.ts diff --git a/history/v3/lib/createMemoryHistory.d.ts b/types/history/v3/lib/createMemoryHistory.d.ts similarity index 100% rename from history/v3/lib/createMemoryHistory.d.ts rename to types/history/v3/lib/createMemoryHistory.d.ts diff --git a/history/v3/lib/useBasename.d.ts b/types/history/v3/lib/useBasename.d.ts similarity index 100% rename from history/v3/lib/useBasename.d.ts rename to types/history/v3/lib/useBasename.d.ts diff --git a/history/v3/lib/useBeforeUnload.d.ts b/types/history/v3/lib/useBeforeUnload.d.ts similarity index 100% rename from history/v3/lib/useBeforeUnload.d.ts rename to types/history/v3/lib/useBeforeUnload.d.ts diff --git a/history/v3/lib/useQueries.d.ts b/types/history/v3/lib/useQueries.d.ts similarity index 100% rename from history/v3/lib/useQueries.d.ts rename to types/history/v3/lib/useQueries.d.ts diff --git a/history/v3/tsconfig.json b/types/history/v3/tsconfig.json similarity index 100% rename from history/v3/tsconfig.json rename to types/history/v3/tsconfig.json diff --git a/hoek/hoek-tests.ts b/types/hoek/hoek-tests.ts similarity index 100% rename from hoek/hoek-tests.ts rename to types/hoek/hoek-tests.ts diff --git a/hoek/index.d.ts b/types/hoek/index.d.ts similarity index 100% rename from hoek/index.d.ts rename to types/hoek/index.d.ts diff --git a/hoek/tsconfig.json b/types/hoek/tsconfig.json similarity index 100% rename from hoek/tsconfig.json rename to types/hoek/tsconfig.json diff --git a/hoek/tslint.json b/types/hoek/tslint.json similarity index 100% rename from hoek/tslint.json rename to types/hoek/tslint.json diff --git a/hooker/hooker-tests.ts b/types/hooker/hooker-tests.ts similarity index 100% rename from hooker/hooker-tests.ts rename to types/hooker/hooker-tests.ts diff --git a/hooker/index.d.ts b/types/hooker/index.d.ts similarity index 100% rename from hooker/index.d.ts rename to types/hooker/index.d.ts diff --git a/hooker/tsconfig.json b/types/hooker/tsconfig.json similarity index 100% rename from hooker/tsconfig.json rename to types/hooker/tsconfig.json diff --git a/hopscotch/hopscotch-tests.ts b/types/hopscotch/hopscotch-tests.ts similarity index 100% rename from hopscotch/hopscotch-tests.ts rename to types/hopscotch/hopscotch-tests.ts diff --git a/hopscotch/index.d.ts b/types/hopscotch/index.d.ts similarity index 100% rename from hopscotch/index.d.ts rename to types/hopscotch/index.d.ts diff --git a/hopscotch/tsconfig.json b/types/hopscotch/tsconfig.json similarity index 100% rename from hopscotch/tsconfig.json rename to types/hopscotch/tsconfig.json diff --git a/howler/howler-tests.ts b/types/howler/howler-tests.ts similarity index 100% rename from howler/howler-tests.ts rename to types/howler/howler-tests.ts diff --git a/howler/index.d.ts b/types/howler/index.d.ts similarity index 99% rename from howler/index.d.ts rename to types/howler/index.d.ts index df3f6a363b..0966f4a472 100644 --- a/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/howler/tsconfig.json b/types/howler/tsconfig.json similarity index 100% rename from howler/tsconfig.json rename to types/howler/tsconfig.json diff --git a/html-entities/html-entities-tests.ts b/types/html-entities/html-entities-tests.ts similarity index 100% rename from html-entities/html-entities-tests.ts rename to types/html-entities/html-entities-tests.ts diff --git a/html-entities/index.d.ts b/types/html-entities/index.d.ts similarity index 100% rename from html-entities/index.d.ts rename to types/html-entities/index.d.ts diff --git a/html-entities/tsconfig.json b/types/html-entities/tsconfig.json similarity index 100% rename from html-entities/tsconfig.json rename to types/html-entities/tsconfig.json diff --git a/html-minifier/html-minifier-tests.ts b/types/html-minifier/html-minifier-tests.ts similarity index 100% rename from html-minifier/html-minifier-tests.ts rename to types/html-minifier/html-minifier-tests.ts diff --git a/html-minifier/index.d.ts b/types/html-minifier/index.d.ts similarity index 100% rename from html-minifier/index.d.ts rename to types/html-minifier/index.d.ts diff --git a/html-minifier/tsconfig.json b/types/html-minifier/tsconfig.json similarity index 100% rename from html-minifier/tsconfig.json rename to types/html-minifier/tsconfig.json diff --git a/html-pdf/html-pdf-tests.ts b/types/html-pdf/html-pdf-tests.ts similarity index 100% rename from html-pdf/html-pdf-tests.ts rename to types/html-pdf/html-pdf-tests.ts diff --git a/html-pdf/index.d.ts b/types/html-pdf/index.d.ts similarity index 100% rename from html-pdf/index.d.ts rename to types/html-pdf/index.d.ts diff --git a/html-pdf/tsconfig.json b/types/html-pdf/tsconfig.json similarity index 100% rename from html-pdf/tsconfig.json rename to types/html-pdf/tsconfig.json diff --git a/html-to-text/html-to-text-tests.ts b/types/html-to-text/html-to-text-tests.ts similarity index 100% rename from html-to-text/html-to-text-tests.ts rename to types/html-to-text/html-to-text-tests.ts diff --git a/html-to-text/index.d.ts b/types/html-to-text/index.d.ts similarity index 100% rename from html-to-text/index.d.ts rename to types/html-to-text/index.d.ts diff --git a/html-to-text/tsconfig.json b/types/html-to-text/tsconfig.json similarity index 100% rename from html-to-text/tsconfig.json rename to types/html-to-text/tsconfig.json diff --git a/html-webpack-plugin/html-webpack-plugin-tests.ts b/types/html-webpack-plugin/html-webpack-plugin-tests.ts similarity index 100% rename from html-webpack-plugin/html-webpack-plugin-tests.ts rename to types/html-webpack-plugin/html-webpack-plugin-tests.ts diff --git a/html-webpack-plugin/index.d.ts b/types/html-webpack-plugin/index.d.ts similarity index 100% rename from html-webpack-plugin/index.d.ts rename to types/html-webpack-plugin/index.d.ts diff --git a/html-webpack-plugin/tsconfig.json b/types/html-webpack-plugin/tsconfig.json similarity index 100% rename from html-webpack-plugin/tsconfig.json rename to types/html-webpack-plugin/tsconfig.json diff --git a/html-webpack-plugin/tslint.json b/types/html-webpack-plugin/tslint.json similarity index 100% rename from html-webpack-plugin/tslint.json rename to types/html-webpack-plugin/tslint.json diff --git a/html-webpack-template/html-webpack-template-tests.ts b/types/html-webpack-template/html-webpack-template-tests.ts similarity index 100% rename from html-webpack-template/html-webpack-template-tests.ts rename to types/html-webpack-template/html-webpack-template-tests.ts diff --git a/html-webpack-template/index.d.ts b/types/html-webpack-template/index.d.ts similarity index 100% rename from html-webpack-template/index.d.ts rename to types/html-webpack-template/index.d.ts diff --git a/html-webpack-template/tsconfig.json b/types/html-webpack-template/tsconfig.json similarity index 100% rename from html-webpack-template/tsconfig.json rename to types/html-webpack-template/tsconfig.json diff --git a/html-webpack-template/tslint.json b/types/html-webpack-template/tslint.json similarity index 100% rename from html-webpack-template/tslint.json rename to types/html-webpack-template/tslint.json diff --git a/html2canvas/html2canvas-tests.ts b/types/html2canvas/html2canvas-tests.ts similarity index 100% rename from html2canvas/html2canvas-tests.ts rename to types/html2canvas/html2canvas-tests.ts diff --git a/html2canvas/index.d.ts b/types/html2canvas/index.d.ts similarity index 100% rename from html2canvas/index.d.ts rename to types/html2canvas/index.d.ts diff --git a/html2canvas/tsconfig.json b/types/html2canvas/tsconfig.json similarity index 100% rename from html2canvas/tsconfig.json rename to types/html2canvas/tsconfig.json diff --git a/htmlescape/htmlescape-tests.ts b/types/htmlescape/htmlescape-tests.ts similarity index 100% rename from htmlescape/htmlescape-tests.ts rename to types/htmlescape/htmlescape-tests.ts diff --git a/htmlescape/index.d.ts b/types/htmlescape/index.d.ts similarity index 87% rename from htmlescape/index.d.ts rename to types/htmlescape/index.d.ts index 51d8eae58d..23b9425e16 100644 --- a/htmlescape/index.d.ts +++ b/types/htmlescape/index.d.ts @@ -5,7 +5,7 @@ declare function htmlescape(o: any): string; declare namespace htmlescape { - export function sanitize(s: string): string; + function sanitize(s: string): string; } export = htmlescape; diff --git a/htmlescape/tsconfig.json b/types/htmlescape/tsconfig.json similarity index 100% rename from htmlescape/tsconfig.json rename to types/htmlescape/tsconfig.json diff --git a/htmlescape/tslint.json b/types/htmlescape/tslint.json similarity index 100% rename from htmlescape/tslint.json rename to types/htmlescape/tslint.json diff --git a/types/htmlhint/htmlhint-tests.ts b/types/htmlhint/htmlhint-tests.ts new file mode 100644 index 0000000000..2eecf5d60d --- /dev/null +++ b/types/htmlhint/htmlhint-tests.ts @@ -0,0 +1,18 @@ +import { HTMLHint, RuleSet } from "htmlhint"; + +const htmlHintRules: RuleSet = { + "tagname-lowercase": true, + "attr-lowercase": true, + "attr-value-double-quotes": true, + "doctype-first": true, + "tag-pair": true, + "spec-char-escape": true, + "id-unique": true, + "src-not-empty": true, + "attr-no-duplication": true, + "title-require": true, + "space-tab-mixed-disabled": "tab" +}; + +const result = HTMLHint.verify('', htmlHintRules); +const formatted = HTMLHint.format(result, { indent: 2 }); diff --git a/htmlhint/index.d.ts b/types/htmlhint/index.d.ts similarity index 95% rename from htmlhint/index.d.ts rename to types/htmlhint/index.d.ts index 7908eaaddb..0afcff80f1 100644 --- a/htmlhint/index.d.ts +++ b/types/htmlhint/index.d.ts @@ -23,7 +23,7 @@ export interface Rule { } export interface RuleSet { - [id: string]: boolean; + [id: string]: boolean | string; } export namespace HTMLHint { diff --git a/htmlhint/tsconfig.json b/types/htmlhint/tsconfig.json similarity index 100% rename from htmlhint/tsconfig.json rename to types/htmlhint/tsconfig.json diff --git a/htmlparser2/htmlparser2-tests.ts b/types/htmlparser2/htmlparser2-tests.ts similarity index 100% rename from htmlparser2/htmlparser2-tests.ts rename to types/htmlparser2/htmlparser2-tests.ts diff --git a/htmlparser2/index.d.ts b/types/htmlparser2/index.d.ts similarity index 100% rename from htmlparser2/index.d.ts rename to types/htmlparser2/index.d.ts diff --git a/htmlparser2/tsconfig.json b/types/htmlparser2/tsconfig.json similarity index 100% rename from htmlparser2/tsconfig.json rename to types/htmlparser2/tsconfig.json diff --git a/htmltojsx/htmltojsx-tests.ts b/types/htmltojsx/htmltojsx-tests.ts similarity index 100% rename from htmltojsx/htmltojsx-tests.ts rename to types/htmltojsx/htmltojsx-tests.ts diff --git a/htmltojsx/index.d.ts b/types/htmltojsx/index.d.ts similarity index 100% rename from htmltojsx/index.d.ts rename to types/htmltojsx/index.d.ts diff --git a/htmltojsx/tsconfig.json b/types/htmltojsx/tsconfig.json similarity index 100% rename from htmltojsx/tsconfig.json rename to types/htmltojsx/tsconfig.json diff --git a/http-assert/http-assert-tests.ts b/types/http-assert/http-assert-tests.ts similarity index 100% rename from http-assert/http-assert-tests.ts rename to types/http-assert/http-assert-tests.ts diff --git a/http-assert/index.d.ts b/types/http-assert/index.d.ts similarity index 100% rename from http-assert/index.d.ts rename to types/http-assert/index.d.ts diff --git a/http-assert/tsconfig.json b/types/http-assert/tsconfig.json similarity index 100% rename from http-assert/tsconfig.json rename to types/http-assert/tsconfig.json diff --git a/http-assert/tslint.json b/types/http-assert/tslint.json similarity index 100% rename from http-assert/tslint.json rename to types/http-assert/tslint.json diff --git a/types/http-codes/index.d.ts b/types/http-codes/index.d.ts new file mode 100644 index 0000000000..0be3973652 --- /dev/null +++ b/types/http-codes/index.d.ts @@ -0,0 +1,67 @@ +// Type definitions for http-codes 1.0 +// Project: https://github.com/flesler/node-http-codes +// Definitions by: Mohamed Hegazy +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export const ACCEPTED: number; +export const ALREADY_REPORTED: number; +export const BAD_GATEWAY: number; +export const BAD_REQUEST: number; +export const BANDWIDTH_LIMIT_EXCEEDED: number; +export const CONFLICT: number; +export const CONTINUE: number; +export const CREATED: number; +export const EXPECTATION_FAILED: number; +export const FAILED_DEPENDENCY: number; +export const FORBIDDEN: number; +export const FOUND: number; +export const GATEWAY_TIMEOUT: number; +export const GONE: number; +export const HTTP_VERSION_NOT_SUPPORTED: number; +export const IM_A_TEAPOT: number; +export const IM_USED: number; +export const INSUFFICIENT_STORAGE: number; +export const INTERNAL_SERVER_ERROR: number; +export const LENGTH_REQUIRED: number; +export const LOCKED: number; +export const LOOP_DETECTED: number; +export const METHOD_NOT_ALLOWED: number; +export const MISDIRECTED_REQUEST: number; +export const MOVED_PERMANENTLY: number; +export const MULTIPLE_CHOICES: number; +export const MULTI_STATUS: number; +export const NETWORK_AUTHENTICATION_REQUIRED: number; +export const NON_AUTHORITATIVE_INFORMATION: number; +export const NOT_ACCEPTABLE: number; +export const NOT_EXTENDED: number; +export const NOT_FOUND: number; +export const NOT_IMPLEMENTED: number; +export const NOT_MODIFIED: number; +export const NO_CONTENT: number; +export const OK: number; +export const PARTIAL_CONTENT: number; +export const PAYLOAD_TOO_LARGE: number; +export const PAYMENT_REQUIRED: number; +export const PERMANENT_REDIRECT: number; +export const PRECONDITION_FAILED: number; +export const PRECONDITION_REQUIRED: number; +export const PROCESSING: number; +export const PROXY_AUTHENTICATION_REQUIRED: number; +export const RANGE_NOT_SATISFIABLE: number; +export const REQUEST_HEADER_FIELDS_TOO_LARGE: number; +export const REQUEST_TIMEOUT: number; +export const RESET_CONTENT: number; +export const SEE_OTHER: number; +export const SERVICE_UNAVAILABLE: number; +export const SWITCHING_PROTOCOLS: number; +export const TEMPORARY_REDIRECT: number; +export const TOO_MANY_REQUESTS: number; +export const UNAUTHORIZED: number; +export const UNAVAILABLE_FOR_LEGAL_REASONS: number; +export const UNORDERED_COLLECTION: number; +export const UNPROCESSABLE_ENTITY: number; +export const UNSUPPORTED_MEDIA_TYPE: number; +export const UPGRADE_REQUIRED: number; +export const URI_TOO_LONG: number; +export const USE_PROXY: number; +export const VARIANT_ALSO_NEGOTIATES: number; diff --git a/http-codes/tsconfig.json b/types/http-codes/tsconfig.json similarity index 100% rename from http-codes/tsconfig.json rename to types/http-codes/tsconfig.json diff --git a/http-codes/tslint.json b/types/http-codes/tslint.json similarity index 100% rename from http-codes/tslint.json rename to types/http-codes/tslint.json diff --git a/http-errors/http-errors-tests.ts b/types/http-errors/http-errors-tests.ts similarity index 100% rename from http-errors/http-errors-tests.ts rename to types/http-errors/http-errors-tests.ts diff --git a/http-errors/index.d.ts b/types/http-errors/index.d.ts similarity index 100% rename from http-errors/index.d.ts rename to types/http-errors/index.d.ts diff --git a/http-errors/tsconfig.json b/types/http-errors/tsconfig.json similarity index 100% rename from http-errors/tsconfig.json rename to types/http-errors/tsconfig.json diff --git a/http-link-header/http-link-header-tests.ts b/types/http-link-header/http-link-header-tests.ts similarity index 100% rename from http-link-header/http-link-header-tests.ts rename to types/http-link-header/http-link-header-tests.ts diff --git a/http-link-header/index.d.ts b/types/http-link-header/index.d.ts similarity index 100% rename from http-link-header/index.d.ts rename to types/http-link-header/index.d.ts diff --git a/http-link-header/tsconfig.json b/types/http-link-header/tsconfig.json similarity index 100% rename from http-link-header/tsconfig.json rename to types/http-link-header/tsconfig.json diff --git a/http-link-header/tslint.json b/types/http-link-header/tslint.json similarity index 100% rename from http-link-header/tslint.json rename to types/http-link-header/tslint.json diff --git a/http-status-codes/http-status-codes-tests.ts b/types/http-status-codes/http-status-codes-tests.ts similarity index 100% rename from http-status-codes/http-status-codes-tests.ts rename to types/http-status-codes/http-status-codes-tests.ts diff --git a/http-status-codes/index.d.ts b/types/http-status-codes/index.d.ts similarity index 100% rename from http-status-codes/index.d.ts rename to types/http-status-codes/index.d.ts diff --git a/http-status-codes/tsconfig.json b/types/http-status-codes/tsconfig.json similarity index 100% rename from http-status-codes/tsconfig.json rename to types/http-status-codes/tsconfig.json diff --git a/http-status/http-status-tests.ts b/types/http-status/http-status-tests.ts similarity index 100% rename from http-status/http-status-tests.ts rename to types/http-status/http-status-tests.ts diff --git a/http-status/index.d.ts b/types/http-status/index.d.ts similarity index 100% rename from http-status/index.d.ts rename to types/http-status/index.d.ts diff --git a/http-status/tsconfig.json b/types/http-status/tsconfig.json similarity index 100% rename from http-status/tsconfig.json rename to types/http-status/tsconfig.json diff --git a/http-string-parser/http-string-parser-tests.ts b/types/http-string-parser/http-string-parser-tests.ts similarity index 100% rename from http-string-parser/http-string-parser-tests.ts rename to types/http-string-parser/http-string-parser-tests.ts diff --git a/http-string-parser/index.d.ts b/types/http-string-parser/index.d.ts similarity index 100% rename from http-string-parser/index.d.ts rename to types/http-string-parser/index.d.ts diff --git a/http-string-parser/tsconfig.json b/types/http-string-parser/tsconfig.json similarity index 100% rename from http-string-parser/tsconfig.json rename to types/http-string-parser/tsconfig.json diff --git a/httperr/httperr-tests.ts b/types/httperr/httperr-tests.ts similarity index 100% rename from httperr/httperr-tests.ts rename to types/httperr/httperr-tests.ts diff --git a/httperr/index.d.ts b/types/httperr/index.d.ts similarity index 100% rename from httperr/index.d.ts rename to types/httperr/index.d.ts diff --git a/httperr/tsconfig.json b/types/httperr/tsconfig.json similarity index 100% rename from httperr/tsconfig.json rename to types/httperr/tsconfig.json diff --git a/hubspot-pace/hubspot-pace-tests.ts b/types/hubspot-pace/hubspot-pace-tests.ts similarity index 100% rename from hubspot-pace/hubspot-pace-tests.ts rename to types/hubspot-pace/hubspot-pace-tests.ts diff --git a/hubspot-pace/index.d.ts b/types/hubspot-pace/index.d.ts similarity index 100% rename from hubspot-pace/index.d.ts rename to types/hubspot-pace/index.d.ts diff --git a/hubspot-pace/tsconfig.json b/types/hubspot-pace/tsconfig.json similarity index 100% rename from hubspot-pace/tsconfig.json rename to types/hubspot-pace/tsconfig.json diff --git a/humane/humane-tests.ts b/types/humane/humane-tests.ts similarity index 100% rename from humane/humane-tests.ts rename to types/humane/humane-tests.ts diff --git a/humane/index.d.ts b/types/humane/index.d.ts similarity index 100% rename from humane/index.d.ts rename to types/humane/index.d.ts diff --git a/humane/tsconfig.json b/types/humane/tsconfig.json similarity index 100% rename from humane/tsconfig.json rename to types/humane/tsconfig.json diff --git a/humanparser/humanparser-tests.ts b/types/humanparser/humanparser-tests.ts similarity index 100% rename from humanparser/humanparser-tests.ts rename to types/humanparser/humanparser-tests.ts diff --git a/humanparser/index.d.ts b/types/humanparser/index.d.ts similarity index 100% rename from humanparser/index.d.ts rename to types/humanparser/index.d.ts diff --git a/humanparser/tsconfig.json b/types/humanparser/tsconfig.json similarity index 100% rename from humanparser/tsconfig.json rename to types/humanparser/tsconfig.json diff --git a/humps/humps-tests.ts b/types/humps/humps-tests.ts similarity index 100% rename from humps/humps-tests.ts rename to types/humps/humps-tests.ts diff --git a/humps/index.d.ts b/types/humps/index.d.ts similarity index 100% rename from humps/index.d.ts rename to types/humps/index.d.ts diff --git a/humps/tsconfig.json b/types/humps/tsconfig.json similarity index 100% rename from humps/tsconfig.json rename to types/humps/tsconfig.json diff --git a/hyco-ws/hyco-ws-tests.ts b/types/hyco-ws/hyco-ws-tests.ts similarity index 100% rename from hyco-ws/hyco-ws-tests.ts rename to types/hyco-ws/hyco-ws-tests.ts diff --git a/hyco-ws/index.d.ts b/types/hyco-ws/index.d.ts similarity index 100% rename from hyco-ws/index.d.ts rename to types/hyco-ws/index.d.ts diff --git a/hyco-ws/tsconfig.json b/types/hyco-ws/tsconfig.json similarity index 100% rename from hyco-ws/tsconfig.json rename to types/hyco-ws/tsconfig.json diff --git a/hyco-ws/tslint.json b/types/hyco-ws/tslint.json similarity index 100% rename from hyco-ws/tslint.json rename to types/hyco-ws/tslint.json diff --git a/hyperscript/hyperscript-tests.ts b/types/hyperscript/hyperscript-tests.ts similarity index 100% rename from hyperscript/hyperscript-tests.ts rename to types/hyperscript/hyperscript-tests.ts diff --git a/hyperscript/index.d.ts b/types/hyperscript/index.d.ts similarity index 100% rename from hyperscript/index.d.ts rename to types/hyperscript/index.d.ts diff --git a/hyperscript/tsconfig.json b/types/hyperscript/tsconfig.json similarity index 100% rename from hyperscript/tsconfig.json rename to types/hyperscript/tsconfig.json diff --git a/hypertext-application-language/hypertext-application-language-tests.ts b/types/hypertext-application-language/hypertext-application-language-tests.ts similarity index 100% rename from hypertext-application-language/hypertext-application-language-tests.ts rename to types/hypertext-application-language/hypertext-application-language-tests.ts diff --git a/hypertext-application-language/index.d.ts b/types/hypertext-application-language/index.d.ts similarity index 100% rename from hypertext-application-language/index.d.ts rename to types/hypertext-application-language/index.d.ts diff --git a/hypertext-application-language/tsconfig.json b/types/hypertext-application-language/tsconfig.json similarity index 100% rename from hypertext-application-language/tsconfig.json rename to types/hypertext-application-language/tsconfig.json diff --git a/hystrixjs/hystrixjs-tests.ts b/types/hystrixjs/hystrixjs-tests.ts similarity index 100% rename from hystrixjs/hystrixjs-tests.ts rename to types/hystrixjs/hystrixjs-tests.ts diff --git a/hystrixjs/index.d.ts b/types/hystrixjs/index.d.ts similarity index 100% rename from hystrixjs/index.d.ts rename to types/hystrixjs/index.d.ts diff --git a/hystrixjs/tsconfig.json b/types/hystrixjs/tsconfig.json similarity index 100% rename from hystrixjs/tsconfig.json rename to types/hystrixjs/tsconfig.json diff --git a/i18n/i18n-tests.ts b/types/i18n/i18n-tests.ts similarity index 100% rename from i18n/i18n-tests.ts rename to types/i18n/i18n-tests.ts diff --git a/i18n/index.d.ts b/types/i18n/index.d.ts similarity index 100% rename from i18n/index.d.ts rename to types/i18n/index.d.ts diff --git a/i18n/tsconfig.json b/types/i18n/tsconfig.json similarity index 100% rename from i18n/tsconfig.json rename to types/i18n/tsconfig.json diff --git a/i18next-browser-languagedetector/i18next-browser-languagedetector-tests.ts b/types/i18next-browser-languagedetector/i18next-browser-languagedetector-tests.ts similarity index 100% rename from i18next-browser-languagedetector/i18next-browser-languagedetector-tests.ts rename to types/i18next-browser-languagedetector/i18next-browser-languagedetector-tests.ts diff --git a/i18next-browser-languagedetector/index.d.ts b/types/i18next-browser-languagedetector/index.d.ts similarity index 100% rename from i18next-browser-languagedetector/index.d.ts rename to types/i18next-browser-languagedetector/index.d.ts diff --git a/i18next-browser-languagedetector/tsconfig.json b/types/i18next-browser-languagedetector/tsconfig.json similarity index 100% rename from i18next-browser-languagedetector/tsconfig.json rename to types/i18next-browser-languagedetector/tsconfig.json diff --git a/i18next-express-middleware/i18next-express-middleware-tests.ts b/types/i18next-express-middleware/i18next-express-middleware-tests.ts similarity index 100% rename from i18next-express-middleware/i18next-express-middleware-tests.ts rename to types/i18next-express-middleware/i18next-express-middleware-tests.ts diff --git a/i18next-express-middleware/index.d.ts b/types/i18next-express-middleware/index.d.ts similarity index 100% rename from i18next-express-middleware/index.d.ts rename to types/i18next-express-middleware/index.d.ts diff --git a/i18next-express-middleware/tsconfig.json b/types/i18next-express-middleware/tsconfig.json similarity index 100% rename from i18next-express-middleware/tsconfig.json rename to types/i18next-express-middleware/tsconfig.json diff --git a/i18next-node-fs-backend/i18next-node-fs-backend-tests.ts b/types/i18next-node-fs-backend/i18next-node-fs-backend-tests.ts similarity index 100% rename from i18next-node-fs-backend/i18next-node-fs-backend-tests.ts rename to types/i18next-node-fs-backend/i18next-node-fs-backend-tests.ts diff --git a/i18next-node-fs-backend/index.d.ts b/types/i18next-node-fs-backend/index.d.ts similarity index 100% rename from i18next-node-fs-backend/index.d.ts rename to types/i18next-node-fs-backend/index.d.ts diff --git a/i18next-node-fs-backend/tsconfig.json b/types/i18next-node-fs-backend/tsconfig.json similarity index 100% rename from i18next-node-fs-backend/tsconfig.json rename to types/i18next-node-fs-backend/tsconfig.json diff --git a/i18next-sprintf-postprocessor/i18next-sprintf-postprocessor-tests.ts b/types/i18next-sprintf-postprocessor/i18next-sprintf-postprocessor-tests.ts similarity index 100% rename from i18next-sprintf-postprocessor/i18next-sprintf-postprocessor-tests.ts rename to types/i18next-sprintf-postprocessor/i18next-sprintf-postprocessor-tests.ts diff --git a/i18next-sprintf-postprocessor/index.d.ts b/types/i18next-sprintf-postprocessor/index.d.ts similarity index 100% rename from i18next-sprintf-postprocessor/index.d.ts rename to types/i18next-sprintf-postprocessor/index.d.ts diff --git a/i18next-sprintf-postprocessor/tsconfig.json b/types/i18next-sprintf-postprocessor/tsconfig.json similarity index 100% rename from i18next-sprintf-postprocessor/tsconfig.json rename to types/i18next-sprintf-postprocessor/tsconfig.json diff --git a/i18next-xhr-backend/i18next-xhr-backend-tests.ts b/types/i18next-xhr-backend/i18next-xhr-backend-tests.ts similarity index 100% rename from i18next-xhr-backend/i18next-xhr-backend-tests.ts rename to types/i18next-xhr-backend/i18next-xhr-backend-tests.ts diff --git a/i18next-xhr-backend/index.d.ts b/types/i18next-xhr-backend/index.d.ts similarity index 100% rename from i18next-xhr-backend/index.d.ts rename to types/i18next-xhr-backend/index.d.ts diff --git a/i18next-xhr-backend/tsconfig.json b/types/i18next-xhr-backend/tsconfig.json similarity index 100% rename from i18next-xhr-backend/tsconfig.json rename to types/i18next-xhr-backend/tsconfig.json diff --git a/i18next/i18next-tests.ts b/types/i18next/i18next-tests.ts similarity index 100% rename from i18next/i18next-tests.ts rename to types/i18next/i18next-tests.ts diff --git a/i18next/index.d.ts b/types/i18next/index.d.ts similarity index 100% rename from i18next/index.d.ts rename to types/i18next/index.d.ts diff --git a/i18next/tsconfig.json b/types/i18next/tsconfig.json similarity index 100% rename from i18next/tsconfig.json rename to types/i18next/tsconfig.json diff --git a/i2c-bus/i2c-bus-tests.ts b/types/i2c-bus/i2c-bus-tests.ts similarity index 100% rename from i2c-bus/i2c-bus-tests.ts rename to types/i2c-bus/i2c-bus-tests.ts diff --git a/i2c-bus/index.d.ts b/types/i2c-bus/index.d.ts similarity index 100% rename from i2c-bus/index.d.ts rename to types/i2c-bus/index.d.ts diff --git a/i2c-bus/tsconfig.json b/types/i2c-bus/tsconfig.json similarity index 100% rename from i2c-bus/tsconfig.json rename to types/i2c-bus/tsconfig.json diff --git a/iban/iban-tests.ts b/types/iban/iban-tests.ts similarity index 100% rename from iban/iban-tests.ts rename to types/iban/iban-tests.ts diff --git a/iban/index.d.ts b/types/iban/index.d.ts similarity index 100% rename from iban/index.d.ts rename to types/iban/index.d.ts diff --git a/iban/tsconfig.json b/types/iban/tsconfig.json similarity index 100% rename from iban/tsconfig.json rename to types/iban/tsconfig.json diff --git a/ibm-mobilefirst/ibm-mobilefirst-tests.ts b/types/ibm-mobilefirst/ibm-mobilefirst-tests.ts similarity index 100% rename from ibm-mobilefirst/ibm-mobilefirst-tests.ts rename to types/ibm-mobilefirst/ibm-mobilefirst-tests.ts diff --git a/ibm-mobilefirst/index.d.ts b/types/ibm-mobilefirst/index.d.ts similarity index 100% rename from ibm-mobilefirst/index.d.ts rename to types/ibm-mobilefirst/index.d.ts diff --git a/ibm-mobilefirst/tsconfig.json b/types/ibm-mobilefirst/tsconfig.json similarity index 100% rename from ibm-mobilefirst/tsconfig.json rename to types/ibm-mobilefirst/tsconfig.json diff --git a/icepick/icepick-tests.ts b/types/icepick/icepick-tests.ts similarity index 100% rename from icepick/icepick-tests.ts rename to types/icepick/icepick-tests.ts diff --git a/icepick/index.d.ts b/types/icepick/index.d.ts similarity index 100% rename from icepick/index.d.ts rename to types/icepick/index.d.ts diff --git a/icepick/tsconfig.json b/types/icepick/tsconfig.json similarity index 100% rename from icepick/tsconfig.json rename to types/icepick/tsconfig.json diff --git a/icheck/icheck-tests.ts b/types/icheck/icheck-tests.ts similarity index 100% rename from icheck/icheck-tests.ts rename to types/icheck/icheck-tests.ts diff --git a/icheck/index.d.ts b/types/icheck/index.d.ts similarity index 100% rename from icheck/index.d.ts rename to types/icheck/index.d.ts diff --git a/icheck/tsconfig.json b/types/icheck/tsconfig.json similarity index 100% rename from icheck/tsconfig.json rename to types/icheck/tsconfig.json diff --git a/iconv-lite/iconv-lite-tests.ts b/types/iconv-lite/iconv-lite-tests.ts similarity index 100% rename from iconv-lite/iconv-lite-tests.ts rename to types/iconv-lite/iconv-lite-tests.ts diff --git a/iconv-lite/index.d.ts b/types/iconv-lite/index.d.ts similarity index 100% rename from iconv-lite/index.d.ts rename to types/iconv-lite/index.d.ts diff --git a/iconv-lite/tsconfig.json b/types/iconv-lite/tsconfig.json similarity index 100% rename from iconv-lite/tsconfig.json rename to types/iconv-lite/tsconfig.json diff --git a/iconv/iconv-tests.ts b/types/iconv/iconv-tests.ts similarity index 100% rename from iconv/iconv-tests.ts rename to types/iconv/iconv-tests.ts diff --git a/iconv/index.d.ts b/types/iconv/index.d.ts similarity index 100% rename from iconv/index.d.ts rename to types/iconv/index.d.ts diff --git a/iconv/tsconfig.json b/types/iconv/tsconfig.json similarity index 100% rename from iconv/tsconfig.json rename to types/iconv/tsconfig.json diff --git a/ids/ids-tests.ts b/types/ids/ids-tests.ts similarity index 100% rename from ids/ids-tests.ts rename to types/ids/ids-tests.ts diff --git a/ids/index.d.ts b/types/ids/index.d.ts similarity index 100% rename from ids/index.d.ts rename to types/ids/index.d.ts diff --git a/ids/tsconfig.json b/types/ids/tsconfig.json similarity index 100% rename from ids/tsconfig.json rename to types/ids/tsconfig.json diff --git a/types/ignite-ui/index.d.ts b/types/ignite-ui/index.d.ts new file mode 100644 index 0000000000..6909aa644c --- /dev/null +++ b/types/ignite-ui/index.d.ts @@ -0,0 +1,85629 @@ +// 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 module Infragistics { +export 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 module Infragistics { +export 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 module Infragistics { +export 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 module Infragistics { +export 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 module Infragistics { +export 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 module Infragistics { +export 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 module Infragistics { +export 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 module Infragistics { +export 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 module Infragistics { +export 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 module Infragistics { +export 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 module Infragistics { +export 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 module Infragistics { +export 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 module Infragistics { +export 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 module Infragistics { +export 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 module Infragistics { +export 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 module Infragistics { +export 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 module Infragistics { +export 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 module Infragistics { +export 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 module Infragistics { +export 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 module Infragistics { +export 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 module Infragistics { +export 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 module Infragistics { +export 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 module Infragistics { +export 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 module Infragistics { +export 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 module Infragistics { +export 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 module Infragistics { +export 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 module Infragistics { +export 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 module Infragistics { +export 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 module Infragistics { +export 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 module Infragistics { +export 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 module Infragistics { +export 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 module Infragistics { +export 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 module Infragistics { +export 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 module Infragistics { +export 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 module Infragistics { +export 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 module Infragistics { +export 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 module Infragistics { +export 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 module Infragistics { +export 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 module Infragistics { +export 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 module Infragistics { +export 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 module Infragistics { +export 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 module Infragistics { +export 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 module Infragistics { +export 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 module Infragistics { +export 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 module Infragistics { +export 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 module Infragistics { +export 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 module Infragistics { +export 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 module Infragistics { +export 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 module Infragistics { +export 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 module Infragistics { +export 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 module Infragistics { +export 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 module Infragistics { +export 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 module Infragistics { +export 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 module Infragistics { +export 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 module Infragistics { +export 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 module Infragistics { +export 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 module Infragistics { +export 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 module Infragistics { +export 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 module Infragistics { +export 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 module Infragistics { +export 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 module Infragistics { +export 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 module Infragistics { +export 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 module Infragistics { +export 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 module Infragistics { +export 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 module Infragistics { +export 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 module Infragistics { +export 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 module Infragistics { +export 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 module Infragistics { +export 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 module Infragistics { +export class IgValidatorValueRule { + constructor(name: string); + constructor(formatItems: any[]); + getMessageType(): void; + isValid(options: Object, value: Object): void; +} +} +interface IgniteUIStatic { +IgValidatorValueRule: typeof Infragistics.IgValidatorValueRule; +} + +declare module Infragistics { +export 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 module Infragistics { +export 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 module Infragistics { +export 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 module Infragistics { +export 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 module Infragistics { +export 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 module Infragistics { +export 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 module Infragistics { +export 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/jointjs/tsconfig.json b/types/ignite-ui/tsconfig.json similarity index 100% rename from jointjs/tsconfig.json rename to types/ignite-ui/tsconfig.json diff --git a/types/ignite-ui/tslint.json b/types/ignite-ui/tslint.json new file mode 100644 index 0000000000..71f9eaad3f --- /dev/null +++ b/types/ignite-ui/tslint.json @@ -0,0 +1,10 @@ +{ + "extends": "../tslint.json", + "rules": { + "dt-header": false, + "forbidden-types": false, + "unified-signatures": false, + "max-line-length": false, + "whitespace": false + } +} \ No newline at end of file diff --git a/image-size/image-size-tests.ts b/types/image-size/image-size-tests.ts similarity index 100% rename from image-size/image-size-tests.ts rename to types/image-size/image-size-tests.ts diff --git a/image-size/index.d.ts b/types/image-size/index.d.ts similarity index 100% rename from image-size/index.d.ts rename to types/image-size/index.d.ts diff --git a/image-size/tsconfig.json b/types/image-size/tsconfig.json similarity index 100% rename from image-size/tsconfig.json rename to types/image-size/tsconfig.json diff --git a/imagemagick-native/imagemagick-native-tests.ts b/types/imagemagick-native/imagemagick-native-tests.ts similarity index 100% rename from imagemagick-native/imagemagick-native-tests.ts rename to types/imagemagick-native/imagemagick-native-tests.ts diff --git a/imagemagick-native/index.d.ts b/types/imagemagick-native/index.d.ts similarity index 100% rename from imagemagick-native/index.d.ts rename to types/imagemagick-native/index.d.ts diff --git a/imagemagick-native/tsconfig.json b/types/imagemagick-native/tsconfig.json similarity index 100% rename from imagemagick-native/tsconfig.json rename to types/imagemagick-native/tsconfig.json diff --git a/imagemagick/imagemagick-tests.ts b/types/imagemagick/imagemagick-tests.ts similarity index 100% rename from imagemagick/imagemagick-tests.ts rename to types/imagemagick/imagemagick-tests.ts diff --git a/imagemagick/index.d.ts b/types/imagemagick/index.d.ts similarity index 100% rename from imagemagick/index.d.ts rename to types/imagemagick/index.d.ts diff --git a/imagemagick/tsconfig.json b/types/imagemagick/tsconfig.json similarity index 100% rename from imagemagick/tsconfig.json rename to types/imagemagick/tsconfig.json diff --git a/imagemapster/imagemapster-tests.ts b/types/imagemapster/imagemapster-tests.ts similarity index 100% rename from imagemapster/imagemapster-tests.ts rename to types/imagemapster/imagemapster-tests.ts diff --git a/imagemapster/index.d.ts b/types/imagemapster/index.d.ts similarity index 100% rename from imagemapster/index.d.ts rename to types/imagemapster/index.d.ts diff --git a/imagemapster/tsconfig.json b/types/imagemapster/tsconfig.json similarity index 100% rename from imagemapster/tsconfig.json rename to types/imagemapster/tsconfig.json diff --git a/imagesloaded/imagesloaded-tests.ts b/types/imagesloaded/imagesloaded-tests.ts similarity index 100% rename from imagesloaded/imagesloaded-tests.ts rename to types/imagesloaded/imagesloaded-tests.ts diff --git a/imagesloaded/index.d.ts b/types/imagesloaded/index.d.ts similarity index 100% rename from imagesloaded/index.d.ts rename to types/imagesloaded/index.d.ts diff --git a/imagesloaded/tsconfig.json b/types/imagesloaded/tsconfig.json similarity index 100% rename from imagesloaded/tsconfig.json rename to types/imagesloaded/tsconfig.json diff --git a/imap-simple/imap-simple-tests.ts b/types/imap-simple/imap-simple-tests.ts similarity index 100% rename from imap-simple/imap-simple-tests.ts rename to types/imap-simple/imap-simple-tests.ts diff --git a/imap-simple/index.d.ts b/types/imap-simple/index.d.ts similarity index 100% rename from imap-simple/index.d.ts rename to types/imap-simple/index.d.ts diff --git a/imap-simple/tsconfig.json b/types/imap-simple/tsconfig.json similarity index 100% rename from imap-simple/tsconfig.json rename to types/imap-simple/tsconfig.json diff --git a/imap/imap-tests.ts b/types/imap/imap-tests.ts similarity index 100% rename from imap/imap-tests.ts rename to types/imap/imap-tests.ts diff --git a/imap/index.d.ts b/types/imap/index.d.ts similarity index 100% rename from imap/index.d.ts rename to types/imap/index.d.ts diff --git a/imap/tsconfig.json b/types/imap/tsconfig.json similarity index 100% rename from imap/tsconfig.json rename to types/imap/tsconfig.json diff --git a/imgur-rest-api/imgur-rest-api-tests.ts b/types/imgur-rest-api/imgur-rest-api-tests.ts similarity index 100% rename from imgur-rest-api/imgur-rest-api-tests.ts rename to types/imgur-rest-api/imgur-rest-api-tests.ts diff --git a/imgur-rest-api/index.d.ts b/types/imgur-rest-api/index.d.ts similarity index 100% rename from imgur-rest-api/index.d.ts rename to types/imgur-rest-api/index.d.ts diff --git a/imgur-rest-api/tsconfig.json b/types/imgur-rest-api/tsconfig.json similarity index 100% rename from imgur-rest-api/tsconfig.json rename to types/imgur-rest-api/tsconfig.json diff --git a/immutability-helper/immutability-helper-tests.ts b/types/immutability-helper/immutability-helper-tests.ts similarity index 100% rename from immutability-helper/immutability-helper-tests.ts rename to types/immutability-helper/immutability-helper-tests.ts diff --git a/immutability-helper/index.d.ts b/types/immutability-helper/index.d.ts similarity index 100% rename from immutability-helper/index.d.ts rename to types/immutability-helper/index.d.ts diff --git a/immutability-helper/tsconfig.json b/types/immutability-helper/tsconfig.json similarity index 100% rename from immutability-helper/tsconfig.json rename to types/immutability-helper/tsconfig.json diff --git a/impress/impress-tests.ts b/types/impress/impress-tests.ts similarity index 100% rename from impress/impress-tests.ts rename to types/impress/impress-tests.ts diff --git a/impress/index.d.ts b/types/impress/index.d.ts similarity index 100% rename from impress/index.d.ts rename to types/impress/index.d.ts diff --git a/impress/tsconfig.json b/types/impress/tsconfig.json similarity index 100% rename from impress/tsconfig.json rename to types/impress/tsconfig.json diff --git a/in-range/in-range-tests.ts b/types/in-range/in-range-tests.ts similarity index 100% rename from in-range/in-range-tests.ts rename to types/in-range/in-range-tests.ts diff --git a/in-range/index.d.ts b/types/in-range/index.d.ts similarity index 100% rename from in-range/index.d.ts rename to types/in-range/index.d.ts diff --git a/in-range/tsconfig.json b/types/in-range/tsconfig.json similarity index 100% rename from in-range/tsconfig.json rename to types/in-range/tsconfig.json diff --git a/in-range/tslint.json b/types/in-range/tslint.json similarity index 100% rename from in-range/tslint.json rename to types/in-range/tslint.json diff --git a/incremental-dom/incremental-dom-tests.ts b/types/incremental-dom/incremental-dom-tests.ts similarity index 100% rename from incremental-dom/incremental-dom-tests.ts rename to types/incremental-dom/incremental-dom-tests.ts diff --git a/incremental-dom/index.d.ts b/types/incremental-dom/index.d.ts similarity index 100% rename from incremental-dom/index.d.ts rename to types/incremental-dom/index.d.ts diff --git a/incremental-dom/tsconfig.json b/types/incremental-dom/tsconfig.json similarity index 100% rename from incremental-dom/tsconfig.json rename to types/incremental-dom/tsconfig.json diff --git a/indent-string/indent-string-tests.ts b/types/indent-string/indent-string-tests.ts similarity index 100% rename from indent-string/indent-string-tests.ts rename to types/indent-string/indent-string-tests.ts diff --git a/indent-string/index.d.ts b/types/indent-string/index.d.ts similarity index 100% rename from indent-string/index.d.ts rename to types/indent-string/index.d.ts diff --git a/indent-string/tsconfig.json b/types/indent-string/tsconfig.json similarity index 100% rename from indent-string/tsconfig.json rename to types/indent-string/tsconfig.json diff --git a/indent-string/tslint.json b/types/indent-string/tslint.json similarity index 100% rename from indent-string/tslint.json rename to types/indent-string/tslint.json diff --git a/inert/index.d.ts b/types/inert/index.d.ts similarity index 100% rename from inert/index.d.ts rename to types/inert/index.d.ts diff --git a/inert/inert-tests.ts b/types/inert/inert-tests.ts similarity index 100% rename from inert/inert-tests.ts rename to types/inert/inert-tests.ts diff --git a/inert/tsconfig.json b/types/inert/tsconfig.json similarity index 100% rename from inert/tsconfig.json rename to types/inert/tsconfig.json diff --git a/inert/tslint.json b/types/inert/tslint.json similarity index 100% rename from inert/tslint.json rename to types/inert/tslint.json diff --git a/inflected/index.d.ts b/types/inflected/index.d.ts similarity index 100% rename from inflected/index.d.ts rename to types/inflected/index.d.ts diff --git a/inflected/inflected-tests.ts b/types/inflected/inflected-tests.ts similarity index 100% rename from inflected/inflected-tests.ts rename to types/inflected/inflected-tests.ts diff --git a/inflected/tsconfig.json b/types/inflected/tsconfig.json similarity index 100% rename from inflected/tsconfig.json rename to types/inflected/tsconfig.json diff --git a/inflection/index.d.ts b/types/inflection/index.d.ts similarity index 100% rename from inflection/index.d.ts rename to types/inflection/index.d.ts diff --git a/inflection/inflection-tests.ts b/types/inflection/inflection-tests.ts similarity index 100% rename from inflection/inflection-tests.ts rename to types/inflection/inflection-tests.ts diff --git a/inflection/tsconfig.json b/types/inflection/tsconfig.json similarity index 100% rename from inflection/tsconfig.json rename to types/inflection/tsconfig.json diff --git a/inherits/index.d.ts b/types/inherits/index.d.ts similarity index 100% rename from inherits/index.d.ts rename to types/inherits/index.d.ts diff --git a/inherits/inherits-tests.ts b/types/inherits/inherits-tests.ts similarity index 100% rename from inherits/inherits-tests.ts rename to types/inherits/inherits-tests.ts diff --git a/inherits/tsconfig.json b/types/inherits/tsconfig.json similarity index 100% rename from inherits/tsconfig.json rename to types/inherits/tsconfig.json diff --git a/ini/index.d.ts b/types/ini/index.d.ts similarity index 100% rename from ini/index.d.ts rename to types/ini/index.d.ts diff --git a/ini/ini-tests.ts b/types/ini/ini-tests.ts similarity index 100% rename from ini/ini-tests.ts rename to types/ini/ini-tests.ts diff --git a/ini/tsconfig.json b/types/ini/tsconfig.json similarity index 100% rename from ini/tsconfig.json rename to types/ini/tsconfig.json diff --git a/iniparser/index.d.ts b/types/iniparser/index.d.ts similarity index 100% rename from iniparser/index.d.ts rename to types/iniparser/index.d.ts diff --git a/iniparser/iniparser-tests.ts b/types/iniparser/iniparser-tests.ts similarity index 100% rename from iniparser/iniparser-tests.ts rename to types/iniparser/iniparser-tests.ts diff --git a/iniparser/tsconfig.json b/types/iniparser/tsconfig.json similarity index 100% rename from iniparser/tsconfig.json rename to types/iniparser/tsconfig.json diff --git a/inline-css/index.d.ts b/types/inline-css/index.d.ts similarity index 100% rename from inline-css/index.d.ts rename to types/inline-css/index.d.ts diff --git a/inline-css/inline-css-tests.ts b/types/inline-css/inline-css-tests.ts similarity index 100% rename from inline-css/inline-css-tests.ts rename to types/inline-css/inline-css-tests.ts diff --git a/inline-css/tsconfig.json b/types/inline-css/tsconfig.json similarity index 100% rename from inline-css/tsconfig.json rename to types/inline-css/tsconfig.json diff --git a/inquirer/index.d.ts b/types/inquirer/index.d.ts similarity index 100% rename from inquirer/index.d.ts rename to types/inquirer/index.d.ts diff --git a/inquirer/inquirer-tests.ts b/types/inquirer/inquirer-tests.ts similarity index 100% rename from inquirer/inquirer-tests.ts rename to types/inquirer/inquirer-tests.ts diff --git a/inquirer/tsconfig.json b/types/inquirer/tsconfig.json similarity index 100% rename from inquirer/tsconfig.json rename to types/inquirer/tsconfig.json diff --git a/insight/index.d.ts b/types/insight/index.d.ts similarity index 100% rename from insight/index.d.ts rename to types/insight/index.d.ts diff --git a/insight/insight-tests.ts b/types/insight/insight-tests.ts similarity index 100% rename from insight/insight-tests.ts rename to types/insight/insight-tests.ts diff --git a/insight/tsconfig.json b/types/insight/tsconfig.json similarity index 100% rename from insight/tsconfig.json rename to types/insight/tsconfig.json diff --git a/interact.js/index.d.ts b/types/interact.js/index.d.ts similarity index 100% rename from interact.js/index.d.ts rename to types/interact.js/index.d.ts diff --git a/interact.js/interact.js-tests.ts b/types/interact.js/interact.js-tests.ts similarity index 100% rename from interact.js/interact.js-tests.ts rename to types/interact.js/interact.js-tests.ts diff --git a/interact.js/tsconfig.json b/types/interact.js/tsconfig.json similarity index 100% rename from interact.js/tsconfig.json rename to types/interact.js/tsconfig.json diff --git a/intercomjs/index.d.ts b/types/intercomjs/index.d.ts similarity index 100% rename from intercomjs/index.d.ts rename to types/intercomjs/index.d.ts diff --git a/intercomjs/intercomjs-tests.ts b/types/intercomjs/intercomjs-tests.ts similarity index 100% rename from intercomjs/intercomjs-tests.ts rename to types/intercomjs/intercomjs-tests.ts diff --git a/intercomjs/tsconfig.json b/types/intercomjs/tsconfig.json similarity index 100% rename from intercomjs/tsconfig.json rename to types/intercomjs/tsconfig.json diff --git a/intl-messageformat/index.d.ts b/types/intl-messageformat/index.d.ts similarity index 100% rename from intl-messageformat/index.d.ts rename to types/intl-messageformat/index.d.ts diff --git a/intl-messageformat/intl-messageformat-tests.ts b/types/intl-messageformat/intl-messageformat-tests.ts similarity index 100% rename from intl-messageformat/intl-messageformat-tests.ts rename to types/intl-messageformat/intl-messageformat-tests.ts diff --git a/intl-messageformat/tsconfig.json b/types/intl-messageformat/tsconfig.json similarity index 100% rename from intl-messageformat/tsconfig.json rename to types/intl-messageformat/tsconfig.json diff --git a/intl-messageformat/tslint.json b/types/intl-messageformat/tslint.json similarity index 100% rename from intl-messageformat/tslint.json rename to types/intl-messageformat/tslint.json diff --git a/intl-tel-input/index.d.ts b/types/intl-tel-input/index.d.ts similarity index 100% rename from intl-tel-input/index.d.ts rename to types/intl-tel-input/index.d.ts diff --git a/intl-tel-input/intl-tel-input-tests.ts b/types/intl-tel-input/intl-tel-input-tests.ts similarity index 100% rename from intl-tel-input/intl-tel-input-tests.ts rename to types/intl-tel-input/intl-tel-input-tests.ts diff --git a/intl-tel-input/tsconfig.json b/types/intl-tel-input/tsconfig.json similarity index 100% rename from intl-tel-input/tsconfig.json rename to types/intl-tel-input/tsconfig.json diff --git a/intro.js/index.d.ts b/types/intro.js/index.d.ts similarity index 100% rename from intro.js/index.d.ts rename to types/intro.js/index.d.ts diff --git a/intro.js/intro.js-tests.ts b/types/intro.js/intro.js-tests.ts similarity index 100% rename from intro.js/intro.js-tests.ts rename to types/intro.js/intro.js-tests.ts diff --git a/intro.js/tsconfig.json b/types/intro.js/tsconfig.json similarity index 100% rename from intro.js/tsconfig.json rename to types/intro.js/tsconfig.json diff --git a/invariant/index.d.ts b/types/invariant/index.d.ts similarity index 100% rename from invariant/index.d.ts rename to types/invariant/index.d.ts diff --git a/invariant/invariant-tests.ts b/types/invariant/invariant-tests.ts similarity index 100% rename from invariant/invariant-tests.ts rename to types/invariant/invariant-tests.ts diff --git a/invariant/tsconfig.json b/types/invariant/tsconfig.json similarity index 100% rename from invariant/tsconfig.json rename to types/invariant/tsconfig.json diff --git a/inversify-devtools/index.d.ts b/types/inversify-devtools/index.d.ts similarity index 100% rename from inversify-devtools/index.d.ts rename to types/inversify-devtools/index.d.ts diff --git a/inversify-devtools/inversify-devtools-tests.ts b/types/inversify-devtools/inversify-devtools-tests.ts similarity index 100% rename from inversify-devtools/inversify-devtools-tests.ts rename to types/inversify-devtools/inversify-devtools-tests.ts diff --git a/inversify-devtools/package.json b/types/inversify-devtools/package.json similarity index 100% rename from inversify-devtools/package.json rename to types/inversify-devtools/package.json diff --git a/inversify-devtools/tsconfig.json b/types/inversify-devtools/tsconfig.json similarity index 100% rename from inversify-devtools/tsconfig.json rename to types/inversify-devtools/tsconfig.json diff --git a/ion.rangeslider/index.d.ts b/types/ion.rangeslider/index.d.ts similarity index 100% rename from ion.rangeslider/index.d.ts rename to types/ion.rangeslider/index.d.ts diff --git a/ion.rangeslider/ion.rangeslider-tests.ts b/types/ion.rangeslider/ion.rangeslider-tests.ts similarity index 100% rename from ion.rangeslider/ion.rangeslider-tests.ts rename to types/ion.rangeslider/ion.rangeslider-tests.ts diff --git a/ion.rangeslider/tsconfig.json b/types/ion.rangeslider/tsconfig.json similarity index 100% rename from ion.rangeslider/tsconfig.json rename to types/ion.rangeslider/tsconfig.json diff --git a/ion.rangeslider/v1/index.d.ts b/types/ion.rangeslider/v1/index.d.ts similarity index 100% rename from ion.rangeslider/v1/index.d.ts rename to types/ion.rangeslider/v1/index.d.ts diff --git a/ion.rangeslider/v1/ion.rangeslider-tests.ts b/types/ion.rangeslider/v1/ion.rangeslider-tests.ts similarity index 100% rename from ion.rangeslider/v1/ion.rangeslider-tests.ts rename to types/ion.rangeslider/v1/ion.rangeslider-tests.ts diff --git a/ion.rangeslider/v1/tsconfig.json b/types/ion.rangeslider/v1/tsconfig.json similarity index 100% rename from ion.rangeslider/v1/tsconfig.json rename to types/ion.rangeslider/v1/tsconfig.json diff --git a/ionic/index.d.ts b/types/ionic/index.d.ts similarity index 100% rename from ionic/index.d.ts rename to types/ionic/index.d.ts diff --git a/ionic/ionic-tests.ts b/types/ionic/ionic-tests.ts similarity index 100% rename from ionic/ionic-tests.ts rename to types/ionic/ionic-tests.ts diff --git a/ionic/tsconfig.json b/types/ionic/tsconfig.json similarity index 100% rename from ionic/tsconfig.json rename to types/ionic/tsconfig.json diff --git a/ioredis/index.d.ts b/types/ioredis/index.d.ts similarity index 100% rename from ioredis/index.d.ts rename to types/ioredis/index.d.ts diff --git a/ioredis/ioredis-tests.ts b/types/ioredis/ioredis-tests.ts similarity index 100% rename from ioredis/ioredis-tests.ts rename to types/ioredis/ioredis-tests.ts diff --git a/ioredis/tsconfig.json b/types/ioredis/tsconfig.json similarity index 100% rename from ioredis/tsconfig.json rename to types/ioredis/tsconfig.json diff --git a/ip-regex/index.d.ts b/types/ip-regex/index.d.ts similarity index 100% rename from ip-regex/index.d.ts rename to types/ip-regex/index.d.ts diff --git a/ip-regex/ip-regex-tests.ts b/types/ip-regex/ip-regex-tests.ts similarity index 100% rename from ip-regex/ip-regex-tests.ts rename to types/ip-regex/ip-regex-tests.ts diff --git a/ip-regex/tsconfig.json b/types/ip-regex/tsconfig.json similarity index 100% rename from ip-regex/tsconfig.json rename to types/ip-regex/tsconfig.json diff --git a/ip-regex/tslint.json b/types/ip-regex/tslint.json similarity index 100% rename from ip-regex/tslint.json rename to types/ip-regex/tslint.json diff --git a/ip/index.d.ts b/types/ip/index.d.ts similarity index 100% rename from ip/index.d.ts rename to types/ip/index.d.ts diff --git a/ip/ip-tests.ts b/types/ip/ip-tests.ts similarity index 100% rename from ip/ip-tests.ts rename to types/ip/ip-tests.ts diff --git a/ip/tsconfig.json b/types/ip/tsconfig.json similarity index 100% rename from ip/tsconfig.json rename to types/ip/tsconfig.json diff --git a/irc/index.d.ts b/types/irc/index.d.ts similarity index 100% rename from irc/index.d.ts rename to types/irc/index.d.ts diff --git a/irc/irc-tests.ts b/types/irc/irc-tests.ts similarity index 100% rename from irc/irc-tests.ts rename to types/irc/irc-tests.ts diff --git a/irc/tsconfig.json b/types/irc/tsconfig.json similarity index 100% rename from irc/tsconfig.json rename to types/irc/tsconfig.json diff --git a/is-absolute-url/index.d.ts b/types/is-absolute-url/index.d.ts similarity index 100% rename from is-absolute-url/index.d.ts rename to types/is-absolute-url/index.d.ts diff --git a/is-absolute-url/is-absolute-url-tests.ts b/types/is-absolute-url/is-absolute-url-tests.ts similarity index 100% rename from is-absolute-url/is-absolute-url-tests.ts rename to types/is-absolute-url/is-absolute-url-tests.ts diff --git a/is-absolute-url/tsconfig.json b/types/is-absolute-url/tsconfig.json similarity index 100% rename from is-absolute-url/tsconfig.json rename to types/is-absolute-url/tsconfig.json diff --git a/is-absolute-url/tslint.json b/types/is-absolute-url/tslint.json similarity index 100% rename from is-absolute-url/tslint.json rename to types/is-absolute-url/tslint.json diff --git a/is-archive/index.d.ts b/types/is-archive/index.d.ts similarity index 100% rename from is-archive/index.d.ts rename to types/is-archive/index.d.ts diff --git a/is-archive/is-archive-tests.ts b/types/is-archive/is-archive-tests.ts similarity index 100% rename from is-archive/is-archive-tests.ts rename to types/is-archive/is-archive-tests.ts diff --git a/is-archive/tsconfig.json b/types/is-archive/tsconfig.json similarity index 100% rename from is-archive/tsconfig.json rename to types/is-archive/tsconfig.json diff --git a/is-archive/tslint.json b/types/is-archive/tslint.json similarity index 100% rename from is-archive/tslint.json rename to types/is-archive/tslint.json diff --git a/is-array/index.d.ts b/types/is-array/index.d.ts similarity index 100% rename from is-array/index.d.ts rename to types/is-array/index.d.ts diff --git a/is-array/is-array-tests.ts b/types/is-array/is-array-tests.ts similarity index 100% rename from is-array/is-array-tests.ts rename to types/is-array/is-array-tests.ts diff --git a/is-array/tsconfig.json b/types/is-array/tsconfig.json similarity index 100% rename from is-array/tsconfig.json rename to types/is-array/tsconfig.json diff --git a/is-array/tslint.json b/types/is-array/tslint.json similarity index 100% rename from is-array/tslint.json rename to types/is-array/tslint.json diff --git a/is-binary-path/index.d.ts b/types/is-binary-path/index.d.ts similarity index 100% rename from is-binary-path/index.d.ts rename to types/is-binary-path/index.d.ts diff --git a/is-binary-path/is-binary-path-tests.ts b/types/is-binary-path/is-binary-path-tests.ts similarity index 100% rename from is-binary-path/is-binary-path-tests.ts rename to types/is-binary-path/is-binary-path-tests.ts diff --git a/is-binary-path/tsconfig.json b/types/is-binary-path/tsconfig.json similarity index 100% rename from is-binary-path/tsconfig.json rename to types/is-binary-path/tsconfig.json diff --git a/is-binary-path/tslint.json b/types/is-binary-path/tslint.json similarity index 100% rename from is-binary-path/tslint.json rename to types/is-binary-path/tslint.json diff --git a/is-compressed/index.d.ts b/types/is-compressed/index.d.ts similarity index 100% rename from is-compressed/index.d.ts rename to types/is-compressed/index.d.ts diff --git a/is-compressed/is-compressed-tests.ts b/types/is-compressed/is-compressed-tests.ts similarity index 100% rename from is-compressed/is-compressed-tests.ts rename to types/is-compressed/is-compressed-tests.ts diff --git a/is-compressed/tsconfig.json b/types/is-compressed/tsconfig.json similarity index 100% rename from is-compressed/tsconfig.json rename to types/is-compressed/tsconfig.json diff --git a/is-compressed/tslint.json b/types/is-compressed/tslint.json similarity index 100% rename from is-compressed/tslint.json rename to types/is-compressed/tslint.json diff --git a/is-finite/index.d.ts b/types/is-finite/index.d.ts similarity index 100% rename from is-finite/index.d.ts rename to types/is-finite/index.d.ts diff --git a/is-finite/tsconfig.json b/types/is-finite/tsconfig.json similarity index 100% rename from is-finite/tsconfig.json rename to types/is-finite/tsconfig.json diff --git a/is-finite/tslint.json b/types/is-finite/tslint.json similarity index 100% rename from is-finite/tslint.json rename to types/is-finite/tslint.json diff --git a/is-my-json-valid/index.d.ts b/types/is-my-json-valid/index.d.ts similarity index 100% rename from is-my-json-valid/index.d.ts rename to types/is-my-json-valid/index.d.ts diff --git a/is-my-json-valid/is-my-json-valid-tests.ts b/types/is-my-json-valid/is-my-json-valid-tests.ts similarity index 100% rename from is-my-json-valid/is-my-json-valid-tests.ts rename to types/is-my-json-valid/is-my-json-valid-tests.ts diff --git a/is-my-json-valid/tsconfig.json b/types/is-my-json-valid/tsconfig.json similarity index 100% rename from is-my-json-valid/tsconfig.json rename to types/is-my-json-valid/tsconfig.json diff --git a/is-path-cwd/index.d.ts b/types/is-path-cwd/index.d.ts similarity index 100% rename from is-path-cwd/index.d.ts rename to types/is-path-cwd/index.d.ts diff --git a/is-path-cwd/is-path-cwd-tests.ts b/types/is-path-cwd/is-path-cwd-tests.ts similarity index 100% rename from is-path-cwd/is-path-cwd-tests.ts rename to types/is-path-cwd/is-path-cwd-tests.ts diff --git a/is-path-cwd/tsconfig.json b/types/is-path-cwd/tsconfig.json similarity index 100% rename from is-path-cwd/tsconfig.json rename to types/is-path-cwd/tsconfig.json diff --git a/is-path-cwd/tslint.json b/types/is-path-cwd/tslint.json similarity index 100% rename from is-path-cwd/tslint.json rename to types/is-path-cwd/tslint.json diff --git a/is-path-in-cwd/index.d.ts b/types/is-path-in-cwd/index.d.ts similarity index 100% rename from is-path-in-cwd/index.d.ts rename to types/is-path-in-cwd/index.d.ts diff --git a/is-path-in-cwd/tsconfig.json b/types/is-path-in-cwd/tsconfig.json similarity index 100% rename from is-path-in-cwd/tsconfig.json rename to types/is-path-in-cwd/tsconfig.json diff --git a/is-path-in-cwd/tslint.json b/types/is-path-in-cwd/tslint.json similarity index 100% rename from is-path-in-cwd/tslint.json rename to types/is-path-in-cwd/tslint.json diff --git a/is-plain-object/index.d.ts b/types/is-plain-object/index.d.ts similarity index 100% rename from is-plain-object/index.d.ts rename to types/is-plain-object/index.d.ts diff --git a/is-plain-object/is-plain-object-tests.ts b/types/is-plain-object/is-plain-object-tests.ts similarity index 100% rename from is-plain-object/is-plain-object-tests.ts rename to types/is-plain-object/is-plain-object-tests.ts diff --git a/is-plain-object/tsconfig.json b/types/is-plain-object/tsconfig.json similarity index 100% rename from is-plain-object/tsconfig.json rename to types/is-plain-object/tsconfig.json diff --git a/is-promise/index.d.ts b/types/is-promise/index.d.ts similarity index 100% rename from is-promise/index.d.ts rename to types/is-promise/index.d.ts diff --git a/is-promise/is-promise-tests.ts b/types/is-promise/is-promise-tests.ts similarity index 100% rename from is-promise/is-promise-tests.ts rename to types/is-promise/is-promise-tests.ts diff --git a/is-promise/tsconfig.json b/types/is-promise/tsconfig.json similarity index 100% rename from is-promise/tsconfig.json rename to types/is-promise/tsconfig.json diff --git a/is-relative-url/index.d.ts b/types/is-relative-url/index.d.ts similarity index 100% rename from is-relative-url/index.d.ts rename to types/is-relative-url/index.d.ts diff --git a/is-relative-url/is-relative-url-tests.ts b/types/is-relative-url/is-relative-url-tests.ts similarity index 100% rename from is-relative-url/is-relative-url-tests.ts rename to types/is-relative-url/is-relative-url-tests.ts diff --git a/is-relative-url/tsconfig.json b/types/is-relative-url/tsconfig.json similarity index 100% rename from is-relative-url/tsconfig.json rename to types/is-relative-url/tsconfig.json diff --git a/is-relative-url/tslint.json b/types/is-relative-url/tslint.json similarity index 100% rename from is-relative-url/tslint.json rename to types/is-relative-url/tslint.json diff --git a/is-root-path/index.d.ts b/types/is-root-path/index.d.ts similarity index 100% rename from is-root-path/index.d.ts rename to types/is-root-path/index.d.ts diff --git a/is-root-path/is-root-path-tests.ts b/types/is-root-path/is-root-path-tests.ts similarity index 100% rename from is-root-path/is-root-path-tests.ts rename to types/is-root-path/is-root-path-tests.ts diff --git a/is-root-path/tsconfig.json b/types/is-root-path/tsconfig.json similarity index 100% rename from is-root-path/tsconfig.json rename to types/is-root-path/tsconfig.json diff --git a/is-root-path/tslint.json b/types/is-root-path/tslint.json similarity index 100% rename from is-root-path/tslint.json rename to types/is-root-path/tslint.json diff --git a/is-root/index.d.ts b/types/is-root/index.d.ts similarity index 100% rename from is-root/index.d.ts rename to types/is-root/index.d.ts diff --git a/is-root/is-root-tests.ts b/types/is-root/is-root-tests.ts similarity index 100% rename from is-root/is-root-tests.ts rename to types/is-root/is-root-tests.ts diff --git a/is-root/tsconfig.json b/types/is-root/tsconfig.json similarity index 100% rename from is-root/tsconfig.json rename to types/is-root/tsconfig.json diff --git a/is-root/tslint.json b/types/is-root/tslint.json similarity index 100% rename from is-root/tslint.json rename to types/is-root/tslint.json diff --git a/is-text-path/index.d.ts b/types/is-text-path/index.d.ts similarity index 100% rename from is-text-path/index.d.ts rename to types/is-text-path/index.d.ts diff --git a/is-text-path/is-text-path-tests.ts b/types/is-text-path/is-text-path-tests.ts similarity index 100% rename from is-text-path/is-text-path-tests.ts rename to types/is-text-path/is-text-path-tests.ts diff --git a/is-text-path/tsconfig.json b/types/is-text-path/tsconfig.json similarity index 100% rename from is-text-path/tsconfig.json rename to types/is-text-path/tsconfig.json diff --git a/is-text-path/tslint.json b/types/is-text-path/tslint.json similarity index 100% rename from is-text-path/tslint.json rename to types/is-text-path/tslint.json diff --git a/is-url/index.d.ts b/types/is-url/index.d.ts similarity index 100% rename from is-url/index.d.ts rename to types/is-url/index.d.ts diff --git a/is-url/is-url-tests.ts b/types/is-url/is-url-tests.ts similarity index 100% rename from is-url/is-url-tests.ts rename to types/is-url/is-url-tests.ts diff --git a/is-url/tsconfig.json b/types/is-url/tsconfig.json similarity index 100% rename from is-url/tsconfig.json rename to types/is-url/tsconfig.json diff --git a/is-windows/index.d.ts b/types/is-windows/index.d.ts similarity index 100% rename from is-windows/index.d.ts rename to types/is-windows/index.d.ts diff --git a/is-windows/is-windows-tests.ts b/types/is-windows/is-windows-tests.ts similarity index 100% rename from is-windows/is-windows-tests.ts rename to types/is-windows/is-windows-tests.ts diff --git a/is-windows/tsconfig.json b/types/is-windows/tsconfig.json similarity index 100% rename from is-windows/tsconfig.json rename to types/is-windows/tsconfig.json diff --git a/is-windows/tslint.json b/types/is-windows/tslint.json similarity index 100% rename from is-windows/tslint.json rename to types/is-windows/tslint.json diff --git a/is/index.d.ts b/types/is/index.d.ts similarity index 100% rename from is/index.d.ts rename to types/is/index.d.ts diff --git a/is/is-tests.ts b/types/is/is-tests.ts similarity index 100% rename from is/is-tests.ts rename to types/is/is-tests.ts diff --git a/is/tsconfig.json b/types/is/tsconfig.json similarity index 100% rename from is/tsconfig.json rename to types/is/tsconfig.json diff --git a/isbn-utils/index.d.ts b/types/isbn-utils/index.d.ts similarity index 100% rename from isbn-utils/index.d.ts rename to types/isbn-utils/index.d.ts diff --git a/isbn-utils/isbn-utils-tests.ts b/types/isbn-utils/isbn-utils-tests.ts similarity index 100% rename from isbn-utils/isbn-utils-tests.ts rename to types/isbn-utils/isbn-utils-tests.ts diff --git a/isbn-utils/tsconfig.json b/types/isbn-utils/tsconfig.json similarity index 100% rename from isbn-utils/tsconfig.json rename to types/isbn-utils/tsconfig.json diff --git a/isbn-utils/tslint.json b/types/isbn-utils/tslint.json similarity index 100% rename from isbn-utils/tslint.json rename to types/isbn-utils/tslint.json diff --git a/iscroll/UNUSED_FILES.txt b/types/iscroll/UNUSED_FILES.txt similarity index 100% rename from iscroll/UNUSED_FILES.txt rename to types/iscroll/UNUSED_FILES.txt diff --git a/iscroll/index.d.ts b/types/iscroll/index.d.ts similarity index 100% rename from iscroll/index.d.ts rename to types/iscroll/index.d.ts diff --git a/iscroll/iscroll-lite.d.ts b/types/iscroll/iscroll-lite.d.ts similarity index 100% rename from iscroll/iscroll-lite.d.ts rename to types/iscroll/iscroll-lite.d.ts diff --git a/iscroll/iscroll-tests.ts b/types/iscroll/iscroll-tests.ts similarity index 100% rename from iscroll/iscroll-tests.ts rename to types/iscroll/iscroll-tests.ts diff --git a/iscroll/tsconfig.json b/types/iscroll/tsconfig.json similarity index 100% rename from iscroll/tsconfig.json rename to types/iscroll/tsconfig.json diff --git a/iscroll/v4/UNUSED_FILES.txt b/types/iscroll/v4/UNUSED_FILES.txt similarity index 100% rename from iscroll/v4/UNUSED_FILES.txt rename to types/iscroll/v4/UNUSED_FILES.txt diff --git a/iscroll/v4/index.d.ts b/types/iscroll/v4/index.d.ts similarity index 100% rename from iscroll/v4/index.d.ts rename to types/iscroll/v4/index.d.ts diff --git a/iscroll/v4/iscroll-lite.d.ts b/types/iscroll/v4/iscroll-lite.d.ts similarity index 100% rename from iscroll/v4/iscroll-lite.d.ts rename to types/iscroll/v4/iscroll-lite.d.ts diff --git a/iscroll/v4/iscroll-tests.ts b/types/iscroll/v4/iscroll-tests.ts similarity index 100% rename from iscroll/v4/iscroll-tests.ts rename to types/iscroll/v4/iscroll-tests.ts diff --git a/iscroll/v4/tsconfig.json b/types/iscroll/v4/tsconfig.json similarity index 100% rename from iscroll/v4/tsconfig.json rename to types/iscroll/v4/tsconfig.json diff --git a/iso8601-localizer/index.d.ts b/types/iso8601-localizer/index.d.ts similarity index 100% rename from iso8601-localizer/index.d.ts rename to types/iso8601-localizer/index.d.ts diff --git a/iso8601-localizer/iso8601-localizer-tests.ts b/types/iso8601-localizer/iso8601-localizer-tests.ts similarity index 100% rename from iso8601-localizer/iso8601-localizer-tests.ts rename to types/iso8601-localizer/iso8601-localizer-tests.ts diff --git a/iso8601-localizer/tsconfig.json b/types/iso8601-localizer/tsconfig.json similarity index 100% rename from iso8601-localizer/tsconfig.json rename to types/iso8601-localizer/tsconfig.json diff --git a/isomorphic-fetch/index.d.ts b/types/isomorphic-fetch/index.d.ts similarity index 100% rename from isomorphic-fetch/index.d.ts rename to types/isomorphic-fetch/index.d.ts diff --git a/isomorphic-fetch/isomorphic-fetch-tests.ts b/types/isomorphic-fetch/isomorphic-fetch-tests.ts similarity index 100% rename from isomorphic-fetch/isomorphic-fetch-tests.ts rename to types/isomorphic-fetch/isomorphic-fetch-tests.ts diff --git a/isomorphic-fetch/tsconfig.json b/types/isomorphic-fetch/tsconfig.json similarity index 100% rename from isomorphic-fetch/tsconfig.json rename to types/isomorphic-fetch/tsconfig.json 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/istanbul-middleware/index.d.ts b/types/istanbul-middleware/index.d.ts similarity index 100% rename from istanbul-middleware/index.d.ts rename to types/istanbul-middleware/index.d.ts diff --git a/istanbul-middleware/istanbul-middleware-tests.ts b/types/istanbul-middleware/istanbul-middleware-tests.ts similarity index 100% rename from istanbul-middleware/istanbul-middleware-tests.ts rename to types/istanbul-middleware/istanbul-middleware-tests.ts diff --git a/istanbul-middleware/tsconfig.json b/types/istanbul-middleware/tsconfig.json similarity index 100% rename from istanbul-middleware/tsconfig.json rename to types/istanbul-middleware/tsconfig.json diff --git a/istanbul/index.d.ts b/types/istanbul/index.d.ts similarity index 100% rename from istanbul/index.d.ts rename to types/istanbul/index.d.ts diff --git a/istanbul/istanbul-tests.ts b/types/istanbul/istanbul-tests.ts similarity index 100% rename from istanbul/istanbul-tests.ts rename to types/istanbul/istanbul-tests.ts diff --git a/istanbul/tsconfig.json b/types/istanbul/tsconfig.json similarity index 100% rename from istanbul/tsconfig.json rename to types/istanbul/tsconfig.json diff --git a/ityped/index.d.ts b/types/ityped/index.d.ts similarity index 100% rename from ityped/index.d.ts rename to types/ityped/index.d.ts diff --git a/ityped/ityped-tests.ts b/types/ityped/ityped-tests.ts similarity index 100% rename from ityped/ityped-tests.ts rename to types/ityped/ityped-tests.ts diff --git a/ityped/tsconfig.json b/types/ityped/tsconfig.json similarity index 100% rename from ityped/tsconfig.json rename to types/ityped/tsconfig.json diff --git a/ityped/tslint.json b/types/ityped/tslint.json similarity index 100% rename from ityped/tslint.json rename to types/ityped/tslint.json diff --git a/ix.js/index.d.ts b/types/ix.js/index.d.ts similarity index 100% rename from ix.js/index.d.ts rename to types/ix.js/index.d.ts diff --git a/ix.js/l2o.d.ts b/types/ix.js/l2o.d.ts similarity index 100% rename from ix.js/l2o.d.ts rename to types/ix.js/l2o.d.ts diff --git a/ix.js/test/index.ts b/types/ix.js/test/index.ts similarity index 100% rename from ix.js/test/index.ts rename to types/ix.js/test/index.ts diff --git a/ix.js/test/l2o.ts b/types/ix.js/test/l2o.ts similarity index 100% rename from ix.js/test/l2o.ts rename to types/ix.js/test/l2o.ts diff --git a/ix.js/tsconfig.json b/types/ix.js/tsconfig.json similarity index 100% rename from ix.js/tsconfig.json rename to types/ix.js/tsconfig.json diff --git a/jade/index.d.ts b/types/jade/index.d.ts similarity index 100% rename from jade/index.d.ts rename to types/jade/index.d.ts diff --git a/jade/jade-tests.ts b/types/jade/jade-tests.ts similarity index 100% rename from jade/jade-tests.ts rename to types/jade/jade-tests.ts diff --git a/jade/tsconfig.json b/types/jade/tsconfig.json similarity index 100% rename from jade/tsconfig.json rename to types/jade/tsconfig.json diff --git a/jake/index.d.ts b/types/jake/index.d.ts similarity index 100% rename from jake/index.d.ts rename to types/jake/index.d.ts diff --git a/jake/jake-tests.ts b/types/jake/jake-tests.ts similarity index 100% rename from jake/jake-tests.ts rename to types/jake/jake-tests.ts diff --git a/jake/tsconfig.json b/types/jake/tsconfig.json similarity index 100% rename from jake/tsconfig.json rename to types/jake/tsconfig.json diff --git a/jalaali-js/index.d.ts b/types/jalaali-js/index.d.ts similarity index 100% rename from jalaali-js/index.d.ts rename to types/jalaali-js/index.d.ts diff --git a/jalaali-js/jalaali-js-tests.ts b/types/jalaali-js/jalaali-js-tests.ts similarity index 100% rename from jalaali-js/jalaali-js-tests.ts rename to types/jalaali-js/jalaali-js-tests.ts diff --git a/jalaali-js/tsconfig.json b/types/jalaali-js/tsconfig.json similarity index 100% rename from jalaali-js/tsconfig.json rename to types/jalaali-js/tsconfig.json diff --git a/jalaali-js/tslint.json b/types/jalaali-js/tslint.json similarity index 100% rename from jalaali-js/tslint.json rename to types/jalaali-js/tslint.json diff --git a/japanese-holidays/index.d.ts b/types/japanese-holidays/index.d.ts similarity index 100% rename from japanese-holidays/index.d.ts rename to types/japanese-holidays/index.d.ts diff --git a/japanese-holidays/japanese-holidays-tests.ts b/types/japanese-holidays/japanese-holidays-tests.ts similarity index 100% rename from japanese-holidays/japanese-holidays-tests.ts rename to types/japanese-holidays/japanese-holidays-tests.ts diff --git a/japanese-holidays/tsconfig.json b/types/japanese-holidays/tsconfig.json similarity index 100% rename from japanese-holidays/tsconfig.json rename to types/japanese-holidays/tsconfig.json diff --git a/japanese-holidays/tslint.json b/types/japanese-holidays/tslint.json similarity index 100% rename from japanese-holidays/tslint.json rename to types/japanese-holidays/tslint.json diff --git a/jasmine-ajax/index.d.ts b/types/jasmine-ajax/index.d.ts similarity index 98% rename from jasmine-ajax/index.d.ts rename to types/jasmine-ajax/index.d.ts index 6ec4020d00..4e227add1b 100644 --- a/jasmine-ajax/index.d.ts +++ b/types/jasmine-ajax/index.d.ts @@ -84,5 +84,5 @@ declare class MockAjax { } declare namespace jasmine { - export var Ajax: MockAjax; + const Ajax: MockAjax; } diff --git a/jasmine-ajax/jasmine-ajax-tests.ts b/types/jasmine-ajax/jasmine-ajax-tests.ts similarity index 89% rename from jasmine-ajax/jasmine-ajax-tests.ts rename to types/jasmine-ajax/jasmine-ajax-tests.ts index d94b205d13..96b7020577 100644 --- a/jasmine-ajax/jasmine-ajax-tests.ts +++ b/types/jasmine-ajax/jasmine-ajax-tests.ts @@ -5,12 +5,11 @@ /// - declare function getJasmineRequireObj(); describe('StubTracker', () => { beforeEach(() => { - var Constructor = getJasmineRequireObj().AjaxStubTracker(); + const Constructor = getJasmineRequireObj().AjaxStubTracker(); this.tracker = new Constructor(); }); @@ -19,21 +18,21 @@ describe('StubTracker', () => { }); it('finds an added stub', () => { - var stub = { matches: () => true }; + const stub = { matches: () => true }; this.tracker.addStub(stub); expect(this.tracker.findStub()).toBe(stub); }); it('skips an added stub that does not match', () => { - var stub = { matches: () => false }; + const stub = { matches: () => false }; this.tracker.addStub(stub); expect(this.tracker.findStub()).toBeUndefined(); }); it('passes url, data, and method to the stub', () => { - var stub = { matches: jasmine.createSpy('matches') }; + const stub = { matches: jasmine.createSpy('matches') }; this.tracker.addStub(stub); this.tracker.findStub('url', 'data', 'method'); @@ -42,7 +41,7 @@ describe('StubTracker', () => { }); it('can clear out all stubs', () => { - var stub = { matches: jasmine.createSpy('matches') }; + const stub = { matches: jasmine.createSpy('matches') }; this.tracker.addStub(stub); this.tracker.findStub(); @@ -58,9 +57,9 @@ describe('StubTracker', () => { }); it('uses the most recently added stub that matches', () => { - var stub1 = { matches: () => true }; - var stub2 = { matches: () => false }; - var stub3 = { matches: () => false }; + const stub1 = { matches: () => true }; + const stub2 = { matches: () => false }; + const stub3 = { matches: () => false }; this.tracker.addStub(stub1); this.tracker.addStub(stub2); @@ -74,9 +73,9 @@ describe('FakeRequest', () => { beforeEach(() => { this.requestTracker = { track: jasmine.createSpy('trackRequest') }; this.stubTracker = { findStub() { } }; - var parserInstance = this.parserInstance = jasmine.createSpy('parse'); + const parserInstance = this.parserInstance = jasmine.createSpy('parse'); this.paramParser = { findParser: () => ({ parse: parserInstance }) }; - var eventBus = this.fakeEventBus = { + const eventBus = this.fakeEventBus = { addEventListener: jasmine.createSpy('addEventListener'), trigger: jasmine.createSpy('trigger'), removeEventListener: jasmine.createSpy('removeEventListener') @@ -95,15 +94,15 @@ describe('FakeRequest', () => { }); it('extends from the global XMLHttpRequest', () => { - var request = new this.FakeRequest(); + const request = new this.FakeRequest(); expect(request.extraAttribute).toEqual('my cool attribute'); }); it('skips XMLHttpRequest attributes that IE does not want copied', () => { // use real window here so it will correctly go red on IE if it breaks - var FakeRequest = getJasmineRequireObj().AjaxFakeRequest(this.eventBusFactory)(window, this.requestTracker, this.stubTracker, this.paramParser); - var request = new FakeRequest(); + const FakeRequest = getJasmineRequireObj().AjaxFakeRequest(this.eventBusFactory)(window, this.requestTracker, this.stubTracker, this.paramParser); + const request = new FakeRequest(); expect(request.responseBody).toBeUndefined(); expect(request.responseXML).toBeUndefined(); @@ -111,20 +110,20 @@ describe('FakeRequest', () => { }); it('tracks the request', () => { - var request = new this.FakeRequest(); + const request = new this.FakeRequest(); expect(this.requestTracker.track).toHaveBeenCalledWith(request); }); it('has default request headers and override mime type', () => { - var request = new this.FakeRequest(); + const request = new this.FakeRequest(); expect(request.requestHeaders).toEqual({}); expect(request.overriddenMimeType).toBeNull(); }); it('saves request information when opened', () => { - var request = new this.FakeRequest(); + const request = new this.FakeRequest(); request.open('METHOD', 'URL', 'ignore_async', 'USERNAME', 'PASSWORD'); expect(request.method).toEqual('METHOD'); @@ -134,7 +133,7 @@ describe('FakeRequest', () => { }); it('saves an override mime type', () => { - var request = new this.FakeRequest(); + const request = new this.FakeRequest(); request.overrideMimeType('application/text; charset: utf-8'); @@ -142,7 +141,7 @@ describe('FakeRequest', () => { }); it('saves request headers', () => { - var request = new this.FakeRequest(); + const request = new this.FakeRequest(); request.setRequestHeader('X-Header-1', 'value1'); request.setRequestHeader('X-Header-2', 'value2'); @@ -154,7 +153,7 @@ describe('FakeRequest', () => { }); it('combines request headers with the same header name', () => { - var request = new this.FakeRequest(); + const request = new this.FakeRequest(); request.setRequestHeader('X-Header', 'value1'); request.setRequestHeader('X-Header', 'value2'); @@ -163,7 +162,7 @@ describe('FakeRequest', () => { }); it('finds the content-type request header', () => { - var request = new this.FakeRequest(); + const request = new this.FakeRequest(); request.setRequestHeader('ContEnt-tYPe', 'application/text+xml'); @@ -248,9 +247,9 @@ describe('FakeRequest', () => { this.request.send(); this.fakeEventBus.trigger.calls.reset(); - var request = this.request; - var events = []; - var headers = [ + const request = this.request; + const events = []; + const headers = [ { name: 'X-Header', value: 'foo' } ]; @@ -284,7 +283,7 @@ describe('FakeRequest', () => { this.request.open(); this.request.send(); this.request.respondWith({}); - var request = this.request; + const request = this.request; expect(() => { request.responseTimeout(); @@ -295,7 +294,7 @@ describe('FakeRequest', () => { this.request.open(); this.request.send(); this.request.respondWith({}); - var request = this.request; + const request = this.request; expect(() => { request.respondWith({}); @@ -306,7 +305,7 @@ describe('FakeRequest', () => { this.request.open(); this.request.send(); this.request.respondWith({}); - var request = this.request; + const request = this.request; expect(() => { request.responseError({}); @@ -335,7 +334,7 @@ describe('FakeRequest', () => { this.request.ontimeout = jasmine.createSpy('timeout'); this.request.onloadend = jasmine.createSpy('loadend'); - var args = this.fakeEventBus.addEventListener.calls.allArgs(); + const args = this.fakeEventBus.addEventListener.calls.allArgs(); for (const [eventName, busCallback] of args) { busCallback(); expect(this.request['on' + eventName]).toHaveBeenCalled(); @@ -462,10 +461,10 @@ describe('FakeRequest', () => { }); it('ticks the jasmine clock on timeout', () => { - var clock = { tick: jasmine.createSpy('tick') }; + const clock = { tick: jasmine.createSpy('tick') }; spyOn(jasmine, 'clock').and.returnValue(clock); - var request = new this.FakeRequest(); + const request = new this.FakeRequest(); request.open(); request.send(); @@ -475,13 +474,13 @@ describe('FakeRequest', () => { }); it('has an initial status of null', () => { - var request = new this.FakeRequest(); + const request = new this.FakeRequest(); expect(request.status).toBeNull(); }); it('has an aborted status', () => { - var request = new this.FakeRequest(); + const request = new this.FakeRequest(); request.abort(); @@ -490,7 +489,7 @@ describe('FakeRequest', () => { }); it('has a status from the response', () => { - var request = new this.FakeRequest(); + const request = new this.FakeRequest(); request.open(); request.send(); @@ -501,7 +500,7 @@ describe('FakeRequest', () => { }); it('has a statusText from the response', () => { - var request = new this.FakeRequest(); + const request = new this.FakeRequest(); request.open(); request.send(); @@ -512,7 +511,7 @@ describe('FakeRequest', () => { }); it('saves off any data sent to the server', () => { - var request = new this.FakeRequest(); + const request = new this.FakeRequest(); request.open(); request.send('foo=bar&baz=quux'); @@ -520,7 +519,7 @@ describe('FakeRequest', () => { }); it('parses data sent to the server', () => { - var request = new this.FakeRequest(); + const request = new this.FakeRequest(); request.open(); request.send('foo=bar&baz=quux'); @@ -530,7 +529,7 @@ describe('FakeRequest', () => { }); it('skips parsing if no data was sent', () => { - var request = new this.FakeRequest(); + const request = new this.FakeRequest(); request.open(); request.send(); @@ -539,7 +538,7 @@ describe('FakeRequest', () => { }); it('saves responseText', () => { - var request = new this.FakeRequest(); + const request = new this.FakeRequest(); request.open(); request.send(); @@ -549,7 +548,7 @@ describe('FakeRequest', () => { }); it('defaults responseText if none is given', () => { - var request = new this.FakeRequest(); + const request = new this.FakeRequest(); request.open(); request.send(); @@ -559,7 +558,7 @@ describe('FakeRequest', () => { }); it('retrieves individual response headers', () => { - var request = new this.FakeRequest(); + const request = new this.FakeRequest(); request.open(); request.send(); @@ -574,7 +573,7 @@ describe('FakeRequest', () => { }); it('retrieves individual response headers case-insensitively', () => { - var request = new this.FakeRequest(); + const request = new this.FakeRequest(); request.open(); request.send(); @@ -589,7 +588,7 @@ describe('FakeRequest', () => { }); it('retrieves a combined response header', () => { - var request = new this.FakeRequest(); + const request = new this.FakeRequest(); request.open(); request.send(); @@ -605,11 +604,11 @@ describe('FakeRequest', () => { }); it("doesn't pollute the response headers of other XHRs", () => { - var request1 = new this.FakeRequest(); + const request1 = new this.FakeRequest(); request1.open(); request1.send(); - var request2 = new this.FakeRequest(); + const request2 = new this.FakeRequest(); request2.open(); request2.send(); @@ -621,7 +620,7 @@ describe('FakeRequest', () => { }); it('retrieves all response headers', () => { - var request = new this.FakeRequest(); + const request = new this.FakeRequest(); request.open(); request.send(); @@ -638,7 +637,7 @@ describe('FakeRequest', () => { }); it('sets the content-type header to the specified contentType when no other headers are supplied', () => { - var request = new this.FakeRequest(); + const request = new this.FakeRequest(); request.open(); request.send(); @@ -649,7 +648,7 @@ describe('FakeRequest', () => { }); it('sets a default content-type header if no contentType and headers are supplied', () => { - var request = new this.FakeRequest(); + const request = new this.FakeRequest(); request.open(); request.send(); @@ -660,7 +659,7 @@ describe('FakeRequest', () => { }); it('has no responseXML by default', () => { - var request = new this.FakeRequest(); + const request = new this.FakeRequest(); request.open(); request.send(); @@ -670,7 +669,7 @@ describe('FakeRequest', () => { }); it('parses a text/xml document into responseXML', () => { - var request = new this.FakeRequest(); + const request = new this.FakeRequest(); request.open(); request.send(); @@ -687,7 +686,7 @@ describe('FakeRequest', () => { }); it('parses an application/xml document into responseXML', () => { - var request = new this.FakeRequest(); + const request = new this.FakeRequest(); request.open(); request.send(); @@ -704,7 +703,7 @@ describe('FakeRequest', () => { }); it('parses a custom blah+xml document into responseXML', () => { - var request = new this.FakeRequest(); + const request = new this.FakeRequest(); request.open(); request.send(); @@ -721,7 +720,7 @@ describe('FakeRequest', () => { }); it('defaults the response attribute to the responseText', () => { - var request = new this.FakeRequest(); + const request = new this.FakeRequest(); request.open(); request.send(); @@ -731,7 +730,7 @@ describe('FakeRequest', () => { }); it('has a text response when the responseType is blank', () => { - var request = new this.FakeRequest(); + const request = new this.FakeRequest(); request.open(); request.send(); @@ -741,7 +740,7 @@ describe('FakeRequest', () => { }); it('has a text response when the responseType is text', () => { - var request = new this.FakeRequest(); + const request = new this.FakeRequest(); request.open(); request.send(); @@ -751,16 +750,15 @@ describe('FakeRequest', () => { }); }); - describe("Jasmine Mock Ajax (for toplevel)", () => { - var request, anotherRequest, response; - var success, error, complete; - var client, onreadystatechange; - var sharedContext: any = {}; - var fakeGlobal, mockAjax; + let request, anotherRequest, response; + let success, error, complete; + let client, onreadystatechange; + const sharedContext: any = {}; + let fakeGlobal, mockAjax; beforeEach(() => { - var fakeXMLHttpRequest = jasmine.createSpy('realFakeXMLHttpRequest'); + const fakeXMLHttpRequest = jasmine.createSpy('realFakeXMLHttpRequest'); fakeGlobal = { XMLHttpRequest: fakeXMLHttpRequest, DOMParser: window['DOMParser'], @@ -832,7 +830,6 @@ describe("Jasmine Mock Ajax (for toplevel)", () => { }); describe("mockAjax.requests.mostRecent()", () => { - describe("when there is one request queued", () => { it("should return the request", () => { expect(mockAjax.requests.mostRecent()).toEqual(request); @@ -921,7 +918,7 @@ describe("Jasmine Mock Ajax (for toplevel)", () => { client.send(); request = mockAjax.requests.mostRecent(); - var responseObject = { status: 200, statusText: "OK", contentType: "application/json", responseText: '{"foo":"bar"}', responseType: "json" }; + const responseObject = { status: 200, statusText: "OK", contentType: "application/json", responseText: '{"foo":"bar"}', responseType: "json" }; request.respondWith(responseObject); @@ -948,7 +945,7 @@ describe("Jasmine Mock Ajax (for toplevel)", () => { }); it("should return a JavaScript object for XHR2 response", () => { - var responseText = sharedContext.responseText; + const responseText = sharedContext.responseText; expect(success.calls.mostRecent().args[0]).toEqual(responseText); expect(response.responseText).toEqual(responseText); @@ -967,7 +964,7 @@ describe("Jasmine Mock Ajax (for toplevel)", () => { client.send(); request = mockAjax.requests.mostRecent(); - var responseObject = { status: 200, statusText: "OK", contentType: "application/json", responseText: '{"foo":"bar"}', responseType: 'json' }; + const responseObject = { status: 200, statusText: "OK", contentType: "application/json", responseText: '{"foo":"bar"}', responseType: 'json' }; request.respondWith(responseObject); @@ -982,7 +979,7 @@ describe("Jasmine Mock Ajax (for toplevel)", () => { }); it("should return the provided override for the XHR2 response", () => { - var responseText = sharedContext.responseText; + const responseText = sharedContext.responseText; expect(response.responseText).toEqual(responseText); expect(response.response).toEqual({ foo: "bar" }); @@ -999,7 +996,7 @@ describe("Jasmine Mock Ajax (for toplevel)", () => { client.send(); request = mockAjax.requests.mostRecent(); - var responseObject = { + const responseObject = { status: 200, statusText: "OK", responseText: '["foo"]', responseHeaders: { 'X-Header1': 'header 1 value', 'X-Header2': 'header 2 value', @@ -1033,7 +1030,7 @@ describe("Jasmine Mock Ajax (for toplevel)", () => { client.send(); request = mockAjax.requests.mostRecent(); - var responseObject = { + const responseObject = { status: 200, statusText: "OK", responseText: '["foo"]', responseHeaders: [ { name: 'X-Header', value: 'header value 1' }, { name: 'X-Header', value: 'header value 2' } @@ -1201,10 +1198,9 @@ describe("Jasmine Mock Ajax (for toplevel)", () => { }); }); - function sharedAjaxResponseBehaviorForZepto_Success(context) { describe("the success response", () => { - var xhr; + let xhr; beforeEach(() => { xhr = context.responseCallback.calls.mostRecent().args[2]; }); @@ -1218,7 +1214,7 @@ function sharedAjaxResponseBehaviorForZepto_Success(context) { }); it("should have the expected xhr2 response", () => { - var expected = context.response || context.responseType === 'json' ? JSON.parse(context.responseText) : context.responseText; + const expected = context.response || context.responseType === 'json' ? JSON.parse(context.responseText) : context.responseText; expect(xhr.response).toEqual(expected); }); @@ -1234,7 +1230,7 @@ function sharedAjaxResponseBehaviorForZepto_Success(context) { function sharedAjaxResponseBehaviorForZepto_Failure(context) { describe("the failure response", () => { - var xhr; + let xhr; beforeEach(() => { xhr = context.responseCallback.calls.mostRecent().args[0]; }); @@ -1248,7 +1244,7 @@ function sharedAjaxResponseBehaviorForZepto_Failure(context) { }); it("should have the expected xhr2 response", () => { - var expected = context.response || xhr.responseType === 'json' ? JSON.parse(xhr.responseText) : xhr.responseText; + const expected = context.response || xhr.responseType === 'json' ? JSON.parse(xhr.responseText) : xhr.responseText; expect(xhr.response).toEqual(expected); }); @@ -1264,13 +1260,13 @@ function sharedAjaxResponseBehaviorForZepto_Failure(context) { describe('ParamParser', () => { beforeEach(() => { - var Constructor = getJasmineRequireObj().AjaxParamParser(); + const Constructor = getJasmineRequireObj().AjaxParamParser(); expect(Constructor).toEqual(jasmine.any(Function)); this.parser = new Constructor(); }); it('has a default parser', () => { - var parser = this.parser.findParser({ contentType: () => { } }), + const parser = this.parser.findParser({ contentType: () => { } }), parsed = parser.parse('3+stooges=shemp&3+stooges=larry%20%26%20moe%20%26%20curly&some%3Dthing=else+entirely'); expect(parsed).toEqual({ @@ -1280,7 +1276,7 @@ describe('ParamParser', () => { }); it('should detect and parse json', () => { - var data = { + const data = { foo: 'bar', baz: ['q', 'u', 'u', 'x'], nested: { @@ -1296,7 +1292,7 @@ describe('ParamParser', () => { }); it('should parse json with further qualifiers on content-type', () => { - var data = { + const data = { foo: 'bar', baz: ['q', 'u', 'u', 'x'], nested: { @@ -1312,14 +1308,14 @@ describe('ParamParser', () => { }); it('should have custom parsers take precedence', () => { - var custom = { + const custom = { test: jasmine.createSpy('test').and.returnValue(true), parse: jasmine.createSpy('parse').and.returnValue('parsedFormat') }; this.parser.add(custom); - var parser = this.parser.findParser({ contentType: () => { } }), + const parser = this.parser.findParser({ contentType: () => { } }), parsed = parser.parse('custom_format'); expect(parsed).toEqual('parsedFormat'); @@ -1328,14 +1324,14 @@ describe('ParamParser', () => { }); it('should skip custom parsers that do not match', () => { - var custom = { + const custom = { test: jasmine.createSpy('test').and.returnValue(false), parse: jasmine.createSpy('parse').and.returnValue('parsedFormat') }; this.parser.add(custom); - var parser = this.parser.findParser({ contentType: () => { } }), + const parser = this.parser.findParser({ contentType: () => { } }), parsed = parser.parse('custom_format'); expect(parsed).toEqual({ custom_format: ['undefined'] }); @@ -1344,14 +1340,14 @@ describe('ParamParser', () => { }); it('removes custom parsers when reset', () => { - var custom = { + const custom = { test: jasmine.createSpy('test').and.returnValue(true), parse: jasmine.createSpy('parse').and.returnValue('parsedFormat') }; this.parser.add(custom); - var parser = this.parser.findParser({ contentType: () => { } }), + let parser = this.parser.findParser({ contentType: () => { } }), parsed = parser.parse('custom_format'); expect(parsed).toEqual('parsedFormat'); @@ -1389,31 +1385,31 @@ describe('RequestStub', () => { }); it('matches just by exact url', () => { - var stub = new this.RequestStub('www.example.com/foo'); + const stub = new this.RequestStub('www.example.com/foo'); expect(stub)['toMatchRequest']('www.example.com/foo'); }); it('does not match if the url differs', () => { - var stub = new this.RequestStub('www.example.com/foo'); + const stub = new this.RequestStub('www.example.com/foo'); expect(stub).not['toMatchRequest']('www.example.com/bar'); }); it('matches unordered query params', () => { - var stub = new this.RequestStub('www.example.com?foo=bar&baz=quux'); + const stub = new this.RequestStub('www.example.com?foo=bar&baz=quux'); expect(stub)['toMatchRequest']('www.example.com?baz=quux&foo=bar'); }); it('requires all specified query params to be there', () => { - var stub = new this.RequestStub('www.example.com?foo=bar&baz=quux'); + const stub = new this.RequestStub('www.example.com?foo=bar&baz=quux'); expect(stub).not['toMatchRequest']('www.example.com?foo=bar'); }); it('can match the url with a RegExp', () => { - var stub = new this.RequestStub(/ba[rz]/); + const stub = new this.RequestStub(/ba[rz]/); expect(stub)['toMatchRequest']('bar'); expect(stub)['toMatchRequest']('baz'); @@ -1421,7 +1417,7 @@ describe('RequestStub', () => { }); it('requires the method to match if supplied', () => { - var stub = new this.RequestStub('www.example.com/foo', null, 'POST'); + const stub = new this.RequestStub('www.example.com/foo', null, 'POST'); expect(stub).not['toMatchRequest']('www.example.com/foo'); expect(stub).not['toMatchRequest']('www.example.com/foo', null, 'GET'); @@ -1429,7 +1425,7 @@ describe('RequestStub', () => { }); it('requires the data submitted to match if supplied', () => { - var stub = new this.RequestStub('/foo', 'foo=bar&baz=quux'); + const stub = new this.RequestStub('/foo', 'foo=bar&baz=quux'); expect(stub)['toMatchRequest']('/foo', 'baz=quux&foo=bar'); expect(stub).not['toMatchRequest']('/foo', 'foo=bar'); @@ -1438,7 +1434,7 @@ describe('RequestStub', () => { describe('RequestTracker', () => { beforeEach(() => { - var Constructor = getJasmineRequireObj().AjaxRequestTracker(); + const Constructor = getJasmineRequireObj().AjaxRequestTracker(); this.tracker = new Constructor(); }); @@ -1511,7 +1507,7 @@ describe('RequestTracker', () => { this.tracker.track({ url: 'bar' }); this.tracker.track({ url: 'baz' }); - var func = request => request.url === 'bar'; + const func = request => request.url === 'bar'; expect(this.tracker.filter(func)).toEqual([{ url: 'bar' }]); }); @@ -1527,7 +1523,7 @@ describe('EventBus', () => { }); it('calls an event listener', () => { - var callback = jasmine.createSpy('callback'); + const callback = jasmine.createSpy('callback'); this.bus.addEventListener('foo', callback); this.bus.trigger('foo'); @@ -1536,7 +1532,7 @@ describe('EventBus', () => { }); it('calls an event listener with additional arguments', () => { - var callback = jasmine.createSpy('callback'); + const callback = jasmine.createSpy('callback'); this.bus.addEventListener('foo', callback); this.bus.trigger('foo', 'bar'); @@ -1545,7 +1541,7 @@ describe('EventBus', () => { }); it('only triggers callbacks for the specified event', () => { - var fooCallback = jasmine.createSpy('foo'), + const fooCallback = jasmine.createSpy('foo'), barCallback = jasmine.createSpy('bar'); this.bus.addEventListener('foo', fooCallback); @@ -1558,8 +1554,8 @@ describe('EventBus', () => { }); it('calls all the callbacks for the specified event', () => { - var callback1 = jasmine.createSpy('callback'); - var callback2 = jasmine.createSpy('otherCallback'); + const callback1 = jasmine.createSpy('callback'); + const callback2 = jasmine.createSpy('otherCallback'); this.bus.addEventListener('foo', callback1); this.bus.addEventListener('foo', callback2); @@ -1571,14 +1567,14 @@ describe('EventBus', () => { }); it('works if there are no callbacks for the event', () => { - var bus = this.bus; + const bus = this.bus; expect(() => { bus.trigger('notActuallyThere'); }).not.toThrow(); }); it('does not call listeners that have been removed', () => { - var callback = jasmine.createSpy('callback'); + const callback = jasmine.createSpy('callback'); this.bus.addEventListener('foo', callback); this.bus.removeEventListener('foo', callback); @@ -1588,8 +1584,8 @@ describe('EventBus', () => { }); it('only removes the specified callback', () => { - var callback1 = jasmine.createSpy('callback'); - var callback2 = jasmine.createSpy('otherCallback'); + const callback1 = jasmine.createSpy('callback'); + const callback2 = jasmine.createSpy('otherCallback'); this.bus.addEventListener('foo', callback1); this.bus.addEventListener('foo', callback2); @@ -1603,12 +1599,12 @@ describe('EventBus', () => { }); describe("Webmock style mocking", () => { - var successSpy, errorSpy, response, fakeGlobal, mockAjax; + let successSpy, response, fakeGlobal, mockAjax; - var sendRequest = function(fakeGlobal, url?, method?) { + const sendRequest = function(fakeGlobal, url?, method?) { url = url || "http://example.com/someApi"; method = method || 'GET'; - var xhr = new fakeGlobal.XMLHttpRequest(); + const xhr = new fakeGlobal.XMLHttpRequest(); xhr.onreadystatechange = args => { if (this.readyState === (this.DONE || 4)) { // IE 8 doesn't support DONE response = this; @@ -1681,15 +1677,15 @@ describe("Webmock style mocking", () => { }); describe("withMock", () => { - var sendRequest = fakeGlobal => { - var xhr = new fakeGlobal.XMLHttpRequest(); + const sendRequest = fakeGlobal => { + const xhr = new fakeGlobal.XMLHttpRequest(); xhr.open("GET", "http://example.com/someApi"); xhr.send(); }; it("installs the mock for passed in function, and uninstalls when complete", () => { - var xmlHttpRequest = jasmine.createSpyObj('XMLHttpRequest', ['open', 'send']), + const xmlHttpRequest = jasmine.createSpyObj('XMLHttpRequest', ['open', 'send']), xmlHttpRequestCtor = spyOn(window as any, 'XMLHttpRequest').and.returnValue(xmlHttpRequest), fakeGlobal = { XMLHttpRequest: xmlHttpRequestCtor }, mockAjax = new MockAjax(fakeGlobal); @@ -1704,7 +1700,7 @@ describe("withMock", () => { }); it("properly uninstalls when the passed in function throws", () => { - var xmlHttpRequest = jasmine.createSpyObj('XMLHttpRequest', ['open', 'send']), + const xmlHttpRequest = jasmine.createSpyObj('XMLHttpRequest', ['open', 'send']), xmlHttpRequestCtor = spyOn(window as any, 'XMLHttpRequest').and.returnValue(xmlHttpRequest), fakeGlobal = { XMLHttpRequest: xmlHttpRequestCtor }, mockAjax = new MockAjax(fakeGlobal); @@ -1722,7 +1718,7 @@ describe("withMock", () => { describe("mockAjax", () => { it("throws an error if installed multiple times", () => { - var fakeXmlHttpRequest = jasmine.createSpy('fakeXmlHttpRequest'), + const fakeXmlHttpRequest = jasmine.createSpy('fakeXmlHttpRequest'), fakeGlobal = { XMLHttpRequest: fakeXmlHttpRequest }, mockAjax = new MockAjax(fakeGlobal); @@ -1735,7 +1731,7 @@ describe("mockAjax", () => { }); it("does not throw an error if uninstalled between installs", () => { - var fakeXmlHttpRequest = jasmine.createSpy('fakeXmlHttpRequest'), + const fakeXmlHttpRequest = jasmine.createSpy('fakeXmlHttpRequest'), fakeGlobal = { XMLHttpRequest: fakeXmlHttpRequest }, mockAjax = new MockAjax(fakeGlobal); @@ -1749,7 +1745,7 @@ describe("mockAjax", () => { }); it("does not replace XMLHttpRequest until it is installed", () => { - var fakeXmlHttpRequest = jasmine.createSpy('fakeXmlHttpRequest'), + const fakeXmlHttpRequest = jasmine.createSpy('fakeXmlHttpRequest'), fakeGlobal = { XMLHttpRequest: fakeXmlHttpRequest }, mockAjax = new MockAjax(fakeGlobal); @@ -1763,7 +1759,7 @@ describe("mockAjax", () => { }); it("replaces the global XMLHttpRequest on uninstall", () => { - var fakeXmlHttpRequest = jasmine.createSpy('fakeXmlHttpRequest'), + const fakeXmlHttpRequest = jasmine.createSpy('fakeXmlHttpRequest'), fakeGlobal = { XMLHttpRequest: fakeXmlHttpRequest }, mockAjax = new MockAjax(fakeGlobal); @@ -1775,7 +1771,7 @@ describe("mockAjax", () => { }); it("clears requests and stubs upon uninstall", () => { - var fakeXmlHttpRequest = jasmine.createSpy('fakeXmlHttpRequest'), + const fakeXmlHttpRequest = jasmine.createSpy('fakeXmlHttpRequest'), fakeGlobal = { XMLHttpRequest: fakeXmlHttpRequest }, mockAjax = new MockAjax(fakeGlobal); @@ -1794,24 +1790,24 @@ describe("mockAjax", () => { }); it("allows the httpRequest to be retrieved", () => { - var fakeXmlHttpRequest = jasmine.createSpy('fakeXmlHttpRequest'), + const fakeXmlHttpRequest = jasmine.createSpy('fakeXmlHttpRequest'), fakeGlobal = { XMLHttpRequest: fakeXmlHttpRequest }, mockAjax = new MockAjax(fakeGlobal); mockAjax.install(); - var request = new ( fakeGlobal.XMLHttpRequest)(); + const request = new ( fakeGlobal.XMLHttpRequest)(); expect(mockAjax.requests.count()).toBe(1); expect(mockAjax.requests.mostRecent()).toBe(request); }); it("allows the httpRequests to be cleared", () => { - var fakeXmlHttpRequest = jasmine.createSpy('fakeXmlHttpRequest'), + const fakeXmlHttpRequest = jasmine.createSpy('fakeXmlHttpRequest'), fakeGlobal = { XMLHttpRequest: fakeXmlHttpRequest }, mockAjax = new MockAjax(fakeGlobal); mockAjax.install(); - var request = new ( fakeGlobal.XMLHttpRequest)(); + const request = new ( fakeGlobal.XMLHttpRequest)(); expect(mockAjax.requests.mostRecent()).toBe(request); mockAjax.requests.reset(); diff --git a/jasmine-ajax/tsconfig.json b/types/jasmine-ajax/tsconfig.json similarity index 100% rename from jasmine-ajax/tsconfig.json rename to types/jasmine-ajax/tsconfig.json diff --git a/jasmine-ajax/tslint.json b/types/jasmine-ajax/tslint.json similarity index 100% rename from jasmine-ajax/tslint.json rename to types/jasmine-ajax/tslint.json diff --git a/jasmine-data_driven_tests/index.d.ts b/types/jasmine-data_driven_tests/index.d.ts similarity index 100% rename from jasmine-data_driven_tests/index.d.ts rename to types/jasmine-data_driven_tests/index.d.ts diff --git a/jasmine-data_driven_tests/jasmine-data_driven_tests-tests.ts b/types/jasmine-data_driven_tests/jasmine-data_driven_tests-tests.ts similarity index 100% rename from jasmine-data_driven_tests/jasmine-data_driven_tests-tests.ts rename to types/jasmine-data_driven_tests/jasmine-data_driven_tests-tests.ts diff --git a/jasmine-data_driven_tests/tsconfig.json b/types/jasmine-data_driven_tests/tsconfig.json similarity index 100% rename from jasmine-data_driven_tests/tsconfig.json rename to types/jasmine-data_driven_tests/tsconfig.json diff --git a/jasmine-data_driven_tests/tslint.json b/types/jasmine-data_driven_tests/tslint.json similarity index 100% rename from jasmine-data_driven_tests/tslint.json rename to types/jasmine-data_driven_tests/tslint.json diff --git a/jasmine-es6-promise-matchers/index.d.ts b/types/jasmine-es6-promise-matchers/index.d.ts similarity index 100% rename from jasmine-es6-promise-matchers/index.d.ts rename to types/jasmine-es6-promise-matchers/index.d.ts diff --git a/jasmine-es6-promise-matchers/jasmine-es6-promise-matchers-tests.ts b/types/jasmine-es6-promise-matchers/jasmine-es6-promise-matchers-tests.ts similarity index 100% rename from jasmine-es6-promise-matchers/jasmine-es6-promise-matchers-tests.ts rename to types/jasmine-es6-promise-matchers/jasmine-es6-promise-matchers-tests.ts diff --git a/jasmine-es6-promise-matchers/tsconfig.json b/types/jasmine-es6-promise-matchers/tsconfig.json similarity index 100% rename from jasmine-es6-promise-matchers/tsconfig.json rename to types/jasmine-es6-promise-matchers/tsconfig.json diff --git a/jasmine-expect/index.d.ts b/types/jasmine-expect/index.d.ts similarity index 100% rename from jasmine-expect/index.d.ts rename to types/jasmine-expect/index.d.ts diff --git a/jasmine-expect/jasmine-expect-tests.ts b/types/jasmine-expect/jasmine-expect-tests.ts similarity index 100% rename from jasmine-expect/jasmine-expect-tests.ts rename to types/jasmine-expect/jasmine-expect-tests.ts diff --git a/jasmine-expect/tsconfig.json b/types/jasmine-expect/tsconfig.json similarity index 100% rename from jasmine-expect/tsconfig.json rename to types/jasmine-expect/tsconfig.json diff --git a/jasmine-fixture/index.d.ts b/types/jasmine-fixture/index.d.ts similarity index 100% rename from jasmine-fixture/index.d.ts rename to types/jasmine-fixture/index.d.ts diff --git a/jasmine-fixture/jasmine-fixture-tests.ts b/types/jasmine-fixture/jasmine-fixture-tests.ts similarity index 100% rename from jasmine-fixture/jasmine-fixture-tests.ts rename to types/jasmine-fixture/jasmine-fixture-tests.ts diff --git a/jasmine-fixture/tsconfig.json b/types/jasmine-fixture/tsconfig.json similarity index 100% rename from jasmine-fixture/tsconfig.json rename to types/jasmine-fixture/tsconfig.json diff --git a/jasmine-fixture/tslint.json b/types/jasmine-fixture/tslint.json similarity index 100% rename from jasmine-fixture/tslint.json rename to types/jasmine-fixture/tslint.json diff --git a/jasmine-jquery/index.d.ts b/types/jasmine-jquery/index.d.ts similarity index 100% rename from jasmine-jquery/index.d.ts rename to types/jasmine-jquery/index.d.ts diff --git a/jasmine-jquery/jasmine-jquery-tests.ts b/types/jasmine-jquery/jasmine-jquery-tests.ts similarity index 100% rename from jasmine-jquery/jasmine-jquery-tests.ts rename to types/jasmine-jquery/jasmine-jquery-tests.ts diff --git a/jasmine-jquery/tsconfig.json b/types/jasmine-jquery/tsconfig.json similarity index 100% rename from jasmine-jquery/tsconfig.json rename to types/jasmine-jquery/tsconfig.json diff --git a/jasmine-matchers/index.d.ts b/types/jasmine-matchers/index.d.ts similarity index 100% rename from jasmine-matchers/index.d.ts rename to types/jasmine-matchers/index.d.ts diff --git a/jasmine-matchers/jasmine-matchers-tests.ts b/types/jasmine-matchers/jasmine-matchers-tests.ts similarity index 100% rename from jasmine-matchers/jasmine-matchers-tests.ts rename to types/jasmine-matchers/jasmine-matchers-tests.ts diff --git a/jasmine-matchers/tsconfig.json b/types/jasmine-matchers/tsconfig.json similarity index 100% rename from jasmine-matchers/tsconfig.json rename to types/jasmine-matchers/tsconfig.json diff --git a/jasmine-node/index.d.ts b/types/jasmine-node/index.d.ts similarity index 100% rename from jasmine-node/index.d.ts rename to types/jasmine-node/index.d.ts diff --git a/jasmine-node/jasmine-node-tests.ts b/types/jasmine-node/jasmine-node-tests.ts similarity index 100% rename from jasmine-node/jasmine-node-tests.ts rename to types/jasmine-node/jasmine-node-tests.ts diff --git a/jasmine-node/tsconfig.json b/types/jasmine-node/tsconfig.json similarity index 100% rename from jasmine-node/tsconfig.json rename to types/jasmine-node/tsconfig.json diff --git a/jasmine-promise-matchers/index.d.ts b/types/jasmine-promise-matchers/index.d.ts similarity index 100% rename from jasmine-promise-matchers/index.d.ts rename to types/jasmine-promise-matchers/index.d.ts diff --git a/jasmine-promise-matchers/jasmine-promise-matchers-tests.ts b/types/jasmine-promise-matchers/jasmine-promise-matchers-tests.ts similarity index 100% rename from jasmine-promise-matchers/jasmine-promise-matchers-tests.ts rename to types/jasmine-promise-matchers/jasmine-promise-matchers-tests.ts diff --git a/jasmine-promise-matchers/tsconfig.json b/types/jasmine-promise-matchers/tsconfig.json similarity index 100% rename from jasmine-promise-matchers/tsconfig.json rename to types/jasmine-promise-matchers/tsconfig.json diff --git a/jasmine/index.d.ts b/types/jasmine/index.d.ts similarity index 99% rename from jasmine/index.d.ts rename to types/jasmine/index.d.ts index caa1d12635..11b0d1919c 100644 --- a/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/jasmine/jasmine-tests.ts b/types/jasmine/jasmine-tests.ts similarity index 99% rename from jasmine/jasmine-tests.ts rename to types/jasmine/jasmine-tests.ts index 1c9d5366e1..d681d972b0 100644 --- a/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/jasmine/tsconfig.json b/types/jasmine/tsconfig.json similarity index 100% rename from jasmine/tsconfig.json rename to types/jasmine/tsconfig.json diff --git a/jasmine/v1/index.d.ts b/types/jasmine/v1/index.d.ts similarity index 100% rename from jasmine/v1/index.d.ts rename to types/jasmine/v1/index.d.ts diff --git a/jasmine/v1/jasmine-tests.ts b/types/jasmine/v1/jasmine-tests.ts similarity index 100% rename from jasmine/v1/jasmine-tests.ts rename to types/jasmine/v1/jasmine-tests.ts diff --git a/jasmine/v1/tsconfig.json b/types/jasmine/v1/tsconfig.json similarity index 100% rename from jasmine/v1/tsconfig.json rename to types/jasmine/v1/tsconfig.json diff --git a/jasminewd2/index.d.ts b/types/jasminewd2/index.d.ts similarity index 100% rename from jasminewd2/index.d.ts rename to types/jasminewd2/index.d.ts diff --git a/jasminewd2/jasminewd2-tests.ts b/types/jasminewd2/jasminewd2-tests.ts similarity index 100% rename from jasminewd2/jasminewd2-tests.ts rename to types/jasminewd2/jasminewd2-tests.ts diff --git a/jasminewd2/tsconfig.json b/types/jasminewd2/tsconfig.json similarity index 100% rename from jasminewd2/tsconfig.json rename to types/jasminewd2/tsconfig.json diff --git a/jasminewd2/tslint.json b/types/jasminewd2/tslint.json similarity index 100% rename from jasminewd2/tslint.json rename to types/jasminewd2/tslint.json diff --git a/java-applet/index.d.ts b/types/java-applet/index.d.ts similarity index 100% rename from java-applet/index.d.ts rename to types/java-applet/index.d.ts diff --git a/java-applet/java-applet-tests.ts b/types/java-applet/java-applet-tests.ts similarity index 100% rename from java-applet/java-applet-tests.ts rename to types/java-applet/java-applet-tests.ts diff --git a/java-applet/tsconfig.json b/types/java-applet/tsconfig.json similarity index 100% rename from java-applet/tsconfig.json rename to types/java-applet/tsconfig.json diff --git a/java/index.d.ts b/types/java/index.d.ts similarity index 100% rename from java/index.d.ts rename to types/java/index.d.ts diff --git a/java/java-tests.ts b/types/java/java-tests.ts similarity index 100% rename from java/java-tests.ts rename to types/java/java-tests.ts diff --git a/java/tsconfig.json b/types/java/tsconfig.json similarity index 100% rename from java/tsconfig.json rename to types/java/tsconfig.json diff --git a/javascript-astar/index.d.ts b/types/javascript-astar/index.d.ts similarity index 100% rename from javascript-astar/index.d.ts rename to types/javascript-astar/index.d.ts diff --git a/javascript-astar/javascript-astar-tests.ts b/types/javascript-astar/javascript-astar-tests.ts similarity index 100% rename from javascript-astar/javascript-astar-tests.ts rename to types/javascript-astar/javascript-astar-tests.ts diff --git a/javascript-astar/tsconfig.json b/types/javascript-astar/tsconfig.json similarity index 100% rename from javascript-astar/tsconfig.json rename to types/javascript-astar/tsconfig.json diff --git a/javascript-bignum/index.d.ts b/types/javascript-bignum/index.d.ts similarity index 100% rename from javascript-bignum/index.d.ts rename to types/javascript-bignum/index.d.ts diff --git a/javascript-bignum/javascript-bignum-tests.ts b/types/javascript-bignum/javascript-bignum-tests.ts similarity index 100% rename from javascript-bignum/javascript-bignum-tests.ts rename to types/javascript-bignum/javascript-bignum-tests.ts diff --git a/javascript-bignum/tsconfig.json b/types/javascript-bignum/tsconfig.json similarity index 100% rename from javascript-bignum/tsconfig.json rename to types/javascript-bignum/tsconfig.json diff --git a/javascript-obfuscator/index.d.ts b/types/javascript-obfuscator/index.d.ts similarity index 100% rename from javascript-obfuscator/index.d.ts rename to types/javascript-obfuscator/index.d.ts diff --git a/javascript-obfuscator/javascript-obfuscator-tests.ts b/types/javascript-obfuscator/javascript-obfuscator-tests.ts similarity index 100% rename from javascript-obfuscator/javascript-obfuscator-tests.ts rename to types/javascript-obfuscator/javascript-obfuscator-tests.ts diff --git a/javascript-obfuscator/tsconfig.json b/types/javascript-obfuscator/tsconfig.json similarity index 100% rename from javascript-obfuscator/tsconfig.json rename to types/javascript-obfuscator/tsconfig.json diff --git a/jbinary/index.d.ts b/types/jbinary/index.d.ts similarity index 100% rename from jbinary/index.d.ts rename to types/jbinary/index.d.ts diff --git a/jbinary/jbinary-tests.ts b/types/jbinary/jbinary-tests.ts similarity index 100% rename from jbinary/jbinary-tests.ts rename to types/jbinary/jbinary-tests.ts diff --git a/jbinary/tsconfig.json b/types/jbinary/tsconfig.json similarity index 100% rename from jbinary/tsconfig.json rename to types/jbinary/tsconfig.json diff --git a/jcanvas/index.d.ts b/types/jcanvas/index.d.ts similarity index 100% rename from jcanvas/index.d.ts rename to types/jcanvas/index.d.ts diff --git a/jcanvas/jcanvas-tests.ts b/types/jcanvas/jcanvas-tests.ts similarity index 100% rename from jcanvas/jcanvas-tests.ts rename to types/jcanvas/jcanvas-tests.ts diff --git a/jcanvas/tsconfig.json b/types/jcanvas/tsconfig.json similarity index 100% rename from jcanvas/tsconfig.json rename to types/jcanvas/tsconfig.json diff --git a/jdataview/index.d.ts b/types/jdataview/index.d.ts similarity index 100% rename from jdataview/index.d.ts rename to types/jdataview/index.d.ts diff --git a/jdataview/jdataview-tests.ts b/types/jdataview/jdataview-tests.ts similarity index 100% rename from jdataview/jdataview-tests.ts rename to types/jdataview/jdataview-tests.ts diff --git a/jdataview/tsconfig.json b/types/jdataview/tsconfig.json similarity index 100% rename from jdataview/tsconfig.json rename to types/jdataview/tsconfig.json diff --git a/jdenticon/index.d.ts b/types/jdenticon/index.d.ts similarity index 100% rename from jdenticon/index.d.ts rename to types/jdenticon/index.d.ts diff --git a/jdenticon/jdenticon-tests.ts b/types/jdenticon/jdenticon-tests.ts similarity index 100% rename from jdenticon/jdenticon-tests.ts rename to types/jdenticon/jdenticon-tests.ts diff --git a/jdenticon/tsconfig.json b/types/jdenticon/tsconfig.json similarity index 100% rename from jdenticon/tsconfig.json rename to types/jdenticon/tsconfig.json diff --git a/jee-jsf/index.d.ts b/types/jee-jsf/index.d.ts similarity index 100% rename from jee-jsf/index.d.ts rename to types/jee-jsf/index.d.ts diff --git a/jee-jsf/jee-jsf-tests.ts b/types/jee-jsf/jee-jsf-tests.ts similarity index 100% rename from jee-jsf/jee-jsf-tests.ts rename to types/jee-jsf/jee-jsf-tests.ts diff --git a/jee-jsf/tsconfig.json b/types/jee-jsf/tsconfig.json similarity index 100% rename from jee-jsf/tsconfig.json rename to types/jee-jsf/tsconfig.json diff --git a/jenkins/index.d.ts b/types/jenkins/index.d.ts similarity index 99% rename from jenkins/index.d.ts rename to types/jenkins/index.d.ts index 5db91893a6..027cc8e0cf 100644 --- a/jenkins/index.d.ts +++ b/types/jenkins/index.d.ts @@ -65,7 +65,7 @@ declare namespace create { }; } - export interface JenkinsPromisifiedAPI { + interface JenkinsPromisifiedAPI { info(): Promise; build: { get(name: string, n: number): Promise; diff --git a/jenkins/jenkins-tests.ts b/types/jenkins/jenkins-tests.ts similarity index 96% rename from jenkins/jenkins-tests.ts rename to types/jenkins/jenkins-tests.ts index 0b409a4b87..98b30d4b73 100644 --- a/jenkins/jenkins-tests.ts +++ b/types/jenkins/jenkins-tests.ts @@ -20,7 +20,7 @@ jenkins.build.log('example', 1, (err, data) => { console.log('log', data); }); -var log = jenkins.build.logStream('example', 1); +const log = jenkins.build.logStream('example', 1); log.on('data', (text: string) => { process.stdout.write(text); @@ -202,4 +202,4 @@ jenkins.view.remove('example', 'jobExample', (err) => { const jenkins2 = J({ baseUrl: 'http://user:pass@localhost:8080', crumbIssuer: true, promisify: true }); jenkins2.info().then(info => console.log(info)); -jenkins2.job.exists('example').then(exists => { var b: boolean = exists; }); +jenkins2.job.exists('example').then(exists => { const b: boolean = exists; }); diff --git a/jenkins/tsconfig.json b/types/jenkins/tsconfig.json similarity index 100% rename from jenkins/tsconfig.json rename to types/jenkins/tsconfig.json diff --git a/jenkins/tslint.json b/types/jenkins/tslint.json similarity index 100% rename from jenkins/tslint.json rename to types/jenkins/tslint.json diff --git a/jest/index.d.ts b/types/jest/index.d.ts old mode 100755 new mode 100644 similarity index 100% rename from jest/index.d.ts rename to types/jest/index.d.ts diff --git a/jest/jest-tests.ts b/types/jest/jest-tests.ts similarity index 100% rename from jest/jest-tests.ts rename to types/jest/jest-tests.ts diff --git a/jest/tsconfig.json b/types/jest/tsconfig.json similarity index 100% rename from jest/tsconfig.json rename to types/jest/tsconfig.json diff --git a/jest/v16/index.d.ts b/types/jest/v16/index.d.ts similarity index 100% rename from jest/v16/index.d.ts rename to types/jest/v16/index.d.ts diff --git a/jest/v16/jest-tests.ts b/types/jest/v16/jest-tests.ts similarity index 100% rename from jest/v16/jest-tests.ts rename to types/jest/v16/jest-tests.ts diff --git a/jest/v16/tsconfig.json b/types/jest/v16/tsconfig.json similarity index 100% rename from jest/v16/tsconfig.json rename to types/jest/v16/tsconfig.json diff --git a/jfp/index.d.ts b/types/jfp/index.d.ts similarity index 100% rename from jfp/index.d.ts rename to types/jfp/index.d.ts diff --git a/jfp/jfp-tests.ts b/types/jfp/jfp-tests.ts similarity index 100% rename from jfp/jfp-tests.ts rename to types/jfp/jfp-tests.ts diff --git a/jfp/tsconfig.json b/types/jfp/tsconfig.json similarity index 100% rename from jfp/tsconfig.json rename to types/jfp/tsconfig.json diff --git a/jfs/index.d.ts b/types/jfs/index.d.ts similarity index 90% rename from jfs/index.d.ts rename to types/jfs/index.d.ts index ba6edb26bc..8383f58981 100644 --- a/jfs/index.d.ts +++ b/types/jfs/index.d.ts @@ -7,21 +7,21 @@ declare const JsonFileStore: JsonFileStore.JsonFileStore; declare namespace JsonFileStore { - export interface Storable { + interface Storable { [key: string]: any; } - export interface Options { + interface Options { type?: 'single' | 'memory'; pretty?: boolean; saveId?: boolean | string; } - export interface JsonFileStore { + interface JsonFileStore { new (name?: string, opts?: Options): Instance; } - export interface Instance { + interface Instance { save(id: K, o: V, cb?: (err?: Error, id?: K) => void): void; save(o: V, cb?: (err?: Error, id?: string) => void): void; diff --git a/jfs/jfs-tests.ts b/types/jfs/jfs-tests.ts similarity index 96% rename from jfs/jfs-tests.ts rename to types/jfs/jfs-tests.ts index d53d1305a2..e736e3b668 100644 --- a/jfs/jfs-tests.ts +++ b/types/jfs/jfs-tests.ts @@ -33,7 +33,7 @@ db.all((err, objs) => { }); // get all synchronously -var objs = db.allSync(); +const objs = db.allSync(); // delete by ID db.delete('foo', err => { diff --git a/jfs/tsconfig.json b/types/jfs/tsconfig.json similarity index 100% rename from jfs/tsconfig.json rename to types/jfs/tsconfig.json diff --git a/jfs/tslint.json b/types/jfs/tslint.json similarity index 100% rename from jfs/tslint.json rename to types/jfs/tslint.json diff --git a/jimp/index.d.ts b/types/jimp/index.d.ts similarity index 100% rename from jimp/index.d.ts rename to types/jimp/index.d.ts diff --git a/jimp/jimp-tests.ts b/types/jimp/jimp-tests.ts similarity index 100% rename from jimp/jimp-tests.ts rename to types/jimp/jimp-tests.ts diff --git a/jimp/tsconfig.json b/types/jimp/tsconfig.json similarity index 100% rename from jimp/tsconfig.json rename to types/jimp/tsconfig.json diff --git a/jimp/tslint.json b/types/jimp/tslint.json similarity index 100% rename from jimp/tslint.json rename to types/jimp/tslint.json diff --git a/jjv/index.d.ts b/types/jjv/index.d.ts similarity index 100% rename from jjv/index.d.ts rename to types/jjv/index.d.ts diff --git a/jjv/jjv-tests.ts b/types/jjv/jjv-tests.ts similarity index 100% rename from jjv/jjv-tests.ts rename to types/jjv/jjv-tests.ts diff --git a/jjv/tsconfig.json b/types/jjv/tsconfig.json similarity index 100% rename from jjv/tsconfig.json rename to types/jjv/tsconfig.json diff --git a/jjve/index.d.ts b/types/jjve/index.d.ts similarity index 100% rename from jjve/index.d.ts rename to types/jjve/index.d.ts diff --git a/jjve/jjve-tests.ts b/types/jjve/jjve-tests.ts similarity index 100% rename from jjve/jjve-tests.ts rename to types/jjve/jjve-tests.ts diff --git a/jjve/tsconfig.json b/types/jjve/tsconfig.json similarity index 100% rename from jjve/tsconfig.json rename to types/jjve/tsconfig.json diff --git a/jmespath/index.d.ts b/types/jmespath/index.d.ts similarity index 100% rename from jmespath/index.d.ts rename to types/jmespath/index.d.ts diff --git a/types/jmespath/jmespath-tests.ts b/types/jmespath/jmespath-tests.ts new file mode 100644 index 0000000000..b254a503b4 --- /dev/null +++ b/types/jmespath/jmespath-tests.ts @@ -0,0 +1,6 @@ +import jmespath = require("jmespath"); + +const a = jmespath.search({foo: {bar: {baz: [0, 1, 2, 3, 4]}}}, "foo.bar.baz[2]"); +const b = jmespath.search({foo: {bar: {baz: [0, 1, 2, 3, 4]}}}, "foo.bar"); +const c = jmespath.search({foo: [{first: "a", last: "b"}, {first: "c", last: "d"}]}, "foo[*].first"); +const d = jmespath.search({foo: [{age: 20}, {age: 25}, {age: 30}, {age: 35}, {age: 40}]}, "foo[?age > `30`]"); diff --git a/jmespath/tsconfig.json b/types/jmespath/tsconfig.json similarity index 100% rename from jmespath/tsconfig.json rename to types/jmespath/tsconfig.json diff --git a/nanoscroller/tslint.json b/types/jmespath/tslint.json similarity index 100% rename from nanoscroller/tslint.json rename to types/jmespath/tslint.json diff --git a/jodata/index.d.ts b/types/jodata/index.d.ts similarity index 100% rename from jodata/index.d.ts rename to types/jodata/index.d.ts diff --git a/jodata/jodata-tests.ts b/types/jodata/jodata-tests.ts similarity index 100% rename from jodata/jodata-tests.ts rename to types/jodata/jodata-tests.ts diff --git a/jodata/tsconfig.json b/types/jodata/tsconfig.json similarity index 100% rename from jodata/tsconfig.json rename to types/jodata/tsconfig.json diff --git a/johnny-five/index.d.ts b/types/johnny-five/index.d.ts similarity index 100% rename from johnny-five/index.d.ts rename to types/johnny-five/index.d.ts diff --git a/johnny-five/johnny-five-tests.ts b/types/johnny-five/johnny-five-tests.ts similarity index 100% rename from johnny-five/johnny-five-tests.ts rename to types/johnny-five/johnny-five-tests.ts diff --git a/johnny-five/tsconfig.json b/types/johnny-five/tsconfig.json similarity index 100% rename from johnny-five/tsconfig.json rename to types/johnny-five/tsconfig.json diff --git a/joi/index.d.ts b/types/joi/index.d.ts similarity index 100% rename from joi/index.d.ts rename to types/joi/index.d.ts diff --git a/joi/joi-tests.ts b/types/joi/joi-tests.ts similarity index 100% rename from joi/joi-tests.ts rename to types/joi/joi-tests.ts diff --git a/joi/tsconfig.json b/types/joi/tsconfig.json similarity index 100% rename from joi/tsconfig.json rename to types/joi/tsconfig.json diff --git a/joi/v6/index.d.ts b/types/joi/v6/index.d.ts similarity index 100% rename from joi/v6/index.d.ts rename to types/joi/v6/index.d.ts diff --git a/joi/v6/joi-tests.ts b/types/joi/v6/joi-tests.ts similarity index 100% rename from joi/v6/joi-tests.ts rename to types/joi/v6/joi-tests.ts diff --git a/joi/v6/tsconfig.json b/types/joi/v6/tsconfig.json similarity index 100% rename from joi/v6/tsconfig.json rename to types/joi/v6/tsconfig.json diff --git a/jointjs/README.md b/types/jointjs/README.md similarity index 100% rename from jointjs/README.md rename to types/jointjs/README.md diff --git a/jointjs/index.d.ts b/types/jointjs/index.d.ts similarity index 100% rename from jointjs/index.d.ts rename to types/jointjs/index.d.ts diff --git a/jquery.address/tsconfig.json b/types/jointjs/tsconfig.json similarity index 100% rename from jquery.address/tsconfig.json rename to types/jointjs/tsconfig.json diff --git a/jpm/index.d.ts b/types/jpm/index.d.ts similarity index 100% rename from jpm/index.d.ts rename to types/jpm/index.d.ts diff --git a/jpm/jpm-tests.ts b/types/jpm/jpm-tests.ts similarity index 100% rename from jpm/jpm-tests.ts rename to types/jpm/jpm-tests.ts diff --git a/jpm/tsconfig.json b/types/jpm/tsconfig.json similarity index 100% rename from jpm/tsconfig.json rename to types/jpm/tsconfig.json diff --git a/jqgrid/index.d.ts b/types/jqgrid/index.d.ts similarity index 100% rename from jqgrid/index.d.ts rename to types/jqgrid/index.d.ts diff --git a/jqgrid/jqgrid-tests.ts b/types/jqgrid/jqgrid-tests.ts similarity index 100% rename from jqgrid/jqgrid-tests.ts rename to types/jqgrid/jqgrid-tests.ts diff --git a/jqgrid/tsconfig.json b/types/jqgrid/tsconfig.json similarity index 100% rename from jqgrid/tsconfig.json rename to types/jqgrid/tsconfig.json diff --git a/jqrangeslider/index.d.ts b/types/jqrangeslider/index.d.ts similarity index 100% rename from jqrangeslider/index.d.ts rename to types/jqrangeslider/index.d.ts diff --git a/jqrangeslider/jqrangeslider-tests.ts b/types/jqrangeslider/jqrangeslider-tests.ts similarity index 100% rename from jqrangeslider/jqrangeslider-tests.ts rename to types/jqrangeslider/jqrangeslider-tests.ts diff --git a/jqrangeslider/tsconfig.json b/types/jqrangeslider/tsconfig.json similarity index 100% rename from jqrangeslider/tsconfig.json rename to types/jqrangeslider/tsconfig.json diff --git a/jquery-ajax-chain/index.d.ts b/types/jquery-ajax-chain/index.d.ts similarity index 100% rename from jquery-ajax-chain/index.d.ts rename to types/jquery-ajax-chain/index.d.ts diff --git a/jquery-ajax-chain/jquery-ajax-chain-tests.ts b/types/jquery-ajax-chain/jquery-ajax-chain-tests.ts similarity index 100% rename from jquery-ajax-chain/jquery-ajax-chain-tests.ts rename to types/jquery-ajax-chain/jquery-ajax-chain-tests.ts diff --git a/jquery-ajax-chain/tsconfig.json b/types/jquery-ajax-chain/tsconfig.json similarity index 100% rename from jquery-ajax-chain/tsconfig.json rename to types/jquery-ajax-chain/tsconfig.json diff --git a/jquery-alertable/index.d.ts b/types/jquery-alertable/index.d.ts similarity index 100% rename from jquery-alertable/index.d.ts rename to types/jquery-alertable/index.d.ts diff --git a/jquery-alertable/jquery-alertable-tests.ts b/types/jquery-alertable/jquery-alertable-tests.ts similarity index 100% rename from jquery-alertable/jquery-alertable-tests.ts rename to types/jquery-alertable/jquery-alertable-tests.ts diff --git a/jquery-alertable/tsconfig.json b/types/jquery-alertable/tsconfig.json similarity index 100% rename from jquery-alertable/tsconfig.json rename to types/jquery-alertable/tsconfig.json diff --git a/jquery-backstretch/index.d.ts b/types/jquery-backstretch/index.d.ts similarity index 100% rename from jquery-backstretch/index.d.ts rename to types/jquery-backstretch/index.d.ts diff --git a/jquery-backstretch/jquery-backstretch-tests.ts b/types/jquery-backstretch/jquery-backstretch-tests.ts similarity index 100% rename from jquery-backstretch/jquery-backstretch-tests.ts rename to types/jquery-backstretch/jquery-backstretch-tests.ts diff --git a/jquery-backstretch/tsconfig.json b/types/jquery-backstretch/tsconfig.json similarity index 100% rename from jquery-backstretch/tsconfig.json rename to types/jquery-backstretch/tsconfig.json diff --git a/jquery-cropbox/index.d.ts b/types/jquery-cropbox/index.d.ts similarity index 100% rename from jquery-cropbox/index.d.ts rename to types/jquery-cropbox/index.d.ts diff --git a/jquery-cropbox/jquery-cropbox-tests.ts b/types/jquery-cropbox/jquery-cropbox-tests.ts similarity index 100% rename from jquery-cropbox/jquery-cropbox-tests.ts rename to types/jquery-cropbox/jquery-cropbox-tests.ts diff --git a/jquery-cropbox/tsconfig.json b/types/jquery-cropbox/tsconfig.json similarity index 100% rename from jquery-cropbox/tsconfig.json rename to types/jquery-cropbox/tsconfig.json diff --git a/jquery-deparam/index.d.ts b/types/jquery-deparam/index.d.ts similarity index 100% rename from jquery-deparam/index.d.ts rename to types/jquery-deparam/index.d.ts diff --git a/jquery-deparam/jquery-deparam-tests.ts b/types/jquery-deparam/jquery-deparam-tests.ts similarity index 100% rename from jquery-deparam/jquery-deparam-tests.ts rename to types/jquery-deparam/jquery-deparam-tests.ts diff --git a/jquery-deparam/tsconfig.json b/types/jquery-deparam/tsconfig.json similarity index 100% rename from jquery-deparam/tsconfig.json rename to types/jquery-deparam/tsconfig.json diff --git a/jquery-easy-loading/index.d.ts b/types/jquery-easy-loading/index.d.ts similarity index 100% rename from jquery-easy-loading/index.d.ts rename to types/jquery-easy-loading/index.d.ts diff --git a/jquery-easy-loading/jquery-easy-loading-tests.ts b/types/jquery-easy-loading/jquery-easy-loading-tests.ts similarity index 100% rename from jquery-easy-loading/jquery-easy-loading-tests.ts rename to types/jquery-easy-loading/jquery-easy-loading-tests.ts diff --git a/jquery-easy-loading/tsconfig.json b/types/jquery-easy-loading/tsconfig.json similarity index 100% rename from jquery-easy-loading/tsconfig.json rename to types/jquery-easy-loading/tsconfig.json diff --git a/jquery-fullscreen/index.d.ts b/types/jquery-fullscreen/index.d.ts similarity index 100% rename from jquery-fullscreen/index.d.ts rename to types/jquery-fullscreen/index.d.ts diff --git a/jquery-fullscreen/jquery-fullscreen-tests.ts b/types/jquery-fullscreen/jquery-fullscreen-tests.ts similarity index 100% rename from jquery-fullscreen/jquery-fullscreen-tests.ts rename to types/jquery-fullscreen/jquery-fullscreen-tests.ts diff --git a/jquery-fullscreen/tsconfig.json b/types/jquery-fullscreen/tsconfig.json similarity index 100% rename from jquery-fullscreen/tsconfig.json rename to types/jquery-fullscreen/tsconfig.json diff --git a/jquery-galleria/index.d.ts b/types/jquery-galleria/index.d.ts similarity index 100% rename from jquery-galleria/index.d.ts rename to types/jquery-galleria/index.d.ts diff --git a/jquery-galleria/jquery-galleria-tests.ts b/types/jquery-galleria/jquery-galleria-tests.ts similarity index 100% rename from jquery-galleria/jquery-galleria-tests.ts rename to types/jquery-galleria/jquery-galleria-tests.ts diff --git a/jquery-galleria/tsconfig.json b/types/jquery-galleria/tsconfig.json similarity index 100% rename from jquery-galleria/tsconfig.json rename to types/jquery-galleria/tsconfig.json diff --git a/jquery-handsontable/index.d.ts b/types/jquery-handsontable/index.d.ts similarity index 100% rename from jquery-handsontable/index.d.ts rename to types/jquery-handsontable/index.d.ts diff --git a/jquery-handsontable/jquery-handsontable-tests.ts b/types/jquery-handsontable/jquery-handsontable-tests.ts similarity index 100% rename from jquery-handsontable/jquery-handsontable-tests.ts rename to types/jquery-handsontable/jquery-handsontable-tests.ts diff --git a/jquery-handsontable/tsconfig.json b/types/jquery-handsontable/tsconfig.json similarity index 100% rename from jquery-handsontable/tsconfig.json rename to types/jquery-handsontable/tsconfig.json diff --git a/jquery-jsonrpcclient/index.d.ts b/types/jquery-jsonrpcclient/index.d.ts similarity index 100% rename from jquery-jsonrpcclient/index.d.ts rename to types/jquery-jsonrpcclient/index.d.ts diff --git a/jquery-jsonrpcclient/jquery-jsonrpcclient-tests.ts b/types/jquery-jsonrpcclient/jquery-jsonrpcclient-tests.ts similarity index 100% rename from jquery-jsonrpcclient/jquery-jsonrpcclient-tests.ts rename to types/jquery-jsonrpcclient/jquery-jsonrpcclient-tests.ts diff --git a/jquery-jsonrpcclient/tsconfig.json b/types/jquery-jsonrpcclient/tsconfig.json similarity index 100% rename from jquery-jsonrpcclient/tsconfig.json rename to types/jquery-jsonrpcclient/tsconfig.json diff --git a/jquery-knob/index.d.ts b/types/jquery-knob/index.d.ts similarity index 100% rename from jquery-knob/index.d.ts rename to types/jquery-knob/index.d.ts diff --git a/jquery-knob/jquery-knob-tests.ts b/types/jquery-knob/jquery-knob-tests.ts similarity index 100% rename from jquery-knob/jquery-knob-tests.ts rename to types/jquery-knob/jquery-knob-tests.ts diff --git a/jquery-knob/tsconfig.json b/types/jquery-knob/tsconfig.json similarity index 100% rename from jquery-knob/tsconfig.json rename to types/jquery-knob/tsconfig.json diff --git a/jquery-mask-plugin/index.d.ts b/types/jquery-mask-plugin/index.d.ts similarity index 99% rename from jquery-mask-plugin/index.d.ts rename to types/jquery-mask-plugin/index.d.ts index 61f3a69359..270828856f 100644 --- a/jquery-mask-plugin/index.d.ts +++ b/types/jquery-mask-plugin/index.d.ts @@ -6,7 +6,6 @@ /// declare namespace jQueryMask { - interface Invalid { p: number; v: string; @@ -42,11 +41,9 @@ declare namespace jQueryMask { [key: string]: Pattern | {} | undefined; placeholder?: string; } - } interface JQuery { - /** * Applies the mask to the matching selector elements. * @param mask should be a string or a function. @@ -72,4 +69,4 @@ interface JQuery { * @returns Masked value. */ masked(value: string): string; -} \ No newline at end of file +} diff --git a/jquery-mask-plugin/jquery-mask-plugin-tests.ts b/types/jquery-mask-plugin/jquery-mask-plugin-tests.ts similarity index 98% rename from jquery-mask-plugin/jquery-mask-plugin-tests.ts rename to types/jquery-mask-plugin/jquery-mask-plugin-tests.ts index 36362eccf7..310cec421b 100644 --- a/jquery-mask-plugin/jquery-mask-plugin-tests.ts +++ b/types/jquery-mask-plugin/jquery-mask-plugin-tests.ts @@ -1,4 +1,3 @@ - // basic usage $(document).ready(() => { $('.date').mask('00/00/0000'); @@ -53,7 +52,7 @@ let options: jQueryMask.Options = { console.log('cep changed! ', cep); }, onInvalid(val: Object, e: Event, f: JQuery, invalid: jQueryMask.Invalid[], options: jQueryMask.Options) { - var error = invalid[0]; + const error = invalid[0]; console.log("Digit: ", error.v, " is invalid for the position: ", error.p, ". We expect something like: ", error.e); } }; @@ -116,4 +115,4 @@ $('.date').unmask(); $('.date').cleanVal(); // Getting a masked value programmatically -$('.date').masked('19840807'); \ No newline at end of file +$('.date').masked('19840807'); diff --git a/jquery-mask-plugin/tsconfig.json b/types/jquery-mask-plugin/tsconfig.json similarity index 100% rename from jquery-mask-plugin/tsconfig.json rename to types/jquery-mask-plugin/tsconfig.json diff --git a/jquery-mask-plugin/tslint.json b/types/jquery-mask-plugin/tslint.json similarity index 100% rename from jquery-mask-plugin/tslint.json rename to types/jquery-mask-plugin/tslint.json diff --git a/jquery-mockjax/index.d.ts b/types/jquery-mockjax/index.d.ts similarity index 100% rename from jquery-mockjax/index.d.ts rename to types/jquery-mockjax/index.d.ts diff --git a/jquery-mockjax/jquery-mockjax-tests.ts b/types/jquery-mockjax/jquery-mockjax-tests.ts similarity index 100% rename from jquery-mockjax/jquery-mockjax-tests.ts rename to types/jquery-mockjax/jquery-mockjax-tests.ts diff --git a/jquery-mockjax/tsconfig.json b/types/jquery-mockjax/tsconfig.json similarity index 100% rename from jquery-mockjax/tsconfig.json rename to types/jquery-mockjax/tsconfig.json diff --git a/jquery-mousewheel/index.d.ts b/types/jquery-mousewheel/index.d.ts similarity index 100% rename from jquery-mousewheel/index.d.ts rename to types/jquery-mousewheel/index.d.ts diff --git a/jquery-mousewheel/jquery-mousewheel-tests.ts b/types/jquery-mousewheel/jquery-mousewheel-tests.ts similarity index 100% rename from jquery-mousewheel/jquery-mousewheel-tests.ts rename to types/jquery-mousewheel/jquery-mousewheel-tests.ts diff --git a/jquery-mousewheel/tsconfig.json b/types/jquery-mousewheel/tsconfig.json similarity index 100% rename from jquery-mousewheel/tsconfig.json rename to types/jquery-mousewheel/tsconfig.json diff --git a/jquery-param/index.d.ts b/types/jquery-param/index.d.ts similarity index 100% rename from jquery-param/index.d.ts rename to types/jquery-param/index.d.ts diff --git a/jquery-param/jquery-param-tests.ts b/types/jquery-param/jquery-param-tests.ts similarity index 100% rename from jquery-param/jquery-param-tests.ts rename to types/jquery-param/jquery-param-tests.ts diff --git a/jquery-param/tsconfig.json b/types/jquery-param/tsconfig.json similarity index 100% rename from jquery-param/tsconfig.json rename to types/jquery-param/tsconfig.json diff --git a/jquery-sortable/index.d.ts b/types/jquery-sortable/index.d.ts similarity index 100% rename from jquery-sortable/index.d.ts rename to types/jquery-sortable/index.d.ts diff --git a/jquery-sortable/jquery-sortable-tests.ts b/types/jquery-sortable/jquery-sortable-tests.ts similarity index 100% rename from jquery-sortable/jquery-sortable-tests.ts rename to types/jquery-sortable/jquery-sortable-tests.ts diff --git a/jquery-sortable/tsconfig.json b/types/jquery-sortable/tsconfig.json similarity index 100% rename from jquery-sortable/tsconfig.json rename to types/jquery-sortable/tsconfig.json diff --git a/jquery-steps/index.d.ts b/types/jquery-steps/index.d.ts similarity index 100% rename from jquery-steps/index.d.ts rename to types/jquery-steps/index.d.ts diff --git a/jquery-steps/jquery-steps-tests.ts b/types/jquery-steps/jquery-steps-tests.ts similarity index 100% rename from jquery-steps/jquery-steps-tests.ts rename to types/jquery-steps/jquery-steps-tests.ts diff --git a/jquery-steps/tsconfig.json b/types/jquery-steps/tsconfig.json similarity index 100% rename from jquery-steps/tsconfig.json rename to types/jquery-steps/tsconfig.json diff --git a/jquery-timeentry/index.d.ts b/types/jquery-timeentry/index.d.ts similarity index 100% rename from jquery-timeentry/index.d.ts rename to types/jquery-timeentry/index.d.ts diff --git a/jquery-timeentry/jquery-timeentry-tests.ts b/types/jquery-timeentry/jquery-timeentry-tests.ts similarity index 100% rename from jquery-timeentry/jquery-timeentry-tests.ts rename to types/jquery-timeentry/jquery-timeentry-tests.ts diff --git a/jquery-timeentry/tsconfig.json b/types/jquery-timeentry/tsconfig.json similarity index 100% rename from jquery-timeentry/tsconfig.json rename to types/jquery-timeentry/tsconfig.json diff --git a/jquery-toastmessage-plugin/index.d.ts b/types/jquery-toastmessage-plugin/index.d.ts similarity index 98% rename from jquery-toastmessage-plugin/index.d.ts rename to types/jquery-toastmessage-plugin/index.d.ts index 2666ecbd0b..6ca6816e21 100644 --- a/jquery-toastmessage-plugin/index.d.ts +++ b/types/jquery-toastmessage-plugin/index.d.ts @@ -5,7 +5,7 @@ /// -declare interface JQuery { +interface JQuery { toastmessage: JQueryToastmessage.ToastmessageStatic; } @@ -54,4 +54,4 @@ declare namespace JQueryToastmessage { /** callback function when the toastmessage is closed @default null */ close?: () => void; } -} \ No newline at end of file +} diff --git a/types/jquery-toastmessage-plugin/jquery-toastmessage-plugin-tests.ts b/types/jquery-toastmessage-plugin/jquery-toastmessage-plugin-tests.ts new file mode 100644 index 0000000000..ae096da350 --- /dev/null +++ b/types/jquery-toastmessage-plugin/jquery-toastmessage-plugin-tests.ts @@ -0,0 +1,85 @@ +/* code examples from documentation */ + +$().toastmessage('showNoticeToast', 'some message here'); +$().toastmessage('showSuccessToast', "some message here"); +$().toastmessage('showWarningToast', "some message here"); +$().toastmessage('showErrorToast', "some message here"); + +// user configured toastmessage: +const toastObject = $().toastmessage('showToast', { + text: 'Hello World', + sticky: true, + position: 'top-right', + type: 'success', + close() { console.log("toast is closed ..."); } +}); + +$().toastmessage('removeToast', toastObject); + +// reconfiguring the toasts as sticky +$().toastmessage({sticky : true}); + +// saving the newly created toast into a variable +const myToast = $().toastmessage('showNoticeToast', 'some message here'); + +// removing the toast +$().toastmessage('removeToast', myToast); + +// user configuration of all toastmessages to come: +$().toastmessage({ + text: 'Hello World', + sticky: true, + position: 'top-right', + type: 'success', + close() { console.log("toast is closed ..."); } +}); + +$().toastmessage({ + inEffectDuration: 600, // in effect duration in miliseconds + stayTime: 3000, // time in miliseconds before the item has to disappear + text: '', // content of the item + sticky: false, // should the toast item sticky or not? + type: 'notice', // notice, warning, error, success + position: 'top-right', // top-left, top-center, top-right, middle-left, middle-center, middle-right + // Position of the toast container holding different toast. + // Position can be set only once at the very first call, + // changing the position after the first call does nothing + closeText: '', // text which will be shown as close button, + // set to '' when you want to introduce an image via css + close: undefined // callback function when the toastmessage is closed +}); + +/* code examples from tests */ + +$('.toast-container').remove(); + +$().toastmessage('showSuccessToast', "SUCCESS"); +$().toastmessage('showNoticeToast', "NOTICE"); +$().toastmessage('showWarningToast', "WARNING"); +$().toastmessage('showErrorToast', "ERROR"); +$().toastmessage({ + sticky: true, + position: 'top-right', + closeText: '' +}); +$().toastmessage('showToast', { + text: 'Success Dialog', + type: 'success' +}); +$().toastmessage('showToast', { + text: 'Success Dialog', + sticky: true, + position: 'top-right', + type: 'success', + closeText: '', + close() {} +}); +const toast = $().toastmessage('showToast', { + text: 'Success Dialog', + sticky: true, + position: 'top-right', + type: 'success', + closeText: '', + close() {} +}); +$().toastmessage('removeToast', toast, { close() {} }); diff --git a/jquery-toastmessage-plugin/tsconfig.json b/types/jquery-toastmessage-plugin/tsconfig.json similarity index 100% rename from jquery-toastmessage-plugin/tsconfig.json rename to types/jquery-toastmessage-plugin/tsconfig.json diff --git a/jquery-toastmessage-plugin/tslint.json b/types/jquery-toastmessage-plugin/tslint.json similarity index 100% rename from jquery-toastmessage-plugin/tslint.json rename to types/jquery-toastmessage-plugin/tslint.json diff --git a/jquery-truncate-html/index.d.ts b/types/jquery-truncate-html/index.d.ts similarity index 100% rename from jquery-truncate-html/index.d.ts rename to types/jquery-truncate-html/index.d.ts diff --git a/jquery-truncate-html/jquery-truncate-html-tests.ts b/types/jquery-truncate-html/jquery-truncate-html-tests.ts similarity index 100% rename from jquery-truncate-html/jquery-truncate-html-tests.ts rename to types/jquery-truncate-html/jquery-truncate-html-tests.ts diff --git a/jquery-truncate-html/tsconfig.json b/types/jquery-truncate-html/tsconfig.json similarity index 100% rename from jquery-truncate-html/tsconfig.json rename to types/jquery-truncate-html/tsconfig.json diff --git a/jquery-urlparam/index.d.ts b/types/jquery-urlparam/index.d.ts similarity index 100% rename from jquery-urlparam/index.d.ts rename to types/jquery-urlparam/index.d.ts diff --git a/jquery-urlparam/jquery-urlparam-tests.ts b/types/jquery-urlparam/jquery-urlparam-tests.ts similarity index 100% rename from jquery-urlparam/jquery-urlparam-tests.ts rename to types/jquery-urlparam/jquery-urlparam-tests.ts diff --git a/jquery-urlparam/tsconfig.json b/types/jquery-urlparam/tsconfig.json similarity index 100% rename from jquery-urlparam/tsconfig.json rename to types/jquery-urlparam/tsconfig.json diff --git a/jquery-validation-unobtrusive/index.d.ts b/types/jquery-validation-unobtrusive/index.d.ts similarity index 100% rename from jquery-validation-unobtrusive/index.d.ts rename to types/jquery-validation-unobtrusive/index.d.ts diff --git a/jquery-validation-unobtrusive/jquery-validation-unobtrusive-tests.ts b/types/jquery-validation-unobtrusive/jquery-validation-unobtrusive-tests.ts similarity index 100% rename from jquery-validation-unobtrusive/jquery-validation-unobtrusive-tests.ts rename to types/jquery-validation-unobtrusive/jquery-validation-unobtrusive-tests.ts diff --git a/jquery-validation-unobtrusive/tsconfig.json b/types/jquery-validation-unobtrusive/tsconfig.json similarity index 100% rename from jquery-validation-unobtrusive/tsconfig.json rename to types/jquery-validation-unobtrusive/tsconfig.json diff --git a/jquery.address/index.d.ts b/types/jquery.address/index.d.ts similarity index 100% rename from jquery.address/index.d.ts rename to types/jquery.address/index.d.ts diff --git a/jquery.bootstrap.wizard/tsconfig.json b/types/jquery.address/tsconfig.json similarity index 100% rename from jquery.bootstrap.wizard/tsconfig.json rename to types/jquery.address/tsconfig.json diff --git a/jquery.ajaxfile/index.d.ts b/types/jquery.ajaxfile/index.d.ts similarity index 100% rename from jquery.ajaxfile/index.d.ts rename to types/jquery.ajaxfile/index.d.ts diff --git a/jquery.ajaxfile/jquery.ajaxfile-tests.ts b/types/jquery.ajaxfile/jquery.ajaxfile-tests.ts similarity index 100% rename from jquery.ajaxfile/jquery.ajaxfile-tests.ts rename to types/jquery.ajaxfile/jquery.ajaxfile-tests.ts diff --git a/jquery.ajaxfile/tsconfig.json b/types/jquery.ajaxfile/tsconfig.json similarity index 100% rename from jquery.ajaxfile/tsconfig.json rename to types/jquery.ajaxfile/tsconfig.json diff --git a/jquery.are-you-sure/index.d.ts b/types/jquery.are-you-sure/index.d.ts similarity index 100% rename from jquery.are-you-sure/index.d.ts rename to types/jquery.are-you-sure/index.d.ts diff --git a/jquery.are-you-sure/jquery.are-you-sure-tests.ts b/types/jquery.are-you-sure/jquery.are-you-sure-tests.ts similarity index 100% rename from jquery.are-you-sure/jquery.are-you-sure-tests.ts rename to types/jquery.are-you-sure/jquery.are-you-sure-tests.ts diff --git a/jquery.are-you-sure/tsconfig.json b/types/jquery.are-you-sure/tsconfig.json similarity index 100% rename from jquery.are-you-sure/tsconfig.json rename to types/jquery.are-you-sure/tsconfig.json diff --git a/jquery.autosize/index.d.ts b/types/jquery.autosize/index.d.ts similarity index 100% rename from jquery.autosize/index.d.ts rename to types/jquery.autosize/index.d.ts diff --git a/jquery.autosize/jquery.autosize-tests.ts b/types/jquery.autosize/jquery.autosize-tests.ts similarity index 100% rename from jquery.autosize/jquery.autosize-tests.ts rename to types/jquery.autosize/jquery.autosize-tests.ts diff --git a/jquery.autosize/tsconfig.json b/types/jquery.autosize/tsconfig.json similarity index 100% rename from jquery.autosize/tsconfig.json rename to types/jquery.autosize/tsconfig.json diff --git a/jquery.base64/index.d.ts b/types/jquery.base64/index.d.ts similarity index 100% rename from jquery.base64/index.d.ts rename to types/jquery.base64/index.d.ts diff --git a/jquery.base64/jquery.base64-tests.ts b/types/jquery.base64/jquery.base64-tests.ts similarity index 100% rename from jquery.base64/jquery.base64-tests.ts rename to types/jquery.base64/jquery.base64-tests.ts diff --git a/jquery.base64/tsconfig.json b/types/jquery.base64/tsconfig.json similarity index 100% rename from jquery.base64/tsconfig.json rename to types/jquery.base64/tsconfig.json diff --git a/jquery.bbq/index.d.ts b/types/jquery.bbq/index.d.ts similarity index 100% rename from jquery.bbq/index.d.ts rename to types/jquery.bbq/index.d.ts diff --git a/jquery.bbq/jquery.bbq-tests.ts b/types/jquery.bbq/jquery.bbq-tests.ts similarity index 100% rename from jquery.bbq/jquery.bbq-tests.ts rename to types/jquery.bbq/jquery.bbq-tests.ts diff --git a/jquery.bbq/tsconfig.json b/types/jquery.bbq/tsconfig.json similarity index 100% rename from jquery.bbq/tsconfig.json rename to types/jquery.bbq/tsconfig.json diff --git a/jquery.blockui/index.d.ts b/types/jquery.blockui/index.d.ts similarity index 100% rename from jquery.blockui/index.d.ts rename to types/jquery.blockui/index.d.ts diff --git a/jquery.blockui/jquery.blockui-tests.ts b/types/jquery.blockui/jquery.blockui-tests.ts similarity index 100% rename from jquery.blockui/jquery.blockui-tests.ts rename to types/jquery.blockui/jquery.blockui-tests.ts diff --git a/jquery.blockui/tsconfig.json b/types/jquery.blockui/tsconfig.json similarity index 100% rename from jquery.blockui/tsconfig.json rename to types/jquery.blockui/tsconfig.json diff --git a/jquery.bootstrap.wizard/index.d.ts b/types/jquery.bootstrap.wizard/index.d.ts similarity index 100% rename from jquery.bootstrap.wizard/index.d.ts rename to types/jquery.bootstrap.wizard/index.d.ts diff --git a/jquery.elang/tsconfig.json b/types/jquery.bootstrap.wizard/tsconfig.json similarity index 100% rename from jquery.elang/tsconfig.json rename to types/jquery.bootstrap.wizard/tsconfig.json diff --git a/jquery.cleditor/index.d.ts b/types/jquery.cleditor/index.d.ts similarity index 100% rename from jquery.cleditor/index.d.ts rename to types/jquery.cleditor/index.d.ts diff --git a/jquery.cleditor/jquery.cleditor-tests.ts b/types/jquery.cleditor/jquery.cleditor-tests.ts similarity index 100% rename from jquery.cleditor/jquery.cleditor-tests.ts rename to types/jquery.cleditor/jquery.cleditor-tests.ts diff --git a/jquery.cleditor/tsconfig.json b/types/jquery.cleditor/tsconfig.json similarity index 100% rename from jquery.cleditor/tsconfig.json rename to types/jquery.cleditor/tsconfig.json diff --git a/jquery.clientsidelogging/index.d.ts b/types/jquery.clientsidelogging/index.d.ts similarity index 100% rename from jquery.clientsidelogging/index.d.ts rename to types/jquery.clientsidelogging/index.d.ts diff --git a/jquery.clientsidelogging/jquery.clientsidelogging-tests.ts b/types/jquery.clientsidelogging/jquery.clientsidelogging-tests.ts similarity index 100% rename from jquery.clientsidelogging/jquery.clientsidelogging-tests.ts rename to types/jquery.clientsidelogging/jquery.clientsidelogging-tests.ts diff --git a/jquery.clientsidelogging/tsconfig.json b/types/jquery.clientsidelogging/tsconfig.json similarity index 100% rename from jquery.clientsidelogging/tsconfig.json rename to types/jquery.clientsidelogging/tsconfig.json diff --git a/jquery.color/index.d.ts b/types/jquery.color/index.d.ts similarity index 100% rename from jquery.color/index.d.ts rename to types/jquery.color/index.d.ts diff --git a/jquery.color/jquery.color-tests.ts b/types/jquery.color/jquery.color-tests.ts similarity index 100% rename from jquery.color/jquery.color-tests.ts rename to types/jquery.color/jquery.color-tests.ts diff --git a/jquery.color/tsconfig.json b/types/jquery.color/tsconfig.json similarity index 100% rename from jquery.color/tsconfig.json rename to types/jquery.color/tsconfig.json diff --git a/jquery.colorbox/index.d.ts b/types/jquery.colorbox/index.d.ts similarity index 100% rename from jquery.colorbox/index.d.ts rename to types/jquery.colorbox/index.d.ts diff --git a/jquery.colorbox/jquery.colorbox-tests.ts b/types/jquery.colorbox/jquery.colorbox-tests.ts similarity index 100% rename from jquery.colorbox/jquery.colorbox-tests.ts rename to types/jquery.colorbox/jquery.colorbox-tests.ts diff --git a/jquery.colorbox/tsconfig.json b/types/jquery.colorbox/tsconfig.json similarity index 100% rename from jquery.colorbox/tsconfig.json rename to types/jquery.colorbox/tsconfig.json diff --git a/jquery.colorpicker/index.d.ts b/types/jquery.colorpicker/index.d.ts similarity index 100% rename from jquery.colorpicker/index.d.ts rename to types/jquery.colorpicker/index.d.ts diff --git a/jquery.colorpicker/jquery.colorpicker-tests.ts b/types/jquery.colorpicker/jquery.colorpicker-tests.ts similarity index 100% rename from jquery.colorpicker/jquery.colorpicker-tests.ts rename to types/jquery.colorpicker/jquery.colorpicker-tests.ts diff --git a/jquery.colorpicker/tsconfig.json b/types/jquery.colorpicker/tsconfig.json similarity index 100% rename from jquery.colorpicker/tsconfig.json rename to types/jquery.colorpicker/tsconfig.json diff --git a/jquery.contextmenu/index.d.ts b/types/jquery.contextmenu/index.d.ts similarity index 100% rename from jquery.contextmenu/index.d.ts rename to types/jquery.contextmenu/index.d.ts diff --git a/jquery.contextmenu/jquery.contextmenu-tests.ts b/types/jquery.contextmenu/jquery.contextmenu-tests.ts similarity index 100% rename from jquery.contextmenu/jquery.contextmenu-tests.ts rename to types/jquery.contextmenu/jquery.contextmenu-tests.ts diff --git a/jquery.contextmenu/tsconfig.json b/types/jquery.contextmenu/tsconfig.json similarity index 100% rename from jquery.contextmenu/tsconfig.json rename to types/jquery.contextmenu/tsconfig.json diff --git a/jquery.cookie/index.d.ts b/types/jquery.cookie/index.d.ts similarity index 100% rename from jquery.cookie/index.d.ts rename to types/jquery.cookie/index.d.ts diff --git a/jquery.cookie/jquery.cookie-tests.ts b/types/jquery.cookie/jquery.cookie-tests.ts similarity index 100% rename from jquery.cookie/jquery.cookie-tests.ts rename to types/jquery.cookie/jquery.cookie-tests.ts diff --git a/jquery.cookie/tsconfig.json b/types/jquery.cookie/tsconfig.json similarity index 100% rename from jquery.cookie/tsconfig.json rename to types/jquery.cookie/tsconfig.json diff --git a/jquery.customselect/index.d.ts b/types/jquery.customselect/index.d.ts similarity index 100% rename from jquery.customselect/index.d.ts rename to types/jquery.customselect/index.d.ts diff --git a/jquery.customselect/jquery.customselect-tests.ts b/types/jquery.customselect/jquery.customselect-tests.ts similarity index 100% rename from jquery.customselect/jquery.customselect-tests.ts rename to types/jquery.customselect/jquery.customselect-tests.ts diff --git a/jquery.customselect/tsconfig.json b/types/jquery.customselect/tsconfig.json similarity index 100% rename from jquery.customselect/tsconfig.json rename to types/jquery.customselect/tsconfig.json diff --git a/jquery.cycle/index.d.ts b/types/jquery.cycle/index.d.ts similarity index 100% rename from jquery.cycle/index.d.ts rename to types/jquery.cycle/index.d.ts diff --git a/jquery.cycle/jquery.cycle-tests.ts b/types/jquery.cycle/jquery.cycle-tests.ts similarity index 100% rename from jquery.cycle/jquery.cycle-tests.ts rename to types/jquery.cycle/jquery.cycle-tests.ts diff --git a/jquery.cycle/tsconfig.json b/types/jquery.cycle/tsconfig.json similarity index 100% rename from jquery.cycle/tsconfig.json rename to types/jquery.cycle/tsconfig.json diff --git a/jquery.cycle2/index.d.ts b/types/jquery.cycle2/index.d.ts similarity index 100% rename from jquery.cycle2/index.d.ts rename to types/jquery.cycle2/index.d.ts diff --git a/jquery.cycle2/jquery.cycle2-tests.ts b/types/jquery.cycle2/jquery.cycle2-tests.ts similarity index 100% rename from jquery.cycle2/jquery.cycle2-tests.ts rename to types/jquery.cycle2/jquery.cycle2-tests.ts diff --git a/jquery.cycle2/tsconfig.json b/types/jquery.cycle2/tsconfig.json similarity index 100% rename from jquery.cycle2/tsconfig.json rename to types/jquery.cycle2/tsconfig.json diff --git a/jquery.dropotron/index.d.ts b/types/jquery.dropotron/index.d.ts similarity index 100% rename from jquery.dropotron/index.d.ts rename to types/jquery.dropotron/index.d.ts diff --git a/jquery.dropotron/jquery.dropotron-tests.ts b/types/jquery.dropotron/jquery.dropotron-tests.ts similarity index 100% rename from jquery.dropotron/jquery.dropotron-tests.ts rename to types/jquery.dropotron/jquery.dropotron-tests.ts diff --git a/jquery.dropotron/tsconfig.json b/types/jquery.dropotron/tsconfig.json similarity index 100% rename from jquery.dropotron/tsconfig.json rename to types/jquery.dropotron/tsconfig.json diff --git a/jquery.dynatree/index.d.ts b/types/jquery.dynatree/index.d.ts similarity index 100% rename from jquery.dynatree/index.d.ts rename to types/jquery.dynatree/index.d.ts diff --git a/jquery.dynatree/jquery.dynatree-tests.ts b/types/jquery.dynatree/jquery.dynatree-tests.ts similarity index 100% rename from jquery.dynatree/jquery.dynatree-tests.ts rename to types/jquery.dynatree/jquery.dynatree-tests.ts diff --git a/jquery.dynatree/tsconfig.json b/types/jquery.dynatree/tsconfig.json similarity index 100% rename from jquery.dynatree/tsconfig.json rename to types/jquery.dynatree/tsconfig.json diff --git a/jquery.elang/index.d.ts b/types/jquery.elang/index.d.ts similarity index 100% rename from jquery.elang/index.d.ts rename to types/jquery.elang/index.d.ts diff --git a/jquery.sortelements/tsconfig.json b/types/jquery.elang/tsconfig.json similarity index 100% rename from jquery.sortelements/tsconfig.json rename to types/jquery.elang/tsconfig.json diff --git a/jquery.fancytree/index.d.ts b/types/jquery.fancytree/index.d.ts similarity index 100% rename from jquery.fancytree/index.d.ts rename to types/jquery.fancytree/index.d.ts diff --git a/jquery.fancytree/jquery.fancytree-tests.ts b/types/jquery.fancytree/jquery.fancytree-tests.ts similarity index 100% rename from jquery.fancytree/jquery.fancytree-tests.ts rename to types/jquery.fancytree/jquery.fancytree-tests.ts diff --git a/jquery.fancytree/tsconfig.json b/types/jquery.fancytree/tsconfig.json similarity index 100% rename from jquery.fancytree/tsconfig.json rename to types/jquery.fancytree/tsconfig.json diff --git a/jquery.fileupload/index.d.ts b/types/jquery.fileupload/index.d.ts similarity index 100% rename from jquery.fileupload/index.d.ts rename to types/jquery.fileupload/index.d.ts diff --git a/jquery.fileupload/jquery.fileupload-tests.ts b/types/jquery.fileupload/jquery.fileupload-tests.ts similarity index 100% rename from jquery.fileupload/jquery.fileupload-tests.ts rename to types/jquery.fileupload/jquery.fileupload-tests.ts diff --git a/jquery.fileupload/tsconfig.json b/types/jquery.fileupload/tsconfig.json similarity index 100% rename from jquery.fileupload/tsconfig.json rename to types/jquery.fileupload/tsconfig.json diff --git a/jquery.finger/index.d.ts b/types/jquery.finger/index.d.ts similarity index 100% rename from jquery.finger/index.d.ts rename to types/jquery.finger/index.d.ts diff --git a/jquery.finger/jquery.finger-tests.ts b/types/jquery.finger/jquery.finger-tests.ts similarity index 100% rename from jquery.finger/jquery.finger-tests.ts rename to types/jquery.finger/jquery.finger-tests.ts diff --git a/jquery.finger/tsconfig.json b/types/jquery.finger/tsconfig.json similarity index 100% rename from jquery.finger/tsconfig.json rename to types/jquery.finger/tsconfig.json diff --git a/jquery.flagstrap/index.d.ts b/types/jquery.flagstrap/index.d.ts similarity index 100% rename from jquery.flagstrap/index.d.ts rename to types/jquery.flagstrap/index.d.ts diff --git a/jquery.flagstrap/jquery.flagstrap-tests.ts b/types/jquery.flagstrap/jquery.flagstrap-tests.ts similarity index 100% rename from jquery.flagstrap/jquery.flagstrap-tests.ts rename to types/jquery.flagstrap/jquery.flagstrap-tests.ts diff --git a/jquery.flagstrap/tsconfig.json b/types/jquery.flagstrap/tsconfig.json similarity index 100% rename from jquery.flagstrap/tsconfig.json rename to types/jquery.flagstrap/tsconfig.json diff --git a/jquery.form/index.d.ts b/types/jquery.form/index.d.ts similarity index 100% rename from jquery.form/index.d.ts rename to types/jquery.form/index.d.ts diff --git a/jquery.form/jquery.form-tests.ts b/types/jquery.form/jquery.form-tests.ts similarity index 100% rename from jquery.form/jquery.form-tests.ts rename to types/jquery.form/jquery.form-tests.ts diff --git a/jquery.form/tsconfig.json b/types/jquery.form/tsconfig.json similarity index 100% rename from jquery.form/tsconfig.json rename to types/jquery.form/tsconfig.json diff --git a/jquery.fullscreen/index.d.ts b/types/jquery.fullscreen/index.d.ts similarity index 100% rename from jquery.fullscreen/index.d.ts rename to types/jquery.fullscreen/index.d.ts diff --git a/jquery.fullscreen/jquery.fullscreen-tests.ts b/types/jquery.fullscreen/jquery.fullscreen-tests.ts similarity index 100% rename from jquery.fullscreen/jquery.fullscreen-tests.ts rename to types/jquery.fullscreen/jquery.fullscreen-tests.ts diff --git a/jquery.fullscreen/tsconfig.json b/types/jquery.fullscreen/tsconfig.json similarity index 100% rename from jquery.fullscreen/tsconfig.json rename to types/jquery.fullscreen/tsconfig.json diff --git a/jquery.gridster/index.d.ts b/types/jquery.gridster/index.d.ts similarity index 100% rename from jquery.gridster/index.d.ts rename to types/jquery.gridster/index.d.ts diff --git a/jquery.gridster/jquery.gridster-tests.ts b/types/jquery.gridster/jquery.gridster-tests.ts similarity index 100% rename from jquery.gridster/jquery.gridster-tests.ts rename to types/jquery.gridster/jquery.gridster-tests.ts diff --git a/jquery.gridster/tsconfig.json b/types/jquery.gridster/tsconfig.json similarity index 100% rename from jquery.gridster/tsconfig.json rename to types/jquery.gridster/tsconfig.json diff --git a/jquery.highlight-bartaz/index.d.ts b/types/jquery.highlight-bartaz/index.d.ts similarity index 100% rename from jquery.highlight-bartaz/index.d.ts rename to types/jquery.highlight-bartaz/index.d.ts diff --git a/jquery.highlight-bartaz/jquery.highlight-bartaz-tests.ts b/types/jquery.highlight-bartaz/jquery.highlight-bartaz-tests.ts similarity index 100% rename from jquery.highlight-bartaz/jquery.highlight-bartaz-tests.ts rename to types/jquery.highlight-bartaz/jquery.highlight-bartaz-tests.ts diff --git a/jquery.highlight-bartaz/tsconfig.json b/types/jquery.highlight-bartaz/tsconfig.json similarity index 100% rename from jquery.highlight-bartaz/tsconfig.json rename to types/jquery.highlight-bartaz/tsconfig.json diff --git a/jquery.jnotify/index.d.ts b/types/jquery.jnotify/index.d.ts similarity index 100% rename from jquery.jnotify/index.d.ts rename to types/jquery.jnotify/index.d.ts diff --git a/jquery.jnotify/jquery.jnotify-tests.ts b/types/jquery.jnotify/jquery.jnotify-tests.ts similarity index 100% rename from jquery.jnotify/jquery.jnotify-tests.ts rename to types/jquery.jnotify/jquery.jnotify-tests.ts diff --git a/jquery.jnotify/tsconfig.json b/types/jquery.jnotify/tsconfig.json similarity index 100% rename from jquery.jnotify/tsconfig.json rename to types/jquery.jnotify/tsconfig.json diff --git a/jquery.joyride/index.d.ts b/types/jquery.joyride/index.d.ts similarity index 100% rename from jquery.joyride/index.d.ts rename to types/jquery.joyride/index.d.ts diff --git a/jquery.joyride/jquery.joyride-tests.ts b/types/jquery.joyride/jquery.joyride-tests.ts similarity index 100% rename from jquery.joyride/jquery.joyride-tests.ts rename to types/jquery.joyride/jquery.joyride-tests.ts diff --git a/jquery.joyride/tsconfig.json b/types/jquery.joyride/tsconfig.json similarity index 100% rename from jquery.joyride/tsconfig.json rename to types/jquery.joyride/tsconfig.json diff --git a/jquery.jsignature/index.d.ts b/types/jquery.jsignature/index.d.ts similarity index 100% rename from jquery.jsignature/index.d.ts rename to types/jquery.jsignature/index.d.ts diff --git a/jquery.jsignature/jquery.jsignature-tests.ts b/types/jquery.jsignature/jquery.jsignature-tests.ts similarity index 100% rename from jquery.jsignature/jquery.jsignature-tests.ts rename to types/jquery.jsignature/jquery.jsignature-tests.ts diff --git a/jquery.jsignature/tsconfig.json b/types/jquery.jsignature/tsconfig.json similarity index 100% rename from jquery.jsignature/tsconfig.json rename to types/jquery.jsignature/tsconfig.json diff --git a/jquery.leanmodal/index.d.ts b/types/jquery.leanmodal/index.d.ts similarity index 100% rename from jquery.leanmodal/index.d.ts rename to types/jquery.leanmodal/index.d.ts diff --git a/jquery.leanmodal/jquery.leanmodal-tests.ts b/types/jquery.leanmodal/jquery.leanmodal-tests.ts similarity index 100% rename from jquery.leanmodal/jquery.leanmodal-tests.ts rename to types/jquery.leanmodal/jquery.leanmodal-tests.ts diff --git a/jquery.leanmodal/tsconfig.json b/types/jquery.leanmodal/tsconfig.json similarity index 100% rename from jquery.leanmodal/tsconfig.json rename to types/jquery.leanmodal/tsconfig.json diff --git a/jquery.livestampjs/index.d.ts b/types/jquery.livestampjs/index.d.ts similarity index 100% rename from jquery.livestampjs/index.d.ts rename to types/jquery.livestampjs/index.d.ts diff --git a/jquery.livestampjs/jquery.livestampjs-tests.ts b/types/jquery.livestampjs/jquery.livestampjs-tests.ts similarity index 100% rename from jquery.livestampjs/jquery.livestampjs-tests.ts rename to types/jquery.livestampjs/jquery.livestampjs-tests.ts diff --git a/jquery.livestampjs/package.json b/types/jquery.livestampjs/package.json similarity index 100% rename from jquery.livestampjs/package.json rename to types/jquery.livestampjs/package.json diff --git a/jquery.livestampjs/tsconfig.json b/types/jquery.livestampjs/tsconfig.json similarity index 100% rename from jquery.livestampjs/tsconfig.json rename to types/jquery.livestampjs/tsconfig.json diff --git a/jquery.menuaim/index.d.ts b/types/jquery.menuaim/index.d.ts similarity index 100% rename from jquery.menuaim/index.d.ts rename to types/jquery.menuaim/index.d.ts diff --git a/jquery.menuaim/jquery.menuaim-tests.ts b/types/jquery.menuaim/jquery.menuaim-tests.ts similarity index 100% rename from jquery.menuaim/jquery.menuaim-tests.ts rename to types/jquery.menuaim/jquery.menuaim-tests.ts diff --git a/jquery.menuaim/tsconfig.json b/types/jquery.menuaim/tsconfig.json similarity index 100% rename from jquery.menuaim/tsconfig.json rename to types/jquery.menuaim/tsconfig.json diff --git a/jquery.mmenu/index.d.ts b/types/jquery.mmenu/index.d.ts similarity index 100% rename from jquery.mmenu/index.d.ts rename to types/jquery.mmenu/index.d.ts diff --git a/jquery.mmenu/jquery.mmenu-tests.ts b/types/jquery.mmenu/jquery.mmenu-tests.ts similarity index 100% rename from jquery.mmenu/jquery.mmenu-tests.ts rename to types/jquery.mmenu/jquery.mmenu-tests.ts diff --git a/jquery.mmenu/tsconfig.json b/types/jquery.mmenu/tsconfig.json similarity index 100% rename from jquery.mmenu/tsconfig.json rename to types/jquery.mmenu/tsconfig.json diff --git a/jquery.notifybar/index.d.ts b/types/jquery.notifybar/index.d.ts similarity index 100% rename from jquery.notifybar/index.d.ts rename to types/jquery.notifybar/index.d.ts diff --git a/jquery.notifybar/jquery.notifybar-tests.ts b/types/jquery.notifybar/jquery.notifybar-tests.ts similarity index 100% rename from jquery.notifybar/jquery.notifybar-tests.ts rename to types/jquery.notifybar/jquery.notifybar-tests.ts diff --git a/jquery.notifybar/tsconfig.json b/types/jquery.notifybar/tsconfig.json similarity index 100% rename from jquery.notifybar/tsconfig.json rename to types/jquery.notifybar/tsconfig.json diff --git a/jquery.noty/index.d.ts b/types/jquery.noty/index.d.ts similarity index 100% rename from jquery.noty/index.d.ts rename to types/jquery.noty/index.d.ts diff --git a/jquery.noty/tsconfig.json b/types/jquery.noty/tsconfig.json similarity index 100% rename from jquery.noty/tsconfig.json rename to types/jquery.noty/tsconfig.json diff --git a/jquery.payment/index.d.ts b/types/jquery.payment/index.d.ts similarity index 100% rename from jquery.payment/index.d.ts rename to types/jquery.payment/index.d.ts diff --git a/jquery.payment/jquery.payment-tests.ts b/types/jquery.payment/jquery.payment-tests.ts similarity index 100% rename from jquery.payment/jquery.payment-tests.ts rename to types/jquery.payment/jquery.payment-tests.ts diff --git a/jquery.payment/tsconfig.json b/types/jquery.payment/tsconfig.json similarity index 100% rename from jquery.payment/tsconfig.json rename to types/jquery.payment/tsconfig.json diff --git a/jquery.pjax.falsandtru/index.d.ts b/types/jquery.pjax.falsandtru/index.d.ts similarity index 100% rename from jquery.pjax.falsandtru/index.d.ts rename to types/jquery.pjax.falsandtru/index.d.ts diff --git a/jquery.pjax.falsandtru/jquery.pjax.falsandtru-tests.ts b/types/jquery.pjax.falsandtru/jquery.pjax.falsandtru-tests.ts similarity index 100% rename from jquery.pjax.falsandtru/jquery.pjax.falsandtru-tests.ts rename to types/jquery.pjax.falsandtru/jquery.pjax.falsandtru-tests.ts diff --git a/jquery.pjax.falsandtru/tsconfig.json b/types/jquery.pjax.falsandtru/tsconfig.json similarity index 100% rename from jquery.pjax.falsandtru/tsconfig.json rename to types/jquery.pjax.falsandtru/tsconfig.json diff --git a/jquery.pjax/index.d.ts b/types/jquery.pjax/index.d.ts similarity index 100% rename from jquery.pjax/index.d.ts rename to types/jquery.pjax/index.d.ts diff --git a/jquery.pjax/jquery.pjax-tests.ts b/types/jquery.pjax/jquery.pjax-tests.ts similarity index 100% rename from jquery.pjax/jquery.pjax-tests.ts rename to types/jquery.pjax/jquery.pjax-tests.ts diff --git a/jquery.pjax/tsconfig.json b/types/jquery.pjax/tsconfig.json similarity index 100% rename from jquery.pjax/tsconfig.json rename to types/jquery.pjax/tsconfig.json diff --git a/jquery.placeholder/index.d.ts b/types/jquery.placeholder/index.d.ts similarity index 100% rename from jquery.placeholder/index.d.ts rename to types/jquery.placeholder/index.d.ts diff --git a/jquery.placeholder/jquery.placeholder-tests.ts b/types/jquery.placeholder/jquery.placeholder-tests.ts similarity index 100% rename from jquery.placeholder/jquery.placeholder-tests.ts rename to types/jquery.placeholder/jquery.placeholder-tests.ts diff --git a/jquery.placeholder/tsconfig.json b/types/jquery.placeholder/tsconfig.json similarity index 100% rename from jquery.placeholder/tsconfig.json rename to types/jquery.placeholder/tsconfig.json diff --git a/jquery.pnotify/index.d.ts b/types/jquery.pnotify/index.d.ts similarity index 100% rename from jquery.pnotify/index.d.ts rename to types/jquery.pnotify/index.d.ts diff --git a/jquery.pnotify/jquery.pnotify-tests.ts b/types/jquery.pnotify/jquery.pnotify-tests.ts similarity index 100% rename from jquery.pnotify/jquery.pnotify-tests.ts rename to types/jquery.pnotify/jquery.pnotify-tests.ts diff --git a/jquery.pnotify/tsconfig.json b/types/jquery.pnotify/tsconfig.json similarity index 100% rename from jquery.pnotify/tsconfig.json rename to types/jquery.pnotify/tsconfig.json diff --git a/jquery.postmessage/index.d.ts b/types/jquery.postmessage/index.d.ts similarity index 100% rename from jquery.postmessage/index.d.ts rename to types/jquery.postmessage/index.d.ts diff --git a/jquery.postmessage/jquery.postmessage-tests.ts b/types/jquery.postmessage/jquery.postmessage-tests.ts similarity index 100% rename from jquery.postmessage/jquery.postmessage-tests.ts rename to types/jquery.postmessage/jquery.postmessage-tests.ts diff --git a/jquery.postmessage/tsconfig.json b/types/jquery.postmessage/tsconfig.json similarity index 100% rename from jquery.postmessage/tsconfig.json rename to types/jquery.postmessage/tsconfig.json diff --git a/jquery.prettyphoto/index.d.ts b/types/jquery.prettyphoto/index.d.ts similarity index 100% rename from jquery.prettyphoto/index.d.ts rename to types/jquery.prettyphoto/index.d.ts diff --git a/jquery.prettyphoto/jquery.prettyphoto-tests.ts b/types/jquery.prettyphoto/jquery.prettyphoto-tests.ts similarity index 100% rename from jquery.prettyphoto/jquery.prettyphoto-tests.ts rename to types/jquery.prettyphoto/jquery.prettyphoto-tests.ts diff --git a/jquery.prettyphoto/tsconfig.json b/types/jquery.prettyphoto/tsconfig.json similarity index 100% rename from jquery.prettyphoto/tsconfig.json rename to types/jquery.prettyphoto/tsconfig.json diff --git a/jquery.qrcode/index.d.ts b/types/jquery.qrcode/index.d.ts similarity index 100% rename from jquery.qrcode/index.d.ts rename to types/jquery.qrcode/index.d.ts diff --git a/jquery.qrcode/jquery.qrcode-tests.ts b/types/jquery.qrcode/jquery.qrcode-tests.ts similarity index 100% rename from jquery.qrcode/jquery.qrcode-tests.ts rename to types/jquery.qrcode/jquery.qrcode-tests.ts diff --git a/jquery.qrcode/tsconfig.json b/types/jquery.qrcode/tsconfig.json similarity index 100% rename from jquery.qrcode/tsconfig.json rename to types/jquery.qrcode/tsconfig.json diff --git a/jquery.rateit/index.d.ts b/types/jquery.rateit/index.d.ts similarity index 100% rename from jquery.rateit/index.d.ts rename to types/jquery.rateit/index.d.ts diff --git a/jquery.rateit/jquery.rateit-tests.ts b/types/jquery.rateit/jquery.rateit-tests.ts similarity index 100% rename from jquery.rateit/jquery.rateit-tests.ts rename to types/jquery.rateit/jquery.rateit-tests.ts diff --git a/jquery.rateit/tsconfig.json b/types/jquery.rateit/tsconfig.json similarity index 100% rename from jquery.rateit/tsconfig.json rename to types/jquery.rateit/tsconfig.json diff --git a/jquery.rowgrid/index.d.ts b/types/jquery.rowgrid/index.d.ts similarity index 100% rename from jquery.rowgrid/index.d.ts rename to types/jquery.rowgrid/index.d.ts diff --git a/jquery.rowgrid/jquery.rowgrid-tests.ts b/types/jquery.rowgrid/jquery.rowgrid-tests.ts similarity index 100% rename from jquery.rowgrid/jquery.rowgrid-tests.ts rename to types/jquery.rowgrid/jquery.rowgrid-tests.ts diff --git a/jquery.rowgrid/tsconfig.json b/types/jquery.rowgrid/tsconfig.json similarity index 100% rename from jquery.rowgrid/tsconfig.json rename to types/jquery.rowgrid/tsconfig.json diff --git a/jquery.scrollto/index.d.ts b/types/jquery.scrollto/index.d.ts similarity index 100% rename from jquery.scrollto/index.d.ts rename to types/jquery.scrollto/index.d.ts diff --git a/jquery.scrollto/jquery.scrollto-tests.ts b/types/jquery.scrollto/jquery.scrollto-tests.ts similarity index 100% rename from jquery.scrollto/jquery.scrollto-tests.ts rename to types/jquery.scrollto/jquery.scrollto-tests.ts diff --git a/jquery.scrollto/tsconfig.json b/types/jquery.scrollto/tsconfig.json similarity index 100% rename from jquery.scrollto/tsconfig.json rename to types/jquery.scrollto/tsconfig.json diff --git a/jquery.simplemodal/index.d.ts b/types/jquery.simplemodal/index.d.ts similarity index 100% rename from jquery.simplemodal/index.d.ts rename to types/jquery.simplemodal/index.d.ts diff --git a/jquery.simplemodal/jquery.simplemodal-tests.ts b/types/jquery.simplemodal/jquery.simplemodal-tests.ts similarity index 100% rename from jquery.simplemodal/jquery.simplemodal-tests.ts rename to types/jquery.simplemodal/jquery.simplemodal-tests.ts diff --git a/jquery.simplemodal/tsconfig.json b/types/jquery.simplemodal/tsconfig.json similarity index 100% rename from jquery.simplemodal/tsconfig.json rename to types/jquery.simplemodal/tsconfig.json diff --git a/jquery.simplepagination/index.d.ts b/types/jquery.simplepagination/index.d.ts similarity index 100% rename from jquery.simplepagination/index.d.ts rename to types/jquery.simplepagination/index.d.ts diff --git a/jquery.simplepagination/jquery.simplepagination-tests.ts b/types/jquery.simplepagination/jquery.simplepagination-tests.ts similarity index 100% rename from jquery.simplepagination/jquery.simplepagination-tests.ts rename to types/jquery.simplepagination/jquery.simplepagination-tests.ts diff --git a/jquery.simplepagination/tsconfig.json b/types/jquery.simplepagination/tsconfig.json similarity index 100% rename from jquery.simplepagination/tsconfig.json rename to types/jquery.simplepagination/tsconfig.json diff --git a/jquery.simulate/index.d.ts b/types/jquery.simulate/index.d.ts similarity index 100% rename from jquery.simulate/index.d.ts rename to types/jquery.simulate/index.d.ts diff --git a/jquery.simulate/jquery.simulate-tests.ts b/types/jquery.simulate/jquery.simulate-tests.ts similarity index 100% rename from jquery.simulate/jquery.simulate-tests.ts rename to types/jquery.simulate/jquery.simulate-tests.ts diff --git a/jquery.simulate/tsconfig.json b/types/jquery.simulate/tsconfig.json similarity index 100% rename from jquery.simulate/tsconfig.json rename to types/jquery.simulate/tsconfig.json diff --git a/jquery.slimscroll/index.d.ts b/types/jquery.slimscroll/index.d.ts similarity index 100% rename from jquery.slimscroll/index.d.ts rename to types/jquery.slimscroll/index.d.ts diff --git a/jquery.slimscroll/jquery.slimscroll-tests.ts b/types/jquery.slimscroll/jquery.slimscroll-tests.ts similarity index 100% rename from jquery.slimscroll/jquery.slimscroll-tests.ts rename to types/jquery.slimscroll/jquery.slimscroll-tests.ts diff --git a/jquery.slimscroll/tsconfig.json b/types/jquery.slimscroll/tsconfig.json similarity index 100% rename from jquery.slimscroll/tsconfig.json rename to types/jquery.slimscroll/tsconfig.json diff --git a/jquery.soap/index.d.ts b/types/jquery.soap/index.d.ts similarity index 100% rename from jquery.soap/index.d.ts rename to types/jquery.soap/index.d.ts diff --git a/jquery.soap/jquery.soap-tests.ts b/types/jquery.soap/jquery.soap-tests.ts similarity index 100% rename from jquery.soap/jquery.soap-tests.ts rename to types/jquery.soap/jquery.soap-tests.ts diff --git a/jquery.soap/tsconfig.json b/types/jquery.soap/tsconfig.json similarity index 100% rename from jquery.soap/tsconfig.json rename to types/jquery.soap/tsconfig.json diff --git a/jquery.sortelements/index.d.ts b/types/jquery.sortelements/index.d.ts similarity index 100% rename from jquery.sortelements/index.d.ts rename to types/jquery.sortelements/index.d.ts diff --git a/jquery.superlink/tsconfig.json b/types/jquery.sortelements/tsconfig.json similarity index 100% rename from jquery.superlink/tsconfig.json rename to types/jquery.sortelements/tsconfig.json diff --git a/jquery.superlink/index.d.ts b/types/jquery.superlink/index.d.ts similarity index 100% rename from jquery.superlink/index.d.ts rename to types/jquery.superlink/index.d.ts diff --git a/jquery.ui.layout/tsconfig.json b/types/jquery.superlink/tsconfig.json similarity index 100% rename from jquery.ui.layout/tsconfig.json rename to types/jquery.superlink/tsconfig.json diff --git a/jquery.tagsmanager/index.d.ts b/types/jquery.tagsmanager/index.d.ts similarity index 100% rename from jquery.tagsmanager/index.d.ts rename to types/jquery.tagsmanager/index.d.ts diff --git a/jquery.tagsmanager/jquery.tagsmanager-tests.ts b/types/jquery.tagsmanager/jquery.tagsmanager-tests.ts similarity index 100% rename from jquery.tagsmanager/jquery.tagsmanager-tests.ts rename to types/jquery.tagsmanager/jquery.tagsmanager-tests.ts diff --git a/jquery.tagsmanager/tsconfig.json b/types/jquery.tagsmanager/tsconfig.json similarity index 100% rename from jquery.tagsmanager/tsconfig.json rename to types/jquery.tagsmanager/tsconfig.json diff --git a/jquery.tile/index.d.ts b/types/jquery.tile/index.d.ts similarity index 100% rename from jquery.tile/index.d.ts rename to types/jquery.tile/index.d.ts diff --git a/jquery.tile/jquery.tile-tests.ts b/types/jquery.tile/jquery.tile-tests.ts similarity index 100% rename from jquery.tile/jquery.tile-tests.ts rename to types/jquery.tile/jquery.tile-tests.ts diff --git a/jquery.tile/tsconfig.json b/types/jquery.tile/tsconfig.json similarity index 100% rename from jquery.tile/tsconfig.json rename to types/jquery.tile/tsconfig.json diff --git a/jquery.timeago/index.d.ts b/types/jquery.timeago/index.d.ts similarity index 100% rename from jquery.timeago/index.d.ts rename to types/jquery.timeago/index.d.ts diff --git a/jquery.timeago/jquery.timeago-tests.ts b/types/jquery.timeago/jquery.timeago-tests.ts similarity index 100% rename from jquery.timeago/jquery.timeago-tests.ts rename to types/jquery.timeago/jquery.timeago-tests.ts diff --git a/jquery.timeago/tsconfig.json b/types/jquery.timeago/tsconfig.json similarity index 100% rename from jquery.timeago/tsconfig.json rename to types/jquery.timeago/tsconfig.json diff --git a/jquery.timepicker/index.d.ts b/types/jquery.timepicker/index.d.ts similarity index 100% rename from jquery.timepicker/index.d.ts rename to types/jquery.timepicker/index.d.ts diff --git a/jquery.timepicker/jquery.timepicker-tests.ts b/types/jquery.timepicker/jquery.timepicker-tests.ts similarity index 100% rename from jquery.timepicker/jquery.timepicker-tests.ts rename to types/jquery.timepicker/jquery.timepicker-tests.ts diff --git a/jquery.timepicker/tsconfig.json b/types/jquery.timepicker/tsconfig.json similarity index 100% rename from jquery.timepicker/tsconfig.json rename to types/jquery.timepicker/tsconfig.json diff --git a/jquery.timer/index.d.ts b/types/jquery.timer/index.d.ts similarity index 100% rename from jquery.timer/index.d.ts rename to types/jquery.timer/index.d.ts diff --git a/jquery.timer/jquery.timer-tests.ts b/types/jquery.timer/jquery.timer-tests.ts similarity index 100% rename from jquery.timer/jquery.timer-tests.ts rename to types/jquery.timer/jquery.timer-tests.ts diff --git a/jquery.timer/tsconfig.json b/types/jquery.timer/tsconfig.json similarity index 100% rename from jquery.timer/tsconfig.json rename to types/jquery.timer/tsconfig.json diff --git a/jquery.tinycarousel/index.d.ts b/types/jquery.tinycarousel/index.d.ts similarity index 100% rename from jquery.tinycarousel/index.d.ts rename to types/jquery.tinycarousel/index.d.ts diff --git a/jquery.tinycarousel/jquery.tinycarousel-tests.ts b/types/jquery.tinycarousel/jquery.tinycarousel-tests.ts similarity index 100% rename from jquery.tinycarousel/jquery.tinycarousel-tests.ts rename to types/jquery.tinycarousel/jquery.tinycarousel-tests.ts diff --git a/jquery.tinycarousel/tsconfig.json b/types/jquery.tinycarousel/tsconfig.json similarity index 100% rename from jquery.tinycarousel/tsconfig.json rename to types/jquery.tinycarousel/tsconfig.json diff --git a/jquery.tinyscrollbar/index.d.ts b/types/jquery.tinyscrollbar/index.d.ts similarity index 100% rename from jquery.tinyscrollbar/index.d.ts rename to types/jquery.tinyscrollbar/index.d.ts diff --git a/jquery.tinyscrollbar/jquery.tinyscrollbar-tests.ts b/types/jquery.tinyscrollbar/jquery.tinyscrollbar-tests.ts similarity index 100% rename from jquery.tinyscrollbar/jquery.tinyscrollbar-tests.ts rename to types/jquery.tinyscrollbar/jquery.tinyscrollbar-tests.ts diff --git a/jquery.tinyscrollbar/tsconfig.json b/types/jquery.tinyscrollbar/tsconfig.json similarity index 100% rename from jquery.tinyscrollbar/tsconfig.json rename to types/jquery.tinyscrollbar/tsconfig.json diff --git a/jquery.tipsy/index.d.ts b/types/jquery.tipsy/index.d.ts similarity index 100% rename from jquery.tipsy/index.d.ts rename to types/jquery.tipsy/index.d.ts diff --git a/jquery.tipsy/jquery.tipsy-tests.ts b/types/jquery.tipsy/jquery.tipsy-tests.ts similarity index 100% rename from jquery.tipsy/jquery.tipsy-tests.ts rename to types/jquery.tipsy/jquery.tipsy-tests.ts diff --git a/jquery.tipsy/tsconfig.json b/types/jquery.tipsy/tsconfig.json similarity index 100% rename from jquery.tipsy/tsconfig.json rename to types/jquery.tipsy/tsconfig.json diff --git a/jquery.tools/index.d.ts b/types/jquery.tools/index.d.ts similarity index 99% rename from jquery.tools/index.d.ts rename to types/jquery.tools/index.d.ts index e511a961fd..fa1bc80cb4 100644 --- a/jquery.tools/index.d.ts +++ b/types/jquery.tools/index.d.ts @@ -3,16 +3,15 @@ // Definitions by: Joe Skeen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - /// -declare interface JQuery { +interface JQuery { overlay(opts?: JQueryTools.overlay.OverlayOptions): JQuery; overlay(opts?: JQueryTools.overlay.OverlayOptions): T; data(key: 'overlay'): JQueryTools.overlay.Overlay; } -declare interface JQueryStatic { +interface JQueryStatic { tools: JQueryTools.ToolsStatic; } diff --git a/jquery.tools/jquery.tools-tests.ts b/types/jquery.tools/jquery.tools-tests.ts similarity index 92% rename from jquery.tools/jquery.tools-tests.ts rename to types/jquery.tools/jquery.tools-tests.ts index 443425e76b..5092b49bff 100644 --- a/jquery.tools/jquery.tools-tests.ts +++ b/types/jquery.tools/jquery.tools-tests.ts @@ -2,7 +2,7 @@ $("img[rel]").overlay(); - var triggers = $(".modalInput").overlay({ + const triggers = $(".modalInput").overlay({   // some mask tweaks suitable for modal dialogs mask: { @@ -14,10 +14,10 @@ closeOnClick: false }); - var buttons = $("#yesno button").click(function(this: JQuery, e: JQueryEventObject) { + const buttons = $("#yesno button").click(function(this: JQuery, e: JQueryEventObject) {   // get user input - var yes = buttons.index(this) === 0; + const yes = buttons.index(this) === 0;   // do something with the answer triggers.eq(0).html("You clicked " + (yes ? "yes" : "no")); @@ -42,7 +42,7 @@ $("#prompt form").submit(function(this: JQuery, e: JQueryEventObject) { triggers.data('overlay').close();   // get user input - var input = $("input", this).val(); + const input = $("input", this).val();   // do something with the answer triggers.eq(1).html(input); @@ -101,7 +101,7 @@ $(function() {   onBeforeLoad() { // grab wrapper element inside content - var wrap = this.getOverlay().find(".contentWrap"); + const wrap = this.getOverlay().find(".contentWrap");   // load the page specified in the trigger wrap.load(this.getTrigger().attr("href")); @@ -112,7 +112,7 @@ $(function() { $(() => { // positions for each overlay - var positions = [ + const positions = [ [0, 530], [400, 20], [400, 530], @@ -143,7 +143,7 @@ $(() => { $.tools.overlay.addEffect("drop", function(css, done) {   // use Overlay API to gain access to crucial elements - var conf = this.getConf(), + const conf = this.getConf(), overlay = this.getOverlay();   // determine initial position for the overlay diff --git a/jquery.tools/tsconfig.json b/types/jquery.tools/tsconfig.json similarity index 100% rename from jquery.tools/tsconfig.json rename to types/jquery.tools/tsconfig.json diff --git a/jquery.tools/tslint.json b/types/jquery.tools/tslint.json similarity index 100% rename from jquery.tools/tslint.json rename to types/jquery.tools/tslint.json diff --git a/jquery.tooltipster/index.d.ts b/types/jquery.tooltipster/index.d.ts similarity index 100% rename from jquery.tooltipster/index.d.ts rename to types/jquery.tooltipster/index.d.ts diff --git a/jquery.tooltipster/jquery.tooltipster-tests.ts b/types/jquery.tooltipster/jquery.tooltipster-tests.ts similarity index 100% rename from jquery.tooltipster/jquery.tooltipster-tests.ts rename to types/jquery.tooltipster/jquery.tooltipster-tests.ts diff --git a/jquery.tooltipster/tsconfig.json b/types/jquery.tooltipster/tsconfig.json similarity index 100% rename from jquery.tooltipster/tsconfig.json rename to types/jquery.tooltipster/tsconfig.json diff --git a/jquery.total-storage/index.d.ts b/types/jquery.total-storage/index.d.ts similarity index 100% rename from jquery.total-storage/index.d.ts rename to types/jquery.total-storage/index.d.ts diff --git a/jquery.total-storage/jquery.total-storage-tests.ts b/types/jquery.total-storage/jquery.total-storage-tests.ts similarity index 100% rename from jquery.total-storage/jquery.total-storage-tests.ts rename to types/jquery.total-storage/jquery.total-storage-tests.ts diff --git a/jquery.total-storage/tsconfig.json b/types/jquery.total-storage/tsconfig.json similarity index 100% rename from jquery.total-storage/tsconfig.json rename to types/jquery.total-storage/tsconfig.json diff --git a/jquery.transit/index.d.ts b/types/jquery.transit/index.d.ts similarity index 100% rename from jquery.transit/index.d.ts rename to types/jquery.transit/index.d.ts diff --git a/jquery.transit/jquery.transit-tests.ts b/types/jquery.transit/jquery.transit-tests.ts similarity index 100% rename from jquery.transit/jquery.transit-tests.ts rename to types/jquery.transit/jquery.transit-tests.ts diff --git a/jquery.transit/tsconfig.json b/types/jquery.transit/tsconfig.json similarity index 100% rename from jquery.transit/tsconfig.json rename to types/jquery.transit/tsconfig.json diff --git a/jquery.ui.datetimepicker/index.d.ts b/types/jquery.ui.datetimepicker/index.d.ts similarity index 100% rename from jquery.ui.datetimepicker/index.d.ts rename to types/jquery.ui.datetimepicker/index.d.ts diff --git a/jquery.ui.datetimepicker/jquery.ui.datetimepicker-tests.ts b/types/jquery.ui.datetimepicker/jquery.ui.datetimepicker-tests.ts similarity index 100% rename from jquery.ui.datetimepicker/jquery.ui.datetimepicker-tests.ts rename to types/jquery.ui.datetimepicker/jquery.ui.datetimepicker-tests.ts diff --git a/jquery.ui.datetimepicker/tsconfig.json b/types/jquery.ui.datetimepicker/tsconfig.json similarity index 100% rename from jquery.ui.datetimepicker/tsconfig.json rename to types/jquery.ui.datetimepicker/tsconfig.json diff --git a/jquery.ui.layout/index.d.ts b/types/jquery.ui.layout/index.d.ts similarity index 100% rename from jquery.ui.layout/index.d.ts rename to types/jquery.ui.layout/index.d.ts diff --git a/jscrollpane/tsconfig.json b/types/jquery.ui.layout/tsconfig.json similarity index 100% rename from jscrollpane/tsconfig.json rename to types/jquery.ui.layout/tsconfig.json diff --git a/jquery.uniform/index.d.ts b/types/jquery.uniform/index.d.ts similarity index 100% rename from jquery.uniform/index.d.ts rename to types/jquery.uniform/index.d.ts diff --git a/jquery.uniform/jquery.uniform-tests.ts b/types/jquery.uniform/jquery.uniform-tests.ts similarity index 100% rename from jquery.uniform/jquery.uniform-tests.ts rename to types/jquery.uniform/jquery.uniform-tests.ts diff --git a/jquery.uniform/tsconfig.json b/types/jquery.uniform/tsconfig.json similarity index 100% rename from jquery.uniform/tsconfig.json rename to types/jquery.uniform/tsconfig.json diff --git a/jquery.validation/index.d.ts b/types/jquery.validation/index.d.ts similarity index 71% rename from jquery.validation/index.d.ts rename to types/jquery.validation/index.d.ts index 2bb690c07e..bbe55f2c93 100644 --- a/jquery.validation/index.d.ts +++ b/types/jquery.validation/index.d.ts @@ -1,22 +1,23 @@ -// 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 { type RulesDictionary = { [name: string]: any }; - type ShouldValidatePredicate = boolean|((element: HTMLElement, event: JQueryEventObject) => void); + type ValidatePredicate = ((element: HTMLElement, event: JQueryEventObject) => void); + + type ShouldValidatePredicate = boolean|ValidatePredicate; 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 +33,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" */ @@ -48,19 +50,23 @@ declare namespace JQueryValidation */ 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 }; /** @@ -70,21 +76,28 @@ declare namespace JQueryValidation */ 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; /** - * 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 +110,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 +124,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,21 +140,30 @@ 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; /** - * 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; /** - * 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. * @@ -182,20 +211,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. * @@ -263,34 +285,25 @@ interface JQuery * @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. - * - * @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" + * 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" 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. */ diff --git a/jquery.validation/jquery.validation-tests.ts b/types/jquery.validation/jquery.validation-tests.ts similarity index 85% rename from jquery.validation/jquery.validation-tests.ts rename to types/jquery.validation/jquery.validation-tests.ts index 68062d6e1c..8d73db97d5 100644 --- a/jquery.validation/jquery.validation-tests.ts +++ b/types/jquery.validation/jquery.validation-tests.ts @@ -6,12 +6,12 @@ function test_validate() { debug: true }); $(".selector").validate({ - submitHandler: function (form) { + submitHandler: (form) => { $(form).ajaxSubmit(); } }); $(".selector").validate({ - invalidHandler: function (form, validator) { + invalidHandler: (form, validator) => { var errors = validator.numberOfInvalids(); if (errors) { var message = errors == 1 @@ -54,7 +54,7 @@ function test_validate() { groups: { username: "fname lname" }, - errorPlacement: function (error, element) { + errorPlacement: (error, element) => { if (element.attr("name") == "fname" || element.attr("name") == "lname") error.insertAfter("#lastname"); @@ -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) { + 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) => { return 2; } }); } function test_methods() { $("#myform").validate(); - $("a.check").click(function () { + $("a.check").click(() => { alert("Valid: " + $("#myform").valid()); return false; }); @@ -201,7 +204,7 @@ function test_methods() { minlength: jQuery.format("Please, at least {0} characters are necessary") } }); - $("#skip").click(function () { + $("#skip").click(() => { var rules = $("#myinput").removeAttrs("min max"); $("#myform").submit(); $("#myinput").attr(rules); diff --git a/jquery.validation/tsconfig.json b/types/jquery.validation/tsconfig.json similarity index 100% rename from jquery.validation/tsconfig.json rename to types/jquery.validation/tsconfig.json diff --git a/jui-grid/tslint.json b/types/jquery.validation/tslint.json similarity index 100% rename from jui-grid/tslint.json rename to types/jquery.validation/tslint.json diff --git a/jquery.watermark/index.d.ts b/types/jquery.watermark/index.d.ts similarity index 100% rename from jquery.watermark/index.d.ts rename to types/jquery.watermark/index.d.ts diff --git a/jquery.watermark/jquery.watermark-tests.ts b/types/jquery.watermark/jquery.watermark-tests.ts similarity index 100% rename from jquery.watermark/jquery.watermark-tests.ts rename to types/jquery.watermark/jquery.watermark-tests.ts diff --git a/jquery.watermark/tsconfig.json b/types/jquery.watermark/tsconfig.json similarity index 100% rename from jquery.watermark/tsconfig.json rename to types/jquery.watermark/tsconfig.json diff --git a/jquery.window/index.d.ts b/types/jquery.window/index.d.ts similarity index 100% rename from jquery.window/index.d.ts rename to types/jquery.window/index.d.ts diff --git a/jquery.window/jquery.window-tests.ts b/types/jquery.window/jquery.window-tests.ts similarity index 100% rename from jquery.window/jquery.window-tests.ts rename to types/jquery.window/jquery.window-tests.ts diff --git a/jquery.window/tsconfig.json b/types/jquery.window/tsconfig.json similarity index 100% rename from jquery.window/tsconfig.json rename to types/jquery.window/tsconfig.json diff --git a/jquery/index.d.ts b/types/jquery/index.d.ts similarity index 100% rename from jquery/index.d.ts rename to types/jquery/index.d.ts diff --git a/jquery/jquery-tests.ts b/types/jquery/jquery-tests.ts similarity index 100% rename from jquery/jquery-tests.ts rename to types/jquery/jquery-tests.ts diff --git a/jquery/tsconfig.json b/types/jquery/tsconfig.json similarity index 100% rename from jquery/tsconfig.json rename to types/jquery/tsconfig.json diff --git a/jquerymobile/index.d.ts b/types/jquerymobile/index.d.ts similarity index 100% rename from jquerymobile/index.d.ts rename to types/jquerymobile/index.d.ts diff --git a/jquerymobile/jquerymobile-tests.ts b/types/jquerymobile/jquerymobile-tests.ts similarity index 100% rename from jquerymobile/jquerymobile-tests.ts rename to types/jquerymobile/jquerymobile-tests.ts diff --git a/jquerymobile/tsconfig.json b/types/jquerymobile/tsconfig.json similarity index 100% rename from jquerymobile/tsconfig.json rename to types/jquerymobile/tsconfig.json diff --git a/jqueryui/index.d.ts b/types/jqueryui/index.d.ts similarity index 100% rename from jqueryui/index.d.ts rename to types/jqueryui/index.d.ts diff --git a/jqueryui/jqueryui-tests.ts b/types/jqueryui/jqueryui-tests.ts similarity index 100% rename from jqueryui/jqueryui-tests.ts rename to types/jqueryui/jqueryui-tests.ts diff --git a/jqueryui/tsconfig.json b/types/jqueryui/tsconfig.json similarity index 100% rename from jqueryui/tsconfig.json rename to types/jqueryui/tsconfig.json diff --git a/js-base64/index.d.ts b/types/js-base64/index.d.ts similarity index 100% rename from js-base64/index.d.ts rename to types/js-base64/index.d.ts diff --git a/js-base64/js-base64-tests.ts b/types/js-base64/js-base64-tests.ts similarity index 100% rename from js-base64/js-base64-tests.ts rename to types/js-base64/js-base64-tests.ts diff --git a/js-base64/tsconfig.json b/types/js-base64/tsconfig.json similarity index 100% rename from js-base64/tsconfig.json rename to types/js-base64/tsconfig.json diff --git a/js-beautify/index.d.ts b/types/js-beautify/index.d.ts similarity index 97% rename from js-beautify/index.d.ts rename to types/js-beautify/index.d.ts index ea67ddbad2..47fdd8292e 100644 --- a/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/js-beautify/js-beautify-tests.ts b/types/js-beautify/js-beautify-tests.ts similarity index 100% rename from js-beautify/js-beautify-tests.ts rename to types/js-beautify/js-beautify-tests.ts diff --git a/js-beautify/tsconfig.json b/types/js-beautify/tsconfig.json similarity index 100% rename from js-beautify/tsconfig.json rename to types/js-beautify/tsconfig.json diff --git a/js-clipper/index.d.ts b/types/js-clipper/index.d.ts similarity index 100% rename from js-clipper/index.d.ts rename to types/js-clipper/index.d.ts diff --git a/js-clipper/js-clipper-tests.ts b/types/js-clipper/js-clipper-tests.ts similarity index 100% rename from js-clipper/js-clipper-tests.ts rename to types/js-clipper/js-clipper-tests.ts diff --git a/js-clipper/tsconfig.json b/types/js-clipper/tsconfig.json similarity index 100% rename from js-clipper/tsconfig.json rename to types/js-clipper/tsconfig.json diff --git a/js-combinatorics/index.d.ts b/types/js-combinatorics/index.d.ts similarity index 100% rename from js-combinatorics/index.d.ts rename to types/js-combinatorics/index.d.ts diff --git a/js-combinatorics/js-combinatorics-tests.ts b/types/js-combinatorics/js-combinatorics-tests.ts similarity index 100% rename from js-combinatorics/js-combinatorics-tests.ts rename to types/js-combinatorics/js-combinatorics-tests.ts diff --git a/js-combinatorics/tsconfig.json b/types/js-combinatorics/tsconfig.json similarity index 100% rename from js-combinatorics/tsconfig.json rename to types/js-combinatorics/tsconfig.json diff --git a/js-cookie/index.d.ts b/types/js-cookie/index.d.ts similarity index 100% rename from js-cookie/index.d.ts rename to types/js-cookie/index.d.ts diff --git a/js-cookie/js-cookie-tests.ts b/types/js-cookie/js-cookie-tests.ts similarity index 100% rename from js-cookie/js-cookie-tests.ts rename to types/js-cookie/js-cookie-tests.ts diff --git a/js-cookie/tsconfig.json b/types/js-cookie/tsconfig.json similarity index 100% rename from js-cookie/tsconfig.json rename to types/js-cookie/tsconfig.json diff --git a/js-data-angular/index.d.ts b/types/js-data-angular/index.d.ts similarity index 100% rename from js-data-angular/index.d.ts rename to types/js-data-angular/index.d.ts diff --git a/js-data-angular/js-data-angular-tests.ts b/types/js-data-angular/js-data-angular-tests.ts similarity index 100% rename from js-data-angular/js-data-angular-tests.ts rename to types/js-data-angular/js-data-angular-tests.ts diff --git a/js-data-angular/tsconfig.json b/types/js-data-angular/tsconfig.json similarity index 100% rename from js-data-angular/tsconfig.json rename to types/js-data-angular/tsconfig.json diff --git a/js-data-http/index.d.ts b/types/js-data-http/index.d.ts similarity index 98% rename from js-data-http/index.d.ts rename to types/js-data-http/index.d.ts index 2fa9c0e09a..2a2fafcedb 100644 --- a/js-data-http/index.d.ts +++ b/types/js-data-http/index.d.ts @@ -6,7 +6,6 @@ import * as JSData from 'js-data'; declare module 'js-data' { - interface DSHttpAdapterOptions { serialize?: (resourceName: string, data: any) => any; deserialize?: (resourceName: string, data: any) => any; @@ -27,7 +26,6 @@ declare module 'js-data' { } interface DSHttpAdapter extends IDSAdapter { - new(options?: DSHttpAdapterOptions): DSHttpAdapter; defaults: DSHttpAdapterOptions; @@ -44,4 +42,4 @@ declare module 'js-data' { declare var DSHttpAdapter: JSData.DSHttpAdapter; export = DSHttpAdapter; -export as namespace DSHttpAdapter; \ No newline at end of file +export as namespace DSHttpAdapter; diff --git a/js-data-http/js-data-http-tests.ts b/types/js-data-http/js-data-http-tests.ts similarity index 95% rename from js-data-http/js-data-http-tests.ts rename to types/js-data-http/js-data-http-tests.ts index d98cdd642a..082d34a71f 100644 --- a/js-data-http/js-data-http-tests.ts +++ b/types/js-data-http/js-data-http-tests.ts @@ -3,14 +3,14 @@ import DSHttpAdapter = require("js-data-http"); declare var axios: any; -var adapter = new DSHttpAdapter(); -var store = new JSData.DS(); +const adapter = new DSHttpAdapter(); +const store = new JSData.DS(); store.registerAdapter('http', adapter, { default: true }); adapter.defaults.basePath = '/api'; adapter.http = axios; -var ADocument: JSData.DSResourceDefinition = store.defineResource('document'); +const ADocument: JSData.DSResourceDefinition = store.defineResource('document'); ADocument.inject({ id: 5, author: 'John' }); @@ -79,9 +79,9 @@ adapter.GET('/user/1').then(data => { data.config; // {...} }); -var User: JSData.DSResourceDefinition = store.defineResource('user'); +const User: JSData.DSResourceDefinition = store.defineResource('user'); -var params: any = { +let params: any = { age: { '>': 30 } @@ -119,7 +119,7 @@ ADocument.find(5).then((document: any) => { ADocument.get(document.id); // { id: 5, author: 'John Anderson' } }); -var params: any = { +params = { author: 'John' }; diff --git a/js-data-http/tsconfig.json b/types/js-data-http/tsconfig.json similarity index 100% rename from js-data-http/tsconfig.json rename to types/js-data-http/tsconfig.json diff --git a/js-data-http/tslint.json b/types/js-data-http/tslint.json similarity index 100% rename from js-data-http/tslint.json rename to types/js-data-http/tslint.json diff --git a/js-data/index.d.ts b/types/js-data/index.d.ts similarity index 100% rename from js-data/index.d.ts rename to types/js-data/index.d.ts diff --git a/js-data/js-data-tests.ts b/types/js-data/js-data-tests.ts similarity index 100% rename from js-data/js-data-tests.ts rename to types/js-data/js-data-tests.ts diff --git a/js-data/tsconfig.json b/types/js-data/tsconfig.json similarity index 100% rename from js-data/tsconfig.json rename to types/js-data/tsconfig.json diff --git a/js-data/v1/index.d.ts b/types/js-data/v1/index.d.ts similarity index 100% rename from js-data/v1/index.d.ts rename to types/js-data/v1/index.d.ts diff --git a/js-data/v1/js-data-tests.ts b/types/js-data/v1/js-data-tests.ts similarity index 100% rename from js-data/v1/js-data-tests.ts rename to types/js-data/v1/js-data-tests.ts diff --git a/js-data/v1/tsconfig.json b/types/js-data/v1/tsconfig.json similarity index 100% rename from js-data/v1/tsconfig.json rename to types/js-data/v1/tsconfig.json diff --git a/js-fixtures/index.d.ts b/types/js-fixtures/index.d.ts similarity index 100% rename from js-fixtures/index.d.ts rename to types/js-fixtures/index.d.ts diff --git a/js-fixtures/js-fixtures-tests.ts b/types/js-fixtures/js-fixtures-tests.ts similarity index 100% rename from js-fixtures/js-fixtures-tests.ts rename to types/js-fixtures/js-fixtures-tests.ts diff --git a/js-fixtures/tsconfig.json b/types/js-fixtures/tsconfig.json similarity index 100% rename from js-fixtures/tsconfig.json rename to types/js-fixtures/tsconfig.json diff --git a/js-git/index.d.ts b/types/js-git/index.d.ts similarity index 100% rename from js-git/index.d.ts rename to types/js-git/index.d.ts diff --git a/js-git/js-git-tests.ts b/types/js-git/js-git-tests.ts similarity index 100% rename from js-git/js-git-tests.ts rename to types/js-git/js-git-tests.ts diff --git a/js-git/tsconfig.json b/types/js-git/tsconfig.json similarity index 100% rename from js-git/tsconfig.json rename to types/js-git/tsconfig.json diff --git a/js-md5/index.d.ts b/types/js-md5/index.d.ts similarity index 100% rename from js-md5/index.d.ts rename to types/js-md5/index.d.ts diff --git a/js-md5/js-md5-tests.ts b/types/js-md5/js-md5-tests.ts similarity index 100% rename from js-md5/js-md5-tests.ts rename to types/js-md5/js-md5-tests.ts diff --git a/js-md5/tsconfig.json b/types/js-md5/tsconfig.json similarity index 100% rename from js-md5/tsconfig.json rename to types/js-md5/tsconfig.json diff --git a/js-md5/tslint.json b/types/js-md5/tslint.json similarity index 100% rename from js-md5/tslint.json rename to types/js-md5/tslint.json diff --git a/js-priority-queue/index.d.ts b/types/js-priority-queue/index.d.ts similarity index 100% rename from js-priority-queue/index.d.ts rename to types/js-priority-queue/index.d.ts diff --git a/js-priority-queue/js-priority-queue-tests.ts b/types/js-priority-queue/js-priority-queue-tests.ts similarity index 100% rename from js-priority-queue/js-priority-queue-tests.ts rename to types/js-priority-queue/js-priority-queue-tests.ts diff --git a/js-priority-queue/tsconfig.json b/types/js-priority-queue/tsconfig.json similarity index 100% rename from js-priority-queue/tsconfig.json rename to types/js-priority-queue/tsconfig.json diff --git a/js-quantities/index.d.ts b/types/js-quantities/index.d.ts similarity index 98% rename from js-quantities/index.d.ts rename to types/js-quantities/index.d.ts index 5d4a8df304..ab76433c0d 100644 --- a/js-quantities/index.d.ts +++ b/types/js-quantities/index.d.ts @@ -5,7 +5,7 @@ declare const Qty: Qty.Type; -declare interface Qty { +interface Qty { readonly numerator: string[]; readonly denominator: string[]; readonly scalar: number; @@ -39,7 +39,6 @@ declare interface Qty { } declare namespace Qty { - interface Type { (value: Source): Qty; (value: number, unit: string): Qty; diff --git a/js-quantities/js-quantities-tests.ts b/types/js-quantities/js-quantities-tests.ts similarity index 88% rename from js-quantities/js-quantities-tests.ts rename to types/js-quantities/js-quantities-tests.ts index ed69816dc3..e7734e7520 100644 --- a/js-quantities/js-quantities-tests.ts +++ b/types/js-quantities/js-quantities-tests.ts @@ -84,13 +84,13 @@ Qty('10ohm').inverse(); // '.1/ohm' (not '.1S', although they are equivalent) // however, the 'to' command will convert between inverses also Qty('10ohm').to('S'); // '.1S' -var convert = Qty.swiftConverter('m/h', 'ft/s'); // Configures converter +const convert = Qty.swiftConverter('m/h', 'ft/s'); // Configures converter // Converting single value -var converted = convert(2500); // => 2.278.. +const converted = convert(2500); // => 2.278.. // Converting large array of values -var convertedSerie = convert([2500, 5000]); // => [2.278.., 4.556.., ...] +const convertedSerie = convert([2500, 5000]); // => [2.278.., 4.556.., ...] qty1.eq(qty2); // => true if both quantities are equal (1m == 100cm => true) qty1.same(qty2); // => true if both quantities are same (1m == 100cm => false) @@ -138,10 +138,10 @@ qty = Qty('1.1234 m'); qty.format(); // same units, default formatter => '1.234 m' qty.format('cm'); // converted to 'cm', default formatter => '123.45 cm' -var configurableRoundingFormatter = (maxDecimals: number) => { +const configurableRoundingFormatter = (maxDecimals: number) => { return (scalar: number, units: string) => { - var pow = Math.pow(10, maxDecimals); - var rounded = Math.round(scalar * pow) / pow; + const pow = Math.pow(10, maxDecimals); + const rounded = Math.round(scalar * pow) / pow; return rounded + ' ' + units; }; @@ -200,13 +200,13 @@ describe("js-quantities", () => { describe("initialization", () => { it("should create unit only", () => { - var qty = Qty("m"); + const qty = Qty("m"); expect(qty.numerator).toEqual([""]); expect(qty.scalar).toBe(1); }); it("should create unitless", () => { - var qty = Qty("1"); + let qty = Qty("1"); expect(qty.toFloat()).toBe(1); expect(qty.numerator).toEqual(["<1>"]); expect(qty.denominator).toEqual(["<1>"]); @@ -217,21 +217,21 @@ describe("js-quantities", () => { }); it("should create unitless from numbers", () => { - var qty = Qty(1.5); + const qty = Qty(1.5); expect(qty.toFloat()).toBe(1.5); expect(qty.numerator).toEqual(["<1>"]); expect(qty.denominator).toEqual(["<1>"]); }); it("should create from numbers with explicit units", () => { - var qty = Qty(1.5, "m"); + const qty = Qty(1.5, "m"); expect(qty.scalar).toBe(1.5); expect(qty.numerator).toEqual([""]); expect(qty.denominator).toEqual(["<1>"]); }); it("temperatures should have base unit in kelvin", () => { - var qty = Qty("1 tempK").toBase(); + let qty = Qty("1 tempK").toBase(); expect(qty.scalar).toBe(1); expect(qty.units()).toBe("tempK"); @@ -249,7 +249,7 @@ describe("js-quantities", () => { }); it("temperature degrees should have base unit in kelvin", () => { - var qty = Qty("1 degK").toBase(); + let qty = Qty("1 degK").toBase(); expect(qty.scalar).toBe(1); expect(qty.units()).toBe("degK"); @@ -272,7 +272,7 @@ describe("js-quantities", () => { expect(() => { Qty("-459.68 tempF"); }).toThrow("Temperatures must not be less than absolute zero"); expect(() => { Qty("-1 tempR"); }).toThrow("Temperatures must not be less than absolute zero"); - var qty = Qty("1 tempK"); + let qty = Qty("1 tempK"); expect(() => { qty.mul("-1"); }).toThrow("Temperatures must not be less than absolute zero"); qty = Qty("0 tempK"); @@ -289,28 +289,28 @@ describe("js-quantities", () => { }); it("should create simple", () => { - var qty = Qty("1m"); + const qty = Qty("1m"); expect(qty.scalar).toBe(1); expect(qty.numerator).toEqual([""]); expect(qty.denominator).toEqual(["<1>"]); }); it("should create negative", () => { - var qty = Qty("-1m"); + const qty = Qty("-1m"); expect(qty.scalar).toBe(-1); expect(qty.numerator).toEqual([""]); expect(qty.denominator).toEqual(["<1>"]); }); it("should create compound", () => { - var qty = Qty("1 N*m"); + const qty = Qty("1 N*m"); expect(qty.scalar).toBe(1); expect(qty.numerator).toEqual(["", ""]); expect(qty.denominator).toEqual(["<1>"]); }); it("should create pressure units in term of height of water", () => { - var qty = Qty("1 inH2O"); + let qty = Qty("1 inH2O"); expect(qty.scalar).toBe(1); expect(qty.numerator).toEqual([""]); @@ -320,14 +320,14 @@ describe("js-quantities", () => { }); it("should create with denominator", () => { - var qty = Qty("1 m/s"); + const qty = Qty("1 m/s"); expect(qty.scalar).toBe(1); expect(qty.numerator).toEqual([""]); expect(qty.denominator).toEqual([""]); }); it("should create with denominator only", () => { - var qty = Qty("1 /s"); + let qty = Qty("1 /s"); expect(qty.scalar).toBe(1); expect(qty.numerator).toEqual(["<1>"]); expect(qty.denominator).toEqual([""]); @@ -344,7 +344,7 @@ describe("js-quantities", () => { }); it("should create with powers", () => { - var qty = Qty("1 m^2/s^2"); + let qty = Qty("1 m^2/s^2"); expect(qty.scalar).toBe(1); expect(qty.numerator).toEqual(["", ""]); expect(qty.denominator).toEqual(["", ""]); @@ -359,14 +359,14 @@ describe("js-quantities", () => { }); it("should create with zero power", () => { - var qty = Qty("1 m^0"); + const qty = Qty("1 m^0"); expect(qty.scalar).toBe(1); expect(qty.numerator).toEqual(["<1>"]); expect(qty.denominator).toEqual(["<1>"]); }); it("should create with negative powers", () => { - var qty = Qty("1 m^2 s^-2"); + const qty = Qty("1 m^2 s^-2"); expect(qty.scalar).toBe(1); expect(qty.numerator).toEqual(["", ""]); expect(qty.denominator).toEqual(["", ""]); @@ -374,26 +374,26 @@ describe("js-quantities", () => { }); it("should accept powers without ^ syntax (simple)", () => { - var qty1 = Qty("1 m2"); - var qty2 = Qty("1 m^2"); + const qty1 = Qty("1 m2"); + const qty2 = Qty("1 m^2"); expect(qty1.eq(qty2)).toBe(true); }); it("should accept powers without ^ syntax (negative power)", () => { - var qty1 = Qty("1 m-2"); - var qty2 = Qty("1 m^-2"); + const qty1 = Qty("1 m-2"); + const qty2 = Qty("1 m^-2"); expect(qty1.eq(qty2)).toBe(true); }); it("should accept powers without ^ syntax (compound)", () => { - var qty1 = Qty("1 m^2 kg^2 J^2/s^2"); - var qty2 = Qty("1 m2 kg2 J2/s2"); + const qty1 = Qty("1 m^2 kg^2 J^2/s^2"); + const qty2 = Qty("1 m2 kg2 J2/s2"); expect(qty1.eq(qty2)).toBe(true); }); it("should accept powers without ^ syntax (compound and negative power)", () => { - var qty1 = Qty("1 m^2 kg^2 J^2 s^-2"); - var qty2 = Qty("1 m2 kg2 J2 s-2"); + const qty1 = Qty("1 m^2 kg^2 J^2 s^-2"); + const qty2 = Qty("1 m2 kg2 J2 s-2"); expect(qty1.eq(qty2)).toBe(true); }); @@ -424,7 +424,7 @@ describe("js-quantities", () => { }); it("should set baseScalar", () => { - var qty = Qty("0.018 MPa"); + let qty = Qty("0.018 MPa"); expect(qty.baseScalar).toBe(18000); qty = Qty("66 cm3"); @@ -432,8 +432,8 @@ describe("js-quantities", () => { }); it("should keep init value as is", () => { - var initValue = " 66 cm3 "; - var qty = Qty(initValue); + const initValue = " 66 cm3 "; + const qty = Qty(initValue); expect(qty.initValue).toEqual(initValue); }); @@ -443,7 +443,7 @@ describe("js-quantities", () => { }); it("should allow whitespaces between sign and scalar", () => { - var qty = Qty("- 1m"); + const qty = Qty("- 1m"); expect(qty.scalar).toEqual(-1); expect(qty.units()).toEqual("m"); @@ -457,23 +457,23 @@ describe("js-quantities", () => { describe("isCompatible", () => { it("should return true with compatible quantities", () => { - var qty1 = Qty("1 m*kg/s"); - var qty2 = Qty("1 in*pound/min"); + const qty1 = Qty("1 m*kg/s"); + let qty2 = Qty("1 in*pound/min"); expect(qty1.isCompatible(qty2)).toBe(true); qty2 = Qty("1 in/min"); expect(qty1.isCompatible(qty2)).toBe(false); }); it("should return true with dimensionless quantities", () => { - var qty1 = Qty("1"); - var qty2 = Qty("2"); + const qty1 = Qty("1"); + const qty2 = Qty("2"); expect(qty1.isCompatible(qty2)).toBe(true); }); }); describe("conversion", () => { it("should convert to base units", () => { - var qty = Qty("100 cm"); + let qty = Qty("100 cm"); expect(qty.toBase().scalar).toBe(1); expect(qty.toBase().units()).toBe("m"); qty = Qty("10 cm"); @@ -485,7 +485,7 @@ describe("js-quantities", () => { }); it("should convert to compatible units", () => { - var qty = Qty("10 cm"); + let qty = Qty("10 cm"); expect(qty.to("ft").scalar).toBe(Qty.divSafe(0.1, 0.3048)); qty = Qty("2m^3"); expect(qty.to("l").scalar).toBe(2000); @@ -518,7 +518,7 @@ describe("js-quantities", () => { }); it("should convert temperatures to compatible units", () => { - var qty = Qty("0 tempK"); + let qty = Qty("0 tempK"); expect(qty.to("tempC").scalar).toBe(-273.15); qty = Qty("0 tempF"); @@ -532,7 +532,7 @@ describe("js-quantities", () => { }); it("should convert temperature degrees to compatible units", () => { - var qty = Qty("0 degK"); + let qty = Qty("0 degK"); expect(qty.to("degC").scalar).toBe(0); qty = Qty("1 degK/s"); @@ -547,7 +547,7 @@ describe("js-quantities", () => { it("should convert temperature degrees to temperatures", () => { // according to ruby-units, deg -> temp conversion adds the degress to 0 kelvin before converting - var qty = Qty("100 degC"); + let qty = Qty("100 degC"); expect(qty.to("tempC").scalar).toBeCloseTo(-173.15, 10); qty = Qty("273.15 degC"); @@ -559,7 +559,7 @@ describe("js-quantities", () => { it("should convert temperatures to temperature degrees", () => { // according to ruby-units, temp -> deg conversion always uses the 0 relative degrees - var qty = Qty("100 tempC"); + let qty = Qty("100 tempC"); expect(qty.to("degC").scalar).toBe(100); qty = Qty("0 tempK"); @@ -576,8 +576,8 @@ describe("js-quantities", () => { }); it("should calculate inverses", () => { - var qty = Qty("1 ohm"); - var result = qty.to("siemens"); + let qty = Qty("1 ohm"); + let result = qty.to("siemens"); expect(result.scalar).toBe(1); expect(result.kind()).toBe("conductance"); @@ -611,7 +611,7 @@ describe("js-quantities", () => { }); it("should return itself if target units are the same", () => { - var qty = Qty("123 cm3"); + let qty = Qty("123 cm3"); expect(qty.to("cm3")).toBe(qty); expect(qty.to("cm^3")).toBe(qty); @@ -621,7 +621,7 @@ describe("js-quantities", () => { }); it("should be cached", () => { - var qty = Qty("100 m"), + const qty = Qty("100 m"), converted = qty.to("ft"); expect(qty.to("ft") === converted).toBe(true); @@ -630,16 +630,16 @@ describe("js-quantities", () => { describe("comparison", () => { it("should return true when comparing equal quantities", () => { - var qty1 = Qty("1cm"); - var qty2 = Qty("10mm"); + const qty1 = Qty("1cm"); + const qty2 = Qty("10mm"); expect(qty1.eq(qty2)).toBe(true); }); it("should compare compatible quantities", () => { - var qty1 = Qty("1cm"); - var qty2 = Qty("1mm"); - var qty3 = Qty("10mm"); - var qty4 = Qty("28A"); + const qty1 = Qty("1cm"); + const qty2 = Qty("1mm"); + const qty3 = Qty("10mm"); + const qty4 = Qty("28A"); expect(qty1.compareTo(qty2)).toBe(1); expect(qty2.compareTo(qty1)).toBe(-1); expect(qty1.compareTo(qty3)).toBe(0); @@ -654,21 +654,20 @@ describe("js-quantities", () => { }); it("should compare identical quantities", () => { - var qty1 = Qty("1cm"); - var qty2 = Qty("1cm"); - var qty3 = Qty("10mm"); + const qty1 = Qty("1cm"); + const qty2 = Qty("1cm"); + const qty3 = Qty("10mm"); expect(qty1.same(qty2)).toBe(true); expect(qty1.same(qty3)).toBe(false); }); it("should accept strings as parameter", () => { - var qty = Qty("1 cm"); + const qty = Qty("1 cm"); expect(qty.lt("0.5 cm")).toBe(false); expect(qty.lte("1 cm")).toBe(true); expect(qty.gte("3 mm")).toBe(true); expect(qty.gt("5 m")).toBe(false); }); - }); describe("non-ASCII character", () => { @@ -692,16 +691,15 @@ describe("js-quantities", () => { }); describe("math", () => { - it("should add quantities", () => { - var qty1 = Qty("2.5m"); - var qty2 = Qty("3m"); + const qty1 = Qty("2.5m"); + let qty2 = Qty("3m"); expect(qty1.add(qty2).scalar).toBe(5.5); expect(qty1.add("3m").scalar).toBe(5.5); qty2 = Qty("3cm"); - var result = qty1.add(qty2); + let result = qty1.add(qty2); expect(result.scalar).toBe(2.53); expect(result.units()).toBe("m"); @@ -716,15 +714,15 @@ describe("js-quantities", () => { }); it("should fail to add unlike quantities", () => { - var qty1 = Qty("3m"); - var qty2 = Qty("2s"); + const qty1 = Qty("3m"); + const qty2 = Qty("2s"); expect(() => { qty1.add(qty2); }).toThrow("Incompatible units"); expect(() => { qty2.add(qty1); }).toThrow("Incompatible units"); }); it("should fail to add inverse quantities", () => { - var qty1 = Qty("10S"); - var qty2 = qty1.inverse(); + let qty1 = Qty("10S"); + let qty2 = qty1.inverse(); expect(() => { qty1.add(qty2); }).toThrow("Incompatible units"); expect(() => { qty2.add(qty1); }).toThrow("Incompatible units"); @@ -735,15 +733,15 @@ describe("js-quantities", () => { }); it("should subtract quantities", () => { - var qty1 = Qty("2.5m"); - var qty2 = Qty("3m"); + const qty1 = Qty("2.5m"); + let qty2 = Qty("3m"); expect(qty1.sub(qty2).scalar).toBe(-0.5); expect(qty1.sub("2m").scalar).toBe(0.5); expect(qty1.sub("-2m").scalar).toBe(4.5); qty2 = Qty("3cm"); - var result = qty1.sub(qty2); + let result = qty1.sub(qty2); expect(result.scalar).toBe(2.47); expect(result.units()).toBe("m"); @@ -753,15 +751,15 @@ describe("js-quantities", () => { }); it("should fail to subtract unlike quantities", () => { - var qty1 = Qty("3m"); - var qty2 = Qty("2s"); + const qty1 = Qty("3m"); + const qty2 = Qty("2s"); expect(() => { qty1.sub(qty2); }).toThrow("Incompatible units"); expect(() => { qty2.sub(qty1); }).toThrow("Incompatible units"); }); it("should fail to subtract inverse quantities", () => { - var qty1 = Qty("10S"); - var qty2 = qty1.inverse(); + let qty1 = Qty("10S"); + let qty2 = qty1.inverse(); expect(() => { qty1.sub(qty2); }).toThrow("Incompatible units"); expect(() => { qty2.sub(qty1); }).toThrow("Incompatible units"); @@ -772,9 +770,9 @@ describe("js-quantities", () => { }); it("should multiply quantities", () => { - var qty1 = Qty("2.5m"); - var qty2 = Qty("3m"); - var result = qty1.mul(qty2); + const qty1 = Qty("2.5m"); + let qty2 = Qty("3m"); + let result = qty1.mul(qty2); expect(result.scalar).toBe(7.5); expect(result.units()).toBe("m2"); expect(result.kind()).toBe("area"); @@ -807,10 +805,10 @@ describe("js-quantities", () => { }); it("should multiply unlike quantities", () => { - var qty1 = Qty("2.5 m"); - var qty2 = Qty("3 N"); + let qty1 = Qty("2.5 m"); + let qty2 = Qty("3 N"); - var result = qty1.mul(qty2); + let result = qty1.mul(qty2); expect(result.scalar).toBe(7.5); qty1 = Qty("2.5 m^2"); @@ -822,11 +820,11 @@ describe("js-quantities", () => { }); it("should multiply inverse quantities", () => { - var qty1 = Qty("10S"); - var qty2 = Qty(".5S").inverse(); // 2/S - var qty3 = qty1.inverse(); // .1/S + const qty1 = Qty("10S"); + const qty2 = Qty(".5S").inverse(); // 2/S + const qty3 = qty1.inverse(); // .1/S - var result = qty1.mul(qty2); + let result = qty1.mul(qty2); expect(result.scalar).toBe(20); expect(result.isUnitless()).toBe(true); expect(result.units()).toBe(""); @@ -848,20 +846,20 @@ describe("js-quantities", () => { }); it("should divide quantities", () => { - var qty1 = Qty("2.5m"); - var qty2 = Qty("3m"); - var qty3 = Qty("0m"); + const qty1 = Qty("2.5m"); + const qty2 = Qty("3m"); + const qty3 = Qty("0m"); expect(() => { qty1.div(qty3); }).toThrow("Divide by zero"); expect(() => { qty1.div(0); }).toThrow("Divide by zero"); expect(qty3.div(qty1).scalar).toBe(0); - var result = qty1.div(qty2); + let result = qty1.div(qty2); expect(result.scalar).toBe(2.5 / 3); expect(result.units()).toBe(""); expect(result.kind()).toBe("unitless"); - var qty4 = Qty("3cm"); + const qty4 = Qty("3cm"); result = qty1.div(qty4); expect(result.scalar).toBe(2.5 / 0.03); expect(result.units()).toBe(""); @@ -876,20 +874,20 @@ describe("js-quantities", () => { }); it("should divide unlike quantities", () => { - var qty1 = Qty("7.5kg"); - var qty2 = Qty("2.5m^2"); + const qty1 = Qty("7.5kg"); + const qty2 = Qty("2.5m^2"); - var result = qty1.div(qty2); + const result = qty1.div(qty2); expect(result.scalar).toBe(3); expect(result.units()).toBe("kg/m2"); }); it("should divide inverse quantities", () => { - var qty1 = Qty("10 S"); - var qty2 = Qty(".5 S").inverse(); // 2/S - var qty3 = qty1.inverse(); // .1/S + const qty1 = Qty("10 S"); + const qty2 = Qty(".5 S").inverse(); // 2/S + const qty3 = qty1.inverse(); // .1/S - var result = qty1.div(qty2); + let result = qty1.div(qty2); expect(result.scalar).toBe(5); expect(result.units()).toBe("S2"); @@ -905,18 +903,16 @@ describe("js-quantities", () => { expect(result.scalar).toBe(0.01); expect(result.units()).toBe("1/S2"); }); - }); describe("math with temperatures", () => { - it("should add temperature degrees", () => { - var qty = Qty("2degC"); + let qty = Qty("2degC"); expect(qty.add("3degF").scalar).toBeCloseTo(11 / 3, 10); expect(qty.add("-1degC").scalar).toBe(1); qty = Qty("2 degC"); - var result = qty.add("2 degF"); + let result = qty.add("2 degF"); expect(result.scalar).toBe(28 / 9); expect(result.units()).toBe("degC"); @@ -932,14 +928,14 @@ describe("js-quantities", () => { }); it("should not add two temperatures", () => { - var qty = Qty("2tempC"); + const qty = Qty("2tempC"); expect(() => { qty.add("1 tempF"); }).toThrow("Cannot add two temperatures"); expect(() => { qty.add("1 tempC"); }).toThrow("Cannot add two temperatures"); }); it("should add temperatures to degrees", () => { - var qty = Qty("2degC"); - var result = qty.add("3tempF"); + let qty = Qty("2degC"); + let result = qty.add("3tempF"); expect(result.scalar).toBe(33 / 5); expect(result.units()).toBe("tempF"); @@ -954,33 +950,33 @@ describe("js-quantities", () => { }); it("should subtract degrees from degrees", () => { - var qty = Qty("2degC"); + const qty = Qty("2degC"); expect(qty.sub("1.5degK").scalar).toBe(0.5); expect(qty.sub("-2degC").scalar).toBe(4); expect(qty.sub("1degF").scalar).toBe(2 - 5 / 9); expect(qty.sub("-1degC").scalar).toBe(3); - var result = qty.sub("degC"); + const result = qty.sub("degC"); expect(result.scalar).toBe(1); expect(result.units()).toBe("degC"); }); it("should subtract degrees from temperatures", () => { - var qty = Qty("2tempC"); + const qty = Qty("2tempC"); expect(qty.sub("1.5degK").scalar).toBe(0.5); expect(qty.sub("-2degC").scalar).toBe(4); expect(qty.sub("1degF").scalar).toBe(2 - 5 / 9); expect(qty.sub("-1degC").scalar).toBe(3); - var result = qty.sub("degC"); + const result = qty.sub("degC"); expect(result.scalar).toBe(1); expect(result.units()).toBe("tempC"); }); it("should subtract temperatures from temperatures", () => { - var qty = Qty("2tempC"); + const qty = Qty("2tempC"); - var result = qty.sub("1.5tempK"); + let result = qty.sub("1.5tempK"); expect(result.scalar).toBe(273.65); expect(result.units()).toBe("degC"); @@ -994,14 +990,14 @@ describe("js-quantities", () => { }); it("should not subtract temperatures from degrees", () => { - var qty = Qty("2degC"); + const qty = Qty("2degC"); expect(() => { qty.sub("1 tempF"); }).toThrow("Cannot subtract a temperature from a differential degree unit"); expect(() => { qty.sub("1 tempC"); }).toThrow("Cannot subtract a temperature from a differential degree unit"); }); it("should multiply temperature degrees", () => { - var qty = Qty("2degF"); - var result = qty.mul(3); + let qty = Qty("2degF"); + let result = qty.mul(3); expect(result.scalar).toBe(6); expect(result.units()).toBe("degF"); @@ -1022,12 +1018,12 @@ describe("js-quantities", () => { }); it("should not multiply temperatures except by scalar", () => { - var qty = Qty("2tempF"); + const qty = Qty("2tempF"); expect(() => { qty.mul("1 tempC"); }).toThrow("Cannot multiply by temperatures"); expect(() => { qty.mul("1 degC"); }).toThrow("Cannot multiply by temperatures"); expect(() => { Qty("1 tempC*s"); }).toThrow("Cannot multiply by temperatures"); - var result = qty.mul(2); + let result = qty.mul(2); expect(result.scalar).toBe(4); expect(result.units()).toBe("tempF"); @@ -1037,10 +1033,10 @@ describe("js-quantities", () => { }); it("should multiply temperature degrees with unlike quantities", () => { - var qty1 = Qty("2.5 degF"); - var qty2 = Qty("3 m"); + let qty1 = Qty("2.5 degF"); + let qty2 = Qty("3 m"); - var result = qty1.mul(qty2); + let result = qty1.mul(qty2); expect(result.scalar).toBe(7.5); qty1 = Qty("2.5 degF"); @@ -1052,23 +1048,23 @@ describe("js-quantities", () => { }); it("should divide temperature degrees with unlike quantities", () => { - var qty1 = Qty("7.5degF"); - var qty2 = Qty("2.5m^2"); + const qty1 = Qty("7.5degF"); + const qty2 = Qty("2.5m^2"); - var result = qty1.div(qty2); + const result = qty1.div(qty2); expect(result.scalar).toBe(3); expect(result.units()).toBe("degF/m2"); }); it("should divide temperature degree quantities", () => { - var qty = Qty("2.5 degF"); + const qty = Qty("2.5 degF"); expect(() => { qty.div("0 degF"); }).toThrow("Divide by zero"); expect(() => { qty.div(0); }).toThrow("Divide by zero"); expect(Qty("0 degF").div(qty).scalar).toBe(0); expect(Qty("0 degF").div(qty).units()).toBe(""); - var result = qty.div("3 degF"); + let result = qty.div("3 degF"); expect(result.scalar).toBe(2.5 / 3); expect(result.units()).toBe(""); expect(result.kind()).toBe("unitless"); @@ -1094,11 +1090,10 @@ describe("js-quantities", () => { // inverse is division: 1/x expect(() => { Qty("tempF").inverse(); }).toThrow("Cannot divide with temperatures"); - var result = Qty("4 tempF").div(2); + const result = Qty("4 tempF").div(2); expect(result.scalar).toBe(2); expect(result.units()).toBe("tempF"); }); - }); describe("errors", () => { @@ -1112,16 +1107,15 @@ describe("js-quantities", () => { }); describe("utility methods", () => { - it("should accept string as parameter for compatibility tests", () => { - var qty = Qty("1 mm"); + const qty = Qty("1 mm"); expect(qty.isCompatible("2 mm")).toBe(true); expect(qty.isCompatible("2 mm^3")).toBe(false); }); it("should return kind", () => { - var qty = Qty("1 mm"); + let qty = Qty("1 mm"); expect(qty.kind()).toBe("length"); qty = Qty("1 N"); @@ -1129,7 +1123,7 @@ describe("js-quantities", () => { }); it("should know if a quantity is in base units", () => { - var qty = Qty("100 cm"); + let qty = Qty("100 cm"); expect(qty.isBase()).toBe(false); qty = Qty("1m"); @@ -1137,7 +1131,7 @@ describe("js-quantities", () => { }); it("should return unit part of quantities", () => { - var qty = Qty("1"); + let qty = Qty("1"); expect(qty.units()).toBe(""); qty = Qty("1 /s"); expect(qty.units()).toBe("1/s"); @@ -1152,12 +1146,11 @@ describe("js-quantities", () => { qty = Qty("1 cm^2*J^3/s^2*A^2"); expect(qty.units()).toBe("cm2*J3/s2*A2"); }); - }); describe("toString", () => { it("should generate readable human output", () => { - var qty = Qty("2m"); + let qty = Qty("2m"); expect(qty.toString()).toBe("2 m"); expect(qty.toString("cm")).toBe("200 cm"); expect(qty.toString("km")).toBe("0.002 km"); @@ -1176,7 +1169,7 @@ describe("js-quantities", () => { }); it("should round readable human output when max decimals is specified", () => { - var qty = (Qty("2m")).div(3); + let qty = Qty("2m").div(3); expect(qty.toString("cm", 2)).toBe("66.67 cm"); qty = Qty("2.8m"); @@ -1187,14 +1180,14 @@ describe("js-quantities", () => { }); it("should round to max decimals", () => { - var qty = (Qty("2.987654321 m")); + const qty = Qty("2.987654321 m"); expect(qty.toString(3)).toBe("2.988 m"); expect(qty.toString(0)).toBe("3 m"); }); it("should round according to precision passed as quantity", () => { - var qty = Qty("5.17 ft"); + const qty = Qty("5.17 ft"); expect(qty.toString(Qty("ft"))).toBe("5 ft"); expect(qty.toString(Qty("2 ft"))).toBe("6 ft"); @@ -1206,49 +1199,48 @@ describe("js-quantities", () => { }); it("should return same output with successive calls", () => { - var qty = Qty("123 cm3"); + const qty = Qty("123 cm3"); expect(qty.toString("cm3", 0)).toBe("123 cm3"); expect(qty.toString("cm3", 0)).toBe("123 cm3"); }); it("should return identical output when called with no parameters or same units", () => { - var qty = Qty("123 cm3"); + const qty = Qty("123 cm3"); expect(qty.toString()).toBe(qty.toString("cm3")); }); - }); describe("format", () => { describe("provided default formatter", () => { it("should be applied to output", () => { - var qty = (Qty("2.987654321 m")); + const qty = Qty("2.987654321 m"); expect(qty.format()).toBe("2.987654321 m"); }); }); describe("custom formatter", () => { - var roundingFormatter = (maxDecimals: number) => { + const roundingFormatter = (maxDecimals: number) => { return (scalar: number, units: string) => { - var pow = Math.pow(10, maxDecimals); - var rounded = Math.round(scalar * pow) / pow; + const pow = Math.pow(10, maxDecimals); + const rounded = Math.round(scalar * pow) / pow; return rounded + " " + units; }; }; it("should be applied to output", () => { - var qty = (Qty("2.987654321 m")); + const qty = Qty("2.987654321 m"); expect(qty.format(roundingFormatter(3))).toBe("2.988 m"); expect(qty.format(roundingFormatter(0))).toBe("3 m"); }); it("should be applied after conversion to target units", () => { - var qty = (Qty("2m")).div(3); + let qty = Qty("2m").div(3); expect(qty.format("cm", roundingFormatter(2))).toBe("66.67 cm"); - var intRoundingFormatter = roundingFormatter(0); + const intRoundingFormatter = roundingFormatter(0); qty = Qty("2.8m"); expect(qty.format("m", intRoundingFormatter)).toBe("3 m"); expect(qty.format("cm", intRoundingFormatter)).toBe("280 cm"); @@ -1257,7 +1249,7 @@ describe("js-quantities", () => { }); describe("globally set as default formatter", () => { - var previousFormatter: Qty.Formatter; + let previousFormatter: Qty.Formatter; beforeEach(() => { previousFormatter = Qty.formatter; @@ -1270,7 +1262,7 @@ describe("js-quantities", () => { }); it("should be applied when no formatter is passed", () => { - var qty = (Qty("2.987654321 m")); + const qty = Qty("2.987654321 m"); expect(qty.format()).toBe("2.988 m"); }); @@ -1280,7 +1272,7 @@ describe("js-quantities", () => { describe("precision rounding", () => { it("should round according to precision passed as quantity with same units", () => { - var qty = Qty("5.17 ft"); + const qty = Qty("5.17 ft"); expect(qty.toPrec(Qty("ft")).toString()).toBe("5 ft"); expect(qty.toPrec(Qty("2 ft")).toString()).toBe("6 ft"); @@ -1294,7 +1286,7 @@ describe("js-quantities", () => { }); it("should allow string as precision parameter", () => { - var qty = Qty("5.17 ft"); + const qty = Qty("5.17 ft"); expect(qty.toPrec("ft").toString()).toBe("5 ft"); expect(qty.toPrec("0.5 ft").toString()).toBe("5 ft"); @@ -1302,7 +1294,7 @@ describe("js-quantities", () => { }); it("should round according to precision passed as quantity with different prefixes", () => { - var qty = Qty("6.3782 m"); + const qty = Qty("6.3782 m"); expect(qty.toPrec(Qty("dm")).toString()).toBe("6.4 m"); expect(qty.toPrec(Qty("cm")).toString()).toBe("6.38 m"); @@ -1312,7 +1304,7 @@ describe("js-quantities", () => { }); it("should round according to precision passed as quantity with different compatible units", () => { - var qty = Qty("1.146 MPa"); + let qty = Qty("1.146 MPa"); expect(qty.toPrec(Qty("0.1 bar")).toString()).toBe("1.15 MPa"); expect(qty.toPrec(Qty("0.01 MPa")).toString()).toBe("1.15 MPa"); expect(qty.toPrec(Qty("dbar")).toString()).toBe("1.15 MPa"); @@ -1371,25 +1363,25 @@ describe("js-quantities", () => { it("should convert value", () => { // TODO Same test but with m/h -> ft/s triggers rounding issue // (For the sake of speed, converter does not check and fix rounding issues) - var converter = Qty.swiftConverter("m/h", "m/s"); + const converter = Qty.swiftConverter("m/h", "m/s"); expect(converter(2500)).toEqual(Qty("2500 m/h").to("m/s").scalar); }); it("should returned value unchanged when units are identical", () => { - var converter = Qty.swiftConverter("m/h", "m/h"); + const converter = Qty.swiftConverter("m/h", "m/h"); expect(converter(2500)).toEqual(2500); }); it("should convert temperatures", () => { - var converter = Qty.swiftConverter("tempF", "tempC"); + const converter = Qty.swiftConverter("tempF", "tempC"); expect(converter(32)).toEqual(0); }); it("should convert degrees", () => { - var converter = Qty.swiftConverter("degC", "degF"); + const converter = Qty.swiftConverter("degC", "degF"); expect(converter(10)).toEqual(18); }); @@ -1397,7 +1389,7 @@ describe("js-quantities", () => { describe("array of values", () => { it("should be converted", () => { - var converter = Qty.swiftConverter("MPa", "bar"), + const converter = Qty.swiftConverter("MPa", "bar"), values = [250, 10, 15], expected = [2500, 100, 150]; @@ -1413,8 +1405,8 @@ describe("js-quantities", () => { }); it("should not contain duplicate kind names", () => { - var kinds = Qty.getKinds(); - var map: { [key: string]: number } = {}; + const kinds = Qty.getKinds(); + const map: { [key: string]: number } = {}; kinds.forEach(kind => { map[kind] = 1; }); @@ -1500,14 +1492,14 @@ describe("js-quantities", () => { }); it('should not be defined as base unit', () => { - var qty = Qty("F"); + const qty = Qty("F"); expect(qty.isBase()).toBe(false); expect(qty.toBase().units()).toEqual("s4*A2/m2*kg"); }); it('should be parsed when prefixed', () => { - var qty = Qty("100 nF"); + const qty = Qty("100 nF"); expect(qty.eq(Qty("100 F").div(1e9))).toBe(true); expect(qty.baseScalar).toEqual(1e-7); diff --git a/js-quantities/tsconfig.json b/types/js-quantities/tsconfig.json similarity index 100% rename from js-quantities/tsconfig.json rename to types/js-quantities/tsconfig.json diff --git a/js-quantities/tslint.json b/types/js-quantities/tslint.json similarity index 100% rename from js-quantities/tslint.json rename to types/js-quantities/tslint.json diff --git a/js-schema/index.d.ts b/types/js-schema/index.d.ts similarity index 100% rename from js-schema/index.d.ts rename to types/js-schema/index.d.ts diff --git a/js-schema/js-schema-tests.ts b/types/js-schema/js-schema-tests.ts similarity index 100% rename from js-schema/js-schema-tests.ts rename to types/js-schema/js-schema-tests.ts diff --git a/js-schema/tsconfig.json b/types/js-schema/tsconfig.json similarity index 100% rename from js-schema/tsconfig.json rename to types/js-schema/tsconfig.json diff --git a/js-url/index.d.ts b/types/js-url/index.d.ts similarity index 100% rename from js-url/index.d.ts rename to types/js-url/index.d.ts diff --git a/js-url/js-url-tests.ts b/types/js-url/js-url-tests.ts similarity index 100% rename from js-url/js-url-tests.ts rename to types/js-url/js-url-tests.ts diff --git a/js-url/tsconfig.json b/types/js-url/tsconfig.json similarity index 100% rename from js-url/tsconfig.json rename to types/js-url/tsconfig.json diff --git a/js-yaml/index.d.ts b/types/js-yaml/index.d.ts similarity index 100% rename from js-yaml/index.d.ts rename to types/js-yaml/index.d.ts diff --git a/js-yaml/js-yaml-tests.ts b/types/js-yaml/js-yaml-tests.ts similarity index 100% rename from js-yaml/js-yaml-tests.ts rename to types/js-yaml/js-yaml-tests.ts diff --git a/js-yaml/tsconfig.json b/types/js-yaml/tsconfig.json similarity index 100% rename from js-yaml/tsconfig.json rename to types/js-yaml/tsconfig.json diff --git a/jsbn/index.d.ts b/types/jsbn/index.d.ts similarity index 100% rename from jsbn/index.d.ts rename to types/jsbn/index.d.ts diff --git a/jsbn/jsbn-tests.ts b/types/jsbn/jsbn-tests.ts similarity index 100% rename from jsbn/jsbn-tests.ts rename to types/jsbn/jsbn-tests.ts diff --git a/jsbn/tsconfig.json b/types/jsbn/tsconfig.json similarity index 100% rename from jsbn/tsconfig.json rename to types/jsbn/tsconfig.json diff --git a/jscrollpane/index.d.ts b/types/jscrollpane/index.d.ts similarity index 100% rename from jscrollpane/index.d.ts rename to types/jscrollpane/index.d.ts diff --git a/jsplumb/tsconfig.json b/types/jscrollpane/tsconfig.json similarity index 100% rename from jsplumb/tsconfig.json rename to types/jscrollpane/tsconfig.json diff --git a/jsdeferred/index.d.ts b/types/jsdeferred/index.d.ts similarity index 100% rename from jsdeferred/index.d.ts rename to types/jsdeferred/index.d.ts diff --git a/jsdeferred/jsdeferred-tests.ts b/types/jsdeferred/jsdeferred-tests.ts similarity index 100% rename from jsdeferred/jsdeferred-tests.ts rename to types/jsdeferred/jsdeferred-tests.ts diff --git a/jsdeferred/tsconfig.json b/types/jsdeferred/tsconfig.json similarity index 100% rename from jsdeferred/tsconfig.json rename to types/jsdeferred/tsconfig.json diff --git a/jsdom/index.d.ts b/types/jsdom/index.d.ts similarity index 100% rename from jsdom/index.d.ts rename to types/jsdom/index.d.ts diff --git a/jsdom/jsdom-tests.ts b/types/jsdom/jsdom-tests.ts similarity index 100% rename from jsdom/jsdom-tests.ts rename to types/jsdom/jsdom-tests.ts diff --git a/jsdom/tsconfig.json b/types/jsdom/tsconfig.json similarity index 100% rename from jsdom/tsconfig.json rename to types/jsdom/tsconfig.json diff --git a/jsen/index.d.ts b/types/jsen/index.d.ts similarity index 100% rename from jsen/index.d.ts rename to types/jsen/index.d.ts diff --git a/jsen/jsen-tests.ts b/types/jsen/jsen-tests.ts similarity index 100% rename from jsen/jsen-tests.ts rename to types/jsen/jsen-tests.ts diff --git a/jsen/tsconfig.json b/types/jsen/tsconfig.json similarity index 100% rename from jsen/tsconfig.json rename to types/jsen/tsconfig.json diff --git a/jsend/index.d.ts b/types/jsend/index.d.ts similarity index 100% rename from jsend/index.d.ts rename to types/jsend/index.d.ts diff --git a/jsend/jsend-tests.ts b/types/jsend/jsend-tests.ts similarity index 100% rename from jsend/jsend-tests.ts rename to types/jsend/jsend-tests.ts diff --git a/jsend/tsconfig.json b/types/jsend/tsconfig.json similarity index 100% rename from jsend/tsconfig.json rename to types/jsend/tsconfig.json diff --git a/jsesc/index.d.ts b/types/jsesc/index.d.ts similarity index 100% rename from jsesc/index.d.ts rename to types/jsesc/index.d.ts diff --git a/jsesc/jsesc-tests.ts b/types/jsesc/jsesc-tests.ts similarity index 100% rename from jsesc/jsesc-tests.ts rename to types/jsesc/jsesc-tests.ts diff --git a/jsesc/tsconfig.json b/types/jsesc/tsconfig.json similarity index 100% rename from jsesc/tsconfig.json rename to types/jsesc/tsconfig.json diff --git a/jsfl/index.d.ts b/types/jsfl/index.d.ts similarity index 100% rename from jsfl/index.d.ts rename to types/jsfl/index.d.ts diff --git a/jsfl/tsconfig.json b/types/jsfl/tsconfig.json similarity index 100% rename from jsfl/tsconfig.json rename to types/jsfl/tsconfig.json diff --git a/jsfl/xJSFL.d.ts b/types/jsfl/xJSFL.d.ts similarity index 100% rename from jsfl/xJSFL.d.ts rename to types/jsfl/xJSFL.d.ts diff --git a/jshamcrest/index.d.ts b/types/jshamcrest/index.d.ts similarity index 100% rename from jshamcrest/index.d.ts rename to types/jshamcrest/index.d.ts diff --git a/jshamcrest/jshamcrest-tests.ts b/types/jshamcrest/jshamcrest-tests.ts similarity index 100% rename from jshamcrest/jshamcrest-tests.ts rename to types/jshamcrest/jshamcrest-tests.ts diff --git a/jshamcrest/tsconfig.json b/types/jshamcrest/tsconfig.json similarity index 100% rename from jshamcrest/tsconfig.json rename to types/jshamcrest/tsconfig.json diff --git a/jsmockito/index.d.ts b/types/jsmockito/index.d.ts similarity index 100% rename from jsmockito/index.d.ts rename to types/jsmockito/index.d.ts diff --git a/jsmockito/jsmockito-tests.ts b/types/jsmockito/jsmockito-tests.ts similarity index 100% rename from jsmockito/jsmockito-tests.ts rename to types/jsmockito/jsmockito-tests.ts diff --git a/jsmockito/tsconfig.json b/types/jsmockito/tsconfig.json similarity index 100% rename from jsmockito/tsconfig.json rename to types/jsmockito/tsconfig.json diff --git a/jsnlog/index.d.ts b/types/jsnlog/index.d.ts similarity index 86% rename from jsnlog/index.d.ts rename to types/jsnlog/index.d.ts index e252d5cf36..4d1c707b4f 100644 --- a/jsnlog/index.d.ts +++ b/types/jsnlog/index.d.ts @@ -25,7 +25,6 @@ // JSNLog. declare namespace JL { - interface JSNLogOptions { enabled?: boolean; maxMessages?: number; @@ -88,7 +87,6 @@ declare namespace JL { declare function __jsnlog_configure(jsnlog: any): void; - // Ambient declaration of the JL function itself declare function JL(loggerName?: string): JL.JSNLogLogger; @@ -97,20 +95,20 @@ declare function JL(loggerName?: string): JL.JSNLogLogger; // overload ambient declarations with non-ambient declarations. declare namespace JL { - export function setOptions(options: JSNLogOptions): void; - export function createAjaxAppender(appenderName: string): JSNLogAjaxAppender; - export function createConsoleAppender(appenderName: string): JSNLogConsoleAppender; + function setOptions(options: JSNLogOptions): void; + function createAjaxAppender(appenderName: string): JSNLogAjaxAppender; + function createConsoleAppender(appenderName: string): JSNLogConsoleAppender; - export class Exception { + class Exception { constructor(data: any, inner?: any); } - export function getOffLevel(): number; - export function getTraceLevel(): number; - export function getDebugLevel(): number; - export function getInfoLevel(): number; - export function getWarnLevel(): number; - export function getErrorLevel(): number; - export function getFatalLevel(): number; - export function getAllLevel(): number; + function getOffLevel(): number; + function getTraceLevel(): number; + function getDebugLevel(): number; + function getInfoLevel(): number; + function getWarnLevel(): number; + function getErrorLevel(): number; + function getFatalLevel(): number; + function getAllLevel(): number; } diff --git a/jsnlog/jsnlog-tests.ts b/types/jsnlog/jsnlog-tests.ts similarity index 71% rename from jsnlog/jsnlog-tests.ts rename to types/jsnlog/jsnlog-tests.ts index c988234394..c7610aba78 100644 --- a/jsnlog/jsnlog-tests.ts +++ b/types/jsnlog/jsnlog-tests.ts @@ -1,16 +1,14 @@ - - // ---------------------------------------------------------- // JL -var offLevel: number = JL.getOffLevel(); -var traceLevel: number = JL.getTraceLevel(); -var debugLevel: number = JL.getDebugLevel(); -var infoLevel: number = JL.getInfoLevel(); -var warnLevel: number = JL.getWarnLevel(); -var errorLevel: number = JL.getErrorLevel(); -var fatalLevel: number = JL.getFatalLevel(); -var allLevel: number = JL.getAllLevel(); +const offLevel: number = JL.getOffLevel(); +const traceLevel: number = JL.getTraceLevel(); +const debugLevel: number = JL.getDebugLevel(); +const infoLevel: number = JL.getInfoLevel(); +const warnLevel: number = JL.getWarnLevel(); +const errorLevel: number = JL.getErrorLevel(); +const fatalLevel: number = JL.getFatalLevel(); +const allLevel: number = JL.getAllLevel(); JL.setOptions({ enabled: true, @@ -25,12 +23,12 @@ JL.setOptions({ // ---------------------------------------------------------- // Exception -var e = new JL.Exception("i is too small!"); +const e = new JL.Exception("i is too small!"); // ---------------------------------------------------------- // Ajax Appender -var ajaxAppender1: JL.JSNLogAjaxAppender = JL.createAjaxAppender('ajaxAppender'); +const ajaxAppender1: JL.JSNLogAjaxAppender = JL.createAjaxAppender('ajaxAppender'); ajaxAppender1.setOptions({ level: 5000, @@ -48,7 +46,7 @@ ajaxAppender1.setOptions({ // ---------------------------------------------------------- // Console Appender -var consoleAppender1: JL.JSNLogConsoleAppender = JL.createConsoleAppender('consoleAppender'); +const consoleAppender1: JL.JSNLogConsoleAppender = JL.createConsoleAppender('consoleAppender'); consoleAppender1.setOptions({ level: 5000, @@ -61,13 +59,12 @@ consoleAppender1.setOptions({ batchSize: 2 }); - // ---------------------------------------------------------- // Loggers -var logger1: JL.JSNLogLogger = JL('mylogger'); +const logger1: JL.JSNLogLogger = JL('mylogger'); -var exception = {}; +const exception = {}; logger1.trace('log message').debug({ x: 1, y: 2}); logger1.info(() => 5); @@ -85,4 +82,3 @@ logger1.setOptions({ appenders: [ ajaxAppender1, consoleAppender1 ], onceOnly: [ 'regex1', 'regex2' ] }); - diff --git a/jsnlog/tsconfig.json b/types/jsnlog/tsconfig.json similarity index 100% rename from jsnlog/tsconfig.json rename to types/jsnlog/tsconfig.json diff --git a/jsnlog/tslint.json b/types/jsnlog/tslint.json similarity index 100% rename from jsnlog/tslint.json rename to types/jsnlog/tslint.json diff --git a/jsnox/index.d.ts b/types/jsnox/index.d.ts similarity index 100% rename from jsnox/index.d.ts rename to types/jsnox/index.d.ts diff --git a/jsnox/jsnox-tests.ts b/types/jsnox/jsnox-tests.ts similarity index 100% rename from jsnox/jsnox-tests.ts rename to types/jsnox/jsnox-tests.ts diff --git a/jsnox/tsconfig.json b/types/jsnox/tsconfig.json similarity index 100% rename from jsnox/tsconfig.json rename to types/jsnox/tsconfig.json diff --git a/json-editor/index.d.ts b/types/json-editor/index.d.ts similarity index 100% rename from json-editor/index.d.ts rename to types/json-editor/index.d.ts diff --git a/json-editor/json-editor-tests.ts b/types/json-editor/json-editor-tests.ts similarity index 100% rename from json-editor/json-editor-tests.ts rename to types/json-editor/json-editor-tests.ts diff --git a/json-editor/tsconfig.json b/types/json-editor/tsconfig.json similarity index 100% rename from json-editor/tsconfig.json rename to types/json-editor/tsconfig.json diff --git a/json-merge-patch/index.d.ts b/types/json-merge-patch/index.d.ts similarity index 100% rename from json-merge-patch/index.d.ts rename to types/json-merge-patch/index.d.ts diff --git a/json-merge-patch/json-merge-patch-tests.ts b/types/json-merge-patch/json-merge-patch-tests.ts similarity index 100% rename from json-merge-patch/json-merge-patch-tests.ts rename to types/json-merge-patch/json-merge-patch-tests.ts diff --git a/json-merge-patch/tsconfig.json b/types/json-merge-patch/tsconfig.json similarity index 100% rename from json-merge-patch/tsconfig.json rename to types/json-merge-patch/tsconfig.json diff --git a/json-patch/index.d.ts b/types/json-patch/index.d.ts similarity index 100% rename from json-patch/index.d.ts rename to types/json-patch/index.d.ts diff --git a/json-patch/json-patch-tests.ts b/types/json-patch/json-patch-tests.ts similarity index 100% rename from json-patch/json-patch-tests.ts rename to types/json-patch/json-patch-tests.ts diff --git a/json-patch/tsconfig.json b/types/json-patch/tsconfig.json similarity index 100% rename from json-patch/tsconfig.json rename to types/json-patch/tsconfig.json diff --git a/json-pointer/index.d.ts b/types/json-pointer/index.d.ts similarity index 100% rename from json-pointer/index.d.ts rename to types/json-pointer/index.d.ts diff --git a/json-pointer/json-pointer-tests.ts b/types/json-pointer/json-pointer-tests.ts similarity index 100% rename from json-pointer/json-pointer-tests.ts rename to types/json-pointer/json-pointer-tests.ts diff --git a/json-pointer/tsconfig.json b/types/json-pointer/tsconfig.json similarity index 100% rename from json-pointer/tsconfig.json rename to types/json-pointer/tsconfig.json diff --git a/json-socket/index.d.ts b/types/json-socket/index.d.ts similarity index 100% rename from json-socket/index.d.ts rename to types/json-socket/index.d.ts diff --git a/json-socket/json-socket-tests.ts b/types/json-socket/json-socket-tests.ts similarity index 100% rename from json-socket/json-socket-tests.ts rename to types/json-socket/json-socket-tests.ts diff --git a/json-socket/tsconfig.json b/types/json-socket/tsconfig.json similarity index 100% rename from json-socket/tsconfig.json rename to types/json-socket/tsconfig.json diff --git a/json-stable-stringify/index.d.ts b/types/json-stable-stringify/index.d.ts similarity index 100% rename from json-stable-stringify/index.d.ts rename to types/json-stable-stringify/index.d.ts diff --git a/json-stable-stringify/json-stable-stringify-tests.ts b/types/json-stable-stringify/json-stable-stringify-tests.ts similarity index 100% rename from json-stable-stringify/json-stable-stringify-tests.ts rename to types/json-stable-stringify/json-stable-stringify-tests.ts diff --git a/json-stable-stringify/tsconfig.json b/types/json-stable-stringify/tsconfig.json similarity index 100% rename from json-stable-stringify/tsconfig.json rename to types/json-stable-stringify/tsconfig.json diff --git a/json-stable-stringify/tslint.json b/types/json-stable-stringify/tslint.json similarity index 100% rename from json-stable-stringify/tslint.json rename to types/json-stable-stringify/tslint.json diff --git a/json5/index.d.ts b/types/json5/index.d.ts similarity index 100% rename from json5/index.d.ts rename to types/json5/index.d.ts diff --git a/json5/json5-tests.ts b/types/json5/json5-tests.ts similarity index 100% rename from json5/json5-tests.ts rename to types/json5/json5-tests.ts diff --git a/json5/tsconfig.json b/types/json5/tsconfig.json similarity index 100% rename from json5/tsconfig.json rename to types/json5/tsconfig.json diff --git a/jsoneditor/index.d.ts b/types/jsoneditor/index.d.ts similarity index 100% rename from jsoneditor/index.d.ts rename to types/jsoneditor/index.d.ts diff --git a/jsoneditor/jsoneditor-tests.ts b/types/jsoneditor/jsoneditor-tests.ts similarity index 100% rename from jsoneditor/jsoneditor-tests.ts rename to types/jsoneditor/jsoneditor-tests.ts diff --git a/jsoneditor/tsconfig.json b/types/jsoneditor/tsconfig.json similarity index 100% rename from jsoneditor/tsconfig.json rename to types/jsoneditor/tsconfig.json diff --git a/jsoneditoronline/index.d.ts b/types/jsoneditoronline/index.d.ts similarity index 100% rename from jsoneditoronline/index.d.ts rename to types/jsoneditoronline/index.d.ts diff --git a/jsoneditoronline/jsoneditoronline-tests.ts b/types/jsoneditoronline/jsoneditoronline-tests.ts similarity index 100% rename from jsoneditoronline/jsoneditoronline-tests.ts rename to types/jsoneditoronline/jsoneditoronline-tests.ts diff --git a/jsoneditoronline/tsconfig.json b/types/jsoneditoronline/tsconfig.json similarity index 100% rename from jsoneditoronline/tsconfig.json rename to types/jsoneditoronline/tsconfig.json diff --git a/jsonminify/index.d.ts b/types/jsonminify/index.d.ts similarity index 100% rename from jsonminify/index.d.ts rename to types/jsonminify/index.d.ts diff --git a/jsonminify/jsonminify-tests.ts b/types/jsonminify/jsonminify-tests.ts similarity index 100% rename from jsonminify/jsonminify-tests.ts rename to types/jsonminify/jsonminify-tests.ts diff --git a/jsonminify/tsconfig.json b/types/jsonminify/tsconfig.json similarity index 100% rename from jsonminify/tsconfig.json rename to types/jsonminify/tsconfig.json diff --git a/jsonnet/index.d.ts b/types/jsonnet/index.d.ts similarity index 100% rename from jsonnet/index.d.ts rename to types/jsonnet/index.d.ts diff --git a/jsonnet/jsonnet-tests.ts b/types/jsonnet/jsonnet-tests.ts similarity index 100% rename from jsonnet/jsonnet-tests.ts rename to types/jsonnet/jsonnet-tests.ts diff --git a/jsonnet/tsconfig.json b/types/jsonnet/tsconfig.json similarity index 100% rename from jsonnet/tsconfig.json rename to types/jsonnet/tsconfig.json diff --git a/jsonpath/index.d.ts b/types/jsonpath/index.d.ts similarity index 100% rename from jsonpath/index.d.ts rename to types/jsonpath/index.d.ts diff --git a/jsonpath/jsonpath-tests.ts b/types/jsonpath/jsonpath-tests.ts similarity index 100% rename from jsonpath/jsonpath-tests.ts rename to types/jsonpath/jsonpath-tests.ts diff --git a/jsonpath/tsconfig.json b/types/jsonpath/tsconfig.json similarity index 100% rename from jsonpath/tsconfig.json rename to types/jsonpath/tsconfig.json diff --git a/jsonrpc-serializer/index.d.ts b/types/jsonrpc-serializer/index.d.ts similarity index 100% rename from jsonrpc-serializer/index.d.ts rename to types/jsonrpc-serializer/index.d.ts diff --git a/jsonrpc-serializer/jsonrpc-serializer-tests.ts b/types/jsonrpc-serializer/jsonrpc-serializer-tests.ts similarity index 100% rename from jsonrpc-serializer/jsonrpc-serializer-tests.ts rename to types/jsonrpc-serializer/jsonrpc-serializer-tests.ts diff --git a/jsonrpc-serializer/tsconfig.json b/types/jsonrpc-serializer/tsconfig.json similarity index 100% rename from jsonrpc-serializer/tsconfig.json rename to types/jsonrpc-serializer/tsconfig.json diff --git a/jsonrpc-serializer/tslint.json b/types/jsonrpc-serializer/tslint.json similarity index 100% rename from jsonrpc-serializer/tslint.json rename to types/jsonrpc-serializer/tslint.json diff --git a/jsonstream/index.d.ts b/types/jsonstream/index.d.ts similarity index 100% rename from jsonstream/index.d.ts rename to types/jsonstream/index.d.ts diff --git a/jsonstream/jsonstream-tests.ts b/types/jsonstream/jsonstream-tests.ts similarity index 100% rename from jsonstream/jsonstream-tests.ts rename to types/jsonstream/jsonstream-tests.ts diff --git a/jsonstream/tsconfig.json b/types/jsonstream/tsconfig.json similarity index 100% rename from jsonstream/tsconfig.json rename to types/jsonstream/tsconfig.json diff --git a/jsonwebtoken/index.d.ts b/types/jsonwebtoken/index.d.ts similarity index 100% rename from jsonwebtoken/index.d.ts rename to types/jsonwebtoken/index.d.ts diff --git a/jsonwebtoken/jsonwebtoken-tests.ts b/types/jsonwebtoken/jsonwebtoken-tests.ts similarity index 100% rename from jsonwebtoken/jsonwebtoken-tests.ts rename to types/jsonwebtoken/jsonwebtoken-tests.ts diff --git a/jsonwebtoken/tsconfig.json b/types/jsonwebtoken/tsconfig.json similarity index 100% rename from jsonwebtoken/tsconfig.json rename to types/jsonwebtoken/tsconfig.json diff --git a/jspdf/index.d.ts b/types/jspdf/index.d.ts similarity index 100% rename from jspdf/index.d.ts rename to types/jspdf/index.d.ts diff --git a/jspdf/jspdf-tests.ts b/types/jspdf/jspdf-tests.ts similarity index 100% rename from jspdf/jspdf-tests.ts rename to types/jspdf/jspdf-tests.ts diff --git a/jspdf/tsconfig.json b/types/jspdf/tsconfig.json similarity index 100% rename from jspdf/tsconfig.json rename to types/jspdf/tsconfig.json diff --git a/jsplumb/index.d.ts b/types/jsplumb/index.d.ts similarity index 100% rename from jsplumb/index.d.ts rename to types/jsplumb/index.d.ts diff --git a/jsuite/tsconfig.json b/types/jsplumb/tsconfig.json similarity index 100% rename from jsuite/tsconfig.json rename to types/jsplumb/tsconfig.json diff --git a/jsrender/index.d.ts b/types/jsrender/index.d.ts similarity index 100% rename from jsrender/index.d.ts rename to types/jsrender/index.d.ts diff --git a/jsrender/jsrender-tests.ts b/types/jsrender/jsrender-tests.ts similarity index 100% rename from jsrender/jsrender-tests.ts rename to types/jsrender/jsrender-tests.ts diff --git a/jsrender/tsconfig.json b/types/jsrender/tsconfig.json similarity index 100% rename from jsrender/tsconfig.json rename to types/jsrender/tsconfig.json diff --git a/jss/index.d.ts b/types/jss/index.d.ts similarity index 100% rename from jss/index.d.ts rename to types/jss/index.d.ts diff --git a/jss/jss-tests.ts b/types/jss/jss-tests.ts similarity index 100% rename from jss/jss-tests.ts rename to types/jss/jss-tests.ts diff --git a/jss/tsconfig.json b/types/jss/tsconfig.json similarity index 100% rename from jss/tsconfig.json rename to types/jss/tsconfig.json diff --git a/jssha/index.d.ts b/types/jssha/index.d.ts similarity index 100% rename from jssha/index.d.ts rename to types/jssha/index.d.ts diff --git a/jssha/jssha-tests.ts b/types/jssha/jssha-tests.ts similarity index 100% rename from jssha/jssha-tests.ts rename to types/jssha/jssha-tests.ts diff --git a/jssha/tsconfig.json b/types/jssha/tsconfig.json similarity index 100% rename from jssha/tsconfig.json rename to types/jssha/tsconfig.json diff --git a/jstimezonedetect/index.d.ts b/types/jstimezonedetect/index.d.ts similarity index 100% rename from jstimezonedetect/index.d.ts rename to types/jstimezonedetect/index.d.ts diff --git a/jstimezonedetect/jstimezonedetect-tests.ts b/types/jstimezonedetect/jstimezonedetect-tests.ts similarity index 100% rename from jstimezonedetect/jstimezonedetect-tests.ts rename to types/jstimezonedetect/jstimezonedetect-tests.ts diff --git a/jstimezonedetect/tsconfig.json b/types/jstimezonedetect/tsconfig.json similarity index 100% rename from jstimezonedetect/tsconfig.json rename to types/jstimezonedetect/tsconfig.json diff --git a/jstorage/index.d.ts b/types/jstorage/index.d.ts similarity index 100% rename from jstorage/index.d.ts rename to types/jstorage/index.d.ts diff --git a/jstorage/jstorage-tests.ts b/types/jstorage/jstorage-tests.ts similarity index 100% rename from jstorage/jstorage-tests.ts rename to types/jstorage/jstorage-tests.ts diff --git a/jstorage/tsconfig.json b/types/jstorage/tsconfig.json similarity index 100% rename from jstorage/tsconfig.json rename to types/jstorage/tsconfig.json diff --git a/jstree/index.d.ts b/types/jstree/index.d.ts similarity index 100% rename from jstree/index.d.ts rename to types/jstree/index.d.ts diff --git a/jstree/jstree-tests.ts b/types/jstree/jstree-tests.ts similarity index 100% rename from jstree/jstree-tests.ts rename to types/jstree/jstree-tests.ts diff --git a/jstree/tsconfig.json b/types/jstree/tsconfig.json similarity index 100% rename from jstree/tsconfig.json rename to types/jstree/tsconfig.json diff --git a/jsts/index.d.ts b/types/jsts/index.d.ts similarity index 100% rename from jsts/index.d.ts rename to types/jsts/index.d.ts diff --git a/jsts/jsts-tests.ts b/types/jsts/jsts-tests.ts similarity index 100% rename from jsts/jsts-tests.ts rename to types/jsts/jsts-tests.ts diff --git a/jsts/tsconfig.json b/types/jsts/tsconfig.json similarity index 100% rename from jsts/tsconfig.json rename to types/jsts/tsconfig.json diff --git a/jsuite/index.d.ts b/types/jsuite/index.d.ts similarity index 100% rename from jsuite/index.d.ts rename to types/jsuite/index.d.ts diff --git a/keyboardjs/tsconfig.json b/types/jsuite/tsconfig.json similarity index 100% rename from keyboardjs/tsconfig.json rename to types/jsuite/tsconfig.json diff --git a/jsuri/index.d.ts b/types/jsuri/index.d.ts similarity index 100% rename from jsuri/index.d.ts rename to types/jsuri/index.d.ts diff --git a/jsuri/jsuri-tests.ts b/types/jsuri/jsuri-tests.ts similarity index 100% rename from jsuri/jsuri-tests.ts rename to types/jsuri/jsuri-tests.ts diff --git a/jsuri/tsconfig.json b/types/jsuri/tsconfig.json similarity index 100% rename from jsuri/tsconfig.json rename to types/jsuri/tsconfig.json diff --git a/jsurl/index.d.ts b/types/jsurl/index.d.ts similarity index 100% rename from jsurl/index.d.ts rename to types/jsurl/index.d.ts diff --git a/jsurl/jsurl-tests.ts b/types/jsurl/jsurl-tests.ts similarity index 100% rename from jsurl/jsurl-tests.ts rename to types/jsurl/jsurl-tests.ts diff --git a/jsurl/tsconfig.json b/types/jsurl/tsconfig.json similarity index 100% rename from jsurl/tsconfig.json rename to types/jsurl/tsconfig.json diff --git a/jsx-chai/index.d.ts b/types/jsx-chai/index.d.ts similarity index 100% rename from jsx-chai/index.d.ts rename to types/jsx-chai/index.d.ts diff --git a/jsx-chai/jsx-chai-tests.ts b/types/jsx-chai/jsx-chai-tests.ts similarity index 100% rename from jsx-chai/jsx-chai-tests.ts rename to types/jsx-chai/jsx-chai-tests.ts diff --git a/jsx-chai/tsconfig.json b/types/jsx-chai/tsconfig.json similarity index 100% rename from jsx-chai/tsconfig.json rename to types/jsx-chai/tsconfig.json diff --git a/jszip/index.d.ts b/types/jszip/index.d.ts similarity index 100% rename from jszip/index.d.ts rename to types/jszip/index.d.ts diff --git a/jszip/jszip-tests.ts b/types/jszip/jszip-tests.ts similarity index 100% rename from jszip/jszip-tests.ts rename to types/jszip/jszip-tests.ts diff --git a/jszip/tsconfig.json b/types/jszip/tsconfig.json similarity index 100% rename from jszip/tsconfig.json rename to types/jszip/tsconfig.json diff --git a/jug/index.d.ts b/types/jug/index.d.ts similarity index 100% rename from jug/index.d.ts rename to types/jug/index.d.ts diff --git a/jug/jug-tests.ts b/types/jug/jug-tests.ts similarity index 100% rename from jug/jug-tests.ts rename to types/jug/jug-tests.ts diff --git a/jug/tsconfig.json b/types/jug/tsconfig.json similarity index 100% rename from jug/tsconfig.json rename to types/jug/tsconfig.json diff --git a/jui-core/index.d.ts b/types/jui-core/index.d.ts similarity index 99% rename from jui-core/index.d.ts rename to types/jui-core/index.d.ts index 0f1184c0a3..6d15361d8e 100644 --- a/jui-core/index.d.ts +++ b/types/jui-core/index.d.ts @@ -132,7 +132,6 @@ interface UtilBase { */ typeCheck(typeName: string, value: any): boolean; - typeCheckObj(uiObj: any, list: any): void; /** @@ -318,7 +317,6 @@ interface UtilBase { inArray(target: any, list: any[]): number; - trim(text: string): string; ready: ((...args: any[]) => void); @@ -398,7 +396,6 @@ interface JuiStatic { */ add(uiIns: any): void; - /** * @method emit * Generates a custom event to an applicable component @@ -443,7 +440,6 @@ interface UICollection { } interface UICore { - tpl?: any; event?: any; @@ -543,7 +539,6 @@ interface UICore { //noinspection TypeScriptUnresolvedVariable export interface UIEvent extends UICore { - root?: any; /** @@ -809,7 +804,6 @@ interface UtilMath { matrix3d(a: T[], b: T[]): T[]; inverseMatrix3d(a: any[]): any[]; - } export interface UtilScaleOrdinal extends Function { diff --git a/jui-core/jui-core-tests.ts b/types/jui-core/jui-core-tests.ts similarity index 84% rename from jui-core/jui-core-tests.ts rename to types/jui-core/jui-core-tests.ts index c0677926e6..a5d4f23bcb 100644 --- a/jui-core/jui-core-tests.ts +++ b/types/jui-core/jui-core-tests.ts @@ -1,4 +1,4 @@ -import {jui, UtilColor, UtilBase} from "./index"; +import {jui, UtilColor, UtilBase} from "jui-core"; jui.ready(["util.color"], (color: UtilColor) => { console.log(color.rgb("#ff0000")); diff --git a/jui-core/tsconfig.json b/types/jui-core/tsconfig.json similarity index 100% rename from jui-core/tsconfig.json rename to types/jui-core/tsconfig.json diff --git a/jui-core/tslint.json b/types/jui-core/tslint.json similarity index 100% rename from jui-core/tslint.json rename to types/jui-core/tslint.json diff --git a/jui-grid/index.d.ts b/types/jui-grid/index.d.ts similarity index 99% rename from jui-grid/index.d.ts rename to types/jui-grid/index.d.ts index 0fee7cc271..31b3ca2b51 100644 --- a/jui-grid/index.d.ts +++ b/types/jui-grid/index.d.ts @@ -232,7 +232,6 @@ export interface GridTable extends UIEvent { * Determines whether to use the move function when you fire row draggable event. */ moveRow?: boolean, - }): this; root?: any; @@ -612,9 +611,7 @@ export interface GridTable extends UIEvent { } export interface GridXTable extends UIEvent { - (selector: any, options?: { - - }): this; + (selector: any, options?: {}): this; render(isTree?: boolean): void; diff --git a/jui-grid/jui-grid-tests.ts b/types/jui-grid/jui-grid-tests.ts similarity index 95% rename from jui-grid/jui-grid-tests.ts rename to types/jui-grid/jui-grid-tests.ts index 1fb65c4b97..2609e94021 100644 --- a/jui-grid/jui-grid-tests.ts +++ b/types/jui-grid/jui-grid-tests.ts @@ -1,8 +1,7 @@ /// import {jui} from 'jui-core'; -import {GridTable, GridXTable, GridRow} from "./index"; - +import {GridTable, GridXTable, GridRow} from "jui-grid"; jui.ready([ "grid.table" ], (table: GridTable) => { const table_1: GridTable = table("#table_1", { @@ -41,7 +40,7 @@ jui.ready([ "grid.table" ], (table: GridTable) => { ]); const table_3_submit: Function = (index: number) => { - var name = $(table_3.root).find(".name").val(), + const name = $(table_3.root).find(".name").val(), age = $(table_3.root).find(".age").val(), location = $(table_3.root).find(".location").val(); @@ -52,7 +51,7 @@ jui.ready([ "grid.table" ], (table: GridTable) => { }); jui.ready([ "grid.xtable" ], (xtable: GridXTable) => { - var page = 1; + let page = 1; const xtable_2: GridXTable = xtable("#xtable_2", { fields: [ "name", "age", "location" ], @@ -63,9 +62,9 @@ jui.ready([ "grid.xtable" ], (xtable: GridXTable) => { }); const xtable_2_submit: Function = () => { - var result: any[] = []; + const result: any[] = []; - for (var i = 0; i < 1000000; i++) { + for (let i = 0; i < 1000000; i++) { result.push({ name: "Alvin" + i, age: Math.floor(Math.random() * 100) + 1, location: "LA" }); } @@ -81,7 +80,6 @@ jui.ready([ "grid.xtable" ], (xtable: GridXTable) => { }; }); - jui.ready([ "grid.xtable" ], (xtable: GridXTable) => { const xtable_4: GridXTable = xtable("#xtable_4", { fields: [ "name", "age", "location" ], @@ -130,9 +128,9 @@ jui.ready([ "grid.xtable" ], (xtable: GridXTable) => { }); const xtable_6_submit: Function = () => { - var result: any[] = []; + const result: any[] = []; - for (var i = 0; i < 1000000; i++) { + for (let i = 0; i < 1000000; i++) { result.push({ name: "Alvin" + i, age: Math.floor(Math.random() * 100) + 1, location: "LA" }); } @@ -178,5 +176,4 @@ jui.ready([ "grid.xtable" ], (xtable: GridXTable) => { { index: "0.5", type: "fold", data: { url: "/sitemap.xml", count: 10 } }, { index: "0.6", type: "fold", data: { url: "/package.json", count: 5 } } ]); - }); diff --git a/jui-grid/tsconfig.json b/types/jui-grid/tsconfig.json similarity index 100% rename from jui-grid/tsconfig.json rename to types/jui-grid/tsconfig.json diff --git a/libpq/tslint.json b/types/jui-grid/tslint.json similarity index 100% rename from libpq/tslint.json rename to types/jui-grid/tslint.json diff --git a/jui/index.d.ts b/types/jui/index.d.ts similarity index 99% rename from jui/index.d.ts rename to types/jui/index.d.ts index c1dec57e39..24e5ed215c 100644 --- a/jui/index.d.ts +++ b/types/jui/index.d.ts @@ -6,7 +6,6 @@ import {UIEvent} from 'jui-core'; export interface UIAccordion extends UIEvent { - (selector: any, options?: { tpl?: any, event?: any, @@ -91,10 +90,8 @@ export interface UIColorPicker { getColor(type: string): string|{}; setColor(value: string|{}): void; - } - export interface UICombo { (selector: any, options?: { tpl?: any, @@ -201,7 +198,6 @@ export interface UICombo { reload(): void; } - export interface UIDatePicker { (selector: any, options?: { tpl?: any, @@ -399,7 +395,6 @@ export interface UIDropdown { reload(): void; } - export interface UIModal { (selector: any, options?: { tpl?: any, @@ -460,7 +455,6 @@ export interface UIModal { resize(): void; } - export interface UINotify { (selector: any, options?: { tpl?: any, @@ -611,7 +605,6 @@ export interface UIProgress { setStriped(isStriped: boolean): void; setValue(v: number): void; getValue(): number; - } export interface UIProperty { @@ -716,7 +709,6 @@ export interface UISlider { tooltip?: boolean, format?: string, progress?: boolean - }): this; /** @@ -750,10 +742,8 @@ export interface UISlider { * @return {Number} value */ getToValue(): number; - } - export interface UISplitter { (selector: any, options?: { tpl?: any, @@ -849,7 +839,6 @@ export interface UISwitch { } export interface UITab { - (selector: any, options?: { tpl?: any, event?: any, @@ -1011,7 +1000,6 @@ export interface UITooltip { * Sets the content of a tooltip (referring to the title properties in markup) */ title?: string, - }): this; /** diff --git a/jui/jui-tests.ts b/types/jui/jui-tests.ts similarity index 99% rename from jui/jui-tests.ts rename to types/jui/jui-tests.ts index 8a7a5d03f4..5cc6dd93f2 100644 --- a/jui/jui-tests.ts +++ b/types/jui/jui-tests.ts @@ -118,5 +118,4 @@ jui.ready([ }); console.log(selectInstance.getValue()); - }); diff --git a/jui/tsconfig.json b/types/jui/tsconfig.json similarity index 100% rename from jui/tsconfig.json rename to types/jui/tsconfig.json diff --git a/jui/tslint.json b/types/jui/tslint.json similarity index 100% rename from jui/tslint.json rename to types/jui/tslint.json diff --git a/types/jump.js/index.d.ts b/types/jump.js/index.d.ts new file mode 100644 index 0000000000..111c41d59a --- /dev/null +++ b/types/jump.js/index.d.ts @@ -0,0 +1,19 @@ +// Type definitions for jump.js 1.0 +// Project: https://github.com/callmecavs/jump.js +// Definitions by: rhysd +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = jump; + +declare function jump(target: string | Element | number, opts?: jump.Options): void; + +declare namespace jump { + type TransitionFunc = (t: number, b: number, c: number, d: number) => number; + interface Options { + duration?: number; + offset?: number; + callback?: () => void; + easing?: TransitionFunc; + a11y?: boolean; + } +} diff --git a/jump.js/jump.js-tests.ts b/types/jump.js/jump.js-tests.ts similarity index 100% rename from jump.js/jump.js-tests.ts rename to types/jump.js/jump.js-tests.ts diff --git a/jump.js/tsconfig.json b/types/jump.js/tsconfig.json similarity index 100% rename from jump.js/tsconfig.json rename to types/jump.js/tsconfig.json diff --git a/jump.js/tslint.json b/types/jump.js/tslint.json similarity index 100% rename from jump.js/tslint.json rename to types/jump.js/tslint.json diff --git a/jwplayer/index.d.ts b/types/jwplayer/index.d.ts similarity index 100% rename from jwplayer/index.d.ts rename to types/jwplayer/index.d.ts diff --git a/jwplayer/tsconfig.json b/types/jwplayer/tsconfig.json similarity index 100% rename from jwplayer/tsconfig.json rename to types/jwplayer/tsconfig.json diff --git a/jwt-client/index.d.ts b/types/jwt-client/index.d.ts similarity index 100% rename from jwt-client/index.d.ts rename to types/jwt-client/index.d.ts diff --git a/jwt-client/jwt-client-tests.ts b/types/jwt-client/jwt-client-tests.ts similarity index 100% rename from jwt-client/jwt-client-tests.ts rename to types/jwt-client/jwt-client-tests.ts diff --git a/jwt-client/tsconfig.json b/types/jwt-client/tsconfig.json similarity index 100% rename from jwt-client/tsconfig.json rename to types/jwt-client/tsconfig.json diff --git a/jwt-decode/index.d.ts b/types/jwt-decode/index.d.ts similarity index 100% rename from jwt-decode/index.d.ts rename to types/jwt-decode/index.d.ts diff --git a/jwt-decode/jwt-decode-tests.ts b/types/jwt-decode/jwt-decode-tests.ts similarity index 100% rename from jwt-decode/jwt-decode-tests.ts rename to types/jwt-decode/jwt-decode-tests.ts diff --git a/jwt-decode/tsconfig.json b/types/jwt-decode/tsconfig.json similarity index 100% rename from jwt-decode/tsconfig.json rename to types/jwt-decode/tsconfig.json diff --git a/jwt-simple/index.d.ts b/types/jwt-simple/index.d.ts similarity index 100% rename from jwt-simple/index.d.ts rename to types/jwt-simple/index.d.ts diff --git a/jwt-simple/jwt-simple-tests.ts b/types/jwt-simple/jwt-simple-tests.ts similarity index 100% rename from jwt-simple/jwt-simple-tests.ts rename to types/jwt-simple/jwt-simple-tests.ts diff --git a/jwt-simple/tsconfig.json b/types/jwt-simple/tsconfig.json similarity index 100% rename from jwt-simple/tsconfig.json rename to types/jwt-simple/tsconfig.json diff --git a/kafka-node/index.d.ts b/types/kafka-node/index.d.ts similarity index 90% rename from kafka-node/index.d.ts rename to types/kafka-node/index.d.ts index a9992ccc52..7523f88c6f 100644 --- a/kafka-node/index.d.ts +++ b/types/kafka-node/index.d.ts @@ -63,7 +63,7 @@ export declare class HighLevelConsumer { close(force: boolean, cb: () => any): void; } -export declare class ConsumerGroup { +export declare class ConsumerGroup extends HighLevelConsumer { constructor(options: ConsumerGroupOptions, topics: string[]); on(eventName: string, cb: (message: string) => any): void; on(eventName: string, cb: (error: any) => any): void; @@ -131,11 +131,22 @@ export interface ConsumerGroupOptions { ssl?: boolean; id: string; groupId: string; - sessionTimeout: number; - protocol: Array<"roundrobin" | "range" | CustomPartitionAssignmentProtocol>; - fromOffset: "earliest" | "latest" | "none"; - migrateHLC: false; - migrateRolling: true; + sessionTimeout?: number; + protocol?: Array<"roundrobin" | "range" | CustomPartitionAssignmentProtocol>; + fromOffset?: "earliest" | "latest" | "none"; + migrateHLC?: boolean; + migrateRolling?: boolean; + autoCommit?: boolean; + autoCommitIntervalMs?: number; + fetchMaxWaitMs?: number; + paused?: boolean; + maxNumSegments?: number; + fetchMinBytes?: number; + fetchMaxBytes?: number; + retries?: number; + retryFactor?: number; + retryMinTimeout?: number; + connectOnReady?: boolean; } export interface Topic { diff --git a/kafka-node/kafka-node-tests.ts b/types/kafka-node/kafka-node-tests.ts similarity index 100% rename from kafka-node/kafka-node-tests.ts rename to types/kafka-node/kafka-node-tests.ts diff --git a/kafka-node/tsconfig.json b/types/kafka-node/tsconfig.json similarity index 100% rename from kafka-node/tsconfig.json rename to types/kafka-node/tsconfig.json diff --git a/karma-chai-sinon/index.d.ts b/types/karma-chai-sinon/index.d.ts similarity index 100% rename from karma-chai-sinon/index.d.ts rename to types/karma-chai-sinon/index.d.ts diff --git a/karma-chai-sinon/karma-chai-sinon-tests.ts b/types/karma-chai-sinon/karma-chai-sinon-tests.ts similarity index 100% rename from karma-chai-sinon/karma-chai-sinon-tests.ts rename to types/karma-chai-sinon/karma-chai-sinon-tests.ts diff --git a/karma-chai-sinon/tsconfig.json b/types/karma-chai-sinon/tsconfig.json similarity index 100% rename from karma-chai-sinon/tsconfig.json rename to types/karma-chai-sinon/tsconfig.json diff --git a/karma-coverage/index.d.ts b/types/karma-coverage/index.d.ts similarity index 100% rename from karma-coverage/index.d.ts rename to types/karma-coverage/index.d.ts diff --git a/karma-coverage/karma-coverage-tests.ts b/types/karma-coverage/karma-coverage-tests.ts similarity index 100% rename from karma-coverage/karma-coverage-tests.ts rename to types/karma-coverage/karma-coverage-tests.ts diff --git a/karma-coverage/tsconfig.json b/types/karma-coverage/tsconfig.json similarity index 100% rename from karma-coverage/tsconfig.json rename to types/karma-coverage/tsconfig.json diff --git a/karma-fixture/index.d.ts b/types/karma-fixture/index.d.ts similarity index 100% rename from karma-fixture/index.d.ts rename to types/karma-fixture/index.d.ts diff --git a/karma-fixture/karma-fixture-tests.ts b/types/karma-fixture/karma-fixture-tests.ts similarity index 100% rename from karma-fixture/karma-fixture-tests.ts rename to types/karma-fixture/karma-fixture-tests.ts diff --git a/karma-fixture/tsconfig.json b/types/karma-fixture/tsconfig.json similarity index 100% rename from karma-fixture/tsconfig.json rename to types/karma-fixture/tsconfig.json diff --git a/karma-jasmine/index.d.ts b/types/karma-jasmine/index.d.ts similarity index 100% rename from karma-jasmine/index.d.ts rename to types/karma-jasmine/index.d.ts diff --git a/karma-jasmine/karma-jasmine-tests.ts b/types/karma-jasmine/karma-jasmine-tests.ts similarity index 100% rename from karma-jasmine/karma-jasmine-tests.ts rename to types/karma-jasmine/karma-jasmine-tests.ts diff --git a/karma-jasmine/tsconfig.json b/types/karma-jasmine/tsconfig.json similarity index 100% rename from karma-jasmine/tsconfig.json rename to types/karma-jasmine/tsconfig.json diff --git a/karma/index.d.ts b/types/karma/index.d.ts similarity index 100% rename from karma/index.d.ts rename to types/karma/index.d.ts diff --git a/karma/karma-tests.ts b/types/karma/karma-tests.ts similarity index 100% rename from karma/karma-tests.ts rename to types/karma/karma-tests.ts diff --git a/karma/tsconfig.json b/types/karma/tsconfig.json similarity index 100% rename from karma/tsconfig.json rename to types/karma/tsconfig.json diff --git a/katex/index.d.ts b/types/katex/index.d.ts similarity index 100% rename from katex/index.d.ts rename to types/katex/index.d.ts diff --git a/katex/katex-tests.ts b/types/katex/katex-tests.ts similarity index 100% rename from katex/katex-tests.ts rename to types/katex/katex-tests.ts diff --git a/katex/tsconfig.json b/types/katex/tsconfig.json similarity index 100% rename from katex/tsconfig.json rename to types/katex/tsconfig.json diff --git a/kcors/index.d.ts b/types/kcors/index.d.ts similarity index 70% rename from kcors/index.d.ts rename to types/kcors/index.d.ts index e2618f63cb..e4e9e53fa6 100644 --- a/kcors/index.d.ts +++ b/types/kcors/index.d.ts @@ -1,6 +1,6 @@ // Type definitions for kcors 2.2 // Project: https://github.com/koajs/cors -// Definitions by: Xavier Stouder +// Definitions by: Xavier Stouder , Izayoi Ko // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped import * as Koa from "koa"; @@ -10,10 +10,10 @@ export = cors; declare namespace cors { interface Options { - origin?: (req: Koa.Request) => string | string; + origin?: ((req: Koa.Request) => string) | string; allowMethods?: string[] | string; exposeHeaders?: string[] | string; - allowHeaders: string[] | string; + allowHeaders?: string[] | string; maxAge?: number | string; credentials?: boolean; keepHeadersOnError?: boolean; diff --git a/kcors/kcors-tests.ts b/types/kcors/kcors-tests.ts similarity index 100% rename from kcors/kcors-tests.ts rename to types/kcors/kcors-tests.ts diff --git a/kcors/tsconfig.json b/types/kcors/tsconfig.json similarity index 100% rename from kcors/tsconfig.json rename to types/kcors/tsconfig.json diff --git a/kcors/tslint.json b/types/kcors/tslint.json similarity index 100% rename from kcors/tslint.json rename to types/kcors/tslint.json diff --git a/kefir/index.d.ts b/types/kefir/index.d.ts similarity index 100% rename from kefir/index.d.ts rename to types/kefir/index.d.ts diff --git a/kefir/kefir-tests.ts b/types/kefir/kefir-tests.ts similarity index 100% rename from kefir/kefir-tests.ts rename to types/kefir/kefir-tests.ts diff --git a/kefir/tsconfig.json b/types/kefir/tsconfig.json similarity index 100% rename from kefir/tsconfig.json rename to types/kefir/tsconfig.json diff --git a/kendo-ui/index.d.ts b/types/kendo-ui/index.d.ts similarity index 100% rename from kendo-ui/index.d.ts rename to types/kendo-ui/index.d.ts diff --git a/kendo-ui/kendo-ui-tests.ts b/types/kendo-ui/kendo-ui-tests.ts similarity index 100% rename from kendo-ui/kendo-ui-tests.ts rename to types/kendo-ui/kendo-ui-tests.ts diff --git a/kendo-ui/tsconfig.json b/types/kendo-ui/tsconfig.json similarity index 100% rename from kendo-ui/tsconfig.json rename to types/kendo-ui/tsconfig.json diff --git a/keyboardjs/index.d.ts b/types/keyboardjs/index.d.ts similarity index 100% rename from keyboardjs/index.d.ts rename to types/keyboardjs/index.d.ts diff --git a/knockout.editables/tsconfig.json b/types/keyboardjs/tsconfig.json similarity index 100% rename from knockout.editables/tsconfig.json rename to types/keyboardjs/tsconfig.json diff --git a/keycloak-js/index.d.ts b/types/keycloak-js/index.d.ts similarity index 94% rename from keycloak-js/index.d.ts rename to types/keycloak-js/index.d.ts index 540084d6fd..9f7e817df1 100644 --- a/keycloak-js/index.d.ts +++ b/types/keycloak-js/index.d.ts @@ -14,13 +14,13 @@ export = Keycloak; declare function Keycloak(config?: string|{}): Keycloak.KeycloakInstance; declare namespace Keycloak { - export type KeycloakAdapterName = 'cordova'|'default'; - export type KeycloakOnLoad = 'login-required'|'check-sso'; - export type KeycloakResponseMode = 'query'|'fragment'; - export type KeycloakResponseType = 'code'|'id_token token'|'code id_token token'; - export type KeycloakFlow = 'standard'|'implicit'|'hybrid'; + type KeycloakAdapterName = 'cordova'|'default'; + type KeycloakOnLoad = 'login-required'|'check-sso'; + type KeycloakResponseMode = 'query'|'fragment'; + type KeycloakResponseType = 'code'|'id_token token'|'code id_token token'; + type KeycloakFlow = 'standard'|'implicit'|'hybrid'; - export interface KeycloakInitOptions { + interface KeycloakInitOptions { /** * @private Undocumented. */ @@ -81,7 +81,7 @@ declare namespace Keycloak { flow?: KeycloakFlow; } - export interface KeycloakLoginOptions { + interface KeycloakLoginOptions { /** * @private Undocumented. */ @@ -131,9 +131,9 @@ declare namespace Keycloak { locale?: string; } - export type KeycloakPromiseCallback = (result: T) => void; + type KeycloakPromiseCallback = (result: T) => void; - export interface KeycloakPromise { + interface KeycloakPromise { /** * Function to call if the promised action succeeds. */ @@ -145,12 +145,12 @@ declare namespace Keycloak { error(callback: KeycloakPromiseCallback): KeycloakPromise; } - export interface KeycloakError { + interface KeycloakError { error: string; error_description: string; } - export interface KeycloakAdapter { + interface KeycloakAdapter { login(options?: KeycloakLoginOptions): KeycloakPromise; logout(options?: any): KeycloakPromise; register(options?: KeycloakLoginOptions): KeycloakPromise; @@ -158,7 +158,7 @@ declare namespace Keycloak { redirectUri(options: { redirectUri: string; }, encodeHash: boolean): string; } - export interface KeycloakProfile { + interface KeycloakProfile { id?: string; username?: string; email?: string; @@ -176,7 +176,7 @@ declare namespace Keycloak { * A client for the Keycloak authentication server. * @see {@link https://keycloak.gitbooks.io/securing-client-applications-guide/content/topics/oidc/javascript-adapter.html|Keycloak JS adapter documentation} */ - export interface KeycloakInstance { + interface KeycloakInstance { /** * Is true if the user is authenticated, false otherwise. */ diff --git a/keycloak-js/keycloak-authz.d.ts b/types/keycloak-js/keycloak-authz.d.ts similarity index 92% rename from keycloak-js/keycloak-authz.d.ts rename to types/keycloak-js/keycloak-authz.d.ts index 4db057ad97..b15c505257 100644 --- a/keycloak-js/keycloak-authz.d.ts +++ b/types/keycloak-js/keycloak-authz.d.ts @@ -11,11 +11,11 @@ export = KeycloakAuthorization; declare function KeycloakAuthorization(keycloak: Keycloak.KeycloakInstance): KeycloakAuthorization.KeycloakAuthorizationInstance; declare namespace KeycloakAuthorization { - export interface KeycloakAuthorizationPromise { + interface KeycloakAuthorizationPromise { then(onGrant: (rpt: string) => void, onDeny: () => void, onError: () => void): void; } - export interface KeycloakAuthorizationInstance { + interface KeycloakAuthorizationInstance { rpt: any; config: { rpt_endpoint: string }; diff --git a/keycloak-js/keycloak-js-tests.ts b/types/keycloak-js/keycloak-js-tests.ts similarity index 100% rename from keycloak-js/keycloak-js-tests.ts rename to types/keycloak-js/keycloak-js-tests.ts diff --git a/keycloak-js/tsconfig.json b/types/keycloak-js/tsconfig.json similarity index 100% rename from keycloak-js/tsconfig.json rename to types/keycloak-js/tsconfig.json diff --git a/keycloak-js/tslint.json b/types/keycloak-js/tslint.json similarity index 100% rename from keycloak-js/tslint.json rename to types/keycloak-js/tslint.json diff --git a/keygrip/index.d.ts b/types/keygrip/index.d.ts similarity index 89% rename from keygrip/index.d.ts rename to types/keygrip/index.d.ts index b5929aaec6..4c858839c9 100644 --- a/keygrip/index.d.ts +++ b/types/keygrip/index.d.ts @@ -3,13 +3,13 @@ // Definitions by: jKey Lu // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -declare interface Keygrip { +interface Keygrip { sign(data: any): string; verify(data: any, digest: string): boolean; index(data: any, digest: string): number; } -declare interface KeygripFunction { +interface KeygripFunction { new (keys: string[], algorithm?: string, encoding?: string): Keygrip; (keys: string[], algorithm?: string, encoding?: string): Keygrip; } diff --git a/keygrip/keygrip-tests.ts b/types/keygrip/keygrip-tests.ts similarity index 100% rename from keygrip/keygrip-tests.ts rename to types/keygrip/keygrip-tests.ts diff --git a/keygrip/tsconfig.json b/types/keygrip/tsconfig.json similarity index 100% rename from keygrip/tsconfig.json rename to types/keygrip/tsconfig.json diff --git a/keygrip/tslint.json b/types/keygrip/tslint.json similarity index 100% rename from keygrip/tslint.json rename to types/keygrip/tslint.json diff --git a/keymaster/index.d.ts b/types/keymaster/index.d.ts similarity index 100% rename from keymaster/index.d.ts rename to types/keymaster/index.d.ts diff --git a/keymaster/keymaster-tests.ts b/types/keymaster/keymaster-tests.ts similarity index 100% rename from keymaster/keymaster-tests.ts rename to types/keymaster/keymaster-tests.ts diff --git a/keymaster/tsconfig.json b/types/keymaster/tsconfig.json similarity index 100% rename from keymaster/tsconfig.json rename to types/keymaster/tsconfig.json diff --git a/keymirror/index.d.ts b/types/keymirror/index.d.ts similarity index 100% rename from keymirror/index.d.ts rename to types/keymirror/index.d.ts diff --git a/keymirror/keymirror-tests.ts b/types/keymirror/keymirror-tests.ts similarity index 100% rename from keymirror/keymirror-tests.ts rename to types/keymirror/keymirror-tests.ts diff --git a/keymirror/tsconfig.json b/types/keymirror/tsconfig.json similarity index 100% rename from keymirror/tsconfig.json rename to types/keymirror/tsconfig.json diff --git a/keypress/index.d.ts b/types/keypress/index.d.ts similarity index 100% rename from keypress/index.d.ts rename to types/keypress/index.d.ts diff --git a/keypress/keypress-tests.ts b/types/keypress/keypress-tests.ts similarity index 100% rename from keypress/keypress-tests.ts rename to types/keypress/keypress-tests.ts diff --git a/keypress/tsconfig.json b/types/keypress/tsconfig.json similarity index 100% rename from keypress/tsconfig.json rename to types/keypress/tsconfig.json diff --git a/keytar/index.d.ts b/types/keytar/index.d.ts similarity index 100% rename from keytar/index.d.ts rename to types/keytar/index.d.ts diff --git a/keytar/keytar-tests.ts b/types/keytar/keytar-tests.ts similarity index 100% rename from keytar/keytar-tests.ts rename to types/keytar/keytar-tests.ts diff --git a/keytar/tsconfig.json b/types/keytar/tsconfig.json similarity index 100% rename from keytar/tsconfig.json rename to types/keytar/tsconfig.json diff --git a/kii-cloud-sdk/index.d.ts b/types/kii-cloud-sdk/index.d.ts similarity index 99% rename from kii-cloud-sdk/index.d.ts rename to types/kii-cloud-sdk/index.d.ts index 8dec3a94c8..0879b355bd 100644 --- a/kii-cloud-sdk/index.d.ts +++ b/types/kii-cloud-sdk/index.d.ts @@ -15,7 +15,7 @@ declare namespace KiiCloud { KiiACLSendMessageToTopic, } - export enum KiiSite { + enum KiiSite { US, JP, CN, @@ -24,7 +24,7 @@ declare namespace KiiCloud { EU } - export enum KiiAnalyticsSite { + enum KiiAnalyticsSite { US, JP, CN, @@ -207,7 +207,7 @@ declare namespace KiiCloud { /** * The main SDK class */ - export class Kii { + class Kii { /** * Kii SDK Build Number * @@ -673,7 +673,7 @@ declare namespace KiiCloud { /** * Represents a KiiACL object */ - export class KiiACL { + class KiiACL { /** * Get the list of active ACLs associated with this object from the server * @@ -809,7 +809,7 @@ declare namespace KiiCloud { /** * Represents a KiiACLEntry object */ - export class KiiACLEntry { + class KiiACLEntry { /** * The action that is being permitted/restricted. Possible values: *

@@ -898,7 +898,7 @@ declare namespace KiiCloud { /** * The main SDK class */ - export class KiiAnalytics { + class KiiAnalytics { /** * Retrieve the current app ID * @@ -1107,7 +1107,7 @@ declare namespace KiiCloud { * * When retrieving ACL from an object, test for this class to determine the subject type. */ - export class KiiAnonymousUser { + class KiiAnonymousUser { /** * Returns the ID of Anonymous user. */ @@ -1119,7 +1119,7 @@ declare namespace KiiCloud { * * When retrieving ACL from an object, test for this class to determine the subject type. Example: */ - export class KiiAnyAuthenticatedUser { + class KiiAnyAuthenticatedUser { /** * Returns the ID of AuthenticatedUser user. */ @@ -1136,7 +1136,7 @@ declare namespace KiiCloud { * * Application administrator context. Entities obtained from this class will be manipulated by application admin. */ - export class KiiAppAdminContext { + class KiiAppAdminContext { /** * Creates a reference to a bucket operated by app admin. *

The bucket will be created/accessed within this app's scope @@ -1983,7 +1983,7 @@ declare namespace KiiCloud { /** * Represents a KiiBucket object */ - export class KiiBucket { + class KiiBucket { /** * The name of this bucket * @@ -2332,7 +2332,7 @@ declare namespace KiiCloud { /** * Represents a KiiClause expression object */ - export class KiiClause { + class KiiClause { /** * Create a KiiClause with the AND operator concatenating multiple KiiClause objects * @@ -2542,7 +2542,7 @@ declare namespace KiiCloud { /** * A Parser for error string or error object returned by SDK. */ - export class KiiErrorParser { + class KiiErrorParser { /** * Parse an error string or error object returned by SDK. * @@ -2574,7 +2574,7 @@ declare namespace KiiCloud { /** * Represents Geo Point. */ - export class KiiGeoPoint { + class KiiGeoPoint { /** * Return the latitide of this point. */ @@ -2607,7 +2607,7 @@ declare namespace KiiCloud { /** * Represents a KiiGroup object */ - export class KiiGroup { + class KiiGroup { /** * * @@ -3310,7 +3310,7 @@ declare namespace KiiCloud { /** * Represents a KiiObject object */ - export class KiiObject { + class KiiObject { /** * Get the UUID of the given object, assigned by the server * @@ -4160,7 +4160,7 @@ declare namespace KiiCloud { /** * Represents a KiiPushInstallation object */ - export class KiiPushInstallation { + class KiiPushInstallation { /** * Register the id issued by GCM to the Kii cloud for current logged in user. * @@ -4315,7 +4315,7 @@ declare namespace KiiCloud { /** * Builder of push message */ - export class KiiPushMessageBuilder { + class KiiPushMessageBuilder { /** * instantiate builder with push message data. * By default all push channels (gcm, apns, jpush, mqtt) is enabled. @@ -4591,7 +4591,7 @@ declare namespace KiiCloud { /** * Represents a KiiPushSubscription. */ - export class KiiPushSubscription { + class KiiPushSubscription { /** * Subscribe to bucket or topic. * @@ -4770,7 +4770,7 @@ declare namespace KiiCloud { /** * Represents a KiiQuery object */ - export class KiiQuery { + class KiiQuery { /** * Get the limit of the current query * @@ -4826,7 +4826,7 @@ declare namespace KiiCloud { /** * Represents a server side code entry in KiiCloud. */ - export class KiiServerCodeEntry { + class KiiServerCodeEntry { /** * Execute this server code entry.
* If argument is an empty object or not type of Object, callbacks.failure or reject callback of promise will be called.
@@ -4911,7 +4911,7 @@ declare namespace KiiCloud { /** * Represents a server side code execution result in KiiCloud. */ - export class KiiServerCodeExecResult { + class KiiServerCodeExecResult { /** * Get calculated number of executed steps. * @@ -4930,7 +4930,7 @@ declare namespace KiiCloud { /** * Represents a KiiSocialConnect object */ - export class KiiSocialConnect { + class KiiSocialConnect { /** * * @@ -5533,7 +5533,7 @@ declare namespace KiiCloud { /** * Represents a Thing object */ - export class KiiThing { + class KiiThing { /** * of this thing. * For details refer to {@link KiiThing.register} @@ -6446,7 +6446,7 @@ declare namespace KiiCloud { /** * represents a KiiThingContext object */ - export class KiiThingContext { + class KiiThingContext { /** * Creates a reference to a bucket in App scope operated by thing. * @@ -6608,7 +6608,7 @@ declare namespace KiiCloud { /** * Represents a Topic object. */ - export class KiiTopic { + class KiiTopic { /** * get name of this topic * @@ -6814,7 +6814,7 @@ declare namespace KiiCloud { /** * Represents a KiiUser object */ - export class KiiUser { + class KiiUser { /** * * @@ -8657,7 +8657,7 @@ declare namespace KiiCloud { /** * Represents a KiiUser builder */ - export class KiiUserBuilder { + class KiiUserBuilder { /** * Create a KiiUser builder with identifier. * diff --git a/kii-cloud-sdk/kii-cloud-sdk-tests.ts b/types/kii-cloud-sdk/kii-cloud-sdk-tests.ts similarity index 76% rename from kii-cloud-sdk/kii-cloud-sdk-tests.ts rename to types/kii-cloud-sdk/kii-cloud-sdk-tests.ts index 40abd1e8d4..bd25adeeb0 100644 --- a/kii-cloud-sdk/kii-cloud-sdk-tests.ts +++ b/types/kii-cloud-sdk/kii-cloud-sdk-tests.ts @@ -1,9 +1,7 @@ - - function main() { Kii.initializeWithSite("abc", "def", KiiSite.JP); - var user = KiiUser.userWithUsername("name", "password"); + const user = KiiUser.userWithUsername("name", "password"); user.register({ success(user: KiiUser) { @@ -27,18 +25,18 @@ function main() { }); user.setLocale("en"); - var locale: string = user.getLocale(); + const locale: string = user.getLocale(); - var anotherUser: KiiUser = KiiUserBuilder + const anotherUser: KiiUser = KiiUserBuilder .builderWithIdentifier("id", "password") .setEmailAddress("mail@example.org") .build(); - var bucket = Kii.bucketWithName("foo"); - var clause1 = KiiClause.lessThan("x", 1); - var clause2 = KiiClause.greaterThan("y", 1); - var clause3 = KiiClause.and(clause1, clause2); - var query = KiiQuery.queryWithClause(clause3); + const bucket = Kii.bucketWithName("foo"); + const clause1 = KiiClause.lessThan("x", 1); + const clause2 = KiiClause.greaterThan("y", 1); + const clause3 = KiiClause.and(clause1, clause2); + const query = KiiQuery.queryWithClause(clause3); bucket.executeQuery(query, { success: (query: KiiQuery, @@ -51,10 +49,10 @@ function main() { bucket.executeQuery(query) .then((params: [KiiQuery, KiiObject[], KiiQuery]) => { - var [query, results, nextQuery] = params; + const [query, results, nextQuery] = params; }); - var object = bucket.createObject(); + const object = bucket.createObject(); object.set("foo", 1); @@ -93,11 +91,11 @@ function main() { KiiThing.loadWithVendorThingID("thing ID") .then((thing) => { - var isOnline: boolean = thing.isOnline(); - var onlineStatusModifiedAt: Date = thing.getOnlineStatusModifiedAt(); + const isOnline: boolean = thing.isOnline(); + const onlineStatusModifiedAt: Date = thing.getOnlineStatusModifiedAt(); }); - var error = KiiErrorParser.parse(""); + const error = KiiErrorParser.parse(""); error.code.toLowerCase(); } diff --git a/kii-cloud-sdk/tsconfig.json b/types/kii-cloud-sdk/tsconfig.json similarity index 100% rename from kii-cloud-sdk/tsconfig.json rename to types/kii-cloud-sdk/tsconfig.json diff --git a/kii-cloud-sdk/tslint.json b/types/kii-cloud-sdk/tslint.json similarity index 100% rename from kii-cloud-sdk/tslint.json rename to types/kii-cloud-sdk/tslint.json diff --git a/kik-browser/index.d.ts b/types/kik-browser/index.d.ts similarity index 100% rename from kik-browser/index.d.ts rename to types/kik-browser/index.d.ts diff --git a/kik-browser/kik-browser-tests.ts b/types/kik-browser/kik-browser-tests.ts similarity index 100% rename from kik-browser/kik-browser-tests.ts rename to types/kik-browser/kik-browser-tests.ts diff --git a/kik-browser/tsconfig.json b/types/kik-browser/tsconfig.json similarity index 100% rename from kik-browser/tsconfig.json rename to types/kik-browser/tsconfig.json diff --git a/kineticjs/index.d.ts b/types/kineticjs/index.d.ts similarity index 100% rename from kineticjs/index.d.ts rename to types/kineticjs/index.d.ts diff --git a/kineticjs/kineticjs-tests.ts b/types/kineticjs/kineticjs-tests.ts similarity index 100% rename from kineticjs/kineticjs-tests.ts rename to types/kineticjs/kineticjs-tests.ts diff --git a/kineticjs/tsconfig.json b/types/kineticjs/tsconfig.json similarity index 100% rename from kineticjs/tsconfig.json rename to types/kineticjs/tsconfig.json diff --git a/klaw-sync/index.d.ts b/types/klaw-sync/index.d.ts similarity index 99% rename from klaw-sync/index.d.ts rename to types/klaw-sync/index.d.ts index d344879e1a..e68af63739 100644 --- a/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/klaw-sync/klaw-sync-tests.ts b/types/klaw-sync/klaw-sync-tests.ts similarity index 100% rename from klaw-sync/klaw-sync-tests.ts rename to types/klaw-sync/klaw-sync-tests.ts diff --git a/klaw-sync/tsconfig.json b/types/klaw-sync/tsconfig.json similarity index 100% rename from klaw-sync/tsconfig.json rename to types/klaw-sync/tsconfig.json diff --git a/klaw-sync/tslint.json b/types/klaw-sync/tslint.json similarity index 100% rename from klaw-sync/tslint.json rename to types/klaw-sync/tslint.json diff --git a/klaw/index.d.ts b/types/klaw/index.d.ts similarity index 100% rename from klaw/index.d.ts rename to types/klaw/index.d.ts diff --git a/klaw/klaw-tests.ts b/types/klaw/klaw-tests.ts similarity index 100% rename from klaw/klaw-tests.ts rename to types/klaw/klaw-tests.ts diff --git a/klaw/tsconfig.json b/types/klaw/tsconfig.json similarity index 100% rename from klaw/tsconfig.json rename to types/klaw/tsconfig.json diff --git a/knex/index.d.ts b/types/knex/index.d.ts similarity index 99% rename from knex/index.d.ts rename to types/knex/index.d.ts index 15ff365756..ec5fecf95a 100644 --- a/knex/index.d.ts +++ b/types/knex/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/tgriesser/knex // Definitions by: Qubo , Baronfel // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.1 +// TypeScript Version: 2.2 /// /// diff --git a/knex/knex-tests.ts b/types/knex/knex-tests.ts similarity index 100% rename from knex/knex-tests.ts rename to types/knex/knex-tests.ts diff --git a/knex/tsconfig.json b/types/knex/tsconfig.json similarity index 100% rename from knex/tsconfig.json rename to types/knex/tsconfig.json diff --git a/knockback/index.d.ts b/types/knockback/index.d.ts similarity index 100% rename from knockback/index.d.ts rename to types/knockback/index.d.ts diff --git a/knockback/tsconfig.json b/types/knockback/tsconfig.json similarity index 100% rename from knockback/tsconfig.json rename to types/knockback/tsconfig.json diff --git a/knockout-amd-helpers/index.d.ts b/types/knockout-amd-helpers/index.d.ts similarity index 100% rename from knockout-amd-helpers/index.d.ts rename to types/knockout-amd-helpers/index.d.ts diff --git a/knockout-amd-helpers/knockout-amd-helpers-tests.ts b/types/knockout-amd-helpers/knockout-amd-helpers-tests.ts similarity index 100% rename from knockout-amd-helpers/knockout-amd-helpers-tests.ts rename to types/knockout-amd-helpers/knockout-amd-helpers-tests.ts diff --git a/knockout-amd-helpers/tsconfig.json b/types/knockout-amd-helpers/tsconfig.json similarity index 100% rename from knockout-amd-helpers/tsconfig.json rename to types/knockout-amd-helpers/tsconfig.json diff --git a/knockout-paging/index.d.ts b/types/knockout-paging/index.d.ts similarity index 100% rename from knockout-paging/index.d.ts rename to types/knockout-paging/index.d.ts diff --git a/knockout-paging/knockout-paging-tests.ts b/types/knockout-paging/knockout-paging-tests.ts similarity index 100% rename from knockout-paging/knockout-paging-tests.ts rename to types/knockout-paging/knockout-paging-tests.ts diff --git a/knockout-paging/tsconfig.json b/types/knockout-paging/tsconfig.json similarity index 100% rename from knockout-paging/tsconfig.json rename to types/knockout-paging/tsconfig.json diff --git a/knockout-pre-rendered/index.d.ts b/types/knockout-pre-rendered/index.d.ts similarity index 100% rename from knockout-pre-rendered/index.d.ts rename to types/knockout-pre-rendered/index.d.ts diff --git a/knockout-pre-rendered/knockout-pre-rendered-tests.ts b/types/knockout-pre-rendered/knockout-pre-rendered-tests.ts similarity index 100% rename from knockout-pre-rendered/knockout-pre-rendered-tests.ts rename to types/knockout-pre-rendered/knockout-pre-rendered-tests.ts diff --git a/knockout-pre-rendered/tsconfig.json b/types/knockout-pre-rendered/tsconfig.json similarity index 100% rename from knockout-pre-rendered/tsconfig.json rename to types/knockout-pre-rendered/tsconfig.json diff --git a/knockout-secure-binding/index.d.ts b/types/knockout-secure-binding/index.d.ts similarity index 100% rename from knockout-secure-binding/index.d.ts rename to types/knockout-secure-binding/index.d.ts diff --git a/knockout-secure-binding/knockout-secure-binding-tests.ts b/types/knockout-secure-binding/knockout-secure-binding-tests.ts similarity index 100% rename from knockout-secure-binding/knockout-secure-binding-tests.ts rename to types/knockout-secure-binding/knockout-secure-binding-tests.ts diff --git a/knockout-secure-binding/tsconfig.json b/types/knockout-secure-binding/tsconfig.json similarity index 100% rename from knockout-secure-binding/tsconfig.json rename to types/knockout-secure-binding/tsconfig.json diff --git a/knockout-transformations/index.d.ts b/types/knockout-transformations/index.d.ts similarity index 100% rename from knockout-transformations/index.d.ts rename to types/knockout-transformations/index.d.ts diff --git a/knockout-transformations/knockout-transformations-tests.ts b/types/knockout-transformations/knockout-transformations-tests.ts similarity index 100% rename from knockout-transformations/knockout-transformations-tests.ts rename to types/knockout-transformations/knockout-transformations-tests.ts diff --git a/knockout-transformations/tsconfig.json b/types/knockout-transformations/tsconfig.json similarity index 100% rename from knockout-transformations/tsconfig.json rename to types/knockout-transformations/tsconfig.json diff --git a/knockout.deferred.updates/index.d.ts b/types/knockout.deferred.updates/index.d.ts similarity index 100% rename from knockout.deferred.updates/index.d.ts rename to types/knockout.deferred.updates/index.d.ts diff --git a/knockout.deferred.updates/knockout.deferred.updates-tests.ts b/types/knockout.deferred.updates/knockout.deferred.updates-tests.ts similarity index 100% rename from knockout.deferred.updates/knockout.deferred.updates-tests.ts rename to types/knockout.deferred.updates/knockout.deferred.updates-tests.ts diff --git a/knockout.deferred.updates/tsconfig.json b/types/knockout.deferred.updates/tsconfig.json similarity index 100% rename from knockout.deferred.updates/tsconfig.json rename to types/knockout.deferred.updates/tsconfig.json diff --git a/knockout.editables/index.d.ts b/types/knockout.editables/index.d.ts similarity index 100% rename from knockout.editables/index.d.ts rename to types/knockout.editables/index.d.ts diff --git a/knockout.mapper/tsconfig.json b/types/knockout.editables/tsconfig.json similarity index 100% rename from knockout.mapper/tsconfig.json rename to types/knockout.editables/tsconfig.json diff --git a/knockout.es5/index.d.ts b/types/knockout.es5/index.d.ts similarity index 100% rename from knockout.es5/index.d.ts rename to types/knockout.es5/index.d.ts diff --git a/knockout.es5/knockout.es5-tests.ts b/types/knockout.es5/knockout.es5-tests.ts similarity index 100% rename from knockout.es5/knockout.es5-tests.ts rename to types/knockout.es5/knockout.es5-tests.ts diff --git a/knockout.es5/tsconfig.json b/types/knockout.es5/tsconfig.json similarity index 100% rename from knockout.es5/tsconfig.json rename to types/knockout.es5/tsconfig.json diff --git a/knockout.kogrid/index.d.ts b/types/knockout.kogrid/index.d.ts similarity index 100% rename from knockout.kogrid/index.d.ts rename to types/knockout.kogrid/index.d.ts diff --git a/knockout.kogrid/knockout.kogrid-tests.ts b/types/knockout.kogrid/knockout.kogrid-tests.ts similarity index 100% rename from knockout.kogrid/knockout.kogrid-tests.ts rename to types/knockout.kogrid/knockout.kogrid-tests.ts diff --git a/knockout.kogrid/tsconfig.json b/types/knockout.kogrid/tsconfig.json similarity index 100% rename from knockout.kogrid/tsconfig.json rename to types/knockout.kogrid/tsconfig.json diff --git a/knockout.mapper/index.d.ts b/types/knockout.mapper/index.d.ts similarity index 100% rename from knockout.mapper/index.d.ts rename to types/knockout.mapper/index.d.ts diff --git a/knockout.postbox/tsconfig.json b/types/knockout.mapper/tsconfig.json similarity index 100% rename from knockout.postbox/tsconfig.json rename to types/knockout.mapper/tsconfig.json diff --git a/knockout.mapping/index.d.ts b/types/knockout.mapping/index.d.ts similarity index 100% rename from knockout.mapping/index.d.ts rename to types/knockout.mapping/index.d.ts diff --git a/knockout.mapping/knockout.mapping-tests.ts b/types/knockout.mapping/knockout.mapping-tests.ts similarity index 100% rename from knockout.mapping/knockout.mapping-tests.ts rename to types/knockout.mapping/knockout.mapping-tests.ts diff --git a/knockout.mapping/tsconfig.json b/types/knockout.mapping/tsconfig.json similarity index 100% rename from knockout.mapping/tsconfig.json rename to types/knockout.mapping/tsconfig.json diff --git a/knockout.postbox/index.d.ts b/types/knockout.postbox/index.d.ts similarity index 100% rename from knockout.postbox/index.d.ts rename to types/knockout.postbox/index.d.ts diff --git a/knockout.validation/tsconfig.json b/types/knockout.postbox/tsconfig.json similarity index 100% rename from knockout.validation/tsconfig.json rename to types/knockout.postbox/tsconfig.json diff --git a/knockout.projections/index.d.ts b/types/knockout.projections/index.d.ts similarity index 100% rename from knockout.projections/index.d.ts rename to types/knockout.projections/index.d.ts diff --git a/knockout.projections/knockout.projections-tests.ts b/types/knockout.projections/knockout.projections-tests.ts similarity index 100% rename from knockout.projections/knockout.projections-tests.ts rename to types/knockout.projections/knockout.projections-tests.ts diff --git a/knockout.projections/tsconfig.json b/types/knockout.projections/tsconfig.json similarity index 100% rename from knockout.projections/tsconfig.json rename to types/knockout.projections/tsconfig.json diff --git a/knockout.punches/index.d.ts b/types/knockout.punches/index.d.ts similarity index 100% rename from knockout.punches/index.d.ts rename to types/knockout.punches/index.d.ts diff --git a/knockout.punches/knockout.punches-tests.ts b/types/knockout.punches/knockout.punches-tests.ts similarity index 100% rename from knockout.punches/knockout.punches-tests.ts rename to types/knockout.punches/knockout.punches-tests.ts diff --git a/knockout.punches/tsconfig.json b/types/knockout.punches/tsconfig.json similarity index 100% rename from knockout.punches/tsconfig.json rename to types/knockout.punches/tsconfig.json diff --git a/knockout.rx/index.d.ts b/types/knockout.rx/index.d.ts similarity index 100% rename from knockout.rx/index.d.ts rename to types/knockout.rx/index.d.ts diff --git a/knockout.rx/knockout.rx-tests.ts b/types/knockout.rx/knockout.rx-tests.ts similarity index 100% rename from knockout.rx/knockout.rx-tests.ts rename to types/knockout.rx/knockout.rx-tests.ts diff --git a/knockout.rx/tsconfig.json b/types/knockout.rx/tsconfig.json similarity index 100% rename from knockout.rx/tsconfig.json rename to types/knockout.rx/tsconfig.json diff --git a/knockout.validation/index.d.ts b/types/knockout.validation/index.d.ts similarity index 100% rename from knockout.validation/index.d.ts rename to types/knockout.validation/index.d.ts diff --git a/knockout.viewmodel/tsconfig.json b/types/knockout.validation/tsconfig.json similarity index 100% rename from knockout.viewmodel/tsconfig.json rename to types/knockout.validation/tsconfig.json diff --git a/knockout.viewmodel/index.d.ts b/types/knockout.viewmodel/index.d.ts similarity index 100% rename from knockout.viewmodel/index.d.ts rename to types/knockout.viewmodel/index.d.ts diff --git a/mapsjs/tsconfig.json b/types/knockout.viewmodel/tsconfig.json similarity index 100% rename from mapsjs/tsconfig.json rename to types/knockout.viewmodel/tsconfig.json diff --git a/knockout/index.d.ts b/types/knockout/index.d.ts similarity index 100% rename from knockout/index.d.ts rename to types/knockout/index.d.ts diff --git a/knockout/test/index.ts b/types/knockout/test/index.ts similarity index 100% rename from knockout/test/index.ts rename to types/knockout/test/index.ts diff --git a/knockout/test/templatingBehaviors.ts b/types/knockout/test/templatingBehaviors.ts similarity index 100% rename from knockout/test/templatingBehaviors.ts rename to types/knockout/test/templatingBehaviors.ts diff --git a/knockout/tsconfig.json b/types/knockout/tsconfig.json similarity index 100% rename from knockout/tsconfig.json rename to types/knockout/tsconfig.json diff --git a/knockstrap/index.d.ts b/types/knockstrap/index.d.ts similarity index 100% rename from knockstrap/index.d.ts rename to types/knockstrap/index.d.ts diff --git a/knockstrap/knockstrap-tests.ts b/types/knockstrap/knockstrap-tests.ts similarity index 100% rename from knockstrap/knockstrap-tests.ts rename to types/knockstrap/knockstrap-tests.ts diff --git a/knockstrap/tsconfig.json b/types/knockstrap/tsconfig.json similarity index 100% rename from knockstrap/tsconfig.json rename to types/knockstrap/tsconfig.json diff --git a/knuddels-userapps-api/index.d.ts b/types/knuddels-userapps-api/index.d.ts similarity index 98% rename from knuddels-userapps-api/index.d.ts rename to types/knuddels-userapps-api/index.d.ts index 52183f832f..98eb30e054 100644 --- a/knuddels-userapps-api/index.d.ts +++ b/types/knuddels-userapps-api/index.d.ts @@ -7,21 +7,25 @@ interface Json { [x: string]: string | number | boolean | Date | Json | JsonArray; } +// tslint:disable-next-line no-empty-interface interface JsonArray extends Array { } // serializable objects (for persistence) type KnuddelsSerializable = string | number | boolean | User | BotUser; interface KnuddelsJson { [x: string]: string | number | boolean | Date | KnuddelsJson | KnuddelsJsonArray | KnuddelsSerializable; } +// tslint:disable-next-line no-empty-interface interface KnuddelsJsonArray extends Array { } // "data" that may be send between apps and between server and client type KnuddelsEvent = string | Json | KnuddelsEventArray; +// tslint:disable-next-line no-empty-interface interface KnuddelsEventArray extends Array { } + /** * App ist die abstrakte Klasse einer konkreten App, die ein Entwickler schreiben kann. * Im eigenen Javascript-Code muss eine Variable mit dem Namen App vorhanden sein, damit eine App lauffähig ist. */ -declare interface App { +interface App { /** * Dieses Methode wird aufgerufen, sobald ein Nutzer versucht den Channel zu betreten. * Die App kann nun entscheiden, ob der Nutzer den Channel betreten darf. @@ -533,9 +537,15 @@ declare class BotUser extends User { * Hat ein Channelbesitzer eine gewisse Menge Schulden angesammelt, so schalten wir alle Apps in diesem Channel ab. *
Es können nur Knuddel transferiert werden zu Nutzern mit UserType.Human. */ - transferKnuddel(receivingUserOrAccount: (User|KnuddelAccount), knuddelAmount: KnuddelAmount, - parameters?: { displayReasonText?: string; transferDisplayType?: KnuddelTransferDisplayType; - onSuccess?: () => void; onError?: (message: string) => void; }): void; + transferKnuddel( + receivingUserOrAccount: User | KnuddelAccount, + knuddelAmount: KnuddelAmount, + parameters?: { + displayReasonText?: string; + transferDisplayType?: KnuddelTransferDisplayType; + onSuccess?: () => void; + onError?: (message: string) => void; + }): void; } /** @@ -869,8 +879,8 @@ declare class Client { /** * Klasse, mit der clientseitige Farbobjekte erstellt werden können. */ -declare module Client { - export class Color { +declare namespace Client { + class Color { /** * Erzeugt ein Color-Objekt mit RGB-Werten. */ @@ -901,8 +911,8 @@ declare module Client { /** * Klasse, die es ermöglicht ein Event via Client/dispatchEvent:method zu versenden. */ -declare module Client { - export class Event { +declare namespace Client { + class Event { /** * Erzeugt ein Event. */ @@ -913,8 +923,8 @@ declare module Client { /** * Klasse, die es ermöglicht den Inhalte zu steuern, die im Bereich liegen, der das HTML User Interface hostet. */ -declare module Client { - export class HostFrame { +declare namespace Client { + class HostFrame { /** * Setzt den Titel der Seite im gezoomten Modus (nur Android). */ @@ -1960,7 +1970,7 @@ declare class SingleDiceResult { /** * Diese Dokumentation beschreibt, welche Erweiterungen am serverseitigen String-Objekt vorgenommen wurden. */ -declare interface String { +interface String { /** * Die Methode liefert den String zurück, auf dem sie aufgerufen wurde mit KCode escaped. */ @@ -2454,8 +2464,9 @@ declare class UserAccess { * Loopt über alle zugreifbaren User sortiert nach Registrierzeitpunkt und * führt für jeden User das übergebene Callback aus. */ - eachAccessibleUser(callback: (user: User, index: number, accessibleUserCount: number, key?: string) => boolean, - parameters?: { onStart?: (accessibleUserCount: number, key?: string) => void; + eachAccessibleUser( + callback: (user: User, index: number, accessibleUserCount: number, key?: string) => boolean, + parameters?: { onStart?: (accessibleUserCount: number, key?: string) => void; onEnd?: (accessibleUserCount: number, key?: string) => void; }): void; } @@ -2570,9 +2581,17 @@ declare class UserPersistenceNumbers { * Ruft eine Funktion für alle Nutzer auf, die einen bestimmten key in der UserPersistence gesetzt haben. * Hierbei greifen die übergebenen Filter. */ - static each(key: string, callback: { user: User; value: number; index: number; totalCount: number; key: string; }, - parameters?: { ascending?: boolean; minimumValue?: number; maximumValue?: number; maximumCount?: number; - onStart?: (totalCount: number, key: string) => void; onEnd?: (totalCount: number, key: string) => void; }): void; + static each( + key: string, + callback: { user: User; value: number; index: number; totalCount: number; key: string; }, + parameters?: { + ascending?: boolean; + minimumValue?: number; + maximumValue?: number; + maximumCount?: number; + onStart?: (totalCount: number, key: string) => void; + onEnd?: (totalCount: number, key: string) => void; + }): void; /** * Liefert alle keys, die für User in der Persistence * gespeichert wurden. @@ -2689,4 +2708,3 @@ declare class VideoChannelData { */ getStreamingVideoUsers(): User[]; } - diff --git a/knuddels-userapps-api/knuddels-userapps-api-tests.ts b/types/knuddels-userapps-api/knuddels-userapps-api-tests.ts similarity index 84% rename from knuddels-userapps-api/knuddels-userapps-api-tests.ts rename to types/knuddels-userapps-api/knuddels-userapps-api-tests.ts index a940b7f19b..dadd8b93b6 100644 --- a/knuddels-userapps-api/knuddels-userapps-api-tests.ts +++ b/types/knuddels-userapps-api/knuddels-userapps-api-tests.ts @@ -1,5 +1,4 @@ class Server implements App { - private usersPlaying: { [nick: string]: number } = {}; private isShuttingDown: boolean = false; @@ -10,7 +9,7 @@ class Server implements App { KnuddelsServer.getChannel() .getOnlineUsers(UserType.Human) .forEach((user) => { - this.onUserJoined(user) + this.onUserJoined(user); }); }; @@ -22,7 +21,7 @@ class Server implements App { }; onUserLeft(user: User) { - if (this.usersPlaying[user.getNick()] == 1) { + if (this.usersPlaying[user.getNick()] === 1) { KnuddelsServer.getDefaultBotUser() .transferKnuddel(user, new KnuddelAmount(1), 'Du hast den Channel verlassen.'); @@ -34,7 +33,7 @@ class Server implements App { if (!this.isShuttingDown) { this.isShuttingDown = true; - for (let key in this.usersPlaying) { + for (const key in this.usersPlaying) { const userId = KnuddelsServer.getUserAccess() .getUserId(key); const user = KnuddelsServer.getUserAccess() @@ -58,14 +57,13 @@ class Server implements App { if (!sender.canSendAppContent(this.appContent)) { knuddelTransfer.reject('Sorry, mit diesem Gerät kannst du gerade nicht spielen.'); } else if (sender.isChannelOwner() && knuddelTransfer.getKnuddelAmount() - .asNumber() != 1) { + .asNumber() !== 1) { knuddelTransfer.accept(); } else if (this.isShuttingDown) { knuddelTransfer.reject('Du App nimmt gerade keine neuen Spieler an.'); } else if (this.usersPlaying[sender.getNick()]) { knuddelTransfer.reject('Du spielst bereits.'); - } else if (knuddelTransfer.getKnuddelAmount() - .asNumber() != 1) { + } else if (knuddelTransfer.getKnuddelAmount().asNumber() !== 1) { const botNick = KnuddelsServer.getDefaultBotUser() .getNick() .escapeKCode(); @@ -76,7 +74,7 @@ class Server implements App { }; onKnuddelReceived(user: User, receiver: User, knuddelAmount: KnuddelAmount) { - if (knuddelAmount.asNumber() == 1) { + if (knuddelAmount.asNumber() === 1) { this.usersPlaying[user.getNick()] = 1; user.sendAppContent(this.appContent); } else { @@ -85,27 +83,23 @@ class Server implements App { }; onEventReceived(user: User, key: string, data: string) { - if (key == 'selectedEntry' && this.usersPlaying[user.getNick()] == 1) { + if (key === 'selectedEntry' && this.usersPlaying[user.getNick()] === 1) { this.usersPlaying[user.getNick()] = 2; setTimeout(() => { - - let doorNumber = parseInt(data[data.length - 1], 10); - - let winningDoorNumber = RandomOperations.nextInt(0, 2) + 1; - - let hasWon = winningDoorNumber == doorNumber; - - let text = hasWon + const doorNumber = parseInt(data[data.length - 1], 10); + const winningDoorNumber = RandomOperations.nextInt(0, 2) + 1; + const hasWon = winningDoorNumber === doorNumber; + const text = hasWon ? 'Richtig getippt' : 'Knapp daneben'; user.getAppContentSession(AppViewMode.Overlay) .getAppContent() .sendEvent('openDoor', { - 'door': doorNumber, - 'winningDoor': winningDoorNumber, - 'text': text, + door: doorNumber, + winningDoor: winningDoorNumber, + text, }); if (hasWon) { @@ -127,7 +121,6 @@ class Server implements App { }, 1500); } }; - } declare let App: Server; // tell the compiler that "App" will be available diff --git a/knuddels-userapps-api/tsconfig.json b/types/knuddels-userapps-api/tsconfig.json similarity index 100% rename from knuddels-userapps-api/tsconfig.json rename to types/knuddels-userapps-api/tsconfig.json diff --git a/knuddels-userapps-api/tslint.json b/types/knuddels-userapps-api/tslint.json similarity index 100% rename from knuddels-userapps-api/tslint.json rename to types/knuddels-userapps-api/tslint.json diff --git a/ko.plus/index.d.ts b/types/ko.plus/index.d.ts similarity index 100% rename from ko.plus/index.d.ts rename to types/ko.plus/index.d.ts diff --git a/ko.plus/ko.plus-tests.ts b/types/ko.plus/ko.plus-tests.ts similarity index 100% rename from ko.plus/ko.plus-tests.ts rename to types/ko.plus/ko.plus-tests.ts diff --git a/ko.plus/tsconfig.json b/types/ko.plus/tsconfig.json similarity index 100% rename from ko.plus/tsconfig.json rename to types/ko.plus/tsconfig.json diff --git a/koa-basic-auth/index.d.ts b/types/koa-basic-auth/index.d.ts similarity index 99% rename from koa-basic-auth/index.d.ts rename to types/koa-basic-auth/index.d.ts index 2cbf888606..0fff3bb731 100644 --- a/koa-basic-auth/index.d.ts +++ b/types/koa-basic-auth/index.d.ts @@ -6,11 +6,8 @@ import * as Koa from "koa"; declare function auth(opts: { - name: string; - pass: string; - }): Koa.Middleware; export = auth; diff --git a/koa-basic-auth/koa-basic-auth-tests.ts b/types/koa-basic-auth/koa-basic-auth-tests.ts similarity index 100% rename from koa-basic-auth/koa-basic-auth-tests.ts rename to types/koa-basic-auth/koa-basic-auth-tests.ts diff --git a/koa-basic-auth/tsconfig.json b/types/koa-basic-auth/tsconfig.json similarity index 100% rename from koa-basic-auth/tsconfig.json rename to types/koa-basic-auth/tsconfig.json diff --git a/koa-basic-auth/tslint.json b/types/koa-basic-auth/tslint.json similarity index 100% rename from koa-basic-auth/tslint.json rename to types/koa-basic-auth/tslint.json diff --git a/koa-bodyparser/index.d.ts b/types/koa-bodyparser/index.d.ts similarity index 100% rename from koa-bodyparser/index.d.ts rename to types/koa-bodyparser/index.d.ts diff --git a/koa-bodyparser/koa-bodyparser-tests.ts b/types/koa-bodyparser/koa-bodyparser-tests.ts similarity index 100% rename from koa-bodyparser/koa-bodyparser-tests.ts rename to types/koa-bodyparser/koa-bodyparser-tests.ts diff --git a/koa-bodyparser/tsconfig.json b/types/koa-bodyparser/tsconfig.json similarity index 100% rename from koa-bodyparser/tsconfig.json rename to types/koa-bodyparser/tsconfig.json diff --git a/koa-cache-control/index.d.ts b/types/koa-cache-control/index.d.ts similarity index 100% rename from koa-cache-control/index.d.ts rename to types/koa-cache-control/index.d.ts diff --git a/koa-cache-control/koa-cache-control-tests.ts b/types/koa-cache-control/koa-cache-control-tests.ts similarity index 100% rename from koa-cache-control/koa-cache-control-tests.ts rename to types/koa-cache-control/koa-cache-control-tests.ts diff --git a/koa-cache-control/tsconfig.json b/types/koa-cache-control/tsconfig.json similarity index 92% rename from koa-cache-control/tsconfig.json rename to types/koa-cache-control/tsconfig.json index ae4aea7b85..846b5abbae 100644 --- a/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/nedb-logger/tslint.json b/types/koa-cache-control/tslint.json similarity index 100% rename from nedb-logger/tslint.json rename to types/koa-cache-control/tslint.json diff --git a/koa-compose/index.d.ts b/types/koa-compose/index.d.ts similarity index 82% rename from koa-compose/index.d.ts rename to types/koa-compose/index.d.ts index 6e466b9d28..88047abcc9 100644 --- a/koa-compose/index.d.ts +++ b/types/koa-compose/index.d.ts @@ -3,12 +3,11 @@ // Definitions by: jKey Lu // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - declare function compose(middleware: Array>): compose.ComposedMiddleware; declare namespace compose { type Middleware = (context: T, next: () => Promise) => any; - type ComposedMiddleware = (context: T, next?: Middleware) => Promise; + type ComposedMiddleware = (context: T, next?: () => Promise) => Promise; } export = compose; diff --git a/types/koa-compose/koa-compose-tests.ts b/types/koa-compose/koa-compose-tests.ts new file mode 100644 index 0000000000..4c12ca6571 --- /dev/null +++ b/types/koa-compose/koa-compose-tests.ts @@ -0,0 +1,13 @@ +import compose = require('koa-compose'); + +const fn1: compose.Middleware = (context: any, next: () => Promise): Promise => + Promise + .resolve(console.log('in fn1')) + .then(() => next()); + +const fn2: compose.Middleware = (context: any, next: () => Promise): Promise => + Promise + .resolve(console.log('in fn2')) + .then(() => next()); + +const fn = compose([fn1, fn2]); diff --git a/koa-compose/tsconfig.json b/types/koa-compose/tsconfig.json similarity index 100% rename from koa-compose/tsconfig.json rename to types/koa-compose/tsconfig.json diff --git a/proj4/tslint.json b/types/koa-compose/tslint.json similarity index 100% rename from proj4/tslint.json rename to types/koa-compose/tslint.json diff --git a/koa-compress/index.d.ts b/types/koa-compress/index.d.ts similarity index 100% rename from koa-compress/index.d.ts rename to types/koa-compress/index.d.ts diff --git a/koa-compress/koa-compress-tests.ts b/types/koa-compress/koa-compress-tests.ts similarity index 100% rename from koa-compress/koa-compress-tests.ts rename to types/koa-compress/koa-compress-tests.ts diff --git a/koa-compress/tsconfig.json b/types/koa-compress/tsconfig.json similarity index 100% rename from koa-compress/tsconfig.json rename to types/koa-compress/tsconfig.json diff --git a/koa-favicon/index.d.ts b/types/koa-favicon/index.d.ts similarity index 100% rename from koa-favicon/index.d.ts rename to types/koa-favicon/index.d.ts diff --git a/koa-favicon/koa-favicon-tests.ts b/types/koa-favicon/koa-favicon-tests.ts similarity index 100% rename from koa-favicon/koa-favicon-tests.ts rename to types/koa-favicon/koa-favicon-tests.ts diff --git a/koa-favicon/tsconfig.json b/types/koa-favicon/tsconfig.json similarity index 100% rename from koa-favicon/tsconfig.json rename to types/koa-favicon/tsconfig.json diff --git a/koa-hbs/index.d.ts b/types/koa-hbs/index.d.ts similarity index 100% rename from koa-hbs/index.d.ts rename to types/koa-hbs/index.d.ts diff --git a/koa-hbs/koa-hbs-tests.ts b/types/koa-hbs/koa-hbs-tests.ts similarity index 100% rename from koa-hbs/koa-hbs-tests.ts rename to types/koa-hbs/koa-hbs-tests.ts diff --git a/koa-hbs/tsconfig.json b/types/koa-hbs/tsconfig.json similarity index 100% rename from koa-hbs/tsconfig.json rename to types/koa-hbs/tsconfig.json diff --git a/koa-json-error/index.d.ts b/types/koa-json-error/index.d.ts similarity index 100% rename from koa-json-error/index.d.ts rename to types/koa-json-error/index.d.ts diff --git a/koa-json-error/koa-json-error-tests.ts b/types/koa-json-error/koa-json-error-tests.ts similarity index 96% rename from koa-json-error/koa-json-error-tests.ts rename to types/koa-json-error/koa-json-error-tests.ts index 77a13a1f64..31779f7bd9 100644 --- a/koa-json-error/koa-json-error-tests.ts +++ b/types/koa-json-error/koa-json-error-tests.ts @@ -5,4 +5,4 @@ const app = new Koa(); app.use(error({ preFormat: err => Object.assign({}, err) -})); \ No newline at end of file +})); diff --git a/koa-json-error/tsconfig.json b/types/koa-json-error/tsconfig.json similarity index 100% rename from koa-json-error/tsconfig.json rename to types/koa-json-error/tsconfig.json diff --git a/koa-json-error/tslint.json b/types/koa-json-error/tslint.json similarity index 100% rename from koa-json-error/tslint.json rename to types/koa-json-error/tslint.json diff --git a/koa-json/index.d.ts b/types/koa-json/index.d.ts similarity index 100% rename from koa-json/index.d.ts rename to types/koa-json/index.d.ts diff --git a/koa-json/koa-json-tests.ts b/types/koa-json/koa-json-tests.ts similarity index 100% rename from koa-json/koa-json-tests.ts rename to types/koa-json/koa-json-tests.ts diff --git a/koa-json/tsconfig.json b/types/koa-json/tsconfig.json similarity index 100% rename from koa-json/tsconfig.json rename to types/koa-json/tsconfig.json diff --git a/koa-jwt/index.d.ts b/types/koa-jwt/index.d.ts similarity index 94% rename from koa-jwt/index.d.ts rename to types/koa-jwt/index.d.ts index e2a4435aef..ba60bd8e61 100644 --- a/koa-jwt/index.d.ts +++ b/types/koa-jwt/index.d.ts @@ -10,7 +10,7 @@ export = jwt; declare function jwt(options: jwt.Options): Koa.Middleware; declare namespace jwt { - export interface Options { + interface Options { secret: string | Buffer; key?: string; getToken?: (opts: jwt.Options) => string; diff --git a/koa-jwt/koa-jwt-tests.ts b/types/koa-jwt/koa-jwt-tests.ts similarity index 88% rename from koa-jwt/koa-jwt-tests.ts rename to types/koa-jwt/koa-jwt-tests.ts index 793bf50872..88bd75e739 100644 --- a/koa-jwt/koa-jwt-tests.ts +++ b/types/koa-jwt/koa-jwt-tests.ts @@ -1,7 +1,7 @@ import koa = require('koa'); import jwt = require('koa-jwt'); -var app = new koa(); +const app = new koa(); app.use(jwt({ secret: 'some-secret-key' diff --git a/koa-jwt/tsconfig.json b/types/koa-jwt/tsconfig.json similarity index 100% rename from koa-jwt/tsconfig.json rename to types/koa-jwt/tsconfig.json diff --git a/koa-jwt/tslint.json b/types/koa-jwt/tslint.json similarity index 100% rename from koa-jwt/tslint.json rename to types/koa-jwt/tslint.json diff --git a/koa-logger/index.d.ts b/types/koa-logger/index.d.ts similarity index 100% rename from koa-logger/index.d.ts rename to types/koa-logger/index.d.ts diff --git a/koa-logger/koa-logger-tests.ts b/types/koa-logger/koa-logger-tests.ts similarity index 100% rename from koa-logger/koa-logger-tests.ts rename to types/koa-logger/koa-logger-tests.ts diff --git a/koa-logger/tsconfig.json b/types/koa-logger/tsconfig.json similarity index 100% rename from koa-logger/tsconfig.json rename to types/koa-logger/tsconfig.json diff --git a/koa-mount/index.d.ts b/types/koa-mount/index.d.ts similarity index 100% rename from koa-mount/index.d.ts rename to types/koa-mount/index.d.ts diff --git a/koa-mount/koa-mount-tests.ts b/types/koa-mount/koa-mount-tests.ts similarity index 100% rename from koa-mount/koa-mount-tests.ts rename to types/koa-mount/koa-mount-tests.ts diff --git a/koa-mount/tsconfig.json b/types/koa-mount/tsconfig.json similarity index 100% rename from koa-mount/tsconfig.json rename to types/koa-mount/tsconfig.json diff --git a/koa-passport/index.d.ts b/types/koa-passport/index.d.ts similarity index 100% rename from koa-passport/index.d.ts rename to types/koa-passport/index.d.ts diff --git a/koa-passport/koa-passport-tests.ts b/types/koa-passport/koa-passport-tests.ts similarity index 100% rename from koa-passport/koa-passport-tests.ts rename to types/koa-passport/koa-passport-tests.ts diff --git a/koa-passport/tsconfig.json b/types/koa-passport/tsconfig.json similarity index 100% rename from koa-passport/tsconfig.json rename to types/koa-passport/tsconfig.json diff --git a/koa-pug/index.d.ts b/types/koa-pug/index.d.ts similarity index 86% rename from koa-pug/index.d.ts rename to types/koa-pug/index.d.ts index 836d7c88fe..f478072953 100644 --- a/koa-pug/index.d.ts +++ b/types/koa-pug/index.d.ts @@ -5,19 +5,16 @@ import * as koa from "koa"; - export = Pug; - /** main module */ declare class Pug { constructor(options?: Pug.PugOptions); use(app: koa): void; } - declare namespace Pug { - export interface PugOptions { + interface PugOptions { viewPath?: string; pretty?: boolean; compileDebug?: boolean; @@ -28,14 +25,12 @@ declare namespace Pug { basedir?: string; app?: koa; } - export interface PugCtxOptions extends PugOptions { + interface PugCtxOptions extends PugOptions { fromString: boolean; } - export interface PugLocals { [str: string]: any; } + interface PugLocals { [str: string]: any; } } - - /** plugin */ declare module 'koa' { interface Context { diff --git a/koa-pug/koa-pug-tests.ts b/types/koa-pug/koa-pug-tests.ts similarity index 100% rename from koa-pug/koa-pug-tests.ts rename to types/koa-pug/koa-pug-tests.ts diff --git a/koa-pug/tsconfig.json b/types/koa-pug/tsconfig.json similarity index 100% rename from koa-pug/tsconfig.json rename to types/koa-pug/tsconfig.json diff --git a/types/koa-pug/tslint.json b/types/koa-pug/tslint.json new file mode 100644 index 0000000000..d3631e8907 --- /dev/null +++ b/types/koa-pug/tslint.json @@ -0,0 +1,6 @@ +{ + "extends": "../tslint.json", + "rules": { + "no-useless-files": false + } +} diff --git a/koa-router/index.d.ts b/types/koa-router/index.d.ts similarity index 97% rename from koa-router/index.d.ts rename to types/koa-router/index.d.ts index 8d78591165..f93c983bb0 100644 --- a/koa-router/index.d.ts +++ b/types/koa-router/index.d.ts @@ -1,6 +1,6 @@ // Type definitions for koa-router v7.x // Project: https://github.com/alexmingoia/koa-router/ -// Definitions by: Jerry Chin +// Definitions by: Jerry Chin , Pavel Ivanov // Definitions: https://github.com/hellopao/DefinitelyTyped /* =================== USAGE =================== @@ -13,6 +13,12 @@ import * as Koa from "koa"; +declare module "koa" { + interface Context { + params: any; + } +} + declare module Layer { export interface ILayerOptions { diff --git a/koa-router/koa-router-tests.ts b/types/koa-router/koa-router-tests.ts similarity index 100% rename from koa-router/koa-router-tests.ts rename to types/koa-router/koa-router-tests.ts diff --git a/koa-router/tsconfig.json b/types/koa-router/tsconfig.json similarity index 100% rename from koa-router/tsconfig.json rename to types/koa-router/tsconfig.json diff --git a/koa-send/index.d.ts b/types/koa-send/index.d.ts similarity index 100% rename from koa-send/index.d.ts rename to types/koa-send/index.d.ts diff --git a/koa-send/koa-send-tests.ts b/types/koa-send/koa-send-tests.ts similarity index 100% rename from koa-send/koa-send-tests.ts rename to types/koa-send/koa-send-tests.ts diff --git a/koa-send/tsconfig.json b/types/koa-send/tsconfig.json similarity index 100% rename from koa-send/tsconfig.json rename to types/koa-send/tsconfig.json diff --git a/koa-session-minimal/index.d.ts b/types/koa-session-minimal/index.d.ts similarity index 100% rename from koa-session-minimal/index.d.ts rename to types/koa-session-minimal/index.d.ts diff --git a/koa-session-minimal/koa-session-minimal-tests.ts b/types/koa-session-minimal/koa-session-minimal-tests.ts similarity index 100% rename from koa-session-minimal/koa-session-minimal-tests.ts rename to types/koa-session-minimal/koa-session-minimal-tests.ts diff --git a/koa-session-minimal/tsconfig.json b/types/koa-session-minimal/tsconfig.json similarity index 100% rename from koa-session-minimal/tsconfig.json rename to types/koa-session-minimal/tsconfig.json diff --git a/koa-static/index.d.ts b/types/koa-static/index.d.ts similarity index 100% rename from koa-static/index.d.ts rename to types/koa-static/index.d.ts diff --git a/koa-static/koa-static-tests.ts b/types/koa-static/koa-static-tests.ts similarity index 100% rename from koa-static/koa-static-tests.ts rename to types/koa-static/koa-static-tests.ts diff --git a/koa-static/tsconfig.json b/types/koa-static/tsconfig.json similarity index 100% rename from koa-static/tsconfig.json rename to types/koa-static/tsconfig.json diff --git a/types/koa-views/index.d.ts b/types/koa-views/index.d.ts new file mode 100644 index 0000000000..5d9d88b647 --- /dev/null +++ b/types/koa-views/index.d.ts @@ -0,0 +1,60 @@ +// 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..f025f55d93 --- /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')); +}); \ No newline at end of file diff --git a/redux-persist-transform-encrypt/tsconfig.json b/types/koa-views/tsconfig.json similarity index 89% rename from redux-persist-transform-encrypt/tsconfig.json rename to types/koa-views/tsconfig.json index b0a989e85a..69d0c62b8c 100644 --- a/redux-persist-transform-encrypt/tsconfig.json +++ b/types/koa-views/tsconfig.json @@ -17,6 +17,6 @@ }, "files": [ "index.d.ts", - "redux-persist-transform-encrypt-tests.ts" + "koa-views-tests.ts" ] } \ No newline at end of file diff --git a/steed/tslint.json b/types/koa-views/tslint.json similarity index 100% rename from steed/tslint.json rename to types/koa-views/tslint.json diff --git a/koa/index.d.ts b/types/koa/index.d.ts similarity index 100% rename from koa/index.d.ts rename to types/koa/index.d.ts diff --git a/koa/koa-tests.ts b/types/koa/koa-tests.ts similarity index 100% rename from koa/koa-tests.ts rename to types/koa/koa-tests.ts diff --git a/koa/tsconfig.json b/types/koa/tsconfig.json similarity index 100% rename from koa/tsconfig.json rename to types/koa/tsconfig.json diff --git a/kolite/index.d.ts b/types/kolite/index.d.ts similarity index 100% rename from kolite/index.d.ts rename to types/kolite/index.d.ts diff --git a/kolite/knockout.activity.d.ts b/types/kolite/knockout.activity.d.ts similarity index 100% rename from kolite/knockout.activity.d.ts rename to types/kolite/knockout.activity.d.ts diff --git a/kolite/knockout.command.d.ts b/types/kolite/knockout.command.d.ts similarity index 100% rename from kolite/knockout.command.d.ts rename to types/kolite/knockout.command.d.ts diff --git a/kolite/knockout.dirtyFlag.d.ts b/types/kolite/knockout.dirtyFlag.d.ts similarity index 100% rename from kolite/knockout.dirtyFlag.d.ts rename to types/kolite/knockout.dirtyFlag.d.ts diff --git a/kolite/kolite-tests.ts b/types/kolite/kolite-tests.ts similarity index 100% rename from kolite/kolite-tests.ts rename to types/kolite/kolite-tests.ts diff --git a/kolite/tsconfig.json b/types/kolite/tsconfig.json similarity index 100% rename from kolite/tsconfig.json rename to types/kolite/tsconfig.json diff --git a/konami.js/index.d.ts b/types/konami.js/index.d.ts similarity index 100% rename from konami.js/index.d.ts rename to types/konami.js/index.d.ts diff --git a/konami.js/konami.js-tests.ts b/types/konami.js/konami.js-tests.ts similarity index 100% rename from konami.js/konami.js-tests.ts rename to types/konami.js/konami.js-tests.ts diff --git a/konami.js/tsconfig.json b/types/konami.js/tsconfig.json similarity index 100% rename from konami.js/tsconfig.json rename to types/konami.js/tsconfig.json diff --git a/kramed/index.d.ts b/types/kramed/index.d.ts similarity index 99% rename from kramed/index.d.ts rename to types/kramed/index.d.ts index 41984f9dc5..c7cc41b7e6 100644 --- a/kramed/index.d.ts +++ b/types/kramed/index.d.ts @@ -157,4 +157,4 @@ export interface KramedOptions { smartypants?: boolean; } -export declare var kramed: KramedStatic; \ No newline at end of file +export const kramed: KramedStatic; diff --git a/types/kramed/kramed-tests.ts b/types/kramed/kramed-tests.ts new file mode 100644 index 0000000000..2ec7ea833b --- /dev/null +++ b/types/kramed/kramed-tests.ts @@ -0,0 +1,40 @@ +import { KramedOptions, kramed, KramedParser, KramedStatic, KramedRenderer } from 'kramed'; + +const options: KramedOptions = { + gfm: true, + tables: true, + breaks: false, + pedantic: false, + sanitize: true, + smartLists: true, + silent: false, + highlight(code: string, lang: string) { + return ''; + }, + langPrefix: 'lang-', + smartypants: false, + renderer: new kramed.Renderer() +}; + +function callback() { + 'callback called'; +} + +kramed.setOptions(options); + +kramed('i am using __kramdown__.'); +kramed('i am using __kramdown__.', options); +kramed('i am using __kramdown__.', callback); +kramed('i am using __kramdown__.', options, callback); + +kramed.parse('i am using __kramdown__.'); +kramed.parse('i am using __kramdown__.', options); +kramed.parse('i am using __kramdown__.', callback); +kramed.parse('i am using __kramdown__.', options, callback); + +const text = 'something'; +const tokens = kramed.lexer(text, options); +kramed.parser(tokens); + +const renderer = new kramed.Renderer(); +renderer.heading = (text, level, raw) => text + level.toString() + raw; diff --git a/kramed/tsconfig.json b/types/kramed/tsconfig.json similarity index 89% rename from kramed/tsconfig.json rename to types/kramed/tsconfig.json index 50f51102f7..dec874decf 100644 --- a/kramed/tsconfig.json +++ b/types/kramed/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/koa-pug/tslint.json b/types/kramed/tslint.json similarity index 100% rename from koa-pug/tslint.json rename to types/kramed/tslint.json diff --git a/kue/index.d.ts b/types/kue/index.d.ts similarity index 100% rename from kue/index.d.ts rename to types/kue/index.d.ts diff --git a/kue/kue-tests.ts b/types/kue/kue-tests.ts similarity index 100% rename from kue/kue-tests.ts rename to types/kue/kue-tests.ts diff --git a/kue/tsconfig.json b/types/kue/tsconfig.json similarity index 100% rename from kue/tsconfig.json rename to types/kue/tsconfig.json diff --git a/kuromoji/index.d.ts b/types/kuromoji/index.d.ts similarity index 100% rename from kuromoji/index.d.ts rename to types/kuromoji/index.d.ts diff --git a/kuromoji/kuromoji-tests.ts b/types/kuromoji/kuromoji-tests.ts similarity index 100% rename from kuromoji/kuromoji-tests.ts rename to types/kuromoji/kuromoji-tests.ts diff --git a/kuromoji/tsconfig.json b/types/kuromoji/tsconfig.json similarity index 100% rename from kuromoji/tsconfig.json rename to types/kuromoji/tsconfig.json diff --git a/lab/index.d.ts b/types/lab/index.d.ts similarity index 100% rename from lab/index.d.ts rename to types/lab/index.d.ts diff --git a/lab/lab-tests.ts b/types/lab/lab-tests.ts similarity index 100% rename from lab/lab-tests.ts rename to types/lab/lab-tests.ts diff --git a/lab/tsconfig.json b/types/lab/tsconfig.json similarity index 100% rename from lab/tsconfig.json rename to types/lab/tsconfig.json diff --git a/ladda/index.d.ts b/types/ladda/index.d.ts similarity index 100% rename from ladda/index.d.ts rename to types/ladda/index.d.ts diff --git a/ladda/ladda-tests.ts b/types/ladda/ladda-tests.ts similarity index 100% rename from ladda/ladda-tests.ts rename to types/ladda/ladda-tests.ts diff --git a/ladda/tsconfig.json b/types/ladda/tsconfig.json similarity index 100% rename from ladda/tsconfig.json rename to types/ladda/tsconfig.json diff --git a/later/index.d.ts b/types/later/index.d.ts similarity index 100% rename from later/index.d.ts rename to types/later/index.d.ts diff --git a/later/later-tests.ts b/types/later/later-tests.ts similarity index 100% rename from later/later-tests.ts rename to types/later/later-tests.ts diff --git a/later/tsconfig.json b/types/later/tsconfig.json similarity index 100% rename from later/tsconfig.json rename to types/later/tsconfig.json diff --git a/kramed/tslint.json b/types/later/tslint.json similarity index 100% rename from kramed/tslint.json rename to types/later/tslint.json diff --git a/latinize/index.d.ts b/types/latinize/index.d.ts similarity index 100% rename from latinize/index.d.ts rename to types/latinize/index.d.ts diff --git a/latinize/latinize-tests.ts b/types/latinize/latinize-tests.ts similarity index 100% rename from latinize/latinize-tests.ts rename to types/latinize/latinize-tests.ts diff --git a/latinize/tsconfig.json b/types/latinize/tsconfig.json similarity index 100% rename from latinize/tsconfig.json rename to types/latinize/tsconfig.json diff --git a/launchpad/index.d.ts b/types/launchpad/index.d.ts similarity index 100% rename from launchpad/index.d.ts rename to types/launchpad/index.d.ts diff --git a/launchpad/launchpad-tests.ts b/types/launchpad/launchpad-tests.ts similarity index 100% rename from launchpad/launchpad-tests.ts rename to types/launchpad/launchpad-tests.ts diff --git a/launchpad/tsconfig.json b/types/launchpad/tsconfig.json similarity index 100% rename from launchpad/tsconfig.json rename to types/launchpad/tsconfig.json diff --git a/lazy.js/index.d.ts b/types/lazy.js/index.d.ts similarity index 100% rename from lazy.js/index.d.ts rename to types/lazy.js/index.d.ts diff --git a/lazy.js/lazy.js-tests.ts b/types/lazy.js/lazy.js-tests.ts similarity index 100% rename from lazy.js/lazy.js-tests.ts rename to types/lazy.js/lazy.js-tests.ts diff --git a/lazy.js/tsconfig.json b/types/lazy.js/tsconfig.json similarity index 100% rename from lazy.js/tsconfig.json rename to types/lazy.js/tsconfig.json diff --git a/lazypipe/index.d.ts b/types/lazypipe/index.d.ts similarity index 100% rename from lazypipe/index.d.ts rename to types/lazypipe/index.d.ts diff --git a/lazypipe/lazypipe-tests.ts b/types/lazypipe/lazypipe-tests.ts similarity index 100% rename from lazypipe/lazypipe-tests.ts rename to types/lazypipe/lazypipe-tests.ts diff --git a/lazypipe/tsconfig.json b/types/lazypipe/tsconfig.json similarity index 100% rename from lazypipe/tsconfig.json rename to types/lazypipe/tsconfig.json diff --git a/ldapjs/index.d.ts b/types/ldapjs/index.d.ts similarity index 100% rename from ldapjs/index.d.ts rename to types/ldapjs/index.d.ts diff --git a/ldapjs/ldapjs-tests.ts b/types/ldapjs/ldapjs-tests.ts similarity index 100% rename from ldapjs/ldapjs-tests.ts rename to types/ldapjs/ldapjs-tests.ts diff --git a/ldapjs/tsconfig.json b/types/ldapjs/tsconfig.json similarity index 100% rename from ldapjs/tsconfig.json rename to types/ldapjs/tsconfig.json diff --git a/ldclient-js/index.d.ts b/types/ldclient-js/index.d.ts similarity index 100% rename from ldclient-js/index.d.ts rename to types/ldclient-js/index.d.ts diff --git a/ldclient-js/ldclient-js-tests.ts b/types/ldclient-js/ldclient-js-tests.ts similarity index 100% rename from ldclient-js/ldclient-js-tests.ts rename to types/ldclient-js/ldclient-js-tests.ts diff --git a/ldclient-js/tsconfig.json b/types/ldclient-js/tsconfig.json similarity index 100% rename from ldclient-js/tsconfig.json rename to types/ldclient-js/tsconfig.json diff --git a/leadfoot/index.d.ts b/types/leadfoot/index.d.ts similarity index 100% rename from leadfoot/index.d.ts rename to types/leadfoot/index.d.ts diff --git a/leadfoot/leadfoot-tests.ts b/types/leadfoot/leadfoot-tests.ts similarity index 100% rename from leadfoot/leadfoot-tests.ts rename to types/leadfoot/leadfoot-tests.ts diff --git a/leadfoot/tsconfig.json b/types/leadfoot/tsconfig.json similarity index 100% rename from leadfoot/tsconfig.json rename to types/leadfoot/tsconfig.json diff --git a/leaflet-curve/index.d.ts b/types/leaflet-curve/index.d.ts similarity index 100% rename from leaflet-curve/index.d.ts rename to types/leaflet-curve/index.d.ts diff --git a/leaflet-curve/leaflet-curve-tests.ts b/types/leaflet-curve/leaflet-curve-tests.ts similarity index 100% rename from leaflet-curve/leaflet-curve-tests.ts rename to types/leaflet-curve/leaflet-curve-tests.ts diff --git a/plotly.js/tsconfig.json b/types/leaflet-curve/tsconfig.json similarity index 93% rename from plotly.js/tsconfig.json rename to types/leaflet-curve/tsconfig.json index 94a19223ed..06ed09cdd1 100644 --- a/plotly.js/tsconfig.json +++ b/types/leaflet-curve/tsconfig.json @@ -18,6 +18,6 @@ }, "files": [ "index.d.ts", - "plotly.js-tests.ts" + "leaflet-curve-tests.ts" ] } \ No newline at end of file diff --git a/leaflet-draw/index.d.ts b/types/leaflet-draw/index.d.ts similarity index 81% rename from leaflet-draw/index.d.ts rename to types/leaflet-draw/index.d.ts index 3e2963f18b..300c97b80f 100644 --- a/leaflet-draw/index.d.ts +++ b/types/leaflet-draw/index.d.ts @@ -6,14 +6,12 @@ /// declare namespace L { - export interface MapOptions { + interface MapOptions { drawControl?: boolean; } namespace Control { - - export interface DrawConstructorOptions { - + interface DrawConstructorOptions { /** * The initial position of the control (one of the map corners). * @@ -34,11 +32,9 @@ declare namespace L { * Default value: false */ edit: EditOptions; - } - export interface DrawOptions { - + interface DrawOptions { /** * Polyline draw handler options. Set to false to disable handler. * @@ -75,8 +71,7 @@ declare namespace L { marker?: DrawOptions.MarkerOptions; } - export interface EditOptions { - + interface EditOptions { /** * This is the FeatureGroup that stores all editable shapes. * THIS IS REQUIRED FOR THE EDIT TOOLBAR TO WORK @@ -100,21 +95,17 @@ declare namespace L { remove?: DrawOptions.DeleteHandlerOptions; } - export interface Draw extends Control { + interface Draw extends Control { setDrawingOptions(options: DrawOptions): void; } - export class Draw { + class Draw { constructor(options?: DrawConstructorOptions); } - } - namespace DrawOptions { - - export interface PolylineOptions { - + interface PolylineOptions { /** * Determines if line segments can cross. * @@ -165,8 +156,7 @@ declare namespace L { repeatMode?: boolean; } - export interface PolygonOptions extends PolylineOptions { - + interface PolygonOptions extends PolylineOptions { /** * Show the area of the drawn polygon in m², ha or km². * The area is only approximate and become less accurate the larger the polygon is. @@ -176,8 +166,7 @@ declare namespace L { showArea?: boolean; } - export interface RectangleOptions { - + interface RectangleOptions { /** * The options used when drawing the rectangle on the map. * @@ -193,8 +182,7 @@ declare namespace L { repeatMode?: boolean; } - export interface CircleOptions { - + interface CircleOptions { /** * The options used when drawing the circle on the map. * @@ -210,8 +198,7 @@ declare namespace L { repeatMode?: boolean; } - export interface MarkerOptions { - + interface MarkerOptions { /** * TThe icon displayed when drawing a marker. * @@ -234,7 +221,7 @@ declare namespace L { repeatMode?: boolean; } - export interface EditHandlerOptions { + interface EditHandlerOptions { /** * The path options for how the layers will look while in edit mode. * If this is set to null the editable path options will not be set. @@ -244,37 +231,30 @@ declare namespace L { selectedPathOptions?: L.PathOptions; } - export interface DeleteHandlerOptions { + interface DeleteHandlerOptions { } - } namespace Draw { - namespace Event { - - export const CREATED: string; - export const EDITED: string; - export const DELETED: string; - export const DRAWSTART: string; - export const DRAWSTOP: string; - export const DRAWVERTEX: string; - export const EDITSTART: string; - export const EDITMOVE: string; - export const EDITRESIZE: string; - export const EDITVERTEX: string; - export const EDITSTOP: string; - export const DELETESTART: string; - export const DELETESTOP: string; - + const CREATED: string; + const EDITED: string; + const DELETED: string; + const DRAWSTART: string; + const DRAWSTOP: string; + const DRAWVERTEX: string; + const EDITSTART: string; + const EDITMOVE: string; + const EDITRESIZE: string; + const EDITVERTEX: string; + const EDITSTOP: string; + const DELETESTART: string; + const DELETESTOP: string; } - } namespace DrawEvents { - - export interface Created { - + interface Created { /** * Layer that was just created. */ @@ -286,8 +266,7 @@ declare namespace L { layerType: string; } - export interface Edited { - + interface Edited { /** * List of all layers just edited on the map. */ @@ -297,52 +276,49 @@ declare namespace L { /** * Triggered when layers have been removed (and saved) from the FeatureGroup. */ - export interface Deleted { - + interface Deleted { /** * List of all layers just removed from the map. */ layers: LayerGroup; } - export interface DrawStart { - + interface DrawStart { /** * The type of layer this is. One of: polyline, polygon, rectangle, circle, marker */ layerType: string; } - export interface DrawStop { - + interface DrawStop { /** * The type of layer this is. One of: polyline, polygon, rectangle, circle, marker */ layerType: string; } - export interface EditStart { + interface EditStart { /** * The type of edit this is. One of: edit */ handler: string; } - export interface EditStop { + interface EditStop { /** * The type of edit this is. One of: edit */ handler: string; } - export interface DeleteStart { + interface DeleteStart { /** * The type of edit this is. One of: remove */ handler: string; } - export interface DeleteStop { + interface DeleteStop { /** * The type of edit this is. One of: remove */ @@ -351,15 +327,14 @@ declare namespace L { } namespace GeometryUtil { - /** * Returns the area of a polygon drawn with leaflet.draw */ - export function geodesicArea(coordinates: L.LatLngLiteral[]): number; + function geodesicArea(coordinates: L.LatLngLiteral[]): number; /** * Returns a readable area string in yards or metric */ - export function readableArea(area: number, isMetric: boolean): string; + function readableArea(area: number, isMetric: boolean): string; } } diff --git a/leaflet-draw/leaflet-draw-tests.ts b/types/leaflet-draw/leaflet-draw-tests.ts similarity index 84% rename from leaflet-draw/leaflet-draw-tests.ts rename to types/leaflet-draw/leaflet-draw-tests.ts index 8ad6e2a804..9729747851 100644 --- a/leaflet-draw/leaflet-draw-tests.ts +++ b/types/leaflet-draw/leaflet-draw-tests.ts @@ -1,12 +1,12 @@ -var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', +const osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', osmAttrib = '© OpenStreetMap contributors', osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib}), map = L.map('map', {layers: [osm], center: L.latLng(-37.7772, 175.2756), zoom: 15 }); -var drawnItems = L.featureGroup(); +const drawnItems = L.featureGroup(); map.addLayer(drawnItems); -var drawControl = new L.Control.Draw({ +const drawControl = new L.Control.Draw({ position: 'topleft' , draw: { polygon: { @@ -36,8 +36,8 @@ var drawControl = new L.Control.Draw({ map.addControl(drawControl); map.on('draw:created', (e: any) => { - var drawEvent = (e as L.DrawEvents.Created); - var type = drawEvent.layerType, + const drawEvent = e as L.DrawEvents.Created; + const type = drawEvent.layerType, layer = drawEvent.layer; drawnItems.addLayer(layer); diff --git a/leaflet-draw/tsconfig.json b/types/leaflet-draw/tsconfig.json similarity index 100% rename from leaflet-draw/tsconfig.json rename to types/leaflet-draw/tsconfig.json diff --git a/sip.js/tslint.json b/types/leaflet-draw/tslint.json similarity index 100% rename from sip.js/tslint.json rename to types/leaflet-draw/tslint.json diff --git a/leaflet-editable/index.d.ts b/types/leaflet-editable/index.d.ts similarity index 94% rename from leaflet-editable/index.d.ts rename to types/leaflet-editable/index.d.ts index 3d8c84d93f..f66b45a9b8 100644 --- a/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/leaflet-editable/leaflet-editable-tests.ts b/types/leaflet-editable/leaflet-editable-tests.ts similarity index 98% rename from leaflet-editable/leaflet-editable-tests.ts rename to types/leaflet-editable/leaflet-editable-tests.ts index b8ff8744db..09728add47 100644 --- a/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/tsconfig.json b/types/leaflet-editable/tsconfig.json new file mode 100644 index 0000000000..4ae40d6774 --- /dev/null +++ b/types/leaflet-editable/tsconfig.json @@ -0,0 +1,28 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "paths": { + "leaflet": [ + "leaflet/v0" + ] + }, + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "leaflet-editable-tests.ts" + ] +} \ No newline at end of file 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/package.json b/types/leaflet-fullscreen/package.json new file mode 100644 index 0000000000..8501cf4dbc --- /dev/null +++ b/types/leaflet-fullscreen/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "@types/leaflet": "^1.0.58" + } +} \ No newline at end of file diff --git a/leaflet-editable/tsconfig.json b/types/leaflet-fullscreen/tsconfig.json similarity index 83% rename from leaflet-editable/tsconfig.json rename to types/leaflet-fullscreen/tsconfig.json index 264f610f6e..a47f7af1bd 100644 --- a/leaflet-editable/tsconfig.json +++ b/types/leaflet-fullscreen/tsconfig.json @@ -7,7 +7,7 @@ ], "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": false, + "strictNullChecks": true, "baseUrl": "../", "types": [], "noEmit": true, @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "leaflet-editable-tests.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/leaflet-geocoder-mapzen/index.d.ts b/types/leaflet-geocoder-mapzen/index.d.ts similarity index 93% rename from leaflet-geocoder-mapzen/index.d.ts rename to types/leaflet-geocoder-mapzen/index.d.ts index 934c67b563..390a751360 100644 --- a/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/leaflet-geocoder-mapzen/leaflet-geocoder-mapzen-tests.ts b/types/leaflet-geocoder-mapzen/leaflet-geocoder-mapzen-tests.ts similarity index 100% rename from leaflet-geocoder-mapzen/leaflet-geocoder-mapzen-tests.ts rename to types/leaflet-geocoder-mapzen/leaflet-geocoder-mapzen-tests.ts diff --git a/leaflet-geocoder-mapzen/tsconfig.json b/types/leaflet-geocoder-mapzen/tsconfig.json similarity index 74% rename from leaflet-geocoder-mapzen/tsconfig.json rename to types/leaflet-geocoder-mapzen/tsconfig.json index 1737c5b81c..b5786e4cda 100644 --- a/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-imageoverlay-rotated/index.d.ts b/types/leaflet-imageoverlay-rotated/index.d.ts new file mode 100644 index 0000000000..a60a1d4b37 --- /dev/null +++ b/types/leaflet-imageoverlay-rotated/index.d.ts @@ -0,0 +1,26 @@ +// Type definitions for leaflet-imageoverlay-rotated 0.1 +// Project: https://github.com/IvanSanchez/Leaflet.ImageOverlay.Rotated +// Definitions by: Thomas Kleinke +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +declare namespace L { + namespace ImageOverlay { + interface Rotated extends L.ImageOverlay { + reposition( + topleft: L.LatLngExpression, + topright: L.LatLngExpression, + bottomleft: L.LatLngExpression): void; + } + } + + namespace imageOverlay { + function rotated( + imgSrc: string | HTMLImageElement | HTMLCanvasElement, + topleft: L.LatLngExpression, + topright: L.LatLngExpression, + bottomleft: L.LatLngExpression, + options?: L.ImageOverlayOptions): L.ImageOverlay.Rotated; + } +} diff --git a/types/leaflet-imageoverlay-rotated/leaflet-imageoverlay-rotated-tests.ts b/types/leaflet-imageoverlay-rotated/leaflet-imageoverlay-rotated-tests.ts new file mode 100644 index 0000000000..50db445f79 --- /dev/null +++ b/types/leaflet-imageoverlay-rotated/leaflet-imageoverlay-rotated-tests.ts @@ -0,0 +1,10 @@ +const topleft = L.latLng(40.52256691873593, -3.7743186950683594); +const topright = L.latLng(40.5210255066156, -3.7734764814376835); +const bottomleft = L.latLng(40.52180437272552, -3.7768453359603886); + +const overlay = L.imageOverlay.rotated("image.jpg", topleft, topright, bottomleft, { + opacity: 0.5, + interactive: true +}); + +overlay.reposition(topleft, topright, bottomleft); diff --git a/leaflet-imageoverlay-rotated/tsconfig.json b/types/leaflet-imageoverlay-rotated/tsconfig.json similarity index 100% rename from leaflet-imageoverlay-rotated/tsconfig.json rename to types/leaflet-imageoverlay-rotated/tsconfig.json diff --git a/later/tslint.json b/types/leaflet-imageoverlay-rotated/tslint.json similarity index 100% rename from later/tslint.json rename to types/leaflet-imageoverlay-rotated/tslint.json diff --git a/leaflet-label/index.d.ts b/types/leaflet-label/index.d.ts similarity index 97% rename from leaflet-label/index.d.ts rename to types/leaflet-label/index.d.ts index 879f456e2d..e1e96b717a 100644 --- a/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 { @@ -68,7 +68,7 @@ declare global { new(options?: LabelOptions): Label; } - var Label: LabelStatic; + const Label: LabelStatic; interface Label extends IEventPowered